From owner-svn-src-all@freebsd.org Sun Mar 4 00:13:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D23FF48D6F; Sun, 4 Mar 2018 00:13:49 +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 901037E9E8; Sun, 4 Mar 2018 00:13:48 +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 w240DXbT040295 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 4 Mar 2018 02:13:36 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w240DXbT040295 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w240DXp6040294; Sun, 4 Mar 2018 02:13:33 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 4 Mar 2018 02:13:33 +0200 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330362 - head/share/man/man9 Message-ID: <20180304001333.GJ3194@kib.kiev.ua> References: <201803032308.w23N8nAV013138@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201803032308.w23N8nAV013138@repo.freebsd.org> User-Agent: Mutt/1.9.3 (2018-01-21) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 00:13:49 -0000 On Sat, Mar 03, 2018 at 11:08:49PM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Sat Mar 3 23:08:49 2018 > New Revision: 330362 > URL: https://svnweb.freebsd.org/changeset/base/330362 > > Log: > Document pause_sig(9) and update prototypes for existing pause(9) and > pause_sbt(9) functions. > > MFC after: 1 week > Suggested by: cem@ > Sponsored by: Mellanox Technologies > > Modified: > head/share/man/man9/Makefile > head/share/man/man9/sleep.9 > > Modified: head/share/man/man9/Makefile > ============================================================================== > --- head/share/man/man9/Makefile Sat Mar 3 22:28:20 2018 (r330361) > +++ head/share/man/man9/Makefile Sat Mar 3 23:08:49 2018 (r330362) > @@ -1830,6 +1830,7 @@ MLINKS+=sleep.9 msleep.9 \ > sleep.9 msleep_spin.9 \ > sleep.9 msleep_spin_sbt.9 \ > sleep.9 pause.9 \ > + sleep.9 pause_sig.9 \ > sleep.9 pause_sbt.9 \ > sleep.9 tsleep.9 \ > sleep.9 tsleep_sbt.9 \ > > Modified: head/share/man/man9/sleep.9 > ============================================================================== > --- head/share/man/man9/sleep.9 Sat Mar 3 22:28:20 2018 (r330361) > +++ head/share/man/man9/sleep.9 Sat Mar 3 23:08:49 2018 (r330362) > @@ -25,7 +25,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd May 24, 2015 > +.Dd March 4, 2018 > .Dt SLEEP 9 > .Os > .Sh NAME > @@ -34,6 +34,7 @@ > .Nm msleep_spin , > .Nm msleep_spin_sbt , > .Nm pause , > +.Nm pause_sig , > .Nm pause_sbt , pause_sbt is before pause_sig alphabetically. This note is applicable for all insertions of the pause_sig name in the man page. > .Nm tsleep , > .Nm tsleep_sbt , > @@ -53,9 +54,11 @@ > .Ft int > .Fn msleep_spin_sbt "void *chan" "struct mtx *mtx" "const char *wmesg" \ > "sbintime_t sbt" "sbintime_t pr" "int flags" > -.Ft void > +.Ft int > .Fn pause "const char *wmesg" "int timo" > -.Ft void > +.Ft int > +.Fn pause_sig "const char *wmesg" "int timo" > +.Ft int > .Fn pause_sbt "const char *wmesg" "sbintime_t sbt" "sbintime_t pr" \ > "int flags" > .Ft int > @@ -73,6 +76,8 @@ The functions > .Fn msleep , > .Fn msleep_spin , > .Fn pause , > +.Fn pause_sig , > +.Fn pause_sbt , > .Fn wakeup , > and > .Fn wakeup_one > @@ -82,8 +87,10 @@ external event, it is put to sleep by > .Fn tsleep , > .Fn msleep , > .Fn msleep_spin , > +.Fn pause , > +.Fn pause_sig , > or > -.Fn pause . > +.Fn pause_sbt . > Threads may also wait using one of the locking primitive sleep routines > .Xr mtx_sleep 9 , > .Xr rw_sleep 9 , > @@ -248,6 +255,11 @@ The thread can not be awakened early by signals or cal > .Fn wakeup > or > .Fn wakeup_one . > +The > +.Fn pause_sig > +function is a variant of > +.Fn pause > +which can be awakened early by signals. It would be useful to mention that pause_sbt(9) provides the same feature by using a flag. > .Pp > The > .Fn wakeup_one > @@ -385,6 +397,10 @@ The > .Fn pause > function appeared in > .Fx 7.0 . > +The > +.Fn pause_sig > +function appeared in > +.Fx 12.0 . > .Sh AUTHORS > .An -nosplit > This manual page was written by From owner-svn-src-all@freebsd.org Sun Mar 4 01:37:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEE97F2A229; Sun, 4 Mar 2018 01:37:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0E3E81935; Sun, 4 Mar 2018 01:37:49 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BE8969B8; Sun, 4 Mar 2018 01:37:49 +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 w241bnek087832; Sun, 4 Mar 2018 01:37:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w241bnMN087831; Sun, 4 Mar 2018 01:37:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803040137.w241bnMN087831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 4 Mar 2018 01:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330366 - head/gnu/usr.bin/binutils/ld X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/gnu/usr.bin/binutils/ld X-SVN-Commit-Revision: 330366 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 01:37:50 -0000 Author: emaste Date: Sun Mar 4 01:37:49 2018 New Revision: 330366 URL: https://svnweb.freebsd.org/changeset/base/330366 Log: When lld is ld, install bfd's man page as ld.bfd.1 When WITH_LLD_IS_LD is set, lld's man page is installed as ld.1.gz, as was GNU BFD's man page prior to this change. Reported by: Tobias Kortkamp Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/binutils/ld/Makefile Modified: head/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile Sat Mar 3 23:39:07 2018 (r330365) +++ head/gnu/usr.bin/binutils/ld/Makefile Sun Mar 4 01:37:49 2018 (r330366) @@ -7,7 +7,15 @@ ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu x .PATH: ${SRCDIR}/ld PROG= ld.bfd +.if ${MK_LLD_IS_LD} == "no" MAN= ld.1 +.else +MAN= ld.bfd.1 +CLEANFILES+= ld.bfd.1 +ld.bfd.1: ld.1 + ${CP} ${.ALLSRC} ${.TARGET} +.endif + SCRIPTDIR= /usr/libdata/ldscripts SRCS+= ldcref.c \ ldctor.c \ From owner-svn-src-all@freebsd.org Sun Mar 4 01:25:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8C45F29204 for ; Sun, 4 Mar 2018 01:25:23 +0000 (UTC) (envelope-from 01000161ee9cee29-0a02aaff-9052-41d2-a638-4bc673a41df6-000000@amazonses.com) Received: from a8-56.smtp-out.amazonses.com (a8-56.smtp-out.amazonses.com [54.240.8.56]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6861181157 for ; Sun, 4 Mar 2018 01:25:23 +0000 (UTC) (envelope-from 01000161ee9cee29-0a02aaff-9052-41d2-a638-4bc673a41df6-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=dqtolf56kk3wpt62c3jnwboqvr7iedax; d=tarsnap.com; t=1520126717; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=a87Q0j1WL+QrUND38MtDRDE8tD6W7SQOC5+2LJaobNo=; b=aqlcWwy/N0Pi2M/xXOk4Q00egxqVmSPY1y1EaWms1W8uo40Vj4Gb0C5E8IA5dkUI VeERG9ND/33KNC8WArNgMyIapurKfWPm8Gla6M4dK+2nnNOzxOiiwN7snLaSj6tFI8l t8HAnKDYJV1/mhbaeV04S0palzw5l556EiV23MrA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1520126717; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=a87Q0j1WL+QrUND38MtDRDE8tD6W7SQOC5+2LJaobNo=; b=qW7LSY0zuOI8cbZkEfiH3DU7GKLLOdzapovwdBkHuQpu52YcATBbNWSZuebIZHC1 ZpktilOe1wY7TnzZRapMI2kIcLX7GTRgAfhf9AhlTSa2mg8EUowcrZfSJ6mrR8f4d7z iXQCehnQDBoZn3r+tyQysrqHe8ukB70VU/SJpv0I= Subject: Re: svn commit: r330236 - head/sys/compat/linuxkpi/common/src To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803011031.w21AVpNU076475@repo.freebsd.org> From: Colin Percival Message-ID: <01000161ee9cee29-0a02aaff-9052-41d2-a638-4bc673a41df6-000000@email.amazonses.com> Date: Sun, 4 Mar 2018 01:25:17 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <201803011031.w21AVpNU076475@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2018.03.04-54.240.8.56 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 01:25:24 -0000 On 03/01/18 02:31, Hans Petter Selasky wrote: > New Revision: 330236 > Correct the return value from flush_work() and flush_delayed_work() in the > LinuxKPI to comply more with Linux. This fixes an issue when these functions > are used in waiting loops. > > MFC after: 1 week > Sponsored by: Mellanox Technologies In case the data point is useful: Merging this to stable/11 unbroke S3 suspend/resume on my laptop (system76 Galago Pro, kabylake, using the drm-next-kmod port). -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@freebsd.org Sun Mar 4 03:13:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A96EBF2E431; Sun, 4 Mar 2018 03:13:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D0FA8523A; Sun, 4 Mar 2018 03:13:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 300C87B9A; Sun, 4 Mar 2018 03:13:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w243DD4q038144; Sun, 4 Mar 2018 03:13:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w243DDSc038143; Sun, 4 Mar 2018 03:13:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803040313.w243DDSc038143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 4 Mar 2018 03:13:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330368 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 330368 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 03:13:14 -0000 Author: imp Date: Sun Mar 4 03:13:13 2018 New Revision: 330368 URL: https://svnweb.freebsd.org/changeset/base/330368 Log: Add documentation for CTLFLAG_MPSAFE. Modified: head/share/man/man9/sysctl.9 Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Sun Mar 4 02:41:25 2018 (r330367) +++ head/share/man/man9/sysctl.9 Sun Mar 4 03:13:13 2018 (r330368) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 10, 2017 +.Dd March 3, 2018 .Dt SYSCTL 9 .Os .Sh NAME @@ -662,6 +662,11 @@ this flag will prevent fetching the initial value from environment. Typically this flag should only be used for very early low level system setup code, and not by common drivers and modules. +.It Dv CTLFLAG_MPSAFE +This +.Xr sysctl 9 +handler is MP safe. +Do not grab Giant around calls to this handler. .El .Pp Additionally, any of the following optional flags may also be specified: From owner-svn-src-all@freebsd.org Sun Mar 4 03:21:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7774F2ED0E; Sun, 4 Mar 2018 03:21:12 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA6085A19; Sun, 4 Mar 2018 03:21:12 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95A9A7BDE; Sun, 4 Mar 2018 03:21:12 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w243LCaY040004; Sun, 4 Mar 2018 03:21:12 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w243LCnU040003; Sun, 4 Mar 2018 03:21:12 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803040321.w243LCnU040003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 4 Mar 2018 03:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330369 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330369 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 03:21:13 -0000 Author: kevans Date: Sun Mar 4 03:21:12 2018 New Revision: 330369 URL: https://svnweb.freebsd.org/changeset/base/330369 Log: lualoader: Return meaningful value in cli_execute loader.command(...) will return whatever the executed function returns, so follow suit and return whatever loader.command() returned or whatever the Lua function returns. Modified: head/stand/lua/cli.lua Modified: head/stand/lua/cli.lua ============================================================================== --- head/stand/lua/cli.lua Sun Mar 4 03:13:13 2018 (r330368) +++ head/stand/lua/cli.lua Sun Mar 4 03:21:12 2018 (r330369) @@ -77,8 +77,7 @@ function cli_execute(...) local argv = {...} -- Just in case... if #argv == 0 then - loader.command(...) - return + return loader.command(...) end local cmd_name = argv[1] @@ -88,9 +87,9 @@ function cli_execute(...) -- traditional reasons for including it don't necessarily apply, -- it may not be totally redundant if we want to have one global -- handling multiple commands - cmd(...) + return cmd(...) else - loader.command(...) + return loader.command(...) end end From owner-svn-src-all@freebsd.org Sun Mar 4 02:41:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBFA8F2CD4B; Sun, 4 Mar 2018 02:41:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81F6E83D8F; Sun, 4 Mar 2018 02:41:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B81E74C6; Sun, 4 Mar 2018 02:41:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w242fPMC019023; Sun, 4 Mar 2018 02:41:25 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w242fPhK019022; Sun, 4 Mar 2018 02:41:25 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803040241.w242fPhK019022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 4 Mar 2018 02:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330367 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 330367 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 02:41:26 -0000 Author: eadler Date: Sun Mar 4 02:41:25 2018 New Revision: 330367 URL: https://svnweb.freebsd.org/changeset/base/330367 Log: MFC r330256: sys/sys: Use a more common spelling of 'dirent' Modified: stable/11/sys/sys/dirent.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/dirent.h ============================================================================== --- stable/11/sys/sys/dirent.h Sun Mar 4 01:37:49 2018 (r330366) +++ stable/11/sys/sys/dirent.h Sun Mar 4 02:41:25 2018 (r330367) @@ -82,7 +82,7 @@ struct dirent { /* * The _GENERIC_DIRSIZ macro gives the minimum record length which will hold - * the directory entry. This returns the amount of space in struct direct + * the directory entry. This returns the amount of space in struct dirent * without the d_name field, plus enough space for the name with a terminating * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary. * From owner-svn-src-all@freebsd.org Sun Mar 4 03:23:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79B70F2EF9E; Sun, 4 Mar 2018 03:23:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2727B85DD9; Sun, 4 Mar 2018 03:23:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 220177D41; Sun, 4 Mar 2018 03:23:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w243NJVv043333; Sun, 4 Mar 2018 03:23:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w243NJ9J043332; Sun, 4 Mar 2018 03:23:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803040323.w243NJ9J043332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 4 Mar 2018 03:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330370 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330370 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 03:23:20 -0000 Author: kevans Date: Sun Mar 4 03:23:19 2018 New Revision: 330370 URL: https://svnweb.freebsd.org/changeset/base/330370 Log: lualoader: logdef -> logodef typo Modified: head/stand/lua/drawer.lua Modified: head/stand/lua/drawer.lua ============================================================================== --- head/stand/lua/drawer.lua Sun Mar 4 03:21:12 2018 (r330369) +++ head/stand/lua/drawer.lua Sun Mar 4 03:23:19 2018 (r330370) @@ -454,7 +454,7 @@ function drawer.drawlogo() x = x + drawer.shift.x y = y + drawer.shift.y - if logdef ~= nil and logodef.shift ~= nil then + if logodef ~= nil and logodef.shift ~= nil then x = x + logodef.shift.x y = y + logodef.shift.y end From owner-svn-src-all@freebsd.org Sun Mar 4 06:19:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2042F38DC0; Sun, 4 Mar 2018 06:19:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BF216C327; Sun, 4 Mar 2018 06:19:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 814FD1192C; Sun, 4 Mar 2018 06:19:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w246Jf9p028130; Sun, 4 Mar 2018 06:19:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w246JfLX028129; Sun, 4 Mar 2018 06:19:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803040619.w246JfLX028129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 4 Mar 2018 06:19:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330372 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 330372 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 06:19:42 -0000 Author: imp Date: Sun Mar 4 06:19:41 2018 New Revision: 330372 URL: https://svnweb.freebsd.org/changeset/base/330372 Log: Mention that CTLFLAG_MPSAFE is only for _PROC entries. Modified: head/share/man/man9/sysctl.9 Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Sun Mar 4 04:49:09 2018 (r330371) +++ head/share/man/man9/sysctl.9 Sun Mar 4 06:19:41 2018 (r330372) @@ -667,6 +667,9 @@ This .Xr sysctl 9 handler is MP safe. Do not grab Giant around calls to this handler. +This should only be used for +.Fn SYSCTL_PROC +entries. .El .Pp Additionally, any of the following optional flags may also be specified: From owner-svn-src-all@freebsd.org Sun Mar 4 04:49:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 218A5F33D98; Sun, 4 Mar 2018 04:49:10 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACBD7689A6; Sun, 4 Mar 2018 04:49:09 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4CD310A70; Sun, 4 Mar 2018 04:49:09 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w244n9md083121; Sun, 4 Mar 2018 04:49:09 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w244n993083120; Sun, 4 Mar 2018 04:49:09 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201803040449.w244n993083120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 4 Mar 2018 04:49:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330371 - head/stand/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/stand/powerpc/ofw X-SVN-Commit-Revision: 330371 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 04:49:10 -0000 Author: nwhitehorn Date: Sun Mar 4 04:49:09 2018 New Revision: 330371 URL: https://svnweb.freebsd.org/changeset/base/330371 Log: Where we can, pass the kernel an FDT facsimile of the OF device tree rather than a pointer to Open Firmware by default. This eliminates a number of potentially unsafe calls to firmware from the kernel and provides better performance. This feature is meant to be expanded until it is on by default unconditionally and, ideally, we can then garbage-collect the nightmare pile of hacks required to call into Open Firmware from a live kernel. Reviewed by: jhibbits Modified: head/stand/powerpc/ofw/main.c Modified: head/stand/powerpc/ofw/main.c ============================================================================== --- head/stand/powerpc/ofw/main.c Sun Mar 4 03:23:19 2018 (r330370) +++ head/stand/powerpc/ofw/main.c Sun Mar 4 04:49:09 2018 (r330371) @@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "bootstrap.h" +#include + struct arch_switch archsw; /* MI/MD interface boundary */ extern char end[]; @@ -47,6 +49,16 @@ static char heap[HEAP_SIZE]; // In BSS, so uses no spa #define OF_puts(fd, text) OF_write(fd, text, strlen(text)) +static __inline register_t +mfmsr(void) +{ + register_t value; + + __asm __volatile ("mfmsr %0" : "=r"(value)); + + return (value); +} + void init_heap(void) { @@ -144,6 +156,15 @@ main(int (*openfirm)(void *)) env_setenv("loaddev", EV_VOLATILE, bootpath, env_noset, env_nounset); setenv("LINES", "24", 1); /* optional */ + + /* + * On non-Apple hardware, where it works reliably, pass flattened + * device trees to the kernel by default instead of OF CI pointers. + * Apple hardware is the only virtual-mode OF implementation in + * existence, so far as I am aware, so use that as a flag. + */ + if (!(mfmsr() & PSL_DR)) + setenv("usefdt", "1", 1); archsw.arch_getdev = ofw_getdev; archsw.arch_copyin = ofw_copyin; From owner-svn-src-all@freebsd.org Sun Mar 4 08:00:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7116F3EAC5; Sun, 4 Mar 2018 08:00:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 992AE6F9F8; Sun, 4 Mar 2018 08:00:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9433012992; Sun, 4 Mar 2018 08:00:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24807vg077514; Sun, 4 Mar 2018 08:00:07 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24807km077513; Sun, 4 Mar 2018 08:00:07 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803040800.w24807km077513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 4 Mar 2018 08:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330373 - stable/11/usr.sbin/freebsd-update X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/freebsd-update X-SVN-Commit-Revision: 330373 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 08:00:08 -0000 Author: eadler Date: Sun Mar 4 08:00:07 2018 New Revision: 330373 URL: https://svnweb.freebsd.org/changeset/base/330373 Log: MFC r307156: MFportsnap r264740: Use case insensitive match when parsing host(1) output. Some DNS caches turn "FreeBSD.org" into "freebsd.org", which was causing the printed SRV records to not match our regex. PR: 170503 Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Sun Mar 4 06:19:41 2018 (r330372) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Sun Mar 4 08:00:07 2018 (r330373) @@ -953,7 +953,7 @@ fetch_pick_server_init () { # "$name server selection ..."; we allow either format. MLIST="_http._tcp.${SERVERNAME}" host -t srv "${MLIST}" | - sed -nE "s/${MLIST} (has SRV record|server selection) //p" | + sed -nE "s/${MLIST} (has SRV record|server selection) //Ip" | cut -f 1,2,4 -d ' ' | sed -e 's/\.$//' | sort > serverlist_full From owner-svn-src-all@freebsd.org Sun Mar 4 09:56:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89494F46D1A; Sun, 4 Mar 2018 09:56:56 +0000 (UTC) (envelope-from danfe@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 3C0B273ABE; Sun, 4 Mar 2018 09:56:56 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 348001D4DF; Sun, 4 Mar 2018 09:56:56 +0000 (UTC) Date: Sun, 4 Mar 2018 09:56:56 +0000 From: Alexey Dokuchaev To: Colin Percival Cc: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330236 - head/sys/compat/linuxkpi/common/src Message-ID: <20180304095656.GA36450@FreeBSD.org> References: <201803011031.w21AVpNU076475@repo.freebsd.org> <01000161ee9cee29-0a02aaff-9052-41d2-a638-4bc673a41df6-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01000161ee9cee29-0a02aaff-9052-41d2-a638-4bc673a41df6-000000@email.amazonses.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 09:56:56 -0000 On Sun, Mar 04, 2018 at 01:25:17AM +0000, Colin Percival wrote: > On 03/01/18 02:31, Hans Petter Selasky wrote: > > New Revision: 330236 > > Correct the return value from flush_work() and flush_delayed_work() > > in the LinuxKPI to comply more with Linux. This fixes an issue when > > these functions are used in waiting loops. > > > > MFC after: 1 week > > Sponsored by: Mellanox Technologies > > In case the data point is useful: Merging this to stable/11 unbroke S3 > suspend/resume on my laptop (system76 Galago Pro, kabylake, using the > drm-next-kmod port). Any data point about laptops and, particularly, suspend/resume is useful, thanks for sharing Colin! ./danfe From owner-svn-src-all@freebsd.org Sun Mar 4 10:05:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC954F477E4 for ; Sun, 4 Mar 2018 10:05:00 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 619F27414F for ; Sun, 4 Mar 2018 10:05:00 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x231.google.com with SMTP id g198so4750629ywb.3 for ; Sun, 04 Mar 2018 02:05:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YNYFaCvQGnbJxr+MkDggA9F+WTjeXdvXgcbR88MFMk8=; b=QSF6b8MUbvwsRsMMQ3rN3zkyOZWmogurPmslRvf1VKeFPmIHGriyhBzYPiSje3FNMO SG8cmVx2WqRmdEGXyE6sKorDqA9xARCckuHA3F+MFVP6ycO4mQyBnKi22JAKo6CBo+Ek 7k5pfyXowrsqcjEztO4WXKNjW58/6HWsvgtQg= 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=YNYFaCvQGnbJxr+MkDggA9F+WTjeXdvXgcbR88MFMk8=; b=nGcqPMjyq0ktrNBUw87pOiww0HdEXjeTZs5Z8gLlWQnbPbKNV/XM3CL9CyWN6jvpaR 2jD1KFAf8/SB4Va1xXRPuPEHAAsR6Kw/ij41aUo8FjE60kA7HUCjmkeJOM+GuZPeELXY qytKpEGUJqKASTpLrb+GOXYGa/8qRzHi3zMe81BeMoWHTMqq3+NsKhiK6lDmTdRE6UzA Lyr380szlO60UHfBR57+zb0VeYZPkRe3wo7VvOy8zJbNWcBee5rYse5kVLj4bb2ykJ4z gc9gyQ8c8Jc5WrHeDwTGqaQY+ldnhHVwTYjuzus36ihpiYLDWG3LHmUdvvjvq21BWToY nGGQ== X-Gm-Message-State: APf1xPCrPIS9jkp8/6y7dewZQLXFxomTGBlUUr+gWc+wpRza6ym6LqjC 2uGEo18ZzfWGwDQR+8q0acHL43eY/jBVKmbHT4/yhQ== X-Google-Smtp-Source: AG47ELv62xTlycN9PmSC955eRRCARDgZ5S10l/0D3lAndWjhbYfhqNgR6WKDA3qP2p7Epm7Pd8wfpGK3V6gzYHFamCI= X-Received: by 10.129.109.1 with SMTP id i1mr7104543ywc.113.1520157899662; Sun, 04 Mar 2018 02:04:59 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Sun, 4 Mar 2018 02:04:29 -0800 (PST) In-Reply-To: <201707022100.v62L0Ume001253@repo.freebsd.org> References: <201707022100.v62L0Ume001253@repo.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2018 02:04:29 -0800 Message-ID: Subject: Re: svn commit: r320579 - head/usr.bin/patch To: "Pedro F. Giffuni" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 10:05:01 -0000 On 2 July 2017 at 14:00, Pedro F. Giffuni wrote: > + } else if (strnEQ(s, "diff --git a/", 13)) { > + /* Git-style diffs. */ > + piece_of_git = 1; This is incomplete and leaves to confusing behavior for some git diffs. In particular with 'diff.mnemonicprefix = true' the prefix is awesome something other than 'a/'. It can be 'w' for working copy, 'i' for index, 'c' for commit, or some other values. While I don't oppose this feature, it'd be better if we did not tie it to a single specific prefix. -- Eitan Adler From owner-svn-src-all@freebsd.org Sun Mar 4 11:29:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB0EFF29DC1; Sun, 4 Mar 2018 11:29:29 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.92]) (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 770837696C; Sun, 4 Mar 2018 11:29:29 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1esRpS-0001T6-5c; Sun, 04 Mar 2018 12:29:22 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Hans Petter Selasky" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Colin Percival" Subject: Re: svn commit: r330236 - head/sys/compat/linuxkpi/common/src References: <201803011031.w21AVpNU076475@repo.freebsd.org> <01000161ee9cee29-0a02aaff-9052-41d2-a638-4bc673a41df6-000000@email.amazonses.com> Date: Sun, 04 Mar 2018 12:29:28 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <01000161ee9cee29-0a02aaff-9052-41d2-a638-4bc673a41df6-000000@email.amazonses.com> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 919fae14bc17c74543a025539baad412 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 11:29:30 -0000 On Sun, 04 Mar 2018 02:25:17 +0100, Colin Percival wrote: > On 03/01/18 02:31, Hans Petter Selasky wrote: >> New Revision: 330236 >> Correct the return value from flush_work() and flush_delayed_work() >> in the >> LinuxKPI to comply more with Linux. This fixes an issue when these >> functions >> are used in waiting loops. >> >> MFC after: 1 week >> Sponsored by: Mellanox Technologies > > In case the data point is useful: Merging this to stable/11 unbroke S3 > suspend/resume on my laptop (system76 Galago Pro, kabylake, using the > drm-next-kmod port). > These data points are much more useful than commit messages that describe what the patch already shows and talk about 'an issue'. Every patch solves 'an issue' (or creates some :-) ). No personal pun intended. Just taking this example as general thoughts about commit messages. Regards, Ronald. From owner-svn-src-all@freebsd.org Sun Mar 4 11:41:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3885EF2AA23; Sun, 4 Mar 2018 11:41:09 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.92]) (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 D0BA476FD6; Sun, 4 Mar 2018 11:41:08 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1esS0o-00046v-Sc; Sun, 04 Mar 2018 12:41:06 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Edward Tomasz Napierala" Subject: Re: svn commit: r330277 - in head: bin/stty libexec/getty References: <201803021416.w22EGJHm015205@repo.freebsd.org> Date: Sun, 04 Mar 2018 12:41:13 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201803021416.w22EGJHm015205@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 7b320cd02cd98c580351ccd23ba1512a X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 11:41:09 -0000 On Fri, 02 Mar 2018 15:16:19 +0100, Edward Tomasz Napierala wrote: > Author: trasz > Date: Fri Mar 2 14:16:19 2018 > New Revision: 330277 > URL: https://svnweb.freebsd.org/changeset/base/330277 > > Log: > .Xr pstat(8), so that people have a chance to learn how to get a list > of terminal devices using "pstat -t". Nice tip. Never seen pstat -t before. I have a feeling it will be useful to me some day. :-) From owner-svn-src-all@freebsd.org Sun Mar 4 13:27:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80F24F32FD6; Sun, 4 Mar 2018 13:27:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 379337AD33; Sun, 4 Mar 2018 13:27:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DFAA15F22; Sun, 4 Mar 2018 13:27:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24DRM6r040715; Sun, 4 Mar 2018 13:27:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24DRMBI040714; Sun, 4 Mar 2018 13:27:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803041327.w24DRMBI040714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sun, 4 Mar 2018 13:27:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330374 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 330374 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 13:27:22 -0000 Author: avg Date: Sun Mar 4 13:27:21 2018 New Revision: 330374 URL: https://svnweb.freebsd.org/changeset/base/330374 Log: db_script_exec: use a saved script name when reporting commands executed Before executing a command in a ddb script ddb prints an information line of the form: db:1:my-script> command where 1 is the script's depth level, "my-script" is the scipt's name, and "command" is the current command in the script. db_script_exec() uses its 'scriptname' parameter to produce that string. In the case when db_script_exec() is called from db_run_cmd() the argument points to db_tok_string that is a global variable used for command parsing. So, its value changes with every command executed. This commit changes the code to use the script's name stored in ds_scriptname to print the line. MFC after: 2 weeks Modified: head/sys/ddb/db_script.c Modified: head/sys/ddb/db_script.c ============================================================================== --- head/sys/ddb/db_script.c Sun Mar 4 08:00:07 2018 (r330373) +++ head/sys/ddb/db_script.c Sun Mar 4 13:27:21 2018 (r330374) @@ -296,7 +296,7 @@ db_script_exec(const char *scriptname, int warnifnotfo buffer = drd->drd_buffer; strcpy(buffer, dsp->ds_script); while ((command = strsep(&buffer, ";")) != NULL) { - db_printf("db:%d:%s> %s\n", db_recursion, scriptname, + db_printf("db:%d:%s> %s\n", db_recursion, dsp->ds_scriptname, command); db_command_trim(&command); prev_jb = kdb_jmpbuf(jb); From owner-svn-src-all@freebsd.org Sun Mar 4 15:03:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADAD0F3AE78; Sun, 4 Mar 2018 15:03:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CB947DFA8; Sun, 4 Mar 2018 15:03:45 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 576E116F2D; Sun, 4 Mar 2018 15:03:45 +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 w24F3jEf089843; Sun, 4 Mar 2018 15:03:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24F3iQr089838; Sun, 4 Mar 2018 15:03:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041503.w24F3iQr089838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 15:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330375 - in vendor/llvm/dist-release_60: bindings/go docs lib/Target/AArch64 lib/Target/X86 test/CodeGen/X86 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm/dist-release_60: bindings/go docs lib/Target/AArch64 lib/Target/X86 test/CodeGen/X86 X-SVN-Commit-Revision: 330375 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 15:03:45 -0000 Author: dim Date: Sun Mar 4 15:03:44 2018 New Revision: 330375 URL: https://svnweb.freebsd.org/changeset/base/330375 Log: Vendor import of llvm 6.0.0 release r326565: https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_600/final@326565 Added: vendor/llvm/dist-release_60/test/CodeGen/X86/pr36553.ll Modified: vendor/llvm/dist-release_60/bindings/go/README.txt vendor/llvm/dist-release_60/docs/ReleaseNotes.rst vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64InstructionSelector.cpp vendor/llvm/dist-release_60/lib/Target/X86/X86ISelLowering.cpp Modified: vendor/llvm/dist-release_60/bindings/go/README.txt ============================================================================== --- vendor/llvm/dist-release_60/bindings/go/README.txt Sun Mar 4 13:27:21 2018 (r330374) +++ vendor/llvm/dist-release_60/bindings/go/README.txt Sun Mar 4 15:03:44 2018 (r330375) @@ -51,3 +51,11 @@ CGO_CPPFLAGS, CGO_CXXFLAGS and CGO_LDFLAGS environment $ export CGO_CXXFLAGS=-std=c++11 $ export CGO_LDFLAGS="`/path/to/llvm-build/bin/llvm-config --ldflags --libs --system-libs all`" $ go build -tags byollvm + +If you see a compilation error while compiling your code with Go 1.9.4 or later as follows, + + go build llvm.org/llvm/bindings/go/llvm: invalid flag in #cgo LDFLAGS: -Wl,-headerpad_max_install_names + +you need to setup $CGO_LDFLAGS_ALLOW to allow a compiler to specify some linker options: + + $ export CGO_LDFLAGS_ALLOW='-Wl,(-search_paths_first|-headerpad_max_install_names)' Modified: vendor/llvm/dist-release_60/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist-release_60/docs/ReleaseNotes.rst Sun Mar 4 13:27:21 2018 (r330374) +++ vendor/llvm/dist-release_60/docs/ReleaseNotes.rst Sun Mar 4 15:03:44 2018 (r330375) @@ -22,13 +22,13 @@ them. Non-comprehensive list of changes in this release ================================================= -.. NOTE - For small 1-3 sentence descriptions, just add an entry at the end of - this list. If your description won't fit comfortably in one bullet - point (e.g. maybe you would like to give an example of the - functionality, or simply have a lot to talk about), see the `NOTE` below - for adding a new subsection. +* Support for `retpolines `_ + was added to help mitigate "branch target injection" (variant #2) of the + "Spectre" speculative side channels described by `Project Zero + `_ + and the `Spectre paper `_. + * The ``Redirects`` argument of ``llvm::sys::ExecuteAndWait`` and ``llvm::sys::ExecuteNoWait`` was changed to an ``ArrayRef`` of optional ``StringRef``'s to make it safer and more convenient to use. @@ -48,18 +48,7 @@ Non-comprehensive list of changes in this release * Preliminary support for Sanitizers and sibling features on X86(_64) NetBSD (ASan, UBsan, TSan, MSan, SafeStack, libFuzzer). -* Note.. -.. NOTE - If you would like to document a larger change, then you can add a - subsection about it right here. You can copy the following boilerplate - and un-indent it (the indentation causes it to be inside this comment). - - Special New Feature - ------------------- - - Makes programs 10x faster by doing Special New Thing. - Changes to the LLVM IR ---------------------- @@ -72,19 +61,17 @@ Changes to the LLVM IR to enable/disable specific floating-point optimizations. Making the optimizer respond appropriately to these flags is an ongoing effort. + Changes to the AArch64 Target ----------------------------- -During this release: +* Enabled the new GlobalISel instruction selection framework by default at ``-O0``. - * Enabled the new GlobalISel instruction selection framework by default at ``-O0``. Changes to the ARM Target ------------------------- -During this release the ARM target has: - -* Got support for enabling SjLj exception handling on platforms where it +* Support for enabling SjLj exception handling on platforms where it isn't the default. @@ -93,12 +80,12 @@ Changes to the Hexagon Target * The Hexagon backend now supports V65 ISA. -* The ``-mhvx`` option now takes an optional value that specified the ISA +* The ``-mhvx`` option now takes an optional value that specifies the ISA version of the HVX coprocessor. The available values are v60, v62 and v65. By default, the value is set to be the same as the CPU version. * The compiler option ``-mhvx-double`` is deprecated and will be removed in - the next release of the compiler. Programmers should use ``-mhvx-length`` + the next release of the compiler. Programmers should use the ``-mhvx-length`` option to specify the desired vector length: ``-mhvx-length=64b`` for 64-byte vectors and ``-mhvx-length=128b`` for 128-byte vectors. While the current default vector length is 64 bytes, users should always specify the @@ -130,8 +117,8 @@ Fixed numerous bugs: * Corrected the encoding of movep for microMIPS32r6. * Fixed an issue with the usage of insert instructions having an invalid set of operands. -* Fixed an issue where TLS symbols where not marked as such. -* Enabled the usage of register scavanging with MSA, due to its' shorter offsets +* Fixed an issue where TLS symbols were not marked as such. +* Enabled the usage of register scavenging with MSA, due to its shorter offsets for loads and stores. * Corrected the ELF headers when using the DSP ASE. @@ -152,11 +139,7 @@ Deprecation notices: * microMIPS64R6 support was been deprecated since 5.0, and has now been completely removed. -Changes to the PowerPC Target ------------------------------ - During this release ... - Changes to the SystemZ Target ----------------------------- @@ -204,33 +187,31 @@ During this release the X86 target has: * Gained initial support recognizing variable shuffles from vector element extracts and inserts. -* Improved documentation for SSE/AVX intrinsics in *intrin.h header files. +* Improved documentation for SSE/AVX intrinsics in intrin.h header files. -Changes to the AMDGPU Target ------------------------------ +* Gained support for emitting `retpolines + `_, including automatic + insertion of the necessary thunks or using external thunks. - During this release ... -Changes to the AVR Target ------------------------------ +External Open Source Projects Using LLVM 6 +========================================== - During this release ... +LDC - the LLVM-based D compiler +------------------------------- -Changes to the OCaml bindings ------------------------------ +`D `_ is a language with C-like syntax and static typing. It +pragmatically combines efficiency, control, and modeling power, with safety and +programmer productivity. D supports powerful concepts like Compile-Time Function +Execution (CTFE) and Template Meta-Programming, provides an innovative approach +to concurrency and offers many classical paradigms. - During this release ... +`LDC `_ uses the frontend from the reference compiler +combined with LLVM as backend to produce efficient native code. LDC targets +x86/x86_64 systems like Linux, OS X, FreeBSD and Windows and also Linux on ARM +and PowerPC (32/64 bit). Ports to other architectures like AArch64 and MIPS64 +are underway. - -Changes to the C API --------------------- - - During this release ... - - -External Open Source Projects Using LLVM 6 -========================================== - JFS - JIT Fuzzing Solver ------------------------ @@ -256,21 +237,6 @@ LLVM IR features such as Aliases. Zig uses Clang to pr import of .h symbols - even inline functions and macros. Zig uses LLD combined with lazily building compiler-rt to provide out-of-the-box cross-compiling for all supported targets. - -LDC - the LLVM-based D compiler -------------------------------- - -`D `_ is a language with C-like syntax and static typing. It -pragmatically combines efficiency, control, and modeling power, with safety and -programmer productivity. D supports powerful concepts like Compile-Time Function -Execution (CTFE) and Template Meta-Programming, provides an innovative approach -to concurrency and offers many classical paradigms. - -`LDC `_ uses the frontend from the reference compiler -combined with LLVM as backend to produce efficient native code. LDC targets -x86/x86_64 systems like Linux, OS X, FreeBSD and Windows and also Linux on ARM -and PowerPC (32/64 bit). Ports to other architectures like AArch64 and MIPS64 -are underway. Additional Information ====================== Modified: vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64InstructionSelector.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64InstructionSelector.cpp Sun Mar 4 13:27:21 2018 (r330374) +++ vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64InstructionSelector.cpp Sun Mar 4 15:03:44 2018 (r330375) @@ -840,6 +840,7 @@ bool AArch64InstructionSelector::select(MachineInstr & case TargetOpcode::G_EXTRACT: { LLT SrcTy = MRI.getType(I.getOperand(1).getReg()); LLT DstTy = MRI.getType(I.getOperand(0).getReg()); + (void)DstTy; unsigned SrcSize = SrcTy.getSizeInBits(); // Larger extracts are vectors, same-size extracts should be something else // by now (either split up or simplified to a COPY). Modified: vendor/llvm/dist-release_60/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/X86/X86ISelLowering.cpp Sun Mar 4 13:27:21 2018 (r330374) +++ vendor/llvm/dist-release_60/lib/Target/X86/X86ISelLowering.cpp Sun Mar 4 15:03:44 2018 (r330375) @@ -35520,7 +35520,7 @@ static SDValue combineFneg(SDNode *N, SelectionDAG &DA // If we're negating an FMA node, then we can adjust the // instruction to include the extra negation. unsigned NewOpcode = 0; - if (Arg.hasOneUse()) { + if (Arg.hasOneUse() && Subtarget.hasAnyFMA()) { switch (Arg.getOpcode()) { case ISD::FMA: NewOpcode = X86ISD::FNMSUB; break; case X86ISD::FMSUB: NewOpcode = X86ISD::FNMADD; break; Added: vendor/llvm/dist-release_60/test/CodeGen/X86/pr36553.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist-release_60/test/CodeGen/X86/pr36553.ll Sun Mar 4 15:03:44 2018 (r330375) @@ -0,0 +1,20 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s + +; Make sure we don't crash because we negated an fma when we didn't have any fma instructions. + +define float @pr36553(float %a, float %b, float %c) nounwind { +; CHECK-LABEL: pr36553: +; CHECK: ## %bb.0: ## %entry +; CHECK-NEXT: pushq %rax +; CHECK-NEXT: callq _fmaf +; CHECK-NEXT: xorps {{.*}}(%rip), %xmm0 +; CHECK-NEXT: popq %rax +; CHECK-NEXT: retq +entry: + %0 = tail call float @llvm.fma.f32(float %a, float %b, float %c) + %sub = fsub float -0.000000e+00, %0 + ret float %sub +} + +declare float @llvm.fma.f32(float, float, float) From owner-svn-src-all@freebsd.org Sun Mar 4 15:03:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 941BFF3AE8E; Sun, 4 Mar 2018 15:03:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40E6D7DFB0; Sun, 4 Mar 2018 15:03:48 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1FDC116F2E; Sun, 4 Mar 2018 15:03:48 +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 w24F3mhO089890; Sun, 4 Mar 2018 15:03:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24F3m9r089889; Sun, 4 Mar 2018 15:03:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041503.w24F3m9r089889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 15:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330376 - vendor/llvm/llvm-release_600-r326565 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release_600-r326565 X-SVN-Commit-Revision: 330376 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 15:03:48 -0000 Author: dim Date: Sun Mar 4 15:03:47 2018 New Revision: 330376 URL: https://svnweb.freebsd.org/changeset/base/330376 Log: Tag llvm 6.0.0 release r326565. Added: vendor/llvm/llvm-release_600-r326565/ - copied from r330375, vendor/llvm/dist-release_60/ From owner-svn-src-all@freebsd.org Sun Mar 4 15:06:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B86A7F3B254; Sun, 4 Mar 2018 15:06:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 639227E296; Sun, 4 Mar 2018 15:06:40 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42C3616F31; Sun, 4 Mar 2018 15:06:40 +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 w24F6eb0090103; Sun, 4 Mar 2018 15:06:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24F6eZc090102; Sun, 4 Mar 2018 15:06:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041506.w24F6eZc090102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 15:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330378 - vendor/clang/clang-release_600-r326565 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release_600-r326565 X-SVN-Commit-Revision: 330378 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 15:06:40 -0000 Author: dim Date: Sun Mar 4 15:06:39 2018 New Revision: 330378 URL: https://svnweb.freebsd.org/changeset/base/330378 Log: Tag clang 6.0.0 release r326565. Added: vendor/clang/clang-release_600-r326565/ - copied from r330377, vendor/clang/dist-release_60/ From owner-svn-src-all@freebsd.org Sun Mar 4 15:06:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEF3DF3B24C; Sun, 4 Mar 2018 15:06:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C8017E288; Sun, 4 Mar 2018 15:06:37 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79E1C16F30; Sun, 4 Mar 2018 15:06:37 +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 w24F6bBu090054; Sun, 4 Mar 2018 15:06:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24F6bFx090050; Sun, 4 Mar 2018 15:06:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041506.w24F6bFx090050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 15:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330377 - in vendor/clang/dist-release_60: docs include/clang/Basic lib/Basic X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist-release_60: docs include/clang/Basic lib/Basic X-SVN-Commit-Revision: 330377 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 15:06:38 -0000 Author: dim Date: Sun Mar 4 15:06:36 2018 New Revision: 330377 URL: https://svnweb.freebsd.org/changeset/base/330377 Log: Vendor import of clang 6.0.0 release r326565: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_600/final@326565 Modified: vendor/clang/dist-release_60/docs/AttributeReference.rst vendor/clang/dist-release_60/docs/ReleaseNotes.rst vendor/clang/dist-release_60/include/clang/Basic/AttrDocs.td vendor/clang/dist-release_60/lib/Basic/Version.cpp Modified: vendor/clang/dist-release_60/docs/AttributeReference.rst ============================================================================== --- vendor/clang/dist-release_60/docs/AttributeReference.rst Sun Mar 4 15:03:47 2018 (r330376) +++ vendor/clang/dist-release_60/docs/AttributeReference.rst Sun Mar 4 15:06:36 2018 (r330377) @@ -36,23 +36,23 @@ used to process multiple arguments from a single invoc concurrently. The syntax of the `declare simd` construct is as follows: - .. code-block:: c + .. code-block:: none - #pragma omp declare simd [clause[[,] clause] ...] new-line - [#pragma omp declare simd [clause[[,] clause] ...] new-line] - [...] - function definition or declaration + #pragma omp declare simd [clause[[,] clause] ...] new-line + [#pragma omp declare simd [clause[[,] clause] ...] new-line] + [...] + function definition or declaration where clause is one of the following: - .. code-block:: c + .. code-block:: none - simdlen(length) - linear(argument-list[:constant-linear-step]) - aligned(argument-list[:alignment]) - uniform(argument-list) - inbranch - notinbranch + simdlen(length) + linear(argument-list[:constant-linear-step]) + aligned(argument-list[:alignment]) + uniform(argument-list) + inbranch + notinbranch #pragma omp declare target @@ -69,9 +69,9 @@ The syntax of the declare target directive is as follo .. code-block:: c - #pragma omp declare target new-line - declarations-definition-seq - #pragma omp end declare target new-line + #pragma omp declare target new-line + declarations-definition-seq + #pragma omp end declare target new-line _Noreturn @@ -557,7 +557,7 @@ available in C. int isdigit(int c); int isdigit(int c) __attribute__((enable_if(c <= -1 || c > 255, "chosen when 'c' is out of range"))) __attribute__((unavailable("'c' must have the value of an unsigned char or EOF"))); - + void foo(char c) { isdigit(c); isdigit(10); @@ -610,7 +610,7 @@ overload out of a number of viable overloads using ena void f() __attribute__((enable_if(true, ""))); // #1 void f() __attribute__((enable_if(true, ""))) __attribute__((enable_if(true, ""))); // #2 - + void g(int i, int j) __attribute__((enable_if(i, ""))); // #1 void g(int i, int j) __attribute__((enable_if(j, ""))) __attribute__((enable_if(true))); // #2 @@ -1170,7 +1170,7 @@ potentially-evaluated discarded-value expression that .. code-block: c++ struct [[nodiscard]] error_info { /*...*/ }; error_info enable_missile_safety_mode(); - + void launch_missiles(); void test_missiles() { enable_missile_safety_mode(); // diagnoses @@ -1451,7 +1451,7 @@ default name. can only be placed before an @protocol or @interface declaration: .. code-block:: objc - + __attribute__((objc_runtime_name("MyLocalName"))) @interface Message @end Modified: vendor/clang/dist-release_60/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist-release_60/docs/ReleaseNotes.rst Sun Mar 4 15:03:47 2018 (r330376) +++ vendor/clang/dist-release_60/docs/ReleaseNotes.rst Sun Mar 4 15:06:36 2018 (r330377) @@ -32,13 +32,34 @@ here. Generic improvements to Clang as a whole or to i infrastructure are described first, followed by language-specific sections with improvements to Clang's support for those languages. -Major New Features ------------------- +Non-comprehensive list of changes in this release +------------------------------------------------- -- ... +- Support for `retpolines `_ + was added to help mitigate "branch target injection" (variant #2) of the + "Spectre" speculative side channels described by `Project Zero + `_ + and the `Spectre paper `_. +- Bitrig OS was merged back into OpenBSD, so Bitrig support has been + removed from Clang/LLVM. + +- The default value of ``_MSC_VER`` was raised from 1800 to 1911, making it + compatible with the Visual Studio 2015 and 2017 C++ standard library headers. + Users should generally expect this to be regularly raised to match the most + recently released version of the Visual C++ compiler. + +- clang now defaults to ``.init_array`` if no gcc installation can be found. + If a gcc installation is found, it still prefers ``.ctors`` if the found + gcc is older than 4.7.0. + +- The new builtin preprocessor macros ``__is_target_arch``, + ``__is_target_vendor``, ``__is_target_os``, and ``__is_target_environment`` + can be used to to examine the individual components of the target triple. + + Improvements to Clang's diagnostics -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +----------------------------------- - ``-Wpragma-pack`` is a new warning that warns in the following cases: @@ -61,7 +82,7 @@ Improvements to Clang's diagnostics selector which could make the message send to ``id`` ambiguous. - ``-Wtautological-compare`` now warns when comparing an unsigned integer and 0 - regardless of whether the constant is signed or unsigned." + regardless of whether the constant is signed or unsigned. - ``-Wtautological-compare`` now warns about comparing a signed integer and 0 when the signed integer is coerced to an unsigned type for the comparison. @@ -90,37 +111,37 @@ Improvements to Clang's diagnostics - ``-Wunreachable-code`` can now reason about ``__try``, ``__except`` and ``__leave``. -Non-comprehensive list of changes in this release -------------------------------------------------- -- Bitrig OS was merged back into OpenBSD, so Bitrig support has been - removed from Clang/LLVM. - -- The default value of _MSC_VER was raised from 1800 to 1911, making it - compatible with the Visual Studio 2015 and 2017 C++ standard library headers. - Users should generally expect this to be regularly raised to match the most - recently released version of the Visual C++ compiler. - -- clang now defaults to ``.init_array`` if no gcc installation can be found. - If a gcc installation is found, it still prefers ``.ctors`` if the found - gcc is older than 4.7.0. - -- The new builtin preprocessor macros ``__is_target_arch``, - ``__is_target_vendor``, ``__is_target_os``, and ``__is_target_environment`` - can be used to to examine the individual components of the target triple. - New Compiler Flags ------------------ -- --autocomplete was implemented to obtain a list of flags and its arguments. This is used for shell autocompletion. +- Clang supports the ``-mretpoline`` flag to enable `retpolines + `_. Code compiled with this + flag will be hardened against variant #2 of the Spectre attack. Indirect + branches from switches or gotos removed from the code, and indirect calls + will be made through a "retpoline" thunk. The necessary thunks will + automatically be inserted into the generated code. Clang also supports + ``-mretpoline-external-thunk`` which works like ``-mretpoline`` but requires + the user to provide their own thunk definitions. The external thunk names + start with ``__x86_indirect_thunk_`` and end in a register name. For 64-bit + platforms, only an ``r11`` thunk is used, but for 32-bit platforms ``eax``, + ``ecx``, ``edx``, and ``edi`` thunks are used. +- Clang now supports configuration files. These are collections of driver + options, which can be applied by specifying the configuration file, either + using command line option ``--config foo.cfg`` or encoding it into executable + name ``foo-clang``. Clang behaves as if the options from this file were inserted + before the options specified in command line. This feature is primary intended + to facilitate cross compilation. Details can be found in + `Clang Compiler User's Manual `_. + - The ``-fdouble-square-bracket-attributes`` and corresponding ``-fno-double-square-bracket-attributes`` flags were added to enable or - disable [[]] attributes in any language mode. Currently, only a limited + disable ``[[]]`` attributes in any language mode. Currently, only a limited number of attributes are supported outside of C++ mode. See the Clang - attribute documentation for more information about which attributes are - supported for each syntax. - + `attribute documentation `_ for more information + about which attributes are supported for each syntax. + - Added the ``-std=c17``, ``-std=gnu17``, and ``-std=iso9899:2017`` language mode flags for compatibility with GCC. This enables support for the next version of the C standard, expected to be published by ISO in 2018. The only @@ -135,20 +156,7 @@ New Compiler Flags - New ``-nostdlib++`` flag to disable linking the C++ standard library. Similar to using ``clang`` instead of ``clang++`` but doesn't disable ``-lm``. -Deprecated Compiler Flags -------------------------- -The following options are deprecated and ignored. They will be removed in -future versions of Clang. - -- ... - -New Pragmas in Clang ------------------------ - -Clang now supports the ... - - Attribute Changes in Clang -------------------------- @@ -157,25 +165,15 @@ Attribute Changes in Clang in the ``clang`` vendor namespace (``[[clang::name]]``). Attributes whose syntax is specified by some other standard (such as CUDA and OpenCL attributes) continue to follow their respective specification. - + - Added the ``__has_c_attribute()`` builtin preprocessor macro which allows users to dynamically detect whether a double square-bracket attribute is supported in C mode. This attribute syntax can be enabled with the ``-fdouble-square-bracket-attributes`` flag. - -- The presence of __attribute__((availability(...))) on a declaration no longer - implies default visibility for that declaration on macOS. -- Clang now supports configuration files. These are collections of driver - options, which can be applied by specifying the configuration file, either - using command line option `--config foo.cfg` or encoding it into executable - name `foo-clang`. Clang behaves as if the options from this file were inserted - before the options specified in command line. This feature is primary intended - to facilitate cross compilation. Details can be found in - `Clang Compiler User's Manual - `. +- The presence of ``__attribute__((availability(...)))`` on a declaration no + longer implies default visibility for that declaration on macOS. -- ... Windows Support --------------- @@ -185,18 +183,7 @@ Windows Support - clang-cl now exposes the ``--version`` flag. -C Language Changes in Clang ---------------------------- -- ... - -... - -C11 Feature Support -^^^^^^^^^^^^^^^^^^^ - -... - C++ Language Changes in Clang ----------------------------- @@ -205,20 +192,38 @@ C++ Language Changes in Clang conforming GNU extensions. Projects incompatible with C++14 can add ``-std=gnu++98`` to their build settings to restore the previous behaviour. -C++1z Feature Support -^^^^^^^^^^^^^^^^^^^^^ +- Added support for some features from the C++ standard after C++17 + (provisionally known as C++2a but expected to be C++20). This support can be + enabled with the ``-std=c++2a`` flag. This enables: -... + - Support for ``__VA_OPT__``, to allow variadic macros to easily provide + different expansions when they are invoked without variadic arguments. -Objective-C Language Changes in Clang -------------------------------------- + - Recognition of the ``<=>`` token (the C++2a three-way comparison operator). -... + - Support for default member initializers for bit-fields. + - Lambda capture of ``*this``. + + - Pointer-to-member calls using ``const &``-qualified pointers on temporary objects. + + All of these features other than ``__VA_OPT__`` and ``<=>`` are made + available with a warning in earlier C++ language modes. + +- A warning has been added for a ``<=`` token followed immediately by a ``>`` + character. Code containing such constructs will change meaning in C++2a due + to the addition of the ``<=>`` operator. + +- Clang implements the "destroying operator delete" feature described in C++ + committee paper `P0722R1 + `, + which is targeting inclusion in C++2a but has not yet been voted into the C++ + working draft. Support for this feature is enabled by the presence of the + standard library type ``std::destroying_delete_t``. + OpenCL C Language Changes in Clang ---------------------------------- - - Added subgroup builtins to enqueue kernel support. - Added CL2.0 atomics as Clang builtins that now accept @@ -258,77 +263,72 @@ OpenCL C Language Changes in Clang - Miscellaneous improvements in vector diagnostics. - Added half float load and store builtins without enabling half as a legal type - (``__builtin_store_half for double``, ``__builtin_store_halff`` for double, - ``__builtin_load_half for double``, ``__builtin_load_halff`` for float). + (``__builtin_store_half`` for double, ``__builtin_store_halff`` for float, + ``__builtin_load_half`` for double, ``__builtin_load_halff`` for float). OpenMP Support in Clang ---------------------------------- -- Added options `-f[no]-openmp-simd` that support code emission only for OpenMP - SIMD-based directives, like `#pragma omp simd`, `#pragma omp parallel for simd` - etc. The code is emitted only for simd-based part of the combined directives +- Added options ``-f[no]-openmp-simd`` that support code emission only for OpenMP + SIMD-based directives, like ``#pragma omp simd``, ``#pragma omp parallel for simd`` + etc. The code is emitted only for SIMD-based part of the combined directives and clauses. - Added support for almost all target-based directives except for - `#pragma omp target teams distribute parallel for [simd]`. Although, please - note that `depend` clauses on target-based directives are not supported yet. + ``#pragma omp target teams distribute parallel for [simd]``. Although, please + note that ``depend`` clauses on target-based directives are not supported yet. Clang supports offloading to X86_64, AArch64 and PPC64[LE] devices. -- Added support for `reduction`-based clauses on `task`-based directives from +- Added support for ``reduction``-based clauses on ``task``-based directives from upcoming OpenMP 5.0. -- The LLVM OpenMP runtime `libomp` now supports the OpenMP Tools Interface (OMPT) +- The LLVM OpenMP runtime ``libomp`` now supports the OpenMP Tools Interface (OMPT) on x86, x86_64, AArch64, and PPC64 on Linux, Windows, and macOS. If you observe a measurable performance impact on one of your applications without a tool - attached, please rebuild the runtime library with `-DLIBOMP_OMPT_SUPPORT=OFF` and + attached, please rebuild the runtime library with ``-DLIBOMP_OMPT_SUPPORT=OFF`` and file a bug at `LLVM's Bugzilla `_ or send a message to the `OpenMP development list `_. -Internal API Changes --------------------- -These are major API changes that have happened since the 4.0.0 release of -Clang. If upgrading an external codebase that uses Clang as a library, -this section should help get you past the largest hurdles of upgrading. - -- ... - AST Matchers ------------ -The hasDeclaration matcher now works the same for Type and QualType and only +The ``hasDeclaration`` matcher now works the same for ``Type`` and ``QualType`` and only ever looks through one level of sugaring in a limited number of cases. There are two main patterns affected by this: -- qualType(hasDeclaration(recordDecl(...))): previously, we would look through - sugar like TypedefType to get at the underlying recordDecl; now, we need +- ``qualType(hasDeclaration(recordDecl(...)))``: previously, we would look through + sugar like ``TypedefType`` to get at the underlying ``recordDecl``; now, we need to explicitly remove the sugaring: - qualType(hasUnqualifiedDesugaredType(hasDeclaration(recordDecl(...)))) + ``qualType(hasUnqualifiedDesugaredType(hasDeclaration(recordDecl(...))))`` -- hasType(recordDecl(...)): hasType internally uses hasDeclaration; previously, - this matcher used to match for example TypedefTypes of the RecordType, but +- ``hasType(recordDecl(...))``: ``hasType`` internally uses ``hasDeclaration``; previously, + this matcher used to match for example ``TypedefTypes`` of the ``RecordType``, but after the change they don't; to fix, use: -:: - hasType(hasUnqualifiedDesugaredType( - recordType(hasDeclaration(recordDecl(...))))) + .. code-block:: c -- templateSpecializationType(hasDeclaration(classTemplateDecl(...))): - previously, we would directly match the underlying ClassTemplateDecl; - now, we can explicitly match the ClassTemplateSpecializationDecl, but that - requires to explicitly get the ClassTemplateDecl: + hasType(hasUnqualifiedDesugaredType( + recordType(hasDeclaration(recordDecl(...))))) -:: - templateSpecializationType(hasDeclaration( - classTemplateSpecializationDecl( - hasSpecializedTemplate(classTemplateDecl(...))))) +- ``templateSpecializationType(hasDeclaration(classTemplateDecl(...)))``: + previously, we would directly match the underlying ``ClassTemplateDecl``; + now, we can explicitly match the ``ClassTemplateSpecializationDecl``, but that + requires to explicitly get the ``ClassTemplateDecl``: + .. code-block:: c + + templateSpecializationType(hasDeclaration( + classTemplateSpecializationDecl( + hasSpecializedTemplate(classTemplateDecl(...))))) + + clang-format ------------ -* Option *IndentPPDirectives* added to indent preprocessor directives on +* Option ``IndentPPDirectives`` added to indent preprocessor directives on conditionals. +----------------------+----------------------+ @@ -343,10 +343,10 @@ clang-format | #endif | #endif | +----------------------+----------------------+ -* Option -verbose added to the command line. +* Option ``-verbose`` added to the command line. Shows the list of processed files. -* Option *IncludeBlocks* added to merge and regroup multiple ``#include`` blocks during sorting. +* Option ``IncludeBlocks`` added to merge and regroup multiple ``#include`` blocks during sorting. +-------------------------+-------------------------+-------------------------+ | Before (Preserve) | Merge | Regroup | @@ -359,19 +359,13 @@ clang-format | #include | | #include | +-------------------------+-------------------------+-------------------------+ -libclang --------- -... - - Static Analyzer --------------- -- Static Analyzer can now properly detect and diagnose unary pre-/post- +- The Static Analyzer can now properly detect and diagnose unary pre-/post- increment/decrement on an uninitialized value. -... Undefined Behavior Sanitizer (UBSan) ------------------------------------ @@ -381,25 +375,6 @@ Undefined Behavior Sanitizer (UBSan) issue logging and deduplication, and does not support ``-fsanitize=vptr`` checking. -Core Analysis Improvements -========================== - -- ... - -New Issues Found -================ - -- ... - -Python Binding Changes ----------------------- - -The following methods have been added: - -- ... - -Significant Known Problems -========================== Additional Information ====================== Modified: vendor/clang/dist-release_60/include/clang/Basic/AttrDocs.td ============================================================================== --- vendor/clang/dist-release_60/include/clang/Basic/AttrDocs.td Sun Mar 4 15:03:47 2018 (r330376) +++ vendor/clang/dist-release_60/include/clang/Basic/AttrDocs.td Sun Mar 4 15:06:36 2018 (r330377) @@ -353,7 +353,7 @@ available in C. int isdigit(int c); int isdigit(int c) __attribute__((enable_if(c <= -1 || c > 255, "chosen when 'c' is out of range"))) __attribute__((unavailable("'c' must have the value of an unsigned char or EOF"))); - + void foo(char c) { isdigit(c); isdigit(10); @@ -406,7 +406,7 @@ overload out of a number of viable overloads using ena void f() __attribute__((enable_if(true, ""))); // #1 void f() __attribute__((enable_if(true, ""))) __attribute__((enable_if(true, ""))); // #2 - + void g(int i, int j) __attribute__((enable_if(i, ""))); // #1 void g(int i, int j) __attribute__((enable_if(j, ""))) __attribute__((enable_if(true))); // #2 @@ -918,11 +918,11 @@ default name. can only be placed before an @protocol or @interface declaration: .. code-block:: objc - + __attribute__((objc_runtime_name("MyLocalName"))) @interface Message @end - + }]; } @@ -1228,7 +1228,7 @@ potentially-evaluated discarded-value expression that .. code-block: c++ struct [[nodiscard]] error_info { /*...*/ }; error_info enable_missile_safety_mode(); - + void launch_missiles(); void test_missiles() { enable_missile_safety_mode(); // diagnoses @@ -2641,23 +2641,23 @@ used to process multiple arguments from a single invoc concurrently. The syntax of the `declare simd` construct is as follows: - .. code-block:: c + .. code-block:: none - #pragma omp declare simd [clause[[,] clause] ...] new-line - [#pragma omp declare simd [clause[[,] clause] ...] new-line] - [...] - function definition or declaration + #pragma omp declare simd [clause[[,] clause] ...] new-line + [#pragma omp declare simd [clause[[,] clause] ...] new-line] + [...] + function definition or declaration where clause is one of the following: - .. code-block:: c + .. code-block:: none - simdlen(length) - linear(argument-list[:constant-linear-step]) - aligned(argument-list[:alignment]) - uniform(argument-list) - inbranch - notinbranch + simdlen(length) + linear(argument-list[:constant-linear-step]) + aligned(argument-list[:alignment]) + uniform(argument-list) + inbranch + notinbranch }]; } @@ -2673,9 +2673,9 @@ The syntax of the declare target directive is as follo .. code-block:: c - #pragma omp declare target new-line - declarations-definition-seq - #pragma omp end declare target new-line + #pragma omp declare target new-line + declarations-definition-seq + #pragma omp end declare target new-line }]; } Modified: vendor/clang/dist-release_60/lib/Basic/Version.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Basic/Version.cpp Sun Mar 4 15:03:47 2018 (r330376) +++ vendor/clang/dist-release_60/lib/Basic/Version.cpp Sun Mar 4 15:06:36 2018 (r330377) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_60/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_600/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); From owner-svn-src-all@freebsd.org Sun Mar 4 15:06:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50356F3B297; Sun, 4 Mar 2018 15:06:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2A347E36C; Sun, 4 Mar 2018 15:06:44 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BBF5C16F32; Sun, 4 Mar 2018 15:06:44 +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 w24F6iRS090149; Sun, 4 Mar 2018 15:06:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24F6igk090148; Sun, 4 Mar 2018 15:06:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041506.w24F6igk090148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 15:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330379 - vendor/compiler-rt/compiler-rt-release_600-r326565 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release_600-r326565 X-SVN-Commit-Revision: 330379 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 15:06:45 -0000 Author: dim Date: Sun Mar 4 15:06:44 2018 New Revision: 330379 URL: https://svnweb.freebsd.org/changeset/base/330379 Log: Tag compiler-rt 6.0.0 release r326565. Added: vendor/compiler-rt/compiler-rt-release_600-r326565/ - copied from r330378, vendor/compiler-rt/dist-release_60/ From owner-svn-src-all@freebsd.org Sun Mar 4 15:07:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DF2EF3B363; Sun, 4 Mar 2018 15:07:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1ED4E7E590; Sun, 4 Mar 2018 15:07:14 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F176B16F35; Sun, 4 Mar 2018 15:07:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24F7D3S090211; Sun, 4 Mar 2018 15:07:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24F7D1t090210; Sun, 4 Mar 2018 15:07:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041507.w24F7D1t090210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 15:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330380 - vendor/libc++/libc++-release_600-r326565 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release_600-r326565 X-SVN-Commit-Revision: 330380 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 15:07:14 -0000 Author: dim Date: Sun Mar 4 15:07:13 2018 New Revision: 330380 URL: https://svnweb.freebsd.org/changeset/base/330380 Log: Tag libc++ 6.0.0 release r326565. Added: vendor/libc++/libc++-release_600-r326565/ - copied from r330379, vendor/libc++/dist-release_60/ From owner-svn-src-all@freebsd.org Sun Mar 4 15:07:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A06AF3B393; Sun, 4 Mar 2018 15:07:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51BFA7E5A1; Sun, 4 Mar 2018 15:07:16 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4CDAF16F36; Sun, 4 Mar 2018 15:07:16 +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 w24F7G4q090258; Sun, 4 Mar 2018 15:07:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24F7GtL090257; Sun, 4 Mar 2018 15:07:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041507.w24F7GtL090257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 15:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330381 - vendor/lld/dist-release_60/docs X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/dist-release_60/docs X-SVN-Commit-Revision: 330381 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 15:07:16 -0000 Author: dim Date: Sun Mar 4 15:07:16 2018 New Revision: 330381 URL: https://svnweb.freebsd.org/changeset/base/330381 Log: Vendor import of lld 6.0.0 release r326565: https://llvm.org/svn/llvm-project/lld/tags/RELEASE_600/final@326565 Modified: vendor/lld/dist-release_60/docs/ReleaseNotes.rst Modified: vendor/lld/dist-release_60/docs/ReleaseNotes.rst ============================================================================== --- vendor/lld/dist-release_60/docs/ReleaseNotes.rst Sun Mar 4 15:07:13 2018 (r330380) +++ vendor/lld/dist-release_60/docs/ReleaseNotes.rst Sun Mar 4 15:07:16 2018 (r330381) @@ -57,7 +57,7 @@ ELF Improvements * lld can now identify and patch a code sequence that triggers AArch64 errata 843419. Add ``--fix-cortex-a53-843419`` to enable the feature. -* lld can now generate thunks for out of range thunks. +* lld can now generate thunks for out of range branches. * MIPS port now generates all output dynamic relocations using Elf_Rel format only. From owner-svn-src-all@freebsd.org Sun Mar 4 15:07:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 805BCF3B3E3; Sun, 4 Mar 2018 15:07:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02A4D7E67A; Sun, 4 Mar 2018 15:07:20 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A51816F37; Sun, 4 Mar 2018 15:07:20 +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 w24F7JNC090307; Sun, 4 Mar 2018 15:07:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24F7Jlh090306; Sun, 4 Mar 2018 15:07:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041507.w24F7Jlh090306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 15:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330382 - vendor/lld/lld-release_600-r326565 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release_600-r326565 X-SVN-Commit-Revision: 330382 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 15:07:21 -0000 Author: dim Date: Sun Mar 4 15:07:19 2018 New Revision: 330382 URL: https://svnweb.freebsd.org/changeset/base/330382 Log: Tag lld 6.0.0 release r326565. Added: vendor/lld/lld-release_600-r326565/ - copied from r330381, vendor/lld/dist-release_60/ From owner-svn-src-all@freebsd.org Sun Mar 4 15:07:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D5FAF3B41A; Sun, 4 Mar 2018 15:07:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2CA87E738; Sun, 4 Mar 2018 15:07:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75EE816F38; Sun, 4 Mar 2018 15:07:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24F7N3a090353; Sun, 4 Mar 2018 15:07:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24F7NgU090352; Sun, 4 Mar 2018 15:07:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041507.w24F7NgU090352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 15:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330383 - vendor/lldb/lldb-release_600-r326565 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release_600-r326565 X-SVN-Commit-Revision: 330383 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 15:07:25 -0000 Author: dim Date: Sun Mar 4 15:07:23 2018 New Revision: 330383 URL: https://svnweb.freebsd.org/changeset/base/330383 Log: Tag lldb 6.0.0 release r326565. Added: vendor/lldb/lldb-release_600-r326565/ - copied from r330382, vendor/lldb/dist-release_60/ From owner-svn-src-all@freebsd.org Sun Mar 4 17:06:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C076F44451; Sun, 4 Mar 2018 17:06:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 455E583A94; Sun, 4 Mar 2018 17:06:39 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C0551828C; Sun, 4 Mar 2018 17:06:39 +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 w24H6dY1051989; Sun, 4 Mar 2018 17:06:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24H6coa051979; Sun, 4 Mar 2018 17:06:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803041706.w24H6coa051979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 4 Mar 2018 17:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330384 - in head: contrib/llvm/lib/Target/AArch64 contrib/llvm/lib/Target/X86 contrib/llvm/tools/clang/include/clang/Basic contrib/llvm/tools/clang/lib/Basic lib/clang lib/clang/includ... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm/lib/Target/AArch64 contrib/llvm/lib/Target/X86 contrib/llvm/tools/clang/include/clang/Basic contrib/llvm/tools/clang/lib/Basic lib/clang lib/clang/include/clang/Basic lib/clang/i... X-SVN-Commit-Revision: 330384 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 17:06:39 -0000 Author: dim Date: Sun Mar 4 17:06:37 2018 New Revision: 330384 URL: https://svnweb.freebsd.org/changeset/base/330384 Log: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 6.0.0 release (upstream r326565). Release notes for llvm, clang and lld will be available here soon: Relnotes: yes MFC after: 3 months X-MFC-With: r327952 PR: 224669 Modified: head/contrib/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/lib/clang/freebsd_cc_version.h head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/llvm/Support/VCSRevision.h head/sys/sys/param.h Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) Modified: head/contrib/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp Sun Mar 4 15:07:23 2018 (r330383) +++ head/contrib/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp Sun Mar 4 17:06:37 2018 (r330384) @@ -840,6 +840,7 @@ bool AArch64InstructionSelector::select(MachineInstr & case TargetOpcode::G_EXTRACT: { LLT SrcTy = MRI.getType(I.getOperand(1).getReg()); LLT DstTy = MRI.getType(I.getOperand(0).getReg()); + (void)DstTy; unsigned SrcSize = SrcTy.getSizeInBits(); // Larger extracts are vectors, same-size extracts should be something else // by now (either split up or simplified to a COPY). Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sun Mar 4 15:07:23 2018 (r330383) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sun Mar 4 17:06:37 2018 (r330384) @@ -35520,7 +35520,7 @@ static SDValue combineFneg(SDNode *N, SelectionDAG &DA // If we're negating an FMA node, then we can adjust the // instruction to include the extra negation. unsigned NewOpcode = 0; - if (Arg.hasOneUse()) { + if (Arg.hasOneUse() && Subtarget.hasAnyFMA()) { switch (Arg.getOpcode()) { case ISD::FMA: NewOpcode = X86ISD::FNMSUB; break; case X86ISD::FMSUB: NewOpcode = X86ISD::FNMADD; break; Modified: head/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td ============================================================================== --- head/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td Sun Mar 4 15:07:23 2018 (r330383) +++ head/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td Sun Mar 4 17:06:37 2018 (r330384) @@ -353,7 +353,7 @@ available in C. int isdigit(int c); int isdigit(int c) __attribute__((enable_if(c <= -1 || c > 255, "chosen when 'c' is out of range"))) __attribute__((unavailable("'c' must have the value of an unsigned char or EOF"))); - + void foo(char c) { isdigit(c); isdigit(10); @@ -406,7 +406,7 @@ overload out of a number of viable overloads using ena void f() __attribute__((enable_if(true, ""))); // #1 void f() __attribute__((enable_if(true, ""))) __attribute__((enable_if(true, ""))); // #2 - + void g(int i, int j) __attribute__((enable_if(i, ""))); // #1 void g(int i, int j) __attribute__((enable_if(j, ""))) __attribute__((enable_if(true))); // #2 @@ -918,11 +918,11 @@ default name. can only be placed before an @protocol or @interface declaration: .. code-block:: objc - + __attribute__((objc_runtime_name("MyLocalName"))) @interface Message @end - + }]; } @@ -1228,7 +1228,7 @@ potentially-evaluated discarded-value expression that .. code-block: c++ struct [[nodiscard]] error_info { /*...*/ }; error_info enable_missile_safety_mode(); - + void launch_missiles(); void test_missiles() { enable_missile_safety_mode(); // diagnoses @@ -2641,23 +2641,23 @@ used to process multiple arguments from a single invoc concurrently. The syntax of the `declare simd` construct is as follows: - .. code-block:: c + .. code-block:: none - #pragma omp declare simd [clause[[,] clause] ...] new-line - [#pragma omp declare simd [clause[[,] clause] ...] new-line] - [...] - function definition or declaration + #pragma omp declare simd [clause[[,] clause] ...] new-line + [#pragma omp declare simd [clause[[,] clause] ...] new-line] + [...] + function definition or declaration where clause is one of the following: - .. code-block:: c + .. code-block:: none - simdlen(length) - linear(argument-list[:constant-linear-step]) - aligned(argument-list[:alignment]) - uniform(argument-list) - inbranch - notinbranch + simdlen(length) + linear(argument-list[:constant-linear-step]) + aligned(argument-list[:alignment]) + uniform(argument-list) + inbranch + notinbranch }]; } @@ -2673,9 +2673,9 @@ The syntax of the declare target directive is as follo .. code-block:: c - #pragma omp declare target new-line - declarations-definition-seq - #pragma omp end declare target new-line + #pragma omp declare target new-line + declarations-definition-seq + #pragma omp end declare target new-line }]; } Modified: head/contrib/llvm/tools/clang/lib/Basic/Version.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/Version.cpp Sun Mar 4 15:07:23 2018 (r330383) +++ head/contrib/llvm/tools/clang/lib/Basic/Version.cpp Sun Mar 4 17:06:37 2018 (r330384) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_60/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_600/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: head/lib/clang/freebsd_cc_version.h ============================================================================== --- head/lib/clang/freebsd_cc_version.h Sun Mar 4 15:07:23 2018 (r330383) +++ head/lib/clang/freebsd_cc_version.h Sun Mar 4 17:06:37 2018 (r330384) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define FREEBSD_CC_VERSION 1200010 +#define FREEBSD_CC_VERSION 1200011 Modified: head/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- head/lib/clang/include/clang/Basic/Version.inc Sun Mar 4 15:07:23 2018 (r330383) +++ head/lib/clang/include/clang/Basic/Version.inc Sun Mar 4 17:06:37 2018 (r330384) @@ -8,4 +8,4 @@ #define CLANG_VENDOR "FreeBSD " -#define SVN_REVISION "325932" +#define SVN_REVISION "326565" Modified: head/lib/clang/include/lld/Common/Version.inc ============================================================================== --- head/lib/clang/include/lld/Common/Version.inc Sun Mar 4 15:07:23 2018 (r330383) +++ head/lib/clang/include/lld/Common/Version.inc Sun Mar 4 17:06:37 2018 (r330384) @@ -4,5 +4,5 @@ #define LLD_VERSION_STRING "6.0.0" #define LLD_VERSION_MAJOR 6 #define LLD_VERSION_MINOR 0 -#define LLD_REVISION_STRING "325932" +#define LLD_REVISION_STRING "326565" #define LLD_REPOSITORY_STRING "FreeBSD" Modified: head/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- head/lib/clang/include/llvm/Support/VCSRevision.h Sun Mar 4 15:07:23 2018 (r330383) +++ head/lib/clang/include/llvm/Support/VCSRevision.h Sun Mar 4 17:06:37 2018 (r330384) @@ -1,2 +1,2 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "svn-r325932" +#define LLVM_REVISION "svn-r326565" Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Mar 4 15:07:23 2018 (r330383) +++ head/sys/sys/param.h Sun Mar 4 17:06:37 2018 (r330384) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200059 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200060 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Sun Mar 4 17:30:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C2F4F45F01; Sun, 4 Mar 2018 17:30:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EEBDE84902; Sun, 4 Mar 2018 17:30:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E95B11860C; Sun, 4 Mar 2018 17:30:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24HUGHp061973; Sun, 4 Mar 2018 17:30:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24HUGtj061972; Sun, 4 Mar 2018 17:30:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803041730.w24HUGtj061972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 17:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330385 - head/sys/dev/usb/serial X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/usb/serial X-SVN-Commit-Revision: 330385 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 17:30:17 -0000 Author: ian Date: Sun Mar 4 17:30:16 2018 New Revision: 330385 URL: https://svnweb.freebsd.org/changeset/base/330385 Log: Flag the first interface on a KTLINK FTDI-based jtag+uart device as being the jtag port, so that a tty is not created for it. This is based on information in the PR and from the vendor website. When the PR was first opened we had no facility for flagging the jtag ports. I stumbled across the still-open PR with the idea of closing it, and noticed that this wee update was needed. PR: 175893 Modified: head/sys/dev/usb/serial/uftdi.c Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Sun Mar 4 17:06:37 2018 (r330384) +++ head/sys/dev/usb/serial/uftdi.c Sun Mar 4 17:30:16 2018 (r330385) @@ -441,7 +441,7 @@ static const STRUCT_USB_HOST_ID uftdi_devs[] = { UFTDI_DEV(FTDI, IPLUS2, 0), UFTDI_DEV(FTDI, IRTRANS, 0), UFTDI_DEV(FTDI, KBS, 0), - UFTDI_DEV(FTDI, KTLINK, 0), + UFTDI_DEV(FTDI, KTLINK, UFTDI_JTAG_IFACE(0)), UFTDI_DEV(FTDI, LENZ_LIUSB, 0), UFTDI_DEV(FTDI, LK202, 0), UFTDI_DEV(FTDI, LK204, 0), From owner-svn-src-all@freebsd.org Sun Mar 4 18:00:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E04DBF487DD; Sun, 4 Mar 2018 18:00:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9655C8677A; Sun, 4 Mar 2018 18:00:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 914D918AE9; Sun, 4 Mar 2018 18:00:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24I0Whu077762; Sun, 4 Mar 2018 18:00:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24I0WsW077761; Sun, 4 Mar 2018 18:00:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803041800.w24I0WsW077761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 4 Mar 2018 18:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330386 - head/lib/libutil X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/lib/libutil X-SVN-Commit-Revision: 330386 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:00:33 -0000 Author: eadler Date: Sun Mar 4 18:00:32 2018 New Revision: 330386 URL: https://svnweb.freebsd.org/changeset/base/330386 Log: open.3: Use .Fa where appropriate Obtained From: DragonFlyBSD (78732326a796ca521f3c0fe33c6fc9c695742ede) Modified: head/lib/libutil/flopen.3 Modified: head/lib/libutil/flopen.3 ============================================================================== --- head/lib/libutil/flopen.3 Sun Mar 4 17:30:16 2018 (r330385) +++ head/lib/libutil/flopen.3 Sun Mar 4 18:00:32 2018 (r330386) @@ -54,7 +54,7 @@ It is essentially equivalent with calling with the same parameters followed by .Fn flock with an -.Va operation +.Fa operation argument of .Dv LOCK_EX , except that @@ -66,7 +66,7 @@ files, mailboxes and other kinds of files which are us synchronization between processes. .Pp If -.Va flags +.Fa flags includes .Dv O_NONBLOCK and the file is already locked, @@ -79,9 +79,9 @@ to As with .Fn open , the additional -.Va mode +.Fa mode argument is required if -.Va flags +.Fa flags includes .Dv O_CREAT . .Pp From owner-svn-src-all@freebsd.org Sun Mar 4 18:04:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 469E2F48D8B; Sun, 4 Mar 2018 18:04:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0AF186D5A; Sun, 4 Mar 2018 18:04:37 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD84718C88; Sun, 4 Mar 2018 18:04:37 +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 w24I4bYj082555; Sun, 4 Mar 2018 18:04:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24I4bCo082553; Sun, 4 Mar 2018 18:04:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041804.w24I4bCo082553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330387 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330387 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:04:38 -0000 Author: hselasky Date: Sun Mar 4 18:04:37 2018 New Revision: 330387 URL: https://svnweb.freebsd.org/changeset/base/330387 Log: Rename the SLAB_DESTROY_BY_RCU flag into SLAB_TYPESAFE_BY_RCU in the LinuxKPI to be compatible with Linux. MFC after: 1 week Requested by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h head/sys/compat/linuxkpi/common/src/linux_slab.c Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/slab.h Sun Mar 4 18:00:32 2018 (r330386) +++ head/sys/compat/linuxkpi/common/include/linux/slab.h Sun Mar 4 18:04:37 2018 (r330387) @@ -79,7 +79,7 @@ struct linux_kmem_cache { }; #define SLAB_HWCACHE_ALIGN (1 << 0) -#define SLAB_DESTROY_BY_RCU (1 << 1) +#define SLAB_TYPESAFE_BY_RCU (1 << 1) #define SLAB_RECLAIM_ACCOUNT (1 << 2) static inline gfp_t @@ -162,7 +162,7 @@ extern void linux_kmem_cache_free_rcu(struct linux_kme static inline void linux_kmem_cache_free(struct linux_kmem_cache *c, void *m) { - if (unlikely(c->cache_flags & SLAB_DESTROY_BY_RCU)) + if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU)) linux_kmem_cache_free_rcu(c, m); else uma_zfree(c->cache_zone, m); Modified: head/sys/compat/linuxkpi/common/src/linux_slab.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_slab.c Sun Mar 4 18:00:32 2018 (r330386) +++ head/sys/compat/linuxkpi/common/src/linux_slab.c Sun Mar 4 18:04:37 2018 (r330387) @@ -49,7 +49,7 @@ linux_kmem_ctor(void *mem, int size, void *arg, int fl { struct linux_kmem_cache *c = arg; - if (unlikely(c->cache_flags & SLAB_DESTROY_BY_RCU)) { + if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU)) { struct linux_kmem_rcu *rcu = LINUX_KMEM_TO_RCU(c, mem); /* duplicate cache pointer */ @@ -85,7 +85,7 @@ linux_kmem_cache_create(const char *name, size_t size, else if (align != 0) align--; - if (flags & SLAB_DESTROY_BY_RCU) { + if (flags & SLAB_TYPESAFE_BY_RCU) { /* make room for RCU structure */ size = ALIGN(size, sizeof(void *)); size += sizeof(struct linux_kmem_rcu); @@ -118,7 +118,7 @@ linux_kmem_cache_free_rcu(struct linux_kmem_cache *c, void linux_kmem_cache_destroy(struct linux_kmem_cache *c) { - if (unlikely(c->cache_flags & SLAB_DESTROY_BY_RCU)) { + if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU)) { /* make sure all free callbacks have been called */ rcu_barrier(); } From owner-svn-src-all@freebsd.org Sun Mar 4 18:08:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F00BF49208; Sun, 4 Mar 2018 18:08:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 122CA8700F; Sun, 4 Mar 2018 18:08: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03D8A18C89; Sun, 4 Mar 2018 18:08: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 w24I8LSV082720; Sun, 4 Mar 2018 18:08:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24I8LTI082719; Sun, 4 Mar 2018 18:08:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041808.w24I8LTI082719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330388 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330388 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:08:22 -0000 Author: hselasky Date: Sun Mar 4 18:08:21 2018 New Revision: 330388 URL: https://svnweb.freebsd.org/changeset/base/330388 Log: Implement GENMASK_ULL() function macro in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Sun Mar 4 18:04:37 2018 (r330387) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Sun Mar 4 18:08:21 2018 (r330388) @@ -45,12 +45,15 @@ #define BITS_PER_LONG 32 #endif +#define BITS_PER_LONG_LONG 64 + #define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG)) #define BITMAP_LAST_WORD_MASK(n) (~0UL >> (BITS_PER_LONG - (n))) #define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG) #define BIT_MASK(nr) (1UL << ((nr) & (BITS_PER_LONG - 1))) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) #define GENMASK(h, l) (((~0UL) >> (BITS_PER_LONG - (h) - 1)) & ((~0UL) << (l))) +#define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) #define BITS_PER_BYTE 8 #define hweight8(x) bitcount((uint8_t)(x)) From owner-svn-src-all@freebsd.org Sun Mar 4 18:10:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B685F493F4; Sun, 4 Mar 2018 18:10:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49D64871BD; Sun, 4 Mar 2018 18:10:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DEE418C8D; Sun, 4 Mar 2018 18:10:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24IAJhh082864; Sun, 4 Mar 2018 18:10:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24IAJs5082863; Sun, 4 Mar 2018 18:10:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041810.w24IAJs5082863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330389 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330389 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:10:19 -0000 Author: hselasky Date: Sun Mar 4 18:10:18 2018 New Revision: 330389 URL: https://svnweb.freebsd.org/changeset/base/330389 Log: Implement for_each_clear_bit() function macro in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Sun Mar 4 18:08:21 2018 (r330388) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Sun Mar 4 18:10:18 2018 (r330389) @@ -390,6 +390,10 @@ done: (bit) < (size); \ (bit) = find_next_bit((addr), (size), (bit) + 1)) +#define for_each_clear_bit(bit, addr, size) \ + for ((bit) = find_first_zero_bit((addr), (size)); \ + (bit) < (size); \ + (bit) = find_next_zero_bit((addr), (size), (bit) + 1)) static inline uint64_t sign_extend64(uint64_t value, int index) From owner-svn-src-all@freebsd.org Sun Mar 4 18:13:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08B59F49A0A; Sun, 4 Mar 2018 18:13:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDEB3876F0; Sun, 4 Mar 2018 18:13:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8EBE18E19; Sun, 4 Mar 2018 18:13:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24IDV2P087365; Sun, 4 Mar 2018 18:13:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24IDVP5087364; Sun, 4 Mar 2018 18:13:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041813.w24IDVP5087364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330390 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330390 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:13:32 -0000 Author: hselasky Date: Sun Mar 4 18:13:31 2018 New Revision: 330390 URL: https://svnweb.freebsd.org/changeset/base/330390 Log: Define noinline and __maybe_unused macros in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/compiler.h Modified: head/sys/compat/linuxkpi/common/include/linux/compiler.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/compiler.h Sun Mar 4 18:10:18 2018 (r330389) +++ head/sys/compat/linuxkpi/common/include/linux/compiler.h Sun Mar 4 18:13:31 2018 (r330390) @@ -64,6 +64,7 @@ #define __attribute_const__ __attribute__((__const__)) #undef __always_inline #define __always_inline inline +#define noinline __noinline #define ____cacheline_aligned __aligned(CACHE_LINE_SIZE) #define likely(x) __builtin_expect(!!(x), 1) @@ -71,6 +72,7 @@ #define typeof(x) __typeof(x) #define uninitialized_var(x) x = x +#define __maybe_unused __unused #define __always_unused __unused #define __must_check __result_use_check From owner-svn-src-all@freebsd.org Sun Mar 4 18:17:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6892DF49F9B; Sun, 4 Mar 2018 18:17:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 160CB879C5; Sun, 4 Mar 2018 18:17:55 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10FF918E20; Sun, 4 Mar 2018 18:17:55 +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 w24IHsAY087553; Sun, 4 Mar 2018 18:17:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24IHstF087552; Sun, 4 Mar 2018 18:17:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041817.w24IHstF087552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330391 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330391 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:17:55 -0000 Author: hselasky Date: Sun Mar 4 18:17:54 2018 New Revision: 330391 URL: https://svnweb.freebsd.org/changeset/base/330391 Log: Implement writel_relaxed() in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/io.h Modified: head/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/io.h Sun Mar 4 18:13:31 2018 (r330390) +++ head/sys/compat/linuxkpi/common/include/linux/io.h Sun Mar 4 18:17:54 2018 (r330391) @@ -74,6 +74,13 @@ writel(uint32_t b, void *addr) *(volatile uint32_t *)addr = b; } +#undef writel_relaxed +static inline void +writel_relaxed(uint32_t b, void *addr) +{ + *(volatile uint32_t *)addr = b; +} + #undef writeq static inline void writeq(uint64_t b, void *addr) From owner-svn-src-all@freebsd.org Sun Mar 4 18:19:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA4B6F24230; Sun, 4 Mar 2018 18:19:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5678187B84; Sun, 4 Mar 2018 18:19:45 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51A1C18E23; Sun, 4 Mar 2018 18:19:45 +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 w24IJjPn087661; Sun, 4 Mar 2018 18:19:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24IJjeZ087660; Sun, 4 Mar 2018 18:19:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041819.w24IJjeZ087660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330392 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330392 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:19:45 -0000 Author: hselasky Date: Sun Mar 4 18:19:44 2018 New Revision: 330392 URL: https://svnweb.freebsd.org/changeset/base/330392 Log: Implement BUILD_BUG() function macro in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Sun Mar 4 18:17:54 2018 (r330391) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Sun Mar 4 18:19:44 2018 (r330392) @@ -86,6 +86,7 @@ #define S64_C(x) x ## LL #define U64_C(x) x ## ULL +#define BUILD_BUG() CTASSERT(0) #define BUILD_BUG_ON(x) CTASSERT(!(x)) #define BUILD_BUG_ON_MSG(x, msg) BUILD_BUG_ON(x) #define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x)) From owner-svn-src-all@freebsd.org Sun Mar 4 18:21:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BB2EF24468; Sun, 4 Mar 2018 18:21:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5D2087ED5; Sun, 4 Mar 2018 18:21:21 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0C6218F4A; Sun, 4 Mar 2018 18:21:21 +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 w24ILLdu090157; Sun, 4 Mar 2018 18:21:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24ILLno090156; Sun, 4 Mar 2018 18:21:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041821.w24ILLno090156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330393 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330393 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:21:22 -0000 Author: hselasky Date: Sun Mar 4 18:21:21 2018 New Revision: 330393 URL: https://svnweb.freebsd.org/changeset/base/330393 Log: Implement __MODULE_STRING() function macro in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/module.h Modified: head/sys/compat/linuxkpi/common/include/linux/module.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/module.h Sun Mar 4 18:19:44 2018 (r330392) +++ head/sys/compat/linuxkpi/common/include/linux/module.h Sun Mar 4 18:21:21 2018 (r330393) @@ -53,6 +53,7 @@ #define EXPORT_SYMBOL(name) #define EXPORT_SYMBOL_GPL(name) +#define __MODULE_STRING(x) __stringify(x) /* OFED pre-module initialization */ #define SI_SUB_OFED_PREINIT (SI_SUB_ROOT_CONF - 2) From owner-svn-src-all@freebsd.org Sun Mar 4 18:27:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C9B1F25027; Sun, 4 Mar 2018 18:27:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27EAE68403; Sun, 4 Mar 2018 18:27:51 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22DC018FBC; Sun, 4 Mar 2018 18:27:51 +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 w24IRpSR092608; Sun, 4 Mar 2018 18:27:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24IRpQ8092607; Sun, 4 Mar 2018 18:27:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041827.w24IRpQ8092607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330394 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:27:51 -0000 Author: hselasky Date: Sun Mar 4 18:27:50 2018 New Revision: 330394 URL: https://svnweb.freebsd.org/changeset/base/330394 Log: Implement pr_err_ratelimited() function macro in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/printk.h Modified: head/sys/compat/linuxkpi/common/include/linux/printk.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/printk.h Sun Mar 4 18:21:21 2018 (r330393) +++ head/sys/compat/linuxkpi/common/include/linux/printk.h Sun Mar 4 18:27:50 2018 (r330394) @@ -118,4 +118,7 @@ print_hex_dump_bytes(const char *prefix_str, const int __retval; \ }) +#define pr_err_ratelimited(fmt, ...) \ + printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) + #endif /* _LINUX_PRINTK_H_ */ From owner-svn-src-all@freebsd.org Sun Mar 4 18:51:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 330E3F272BE; Sun, 4 Mar 2018 18:51:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9532696A5; Sun, 4 Mar 2018 18:51:43 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D43EA1945D; Sun, 4 Mar 2018 18:51:43 +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 w24IphmE006859; Sun, 4 Mar 2018 18:51:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24IphJG006857; Sun, 4 Mar 2018 18:51:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041851.w24IphJG006857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:51:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330395 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330395 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:51:44 -0000 Author: hselasky Date: Sun Mar 4 18:51:43 2018 New Revision: 330395 URL: https://svnweb.freebsd.org/changeset/base/330395 Log: Implement DEFINE_WAIT_FUNC() function macro and default_wake_function() in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/wait.h head/sys/compat/linuxkpi/common/src/linux_schedule.c Modified: head/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/wait.h Sun Mar 4 18:27:50 2018 (r330394) +++ head/sys/compat/linuxkpi/common/include/linux/wait.h Sun Mar 4 18:51:43 2018 (r330395) @@ -76,13 +76,17 @@ struct wait_queue_head { * renamed and furthermore must be the default wait queue callback. */ extern wait_queue_func_t autoremove_wake_function; +extern wait_queue_func_t default_wake_function; -#define DEFINE_WAIT(name) \ +#define DEFINE_WAIT_FUNC(name, function) \ wait_queue_t name = { \ .private = current, \ - .func = autoremove_wake_function, \ + .func = function, \ .task_list = LINUX_LIST_HEAD_INIT(name.task_list) \ } + +#define DEFINE_WAIT(name) \ + DEFINE_WAIT_FUNC(name, autoremove_wake_function) #define DECLARE_WAITQUEUE(name, task) \ wait_queue_t name = { \ Modified: head/sys/compat/linuxkpi/common/src/linux_schedule.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_schedule.c Sun Mar 4 18:27:50 2018 (r330394) +++ head/sys/compat/linuxkpi/common/src/linux_schedule.c Sun Mar 4 18:51:43 2018 (r330395) @@ -176,6 +176,13 @@ autoremove_wake_function(wait_queue_t *wq, unsigned in return (ret); } +int +default_wake_function(wait_queue_t *wq, unsigned int state, int flags, + void *key __unused) +{ + return (wake_up_task(wq->private, state)); +} + void linux_wake_up(wait_queue_head_t *wqh, unsigned int state, int nr, bool locked) { From owner-svn-src-all@freebsd.org Sun Mar 4 18:53:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E017CF27759; Sun, 4 Mar 2018 18:53:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A40A69919; Sun, 4 Mar 2018 18:53:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8268B19497; Sun, 4 Mar 2018 18:53:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24Irfm3007663; Sun, 4 Mar 2018 18:53:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24Irf3w007662; Sun, 4 Mar 2018 18:53:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041853.w24Irf3w007662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 18:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330396 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330396 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:53:42 -0000 Author: hselasky Date: Sun Mar 4 18:53:41 2018 New Revision: 330396 URL: https://svnweb.freebsd.org/changeset/base/330396 Log: Keep the old SLAB_DESTROY_BY_RCU macro definition around in the LinuxKPI to avoid compilation breakage in external kernel modules. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/slab.h Sun Mar 4 18:51:43 2018 (r330395) +++ head/sys/compat/linuxkpi/common/include/linux/slab.h Sun Mar 4 18:53:41 2018 (r330396) @@ -82,6 +82,9 @@ struct linux_kmem_cache { #define SLAB_TYPESAFE_BY_RCU (1 << 1) #define SLAB_RECLAIM_ACCOUNT (1 << 2) +#define SLAB_DESTROY_BY_RCU \ + SLAB_TYPESAFE_BY_RCU + static inline gfp_t linux_check_m_flags(gfp_t flags) { From owner-svn-src-all@freebsd.org Sun Mar 4 18:58:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E2F9F27CFA; Sun, 4 Mar 2018 18:58:25 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17C5E69B63; Sun, 4 Mar 2018 18:58:25 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 032511949C; Sun, 4 Mar 2018 18:58:25 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24IwOLQ007880; Sun, 4 Mar 2018 18:58:24 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24IwOQK007879; Sun, 4 Mar 2018 18:58:24 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803041858.w24IwOQK007879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 18:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330397 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330397 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 18:58:25 -0000 Author: ian Date: Sun Mar 4 18:58:24 2018 New Revision: 330397 URL: https://svnweb.freebsd.org/changeset/base/330397 Log: Fix a paste-o: use the IICBUS version constants, not IICBB bitbang driver's. Modified: head/sys/dev/iicbus/nxprtc.c Modified: head/sys/dev/iicbus/nxprtc.c ============================================================================== --- head/sys/dev/iicbus/nxprtc.c Sun Mar 4 18:53:41 2018 (r330396) +++ head/sys/dev/iicbus/nxprtc.c Sun Mar 4 18:58:24 2018 (r330397) @@ -823,4 +823,4 @@ static devclass_t nxprtc_devclass; DRIVER_MODULE(nxprtc, iicbus, nxprtc_driver, nxprtc_devclass, NULL, NULL); MODULE_VERSION(nxprtc, 1); -MODULE_DEPEND(nxprtc, iicbus, IICBB_MINVER, IICBB_PREFVER, IICBB_MAXVER); +MODULE_DEPEND(nxprtc, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); From owner-svn-src-all@freebsd.org Sun Mar 4 19:07:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67DDEF296A3; Sun, 4 Mar 2018 19:07:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A8126A0B9; Sun, 4 Mar 2018 19:07:11 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 113D219643; Sun, 4 Mar 2018 19:07:11 +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 w24J7AIq012604; Sun, 4 Mar 2018 19:07:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24J7ALe012603; Sun, 4 Mar 2018 19:07:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041907.w24J7ALe012603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 19:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330398 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330398 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:07:11 -0000 Author: hselasky Date: Sun Mar 4 19:07:10 2018 New Revision: 330398 URL: https://svnweb.freebsd.org/changeset/base/330398 Log: Implement wait_event_lock_irq() macro function in the LinuxKPI. MFC after: 1 week Requested by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/wait.h Modified: head/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/wait.h Sun Mar 4 18:58:24 2018 (r330397) +++ head/sys/compat/linuxkpi/common/include/linux/wait.h Sun Mar 4 19:07:10 2018 (r330398) @@ -194,11 +194,19 @@ int linux_wait_event_common(wait_queue_head_t *, wait_ }) /* - * Hold the (locked) spinlock when testing the cond. + * The passed spinlock is held when testing the condition. */ #define wait_event_interruptible_lock_irq(wqh, cond, lock) ({ \ __wait_event_common(wqh, cond, MAX_SCHEDULE_TIMEOUT, \ TASK_INTERRUPTIBLE, &(lock)); \ +}) + +/* + * The passed spinlock is held when testing the condition. + */ +#define wait_event_lock_irq(wqh, cond, lock) ({ \ + __wait_event_common(wqh, cond, MAX_SCHEDULE_TIMEOUT, \ + TASK_UNINTERRUPTIBLE, &(lock)); \ }) static inline void From owner-svn-src-all@freebsd.org Sun Mar 4 19:10:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79C04F29A80; Sun, 4 Mar 2018 19:10:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BC656A3A6; Sun, 4 Mar 2018 19:10:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2280919648; Sun, 4 Mar 2018 19:10:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24JAUqs012966; Sun, 4 Mar 2018 19:10:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24JAUV7012965; Sun, 4 Mar 2018 19:10:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041910.w24JAUV7012965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 19:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330399 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330399 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:10:31 -0000 Author: hselasky Date: Sun Mar 4 19:10:30 2018 New Revision: 330399 URL: https://svnweb.freebsd.org/changeset/base/330399 Log: Stub kernel_param_lock() and kernel_param_unlock() in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/include/linux/moduleparam.h Modified: head/sys/compat/linuxkpi/common/include/linux/moduleparam.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/moduleparam.h Sun Mar 4 19:07:10 2018 (r330398) +++ head/sys/compat/linuxkpi/common/include/linux/moduleparam.h Sun Mar 4 19:10:30 2018 (r330399) @@ -125,6 +125,9 @@ #define MODULE_PARM_DESC(name, desc) \ const char LINUXKPI_PARAM_DESC(name)[] = { desc } +#define kernel_param_lock(...) do {} while (0) +#define kernel_param_unlock(...) do {} while (0) + SYSCTL_DECL(_compat_linuxkpi); #endif /* _LINUX_MODULEPARAM_H_ */ From owner-svn-src-all@freebsd.org Sun Mar 4 19:12:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19D40F29F42; Sun, 4 Mar 2018 19:12:55 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B58636A8CE; Sun, 4 Mar 2018 19:12:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB42E197D8; Sun, 4 Mar 2018 19:12:54 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24JCsd7018131; Sun, 4 Mar 2018 19:12:54 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24JCsaa018130; Sun, 4 Mar 2018 19:12:54 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201803041912.w24JCsaa018130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 4 Mar 2018 19:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330400 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330400 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:12:55 -0000 Author: mjg Date: Sun Mar 4 19:12:54 2018 New Revision: 330400 URL: https://svnweb.freebsd.org/changeset/base/330400 Log: lockmgr: start decomposing the main routine The main routine takes 8 args, 3 of which are almost the same for most uses. This in particular pushes it above the limit of 6 arguments passable through registers on amd64 making it impossible to tail call. This is a prerequisite for further cleanups. Tested by: pho Modified: head/sys/kern/kern_lock.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Sun Mar 4 19:10:30 2018 (r330399) +++ head/sys/kern/kern_lock.c Sun Mar 4 19:12:54 2018 (r330400) @@ -160,11 +160,31 @@ struct lock_class lock_class_lockmgr = { #endif }; +struct lockmgr_wait { + const char *iwmesg; + int ipri; + int itimo; +}; + static bool __always_inline lockmgr_slock_try(struct lock *lk, uintptr_t *xp, int flags); -static bool __always_inline lockmgr_sunlock_try(struct lock *lk, uintptr_t x); +static bool __always_inline lockmgr_sunlock_try(struct lock *lk, uintptr_t *xp); static void +lockmgr_exit(u_int flags, struct lock_object *ilk, int wakeup_swapper) +{ + struct lock_class *class; + + if (flags & LK_INTERLOCK) { + class = LOCK_CLASS(ilk); + class->lc_unlock(ilk); + } + + if (__predict_false(wakeup_swapper)) + kick_proc0(); +} + +static void lockmgr_note_shared_acquire(struct lock *lk, int contested, uint64_t waittime, const char *file, int line, int flags) { @@ -295,7 +315,7 @@ wakeupshlk(struct lock *lk, const char *file, int line wakeup_swapper = 0; for (;;) { x = lk->lk_lock; - if (lockmgr_sunlock_try(lk, x)) + if (lockmgr_sunlock_try(lk, &x)) break; /* @@ -502,7 +522,7 @@ lockmgr_slock_try(struct lock *lk, uintptr_t *xp, int } static bool __always_inline -lockmgr_sunlock_try(struct lock *lk, uintptr_t x) +lockmgr_sunlock_try(struct lock *lk, uintptr_t *xp) { for (;;) { @@ -510,9 +530,9 @@ lockmgr_sunlock_try(struct lock *lk, uintptr_t x) * If there is more than one shared lock held, just drop one * and return. */ - if (LK_SHARERS(x) > 1) { - if (atomic_fcmpset_rel_ptr(&lk->lk_lock, &x, - x - LK_ONE_SHARER)) + if (LK_SHARERS(*xp) > 1) { + if (atomic_fcmpset_rel_ptr(&lk->lk_lock, xp, + *xp - LK_ONE_SHARER)) return (true); continue; } @@ -521,10 +541,10 @@ lockmgr_sunlock_try(struct lock *lk, uintptr_t x) * If there are not waiters on the exclusive queue, drop the * lock quickly. */ - if ((x & LK_ALL_WAITERS) == 0) { - MPASS((x & ~LK_EXCLUSIVE_SPINNERS) == + if ((*xp & LK_ALL_WAITERS) == 0) { + MPASS((*xp & ~LK_EXCLUSIVE_SPINNERS) == LK_SHARERS_LOCK(1)); - if (atomic_fcmpset_rel_ptr(&lk->lk_lock, &x, + if (atomic_fcmpset_rel_ptr(&lk->lk_lock, xp, LK_UNLOCKED)) return (true); continue; @@ -534,12 +554,373 @@ lockmgr_sunlock_try(struct lock *lk, uintptr_t x) return (false); } +static __noinline int +lockmgr_slock_hard(struct lock *lk, u_int flags, struct lock_object *ilk, + const char *file, int line, struct lockmgr_wait *lwa) +{ + uintptr_t tid, x; + int error = 0; + const char *iwmesg; + int ipri, itimo; + +#ifdef LOCK_PROFILING + uint64_t waittime = 0; + int contested = 0; +#endif + + if (__predict_false(panicstr != NULL)) + goto out; + + tid = (uintptr_t)curthread; + + if (LK_CAN_WITNESS(flags)) + WITNESS_CHECKORDER(&lk->lock_object, LOP_NEWORDER, + file, line, flags & LK_INTERLOCK ? ilk : NULL); + for (;;) { + if (lockmgr_slock_try(lk, &x, flags)) + break; +#ifdef HWPMC_HOOKS + PMC_SOFT_CALL( , , lock, failed); +#endif + lock_profile_obtain_lock_failed(&lk->lock_object, + &contested, &waittime); + + /* + * If the lock is already held by curthread in + * exclusive way avoid a deadlock. + */ + if (LK_HOLDER(x) == tid) { + LOCK_LOG2(lk, + "%s: %p already held in exclusive mode", + __func__, lk); + error = EDEADLK; + break; + } + + /* + * If the lock is expected to not sleep just give up + * and return. + */ + if (LK_TRYOP(flags)) { + LOCK_LOG2(lk, "%s: %p fails the try operation", + __func__, lk); + error = EBUSY; + break; + } + + /* + * Acquire the sleepqueue chain lock because we + * probabilly will need to manipulate waiters flags. + */ + sleepq_lock(&lk->lock_object); + x = lk->lk_lock; + + /* + * if the lock can be acquired in shared mode, try + * again. + */ + if (LK_CAN_SHARE(x, flags)) { + sleepq_release(&lk->lock_object); + continue; + } + + /* + * Try to set the LK_SHARED_WAITERS flag. If we fail, + * loop back and retry. + */ + if ((x & LK_SHARED_WAITERS) == 0) { + if (!atomic_cmpset_acq_ptr(&lk->lk_lock, x, + x | LK_SHARED_WAITERS)) { + sleepq_release(&lk->lock_object); + continue; + } + LOCK_LOG2(lk, "%s: %p set shared waiters flag", + __func__, lk); + } + + if (lwa == NULL) { + iwmesg = lk->lock_object.lo_name; + ipri = lk->lk_pri; + itimo = lk->lk_timo; + } else { + iwmesg = lwa->iwmesg; + ipri = lwa->ipri; + itimo = lwa->itimo; + } + + /* + * As far as we have been unable to acquire the + * shared lock and the shared waiters flag is set, + * we will sleep. + */ + error = sleeplk(lk, flags, ilk, iwmesg, ipri, itimo, + SQ_SHARED_QUEUE); + flags &= ~LK_INTERLOCK; + if (error) { + LOCK_LOG3(lk, + "%s: interrupted sleep for %p with %d", + __func__, lk, error); + break; + } + LOCK_LOG2(lk, "%s: %p resuming from the sleep queue", + __func__, lk); + } + if (error == 0) { +#ifdef LOCK_PROFILING + lockmgr_note_shared_acquire(lk, contested, waittime, + file, line, flags); +#else + lockmgr_note_shared_acquire(lk, 0, 0, file, line, + flags); +#endif + } + +out: + lockmgr_exit(flags, ilk, 0); + return (error); +} + +static __noinline int +lockmgr_xlock_hard(struct lock *lk, u_int flags, struct lock_object *ilk, + const char *file, int line, struct lockmgr_wait *lwa) +{ + struct lock_class *class; + uintptr_t tid, x, v; + int error = 0; + const char *iwmesg; + int ipri, itimo; + +#ifdef LOCK_PROFILING + uint64_t waittime = 0; + int contested = 0; +#endif + + if (__predict_false(panicstr != NULL)) + goto out; + + tid = (uintptr_t)curthread; + + if (LK_CAN_WITNESS(flags)) + WITNESS_CHECKORDER(&lk->lock_object, LOP_NEWORDER | + LOP_EXCLUSIVE, file, line, flags & LK_INTERLOCK ? + ilk : NULL); + + /* + * If curthread already holds the lock and this one is + * allowed to recurse, simply recurse on it. + */ + if (lockmgr_xlocked(lk)) { + if ((flags & LK_CANRECURSE) == 0 && + (lk->lock_object.lo_flags & LO_RECURSABLE) == 0) { + /* + * If the lock is expected to not panic just + * give up and return. + */ + if (LK_TRYOP(flags)) { + LOCK_LOG2(lk, + "%s: %p fails the try operation", + __func__, lk); + error = EBUSY; + goto out; + } + if (flags & LK_INTERLOCK) { + class = LOCK_CLASS(ilk); + class->lc_unlock(ilk); + } + panic("%s: recursing on non recursive lockmgr %s @ %s:%d\n", + __func__, iwmesg, file, line); + } + lk->lk_recurse++; + LOCK_LOG2(lk, "%s: %p recursing", __func__, lk); + LOCK_LOG_LOCK("XLOCK", &lk->lock_object, 0, + lk->lk_recurse, file, line); + WITNESS_LOCK(&lk->lock_object, LOP_EXCLUSIVE | + LK_TRYWIT(flags), file, line); + TD_LOCKS_INC(curthread); + goto out; + } + + for (;;) { + if (lk->lk_lock == LK_UNLOCKED && + atomic_cmpset_acq_ptr(&lk->lk_lock, LK_UNLOCKED, tid)) + break; +#ifdef HWPMC_HOOKS + PMC_SOFT_CALL( , , lock, failed); +#endif + lock_profile_obtain_lock_failed(&lk->lock_object, + &contested, &waittime); + + /* + * If the lock is expected to not sleep just give up + * and return. + */ + if (LK_TRYOP(flags)) { + LOCK_LOG2(lk, "%s: %p fails the try operation", + __func__, lk); + error = EBUSY; + break; + } + + /* + * Acquire the sleepqueue chain lock because we + * probabilly will need to manipulate waiters flags. + */ + sleepq_lock(&lk->lock_object); + x = lk->lk_lock; + + /* + * if the lock has been released while we spun on + * the sleepqueue chain lock just try again. + */ + if (x == LK_UNLOCKED) { + sleepq_release(&lk->lock_object); + continue; + } + + /* + * The lock can be in the state where there is a + * pending queue of waiters, but still no owner. + * This happens when the lock is contested and an + * owner is going to claim the lock. + * If curthread is the one successfully acquiring it + * claim lock ownership and return, preserving waiters + * flags. + */ + v = x & (LK_ALL_WAITERS | LK_EXCLUSIVE_SPINNERS); + if ((x & ~v) == LK_UNLOCKED) { + v &= ~LK_EXCLUSIVE_SPINNERS; + if (atomic_cmpset_acq_ptr(&lk->lk_lock, x, + tid | v)) { + sleepq_release(&lk->lock_object); + LOCK_LOG2(lk, + "%s: %p claimed by a new writer", + __func__, lk); + break; + } + sleepq_release(&lk->lock_object); + continue; + } + + /* + * Try to set the LK_EXCLUSIVE_WAITERS flag. If we + * fail, loop back and retry. + */ + if ((x & LK_EXCLUSIVE_WAITERS) == 0) { + if (!atomic_cmpset_ptr(&lk->lk_lock, x, + x | LK_EXCLUSIVE_WAITERS)) { + sleepq_release(&lk->lock_object); + continue; + } + LOCK_LOG2(lk, "%s: %p set excl waiters flag", + __func__, lk); + } + + if (lwa == NULL) { + iwmesg = lk->lock_object.lo_name; + ipri = lk->lk_pri; + itimo = lk->lk_timo; + } else { + iwmesg = lwa->iwmesg; + ipri = lwa->ipri; + itimo = lwa->itimo; + } + + /* + * As far as we have been unable to acquire the + * exclusive lock and the exclusive waiters flag + * is set, we will sleep. + */ + error = sleeplk(lk, flags, ilk, iwmesg, ipri, itimo, + SQ_EXCLUSIVE_QUEUE); + flags &= ~LK_INTERLOCK; + if (error) { + LOCK_LOG3(lk, + "%s: interrupted sleep for %p with %d", + __func__, lk, error); + break; + } + LOCK_LOG2(lk, "%s: %p resuming from the sleep queue", + __func__, lk); + } + if (error == 0) { +#ifdef LOCK_PROFILING + lockmgr_note_exclusive_acquire(lk, contested, waittime, + file, line, flags); +#else + lockmgr_note_exclusive_acquire(lk, 0, 0, file, line, + flags); +#endif + } + +out: + lockmgr_exit(flags, ilk, 0); + return (error); +} + +static __noinline int +lockmgr_upgrade(struct lock *lk, u_int flags, struct lock_object *ilk, + const char *file, int line, struct lockmgr_wait *lwa) +{ + uintptr_t tid, x, v; + int error = 0; + int wakeup_swapper = 0; + int op; + + if (__predict_false(panicstr != NULL)) + goto out; + + tid = (uintptr_t)curthread; + + _lockmgr_assert(lk, KA_SLOCKED, file, line); + v = lk->lk_lock; + x = v & LK_ALL_WAITERS; + v &= LK_EXCLUSIVE_SPINNERS; + + /* + * Try to switch from one shared lock to an exclusive one. + * We need to preserve waiters flags during the operation. + */ + if (atomic_cmpset_ptr(&lk->lk_lock, LK_SHARERS_LOCK(1) | x | v, + tid | x)) { + LOCK_LOG_LOCK("XUPGRADE", &lk->lock_object, 0, 0, file, + line); + WITNESS_UPGRADE(&lk->lock_object, LOP_EXCLUSIVE | + LK_TRYWIT(flags), file, line); + TD_SLOCKS_DEC(curthread); + goto out; + } + + op = flags & LK_TYPE_MASK; + + /* + * In LK_TRYUPGRADE mode, do not drop the lock, + * returning EBUSY instead. + */ + if (op == LK_TRYUPGRADE) { + LOCK_LOG2(lk, "%s: %p failed the nowait upgrade", + __func__, lk); + error = EBUSY; + goto out; + } + + /* + * We have been unable to succeed in upgrading, so just + * give up the shared lock. + */ + wakeup_swapper |= wakeupshlk(lk, file, line); + error = lockmgr_xlock_hard(lk, flags, ilk, file, line, lwa); + flags &= ~LK_INTERLOCK; +out: + lockmgr_exit(flags, ilk, wakeup_swapper); + return (error); +} + int lockmgr_lock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk, const char *file, int line) { struct lock_class *class; - uintptr_t x, v, tid; + uintptr_t x, tid; u_int op; bool locked; @@ -556,6 +937,9 @@ lockmgr_lock_fast_path(struct lock *lk, u_int flags, s lockmgr_note_shared_acquire(lk, 0, 0, file, line, flags); locked = true; + } else { + return (lockmgr_slock_hard(lk, flags, ilk, file, line, + NULL)); } break; case LK_EXCLUSIVE: @@ -569,21 +953,14 @@ lockmgr_lock_fast_path(struct lock *lk, u_int flags, s lockmgr_note_exclusive_acquire(lk, 0, 0, file, line, flags); locked = true; + } else { + return (lockmgr_xlock_hard(lk, flags, ilk, file, line, + NULL)); } break; case LK_UPGRADE: case LK_TRYUPGRADE: - _lockmgr_assert(lk, KA_SLOCKED, file, line); - tid = (uintptr_t)curthread; - v = lk->lk_lock; - x = v & LK_ALL_WAITERS; - v &= LK_EXCLUSIVE_SPINNERS; - if (atomic_cmpset_ptr(&lk->lk_lock, LK_SHARERS_LOCK(1) | x | v, - tid | x)) { - lockmgr_note_exclusive_upgrade(lk, file, line, flags); - locked = true; - } - break; + return (lockmgr_upgrade(lk, flags, ilk, file, line, NULL)); default: break; } @@ -599,6 +976,127 @@ lockmgr_lock_fast_path(struct lock *lk, u_int flags, s } } +static __noinline int +lockmgr_sunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_object *ilk, + const char *file, int line) + +{ + int wakeup_swapper = 0; + + if (__predict_false(panicstr != NULL)) + goto out; + + wakeup_swapper = wakeupshlk(lk, file, line); + +out: + lockmgr_exit(flags, ilk, wakeup_swapper); + return (0); +} + +static __noinline int +lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_object *ilk, + const char *file, int line) +{ + uintptr_t tid, v; + int wakeup_swapper = 0; + u_int realexslp; + int queue; + + if (__predict_false(panicstr != NULL)) + goto out; + + tid = (uintptr_t)curthread; + + /* + * As first option, treact the lock as if it has not + * any waiter. + * Fix-up the tid var if the lock has been disowned. + */ + if (LK_HOLDER(x) == LK_KERNPROC) + tid = LK_KERNPROC; + else { + WITNESS_UNLOCK(&lk->lock_object, LOP_EXCLUSIVE, file, line); + TD_LOCKS_DEC(curthread); + } + LOCK_LOG_LOCK("XUNLOCK", &lk->lock_object, 0, lk->lk_recurse, file, line); + + /* + * The lock is held in exclusive mode. + * If the lock is recursed also, then unrecurse it. + */ + if (lockmgr_xlocked(lk) && lockmgr_recursed(lk)) { + LOCK_LOG2(lk, "%s: %p unrecursing", __func__, lk); + lk->lk_recurse--; + goto out; + } + if (tid != LK_KERNPROC) + lock_profile_release_lock(&lk->lock_object); + + if (atomic_cmpset_rel_ptr(&lk->lk_lock, tid, LK_UNLOCKED)) + goto out; + + sleepq_lock(&lk->lock_object); + x = lk->lk_lock; + v = LK_UNLOCKED; + + /* + * If the lock has exclusive waiters, give them + * preference in order to avoid deadlock with + * shared runners up. + * If interruptible sleeps left the exclusive queue + * empty avoid a starvation for the threads sleeping + * on the shared queue by giving them precedence + * and cleaning up the exclusive waiters bit anyway. + * Please note that lk_exslpfail count may be lying + * about the real number of waiters with the + * LK_SLEEPFAIL flag on because they may be used in + * conjunction with interruptible sleeps so + * lk_exslpfail might be considered an 'upper limit' + * bound, including the edge cases. + */ + MPASS((x & LK_EXCLUSIVE_SPINNERS) == 0); + realexslp = sleepq_sleepcnt(&lk->lock_object, SQ_EXCLUSIVE_QUEUE); + if ((x & LK_EXCLUSIVE_WAITERS) != 0 && realexslp != 0) { + if (lk->lk_exslpfail < realexslp) { + lk->lk_exslpfail = 0; + queue = SQ_EXCLUSIVE_QUEUE; + v |= (x & LK_SHARED_WAITERS); + } else { + lk->lk_exslpfail = 0; + LOCK_LOG2(lk, + "%s: %p has only LK_SLEEPFAIL sleepers", + __func__, lk); + LOCK_LOG2(lk, + "%s: %p waking up threads on the exclusive queue", + __func__, lk); + wakeup_swapper = sleepq_broadcast(&lk->lock_object, + SLEEPQ_LK, 0, SQ_EXCLUSIVE_QUEUE); + queue = SQ_SHARED_QUEUE; + } + } else { + + /* + * Exclusive waiters sleeping with LK_SLEEPFAIL + * on and using interruptible sleeps/timeout + * may have left spourious lk_exslpfail counts + * on, so clean it up anyway. + */ + lk->lk_exslpfail = 0; + queue = SQ_SHARED_QUEUE; + } + + LOCK_LOG3(lk, "%s: %p waking up threads on the %s queue", + __func__, lk, queue == SQ_SHARED_QUEUE ? "shared" : + "exclusive"); + atomic_store_rel_ptr(&lk->lk_lock, v); + wakeup_swapper |= sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, 0, queue); + sleepq_release(&lk->lock_object); + +out: + lockmgr_exit(flags, ilk, wakeup_swapper); + return (0); +} + int lockmgr_unlock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk) { @@ -615,9 +1113,11 @@ lockmgr_unlock_fast_path(struct lock *lk, u_int flags, unlocked = false; x = lk->lk_lock; if (__predict_true(x & LK_SHARE) != 0) { - if (lockmgr_sunlock_try(lk, x)) { + if (lockmgr_sunlock_try(lk, &x)) { lockmgr_note_shared_release(lk, file, line); unlocked = true; + } else { + return (lockmgr_sunlock_hard(lk, x, flags, ilk, file, line)); } } else { tid = (uintptr_t)curthread; @@ -625,18 +1125,15 @@ lockmgr_unlock_fast_path(struct lock *lk, u_int flags, atomic_cmpset_rel_ptr(&lk->lk_lock, tid, LK_UNLOCKED)) { lockmgr_note_exclusive_release(lk, file, line); unlocked = true; + } else { + return (lockmgr_xunlock_hard(lk, x, flags, ilk, file, line)); } } - if (__predict_true(unlocked)) { - if (__predict_false(flags & LK_INTERLOCK)) { - class = LOCK_CLASS(ilk); - class->lc_unlock(ilk); - } - return (0); - } else { - return (__lockmgr_args(lk, flags | LK_RELEASE, ilk, LK_WMESG_DEFAULT, - LK_PRIO_DEFAULT, LK_TIMO_DEFAULT, LOCK_FILE, LOCK_LINE)); + if (__predict_false(flags & LK_INTERLOCK)) { + class = LOCK_CLASS(ilk); + class->lc_unlock(ilk); } + return (0); } int @@ -644,6 +1141,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo const char *wmesg, int pri, int timo, const char *file, int line) { GIANT_DECLARE; + struct lockmgr_wait lwa; struct lock_class *class; const char *iwmesg; uintptr_t tid, v, x; @@ -661,6 +1159,10 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo ipri = (pri == LK_PRIO_DEFAULT) ? lk->lk_pri : pri; itimo = (timo == LK_TIMO_DEFAULT) ? lk->lk_timo : timo; + lwa.iwmesg = iwmesg; + lwa.ipri = ipri; + lwa.itimo = itimo; + MPASS((flags & ~LK_TOTAL_MASK) == 0); KASSERT((op & (op - 1)) == 0, ("%s: Invalid requested operation @ %s:%d", __func__, file, line)); @@ -701,278 +1203,14 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo wakeup_swapper = 0; switch (op) { case LK_SHARED: - if (LK_CAN_WITNESS(flags)) - WITNESS_CHECKORDER(&lk->lock_object, LOP_NEWORDER, - file, line, flags & LK_INTERLOCK ? ilk : NULL); - for (;;) { - if (lockmgr_slock_try(lk, &x, flags)) - break; -#ifdef HWPMC_HOOKS - PMC_SOFT_CALL( , , lock, failed); -#endif - lock_profile_obtain_lock_failed(&lk->lock_object, - &contested, &waittime); - - /* - * If the lock is already held by curthread in - * exclusive way avoid a deadlock. - */ - if (LK_HOLDER(x) == tid) { - LOCK_LOG2(lk, - "%s: %p already held in exclusive mode", - __func__, lk); - error = EDEADLK; - break; - } - - /* - * If the lock is expected to not sleep just give up - * and return. - */ - if (LK_TRYOP(flags)) { - LOCK_LOG2(lk, "%s: %p fails the try operation", - __func__, lk); - error = EBUSY; - break; - } - - /* - * Acquire the sleepqueue chain lock because we - * probabilly will need to manipulate waiters flags. - */ - sleepq_lock(&lk->lock_object); - x = lk->lk_lock; - - /* - * if the lock can be acquired in shared mode, try - * again. - */ - if (LK_CAN_SHARE(x, flags)) { - sleepq_release(&lk->lock_object); - continue; - } - - /* - * Try to set the LK_SHARED_WAITERS flag. If we fail, - * loop back and retry. - */ - if ((x & LK_SHARED_WAITERS) == 0) { - if (!atomic_cmpset_acq_ptr(&lk->lk_lock, x, - x | LK_SHARED_WAITERS)) { - sleepq_release(&lk->lock_object); - continue; - } - LOCK_LOG2(lk, "%s: %p set shared waiters flag", - __func__, lk); - } - - /* - * As far as we have been unable to acquire the - * shared lock and the shared waiters flag is set, - * we will sleep. - */ - error = sleeplk(lk, flags, ilk, iwmesg, ipri, itimo, - SQ_SHARED_QUEUE); - flags &= ~LK_INTERLOCK; - if (error) { - LOCK_LOG3(lk, - "%s: interrupted sleep for %p with %d", - __func__, lk, error); - break; - } - LOCK_LOG2(lk, "%s: %p resuming from the sleep queue", - __func__, lk); - } - if (error == 0) { -#ifdef LOCK_PROFILING - lockmgr_note_shared_acquire(lk, contested, waittime, - file, line, flags); -#else - lockmgr_note_shared_acquire(lk, 0, 0, file, line, - flags); -#endif - } + return (lockmgr_slock_hard(lk, flags, ilk, file, line, &lwa)); break; case LK_UPGRADE: case LK_TRYUPGRADE: - _lockmgr_assert(lk, KA_SLOCKED, file, line); - v = lk->lk_lock; - x = v & LK_ALL_WAITERS; - v &= LK_EXCLUSIVE_SPINNERS; - - /* - * Try to switch from one shared lock to an exclusive one. - * We need to preserve waiters flags during the operation. - */ - if (atomic_cmpset_ptr(&lk->lk_lock, LK_SHARERS_LOCK(1) | x | v, - tid | x)) { - LOCK_LOG_LOCK("XUPGRADE", &lk->lock_object, 0, 0, file, - line); - WITNESS_UPGRADE(&lk->lock_object, LOP_EXCLUSIVE | - LK_TRYWIT(flags), file, line); - TD_SLOCKS_DEC(curthread); - break; - } - - /* - * In LK_TRYUPGRADE mode, do not drop the lock, - * returning EBUSY instead. - */ - if (op == LK_TRYUPGRADE) { - LOCK_LOG2(lk, "%s: %p failed the nowait upgrade", - __func__, lk); - error = EBUSY; - break; - } - - /* - * We have been unable to succeed in upgrading, so just - * give up the shared lock. - */ - wakeup_swapper |= wakeupshlk(lk, file, line); - - /* FALLTHROUGH */ + return (lockmgr_upgrade(lk, flags, ilk, file, line, &lwa)); + break; case LK_EXCLUSIVE: - if (LK_CAN_WITNESS(flags)) - WITNESS_CHECKORDER(&lk->lock_object, LOP_NEWORDER | - LOP_EXCLUSIVE, file, line, flags & LK_INTERLOCK ? - ilk : NULL); - - /* - * If curthread already holds the lock and this one is - * allowed to recurse, simply recurse on it. - */ - if (lockmgr_xlocked(lk)) { - if ((flags & LK_CANRECURSE) == 0 && - (lk->lock_object.lo_flags & LO_RECURSABLE) == 0) { - - /* - * If the lock is expected to not panic just - * give up and return. - */ - if (LK_TRYOP(flags)) { - LOCK_LOG2(lk, - "%s: %p fails the try operation", - __func__, lk); - error = EBUSY; - break; - } - if (flags & LK_INTERLOCK) - class->lc_unlock(ilk); - panic("%s: recursing on non recursive lockmgr %s @ %s:%d\n", - __func__, iwmesg, file, line); - } - lk->lk_recurse++; - LOCK_LOG2(lk, "%s: %p recursing", __func__, lk); - LOCK_LOG_LOCK("XLOCK", &lk->lock_object, 0, - lk->lk_recurse, file, line); - WITNESS_LOCK(&lk->lock_object, LOP_EXCLUSIVE | - LK_TRYWIT(flags), file, line); - TD_LOCKS_INC(curthread); - break; - } - - for (;;) { - if (lk->lk_lock == LK_UNLOCKED && - atomic_cmpset_acq_ptr(&lk->lk_lock, LK_UNLOCKED, tid)) - break; -#ifdef HWPMC_HOOKS - PMC_SOFT_CALL( , , lock, failed); -#endif - lock_profile_obtain_lock_failed(&lk->lock_object, - &contested, &waittime); - - /* - * If the lock is expected to not sleep just give up - * and return. - */ - if (LK_TRYOP(flags)) { - LOCK_LOG2(lk, "%s: %p fails the try operation", - __func__, lk); - error = EBUSY; - break; - } - - /* - * Acquire the sleepqueue chain lock because we - * probabilly will need to manipulate waiters flags. - */ - sleepq_lock(&lk->lock_object); - x = lk->lk_lock; - - /* - * if the lock has been released while we spun on - * the sleepqueue chain lock just try again. - */ - if (x == LK_UNLOCKED) { - sleepq_release(&lk->lock_object); - continue; - } - - /* - * The lock can be in the state where there is a - * pending queue of waiters, but still no owner. - * This happens when the lock is contested and an - * owner is going to claim the lock. - * If curthread is the one successfully acquiring it - * claim lock ownership and return, preserving waiters - * flags. - */ - v = x & (LK_ALL_WAITERS | LK_EXCLUSIVE_SPINNERS); - if ((x & ~v) == LK_UNLOCKED) { - v &= ~LK_EXCLUSIVE_SPINNERS; - if (atomic_cmpset_acq_ptr(&lk->lk_lock, x, - tid | v)) { - sleepq_release(&lk->lock_object); - LOCK_LOG2(lk, - "%s: %p claimed by a new writer", - __func__, lk); - break; - } - sleepq_release(&lk->lock_object); - continue; - } - - /* - * Try to set the LK_EXCLUSIVE_WAITERS flag. If we - * fail, loop back and retry. - */ - if ((x & LK_EXCLUSIVE_WAITERS) == 0) { - if (!atomic_cmpset_ptr(&lk->lk_lock, x, - x | LK_EXCLUSIVE_WAITERS)) { - sleepq_release(&lk->lock_object); - continue; - } - LOCK_LOG2(lk, "%s: %p set excl waiters flag", - __func__, lk); - } - - /* - * As far as we have been unable to acquire the - * exclusive lock and the exclusive waiters flag - * is set, we will sleep. - */ - error = sleeplk(lk, flags, ilk, iwmesg, ipri, itimo, - SQ_EXCLUSIVE_QUEUE); - flags &= ~LK_INTERLOCK; - if (error) { - LOCK_LOG3(lk, - "%s: interrupted sleep for %p with %d", - __func__, lk, error); - break; - } - LOCK_LOG2(lk, "%s: %p resuming from the sleep queue", - __func__, lk); - } - if (error == 0) { -#ifdef LOCK_PROFILING - lockmgr_note_exclusive_acquire(lk, contested, waittime, - file, line, flags); -#else - lockmgr_note_exclusive_acquire(lk, 0, 0, file, line, - flags); -#endif - } + return (lockmgr_xlock_hard(lk, flags, ilk, file, line, &lwa)); break; case LK_DOWNGRADE: _lockmgr_assert(lk, KA_XLOCKED, file, line); @@ -1007,103 +1245,11 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lo _lockmgr_assert(lk, KA_LOCKED, file, line); x = lk->lk_lock; - if ((x & LK_SHARE) == 0) { - - /* - * As first option, treact the lock as if it has not - * any waiter. - * Fix-up the tid var if the lock has been disowned. - */ - if (LK_HOLDER(x) == LK_KERNPROC) - tid = LK_KERNPROC; - else { - WITNESS_UNLOCK(&lk->lock_object, LOP_EXCLUSIVE, - file, line); - TD_LOCKS_DEC(curthread); - } - LOCK_LOG_LOCK("XUNLOCK", &lk->lock_object, 0, - lk->lk_recurse, file, line); - - /* - * The lock is held in exclusive mode. - * If the lock is recursed also, then unrecurse it. - */ - if (lockmgr_xlocked(lk) && lockmgr_recursed(lk)) { - LOCK_LOG2(lk, "%s: %p unrecursing", __func__, - lk); - lk->lk_recurse--; - break; - } - if (tid != LK_KERNPROC) - lock_profile_release_lock(&lk->lock_object); - - if (atomic_cmpset_rel_ptr(&lk->lk_lock, tid, - LK_UNLOCKED)) - break; - - sleepq_lock(&lk->lock_object); - x = lk->lk_lock; - v = LK_UNLOCKED; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Mar 4 19:15:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 723C7F2A1CC; Sun, 4 Mar 2018 19:15:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 273F86AA93; Sun, 4 Mar 2018 19:15:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DC12197D9; Sun, 4 Mar 2018 19:15:25 +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 w24JFOwu018278; Sun, 4 Mar 2018 19:15:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24JFOMH018277; Sun, 4 Mar 2018 19:15:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041915.w24JFOMH018277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 19:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330401 - stable/11/sys/compat/linuxkpi/common/src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 330401 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:15:25 -0000 Author: hselasky Date: Sun Mar 4 19:15:24 2018 New Revision: 330401 URL: https://svnweb.freebsd.org/changeset/base/330401 Log: MFC r330236: Correct the return value from flush_work() and flush_delayed_work() in the LinuxKPI to comply more with Linux. This fixes an issue when these functions are used in waiting loops. Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/src/linux_work.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_work.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_work.c Sun Mar 4 19:12:54 2018 (r330400) +++ stable/11/sys/compat/linuxkpi/common/src/linux_work.c Sun Mar 4 19:15:24 2018 (r330401) @@ -454,6 +454,7 @@ bool linux_flush_work(struct work_struct *work) { struct taskqueue *tq; + int retval; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_flush_work() might sleep"); @@ -463,8 +464,9 @@ linux_flush_work(struct work_struct *work) return (0); default: tq = work->work_queue->taskqueue; + retval = taskqueue_poll_is_busy(tq, &work->work_task); taskqueue_drain(tq, &work->work_task); - return (1); + return (retval); } } @@ -477,6 +479,7 @@ bool linux_flush_delayed_work(struct delayed_work *dwork) { struct taskqueue *tq; + int retval; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "linux_flush_delayed_work() might sleep"); @@ -490,8 +493,9 @@ linux_flush_delayed_work(struct delayed_work *dwork) /* FALLTHROUGH */ default: tq = dwork->work.work_queue->taskqueue; + retval = taskqueue_poll_is_busy(tq, &dwork->work.work_task); taskqueue_drain(tq, &dwork->work.work_task); - return (1); + return (retval); } } From owner-svn-src-all@freebsd.org Sun Mar 4 19:15:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 475DFF2A2CB; Sun, 4 Mar 2018 19:15:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA6516ABC3; Sun, 4 Mar 2018 19:15:57 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 932AE2606D0; Sun, 4 Mar 2018 20:15:55 +0100 (CET) Subject: Re: svn commit: r330236 - head/sys/compat/linuxkpi/common/src To: Colin Percival , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803011031.w21AVpNU076475@repo.freebsd.org> <01000161ee9cf3f7-13ba5d11-831e-4a9b-99d7-fd670a35ecb0-000000@email.amazonses.com> From: Hans Petter Selasky Message-ID: <1f719ab8-488c-e541-b0e8-47151aa2d916@selasky.org> Date: Sun, 4 Mar 2018 20:15:53 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <01000161ee9cf3f7-13ba5d11-831e-4a9b-99d7-fd670a35ecb0-000000@email.amazonses.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:15:58 -0000 On 03/04/18 02:25, Colin Percival wrote: > In case the data point is useful: Merging this to stable/11 unbroke S3 > suspend/resume on my laptop (system76 Galago Pro, kabylake, using the > drm-next-kmod port). FYI: Now MFC'ed to stable/11. --HPS From owner-svn-src-all@freebsd.org Sun Mar 4 19:17:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 079A6F2A521; Sun, 4 Mar 2018 19:17:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADBFB6ADC1; Sun, 4 Mar 2018 19:17:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8B60197DB; Sun, 4 Mar 2018 19:17:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24JHWjk018384; Sun, 4 Mar 2018 19:17:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24JHWFk018383; Sun, 4 Mar 2018 19:17:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803041917.w24JHWFk018383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 4 Mar 2018 19:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330402 - stable/11/sys/fs/nullfs X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/fs/nullfs X-SVN-Commit-Revision: 330402 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:17:33 -0000 Author: eadler Date: Sun Mar 4 19:17:32 2018 New Revision: 330402 URL: https://svnweb.freebsd.org/changeset/base/330402 Log: MFC r305504: nullfs: stop special-casing directories in null_vptocnp The previous code was forcing an expensive walk in vop_stdvptocnp, which was causing performance issues on highly contended zfs. Modified: stable/11/sys/fs/nullfs/null_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/11/sys/fs/nullfs/null_vnops.c Sun Mar 4 19:15:24 2018 (r330401) +++ stable/11/sys/fs/nullfs/null_vnops.c Sun Mar 4 19:17:32 2018 (r330402) @@ -870,9 +870,6 @@ null_vptocnp(struct vop_vptocnp_args *ap) struct ucred *cred = ap->a_cred; int error, locked; - if (vp->v_type == VDIR) - return (vop_stdvptocnp(ap)); - locked = VOP_ISLOCKED(vp); lvp = NULLVPTOLOWERVP(vp); vhold(lvp); From owner-svn-src-all@freebsd.org Sun Mar 4 19:20:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04416F2A8A4; Sun, 4 Mar 2018 19:20:12 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABCDC6AFA0; Sun, 4 Mar 2018 19:20:11 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6C13197E5; Sun, 4 Mar 2018 19:20:11 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24JKBN4018535; Sun, 4 Mar 2018 19:20:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24JKBTY018534; Sun, 4 Mar 2018 19:20:11 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803041920.w24JKBTY018534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 19:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330403 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330403 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:20:12 -0000 Author: ian Date: Sun Mar 4 19:20:11 2018 New Revision: 330403 URL: https://svnweb.freebsd.org/changeset/base/330403 Log: Add calls to the new clock_dbgprint_xxx() functions. Modified: head/sys/dev/iicbus/ds1307.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Sun Mar 4 19:17:32 2018 (r330402) +++ head/sys/dev/iicbus/ds1307.c Sun Mar 4 19:20:11 2018 (r330403) @@ -359,6 +359,7 @@ ds1307_gettime(device_t dev, struct timespec *ts) bct.mon = data[DS1307_MONTH] & DS1307_MONTH_MASK; bct.year = data[DS1307_YEAR] & DS1307_YEAR_MASK; + clock_dbgprint_bcd(sc->sc_dev, CLOCK_DBG_READ, &bct); return (clock_bcd_to_ts(&bct, ts, sc->sc_use_ampm)); } @@ -379,6 +380,7 @@ ds1307_settime(device_t dev, struct timespec *ts) */ ts->tv_sec -= utc_offset(); clock_ts_to_bcd(ts, &bct, sc->sc_use_ampm); + clock_dbgprint_bcd(sc->sc_dev, CLOCK_DBG_WRITE, &bct); /* If the chip is in AM/PM mode, adjust hour and set flags as needed. */ if (sc->sc_use_ampm) { From owner-svn-src-all@freebsd.org Sun Mar 4 19:23:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C73AF2B054; Sun, 4 Mar 2018 19:23:49 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 049CE6B571; Sun, 4 Mar 2018 19:23:49 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3D0D19974; Sun, 4 Mar 2018 19:23:48 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24JNmbR023381; Sun, 4 Mar 2018 19:23:48 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24JNmS4023380; Sun, 4 Mar 2018 19:23:48 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803041923.w24JNmS4023380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 19:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330404 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330404 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:23:49 -0000 Author: ian Date: Sun Mar 4 19:23:48 2018 New Revision: 330404 URL: https://svnweb.freebsd.org/changeset/base/330404 Log: Add calls to the new clock_dbgprint_xxx() functions. Modified: head/sys/dev/iicbus/ds13rtc.c Modified: head/sys/dev/iicbus/ds13rtc.c ============================================================================== --- head/sys/dev/iicbus/ds13rtc.c Sun Mar 4 19:20:11 2018 (r330403) +++ head/sys/dev/iicbus/ds13rtc.c Sun Mar 4 19:23:48 2018 (r330404) @@ -395,6 +395,7 @@ ds13rtc_gettime(device_t dev, struct timespec *ts) if (sc->use_century) bct.year += (tregs.month & DS13xx_B_MONTH_CENTURY) ? 0x100 : 0; + clock_dbgprint_bcd(sc->sc_dev, CLOCK_DBG_READ, &bct); err = clock_bcd_to_ts(&bct, ts, sc->use_ampm); return (err); @@ -422,6 +423,7 @@ ds13rtc_settime(device_t dev, struct timespec *ts) return (write_timeword(sc, ts->tv_sec)); clock_ts_to_bcd(ts, &bct, sc->use_ampm); + clock_dbgprint_bcd(sc->sc_dev, CLOCK_DBG_WRITE, &bct); /* If the chip is in AMPM mode deal with the PM flag. */ pmflags = 0; From owner-svn-src-all@freebsd.org Sun Mar 4 19:25:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3887F2B2B4; Sun, 4 Mar 2018 19:25:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75CC56B74E; Sun, 4 Mar 2018 19:25:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E99519978; Sun, 4 Mar 2018 19:25:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24JPsa7023504; Sun, 4 Mar 2018 19:25:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24JPsVB023503; Sun, 4 Mar 2018 19:25:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803041925.w24JPsVB023503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 19:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330405 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:25:55 -0000 Author: ian Date: Sun Mar 4 19:25:54 2018 New Revision: 330405 URL: https://svnweb.freebsd.org/changeset/base/330405 Log: Oops, fix a paste-o. Modified: head/sys/dev/iicbus/ds13rtc.c Modified: head/sys/dev/iicbus/ds13rtc.c ============================================================================== --- head/sys/dev/iicbus/ds13rtc.c Sun Mar 4 19:23:48 2018 (r330404) +++ head/sys/dev/iicbus/ds13rtc.c Sun Mar 4 19:25:54 2018 (r330405) @@ -395,7 +395,7 @@ ds13rtc_gettime(device_t dev, struct timespec *ts) if (sc->use_century) bct.year += (tregs.month & DS13xx_B_MONTH_CENTURY) ? 0x100 : 0; - clock_dbgprint_bcd(sc->sc_dev, CLOCK_DBG_READ, &bct); + clock_dbgprint_bcd(sc->dev, CLOCK_DBG_READ, &bct); err = clock_bcd_to_ts(&bct, ts, sc->use_ampm); return (err); @@ -423,7 +423,7 @@ ds13rtc_settime(device_t dev, struct timespec *ts) return (write_timeword(sc, ts->tv_sec)); clock_ts_to_bcd(ts, &bct, sc->use_ampm); - clock_dbgprint_bcd(sc->sc_dev, CLOCK_DBG_WRITE, &bct); + clock_dbgprint_bcd(sc->dev, CLOCK_DBG_WRITE, &bct); /* If the chip is in AMPM mode deal with the PM flag. */ pmflags = 0; From owner-svn-src-all@freebsd.org Sun Mar 4 19:26:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5925F2B3CB; Sun, 4 Mar 2018 19:26:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84C386B89A; Sun, 4 Mar 2018 19:26:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FB3419979; Sun, 4 Mar 2018 19:26:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24JQldC023579; Sun, 4 Mar 2018 19:26:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24JQl01023578; Sun, 4 Mar 2018 19:26:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803041926.w24JQl01023578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 19:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330406 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330406 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:26:48 -0000 Author: ian Date: Sun Mar 4 19:26:47 2018 New Revision: 330406 URL: https://svnweb.freebsd.org/changeset/base/330406 Log: Add calls to the new clock_dbgprint_xxx() functions. Modified: head/sys/dev/iicbus/nxprtc.c Modified: head/sys/dev/iicbus/nxprtc.c ============================================================================== --- head/sys/dev/iicbus/nxprtc.c Sun Mar 4 19:25:54 2018 (r330405) +++ head/sys/dev/iicbus/nxprtc.c Sun Mar 4 19:26:47 2018 (r330406) @@ -608,6 +608,7 @@ nxprtc_gettime(device_t dev, struct timespec *ts) sc->flags |= SC_F_CPOL; } + clock_dbgprint_bcd(sc->dev, CLOCK_DBG_READ, &bct); err = clock_bcd_to_ts(&bct, ts, sc->use_ampm); ts->tv_sec += utc_offset(); @@ -648,6 +649,7 @@ nxprtc_settime(device_t dev, struct timespec *ts) ts->tv_sec -= utc_offset(); ts->tv_nsec = 0; clock_ts_to_bcd(ts, &bct, sc->use_ampm); + clock_dbgprint_bcd(sc->dev, CLOCK_DBG_WRITE, &bct); /* On 8563 set the century based on the polarity seen when reading. */ cflag = 0; From owner-svn-src-all@freebsd.org Sun Mar 4 19:32:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83FB6F2BC9D; Sun, 4 Mar 2018 19:32:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33DF96BE7E; Sun, 4 Mar 2018 19:32:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2EA8A19B21; Sun, 4 Mar 2018 19:32:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24JWqWY028170; Sun, 4 Mar 2018 19:32:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24JWqei028169; Sun, 4 Mar 2018 19:32:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803041932.w24JWqei028169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 19:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330407 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330407 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:32:53 -0000 Author: ian Date: Sun Mar 4 19:32:52 2018 New Revision: 330407 URL: https://svnweb.freebsd.org/changeset/base/330407 Log: Add calls to the new clock_dbgprint_xxx() functions. Also, stop applying a local .5 second adjustment to the time, since that is now done by the code in subr_rtc.c. Modified: head/sys/dev/iicbus/ds1672.c Modified: head/sys/dev/iicbus/ds1672.c ============================================================================== --- head/sys/dev/iicbus/ds1672.c Sun Mar 4 19:26:47 2018 (r330406) +++ head/sys/dev/iicbus/ds1672.c Sun Mar 4 19:32:52 2018 (r330407) @@ -54,8 +54,6 @@ __FBSDID("$FreeBSD$"); #define DS1672_CTRL_EOSC (1 << 7) /* Stop/start flag. */ -#define NANOSEC 1000000000 - #define MAX_IIC_DATA_SIZE 4 struct ds1672_softc { @@ -144,8 +142,9 @@ ds1672_gettime(device_t dev, struct timespec *ts) /* counter has seconds since epoch */ ts->tv_sec = (secs[3] << 24) | (secs[2] << 16) | (secs[1] << 8) | (secs[0] << 0); - ts->tv_nsec = NANOSEC / 2; + ts->tv_nsec = 0; } + clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_READ, ts); return (error); } @@ -159,6 +158,8 @@ ds1672_settime(device_t dev, struct timespec *ts) data[2] = (ts->tv_sec >> 16) & 0xff; data[3] = (ts->tv_sec >> 24) & 0xff; + ts->tv_nsec = 0; + clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_WRITE, ts); return (ds1672_write(dev, DS1672_COUNTER, data, 4)); } From owner-svn-src-all@freebsd.org Sun Mar 4 19:42:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3AB8F2C92D; Sun, 4 Mar 2018 19:42:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56D2A6C5E2; Sun, 4 Mar 2018 19:42:50 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51C7019CB2; Sun, 4 Mar 2018 19:42:50 +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 w24Jgo5f033225; Sun, 4 Mar 2018 19:42:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24Jgobe033224; Sun, 4 Mar 2018 19:42:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803041942.w24Jgobe033224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 4 Mar 2018 19:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330408 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 19:42:50 -0000 Author: hselasky Date: Sun Mar 4 19:42:50 2018 New Revision: 330408 URL: https://svnweb.freebsd.org/changeset/base/330408 Log: Properly wrap the BUILD_BUG() function macro in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Sun Mar 4 19:32:52 2018 (r330407) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Sun Mar 4 19:42:50 2018 (r330408) @@ -86,7 +86,7 @@ #define S64_C(x) x ## LL #define U64_C(x) x ## ULL -#define BUILD_BUG() CTASSERT(0) +#define BUILD_BUG() do { CTASSERT(0); } while (0) #define BUILD_BUG_ON(x) CTASSERT(!(x)) #define BUILD_BUG_ON_MSG(x, msg) BUILD_BUG_ON(x) #define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x)) From owner-svn-src-all@freebsd.org Sun Mar 4 20:06:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BBA1F2E63E; Sun, 4 Mar 2018 20:06:03 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D50B66D5ED; Sun, 4 Mar 2018 20:06:02 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFF0F19FE8; Sun, 4 Mar 2018 20:06:02 +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 w24K622P043585; Sun, 4 Mar 2018 20:06:02 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24K62Zv043582; Sun, 4 Mar 2018 20:06:02 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803042006.w24K62Zv043582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Sun, 4 Mar 2018 20:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330409 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 330409 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 20:06:03 -0000 Author: brooks Date: Sun Mar 4 20:06:02 2018 New Revision: 330409 URL: https://svnweb.freebsd.org/changeset/base/330409 Log: Refer to SysV IPC permissions as numeric constants. POSIX defines no macros for these permissions. Also remove unneeded headers from synopsis. PR: 225905 Reviewed by: wblock MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14461 Modified: head/lib/libc/sys/msgget.2 head/lib/libc/sys/semget.2 head/lib/libc/sys/shmget.2 Modified: head/lib/libc/sys/msgget.2 ============================================================================== --- head/lib/libc/sys/msgget.2 Sun Mar 4 19:42:50 2018 (r330408) +++ head/lib/libc/sys/msgget.2 Sun Mar 4 20:06:02 2018 (r330409) @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .\"/ -.Dd July 9, 2009 +.Dd March 4, 2018 .Dt MSGGET 2 .Os .Sh NAME @@ -40,8 +40,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/msg.h .Ft int .Fn msgget "key_t key" "int msgflg" @@ -83,7 +81,22 @@ are set to the effective gid of the calling process. .It .Va msg_perm.mode is set to the lower 9 bits of -.Fa msgflg . +.Fa msgflg +which are set by ORing these constants: +.Bl -tag -width 0000 +.It Dv 0400 +Read access for user. +.It Dv 0200 +Write access for user. +.It Dv 0040 +Read access for group. +.It Dv 0020 +Write access for group. +.It Dv 0004 +Read access for other. +.It Dv 0002 +Write access for other. +.El .It .Va msg_cbytes , .Va msg_qnum , Modified: head/lib/libc/sys/semget.2 ============================================================================== --- head/lib/libc/sys/semget.2 Sun Mar 4 19:42:50 2018 (r330408) +++ head/lib/libc/sys/semget.2 Sun Mar 4 20:06:02 2018 (r330409) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2016 +.Dd March 4, 2018 .Dt SEMGET 2 .Os .Sh NAME @@ -34,8 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/sem.h .Ft int .Fn semget "key_t key" "int nsems" "int flag" @@ -77,23 +75,22 @@ may be used to generate a key from a pathname. .\" Likewise for this section, except SHM_* becomes SEM_*. .\" .Pp -The mode of a newly created IPC object is determined by -.Em OR Ns 'ing -the following constants into the +The mode of a newly created IPC object is determined by ORing these constants +into the .Fa flag argument: -.Bl -tag -width XSEM_WXX6XXX -.It Dv SEM_R +.Bl -tag -width 0000 +.It Dv 0400 Read access for user. -.It Dv SEM_A +.It Dv 0200 Alter access for user. -.It Dv ( SEM_R>>3 ) +.It Dv 0040 Read access for group. -.It Dv ( SEM_A>>3 ) +.It Dv 0020 Alter access for group. -.It Dv ( SEM_R>>6 ) +.It Dv 0004 Read access for other. -.It Dv ( SEM_A>>6 ) +.It Dv 0002 Alter access for other. .El .Pp Modified: head/lib/libc/sys/shmget.2 ============================================================================== --- head/lib/libc/sys/shmget.2 Sun Mar 4 19:42:50 2018 (r330408) +++ head/lib/libc/sys/shmget.2 Sun Mar 4 20:06:02 2018 (r330409) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 12, 2017 +.Dd March 4, 2018 .Dt SHMGET 2 .Os .Sh NAME @@ -34,9 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/stat.h -.In sys/ipc.h .In sys/shm.h .Ft int .Fn shmget "key_t key" "size_t size" "int flag" @@ -75,22 +72,21 @@ may be used to generate a key from a pathname. .El .Pp The mode of a newly created IPC object is determined by -.Em OR Ns 'ing -the following constants into the +which are set by ORing these constants into the .Fa flag argument: -.Bl -tag -width XSHM_WXX6XXX -.It Dv S_IRUSR +.Bl -tag -width 0000 +.It Dv 0400 Read access for owner. -.It Dv S_IWUSR +.It Dv 0200 Write access for owner. -.It Dv S_IRGRP +.It Dv 0040 Read access for group. -.It Dv S_IWGRP +.It Dv 0020 Write access for group. -.It Dv S_IROTH +.It Dv 0004 Read access for other. -.It Dv S_IWOTH +.It Dv 0002 Write access for other. .El .\" @@ -143,5 +139,4 @@ already exists. .Xr shmat 2 , .Xr shmctl 2 , .Xr shmdt 2 , -.Xr stat 2 , .Xr ftok 3 From owner-svn-src-all@freebsd.org Sun Mar 4 20:53:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62E35F31AF9; Sun, 4 Mar 2018 20:53:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15D7E6EE75; Sun, 4 Mar 2018 20:53:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F9CB1A7F8; Sun, 4 Mar 2018 20:53:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24KrLkA068077; Sun, 4 Mar 2018 20:53:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24KrKsB068070; Sun, 4 Mar 2018 20:53:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201803042053.w24KrKsB068070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 4 Mar 2018 20:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330410 - in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 riscv/riscv vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 riscv/riscv vm X-SVN-Commit-Revision: 330410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 20:53:21 -0000 Author: kib Date: Sun Mar 4 20:53:20 2018 New Revision: 330410 URL: https://svnweb.freebsd.org/changeset/base/330410 Log: Unify bulk free operations in several pmaps. Submitted by: Yoshihiro Ota Reviewed by: markj MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D13485 Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap-v6.c head/sys/arm64/arm64/pmap.c head/sys/i386/i386/pmap.c head/sys/riscv/riscv/pmap.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Mar 4 20:06:02 2018 (r330409) +++ head/sys/amd64/amd64/pmap.c Sun Mar 4 20:53:20 2018 (r330410) @@ -2369,20 +2369,6 @@ pmap_qremove(vm_offset_t sva, int count) /*************************************************** * Page table page management routines..... ***************************************************/ -static __inline void -pmap_free_zero_pages(struct spglist *free) -{ - vm_page_t m; - int count; - - for (count = 0; (m = SLIST_FIRST(free)) != NULL; count++) { - SLIST_REMOVE_HEAD(free, plinks.s.ss); - /* Preserve the page's PG_ZERO setting. */ - vm_page_free_toq(m); - } - vm_wire_sub(count); -} - /* * Schedule the specified unused page table page to be freed. Specifically, * add the page to the specified list of pages that will be released to the @@ -3282,7 +3268,7 @@ next_chunk: /* Recycle a freed page table page. */ m_pc->wire_count = 1; } - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); return (m_pc); } @@ -3781,7 +3767,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v pmap_remove_pde(pmap, pde, sva, &free, lockp); if ((oldpde & PG_G) == 0) pmap_invalidate_pde_page(pmap, sva, oldpde); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#lx" " in pmap %p", va, pmap); return (FALSE); @@ -4183,7 +4169,7 @@ out: pmap_invalidate_all(pmap); PMAP_UNLOCK(pmap); pmap_delayed_invl_finished(); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); } /* @@ -4281,7 +4267,7 @@ retry: vm_page_aflag_clear(m, PGA_WRITEABLE); rw_wunlock(lock); pmap_delayed_invl_wait(m); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); } /* @@ -4949,7 +4935,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t pmap_invalidate_all(pmap); pmap_delayed_invl_finished(); } - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); if (va >= VM_MAXUSER_ADDRESS) { mt = PHYS_TO_VM_PAGE(*pde & PG_FRAME); if (pmap_insert_pt_page(pmap, mt)) { @@ -4978,7 +4964,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t * pages. Invalidate those entries. */ pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); } CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" " in pmap %p", va, pmap); @@ -5159,7 +5145,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v * pages. Invalidate those entries. */ pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); } mpte = NULL; } @@ -5537,7 +5523,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ */ pmap_invalidate_page(dst_pmap, addr); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, + true); } goto out; } @@ -5955,7 +5942,7 @@ pmap_remove_pages(pmap_t pmap) rw_wunlock(lock); pmap_invalidate_all(pmap); PMAP_UNLOCK(pmap); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); } static boolean_t @@ -6440,7 +6427,7 @@ small_mappings: not_cleared < PMAP_TS_REFERENCED_MAX); out: rw_wunlock(lock); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); return (cleared + not_cleared); } Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sun Mar 4 20:06:02 2018 (r330409) +++ head/sys/arm/arm/pmap-v6.c Sun Mar 4 20:53:20 2018 (r330410) @@ -2550,18 +2550,6 @@ retry: return (m); } -static __inline void -pmap_free_zero_pages(struct spglist *free) -{ - vm_page_t m; - - while ((m = SLIST_FIRST(free)) != NULL) { - SLIST_REMOVE_HEAD(free, plinks.s.ss); - /* Preserve the page's PG_ZERO setting. */ - vm_page_free_toq(m); - } -} - /* * Schedule the specified unused L2 page table page to be freed. Specifically, * add the page to the specified list of pages that will be released to the @@ -2948,7 +2936,7 @@ out: m_pc->wire_count = 1; vm_wire_add(1); } - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); return (m_pc); } @@ -3711,7 +3699,7 @@ pmap_demote_pte1(pmap_t pmap, pt1_entry_t *pte1p, vm_o VM_ALLOC_NORMAL | VM_ALLOC_WIRED)) == NULL) { SLIST_INIT(&free); pmap_remove_pte1(pmap, pte1p, pte1_trunc(va), &free); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); CTR3(KTR_PMAP, "%s: failure for va %#x in pmap %p", __func__, va, pmap); return (FALSE); @@ -4235,7 +4223,7 @@ out: sched_unpin(); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } /* @@ -4309,7 +4297,7 @@ small_mappings: vm_page_aflag_clear(m, PGA_WRITEABLE); sched_unpin(); rw_wunlock(&pvh_global_lock); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } /* @@ -4496,7 +4484,7 @@ pmap_remove_pages(pmap_t pmap) sched_unpin(); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } /* @@ -4605,7 +4593,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v SLIST_INIT(&free); if (pmap_unwire_pt2(pmap, va, mpt2pg, &free)) { pmap_tlb_flush(pmap, va); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } mpt2pg = NULL; @@ -6079,7 +6067,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ if (pmap_unwire_pt2(dst_pmap, addr, dst_mpt2pg, &free)) { pmap_tlb_flush(dst_pmap, addr); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, + false); } goto out; } Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Sun Mar 4 20:06:02 2018 (r330409) +++ head/sys/arm64/arm64/pmap.c Sun Mar 4 20:53:20 2018 (r330410) @@ -1266,18 +1266,6 @@ pmap_qremove(vm_offset_t sva, int count) /*************************************************** * Page table page management routines..... ***************************************************/ -static __inline void -pmap_free_zero_pages(struct spglist *free) -{ - vm_page_t m; - - while ((m = SLIST_FIRST(free)) != NULL) { - SLIST_REMOVE_HEAD(free, plinks.s.ss); - /* Preserve the page's PG_ZERO setting. */ - vm_page_free_toq(m); - } -} - /* * Schedule the specified unused page table page to be freed. Specifically, * add the page to the specified list of pages that will be released to the @@ -1909,7 +1897,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l m_pc->wire_count = 1; vm_wire_add(1); } - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); return (m_pc); } @@ -2417,7 +2405,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t if (lock != NULL) rw_wunlock(lock); PMAP_UNLOCK(pmap); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } /* @@ -2522,7 +2510,7 @@ retry: } vm_page_aflag_clear(m, PGA_WRITEABLE); rw_wunlock(lock); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } /* @@ -3230,7 +3218,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v SLIST_INIT(&free); if (pmap_unwire_l3(pmap, va, mpte, &free)) { pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } mpte = NULL; } @@ -3750,7 +3738,7 @@ pmap_remove_pages(pmap_t pmap) if (lock != NULL) rw_wunlock(lock); PMAP_UNLOCK(pmap); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } /* @@ -4211,7 +4199,7 @@ small_mappings: not_cleared < PMAP_TS_REFERENCED_MAX); out: rw_wunlock(lock); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); return (cleared + not_cleared); } Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Mar 4 20:06:02 2018 (r330409) +++ head/sys/i386/i386/pmap.c Sun Mar 4 20:53:20 2018 (r330410) @@ -1711,20 +1711,6 @@ pmap_qremove(vm_offset_t sva, int count) /*************************************************** * Page table page management routines..... ***************************************************/ -static __inline void -pmap_free_zero_pages(struct spglist *free) -{ - vm_page_t m; - int count; - - for (count = 0; (m = SLIST_FIRST(free)) != NULL; count++) { - SLIST_REMOVE_HEAD(free, plinks.s.ss); - /* Preserve the page's PG_ZERO setting. */ - vm_page_free_toq(m); - } - vm_wire_sub(count); -} - /* * Schedule the specified unused page table page to be freed. Specifically, * add the page to the specified list of pages that will be released to the @@ -2324,7 +2310,7 @@ out: /* Recycle a freed page table page. */ m_pc->wire_count = 1; } - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); return (m_pc); } @@ -2674,7 +2660,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offse pmap_remove_pde(pmap, pde, sva, &free); if ((oldpde & PG_G) == 0) pmap_invalidate_pde_page(pmap, sva, oldpde); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#x" " in pmap %p", va, pmap); return (FALSE); @@ -3044,7 +3030,7 @@ out: pmap_invalidate_all(pmap); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); } /* @@ -3118,7 +3104,7 @@ small_mappings: vm_page_aflag_clear(m, PGA_WRITEABLE); sched_unpin(); rw_wunlock(&pvh_global_lock); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); } /* @@ -3886,7 +3872,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v SLIST_INIT(&free); if (pmap_unwire_ptp(pmap, mpte, &free)) { pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); } mpte = NULL; @@ -4201,7 +4187,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ &free)) { pmap_invalidate_page(dst_pmap, addr); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, + true); } goto out; } @@ -4619,7 +4606,7 @@ pmap_remove_pages(pmap_t pmap) pmap_invalidate_all(pmap); rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, true); } /* Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Sun Mar 4 20:06:02 2018 (r330409) +++ head/sys/riscv/riscv/pmap.c Sun Mar 4 20:53:20 2018 (r330410) @@ -1069,18 +1069,6 @@ pmap_qremove(vm_offset_t sva, int count) /*************************************************** * Page table page management routines..... ***************************************************/ -static __inline void -pmap_free_zero_pages(struct spglist *free) -{ - vm_page_t m; - - while ((m = SLIST_FIRST(free)) != NULL) { - SLIST_REMOVE_HEAD(free, plinks.s.ss); - /* Preserve the page's PG_ZERO setting. */ - vm_page_free_toq(m); - } -} - /* * Schedule the specified unused page table page to be freed. Specifically, * add the page to the specified list of pages that will be released to the @@ -1876,7 +1864,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t rw_wunlock(lock); rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } /* @@ -1942,7 +1930,7 @@ pmap_remove_all(vm_page_t m) } vm_page_aflag_clear(m, PGA_WRITEABLE); rw_wunlock(&pvh_global_lock); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } /* @@ -2377,7 +2365,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v SLIST_INIT(&free); if (pmap_unwire_l3(pmap, va, mpte, &free)) { pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } mpte = NULL; } @@ -2783,7 +2771,7 @@ pmap_remove_pages(pmap_t pmap) rw_wunlock(lock); rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); } /* @@ -3085,7 +3073,7 @@ retry: out: rw_wunlock(lock); rw_runlock(&pvh_global_lock); - pmap_free_zero_pages(&free); + vm_page_free_pages_toq(&free, false); return (cleared + not_cleared); } Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Mar 4 20:06:02 2018 (r330409) +++ head/sys/vm/vm_page.c Sun Mar 4 20:53:20 2018 (r330410) @@ -2538,17 +2538,7 @@ unlock: } if (m_mtx != NULL) mtx_unlock(m_mtx); - if ((m = SLIST_FIRST(&free)) != NULL) { - vmd = VM_DOMAIN(domain); - vm_domain_free_lock(vmd); - do { - MPASS(vm_phys_domain(m) == domain); - SLIST_REMOVE_HEAD(&free, plinks.s.ss); - vm_page_free_phys(vmd, m); - } while ((m = SLIST_FIRST(&free)) != NULL); - vm_domain_free_wakeup(vmd); - vm_domain_free_unlock(vmd); - } + vm_page_free_pages_toq(&free, false); return (error); } @@ -3248,7 +3238,42 @@ vm_page_free_toq(vm_page_t m) } /* - * vm_page_wire: + * vm_page_free_pages_toq: + * + * Returns a list of pages to the free list, disassociating it + * from any VM object. In other words, this is equivalent to + * calling vm_page_free_toq() for each page of a list of VM objects. + * + * The objects must be locked. The pages must be locked if it is + * managed. + */ +void +vm_page_free_pages_toq(struct spglist *free, bool update_wire_count) +{ + vm_page_t m; + struct pglist pgl; + int count; + + if (SLIST_EMPTY(free)) + return; + + count = 0; + TAILQ_INIT(&pgl); + while ((m = SLIST_FIRST(free)) != NULL) { + count++; + SLIST_REMOVE_HEAD(free, plinks.s.ss); + if (vm_page_free_prep(m, false)) + TAILQ_INSERT_TAIL(&pgl, m, listq); + } + + vm_page_free_phys_pglist(&pgl); + + if (update_wire_count && count > 0) + vm_wire_sub(count); +} + +/* + * vm_page_wire: * * Mark this page as wired down. If the page is fictitious, then * its wire count must remain one. Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Sun Mar 4 20:06:02 2018 (r330409) +++ head/sys/vm/vm_page.h Sun Mar 4 20:53:20 2018 (r330410) @@ -535,6 +535,7 @@ void vm_page_test_dirty (vm_page_t); vm_page_bits_t vm_page_bits(int base, int size); void vm_page_zero_invalid(vm_page_t m, boolean_t setvalid); void vm_page_free_toq(vm_page_t m); +void vm_page_free_pages_toq(struct spglist *free, bool update_wire_count); void vm_page_dirty_KBI(vm_page_t m); void vm_page_lock_KBI(vm_page_t m, const char *file, int line); From owner-svn-src-all@freebsd.org Sun Mar 4 21:04:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56FA7F32E4C; Sun, 4 Mar 2018 21:04:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C71A6FBC8; Sun, 4 Mar 2018 21:04:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1FBC1A992; Sun, 4 Mar 2018 21:04:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24L4UXQ073088; Sun, 4 Mar 2018 21:04:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24L4UmG073087; Sun, 4 Mar 2018 21:04:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803042104.w24L4UmG073087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 21:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330411 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 21:04:31 -0000 Author: ian Date: Sun Mar 4 21:04:30 2018 New Revision: 330411 URL: https://svnweb.freebsd.org/changeset/base/330411 Log: Convert to the new(ish) bcd_clocktime conversion functions, add calls to the new debug output functions, and when setting the clock, propagate the timespec nsecs to the 1/100ths register. Modified: head/sys/dev/iicbus/rtc8583.c Modified: head/sys/dev/iicbus/rtc8583.c ============================================================================== --- head/sys/dev/iicbus/rtc8583.c Sun Mar 4 20:53:20 2018 (r330410) +++ head/sys/dev/iicbus/rtc8583.c Sun Mar 4 21:04:30 2018 (r330411) @@ -190,7 +190,7 @@ static int rtc8583_gettime(device_t dev, struct timespec *ts) { struct rtc8583_softc *sc; - struct clocktime ct; + struct bcd_clocktime bct; struct time_regs tregs; uint8_t y, ytmp, sreg; int err; @@ -227,42 +227,49 @@ rtc8583_gettime(device_t dev, struct timespec *ts) iicbus_release_bus(sc->busdev, sc->dev); } - ct.nsec = FROMBCD(tregs.msec) * 10 * 1000 * 1000; - ct.sec = FROMBCD(tregs.sec); - ct.min = FROMBCD(tregs.min); - ct.hour = FROMBCD(tregs.hour & 0x3f); - ct.day = FROMBCD(tregs.day & 0x3f); - ct.mon = FROMBCD(tregs.month & 0x1f); - ct.year = 2000 + sreg; + if (!validbcd(tregs.msec)) + return (EINVAL); - return (clock_ct_to_ts(&ct, ts)); + /* The 'msec' reg is actually 1/100ths, in bcd. */ + bct.nsec = bcd2bin(tregs.msec) * 10 * 1000 * 1000; + bct.sec = tregs.sec; + bct.min = tregs.min; + bct.hour = tregs.hour & 0x3f; + bct.day = tregs.day & 0x3f; + bct.mon = tregs.month & 0x1f; + bct.year = (bin2bcd(sreg / 100) << 8) | bin2bcd(sreg % 100); + + clock_dbgprint_bcd(sc->dev, CLOCK_DBG_READ, &bct); + return (clock_bcd_to_ts(&bct, ts, false)); } static int rtc8583_settime(device_t dev, struct timespec *ts) { struct rtc8583_softc *sc; - struct clocktime ct; + struct bcd_clocktime bct; struct time_regs tregs; uint8_t sreg; int err; sc = device_get_softc(dev); ts->tv_sec -= utc_offset(); - ts->tv_nsec = 0; - clock_ts_to_ct(ts, &ct); + clock_ts_to_bcd(ts, &bct, false); + clock_dbgprint_bcd(sc->dev, CLOCK_DBG_WRITE, &bct); - tregs.sec = TOBCD(ct.sec); - tregs.min = TOBCD(ct.min); - tregs.hour = TOBCD(ct.hour); - tregs.day = TOBCD(ct.day) | ((ct.year & 0x03) << 6); - tregs.month = TOBCD(ct.mon); + /* The 'msec' reg is actually 1/100ths, in bcd. */ + tregs.msec = bin2bcd(ts->tv_nsec / (10 * 1000 * 1000)); + tregs.sec = bct.sec; + tregs.min = bct.min; + tregs.hour = bct.hour; + tregs.day = bct.day | (bct.year & 0x03 << 6); + tregs.month = bct.mon; if ((err = iicbus_request_bus(sc->busdev, sc->dev, IIC_WAIT)) != 0) return (err); err = rtc8583_writeto(sc->dev, RTC8583_SC_REG, &tregs, sizeof(tregs), IIC_WAIT); - sreg = ct.year - 2000; + sreg = bcd2bin(bct.year & 0xff) + 100 * bcd2bin(bct.year >> 8); /* save to year to sram */ rtc8583_write1(sc, RTC8583_USERSRAM_REG, sreg); iicbus_release_bus(sc->busdev, sc->dev); From owner-svn-src-all@freebsd.org Sun Mar 4 21:06:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E9E7F331FA; Sun, 4 Mar 2018 21:06:22 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 017136FF3A; Sun, 4 Mar 2018 21:06:22 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC69D1A993; Sun, 4 Mar 2018 21:06:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24L6LgF073194; Sun, 4 Mar 2018 21:06:21 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24L6Lqe073191; Sun, 4 Mar 2018 21:06:21 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803042106.w24L6Lqe073191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 21:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330412 - in head/sys/modules/i2c: . rtc8583 X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys/modules/i2c: . rtc8583 X-SVN-Commit-Revision: 330412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 21:06:22 -0000 Author: ian Date: Sun Mar 4 21:06:21 2018 New Revision: 330412 URL: https://svnweb.freebsd.org/changeset/base/330412 Log: Build iicbus/rtc8583 as a module. Added: head/sys/modules/i2c/rtc8583/ head/sys/modules/i2c/rtc8583/Makefile (contents, props changed) Modified: head/sys/modules/i2c/Makefile Modified: head/sys/modules/i2c/Makefile ============================================================================== --- head/sys/modules/i2c/Makefile Sun Mar 4 21:04:30 2018 (r330411) +++ head/sys/modules/i2c/Makefile Sun Mar 4 21:06:21 2018 (r330412) @@ -17,6 +17,7 @@ SUBDIR = \ jedec_dimm \ jedec_ts \ nxprtc \ + rtc8583 \ s35390a \ smb \ smbus \ Added: head/sys/modules/i2c/rtc8583/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/i2c/rtc8583/Makefile Sun Mar 4 21:06:21 2018 (r330412) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus +KMOD = rtc8583 +SRCS = rtc8583.c + +# Generated files... +SRCS+= \ + bus_if.h \ + clock_if.h \ + device_if.h \ + iicbus_if.h \ + opt_platform.h \ + +.if !empty(OPT_FDT) +SRCS+= ofw_bus_if.h +.endif + +.include From owner-svn-src-all@freebsd.org Sun Mar 4 21:15:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FEF7F34070; Sun, 4 Mar 2018 21:15:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19AEE708C3; Sun, 4 Mar 2018 21:15:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 148921AB26; Sun, 4 Mar 2018 21:15:32 +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 w24LFVF3078135; Sun, 4 Mar 2018 21:15:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24LFVjN078134; Sun, 4 Mar 2018 21:15:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201803042115.w24LFVjN078134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 4 Mar 2018 21:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330413 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 330413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 21:15:32 -0000 Author: kib Date: Sun Mar 4 21:15:31 2018 New Revision: 330413 URL: https://svnweb.freebsd.org/changeset/base/330413 Log: Remove redundant test from r330410. If the input slist is non-empty, counter cannot be zero after freeing. Noted by: mjg MFC after: 2 weeks Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Mar 4 21:06:21 2018 (r330412) +++ head/sys/vm/vm_page.c Sun Mar 4 21:15:31 2018 (r330413) @@ -3268,7 +3268,7 @@ vm_page_free_pages_toq(struct spglist *free, bool upda vm_page_free_phys_pglist(&pgl); - if (update_wire_count && count > 0) + if (update_wire_count) vm_wire_sub(count); } From owner-svn-src-all@freebsd.org Sun Mar 4 21:38:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB421F35C3E; Sun, 4 Mar 2018 21:38:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 818E8715B4; Sun, 4 Mar 2018 21:38:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C4F71AE6C; Sun, 4 Mar 2018 21:38:31 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24LcVUJ088122; Sun, 4 Mar 2018 21:38:31 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24LcVAa088120; Sun, 4 Mar 2018 21:38:31 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201803042138.w24LcVAa088120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 4 Mar 2018 21:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330414 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 21:38:32 -0000 Author: mjg Date: Sun Mar 4 21:38:30 2018 New Revision: 330414 URL: https://svnweb.freebsd.org/changeset/base/330414 Log: locks: fix a corner case in r327399 If there were exactly rowner_retries/asx_retries (by default: 10) transitions between read and write state and the waiters still did not get the lock, the next owner -> reader transition would result in the code correctly falling back to turnstile/sleepq where it would incorrectly think it was waiting for a writer and decide to leave turnstile/sleepq to loop back. From this point it would take ts/sq trips until the lock gets released. The bug sometimes manifested itself in stalls during -j 128 package builds. Refactor the code to fix the bug, while here remove some of the gratituous differences between rw and sx locks. Modified: head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sun Mar 4 21:15:31 2018 (r330413) +++ head/sys/kern/kern_rwlock.c Sun Mar 4 21:38:30 2018 (r330414) @@ -875,7 +875,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC #ifdef ADAPTIVE_RWLOCKS int spintries = 0; int i, n; - int sleep_reason = 0; + enum { READERS, WRITER } sleep_reason; #endif uintptr_t x; #ifdef LOCK_PROFILING @@ -956,9 +956,11 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC * running on another CPU, spin until the owner stops * running or the state of the lock changes. */ - sleep_reason = 1; - owner = lv_rw_wowner(v); - if (!(v & RW_LOCK_READ) && TD_IS_RUNNING(owner)) { + if (!(v & RW_LOCK_READ)) { + sleep_reason = WRITER; + owner = lv_rw_wowner(v); + if (!TD_IS_RUNNING(owner)) + goto ts; if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); @@ -973,9 +975,10 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); continue; - } - if ((v & RW_LOCK_READ) && RW_READERS(v) && - spintries < rowner_retries) { + } else if (RW_READERS(v) > 0) { + sleep_reason = READERS; + if (spintries == rowner_retries) + goto ts; if (!(v & RW_LOCK_WRITE_SPINNER)) { if (!atomic_fcmpset_ptr(&rw->rw_lock, &v, v | RW_LOCK_WRITE_SPINNER)) { @@ -993,15 +996,15 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC if ((v & RW_LOCK_WRITE_SPINNER) == 0) break; } - KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), - "running"); #ifdef KDTRACE_HOOKS - lda.spin_cnt += rowner_loops - i; + lda.spin_cnt += i; #endif + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); if (i < rowner_loops) continue; - sleep_reason = 2; } +ts: #endif ts = turnstile_trywait(&rw->lock_object); v = RW_READ_VALUE(rw); @@ -1021,7 +1024,7 @@ retry_ts: turnstile_cancel(ts); continue; } - } else if (RW_READERS(v) > 0 && sleep_reason == 1) { + } else if (RW_READERS(v) > 0 && sleep_reason == WRITER) { turnstile_cancel(ts); continue; } Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Mar 4 21:15:31 2018 (r330413) +++ head/sys/kern/kern_sx.c Sun Mar 4 21:38:30 2018 (r330414) @@ -533,8 +533,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO #ifdef ADAPTIVE_SX volatile struct thread *owner; u_int i, n, spintries = 0; + enum { READERS, WRITER } sleep_reason; bool adaptive; - int sleep_reason = 0; #endif #ifdef LOCK_PROFILING uint64_t waittime = 0; @@ -628,37 +628,33 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO * running or the state of the lock changes. */ if ((x & SX_LOCK_SHARED) == 0) { + sleep_reason = WRITER; owner = lv_sx_owner(x); - if (TD_IS_RUNNING(owner)) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR3(KTR_LOCK, - "%s: spinning on %p held by %p", - __func__, sx, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", - sx->lock_object.lo_name); - do { - lock_delay(&lda); - x = SX_READ_VALUE(sx); - owner = lv_sx_owner(x); - } while (owner != NULL && - TD_IS_RUNNING(owner)); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); - continue; - } - sleep_reason = 1; - } else if (SX_SHARERS(x) && spintries < asx_retries) { - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", sx->lock_object.lo_name); + if (!TD_IS_RUNNING(owner)) + goto sleepq; + if (LOCK_LOG_TEST(&sx->lock_object, 0)) + CTR3(KTR_LOCK, "%s: spinning on %p held by %p", + __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + sx->lock_object.lo_name); + do { + lock_delay(&lda); + x = SX_READ_VALUE(sx); + owner = lv_sx_owner(x); + } while (owner != NULL && TD_IS_RUNNING(owner)); + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); + continue; + } else if (SX_SHARERS(x) > 0) { + sleep_reason = READERS; + if (spintries == asx_retries) + goto sleepq; spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + sx->lock_object.lo_name); for (i = 0; i < asx_loops; i += n) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR4(KTR_LOCK, - "%s: shared spinning on %p with %u and %u", - __func__, sx, spintries, i); n = SX_SHARERS(x); lock_delay_spin(n); x = SX_READ_VALUE(sx); @@ -669,11 +665,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO #ifdef KDTRACE_HOOKS lda.spin_cnt += i; #endif - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); if (i < asx_loops) continue; - sleep_reason = 2; } sleepq: #endif @@ -705,7 +700,7 @@ retry_sleepq: sleepq_release(&sx->lock_object); continue; } - } else if (SX_SHARERS(x) > 0 && sleep_reason == 1) { + } else if (SX_SHARERS(x) > 0 && sleep_reason == WRITER) { sleepq_release(&sx->lock_object); continue; } From owner-svn-src-all@freebsd.org Sun Mar 4 21:41:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A69BF36009; Sun, 4 Mar 2018 21:41:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D67C71982; Sun, 4 Mar 2018 21:41:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 172FF1AF8D; Sun, 4 Mar 2018 21:41:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24Lf57C091926; Sun, 4 Mar 2018 21:41:05 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24Lf59C091925; Sun, 4 Mar 2018 21:41:05 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201803042141.w24Lf59C091925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 4 Mar 2018 21:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330415 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 21:41:06 -0000 Author: mjg Date: Sun Mar 4 21:41:05 2018 New Revision: 330415 URL: https://svnweb.freebsd.org/changeset/base/330415 Log: sx: don't do an atomic op in upgrade if it cananot succeed The code already pays the cost of reading the lock to obtain the waiters flag. Checking whether there is more than one reader is not a problem and avoids dirtying the line. This also fixes a small corner case: if waiters were to show up between reading the flag and upgrading the lock, the operation would fail even though it should not. No correctness change here though. Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Mar 4 21:38:30 2018 (r330414) +++ head/sys/kern/kern_sx.c Sun Mar 4 21:41:05 2018 (r330415) @@ -413,6 +413,7 @@ int sx_try_upgrade_int(struct sx *sx LOCK_FILE_LINE_ARG_DEF) { uintptr_t x; + uintptr_t waiters; int success; if (SCHEDULER_STOPPED()) @@ -427,9 +428,18 @@ sx_try_upgrade_int(struct sx *sx LOCK_FILE_LINE_ARG_DE * to maintain the SX_LOCK_EXCLUSIVE_WAITERS flag if set so that * we will wake up the exclusive waiters when we drop the lock. */ - x = sx->sx_lock & SX_LOCK_EXCLUSIVE_WAITERS; - success = atomic_cmpset_acq_ptr(&sx->sx_lock, SX_SHARERS_LOCK(1) | x, - (uintptr_t)curthread | x); + success = 0; + x = SX_READ_VALUE(sx); + for (;;) { + if (SX_SHARERS(x) > 1) + break; + waiters = (x & SX_LOCK_EXCLUSIVE_WAITERS); + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, + (uintptr_t)curthread | waiters)) { + success = 1; + break; + } + } LOCK_LOG_TRY("XUPGRADE", &sx->lock_object, 0, success, file, line); if (success) { WITNESS_UPGRADE(&sx->lock_object, LOP_EXCLUSIVE | LOP_TRYLOCK, From owner-svn-src-all@freebsd.org Sun Mar 4 21:58:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADA72F375B8; Sun, 4 Mar 2018 21:58:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 610E972381; Sun, 4 Mar 2018 21:58:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5BE0C1B18E; Sun, 4 Mar 2018 21:58:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24LwWJM098201; Sun, 4 Mar 2018 21:58:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24LwWO5098200; Sun, 4 Mar 2018 21:58:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803042158.w24LwWO5098200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 21:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330416 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 21:58:32 -0000 Author: ian Date: Sun Mar 4 21:58:32 2018 New Revision: 330416 URL: https://svnweb.freebsd.org/changeset/base/330416 Log: The year is stored in a single byte in sram, in binary format, as a count of years since the century, so strip the century out when converting to or from bcd_clocktime format (the conversion routines will infer century by pivoting on 70). Modified: head/sys/dev/iicbus/rtc8583.c Modified: head/sys/dev/iicbus/rtc8583.c ============================================================================== --- head/sys/dev/iicbus/rtc8583.c Sun Mar 4 21:41:05 2018 (r330415) +++ head/sys/dev/iicbus/rtc8583.c Sun Mar 4 21:58:32 2018 (r330416) @@ -237,7 +237,7 @@ rtc8583_gettime(device_t dev, struct timespec *ts) bct.hour = tregs.hour & 0x3f; bct.day = tregs.day & 0x3f; bct.mon = tregs.month & 0x1f; - bct.year = (bin2bcd(sreg / 100) << 8) | bin2bcd(sreg % 100); + bct.year = bin2bcd(sreg % 100); clock_dbgprint_bcd(sc->dev, CLOCK_DBG_READ, &bct); return (clock_bcd_to_ts(&bct, ts, false)); @@ -269,7 +269,7 @@ rtc8583_settime(device_t dev, struct timespec *ts) return (err); err = rtc8583_writeto(sc->dev, RTC8583_SC_REG, &tregs, sizeof(tregs), IIC_WAIT); - sreg = bcd2bin(bct.year & 0xff) + 100 * bcd2bin(bct.year >> 8); + sreg = bcd2bin(bct.year & 0xff); /* save to year to sram */ rtc8583_write1(sc, RTC8583_USERSRAM_REG, sreg); iicbus_release_bus(sc->busdev, sc->dev); From owner-svn-src-all@freebsd.org Sun Mar 4 21:58:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F670F3763E; Sun, 4 Mar 2018 21:58:56 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32157724B8; Sun, 4 Mar 2018 21:58:56 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C81C1B18F; Sun, 4 Mar 2018 21:58:56 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24LwuK3098260; Sun, 4 Mar 2018 21:58:56 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24LwugV098258; Sun, 4 Mar 2018 21:58:56 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201803042158.w24LwugV098258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 4 Mar 2018 21:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330417 - stable/11/share/vt/fonts X-SVN-Group: stable-11 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/11/share/vt/fonts X-SVN-Commit-Revision: 330417 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 21:58:57 -0000 Author: cperciva Date: Sun Mar 4 21:58:55 2018 New Revision: 330417 URL: https://svnweb.freebsd.org/changeset/base/330417 Log: MFC r320367: Add "Terminus BSD Console" size 32 Added: stable/11/share/vt/fonts/terminus-b32.hex - copied unchanged from r320367, head/share/vt/fonts/terminus-b32.hex Modified: stable/11/share/vt/fonts/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/vt/fonts/Makefile ============================================================================== --- stable/11/share/vt/fonts/Makefile Sun Mar 4 21:58:32 2018 (r330416) +++ stable/11/share/vt/fonts/Makefile Sun Mar 4 21:58:55 2018 (r330417) @@ -1,6 +1,7 @@ # $FreeBSD$ FILES= gallant.fnt \ + terminus-b32.fnt \ vgarom-8x8.fnt \ vgarom-8x14.fnt \ vgarom-8x16.fnt \ Copied: stable/11/share/vt/fonts/terminus-b32.hex (from r320367, head/share/vt/fonts/terminus-b32.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/vt/fonts/terminus-b32.hex Sun Mar 4 21:58:55 2018 (r330417, copy of r320367, head/share/vt/fonts/terminus-b32.hex) @@ -0,0 +1,1294 @@ +# $FreeBSD$ +# Height: 32 +# Width: 16 +0000:0000000000000000000000003C3C3C3C300C300C300C000000000000300C300C300C300C000000000000300C300C300C3C3C3C3C000000000000000000000000 +0020:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0021:00000000000000000000000001800180018001800180018001800180018001800180018001800000000000000180018001800180000000000000000000000000 +0022:00000000000000000C300C300C300C300C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0023:0000000000000000000000000C300C300C300C300C303FFC3FFC0C300C300C300C300C300C303FFC3FFC0C300C300C300C300C30000000000000000000000000 +0024:00000000000000000180018001800FF01FF8399C318C31803180318039801FF00FF8019C018C018C018C318C399C1FF80FF00180018001800000000000000000 +0025:0000000000000000000000001E183F18333033303F601E6000C000C00180018003000300060006000CF00DF81998199831F830F0000000000000000000000000 +0026:0000000000000000000000000F801FC038E030603060306038E01DC00F800F001F8C39DC70F8607060306030607070F83FDC1F8C000000000000000000000000 +0027:00000000000000000180018001800180018001800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0028:000000000000000000000000006000E001C00380030007000600060006000600060006000600060007000300038001C000E00060000000000000000000000000 +0029:00000000000000000000000006000700038001C000C000E00060006000600060006000600060006000E000C001C0038007000600000000000000000000000000 +002A:000000000000000000000000000000000000000038381C700EE007C003807FFC7FFC038007C00EE01C7038380000000000000000000000000000000000000000 +002B:0000000000000000000000000000000000000000018001800180018001803FFC3FFC018001800180018001800000000000000000000000000000000000000000 +002C:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180018001800380030006000000000000000000 +002D:0000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000000000000000000000000000000000000000000000000000 +002E:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180018001800180000000000000000000000000 +002F:00000000000000000000000000180018003000300060006000C000C00180018003000300060006000C000C001800180030003000000000000000000000000000 +0030:0000000000000000000000000FF01FF8381C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C381C1FF80FF0000000000000000000000000 +0031:0000000000000000000000000180038007800F800D8001800180018001800180018001800180018001800180018001800FF00FF0000000000000000000000000 +0032:0000000000000000000000000FF01FF8381C300C300C300C300C000C001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +0033:0000000000000000000000000FF01FF8381C300C300C000C000C000C001C07F807F8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0034:000000000000000000000000000C001C003C007C00EC01CC038C070C0E0C1C0C380C300C300C3FFC3FFC000C000C000C000C000C000000000000000000000000 +0035:0000000000000000000000003FFC3FFC3000300030003000300030003FF03FF8001C000C000C000C000C000C300C380C1FF80FF0000000000000000000000000 +0036:0000000000000000000000000FF81FF83800300030003000300030003FF03FF8301C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0037:0000000000000000000000003FFC3FFC300C300C300C30180018003000300060006000C000C00180018001800180018001800180000000000000000000000000 +0038:0000000000000000000000000FF01FF8381C300C300C300C300C300C381C1FF81FF8381C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0039:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +003A:00000000000000000000000000000000000000000000000001800180018001800000000000000000000000000180018001800180000000000000000000000000 +003B:00000000000000000000000000000000000000000000000001800180018001800000000000000000000000000180018001800380030006000000000000000000 +003C:000000000000000000000000001C0038007000E001C0038007000E001C00380038001C000E000700038001C000E000700038001C000000000000000000000000 +003D:0000000000000000000000000000000000000000000000003FFC3FFC00000000000000003FFC3FFC000000000000000000000000000000000000000000000000 +003E:00000000000000000000000038001C000E000700038001C000E000700038001C001C0038007000E001C0038007000E001C003800000000000000000000000000 +003F:0000000000000000000000000FF01FF8381C300C300C300C300C001C0038007000E001C001800180000000000180018001800180000000000000000000000000 +0040:0000000000000000000000001FF03FF8701C600C61FC63FC670C660C660C660C660C660C660C671C63FC61EC600070003FFC1FFC000000000000000000000000 +0041:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0042:0000000000000000000000003FF03FF8301C300C300C300C300C30183FF03FF03038301C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0043:0000000000000000000000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +0044:0000000000000000000000003FC03FF030383018300C300C300C300C300C300C300C300C300C300C300C300C301830383FF03FC0000000000000000000000000 +0045:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0046:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE0300030003000300030003000300030003000000000000000000000000000 +0047:0000000000000000000000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0048:000000000000000000000000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +0049:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +004A:000000000000000000000000007E007E00180018001800180018001800180018001800180018001830183018301838381FF00FE0000000000000000000000000 +004B:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +004C:0000000000000000000000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000000000000000000000000 +004D:000000000000000000000000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000000000000000000000000 +004E:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +004F:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0050:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF030003000300030003000300030003000000000000000000000000000 +0051:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C31CC38FC1FF80FF8001C000E0000000000000000 +0052:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03700338031C030E030703038301C300C000000000000000000000000 +0053:0000000000000000000000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0054:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +0055:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0056:000000000000000000000000300C300C300C300C300C181818181818181818180C300C300C300C3006600660066003C003C003C0000000000000000000000000 +0057:000000000000000000000000600C600C600C600C600C600C600C600C600C600C610C638C638C67CC6C6C6C6C783C701C600C600C000000000000000000000000 +0058:000000000000000000000000300C300C181818180C300C300660066003C003C003C003C0066006600C300C3018181818300C300C000000000000000000000000 +0059:000000000000000000000000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +005A:0000000000000000000000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +005B:0000000000000000000000000FE00FE00C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000FE00FE0000000000000000000000000 +005C:00000000000000000000000030003000180018000C000C0006000600030003000180018000C000C0006000600030003000180018000000000000000000000000 +005D:0000000000000000000000000FE00FE000600060006000600060006000600060006000600060006000600060006000600FE00FE0000000000000000000000000 +005E:0000000000000000018003C007E00E701C38381C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +005F:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000 +0060:00000E000700038001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0061:0000000000000000000000000000000000000000000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +0062:0000000000000000000000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0063:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +0064:000000000000000000000000000C000C000C000C000C000C0FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0065:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0066:000000000000000000000000007E00FE01C00180018001801FF81FF8018001800180018001800180018001800180018001800180000000000000000000000000 +0067:0000000000000000000000000000000000000000000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0068:0000000000000000000000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0069:00000000000000000000000001800180018001800000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +006A:00000000000000000000000000180018001800180000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +006B:000000000000000000000000180018001800180018001800181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +006C:00000000000000000000000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +006D:0000000000000000000000000000000000000000000000003FF03FF8319C318C318C318C318C318C318C318C318C318C318C318C000000000000000000000000 +006E:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +006F:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0070:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +0071:0000000000000000000000000000000000000000000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C0000 +0072:00000000000000000000000000000000000000000000000033FC37FC3E003C003800300030003000300030003000300030003000000000000000000000000000 +0073:0000000000000000000000000000000000000000000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +0074:0000000000000000000000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC000000000000000000000000 +0075:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0076:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300C300660066003C003C003C0000000000000000000000000 +0077:000000000000000000000000000000000000000000000000300C300C300C300C318C318C318C318C318C318C318C399C1FF80FF0000000000000000000000000 +0078:000000000000000000000000000000000000000000000000300C300C381C1C380E7007E003C003C007E00E701C38381C300C300C000000000000000000000000 +0079:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +007A:0000000000000000000000000000000000000000000000003FFC3FFC001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +007B:00000000000000000000000000F001F003800300030003000300030003001E001E00030003000300030003000300038001F000F0000000000000000000000000 +007C:00000000000000000000000001800180018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +007D:0000000000000000000000001E001F00038001800180018001800180018000F000F001800180018001800180018003801F001E00000000000000000000000000 +007E:00000000000000000E0C1F0C3B8C31DC30F830700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00A0:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00A1:00000000000000000000000001800180018001800000000001800180018001800180018001800180018001800180018001800180000000000000000000000000 +00A2:0000000000000000000000000000000000000180018001800FF01FF8399C318C318031803180318031803180318C399C1FF80FF0018001800180000000000000 +00A3:00000000000000000000000003E007F00E380C180C000C000C000C000C003FE03FE00C000C000C000C000C000C0C0C0C3FFC3FFC000000000000000000000000 +00A4:000000000000000000000000000000000000381C1C380FF00FF01C3818181818181818181C380FF00FF01C38381C000000000000000000000000000000000000 +00A5:000000000000000000000000300C300C181818180C300C300660066003C003C0018001801FF81FF8018001801FF81FF801800180000000000000000000000000 +00A6:00000000000000000000000001800180018001800180018001800180000000000000000001800180018001800180018001800180000000000000000000000000 +00A7:000000000000000007C00FE01C70183018001C000F800FC018E018701830183018301C300E3007E003E00070003018301C700FE007C000000000000000000000 +00A8:00000C300C300C300C30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00A9:000000000000000000000000000000001FF83FFC700E67E66FF66C366C066C066C066C066C366FF667E6700E3FFC1FF800000000000000000000000000000000 +00AA:000000000FE00FF00038001807F80FF81C1818181C180FF807F8000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +00AB:00000000000000000000000000000000000000000000000001CE039C07380E701CE039C07380738039C01CE00E700738039C01CE000000000000000000000000 +00AC:0000000000000000000000000000000000000000000000003FFC3FFC000C000C000C000C000C000C000000000000000000000000000000000000000000000000 +00AD:0000000000000000000000000000000000000000000000000000000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +00AE:000000000000000000000000000000001FF83FFC700E6FE66FF66C366C366C366FE66FC66DC66CE66C76700E3FFC1FF800000000000000000000000000000000 +00AF:000000000FF00FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00B0:000000000000000007E00FF00C300C300C300C300FF007E000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00B1:0000000000000000000000000000000000000000018001800180018001803FFC3FFC01800180018001800180000000003FFC3FFC000000000000000000000000 +00B2:00000000000007E00FF00C300C30007000E001C0038007000FF00FF0000000000000000000000000000000000000000000000000000000000000000000000000 +00B3:00000000000007E00FF00C30003001E001E0003000300C300FF007E0000000000000000000000000000000000000000000000000000000000000000000000000 +00B4:0000007000E001C00380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00B5:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C301C303C307C3FEC3FCC300030003000300030000000 +00B6:0000000000000000000000001FFC3FFC718C618C618C618C618C618C718C3F8C1F8C018C018C018C018C018C018C018C018C018C000000000000000000000000 +00B7:00000000000000000000000000000000000000000000000000000000018001800180018000000000000000000000000000000000000000000000000000000000 +00B8:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018001800380030006000000 +00B9:00000000000001800380078007800180018001800180018007E007E0000000000000000000000000000000000000000000000000000000000000000000000000 +00BA:0000000007E00FF01C38181818181818181818181C380FF007E0000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +00BB:000000000000000000000000000000000000000000000000738039C01CE00E700738039C01CE01CE039C07380E701CE039C07380000000000000000000000000 +00BC:0000000000000000000000000C001C003C000C000C060C0E0C1C0C380C7000E001C6038E071E0E361C6638C671FE61FE00060006000000000000000000000000 +00BD:000000000000000000000000180038007806180E181C1838187018E019C0038007000E7C1CFE38C670C6600C00180030007E00FE000000000000000000000000 +00BE:0000000000000000000000003F007F8061800F000F000186618E7F9C3F38007000E601CE039E07360E661CC639FE71FE60060006000000000000000000000000 +00BF:000000000000000000000000018001800180018000000000018001800180030006000C001800300C300C300C300C381C1FF80FF0000000000000000000000000 +00C0:00000E000700038001C000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C1:0000007000E001C0038000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C2:0000018003C007E00E7000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C3:00000F181B9819D818F000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C4:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C5:000003C006600660066003C00FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +00C6:0000000000000000000000001FFF3FFF70C060C060C060C060C060C060C07FFE7FFE60C060C060C060C060C060C060C060FF60FF000000000000000000000000 +00C7:0000000000000000000000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0018001800380030006000000 +00C8:00000E000700038001C000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +00C9:0000007000E001C0038000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +00CA:0000018003C007E00E7000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +00CB:00000C300C300C300C3000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +00CC:00000E000700038001C0000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +00CD:0000007000E001C00380000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +00CE:0000018003C007E00E70000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +00CF:00000C300C300C300C30000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +00D0:0000000000000000000000003FC03FF030383018300C300C300C300C300C7F8C7F8C300C300C300C300C300C301830383FF03FC0000000000000000000000000 +00D1:00000F181B9819D818F00000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +00D2:00000E000700038001C000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D3:0000007000E001C0038000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D4:0000018003C007E00E7000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D5:00000F181B9819D818F000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D6:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00D7:00000000000000000000000000000000000000000000701C38381C700EE007C0038007C00EE01C703838701C0000000000000000000000000000000000000000 +00D8:0000000000000000000000000FF01FF8381C300E300E301C303C307C30EC31CC338C370C3E0C3C0C380C700C700C381C1FF80FF0000000000000000000000000 +00D9:00000E000700038001C00000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00DA:0000007000E001C003800000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00DB:0000018003C007E00E700000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00DC:00000C300C300C300C300000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00DD:0000007000E001C003800000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +00DE:00000000000000000000000030003000300030003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03000300030003000000000000000000000000000 +00DF:0000000000000000000000001FE03FF03038301830183018301830303FF03FF03038301C300C300C300C300C380C3C1C37F833F0000000000000000000000000 +00E0:0000000000000000000000000E000700038001C0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E1:000000000000000000000000007000E001C00380000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E2:000000000000000000000000018003C007E00E70000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E3:0000000000000000000000000F181B9819D818F0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E4:0000000000000000000000000C300C300C300C30000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E5:00000000000000000000000003C006600660066003C000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +00E6:0000000000000000000000000000000000000000000000003EF83FFC018E018601861F863FFE71FE61806180618071C63FFE1F7C000000000000000000000000 +00E7:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0018001800380030006000000 +00E8:0000000000000000000000000E000700038001C0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +00E9:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +00EA:000000000000000000000000018003C007E00E70000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +00EB:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +00EC:0000000000000000000000001C000E00070003800000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +00ED:000000000000000000000000007000E001C003800000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +00EE:000000000000000000000000018003C007E00E700000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +00EF:0000000000000000000000000C300C300C300C300000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +00F0:0000000000000000000000001DC00F801F003B8001C000E00FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F1:0000000000000000000000000F181B9819D818F0000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +00F2:0000000000000000000000000E000700038001C0000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F3:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F4:000000000000000000000000018003C007E00E70000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F5:0000000000000000000000000F181B9819D818F0000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F6:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +00F7:0000000000000000000000000000000000000180018001800180000000003FFC3FFC000000000180018001800180000000000000000000000000000000000000 +00F8:0000000000000000000000000000000000000000000000000FF61FFE381C303C307C30EC31CC338C370C3E0C3C0C381C7FF8EFF0000000000000000000000000 +00F9:0000000000000000000000000E000700038001C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +00FA:000000000000000000000000007000E001C0038000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +00FB:000000000000000000000000018003C007E00E7000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +00FC:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +00FD:000000000000000000000000007000E001C0038000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +00FE:0000000000000000000000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +00FF:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0100:000000000FF00FF0000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0101:000000000000000000000000000000000FF00FF0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +0102:00000C300C3007E003C000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0103:0000000000000000000000000C300C3007E003C0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +0104:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C003C00700060007C003C0000 +0105:0000000000000000000000000000000000000000000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC003C00700060007C003C0000 +0106:0000007000E001C0038000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +0107:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +0108:0000018003C007E00E7000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +0109:000000000000000000000000018003C007E00E70000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +010A:0000018001800180018000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +010B:0000000000000000000000000180018001800180000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +010C:00000E7007E003C0018000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +010D:0000000000000000000000000E7007E003C00180000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +010E:00000E7007E003C0018000003FC03FF030383018300C300C300C300C300C300C300C300C300C300C300C300C301830383FF03FC0000000000000000000000000 +010F:00000E7007E003C001800000000C000C000C000C000C000C0FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0110:0000000000000000000000003FC03FF030383018300C300C300C300C300C7F8C7F8C300C300C300C300C300C301830383FF03FC0000000000000000000000000 +0111:000000000000000000000000000C000C01FF01FF000C000C0FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0112:000000000FF00FF0000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0113:000000000000000000000000000000000FF00FF0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0114:00000C300C3007E003C000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0115:0000000000000000000000000C300C3007E003C0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0116:0000018001800180018000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0117:0000000000000000000000000180018001800180000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0118:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC003C00700060007C003C0000 +0119:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF801C00380030003E001E00000 +011A:00000E7007E003C0018000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +011B:0000000000000000000000000E7007E003C00180000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +011C:0000018003C007E00E7000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +011D:000000000000000000000000018003C007E00E70000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +011E:00000C300C3007E003C000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +011F:0000000000000000000000000C300C3007E003C0000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0120:0000018001800180018000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0121:00000000000000000000000000C000C000C000C0000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0122:0000000000000000000000000FF01FF8381C300C300C300030003000300030FC30FC300C300C300C300C300C300C381C1FF80FF0000001800180038003000600 +0123:0000000000000000000000000030006000E000C000C000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0124:0000018003C007E00E700000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +0125:0000018003C007E00E7000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0126:000000000000000000000000300C300C300C7FFE7FFE300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +0127:00000000000000000000000030003000FF80FF80300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0128:00000F181B9819D818F0000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +0129:0000000000000000000000000F181B9819D818F00000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +012A:000000000FF00FF00000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +012B:000000000000000000000000000000000FF00FF00000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +012C:00000C300C3007E003C0000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +012D:0000000000000000000000000C300C3007E003C00000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +012E:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E001800380030003E001E00000 +012F:00000000000000000000000001800180018001800000000007800780018001800180018001800180018001800180018007E007E001800380030003E001E00000 +0130:00000180018001800180000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +0131:00000000000000000000000000000000000000000000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +0132:000000000000000000000000F01EF01E600C600C600C600C600C600C600C600C600C600C600C600C630C630C630C639CF1F8F0F0000000000000000000000000 +0133:000000000000000000000000300630063006300600000000701E701E3006300630063006300630063006300630063006780678060186018601CE00FC00780000 +0134:00000018003C007E00E70000007E007E00180018001800180018001800180018001800180018001830183018301838381FF00FE0000000000000000000000000 +0135:0000000000000000000000000018003C007E00E70000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +0136:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000001800180038003000600 +0137:000000000000000000000000180018001800180018001800181C1838187018E019C01B801F001F001B8019C018E018701838181C000001800180038003000600 +0138:000000000000000000000000000000000000000000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +0139:000007000E001C00380000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000000000000000000000000 +013A:0000007000E001C00380000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +013B:0000000000000000000000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000001800180038003000600 +013C:00000000000000000000000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000001800180038003000600 +013D:00000E7007E003C0018000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000000000000000000000000 +013E:00000E7007E003C00180000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +013F:0000000000000000000000003000300030003000300030003000300030303030303030303000300030003000300030003FFC3FFC000000000000000000000000 +0140:00000000000000000000000007800780018001800180018001800180018301830183018301800180018001800180018007E007E0000000000000000000000000 +0141:0000000000000000000000003000300030003000300030003000330036003C0038007000F000300030003000300030003FFC3FFC000000000000000000000000 +0142:000000000000000000000000078007800180018001800180018001B001E001C0038007800D800180018001800180018007E007E0000000000000000000000000 +0143:0000007000E001C003800000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +0144:000000000000000000000000007000E001C00380000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0145:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000001800180038003000600 +0146:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000001800180038003000600 +0147:00000E7007E003C001800000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +0148:0000000000000000000000000E7007E003C00180000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0149:0000000000000000300030003000300060006000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +014A:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000C000C001C00F800F00000 +014B:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C001C00F800F00000 +014C:000000000FF00FF0000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +014D:000000000000000000000000000000000FF00FF0000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +014E:00000C300C3007E003C000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +014F:0000000000000000000000000C300C3007E003C0000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0150:000001CE039C07380E7000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0151:00000000000000000000000001CE039C07380E70000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0152:0000000000000000000000001FFF3FFF70C060C060C060C060C060C060C060FE60FE60C060C060C060C060C060C070C03FFF1FFF000000000000000000000000 +0153:0000000000000000000000000000000000000000000000001FF83FFC718E61866186618661FE61FE61806180618071863FFE1FFC000000000000000000000000 +0154:0000007000E001C0038000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03700338031C030E030703038301C300C000000000000000000000000 +0155:000000000000000000000000007000E001C003800000000033FC37FC3E003C003800300030003000300030003000300030003000000000000000000000000000 +0156:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03700338031C030E030703038301C300C000001800180038003000600 +0157:00000000000000000000000000000000000000000000000031FC33FC36003C00380030003000300030003000300030003000300000003000300070006000C000 +0158:00000E7007E003C0018000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF03700338031C030E030703038301C300C000000000000000000000000 +0159:0000000000000000000000000E7007E003C001800000000033FC37FC3E003C003800300030003000300030003000300030003000000000000000000000000000 +015A:0000007000E001C0038000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +015B:000000000000000000000000007000E001C00380000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +015C:0000018003C007E00E7000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +015D:000000000000000000000000018003C007E00E70000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +015E:0000000000000000000000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0018001800380030006000000 +015F:0000000000000000000000000000000000000000000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0018001800380030006000000 +0160:00000E7007E003C0018000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0161:0000000000000000000000000E7007E003C00180000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +0162:0000000000000000000000003FFC3FFC01800180018001800180018001800180018001800180018001800180018001800180018000C000C001C0018003000000 +0163:0000000000000000000000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC003000300070006000C00000 +0164:00000E7007E003C0018000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +0165:00001CE00FC00780030000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC000000000000000000000000 +0166:0000000000000000000000003FFC3FFC01800180018001800180018001800FF00FF0018001800180018001800180018001800180000000000000000000000000 +0167:0000000000000000000000000300030003000300030003003FF03FF0030003000FC00FC003000300030003000300038001FC00FC000000000000000000000000 +0168:00000F181B9819D818F00000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0169:0000000000000000000000000F181B9819D818F000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +016A:000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +016B:000000000000000000000000000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +016C:00000C300C3007E003C00000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +016D:0000000000000000000000000C300C3007E003C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +016E:000003C006600660066003C0300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +016F:00000000000000000000000003C006600660066003C00000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0170:000001CE039C07380E700000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0171:00000000000000000000000001CE039C07380E7000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0172:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF001C00380030003E001E00000 +0173:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC003C00700060007C003C0000 +0174:0000018003C007E00E700000600C600C600C600C600C600C600C600C600C600C610C638C638C67CC6C6C6C6C783C701C600C600C000000000000000000000000 +0175:000000000000000000000000018003C007E00E7000000000300C300C300C300C318C318C318C318C318C318C318C399C1FF80FF0000000000000000000000000 +0178:00000C300C300C300C300000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +0179:0000007000E001C0038000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +017A:000000000000000000000000007000E001C00380000000003FFC3FFC001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +017B:0000018001800180018000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +017C:0000000000000000000000000180018001800180000000003FFC3FFC001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +017D:00000E7007E003C0018000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +017E:0000000000000000000000000E7007E003C00180000000003FFC3FFC001C0038007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +017F:00000000000000000000000000FC01FC038003000300030003000300030003000300030003000300030003000300030003000300000000000000000000000000 +0186:0000000000000000000000000FF01FF8381C300C300C000C000C000C000C000C000C000C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +018E:0000000000000000000000003FFC3FFC000C000C000C000C000C000C000C07FC07FC000C000C000C000C000C000C000C3FFC3FFC000000000000000000000000 +018F:0000000000000000000000000FF01FF8381C300C300C000C000C000C000C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0190:0000000000000000000000000FF01FF8381C300C300C30003000300038001FE01FE03800300030003000300C300C381C1FF80FF0000000000000000000000000 +0192:00000000000000000000000000F801FC018C018C01800180018001800FF00FF00180018001800180018001800180018001800180318031803F801F0000000000 +019D:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C3000300030007000E0000000 +019E:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C000C000C000C0000 +01B7:0000000000000000000000003FFC3FFC001C0038007000E001C0038007F007F8001C000C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0218:0000000000000000000000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000001800180038003000600 +0219:0000000000000000000000000000000000000000000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000001800180038003000600 +021A:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000001800180038003000600 +021B:0000000000000000000000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC0000003000300070006000C0 +0232:000000000FF00FF000000000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +0233:000000000000000000000000000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0237:00000000000000000000000000000000000000000000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +0254:0000000000000000000000000000000000000000000000000FF01FF8381C300C000C000C000C000C000C000C300C381C1FF80FF0000000000000000000000000 +0258:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC000C000C000C301C3FF81FF0000000000000000000000000 +0259:0000000000000000000000000000000000000000000000001FF03FF8301C000C000C000C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +025B:0000000000000000000000000000000000000000000000000FF01FF8381C300C300038001FC01FC038003000300C381C1FF80FF0000000000000000000000000 +0272:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C3000300030007000E0000000 +0292:0000000000000000000000000000000000000000000000003FFC3FFC001C0038007000E001C0038007F007F8001C000C000C000C000C300C381C1FF80FF00000 +02BB:0000006000C001C00180018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02BC:00000180018003800300060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02BD:00000180018001C000C0006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02C6:0000018003C007E00E70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02C7:00000E7007E003C00180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02D8:00000C300C3007E003C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02D9:00000180018001800180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02DB:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003C00700060007C003C0000 +02DC:00000F181B9819D818F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +02DD:000001CE039C07380E70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0300:00000E000700038001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0301:0000007000E001C00380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0302:0000018003C007E00E70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0303:00000F181B9819D818F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0304:000000000FF00FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0305:000000003FFC3FFC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0306:00000C300C3007E003C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0307:00000180018001800180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0308:00000C300C300C300C30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +030A:000003C006600660066003C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +030B:000001CE039C07380E70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +030C:00000E7007E003C00180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0329:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800180018001800000 +0384:000000001C0038007000E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0385:0000007000E001C0038000000C300C300C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0386:000000001C0038007000E0000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0387:00000000000000000000000000000000000000000000000001800180018001800000000000000000000000000000000000000000000000000000000000000000 +0388:000000001C0038007000E0003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0389:000000001C0038007000E000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +038A:000000001C0038007000E00007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +038C:000000001C0038007000E0000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +038E:000000001C0038007000E0001806180618060C0C0C0C061806180330033001E001E000C000C000C000C000C000C000C000C000C0000000000000000000000000 +038F:000000001C0038007000E0000FF01FF8381C300C300C300C300C300C300C300C300C300C300C381C1C380E70066006603E7C3E7C000000000000000000000000 +0390:000000E001C00380070000001860186018601860000000000F000F00030003000300030003000300030003000300038001F000F0000000000000000000000000 +0391:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0392:0000000000000000000000003FF03FF8301C300C300C300C300C30183FF03FF03038301C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0393:0000000000000000000000003FFC3FFC300030003000300030003000300030003000300030003000300030003000300030003000000000000000000000000000 +0394:00000000000000000000000001800180018003C003C003C00660066006600C300C300C30181818181818300C300C300C3FFC3FFC000000000000000000000000 +0395:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0396:0000000000000000000000003FFC3FFC000C000C000C001C0038007000E001C0038007000E001C0038003000300030003FFC3FFC000000000000000000000000 +0397:000000000000000000000000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +0398:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C37EC37EC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +0399:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +039A:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +039B:00000000000000000000000001800180018003C003C003C00660066006600C300C300C301818181818181818300C300C300C300C000000000000000000000000 +039C:000000000000000000000000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000000000000000000000000 +039D:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +039E:0000000000000000000000003FFC3FFC00000000000000000000000000000FF00FF000000000000000000000000000003FFC3FFC000000000000000000000000 +039F:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03A0:0000000000000000000000003FFC3FFC300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +03A1:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF030003000300030003000300030003000000000000000000000000000 +03A3:0000000000000000000000003FFC3FFC38001C000E000700038001C000E00070007000E001C0038007000E001C0038003FFC3FFC000000000000000000000000 +03A4:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +03A5:000000000000000000000000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +03A6:000000000000000000000000018001800FF01FF8399C318C318C318C318C318C318C318C318C318C318C399C1FF80FF001800180000000000000000000000000 +03A7:000000000000000000000000300C300C181818180C300C300660066003C003C003C003C0066006600C300C3018181818300C300C000000000000000000000000 +03A8:000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C318C318C399C1FF80FF00180018001800180000000000000000000000000 +03A9:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C381C1C380E70066006603E7C3E7C000000000000000000000000 +03AA:00000C300C300C300C30000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +03AB:00000C300C300C300C300000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +03AC:000000000000000000000000007000E001C00380000000001FCC3FFC70386030603060306030603060306030603070383FFC1FCC000000000000000000000000 +03AD:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300038001FC01FC038003000300C381C1FF80FF0000000000000000000000000 +03AE:000000000000000000000000007000E001C00380000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C000C000C000C0000 +03AF:00000000000000000000000000E001C003800700000000000F000F00030003000300030003000300030003000300038001F000F0000000000000000000000000 +03B0:0000007000E001C0038000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03B1:0000000000000000000000000000000000000000000000001FCC3FFC70386030603060306030603060306030603070383FFC1FCC000000000000000000000000 +03B2:0000000000000000000000001FE03FF03038301830183018301830303FF03FF03038301C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +03B3:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300660066003C003C001800180018001800180018001800000 +03B4:0000000000000000000000001FF01FF00E000700038001C007E00FF01818300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03B5:0000000000000000000000000000000000000000000000000FF01FF8381C300C300038001FC01FC038003000300C381C1FF80FF0000000000000000000000000 +03B6:0000000000000000000000003FFC3FFC0038007000E001C0038007000E001C00180038003000300030003000300038001FF00FF8001C000C001C007800700000 +03B7:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C000C000C000C0000 +03B8:00000000000000000000000007E00FF01C381818181818181818181818181FF81FF81818181818181818181818181C380FF007E0000000000000000000000000 +03B9:0000000000000000000000000000000000000000000000000F000F00030003000300030003000300030003000300038001F000F0000000000000000000000000 +03BA:000000000000000000000000000000000000000000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +03BB:00000000000000000000000006000600030003000180018003C003C00660066006600C300C300C30181818181818300C300C300C000000000000000000000000 +03BC:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C301C303C307C3FEC3FCC300030003000300030000000 +03BD:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300C300660066003C003C003C0000000000000000000000000 +03BE:0000000000000000000000000FFC1FFC3800300030003000300018000FF00FF01C0038003000300030003000300038001FF00FF8001C000C001C007800700000 +03BF:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03C0:0000000000000000000000000000000000000000000000003FFC3FFC300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +03C1:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +03C2:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300038001FF00FF8001C000C001C007800700000 +03C3:0000000000000000000000000000000000000000000000000FFE1FFE38703038301C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03C4:0000000000000000000000000000000000000000000000003FFC3FFC01800180018001800180018001800180018001C000F80078000000000000000000000000 +03C5:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03C6:0000000000000000000000000000000000000000000000000CF01DF8399C318C318C318C318C318C318C318C318C399C1FF80FF0018001800180018001800000 +03C7:000000000000000000000000000000000000000000000000300C300C181818180C300C300660066003C003C003C0066006600C300C3018181818300C300C0000 +03C8:000000000000000000000000000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C399C1FF80FF0018001800180018001800000 +03C9:0000000000000000000000000000000000000000000000000C301C38381C300C318C318C318C318C318C318C318C3BDC1FF80E70000000000000000000000000 +03CA:0000000000000000000000001860186018601860000000000F000F00030003000300030003000300030003000300038001F000F0000000000000000000000000 +03CB:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03CC:000000000000000000000000007000E001C00380000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03CD:000000000000000000000000007000E001C0038000000000300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03CE:000000000000000000000000007000E001C00380000000000C301C38381C300C318C318C318C318C318C318C318C3BDC1FF80E70000000000000000000000000 +03D1:00000000000000000000000007E00FF01C3818181818181818180FFE07FE001800180018781878181818181818181C380FF007E0000000000000000000000000 +03D5:0000000000000000000000000000000000000180018001800FF01FF8399C318C318C318C318C318C318C318C318C399C1FF80FF0018001800180000000000000 +03F0:000000000000000000000000000000000000000000000000780C7C1C0E38067003E003C00380038007800F801CC038E0707C603C000000000000000000000000 +03F1:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C301C3FF83FF03000300038001FF80FF80000 +03F2:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +03F3:00000000000000000000000000180018001800180000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +03F4:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +03F5:00000000000000000000000000000000000000000000000003FC0FFC1C001800300030003FF03FF03000300018001C000FFC03FC000000000000000000000000 +03F6:0000000000000000000000000000000000000000000000003FC03FF000380018000C000C0FFC0FFC000C000C001800383FF03FC0000000000000000000000000 +0400:00000E000700038001C000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0401:00000C300C300C300C3000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0402:000000000000000000000000FF00FF00180018001800180018001FF01FF8181C180C180C180C180C180C180C180C181C18F818F0000000000000000000000000 +0403:0000007000E001C0038000003FFC3FFC300030003000300030003000300030003000300030003000300030003000300030003000000000000000000000000000 +0404:0000000000000000000000000FF01FF8381C300C300C30003000300030003FE03FE03000300030003000300C300C381C1FF80FF0000000000000000000000000 +0405:0000000000000000000000000FF01FF8381C300C300C30003000300038001FF00FF8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0406:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +0407:00000C300C300C300C30000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +0408:000000000000000000000000007E007E00180018001800180018001800180018001800180018001830183018301838381FF00FE0000000000000000000000000 +0409:0000000000000000000000001F803F807180618061806180618061F861FC618E6186618661866186618661866186618EE1FCC1F8000000000000000000000000 +040A:000000000000000000000000618061806180618061806180618061F861FC7F8E7F86618661866186618661866186618E61FC61F8000000000000000000000000 +040B:000000000000000000000000FF00FF00180018001800180018001FF01FF8181C180C180C180C180C180C180C180C180C180C180C000000000000000000000000 +040C:0000007000E001C003800000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +040D:00000E000700038001C00000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +040E:00000C300C3007E003C00000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +040F:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C3FFC3FFC018001800180018001800000 +0410:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +0411:0000000000000000000000003FF83FF8300030003000300030003FF03FF8301C300C300C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0412:0000000000000000000000003FF03FF8301C300C300C300C300C30183FF03FF03038301C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0413:0000000000000000000000003FFC3FFC300030003000300030003000300030003000300030003000300030003000300030003000000000000000000000000000 +0414:00000000000000000000000007F80FF81C181818181818181818181818181818181818181818181818181818181818183FFC7FFE600660066006600600000000 +0415:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +0416:000000000000000000000000318C318C318C318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C318C318C318C000000000000000000000000 +0417:0000000000000000000000000FF01FF8381C300C300C000C000C000C001C07F807F8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +0418:000000000000000000000000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +0419:00000C300C3007E003C00000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +041A:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +041B:00000000000000000000000003FC07FC0E0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C1C0C380C000000000000000000000000 +041C:000000000000000000000000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000000000000000000000000 +041D:000000000000000000000000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C300C000000000000000000000000 +041E:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +041F:0000000000000000000000003FFC3FFC300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0420:0000000000000000000000003FF03FF8301C300C300C300C300C300C300C301C3FF83FF030003000300030003000300030003000000000000000000000000000 +0421:0000000000000000000000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0000000000000000000000000 +0422:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000 +0423:000000000000000000000000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +0424:0000000000000000018001800FF01FF8399C318C318C318C318C318C318C318C318C318C318C318C318C318C318C399C1FF80FF0018001800000000000000000 +0425:000000000000000000000000300C300C181818180C300C300660066003C003C003C003C0066006600C300C3018181818300C300C000000000000000000000000 +0426:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C380E1FFF0FFF000300030003000300030000 +0427:000000000000000000000000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000C000C000000000000000000000000 +0428:000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C398C1FFC0FFC000000000000000000000000 +0429:000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C318C398C1FFE0FFF000300030003000300030000 +042A:000000000000000000000000F000F00030003000300030003FE03FF030383018301830183018301830183018301830383FF03FE0000000000000000000000000 +042B:000000000000000000000000600C600C600C600C600C600C7F0C7F8C61CC60CC60CC60CC60CC60CC60CC60CC60CC61CC7F8C7F0C000000000000000000000000 +042C:0000000000000000000000003000300030003000300030003FE03FF030383018301830183018301830183018301830383FF03FE0000000000000000000000000 +042D:0000000000000000000000000FF01FF8381C300C300C000C000C000C000C07FC07FC000C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +042E:00000000000000000000000060F061F8639C630C630C630C630C630C630C7F0C7F0C630C630C630C630C630C630C639C61F860F0000000000000000000000000 +042F:0000000000000000000000000FFC1FFC380C300C300C300C300C300C300C380C1FFC0FFC00EC01CC038C070C0E0C1C0C380C300C000000000000000000000000 +0430:0000000000000000000000000000000000000000000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +0431:0000000000000000000000000FF01FF0380030003000300030003FF03FF8301C300C300C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0432:0000000000000000000000001FC03FE03070303030303030303030703FE03FF03038301C300C300C300C300C300C301C3FF83FF0000000000000000000000000 +0433:0000000000000000000000000000000000000000000000003FFC3FFC300030003000300030003000300030003000300030003000000000000000000000000000 +0434:0000000000000000000000000000000000000000000000000FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0435:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0436:000000000000000000000000000000000000000000000000318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C000000000000000000000000 +0437:0000000000000000000000000000000000000000000000000FF01FF8381C300C000C001C03F803F8001C000C300C381C1FF80FF0000000000000000000000000 +0438:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +0439:0000000000000000000000000C300C3007E003C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +043A:000000000000000000000000000000000000000000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +043B:00000000000000000000000000000000000000000000000003FC07FC0E0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C1C0C380C000000000000000000000000 +043C:000000000000000000000000000000000000000000000000600C701C783C7C7C6EEC67CC638C610C600C600C600C600C600C600C000000000000000000000000 +043D:000000000000000000000000000000000000000000000000300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C000000000000000000000000 +043E:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +043F:0000000000000000000000000000000000000000000000003FFC3FFC300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +0440:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C301C3FF83FF0300030003000300030000000 +0441:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0000000000000000000000000 +0442:0000000000000000000000000000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180000000000000000000000000 +0443:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +0444:0000000000000000000000000000000000000180018001800FF01FF8399C318C318C318C318C318C318C318C318C399C1FF80FF0018001800180000000000000 +0445:000000000000000000000000000000000000000000000000300C300C381C1C380E7007E003C003C007E00E701C38381C300C300C000000000000000000000000 +0446:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFE0FFF000300030003000300030000 +0447:000000000000000000000000000000000000000000000000300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000000000000000000000000 +0448:000000000000000000000000000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C398C1FFC0FFC000000000000000000000000 +0449:000000000000000000000000000000000000000000000000318C318C318C318C318C318C318C318C318C318C318C398C1FFE0FFF000300030003000300030000 +044A:0000000000000000000000000000000000000000000000003C003C000C000C000FF00FF80C1C0C0C0C0C0C0C0C0C0C1C0FF80FF0000000000000000000000000 +044B:000000000000000000000000000000000000000000000000600C600C600C600C7F0C7F8C61CC60CC60CC60CC60CC61CC7F8C7F0C000000000000000000000000 +044C:00000000000000000000000000000000000000000000000018001800180018001FE01FF01838181818181818181818381FF01FE0000000000000000000000000 +044D:0000000000000000000000000000000000000000000000000FF01FF8381C300C000C000C03FC03FC000C000C300C381C1FF80FF0000000000000000000000000 +044E:00000000000000000000000000000000000000000000000060F061F8630C630C630C630C7F0C7F0C630C630C630C630C61F860F0000000000000000000000000 +044F:0000000000000000000000000000000000000000000000000FFC1FFC380C300C300C380C1FFC0FFC00EC01CC038C070C0E0C1C0C000000000000000000000000 +0450:0000000000000000000000000E000700038001C0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0451:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +0452:00000000000000000000000030003000FF80FF80300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000C000C001C00F800F00000 +0453:000000000000000000000000007000E001C00380000000003FFC3FFC300030003000300030003000300030003000300030003000000000000000000000000000 +0454:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003FC03FC030003000300C381C1FF80FF0000000000000000000000000 +0455:0000000000000000000000000000000000000000000000000FF01FF8381C3000300038001FF00FF8001C000C000C381C1FF80FF0000000000000000000000000 +0456:00000000000000000000000001800180018001800000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +0457:0000000000000000000000000C300C300C300C300000000007800780018001800180018001800180018001800180018007E007E0000000000000000000000000 +0458:00000000000000000000000000180018001800180000000000780078001800180018001800180018001800180018001800180018181818181C380FF007E00000 +0459:0000000000000000000000000000000000000000000000000F801F803980318031F831FC318E3186318631863186318E71FC61F8000000000000000000000000 +045A:000000000000000000000000000000000000000000000000618061806180618061F861FC7F8E7F86618661866186618E61FC61F8000000000000000000000000 +045B:00000000000000000000000030003000FF80FF80300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +045C:000000000000000000000000007000E001C0038000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +045D:0000000000000000000000000E000700038001C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +045E:0000000000000000000000000C300C3007E003C000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +045F:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C3FFC3FFC018001800180018001800000 +0462:00000000000000000000000030003000FF00FF00300030003FE03FF030383018301830183018301830183018301830383FF03FE0000000000000000000000000 +0463:0000000000000000000000000C000C000C000C003FC03FC00C000C000C000C000FF00FF80C1C0C0C0C0C0C0C0C0C0C1C0FF80FF0000000000000000000000000 +046A:0000000000000000000000003FFC3FFC300C181818180C300C30066003C007E00FF01DB8399C318C318C318C318C318C318C318C000000000000000000000000 +046B:0000000000000000000000000000000000000000000000003FFC3FFC300C381C1C380E7007E00FF01DB8399C318C318C318C318C000000000000000000000000 +0490:00000000000C000C000C000C3FFC3FFC300030003000300030003000300030003000300030003000300030003000300030003000000000000000000000000000 +0491:00000000000000000000000000000000000C000C000C000C3FFC3FFC300030003000300030003000300030003000300030003000000000000000000000000000 +0492:0000000000000000000000003FFC3FFC30003000300030003000300030007F807F80300030003000300030003000300030003000000000000000000000000000 +0493:0000000000000000000000000000000000000000000000003FFC3FFC30003000300030007F807F80300030003000300030003000000000000000000000000000 +0494:0000000000000000000000003FFC3FFC300030003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C000C000C0018003000000000 +0495:0000000000000000000000000000000000000000000000003FFC3FFC300030003000300030003FC03FE03070303030303030303000300030006000C000000000 +0496:000000000000000000000000318C318C318C318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C318C318E318F000300030003000300030000 +0497:000000000000000000000000000000000000000000000000318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318E318F000300030003000300030000 +0498:0000000000000000000000000FF01FF8381C300C300C000C000C000C001C07F807F8001C000C000C000C300C300C381C1FF80FF0018001800180018001800000 +0499:0000000000000000000000000000000000000000000000000FF01FF8381C300C000C001C03F803F8001C000C300C381C1FF80FF0018001800180018001800000 +049A:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300E000600060006000600060000 +049B:000000000000000000000000000000000000000000000000181C1838187018E019C01B801F001F001B8019C018E018701838181C000C000C000C000C000C0000 +049C:000000000000000000000000600C600C601C60386C706CE06DC06F806F007E007E006F006F806DC06CE06C706038601C600C600C000000000000000000000000 +049D:000000000000000000000000000000000000000000000000300C301C3638367036E037C03F803F8037C036E036703638301C300C000000000000000000000000 +04A0:000000000000000000000000F00CF01C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000000000000000000 +04A1:000000000000000000000000000000000000000000000000781C7838187018E019C01B801F001F001B8019C018E018701838181C000000000000000000000000 +04A2:000000000000000000000000300C300C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300E300F000300030003000300030000 +04A3:000000000000000000000000000000000000000000000000300C300C300C300C300C300C3FFC3FFC300C300C300C300C300E300F000300030003000300030000 +04A4:000000000000000000000000607F607F60606060606060606060606060607FE07FE0606060606060606060606060606060606060000000000000000000000000 +04A5:000000000000000000000000000000000000000000000000607F607F60606060606060607FE07FE0606060606060606060606060000000000000000000000000 +04AA:0000000000000000000000000FF01FF8381C300C300C3000300030003000300030003000300030003000300C300C381C1FF80FF0018001800180018001800000 +04AB:0000000000000000000000000000000000000000000000000FF01FF8381C300C300030003000300030003000300C381C1FF80FF0018001800180018001800000 +04AE:000000000000000000000000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +04AF:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300660066003C003C001800180018001800180018001800000 +04B0:000000000000000000000000300C300C300C181818180C300C300660066003C003C001801FF81FF8018001800180018001800180000000000000000000000000 +04B1:000000000000000000000000000000000000000000000000300C300C300C1818181818180C300C300660066003C003C001801FF81FF801800180018001800000 +04B2:000000000000000000000000300C300C181818180C300C300660066003C003C003C003C0066006600C300C3018181818300E300F000300030003000300030000 +04B3:000000000000000000000000000000000000000000000000300C300C381C1C380E7007E003C003C007E00E701C38381C300E300F000300030003000300030000 +04B6:000000000000000000000000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000E000F000300030003000300030000 +04B7:000000000000000000000000000000000000000000000000300C300C300C300C300C380C1FFC0FFC000C000C000C000C000E000F000300030003000300030000 +04B8:000000000000000000000000300C300C300C300C300C300C318C318C318C398C1FFC0FFC018C018C018C018C000C000C000C000C000000000000000000000000 +04B9:000000000000000000000000000000000000000000000000300C300C300C318C318C398C1FFC0FFC018C018C018C000C000C000C000000000000000000000000 +04BA:000000000000000000000000300030003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C300C000000000000000000000000 +04BB:000000000000000000000000000000000000000000000000300030003000300030003FF03FF8301C300C300C300C300C300C300C000000000000000000000000 +04C0:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +04C1:00000C300C3007E003C00000318C318C318C318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C318C318C318C000000000000000000000000 +04C2:0000000000000000000000000C300C3007E003C000000000318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C000000000000000000000000 +04CF:00000000000000000000000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000000000000000000000000 +04D0:00000C300C3007E003C000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +04D1:0000000000000000000000000C300C3007E003C0000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +04D2:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C300C300C000000000000000000000000 +04D3:0000000000000000000000000C300C300C300C30000000001FF01FF8001C000C000C0FFC1FFC380C300C300C300C380C1FFC0FFC000000000000000000000000 +04D4:0000000000000000000000001FFF3FFF70C060C060C060C060C060C060C07FFE7FFE60C060C060C060C060C060C060C060FF60FF000000000000000000000000 +04D5:0000000000000000000000000000000000000000000000003EF83FFC018E018601861F863FFE71FE61806180618071C63FFE1F7C000000000000000000000000 +04D6:00000C300C3007E003C000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +04D7:0000000000000000000000000C300C3007E003C0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +04D8:0000000000000000000000000FF01FF8381C300C300C000C000C000C000C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04D9:0000000000000000000000000000000000000000000000001FF03FF8301C000C000C000C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +04DA:00000C300C300C300C3000000FF01FF8381C300C300C000C000C000C000C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04DB:0000000000000000000000000C300C300C300C30000000001FF03FF8301C000C000C000C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +04DC:00000C300C300C300C300000318C318C318C318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C318C318C318C000000000000000000000000 +04DD:0000000000000000000000000C300C300C300C3000000000318C318C318C399C1DB80FF007E00FF01DB8399C318C318C318C318C000000000000000000000000 +04DE:00000C300C300C300C3000000FF01FF8381C300C300C000C000C000C001C07F807F8001C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +04DF:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C000C001C03F803F8001C000C300C381C1FF80FF0000000000000000000000000 +04E2:000000000FF00FF000000000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +04E3:000000000000000000000000000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +04E4:00000C300C300C300C300000300C300C300C300C300C301C303C307C30EC31CC338C370C3E0C3C0C380C300C300C300C300C300C000000000000000000000000 +04E5:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000000000000000000000 +04E6:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04E7:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04E8:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04E9:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +04EA:00000C300C300C300C3000000FF01FF8381C300C300C300C300C300C300C3FFC3FFC300C300C300C300C300C300C381C1FF80FF0000000000000000000000000 +04EB:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C300C300C3FFC3FFC300C300C300C381C1FF80FF0000000000000000000000000 +04EC:00000C300C300C300C3000000FF01FF8381C300C300C000C000C000C000C07FC07FC000C000C000C000C300C300C381C1FF80FF0000000000000000000000000 +04ED:0000000000000000000000000C300C300C300C30000000000FF01FF8381C300C000C000C03FC03FC000C000C300C381C1FF80FF0000000000000000000000000 +04EE:000000000FF00FF000000000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +04EF:000000000000000000000000000000000FF00FF000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +04F0:00000C300C300C300C300000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +04F1:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +04F2:000001CE039C07380E700000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C001C1FF81FF0000000000000000000000000 +04F3:00000000000000000000000001CE039C07380E7000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +04F4:00000C300C300C300C300000300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000C000C000000000000000000000000 +04F5:0000000000000000000000000C300C300C300C3000000000300C300C300C300C300C380C1FFC0FFC000C000C000C000C000C000C000000000000000000000000 +04F8:00000C300C300C300C300000600C600C600C600C600C600C7F0C7F8C61CC60CC60CC60CC60CC60CC60CC60CC60CC61CC7F8C7F0C000000000000000000000000 +04F9:0000000000000000000000000C300C300C300C3000000000600C600C600C600C7F0C7F8C61CC60CC60CC60CC60CC61CC7F8C7F0C000000000000000000000000 +1E0C:0000000000000000000000003FC03FF030383018300C300C300C300C300C300C300C300C300C300C300C300C301830383FF03FC0000003000300030003000000 +1E0D:000000000000000000000000000C000C000C000C000C000C0FFC1FFC380C300C300C300C300C300C300C300C300C380C1FFC0FFC000000C000C000C000C00000 +1E34:000000000000000000000000300C301C3038307030E031C0338037003E003C003C003E003700338031C030E030703038301C300C000000000FF00FF000000000 +1E35:000000000000000000000000180018001800180018001800181C1838187018E019C01B801F001F001B8019C018E018701838181C0000000007F007F000000000 +1E36:0000000000000000000000003000300030003000300030003000300030003000300030003000300030003000300030003FFC3FFC000001800180018001800000 +1E37:00000000000000000000000007800780018001800180018001800180018001800180018001800180018001800180018007E007E0000001800180018001800000 +1E40:000001800180018001800000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000000000000000000000000 +1E41:0000000000000000000000000180018001800180000000003FF03FF8319C318C318C318C318C318C318C318C318C318C318C318C000000000000000000000000 +1E42:000000000000000000000000600C600C701C783C6C6C6C6C67CC638C638C610C600C600C600C600C600C600C600C600C600C600C000001800180018001800000 +1E43:0000000000000000000000000000000000000000000000003FF03FF8319C318C318C318C318C318C318C318C318C318C318C318C000001800180018001800000 +1E44:000001800180018001800000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000000000000000000000000 +1E45:0000000000000000000000000180018001800180000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +1E46:000000000000000000000000300C300C300C300C300C380C3C0C3E0C370C338C31CC30EC307C303C301C300C300C300C300C300C000001800180018001800000 +1E47:0000000000000000000000000000000000000000000000003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000001800180018001800000 +1E6C:0000000000000000000000003FFC3FFC018001800180018001800180018001800180018001800180018001800180018001800180000001800180018001800000 +1E6D:0000000000000000000000000300030003000300030003003FF03FF0030003000300030003000300030003000300038001FC00FC000000300030003000300000 +1EB8:0000000000000000000000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000001800180018001800000 +1EB9:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000001800180018001800000 +1EBC:00000F181B9819D818F000003FFC3FFC30003000300030003000300030003FE03FE030003000300030003000300030003FFC3FFC000000000000000000000000 +1EBD:0000000000000000000000000F181B9819D818F0000000000FF01FF8381C300C300C300C3FFC3FFC300030003000380C1FFC0FF8000000000000000000000000 +1ECA:00000000000000000000000007E007E0018001800180018001800180018001800180018001800180018001800180018007E007E0000001800180018001800000 +1ECB:00000000000000000000000001800180018001800000000007800780018001800180018001800180018001800180018007E007E0000001800180018001800000 +1ECC:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000001800180018001800000 +1ECD:0000000000000000000000000000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C381C1FF80FF0000001800180018001800000 +1EE4:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C381C1FF80FF0000001800180018001800000 +1EE5:000000000000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000000C000C000C000C00000 +1EF8:00000F181B9819D818F00000300C300C300C181818180C300C300660066003C003C0018001800180018001800180018001800180000000000000000000000000 +1EF9:0000000000000000000000000F181B9819D818F000000000300C300C300C300C300C300C300C300C300C300C300C380C1FFC0FFC000C000C001C1FF81FF00000 +2000:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2001:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2002:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2003:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2004:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2005:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2006:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2007:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2008:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2009:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200A:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200B:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200C:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200D:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200E:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +200F:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2010:0000000000000000000000000000000000000000000000000000000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +2011:0000000000000000000000000000000000000000000000000000000000001FF81FF8000000000000000000000000000000000000000000000000000000000000 +2012:0000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000000000000000000000000000000000000000000000000000 +2013:0000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000000000000000000000000000000000000000000000000000 +2014:0000000000000000000000000000000000000000000000000000000000007FFC7FFC000000000000000000000000000000000000000000000000000000000000 +2015:0000000000000000000000000000000000000000000000000000000000007FFC7FFC000000000000000000000000000000000000000000000000000000000000 +2016:00000000000000000000000006600660066006600660066006600660066006600660066006600660066006600660066006600660000000000000000000000000 +2017:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003FFC3FFC000000003FFC3FFC +2018:000000000000000000C000C001800180018001800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2019:00000000000000000180018001800180030003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +201A:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180018001800180030003000000000000000000 +201B:0000000000000000018001800180018000C000C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +201C:0000000000000000061806180C300C300C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +201D:000000000000000006180618061806180C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +201E:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C300C300C300C30186018600000000000000000 +201F:000000000000000018601860186018600C300C300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2020:00000000000000000000000001800180018001801FF81FF801800180018001800180018001800180018001800180018001800180000000000000000000000000 +2021:00000000000000000000000001800180018001801FF81FF8018001800180018001800180018001801FF81FF80180018001800180000000000000000000000000 +2022:000000000000000000000000000000000000000000000000000003C007E007E007E007E003C00000000000000000000000000000000000000000000000000000 +2026:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000318C318C318C318C000000000000000000000000 +2030:0000000000000000000000001C303E30366036603EC01CC00180018003000300060006000C000C0019DC1BFE3376337663FE61DC000000000000000000000000 +2032:000000000000000001C001C001C00180018001800180018000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2033:00000000000000001C701C701C701860186018601860186000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2039:000000000000000000000000000000000000000000000000007000E001C0038007000E001C001C000E000700038001C000E00070000000000000000000000000 +203A:0000000000000000000000000000000000000000000000001C000E000700038001C000E00070007000E001C0038007000E001C00000000000000000000000000 +203C:0000000000000000000000000C300C300C300C300C300C300C300C300C300C300C300C300C300000000000000C300C300C300C30000000000000000000000000 +203E:000000003FFC3FFC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +2070:00000000000003C007E00C300C300C300C300C300C300C3007E003C0000000000000000000000000000000000000000000000000000000000000000000000000 +2071:01800180018000000780078001800180018001800180018007E007E0000000000000000000000000000000000000000000000000000000000000000000000000 +2074:0000000000000030007000F001F003B007300E300FF00FF000300030000000000000000000000000000000000000000000000000000000000000000000000000 +2075:0000000000000FE00FE00C000C000FE00FF0003000300C300FF007E0000000000000000000000000000000000000000000000000000000000000000000000000 +2076:00000000000003E007E00C000C000FE00FF00C300C300C300FF007E0000000000000000000000000000000000000000000000000000000000000000000000000 +2077:0000000000000FF00FF00C3000300060006000C000C0018001800180000000000000000000000000000000000000000000000000000000000000000000000000 +2078:00000000000007E00FF00C300C300FF007E00C300C300C300FF007E0000000000000000000000000000000000000000000000000000000000000000000000000 +2079:00000000000007E00FF00C300C300C300FF007F00030003007E007C0000000000000000000000000000000000000000000000000000000000000000000000000 +207A:000000000000000000000180018001800FF00FF00180018001800000000000000000000000000000000000000000000000000000000000000000000000000000 +207B:000000000000000000000000000000001FF01FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +207C:000000000000000000001FF01FF00000000000001FF01FF000000000000000000000000000000000000000000000000000000000000000000000000000000000 +207D:00000000000000C001800300030003000300030003000300018000C0000000000000000000000000000000000000000000000000000000000000000000000000 +207E:0000000000000300018000C000C000C000C000C000C000C001800300000000000000000000000000000000000000000000000000000000000000000000000000 +207F:00000000000000001FC01FE018301830183018301830183018301830000000000000000000000000000000000000000000000000000000000000000000000000 +2080:00000000000000000000000000000000000000000000000000000000000000000000000003C007E00C300C300C300C300C300C300C3007E003C0000000000000 +2081:00000000000000000000000000000000000000000000000000000000000000000000000001800380078007800180018001800180018007E007E0000000000000 +2082:00000000000000000000000000000000000000000000000000000000000000000000000007E00FF00C300C30007000E001C0038007000FF00FF0000000000000 +2083:00000000000000000000000000000000000000000000000000000000000000000000000007E00FF00C30003001E001E0003000300C300FF007E0000000000000 +2084:0000000000000000000000000000000000000000000000000000000000000000000000000030007000F001F003B007300E300FF00FF000300030000000000000 +2085:0000000000000000000000000000000000000000000000000000000000000000000000000FE00FE00C000C000FE00FF0003000300C300FF007E0000000000000 +2086:00000000000000000000000000000000000000000000000000000000000000000000000003E007E00C000C000FE00FF00C300C300C300FF007E0000000000000 +2087:0000000000000000000000000000000000000000000000000000000000000000000000000FF00FF00C3000300060006000C000C0018001800180000000000000 +2088:00000000000000000000000000000000000000000000000000000000000000000000000007E00FF00C300C300FF007E00C300C300C300FF007E0000000000000 +2089:00000000000000000000000000000000000000000000000000000000000000000000000007E00FF00C300C300C300FF007F00030003007E007C0000000000000 +208A:000000000000000000000000000000000000000000000000000000000000000000000000000000000180018001800FF00FF00180018001800000000000000000 +208B:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001FF01FF00000000000000000000000000000 +208C:000000000000000000000000000000000000000000000000000000000000000000000000000000001FF01FF00000000000001FF01FF000000000000000000000 +208D:00000000000000000000000000000000000000000000000000000000000000000000000000C001800300030003000300030003000300018000C0000000000000 +208E:0000000000000000000000000000000000000000000000000000000000000000000000000300018000C000C000C000C000C000C000C001800300000000000000 +2090:00000000000000000000000000000000000000000000000000000000000000000000000000000FC00FE0003000300FF01FF0183018301FF00FF0000000000000 +2091:000000000000000000000000000000000000000000000000000000000000000000000000000007C00FE0183018301FF01FF0180018000FF007E0000000000000 +2092:000000000000000000000000000000000000000000000000000000000000000000000000000007C00FE01830183018301830183018300FE007C0000000000000 +2093:000000000000000000000000000000000000000000000000000000000000000000000000000018301C700EE007C00380038007C00EE01C701830000000000000 +2094:00000000000000000000000000000000000000000000000000000000000000000000000000000FC01FE0003000301FF01FF0183018300FE007C0000000000000 +2095:00000000000000000000000000000000000000000000000000000000000018001800180018001FC01FE018301830183018301830183018301830000000000000 +2096:0000000000000000000000000000000000000000000000000000000000000C000C000C000C000C380C700CE00DC00F800F800DC00CE00C700C38000000000000 +2097:00000000000000000000000000000000000000000000000000000000000007800780018001800180018001800180018001800180018007E007E0000000000000 +2098:00000000000000000000000000000000000000000000000000000000000000000000000000003FF03FF8318C318C318C318C318C318C318C318C000000000000 +209A:00000000000000000000000000000000000000000000000000000000000000000000000000001FC01FE01830183018301830183018301FE01FC0180018001800 +20A7:0000000000000000000000007F007F8061C060C060C060C060C060C061C07FB07F30603061FE61FE6030603060306030603E601E000000000000000000000000 +20AC:00000000000000000000000003F007F80E1C1C0E380030003000FFC0FFC030003000FFC0FFC03000300038001C0E0E1C07F803F0000000000000000000000000 +20AE:0000000000000000000000003FFC3FFC0180018001800180018001B801F003C00FB81DF003C00F801D8001800180018001800180000000000000000000000000 +2102:0000000000000000000000000FF01FF83E1C360C360C3600360036003600360036003600360036003600360C360C3E1C1FF80FF0000000000000000000000000 +210E:0000000000000000000000003000300030003000300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +210F:00000000000000000000000030003000FF80FF80300030003FF03FF8301C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +2115:000000000000000000000000300C300C300C300C380C3C0C360C3B0C3D8C36CC336C31BC30DC306C303C301C300C300C300C300C000000000000000000000000 +2116:000000000000000000000000C180C19CC1BEE1B6E1B6F1BEF19CF980D980DD80CD80CF80C780C7BEC3BEC380C1BEC1BEC180C180000000000000000000000000 +211A:0000000000000000000000000FF01FF83E1C360C360C360C360C360C360C360C360C360C360C360C360C360C36CC3EFC1FF80FF8001C000E0000000000000000 +211D:0000000000000000000000003FF03FF8361C360C360C360C360C360C360C361C37F837F036C0376037B036D8366C3636361A3E0E000000000000000000000000 +2122:0000000000000000000000007E827EC618FE18D618C618C618C618C6000000000000000000000000000000000000000000000000000000000000000000000000 +2124:0000000000000000000000003FFC3FFC000C000C001C003C006C00D801B0036006C00D801B0036003C003800300030003FFC3FFC000000000000000000000000 +2126:0000000000000000000000000FF01FF8381C300C300C300C300C300C300C300C300C300C300C381C1C380E70066006603E7C3E7C000000000000000000000000 +2135:00000000000000000000000030303030181818180C0C0C0C06060E0E1F1C3B3871F061E060C060C0606060606030703038181C18000000000000000000000000 +2190:0000000000000000000000000000000000000000030007000E001C0038007FFE7FFE38001C000E00070003000000000000000000000000000000000000000000 +2191:000000000000000000000000018003C007E00FF01DB8399C318C0180018001800180018001800180018001800180018001800180000000000000000000000000 +2192:000000000000000000000000000000000000000000C000E000700038001C7FFE7FFE001C0038007000E000C00000000000000000000000000000000000000000 +2193:0000000000000000000000000180018001800180018001800180018001800180018001800180318C399C1DB80FF007E003C00180000000000000000000000000 +2194:000000000000000000000000000000000000000006600E701C38381C700EFFFFFFFF700E381C1C380E7006600000000000000000000000000000000000000000 +2195:000000000000000000000000018003C007E00FF01DB8399C318C018001800180018001800180318C399C1DB80FF007E003C00180000000000000000000000000 +21A4:0000000000000000000000000000000000000000030607060E061C0638067FFE7FFE38061C060E06070603060000000000000000000000000000000000000000 +21A6:000000000000000000000000000000000000000060C060E060706038601C7FFE7FFE601C6038607060E060C00000000000000000000000000000000000000000 +21A8:000000000000000000000000018003C007E00FF01DB8399C318C0180018001800180318C399C1DB80FF007E003C001803FFC3FFC000000000000000000000000 +21B5:000000000000000000000000000C000C000C000C000C000C000C000C030C070C0E0C1C0C380C7FFC7FFC38001C000E0007000300000000000000000000000000 +21BB:0000000000000000000000000000000000007F007F001F003B183318630C600C600C600C600C301838381FF00FE0000000000000000000000000000000000000 +21CB:0000000000000000000000000000000000000800180038007000FFFEFFFE00000000FFFEFFFE001C003800300020000000000000000000000000000000000000 +21CC:000000000000000000000000000000000000002000300038001CFFFEFFFE00000000FFFEFFFE7000380018000800000000000000000000000000000000000000 +21D0:000000000000000000000000000000000000000006000E001C003FFE7FFEF000F0007FFE3FFE1C000E0006000000000000000000000000000000000000000000 +21D1:000000000000000000000000018003C007E00FF01E783E7C366C0660066006600660066006600660066006600660066006600660000000000000000000000000 +21D2:000000000000000000000000000000000000000000C000E00070FFF8FFFC001E001EFFFCFFF8007000E000C00000000000000000000000000000000000000000 +21D3:0000000000000000000000000660066006600660066006600660066006600660066006600660366C3E7C1E780FF007E003C00180000000000000000000000000 +21D4:000000000000000000000000000000000000000006600E701C383FFC7FFEF00FF00F7FFE3FFC1C380E7006600000000000000000000000000000000000000000 +21D5:000000000000000000000000018003C007E00FF01E783E7C366C066006600660066006600660366C3E7C1E780FF007E003C00180000000000000000000000000 +2200:000000000000000000000000600C600C600C600C301830183FF83FF81830183018300C600C600C6006C006C006C0038003800380000000000000000000000000 +2203:0000000000000000000000003FFC3FFC000C000C000C000C000C000C000C3FFC3FFC000C000C000C000C000C000C000C3FFC3FFC000000000000000000000000 +2204:000000000000000C000C001C3FFC3FFC003C006C006C00CC00CC018C018C3FFC3FFC030C030C060C060C0C0C0C0C180C3FFC3FFC300060006000000000000000 +2205:00000000000000000000000000180018003000300FE01FF030D830D83198319833183318361836181FF00FE01800180030003000000000000000000000000000 +2206:00000000000000000000000001800180018003C003C003C00660066006600C300C300C30181818181818300C300C300C3FFC3FFC000000000000000000000000 +2207:0000000000000000000000003FFC3FFC300C300C300C1818181818180C300C300C3006600660066003C003C003C0018001800180000000000000000000000000 +2208:00000000000000000000000001FC07FC0E001800180030003000300030003FFC3FFC3000300030003000180018000E0007FC01FC000000000000000000000000 +2209:00000000000000060006000C01FC07FC0E18183018303060306030C030C03FFC3FFC318031803300330016001E000E000FFC19FC180030003000000000000000 +220A:00000000000000000000000000000000000003FC0FFC1C001800300030003FFC3FFC3000300018001C000FFC03FC000000000000000000000000000000000000 +220B:0000000000000000000000003F803FE0007000180018000C000C000C000C3FFC3FFC000C000C000C000C0018001800703FE03F80000000000000000000000000 +220C:0000000000006000600030003F803FE018700C180C18060C060C030C030C3FFC3FFC018C018C00CC00CC0068007800703FF03F980018000C000C000000000000 +220D:0000000000000000000000000000000000003FC03FF000380018000C000C3FFC3FFC000C000C001800383FF03FC0000000000000000000000000000000000000 +2212:0000000000000000000000000000000000000000000000000000000000003FFC3FFC000000000000000000000000000000000000000000000000000000000000 +2213:00000000000000000000000000000000000000003FFC3FFC00000000018001800180018001803FFC3FFC01800180018001800180000000000000000000000000 +2214:00000000000000000000000000000000018001800180018000000000018001800180018001803FFC3FFC01800180018001800180000000000000000000000000 +2215:0000000000000000000000000000000000000000000C001C0038007000E001C0038007000E001C00380070006000000000000000000000000000000000000000 +2216:00000000000000000000000000000000000000006000700038001C000E000700038001C000E000700038001C000C000000000000000000000000000000000000 +2219:0000000000000000000000000000000000000000000000000000038007C007C007C0038000000000000000000000000000000000000000000000000000000000 +221A:000000000000001E001E001800180018001800180018001800180018001830183018301838181C180E180718039801D800F80078000000000000000000000000 +221E:000000000000000000000000000000000000000000001E783FFC73CE618661866186618673CE3FFC1E7800000000000000000000000000000000000000000000 +221F:000000000000000000000000000000000000000030003000300030003000300030003000300030003FFC3FFC0000000000000000000000000000000000000000 +2225:00000000000000000000000006600660066006600660066006600660066006600660066006600660066006600660066006600660000000000000000000000000 +2227:0000000000000000000000000000000000000000000000000180018003C003C0066006600C300C300C30181818181818300C300C000000000000000000000000 +2228:000000000000000000000000000000000000000000000000300C300C1818181818180C300C300C300660066003C003C001800180000000000000000000000000 +2229:000000000000000000000000000000000000000007E00FF01C381818300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +222A:0000000000000000000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C18181C380FF007E0000000000000000000000000 +2248:000000000000000000000000000000000000000000001F0C3F9C39FC30F8000000001F0C3F9C39FC30F800000000000000000000000000000000000000000000 +2260:0000000000000000000000000000000000000000001C00387FFC7FFC00E001C0038007007FFC7FFC380070000000000000000000000000000000000000000000 +2261:0000000000000000000000000000000000003FFC3FFC00000000000000003FFC3FFC00000000000000003FFC3FFC000000000000000000000000000000000000 +2264:0000000000000000000000000038007000E001C0038007000E001C001C000E000700038001C000E000700038000000003FFC3FFC000000000000000000000000 +2265:0000000000000000000000001C000E000700038001C000E0007000380038007000E001C0038007000E001C00000000003FFC3FFC000000000000000000000000 +226A:000000000000000000000000000000C301C7038E071C0E381C7038E071C0E380E38071C038E01C700E38071C038E01C700C30000000000000000000000000000 +226B:0000000000000000000000000000C300E38071C038E01C700E38071C038E01C701C7038E071C0E381C7038E071C0E380C3000000000000000000000000000000 +2282:00000000000000000000000000000000000007FC1FFC38007000600060006000600060006000700038001FFC07FC000000000000000000000000000000000000 +2283:0000000000000000000000000000000000007FC07FF00038001C000C000C000C000C000C000C001C00387FF07FC0000000000000000000000000000000000000 +2286:000000000000000000000000000007FC1FFC38007000600060006000600060006000700038001FFC07FC000000007FFC7FFC0000000000000000000000000000 +2287:00000000000000000000000000007FC07FF00038001C000C000C000C000C000C000C001C00387FF07FC0000000007FFC7FFC0000000000000000000000000000 +22A5:0000000000000000000000000000000000000000018001800180018001800180018001800180018001800180018001803FFC3FFC000000000000000000000000 +22C2:00000000000000000000000007E00FF01C381818300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C000000000000000000000000 +22C3:000000000000000000000000300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C300C18181C380FF007E0000000000000000000000000 +2300:00000000000000000000000000180018003000300FE01FF030D830D83198319833183318361836181FF00FE01800180030003000000000000000000000000000 +2302:0000000000000000000000000000000000000000018003C007E00E701C38381C700E60066006600660066006600660067FFE7FFE000000000000000000000000 +2308:0000000000000000000000000FE00FE00C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C00000000000000000000000000 +2309:0000000000000000000000000FE00FE0006000600060006000600060006000600060006000600060006000600060006000600060000000000000000000000000 +230A:0000000000000000000000000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000FE00FE0000000000000000000000000 +230B:0000000000000000000000000060006000600060006000600060006000600060006000600060006000600060006000600FE00FE0000000000000000000000000 +2310:0000000000000000000000000000000000000000000000003FFC3FFC300030003000300030003000000000000000000000000000000000000000000000000000 +2319:0000000000000000000000000000000000000000000000003000300030003000300030003FFC3FFC000000000000000000000000000000000000000000000000 +2320:00000000000000000000000000F801FC018C018C0180018001800180018001800180018001800180018001800180018001800180018001800180018001800180 +2321:0180018001800180018001800180018001800180018001800180018001800180018001800180018001800180318031803F801F00000000000000000000000000 +239B:00180030006000C001800180030003000600060006000C000C000C000C0018001800180018001800180018001800180018001800180018001800180018001800 +239C:18001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800 +239D:180018001800180018001800180018001800180018001800180018001800180018000C000C000C000C00060006000600030003000180018000C0006000300018 +239E:18000C00060003000180018000C000C0006000600060003000300030003000180018001800180018001800180018001800180018001800180018001800180018 +239F:00180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018 +23A0:00180018001800180018001800180018001800180018001800180018001800180018003000300030003000600060006000C000C001800180030006000C001800 +23A1:1FF81FF8180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800 +23A2:18001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800 +23A3:1800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001FF81FF8 +23A4:1FF81FF8001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018 +23A5:00180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018 +23A6:0018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800181FF81FF8 +23A7:007E01FE038003000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600 +23A8:06000600060006000600060006000600060006000600060006000E001C00F800F8001C000E000600060006000600060006000600060006000600060006000600 +23A9:06000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000300038001FE007E +23AB:FC00FF000380018000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C0 +23AC:00C000C000C000C000C000C000C000C000C000C000C000C000C000C00060003E003E006000C000C000C000C000C000C000C000C000C000C000C000C000C000C0 +23AD:00C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C001800380FF00FC00 +23AE:01800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180 +23AF:000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +23BA:FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +23BB:00000000000000000000000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +23BC:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF00000000000000000000000000000000 +23BD:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF +23D0:01800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180 +2409:0000000000000000000000006180618061807F807F8061806180618061800000000003FC03FC0060006000600060006000600060000000000000000000000000 +240A:00000000000000000000000060006000600060006000600060007F807F800000000003FC03FC0300030003F003F0030003000300000000000000000000000000 +240B:00000000000000000000000061806180618061806180618033001E000C000000000003FC03FC0060006000600060006000600060000000000000000000000000 +240C:0000000000000000000000007F807F80600060007E007E006000600060000000000003FC03FC0300030003F003F0030003000300000000000000000000000000 +240D:0000000000000000000000003F007F80618060006000600061807F803F000000000003F803FC030C030C03F803E003700338031C000000000000000000000000 +2424:00000000000000000000000061806180718079806D80678063806180618000000000030003000300030003000300030003FC03FC000000000000000000000000 +2500:000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +2501:00000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000000000000 +2502:01800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180 +2503:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2508:000000000000000000000000000000000000000000000000000000000000F7DEF7DE000000000000000000000000000000000000000000000000000000000000 +2509:00000000000000000000000000000000000000000000000000000000F7DEF7DEF7DEF7DE00000000000000000000000000000000000000000000000000000000 +250A:01800180018001800180018000000000018001800180018001800180000000000180018001800180018001800000000001800180018001800180018000000000 +250B:03C003C003C003C003C003C00000000003C003C003C003C003C003C00000000003C003C003C003C003C003C00000000003C003C003C003C003C003C000000000 +250C:00000000000000000000000000000000000000000000000000000000000001FF01FF018001800180018001800180018001800180018001800180018001800180 +250D:0000000000000000000000000000000000000000000000000000000001FF01FF01FF01FF01800180018001800180018001800180018001800180018001800180 +250E:00000000000000000000000000000000000000000000000000000000000003FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +250F:0000000000000000000000000000000000000000000000000000000003FF03FF03FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2510:000000000000000000000000000000000000000000000000000000000000FF80FF80018001800180018001800180018001800180018001800180018001800180 +2511:00000000000000000000000000000000000000000000000000000000FF80FF80FF80FF8001800180018001800180018001800180018001800180018001800180 +2512:000000000000000000000000000000000000000000000000000000000000FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2513:00000000000000000000000000000000000000000000000000000000FFC0FFC0FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2514:01800180018001800180018001800180018001800180018001800180018001FF01FF000000000000000000000000000000000000000000000000000000000000 +2515:0180018001800180018001800180018001800180018001800180018001FF01FF01FF01FF00000000000000000000000000000000000000000000000000000000 +2516:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF000000000000000000000000000000000000000000000000000000000000 +2517:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF03FF03FF00000000000000000000000000000000000000000000000000000000 +2518:018001800180018001800180018001800180018001800180018001800180FF80FF80000000000000000000000000000000000000000000000000000000000000 +2519:01800180018001800180018001800180018001800180018001800180FF80FF80FF80FF8000000000000000000000000000000000000000000000000000000000 +251A:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0000000000000000000000000000000000000000000000000000000000000 +251B:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0FFC0FFC000000000000000000000000000000000000000000000000000000000 +251C:01800180018001800180018001800180018001800180018001800180018001FF01FF018001800180018001800180018001800180018001800180018001800180 +251D:0180018001800180018001800180018001800180018001800180018001FF01FF01FF01FF01800180018001800180018001800180018001800180018001800180 +251E:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF018001800180018001800180018001800180018001800180018001800180 +251F:01800180018001800180018001800180018001800180018001800180018003FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2520:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2521:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF03FF03FF01800180018001800180018001800180018001800180018001800180 +2522:0180018001800180018001800180018001800180018001800180018003FF03FF03FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2523:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FF03FF03FF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2524:018001800180018001800180018001800180018001800180018001800180FF80FF80018001800180018001800180018001800180018001800180018001800180 +2525:01800180018001800180018001800180018001800180018001800180FF80FF80FF80FF8001800180018001800180018001800180018001800180018001800180 +2526:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0018001800180018001800180018001800180018001800180018001800180 +2527:018001800180018001800180018001800180018001800180018001800180FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2528:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2529:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0FFC0FFC001800180018001800180018001800180018001800180018001800180 +252A:01800180018001800180018001800180018001800180018001800180FFC0FFC0FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +252B:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFC0FFC0FFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +252C:000000000000000000000000000000000000000000000000000000000000FFFFFFFF018001800180018001800180018001800180018001800180018001800180 +252D:00000000000000000000000000000000000000000000000000000000FF80FFFFFFFFFF8001800180018001800180018001800180018001800180018001800180 +252E:0000000000000000000000000000000000000000000000000000000001FFFFFFFFFF01FF01800180018001800180018001800180018001800180018001800180 +252F:00000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF01800180018001800180018001800180018001800180018001800180 +2530:000000000000000000000000000000000000000000000000000000000000FFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2531:00000000000000000000000000000000000000000000000000000000FFC0FFFFFFFFFFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2532:0000000000000000000000000000000000000000000000000000000003FFFFFFFFFF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2533:00000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2534:018001800180018001800180018001800180018001800180018001800180FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +2535:01800180018001800180018001800180018001800180018001800180FF80FFFFFFFFFF8000000000000000000000000000000000000000000000000000000000 +2536:0180018001800180018001800180018001800180018001800180018001FFFFFFFFFF01FF00000000000000000000000000000000000000000000000000000000 +2537:01800180018001800180018001800180018001800180018001800180FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000000000000 +2538:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +2539:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFFFFFFFFFC000000000000000000000000000000000000000000000000000000000 +253A:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FFFFFFFFFF03FF00000000000000000000000000000000000000000000000000000000 +253B:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000000000000 +253C:018001800180018001800180018001800180018001800180018001800180FFFFFFFF018001800180018001800180018001800180018001800180018001800180 +253D:01800180018001800180018001800180018001800180018001800180FF80FFFFFFFFFF8001800180018001800180018001800180018001800180018001800180 +253E:0180018001800180018001800180018001800180018001800180018001FFFFFFFFFF01FF01800180018001800180018001800180018001800180018001800180 +253F:01800180018001800180018001800180018001800180018001800180FFFFFFFFFFFFFFFF01800180018001800180018001800180018001800180018001800180 +2540:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFF018001800180018001800180018001800180018001800180018001800180 +2541:018001800180018001800180018001800180018001800180018001800180FFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2542:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2543:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFFFFFFFFF8001800180018001800180018001800180018001800180018001800180 +2544:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FFFFFFFFFF01FF01800180018001800180018001800180018001800180018001800180 +2545:01800180018001800180018001800180018001800180018001800180FF80FFFFFFFFFFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2546:0180018001800180018001800180018001800180018001800180018001FFFFFFFFFF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2547:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFFFFFFFFFF01800180018001800180018001800180018001800180018001800180 +2548:01800180018001800180018001800180018001800180018001800180FFFFFFFFFFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2549:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFC0FFFFFFFFFFC003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +254A:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003FFFFFFFFFF03FF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +254B:03C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFFFFFFFFFF03C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +2550:0000000000000000000000000000000000000000000000000000FFFFFFFF00000000FFFFFFFF0000000000000000000000000000000000000000000000000000 +2551:06600660066006600660066006600660066006600660066006600660066006600660066006600660066006600660066006600660066006600660066006600660 +2552:000000000000000000000000000000000000000000000000000001FF01FF0180018001FF01FF0180018001800180018001800180018001800180018001800180 +2553:00000000000000000000000000000000000000000000000000000000000007FF07FF066006600660066006600660066006600660066006600660066006600660 +2554:000000000000000000000000000000000000000000000000000007FF07FF06000600067F067F0660066006600660066006600660066006600660066006600660 +2555:0000000000000000000000000000000000000000000000000000FF80FF8001800180FF80FF800180018001800180018001800180018001800180018001800180 +2556:000000000000000000000000000000000000000000000000000000000000FFE0FFE0066006600660066006600660066006600660066006600660066006600660 +2557:0000000000000000000000000000000000000000000000000000FFE0FFE000600060FE60FE600660066006600660066006600660066006600660066006600660 +2558:018001800180018001800180018001800180018001800180018001FF01FF0180018001FF01FF0000000000000000000000000000000000000000000000000000 +2559:06600660066006600660066006600660066006600660066006600660066007FF07FF000000000000000000000000000000000000000000000000000000000000 +255A:0660066006600660066006600660066006600660066006600660067F067F0600060007FF07FF0000000000000000000000000000000000000000000000000000 +255B:0180018001800180018001800180018001800180018001800180FF80FF8001800180FF80FF800000000000000000000000000000000000000000000000000000 +255C:066006600660066006600660066006600660066006600660066006600660FFE0FFE0000000000000000000000000000000000000000000000000000000000000 +255D:0660066006600660066006600660066006600660066006600660FE60FE6000600060FFE0FFE00000000000000000000000000000000000000000000000000000 +255E:018001800180018001800180018001800180018001800180018001FF01FF0180018001FF01FF0180018001800180018001800180018001800180018001800180 +255F:066006600660066006600660066006600660066006600660066006600660067F067F066006600660066006600660066006600660066006600660066006600660 +2560:0660066006600660066006600660066006600660066006600660067F067F06000600067F067F0660066006600660066006600660066006600660066006600660 +2561:0180018001800180018001800180018001800180018001800180FF80FF8001800180FF80FF800180018001800180018001800180018001800180018001800180 +2562:066006600660066006600660066006600660066006600660066006600660FE60FE60066006600660066006600660066006600660066006600660066006600660 +2563:0660066006600660066006600660066006600660066006600660FE60FE6000600060FE60FE600660066006600660066006600660066006600660066006600660 +2564:0000000000000000000000000000000000000000000000000000FFFFFFFF00000000FFFFFFFF0180018001800180018001800180018001800180018001800180 +2565:000000000000000000000000000000000000000000000000000000000000FFFFFFFF066006600660066006600660066006600660066006600660066006600660 +2566:0000000000000000000000000000000000000000000000000000FFFFFFFF00000000FE7FFE7F0660066006600660066006600660066006600660066006600660 +2567:0180018001800180018001800180018001800180018001800180FFFFFFFF00000000FFFFFFFF0000000000000000000000000000000000000000000000000000 +2568:066006600660066006600660066006600660066006600660066006600660FFFFFFFF000000000000000000000000000000000000000000000000000000000000 +2569:0660066006600660066006600660066006600660066006600660FE7FFE7F00000000FFFFFFFF0000000000000000000000000000000000000000000000000000 +256A:0180018001800180018001800180018001800180018001800180FFFFFFFF01800180FFFFFFFF0180018001800180018001800180018001800180018001800180 +256B:066006600660066006600660066006600660066006600660066006600660FFFFFFFF066006600660066006600660066006600660066006600660066006600660 +256C:0660066006600660066006600660066006600660066006600660FE7FFE7F00000000FE7FFE7F0660066006600660066006600660066006600660066006600660 +256D:000000000000000000000000000000000000000000000000000000000000000F003F007800E000C001C001800180018001800180018001800180018001800180 +256E:000000000000000000000000000000000000000000000000000000000000F000FC001E0007000300038001800180018001800180018001800180018001800180 +256F:018001800180018001800180018001800180018001800380030007001E00FC00F000000000000000000000000000000000000000000000000000000000000000 +2570:0180018001800180018001800180018001800180018001C000C000E00078003F000F000000000000000000000000000000000000000000000000000000000000 +2571:00010003000300060006000C000C00180018003000300060006000C000C00180018003000300060006000C000C00180018003000300060006000C000C0008000 +2572:8000C000C0006000600030003000180018000C000C0006000600030003000180018000C000C0006000600030003000180018000C000C00060006000300030001 +2573:8001C003C00360066006300C300C181818180C300C300660066003C003C00180018003C003C0066006600C300C3018181818300C300C60066006C003C0038001 +2574:000000000000000000000000000000000000000000000000000000000000FF80FF80000000000000000000000000000000000000000000000000000000000000 +2575:01800180018001800180018001800180018001800180018001800180018001800180000000000000000000000000000000000000000000000000000000000000 +2576:00000000000000000000000000000000000000000000000000000000000001FF01FF000000000000000000000000000000000000000000000000000000000000 +2577:00000000000000000000000000000000000000000000000000000000000001800180018001800180018001800180018001800180018001800180018001800180 +2578:00000000000000000000000000000000000000000000000000000000FF80FF80FF80FF8000000000000000000000000000000000000000000000000000000000 +2579:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0000000000000000000000000000000000000000000000000000000000000 +257A:0000000000000000000000000000000000000000000000000000000001FF01FF01FF01FF00000000000000000000000000000000000000000000000000000000 +257B:00000000000000000000000000000000000000000000000000000000000003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +257C:0000000000000000000000000000000000000000000000000000000001FFFFFFFFFF01FF00000000000000000000000000000000000000000000000000000000 +257D:01800180018001800180018001800180018001800180018001800180018003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0 +257E:00000000000000000000000000000000000000000000000000000000FF80FFFFFFFFFF8000000000000000000000000000000000000000000000000000000000 +257F:03C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C003C0018001800180018001800180018001800180018001800180018001800180 +2580:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000000000000 +2581:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFF +2582:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2583:00000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2584:0000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2585:000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2586:00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2587:0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2588:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +2589:FFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFCFFFC +258A:FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0 +258B:FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0FFC0 +258C:FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 +258D:FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00FC00 +258E:F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000 +258F:C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000 +2590:00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF +2591:AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000AAAA0000 +2592:AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555AAAA5555 +2593:FFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAAFFFFAAAA +2596:0000000000000000000000000000000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Mar 4 22:01:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 074B6F37A7E; Sun, 4 Mar 2018 22:01:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1DB07275A; Sun, 4 Mar 2018 22:01:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACE7F1B1CD; Sun, 4 Mar 2018 22:01:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24M1NN9000731; Sun, 4 Mar 2018 22:01:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24M1N0U000730; Sun, 4 Mar 2018 22:01:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201803042201.w24M1N0U000730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 4 Mar 2018 22:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330418 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 22:01:24 -0000 Author: mjg Date: Sun Mar 4 22:01:23 2018 New Revision: 330418 URL: https://svnweb.freebsd.org/changeset/base/330418 Log: mtx: tidy up recursion handling in thread lock Normally after grabbing the lock it has to be verified we got the right one to begin with. However, if we are recursing, it must not change thus the check can be avoided. In particular this avoids a lock read for non-recursing case which found out the lock was changed. While here avoid an irq trip of this happens. Tested by: pho (previous version) Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Mar 4 21:58:55 2018 (r330417) +++ head/sys/kern/kern_mutex.c Sun Mar 4 22:01:23 2018 (r330418) @@ -829,10 +829,8 @@ _thread_lock(struct thread *td) WITNESS_LOCK(&m->lock_object, LOP_EXCLUSIVE, file, line); return; } - if (m->mtx_recurse != 0) - m->mtx_recurse--; - else - _mtx_release_lock_quick(m); + MPASS(m->mtx_recurse == 0); + _mtx_release_lock_quick(m); slowpath_unlocked: spinlock_exit(); slowpath_noirq: @@ -886,9 +884,10 @@ thread_lock_flags_(struct thread *td, int opts, const if (__predict_false(doing_lockprof)) spin_time -= lockstat_nsecs(&td->td_lock->lock_object); #endif + spinlock_enter(); + for (;;) { retry: - spinlock_enter(); m = td->td_lock; thread_lock_validate(m, opts, file, line); v = MTX_READ_VALUE(m); @@ -900,6 +899,7 @@ retry: } if (v == tid) { m->mtx_recurse++; + MPASS(m == td->td_lock); break; } lock_profile_obtain_lock_failed(&m->lock_object, @@ -912,15 +912,18 @@ retry: } else { _mtx_lock_indefinite_check(m, &lda); } - if (m != td->td_lock) + if (m != td->td_lock) { + spinlock_enter(); goto retry; + } v = MTX_READ_VALUE(m); } while (v != MTX_UNOWNED); spinlock_enter(); } if (m == td->td_lock) break; - __mtx_unlock_spin(m); /* does spinlock_exit() */ + MPASS(m->mtx_recurse == 0); + _mtx_release_lock_quick(m); } LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); From owner-svn-src-all@freebsd.org Sun Mar 4 22:14:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF173F3898F; Sun, 4 Mar 2018 22:14:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B90B17313D; Sun, 4 Mar 2018 22:14:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3E7F1B4C7; Sun, 4 Mar 2018 22:14:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24MEKPo008544; Sun, 4 Mar 2018 22:14:20 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24MEKM0008543; Sun, 4 Mar 2018 22:14:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201803042214.w24MEKM0008543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 4 Mar 2018 22:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330419 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330419 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 22:14:21 -0000 Author: mjg Date: Sun Mar 4 22:14:20 2018 New Revision: 330419 URL: https://svnweb.freebsd.org/changeset/base/330419 Log: lockmgr: whack unused lockmgr_note_exclusive_upgrade Modified: head/sys/kern/kern_lock.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Sun Mar 4 22:01:23 2018 (r330418) +++ head/sys/kern/kern_lock.c Sun Mar 4 22:14:20 2018 (r330419) @@ -234,18 +234,6 @@ lockmgr_note_exclusive_release(struct lock *lk, const TD_LOCKS_DEC(curthread); } -static void -lockmgr_note_exclusive_upgrade(struct lock *lk, const char *file, int line, - int flags) -{ - - LOCK_LOG_LOCK("XUPGRADE", &lk->lock_object, 0, 0, file, - line); - WITNESS_UPGRADE(&lk->lock_object, LOP_EXCLUSIVE | - LK_TRYWIT(flags), file, line); - TD_SLOCKS_DEC(curthread); -} - static __inline struct thread * lockmgr_xholder(const struct lock *lk) { From owner-svn-src-all@freebsd.org Sun Mar 4 23:25:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8188F3DDA0; Sun, 4 Mar 2018 23:25:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73C8175E16; Sun, 4 Mar 2018 23:25:26 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 676881BFF7; Sun, 4 Mar 2018 23:25:26 +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 w24NPQkx044741; Sun, 4 Mar 2018 23:25:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NPQj7044740; Sun, 4 Mar 2018 23:25:26 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042325.w24NPQj7044740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330420 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 330420 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:25:27 -0000 Author: bdrewery Date: Sun Mar 4 23:25:26 2018 New Revision: 330420 URL: https://svnweb.freebsd.org/changeset/base/330420 Log: MFC r325570: AUTO_OBJ: Fix 'old style' kernel builds using wrong .OBJDIR. Modified: stable/11/sys/conf/kern.pre.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kern.pre.mk ============================================================================== --- stable/11/sys/conf/kern.pre.mk Sun Mar 4 22:14:20 2018 (r330419) +++ stable/11/sys/conf/kern.pre.mk Sun Mar 4 23:25:26 2018 (r330420) @@ -24,6 +24,9 @@ _srcconf_included_: .MAKE.MODE+= curdirOk=yes .endif +# The kernel build always expects .OBJDIR=.CURDIR. +.OBJDIR: ${.CURDIR} + # Can be overridden by makeoptions or /etc/make.conf KERNEL_KO?= kernel KERNEL?= kernel From owner-svn-src-all@freebsd.org Sun Mar 4 23:28:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D2D7F3E0EF; Sun, 4 Mar 2018 23:28:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BBAB375FF4; Sun, 4 Mar 2018 23:28:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF3151BFF8; Sun, 4 Mar 2018 23:28:42 +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 w24NSgnb044990; Sun, 4 Mar 2018 23:28:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NSgv1044988; Sun, 4 Mar 2018 23:28:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042328.w24NSgv1044988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330421 - in stable/11: contrib/netbsd-tests/lib/libc/sys sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in stable/11: contrib/netbsd-tests/lib/libc/sys sys/kern X-SVN-Commit-Revision: 330421 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:28:43 -0000 Author: bdrewery Date: Sun Mar 4 23:28:42 2018 New Revision: 330421 URL: https://svnweb.freebsd.org/changeset/base/330421 Log: MFC r329271: nanosleep(2): Fix bogus incrementing of rmtp by tc_tick_sbt on [EINTR]. Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c stable/11/sys/kern/kern_time.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c Sun Mar 4 23:25:26 2018 (r330420) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c Sun Mar 4 23:28:42 2018 (r330421) @@ -50,6 +50,15 @@ handler(int signo __unused) /* Nothing. */ } +static int got_info; +static void +info_handler(int signo __unused) +{ + + got_info = 1; +} + + ATF_TC(nanosleep_basic); ATF_TC_HEAD(nanosleep_basic, tc) { @@ -176,12 +185,84 @@ ATF_TC_BODY(nanosleep_sig, tc) atf_tc_fail("signal did not interrupt nanosleep(2)"); } +ATF_TC(nanosleep_eintr); +ATF_TC_HEAD(nanosleep_eintr, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test [EINTR] for nanosleep(2)"); + atf_tc_set_md_var(tc, "timeout", "7"); +} + +ATF_TC_BODY(nanosleep_eintr, tc) +{ + struct sigaction act; + struct timespec tso, ts; + pid_t pid; + int sta; + + /* + * Test that [EINTR] properly handles rmtp for nanosleep(2). + */ + pid = fork(); + + ATF_REQUIRE(pid >= 0); + + got_info = 0; + + if (pid == 0) { + act.sa_handler = info_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; /* Don't allow restart. */ + ATF_REQUIRE(sigaction(SIGINFO, &act, NULL) == 0); + + tso.tv_sec = 5; + tso.tv_nsec = 0; + + ts.tv_sec = tso.tv_sec; + ts.tv_nsec = tso.tv_nsec; + + errno = 0; + while (nanosleep(&ts, &ts) != 0) { + ATF_REQUIRE_MSG(timespeccmp(&ts, &tso, <=), + "errno=%d ts=%0.9f should be <= last tso=%0.9f\n", + errno, + ts.tv_sec + ts.tv_nsec / 1e9, + tso.tv_sec + tso.tv_nsec / 1e9); + if (errno == EINTR && got_info == 1) { + got_info = 0; + errno = 0; + tso.tv_sec = ts.tv_sec; + tso.tv_nsec = ts.tv_nsec; + continue; + } + _exit(EXIT_FAILURE); + } + + if (errno != 0) + _exit(EXIT_FAILURE); + + _exit(EXIT_SUCCESS); + } + + /* Flood the process with SIGINFO until it exits. */ + do { + for (int i = 0; i < 10; i++) + ATF_REQUIRE(kill(pid, SIGINFO) == 0); + ATF_REQUIRE(usleep(10000) == 0); + } while (waitpid(pid, &sta, WNOHANG) == 0); + + ATF_REQUIRE(WIFEXITED(sta) == 1); + + if (WEXITSTATUS(sta) != EXIT_SUCCESS) + atf_tc_fail("nanosleep(2) handled rtmp incorrectly"); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, nanosleep_basic); ATF_TP_ADD_TC(tp, nanosleep_err); ATF_TP_ADD_TC(tp, nanosleep_sig); + ATF_TP_ADD_TC(tp, nanosleep_eintr); return atf_no_error(); } Modified: stable/11/sys/kern/kern_time.c ============================================================================== --- stable/11/sys/kern/kern_time.c Sun Mar 4 23:25:26 2018 (r330420) +++ stable/11/sys/kern/kern_time.c Sun Mar 4 23:28:42 2018 (r330421) @@ -554,7 +554,8 @@ kern_clock_nanosleep(struct thread *td, clockid_t cloc } while (error == 0 && is_abs_real && td->td_rtcgen == 0); td->td_rtcgen = 0; if (error != EWOULDBLOCK) { - TIMESEL(&sbtt, tmp); + if (TIMESEL(&sbtt, tmp)) + sbtt += tc_tick_sbt; if (sbtt >= sbt) return (0); if (error == ERESTART) From owner-svn-src-all@freebsd.org Sun Mar 4 23:31:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81AA2F3E3FC; Sun, 4 Mar 2018 23:31:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3031E76330; Sun, 4 Mar 2018 23:31:26 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AF0D1C03C; Sun, 4 Mar 2018 23:31:26 +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 w24NVPTO045224; Sun, 4 Mar 2018 23:31:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NVPcr045222; Sun, 4 Mar 2018 23:31:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042331.w24NVPcr045222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330422 - in stable/10: contrib/netbsd-tests/lib/libc/sys sys/kern X-SVN-Group: stable-10 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in stable/10: contrib/netbsd-tests/lib/libc/sys sys/kern X-SVN-Commit-Revision: 330422 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:31:26 -0000 Author: bdrewery Date: Sun Mar 4 23:31:25 2018 New Revision: 330422 URL: https://svnweb.freebsd.org/changeset/base/330422 Log: MFC r329271: nanosleep(2): Fix bogus incrementing of rmtp by tc_tick_sbt on [EINTR]. Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c stable/10/sys/kern/kern_time.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c Sun Mar 4 23:28:42 2018 (r330421) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c Sun Mar 4 23:31:25 2018 (r330422) @@ -50,6 +50,15 @@ handler(int signo __unused) /* Nothing. */ } +static int got_info; +static void +info_handler(int signo __unused) +{ + + got_info = 1; +} + + ATF_TC(nanosleep_basic); ATF_TC_HEAD(nanosleep_basic, tc) { @@ -176,12 +185,84 @@ ATF_TC_BODY(nanosleep_sig, tc) atf_tc_fail("signal did not interrupt nanosleep(2)"); } +ATF_TC(nanosleep_eintr); +ATF_TC_HEAD(nanosleep_eintr, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test [EINTR] for nanosleep(2)"); + atf_tc_set_md_var(tc, "timeout", "7"); +} + +ATF_TC_BODY(nanosleep_eintr, tc) +{ + struct sigaction act; + struct timespec tso, ts; + pid_t pid; + int sta; + + /* + * Test that [EINTR] properly handles rmtp for nanosleep(2). + */ + pid = fork(); + + ATF_REQUIRE(pid >= 0); + + got_info = 0; + + if (pid == 0) { + act.sa_handler = info_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; /* Don't allow restart. */ + ATF_REQUIRE(sigaction(SIGINFO, &act, NULL) == 0); + + tso.tv_sec = 5; + tso.tv_nsec = 0; + + ts.tv_sec = tso.tv_sec; + ts.tv_nsec = tso.tv_nsec; + + errno = 0; + while (nanosleep(&ts, &ts) != 0) { + ATF_REQUIRE_MSG(timespeccmp(&ts, &tso, <=), + "errno=%d ts=%0.9f should be <= last tso=%0.9f\n", + errno, + ts.tv_sec + ts.tv_nsec / 1e9, + tso.tv_sec + tso.tv_nsec / 1e9); + if (errno == EINTR && got_info == 1) { + got_info = 0; + errno = 0; + tso.tv_sec = ts.tv_sec; + tso.tv_nsec = ts.tv_nsec; + continue; + } + _exit(EXIT_FAILURE); + } + + if (errno != 0) + _exit(EXIT_FAILURE); + + _exit(EXIT_SUCCESS); + } + + /* Flood the process with SIGINFO until it exits. */ + do { + for (int i = 0; i < 10; i++) + ATF_REQUIRE(kill(pid, SIGINFO) == 0); + ATF_REQUIRE(usleep(10000) == 0); + } while (waitpid(pid, &sta, WNOHANG) == 0); + + ATF_REQUIRE(WIFEXITED(sta) == 1); + + if (WEXITSTATUS(sta) != EXIT_SUCCESS) + atf_tc_fail("nanosleep(2) handled rtmp incorrectly"); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, nanosleep_basic); ATF_TP_ADD_TC(tp, nanosleep_err); ATF_TP_ADD_TC(tp, nanosleep_sig); + ATF_TP_ADD_TC(tp, nanosleep_eintr); return atf_no_error(); } Modified: stable/10/sys/kern/kern_time.c ============================================================================== --- stable/10/sys/kern/kern_time.c Sun Mar 4 23:28:42 2018 (r330421) +++ stable/10/sys/kern/kern_time.c Sun Mar 4 23:31:25 2018 (r330422) @@ -510,7 +510,8 @@ kern_nanosleep(struct thread *td, struct timespec *rqt if (error != EWOULDBLOCK) { if (error == ERESTART) error = EINTR; - TIMESEL(&sbtt, tmp); + if (TIMESEL(&sbtt, tmp)) + sbtt += tc_tick_sbt; if (rmt != NULL) { ts = sbttots(sbt - sbtt); ts.tv_sec += over; From owner-svn-src-all@freebsd.org Sun Mar 4 23:32:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 959C1F3E6DA; Sun, 4 Mar 2018 23:32:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 480AB76554; Sun, 4 Mar 2018 23:32:37 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42E381C182; Sun, 4 Mar 2018 23:32:37 +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 w24NWbsq049994; Sun, 4 Mar 2018 23:32:37 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NWb9G049993; Sun, 4 Mar 2018 23:32:37 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042332.w24NWb9G049993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330423 - stable/11/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/share/mk X-SVN-Commit-Revision: 330423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:32:37 -0000 Author: bdrewery Date: Sun Mar 4 23:32:36 2018 New Revision: 330423 URL: https://svnweb.freebsd.org/changeset/base/330423 Log: MFC r325292: META_MODE: Respect make -s. Modified: stable/11/share/mk/sys.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/sys.mk ============================================================================== --- stable/11/share/mk/sys.mk Sun Mar 4 23:31:25 2018 (r330422) +++ stable/11/share/mk/sys.mk Sun Mar 4 23:32:36 2018 (r330423) @@ -50,8 +50,11 @@ MK_META_MODE= no .if ${MK_DIRDEPS_BUILD} == "yes" .sinclude .elif ${MK_META_MODE} == "yes" +META_MODE+= meta +.if empty(.MAKEFLAGS:M-s) # verbose will show .MAKE.META.PREFIX for each target. -META_MODE+= meta verbose +META_MODE+= verbose +.endif .if !defined(NO_META_MISSING) META_MODE+= missing-meta=yes .endif From owner-svn-src-all@freebsd.org Sun Mar 4 23:34:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D624F3E8C0; Sun, 4 Mar 2018 23:34:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2E4276735; Sun, 4 Mar 2018 23:34:02 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD62B1C185; Sun, 4 Mar 2018 23:34:02 +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 w24NY2ZJ050148; Sun, 4 Mar 2018 23:34:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NY25f050147; Sun, 4 Mar 2018 23:34:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042334.w24NY25f050147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330424 - stable/11/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/share/mk X-SVN-Commit-Revision: 330424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:34:03 -0000 Author: bdrewery Date: Sun Mar 4 23:34:02 2018 New Revision: 330424 URL: https://svnweb.freebsd.org/changeset/base/330424 Log: MFC r330127: Allow overriding .MAKE.MAKEFILE_PREFERENCE. Modified: stable/11/share/mk/sys.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/sys.mk ============================================================================== --- stable/11/share/mk/sys.mk Sun Mar 4 23:32:36 2018 (r330423) +++ stable/11/share/mk/sys.mk Sun Mar 4 23:34:02 2018 (r330424) @@ -447,7 +447,8 @@ SHELL= ${__MAKE_SHELL} .MAKE.EXPAND_VARIABLES= yes # Tell bmake the makefile preference -.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile +MAKEFILE_PREFERENCE?= BSDmakefile makefile Makefile +.MAKE.MAKEFILE_PREFERENCE= ${MAKEFILE_PREFERENCE} # Tell bmake to always pass job tokens, regardless of target depending on # .MAKE or looking like ${MAKE}/${.MAKE}/$(MAKE)/$(.MAKE)/make. From owner-svn-src-all@freebsd.org Sun Mar 4 23:34:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73665F3E8DE; Sun, 4 Mar 2018 23:34:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 264267673C; Sun, 4 Mar 2018 23:34:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EF9A1C186; Sun, 4 Mar 2018 23:34:05 +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 w24NY5E8050195; Sun, 4 Mar 2018 23:34:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NY4YH050194; Sun, 4 Mar 2018 23:34:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042334.w24NY4YH050194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330425 - stable/10/share/mk X-SVN-Group: stable-10 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/10/share/mk X-SVN-Commit-Revision: 330425 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:34:05 -0000 Author: bdrewery Date: Sun Mar 4 23:34:04 2018 New Revision: 330425 URL: https://svnweb.freebsd.org/changeset/base/330425 Log: MFC r330127: Allow overriding .MAKE.MAKEFILE_PREFERENCE. Modified: stable/10/share/mk/sys.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/sys.mk ============================================================================== --- stable/10/share/mk/sys.mk Sun Mar 4 23:34:02 2018 (r330424) +++ stable/10/share/mk/sys.mk Sun Mar 4 23:34:04 2018 (r330425) @@ -356,7 +356,8 @@ SHELL= ${__MAKE_SHELL} .MAKE.EXPAND_VARIABLES= yes # Tell bmake the makefile preference -.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile +MAKEFILE_PREFERENCE?= BSDmakefile makefile Makefile +.MAKE.MAKEFILE_PREFERENCE= ${MAKEFILE_PREFERENCE} # By default bmake does *not* use set -e # when running target scripts, this is a problem for many makefiles here. From owner-svn-src-all@freebsd.org Sun Mar 4 23:35:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1213FF3EB3B; Sun, 4 Mar 2018 23:35:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B95A8769EF; Sun, 4 Mar 2018 23:35:35 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B46341C188; Sun, 4 Mar 2018 23:35:35 +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 w24NZZ5l050334; Sun, 4 Mar 2018 23:35:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NZZQm050333; Sun, 4 Mar 2018 23:35:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042335.w24NZZQm050333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330426 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 330426 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:35:36 -0000 Author: bdrewery Date: Sun Mar 4 23:35:35 2018 New Revision: 330426 URL: https://svnweb.freebsd.org/changeset/base/330426 Log: MFC r325627: Deal with src.conf for top-level MAKEOBJDIRPREFIX guard. Modified: stable/11/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile ============================================================================== --- stable/11/Makefile Sun Mar 4 23:34:04 2018 (r330425) +++ stable/11/Makefile Sun Mar 4 23:35:35 2018 (r330426) @@ -171,10 +171,11 @@ PATH= /sbin:/bin:/usr/sbin:/usr/bin MAKEOBJDIRPREFIX?= /usr/obj _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} MK_AUTO_OBJ=no ${MAKE} \ ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \ + SRCCONF=${SRCCONF} \ -f /dev/null -V MAKEOBJDIRPREFIX dummy .if !empty(_MAKEOBJDIRPREFIX) .error MAKEOBJDIRPREFIX can only be set in environment, not as a global\ - (in make.conf(5)) or command-line variable. + (in make.conf(5) or src.conf(5)) or command-line variable. .endif # We often need to use the tree's version of make to build it. From owner-svn-src-all@freebsd.org Sun Mar 4 23:36:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EC7FF3ED77; Sun, 4 Mar 2018 23:36:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D8E076BAC; Sun, 4 Mar 2018 23:36:50 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3875C1C18A; Sun, 4 Mar 2018 23:36:50 +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 w24Naoq6050456; Sun, 4 Mar 2018 23:36:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NaoQe050455; Sun, 4 Mar 2018 23:36:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042336.w24NaoQe050455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330427 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 330427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:36:50 -0000 Author: bdrewery Date: Sun Mar 4 23:36:49 2018 New Revision: 330427 URL: https://svnweb.freebsd.org/changeset/base/330427 Log: MFC r325776: Rework r325568 so all 'make LINT' targets work. Modified: stable/11/sys/conf/makeLINT.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/makeLINT.mk ============================================================================== --- stable/11/sys/conf/makeLINT.mk Sun Mar 4 23:35:35 2018 (r330426) +++ stable/11/sys/conf/makeLINT.mk Sun Mar 4 23:36:49 2018 (r330427) @@ -1,5 +1,8 @@ # $FreeBSD$ +# The LINT files need to end up in the kernel source directory. +.OBJDIR: ${.CURDIR} + all: @echo "make LINT only" @@ -9,9 +12,10 @@ clean: rm -f LINT-VIMAGE LINT-NOINET LINT-NOINET6 LINT-NOIP .endif -NOTES= ../../conf/NOTES NOTES -LINT: ${NOTES} ../../conf/makeLINT.sed - cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET} +NOTES= ${.CURDIR}/../../conf/NOTES ${.CURDIR}/NOTES +MAKELINT_SED= ${.CURDIR}/../../conf/makeLINT.sed +LINT: ${NOTES} ${MAKELINT_SED} + cat ${NOTES} | sed -E -n -f ${MAKELINT_SED} > ${.TARGET} .if ${TARGET} == "amd64" || ${TARGET} == "i386" echo "include ${.TARGET}" > ${.TARGET}-VIMAGE echo "ident ${.TARGET}-VIMAGE" >> ${.TARGET}-VIMAGE From owner-svn-src-all@freebsd.org Sun Mar 4 23:36:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10CEAF3EDE6; Sun, 4 Mar 2018 23:36:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B7C1D76C8E; Sun, 4 Mar 2018 23:36:58 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B21531C18B; Sun, 4 Mar 2018 23:36:58 +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 w24NawgU050508; Sun, 4 Mar 2018 23:36:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NawfL050507; Sun, 4 Mar 2018 23:36:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042336.w24NawfL050507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330428 - stable/10/sys/conf X-SVN-Group: stable-10 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/10/sys/conf X-SVN-Commit-Revision: 330428 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:36:59 -0000 Author: bdrewery Date: Sun Mar 4 23:36:58 2018 New Revision: 330428 URL: https://svnweb.freebsd.org/changeset/base/330428 Log: MFC r325776: Rework r325568 so all 'make LINT' targets work. Modified: stable/10/sys/conf/makeLINT.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/makeLINT.mk ============================================================================== --- stable/10/sys/conf/makeLINT.mk Sun Mar 4 23:36:49 2018 (r330427) +++ stable/10/sys/conf/makeLINT.mk Sun Mar 4 23:36:58 2018 (r330428) @@ -1,5 +1,8 @@ # $FreeBSD$ +# The LINT files need to end up in the kernel source directory. +.OBJDIR: ${.CURDIR} + all: @echo "make LINT only" @@ -9,9 +12,10 @@ clean: rm -f LINT-VIMAGE LINT-NOINET LINT-NOINET6 LINT-NOIP .endif -NOTES= ../../conf/NOTES NOTES -LINT: ${NOTES} ../../conf/makeLINT.sed - cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET} +NOTES= ${.CURDIR}/../../conf/NOTES ${.CURDIR}/NOTES +MAKELINT_SED= ${.CURDIR}/../../conf/makeLINT.sed +LINT: ${NOTES} ${MAKELINT_SED} + cat ${NOTES} | sed -E -n -f ${MAKELINT_SED} > ${.TARGET} .if ${TARGET} == "amd64" || ${TARGET} == "i386" echo "include ${.TARGET}" > ${.TARGET}-VIMAGE echo "ident ${.TARGET}-VIMAGE" >> ${.TARGET}-VIMAGE From owner-svn-src-all@freebsd.org Sun Mar 4 23:39:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A595F3F092; Sun, 4 Mar 2018 23:39:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06F8176EA7; Sun, 4 Mar 2018 23:39:13 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 013DD1C18E; Sun, 4 Mar 2018 23:39:13 +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 w24NdCXJ050686; Sun, 4 Mar 2018 23:39:12 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NdC09050685; Sun, 4 Mar 2018 23:39:12 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803042339.w24NdC09050685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 4 Mar 2018 23:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330429 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 330429 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:39:13 -0000 Author: bdrewery Date: Sun Mar 4 23:39:12 2018 New Revision: 330429 URL: https://svnweb.freebsd.org/changeset/base/330429 Log: MFC r330364: Don't read SRC_ENV_CONF for MAKEOBJDIRPREFIX guard. Modified: stable/11/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile ============================================================================== --- stable/11/Makefile Sun Mar 4 23:36:58 2018 (r330428) +++ stable/11/Makefile Sun Mar 4 23:39:12 2018 (r330429) @@ -171,11 +171,11 @@ PATH= /sbin:/bin:/usr/sbin:/usr/bin MAKEOBJDIRPREFIX?= /usr/obj _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} MK_AUTO_OBJ=no ${MAKE} \ ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \ - SRCCONF=${SRCCONF} \ + SRCCONF=${SRCCONF} SRC_ENV_CONF= \ -f /dev/null -V MAKEOBJDIRPREFIX dummy .if !empty(_MAKEOBJDIRPREFIX) -.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\ - (in make.conf(5) or src.conf(5)) or command-line variable. +.error MAKEOBJDIRPREFIX can only be set in environment or src-env.conf(5),\ + not as a global (in make.conf(5) or src.conf(5)) or command-line variable. .endif # We often need to use the tree's version of make to build it. From owner-svn-src-all@freebsd.org Sun Mar 4 23:39:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1778F3F13B; Sun, 4 Mar 2018 23:39:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5489D76FC1; Sun, 4 Mar 2018 23:39:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35A261C18F; Sun, 4 Mar 2018 23:39:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w24Ndf3m050758; Sun, 4 Mar 2018 23:39:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w24NdfXh050757; Sun, 4 Mar 2018 23:39:41 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803042339.w24NdfXh050757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Mar 2018 23:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330430 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330430 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:39:41 -0000 Author: ian Date: Sun Mar 4 23:39:40 2018 New Revision: 330430 URL: https://svnweb.freebsd.org/changeset/base/330430 Log: Switch to the new bcd_clocktime conversion routines, and add calls to the new clock_dbgprint_xxx() functions. Modified: head/sys/dev/iicbus/isl12xx.c Modified: head/sys/dev/iicbus/isl12xx.c ============================================================================== --- head/sys/dev/iicbus/isl12xx.c Sun Mar 4 23:39:12 2018 (r330429) +++ head/sys/dev/iicbus/isl12xx.c Sun Mar 4 23:39:40 2018 (r330430) @@ -233,7 +233,7 @@ static int isl12xx_gettime(device_t dev, struct timespec *ts) { struct isl12xx_softc *sc = device_get_softc(dev); - struct clocktime ct; + struct bcd_clocktime bct; struct time_regs tregs; int err; uint8_t hourmask, sreg; @@ -263,29 +263,24 @@ isl12xx_gettime(device_t dev, struct timespec *ts) hourmask = ISL12xx_12HR_MASK; } - ct.nsec = 0; - ct.sec = FROMBCD(tregs.sec); - ct.min = FROMBCD(tregs.min); - ct.hour = FROMBCD(tregs.hour & hourmask); - ct.day = FROMBCD(tregs.day); - ct.mon = FROMBCD(tregs.month); - ct.year = FROMBCD(tregs.year); + bct.nsec = 0; + bct.sec = tregs.sec; + bct.min = tregs.min; + bct.hour = tregs.hour & hourmask; + bct.day = tregs.day; + bct.mon = tregs.month; + bct.year = tregs.year; + bct.ispm = tregs.hour & ISL12XX_PM_FLAG; - if (sc->use_ampm) { - if (ct.hour == 12) - ct.hour = 0; - if (tregs.hour & ISL12XX_PM_FLAG) - ct.hour += 12; - } - - return (clock_ct_to_ts(&ct, ts)); + clock_dbgprint_bcd(sc->dev, CLOCK_DBG_READ, &bct); + return (clock_bcd_to_ts(&bct, ts, sc->use_ampm)); } static int isl12xx_settime(device_t dev, struct timespec *ts) { struct isl12xx_softc *sc = device_get_softc(dev); - struct clocktime ct; + struct bcd_clocktime bct; struct time_regs tregs; int err; uint8_t ampmflags, sreg; @@ -296,27 +291,21 @@ isl12xx_settime(device_t dev, struct timespec *ts) */ ts->tv_sec -= utc_offset(); ts->tv_nsec = 0; - clock_ts_to_ct(ts, &ct); + clock_ts_to_bcd(ts, &bct, sc->use_ampm); + clock_dbgprint_bcd(sc->dev, CLOCK_DBG_WRITE, &bct); - /* If the chip is in AM/PM mode, adjust hour and set flags as needed. */ - if (!sc->use_ampm) { + /* If the chip is in AM/PM mode, set flags as needed. */ + if (!sc->use_ampm) ampmflags = ISL12XX_24HR_FLAG; - } else { - ampmflags = 0; - if (ct.hour >= 12) { - ct.hour -= 12; - ampmflags |= ISL12XX_PM_FLAG; - } - if (ct.hour == 0) - ct.hour = 12; - } + else + ampmflags = bct.ispm ? ISL12XX_PM_FLAG : 0; - tregs.sec = TOBCD(ct.sec); - tregs.min = TOBCD(ct.min); - tregs.hour = TOBCD(ct.hour) | ampmflags; - tregs.day = TOBCD(ct.day); - tregs.month = TOBCD(ct.mon); - tregs.year = TOBCD(ct.year % 100); + tregs.sec = bct.sec; + tregs.min = bct.min; + tregs.hour = bct.hour | ampmflags; + tregs.day = bct.day; + tregs.month = bct.mon; + tregs.year = bct.year % 100; /* * To set the time we have to set the WRTC enable bit in the control From owner-svn-src-all@freebsd.org Sun Mar 4 23:42:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7626AF3F5C8; Sun, 4 Mar 2018 23:42:28 +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 1B20277428; Sun, 4 Mar 2018 23:42:28 +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 DC526B297; Sun, 4 Mar 2018 23:42:27 +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 CF5E289D; Sun, 4 Mar 2018 23:42: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 lmv2RE7AwYPK; Sun, 4 Mar 2018 23:42:24 +0000 (UTC) Subject: Re: svn commit: r330384 - in head: contrib/llvm/lib/Target/AArch64 contrib/llvm/lib/Target/X86 contrib/llvm/tools/clang/include/clang/Basic contrib/llvm/tools/clang/lib/Basic lib/clang lib/clang/includ... DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 3AE30898 To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803041706.w24H6coa051979@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Sun, 4 Mar 2018 15:42:22 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803041706.w24H6coa051979@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y3d3JsQeA2ejEL1fDuoeiOtqUg7iCfG7u" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2018 23:42:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Y3d3JsQeA2ejEL1fDuoeiOtqUg7iCfG7u Content-Type: multipart/mixed; boundary="dL2PxpPWrYJ3bnFvKKTGaBPu8l59rT7CU"; protected-headers="v1" From: Bryan Drewery To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r330384 - in head: contrib/llvm/lib/Target/AArch64 contrib/llvm/lib/Target/X86 contrib/llvm/tools/clang/include/clang/Basic contrib/llvm/tools/clang/lib/Basic lib/clang lib/clang/includ... References: <201803041706.w24H6coa051979@repo.freebsd.org> In-Reply-To: <201803041706.w24H6coa051979@repo.freebsd.org> --dL2PxpPWrYJ3bnFvKKTGaBPu8l59rT7CU Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 3/4/2018 9:06 AM, Dimitry Andric wrote: > Modified: head/lib/clang/include/lld/Common/Version.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/clang/include/lld/Common/Version.inc Sun Mar 4 15:07:23 2= 018 (r330383) > +++ head/lib/clang/include/lld/Common/Version.inc Sun Mar 4 17:06:37 2= 018 (r330384) > @@ -4,5 +4,5 @@ > #define LLD_VERSION_STRING "6.0.0" > #define LLD_VERSION_MAJOR 6 > #define LLD_VERSION_MINOR 0 > -#define LLD_REVISION_STRING "325932" > +#define LLD_REVISION_STRING "326565" > #define LLD_REPOSITORY_STRING "FreeBSD" >=20 > Modified: head/lib/clang/include/llvm/Support/VCSRevision.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/clang/include/llvm/Support/VCSRevision.h Sun Mar 4 15:07:= 23 2018 (r330383) > +++ head/lib/clang/include/llvm/Support/VCSRevision.h Sun Mar 4 17:06:= 37 2018 (r330384) > @@ -1,2 +1,2 @@ > /* $FreeBSD$ */ > -#define LLVM_REVISION "svn-r325932" > +#define LLVM_REVISION "svn-r326565" Thanks for handling these. I need to finish my WITH_SYSTEM_LINKER patch. --=20 Regards, Bryan Drewery --dL2PxpPWrYJ3bnFvKKTGaBPu8l59rT7CU-- --Y3d3JsQeA2ejEL1fDuoeiOtqUg7iCfG7u 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 iQEcBAEBAgAGBQJanIRfAAoJEDXXcbtuRpfPwMcH/i/JOc457fc4JAirk3RSiidr jE25v7fhDRji7PvVRNAveTqzYsXNDwgpmZkahoWnvoBMmyQXq39De1xrPzRk3K9K WtEAfjeSYe/Y3Oi+kgrHvKVlRe7fs+QT9HDf69rFF0U7vC2J9mX6KSFPQL/J1XdU okTuM4JFFdiPR/4ZbJJE3kM6bzi54cXyX+FB7ymZ+2NIPkTAswl3j6P7qbbR61UZ eVnLXCkFeAiPDiuaj6k6FIc8XwVNdpBDW+PpzBpbJoWTFsAY0HUInuvcr7l7w8Mm DZ+KJDIqg1wJR9aLhVS8TzhZfdqBF+BSS0oBLVAxioG0Do5lQJMpcp1FX++BlmA= =NaJJ -----END PGP SIGNATURE----- --Y3d3JsQeA2ejEL1fDuoeiOtqUg7iCfG7u-- From owner-svn-src-all@freebsd.org Mon Mar 5 00:15:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D1A5F41A43; Mon, 5 Mar 2018 00:15:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E3E27855B; Mon, 5 Mar 2018 00:15:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 291E11C802; Mon, 5 Mar 2018 00:15:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w250Fvwq071122; Mon, 5 Mar 2018 00:15:57 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w250FvLY071121; Mon, 5 Mar 2018 00:15:57 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803050015.w250FvLY071121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 5 Mar 2018 00:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330431 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330431 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 00:15:57 -0000 Author: ian Date: Mon Mar 5 00:15:56 2018 New Revision: 330431 URL: https://svnweb.freebsd.org/changeset/base/330431 Log: Switch to the new bcd_clocktime conversion routines, and add calls to the new clock_dbgprint_xxx() functions. Modified: head/sys/dev/iicbus/ds3231.c Modified: head/sys/dev/iicbus/ds3231.c ============================================================================== --- head/sys/dev/iicbus/ds3231.c Sun Mar 4 23:39:40 2018 (r330430) +++ head/sys/dev/iicbus/ds3231.c Mon Mar 5 00:15:56 2018 (r330431) @@ -377,7 +377,7 @@ ds3231_attach(device_t dev) sc->sc_dev = dev; sc->sc_addr = iicbus_get_addr(dev); sc->sc_last_c = -1; - sc->sc_year0 = 1900; + sc->sc_year0 = 0; sc->enum_hook.ich_func = ds3231_start; sc->enum_hook.ich_arg = dev; @@ -477,7 +477,7 @@ static int ds3231_gettime(device_t dev, struct timespec *ts) { int c, error; - struct clocktime ct; + struct bcd_clocktime bct; struct ds3231_softc *sc; uint8_t data[7], hourmask; @@ -505,13 +505,14 @@ ds3231_gettime(device_t dev, struct timespec *ts) } else hourmask = DS3231_HOUR_MASK_24HR; - ct.nsec = 0; - ct.sec = FROMBCD(data[DS3231_SECS] & DS3231_SECS_MASK); - ct.min = FROMBCD(data[DS3231_MINS] & DS3231_MINS_MASK); - ct.hour = FROMBCD(data[DS3231_HOUR] & hourmask); - ct.day = FROMBCD(data[DS3231_DATE] & DS3231_DATE_MASK); - ct.mon = FROMBCD(data[DS3231_MONTH] & DS3231_MONTH_MASK); - ct.year = FROMBCD(data[DS3231_YEAR] & DS3231_YEAR_MASK); + bct.nsec = 0; + bct.sec = data[DS3231_SECS] & DS3231_SECS_MASK; + bct.min = data[DS3231_MINS] & DS3231_MINS_MASK; + bct.hour = data[DS3231_HOUR] & hourmask; + bct.day = data[DS3231_DATE] & DS3231_DATE_MASK; + bct.mon = data[DS3231_MONTH] & DS3231_MONTH_MASK; + bct.year = data[DS3231_YEAR] & DS3231_YEAR_MASK; + bct.ispm = data[DS3231_HOUR] & DS3231_HOUR_IS_PM; /* * If the century flag has toggled since we last saw it, there has been @@ -522,29 +523,20 @@ ds3231_gettime(device_t dev, struct timespec *ts) if (sc->sc_last_c == -1) sc->sc_last_c = c; else if (c != sc->sc_last_c) { - sc->sc_year0 += 100; + sc->sc_year0 += 0x100; sc->sc_last_c = c; } - ct.year += sc->sc_year0; - if (ct.year < POSIX_BASE_YEAR) - ct.year += 100; /* assume [1970, 2069] */ + bct.year |= sc->sc_year0; - /* If running in AM/PM mode, deal with it. */ - if (sc->sc_use_ampm) { - if (ct.hour == 12) - ct.hour = 0; - if (data[DS3231_HOUR] & DS3231_HOUR_IS_PM) - ct.hour += 12; - } - - return (clock_ct_to_ts(&ct, ts)); + clock_dbgprint_bcd(sc->sc_dev, CLOCK_DBG_READ, &bct); + return (clock_bcd_to_ts(&bct, ts, sc->sc_use_ampm)); } static int ds3231_settime(device_t dev, struct timespec *ts) { int error; - struct clocktime ct; + struct bcd_clocktime bct; struct ds3231_softc *sc; uint8_t data[7]; uint8_t pmflags; @@ -556,27 +548,24 @@ ds3231_settime(device_t dev, struct timespec *ts) * disables utc adjustment, so apply that ourselves. */ ts->tv_sec -= utc_offset(); - clock_ts_to_ct(ts, &ct); + clock_ts_to_bcd(ts, &bct, sc->sc_use_ampm); + clock_dbgprint_bcd(sc->sc_dev, CLOCK_DBG_WRITE, &bct); /* If the chip is in AM/PM mode, adjust hour and set flags as needed. */ if (sc->sc_use_ampm) { pmflags = DS3231_HOUR_USE_AMPM; - if (ct.hour >= 12) { - ct.hour -= 12; + if (bct.ispm) pmflags |= DS3231_HOUR_IS_PM; - } - if (ct.hour == 0) - ct.hour = 12; } else pmflags = 0; - data[DS3231_SECS] = TOBCD(ct.sec); - data[DS3231_MINS] = TOBCD(ct.min); - data[DS3231_HOUR] = TOBCD(ct.hour) | pmflags; - data[DS3231_DATE] = TOBCD(ct.day); - data[DS3231_WEEKDAY] = ct.dow + 1; - data[DS3231_MONTH] = TOBCD(ct.mon); - data[DS3231_YEAR] = TOBCD(ct.year % 100); + data[DS3231_SECS] = bct.sec; + data[DS3231_MINS] = bct.min; + data[DS3231_HOUR] = bct.hour | pmflags; + data[DS3231_DATE] = bct.day; + data[DS3231_WEEKDAY] = bct.dow + 1; + data[DS3231_MONTH] = bct.mon; + data[DS3231_YEAR] = bct.year & 0xff; if (sc->sc_last_c) data[DS3231_MONTH] |= DS3231_C_MASK; From owner-svn-src-all@freebsd.org Mon Mar 5 00:30:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E290CF428AE; Mon, 5 Mar 2018 00:30:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94F0E78C97; Mon, 5 Mar 2018 00:30:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BB761C9AA; Mon, 5 Mar 2018 00:30:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w250U7SS076204; Mon, 5 Mar 2018 00:30:07 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w250U7gm076203; Mon, 5 Mar 2018 00:30:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201803050030.w250U7gm076203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 5 Mar 2018 00:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330432 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330432 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 00:30:08 -0000 Author: mjg Date: Mon Mar 5 00:30:07 2018 New Revision: 330432 URL: https://svnweb.freebsd.org/changeset/base/330432 Log: lockmgr: save on sleepq when cmpset fails Modified: head/sys/kern/kern_lock.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Mon Mar 5 00:15:56 2018 (r330431) +++ head/sys/kern/kern_lock.c Mon Mar 5 00:30:07 2018 (r330432) @@ -296,7 +296,7 @@ sleeplk(struct lock *lk, u_int flags, struct lock_obje static __inline int wakeupshlk(struct lock *lk, const char *file, int line) { - uintptr_t v, x; + uintptr_t v, x, orig_x; u_int realexslp; int queue, wakeup_swapper; @@ -311,7 +311,9 @@ wakeupshlk(struct lock *lk, const char *file, int line * path in order to handle wakeups correctly. */ sleepq_lock(&lk->lock_object); - x = lk->lk_lock & (LK_ALL_WAITERS | LK_EXCLUSIVE_SPINNERS); + orig_x = lk->lk_lock; +retry_sleepq: + x = orig_x & (LK_ALL_WAITERS | LK_EXCLUSIVE_SPINNERS); v = LK_UNLOCKED; /* @@ -360,11 +362,16 @@ wakeupshlk(struct lock *lk, const char *file, int line queue = SQ_SHARED_QUEUE; } - if (!atomic_cmpset_rel_ptr(&lk->lk_lock, LK_SHARERS_LOCK(1) | x, - v)) { + if (lockmgr_sunlock_try(lk, &orig_x)) { sleepq_release(&lk->lock_object); - continue; + break; } + + x |= LK_SHARERS_LOCK(1); + if (!atomic_fcmpset_rel_ptr(&lk->lk_lock, &x, v)) { + orig_x = x; + goto retry_sleepq; + } LOCK_LOG3(lk, "%s: %p waking up threads on the %s queue", __func__, lk, queue == SQ_SHARED_QUEUE ? "shared" : "exclusive"); @@ -602,6 +609,7 @@ lockmgr_slock_hard(struct lock *lk, u_int flags, struc */ sleepq_lock(&lk->lock_object); x = lk->lk_lock; +retry_sleepq: /* * if the lock can be acquired in shared mode, try @@ -617,10 +625,9 @@ lockmgr_slock_hard(struct lock *lk, u_int flags, struc * loop back and retry. */ if ((x & LK_SHARED_WAITERS) == 0) { - if (!atomic_cmpset_acq_ptr(&lk->lk_lock, x, + if (!atomic_fcmpset_acq_ptr(&lk->lk_lock, &x, x | LK_SHARED_WAITERS)) { - sleepq_release(&lk->lock_object); - continue; + goto retry_sleepq; } LOCK_LOG2(lk, "%s: %p set shared waiters flag", __func__, lk); @@ -755,6 +762,7 @@ lockmgr_xlock_hard(struct lock *lk, u_int flags, struc */ sleepq_lock(&lk->lock_object); x = lk->lk_lock; +retry_sleepq: /* * if the lock has been released while we spun on @@ -777,7 +785,7 @@ lockmgr_xlock_hard(struct lock *lk, u_int flags, struc v = x & (LK_ALL_WAITERS | LK_EXCLUSIVE_SPINNERS); if ((x & ~v) == LK_UNLOCKED) { v &= ~LK_EXCLUSIVE_SPINNERS; - if (atomic_cmpset_acq_ptr(&lk->lk_lock, x, + if (atomic_fcmpset_acq_ptr(&lk->lk_lock, &x, tid | v)) { sleepq_release(&lk->lock_object); LOCK_LOG2(lk, @@ -785,8 +793,7 @@ lockmgr_xlock_hard(struct lock *lk, u_int flags, struc __func__, lk); break; } - sleepq_release(&lk->lock_object); - continue; + goto retry_sleepq; } /* @@ -794,10 +801,9 @@ lockmgr_xlock_hard(struct lock *lk, u_int flags, struc * fail, loop back and retry. */ if ((x & LK_EXCLUSIVE_WAITERS) == 0) { - if (!atomic_cmpset_ptr(&lk->lk_lock, x, + if (!atomic_fcmpset_ptr(&lk->lk_lock, &x, x | LK_EXCLUSIVE_WAITERS)) { - sleepq_release(&lk->lock_object); - continue; + goto retry_sleepq; } LOCK_LOG2(lk, "%s: %p set excl waiters flag", __func__, lk); From owner-svn-src-all@freebsd.org Mon Mar 5 00:43:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 065F2F436ED; Mon, 5 Mar 2018 00:43:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A73F57954D; Mon, 5 Mar 2018 00:43:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A08871CCC5; Mon, 5 Mar 2018 00:43:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w250hrYl085940; Mon, 5 Mar 2018 00:43:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w250hrPE085939; Mon, 5 Mar 2018 00:43:53 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803050043.w250hrPE085939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 5 Mar 2018 00:43:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330433 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 00:43:54 -0000 Author: ian Date: Mon Mar 5 00:43:53 2018 New Revision: 330433 URL: https://svnweb.freebsd.org/changeset/base/330433 Log: Switch to the new bcd_clocktime conversion routines, and add calls to the new clock_dbgprint_xxx() functions. Modified: head/sys/dev/iicbus/s35390a.c Modified: head/sys/dev/iicbus/s35390a.c ============================================================================== --- head/sys/dev/iicbus/s35390a.c Mon Mar 5 00:30:07 2018 (r330432) +++ head/sys/dev/iicbus/s35390a.c Mon Mar 5 00:43:53 2018 (r330433) @@ -297,7 +297,7 @@ static int s390rtc_gettime(device_t dev, struct timespec *ts) { uint8_t bcd[S390_RT1_NBYTES]; - struct clocktime ct; + struct bcd_clocktime bct; int error; error = s390rtc_read(dev, S390_REALTIME1, bcd, S390_RT1_NBYTES); @@ -310,37 +310,39 @@ s390rtc_gettime(device_t dev, struct timespec *ts) /* * Convert the register values into something useable. */ - ct.nsec = 0; - ct.sec = FROMBCD(bcd[S390_RT1_SECOND]); - ct.min = FROMBCD(bcd[S390_RT1_MINUTE]); - ct.hour = FROMBCD(bcd[S390_RT1_HOUR] & 0x3f); - ct.day = FROMBCD(bcd[S390_RT1_DAY]); - ct.dow = bcd[S390_RT1_WDAY] & 0x07; - ct.mon = FROMBCD(bcd[S390_RT1_MONTH]); - ct.year = FROMBCD(bcd[S390_RT1_YEAR]) + 2000; + bct.nsec = 0; + bct.sec = bcd[S390_RT1_SECOND]; + bct.min = bcd[S390_RT1_MINUTE]; + bct.hour = bcd[S390_RT1_HOUR] & 0x3f; + bct.day = bcd[S390_RT1_DAY]; + bct.dow = bcd[S390_RT1_WDAY] & 0x07; + bct.mon = bcd[S390_RT1_MONTH]; + bct.year = bcd[S390_RT1_YEAR]; - return (clock_ct_to_ts(&ct, ts)); + clock_dbgprint_bcd(dev, CLOCK_DBG_READ, &bct); + return (clock_bcd_to_ts(&bct, ts, false)); } static int s390rtc_settime(device_t dev, struct timespec *ts) { uint8_t bcd[S390_RT1_NBYTES]; - struct clocktime ct; + struct bcd_clocktime bct; - clock_ts_to_ct(ts, &ct); + clock_ts_to_bcd(ts, &bct, false); + clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bct); /* * Convert our time representation into something the S-xx390 * can understand. */ - bcd[S390_RT1_SECOND] = TOBCD(ct.sec); - bcd[S390_RT1_MINUTE] = TOBCD(ct.min); - bcd[S390_RT1_HOUR] = TOBCD(ct.hour); - bcd[S390_RT1_DAY] = TOBCD(ct.day); - bcd[S390_RT1_WDAY] = ct.dow; - bcd[S390_RT1_MONTH] = TOBCD(ct.mon); - bcd[S390_RT1_YEAR] = TOBCD(ct.year % 100); + bcd[S390_RT1_SECOND] = bct.sec; + bcd[S390_RT1_MINUTE] = bct.min; + bcd[S390_RT1_HOUR] = bct.hour; + bcd[S390_RT1_DAY] = bct.day; + bcd[S390_RT1_WDAY] = bct.dow; + bcd[S390_RT1_MONTH] = bct.mon; + bcd[S390_RT1_YEAR] = bct.year & 0xff; return (s390rtc_write(dev, S390_REALTIME1, bcd, S390_RT1_NBYTES)); } From owner-svn-src-all@freebsd.org Mon Mar 5 00:59:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79E55F446BA; Mon, 5 Mar 2018 00:59:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26A3979C1E; Mon, 5 Mar 2018 00:59:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BA241CE5A; Mon, 5 Mar 2018 00:59:56 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w250xt3R091062; Mon, 5 Mar 2018 00:59:55 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w250xtm8091061; Mon, 5 Mar 2018 00:59:55 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803050059.w250xtm8091061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 5 Mar 2018 00:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330434 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 00:59:56 -0000 Author: kevans Date: Mon Mar 5 00:59:55 2018 New Revision: 330434 URL: https://svnweb.freebsd.org/changeset/base/330434 Log: lualoader: Add note about importance of including the cli module early Modified: head/stand/lua/loader.lua Modified: head/stand/lua/loader.lua ============================================================================== --- head/stand/lua/loader.lua Mon Mar 5 00:43:53 2018 (r330433) +++ head/stand/lua/loader.lua Mon Mar 5 00:59:55 2018 (r330434) @@ -29,6 +29,10 @@ -- $FreeBSD$ -- +-- The cli module should be included first here. Some of the functions that it +-- defines are necessary for the Lua-based loader to operate in general. +-- Other modules will also need some of the functions it defines to safely +-- execute loader commands. require("cli") local core = require("core") local config = require("config") From owner-svn-src-all@freebsd.org Mon Mar 5 01:18:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B108F45FA7; Mon, 5 Mar 2018 01:18:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E30EB7AA6F; Mon, 5 Mar 2018 01:18:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC8881D1DA; Mon, 5 Mar 2018 01:18:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w251IW5j001212; Mon, 5 Mar 2018 01:18:32 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w251IWpw001211; Mon, 5 Mar 2018 01:18:32 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803050118.w251IWpw001211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 5 Mar 2018 01:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330435 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 01:18:33 -0000 Author: kevans Date: Mon Mar 5 01:18:32 2018 New Revision: 330435 URL: https://svnweb.freebsd.org/changeset/base/330435 Log: lualoader: Use FILESDIR instead of BINDIR Minor nit: We're not installing binaries, we're installing scripts/files that are documented to be installed based on FILESDIR. Modified: head/stand/lua/Makefile Modified: head/stand/lua/Makefile ============================================================================== --- head/stand/lua/Makefile Mon Mar 5 00:59:55 2018 (r330434) +++ head/stand/lua/Makefile Mon Mar 5 01:18:32 2018 (r330435) @@ -2,7 +2,7 @@ .include -BINDIR= /boot/lua +FILESDIR= /boot/lua FILES= cli.lua \ color.lua \ config.lua \ From owner-svn-src-all@freebsd.org Mon Mar 5 01:56:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EF94F487A2; Mon, 5 Mar 2018 01:56:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 012D17C01C; Mon, 5 Mar 2018 01:56:08 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F02921D84C; Mon, 5 Mar 2018 01:56:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w251u7l9020944; Mon, 5 Mar 2018 01:56:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w251u7Y8020941; Mon, 5 Mar 2018 01:56:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803050156.w251u7Y8020941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 5 Mar 2018 01:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330436 - head/bin/chflags X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/bin/chflags X-SVN-Commit-Revision: 330436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 01:56:08 -0000 Author: bdrewery Date: Mon Mar 5 01:56:07 2018 New Revision: 330436 URL: https://svnweb.freebsd.org/changeset/base/330436 Log: chflags: Add -x option to not traverse mount points. MFC after: 2 weeks Modified: head/bin/chflags/chflags.1 head/bin/chflags/chflags.c Modified: head/bin/chflags/chflags.1 ============================================================================== --- head/bin/chflags/chflags.1 Mon Mar 5 01:18:32 2018 (r330435) +++ head/bin/chflags/chflags.1 Mon Mar 5 01:56:07 2018 (r330436) @@ -32,7 +32,7 @@ .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd April 20, 2015 +.Dd March 4, 2018 .Dt CHFLAGS 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd change file flags .Sh SYNOPSIS .Nm -.Op Fl fhv +.Op Fl fhvx .Oo .Fl R .Op Fl H | Fl L | Fl P @@ -98,6 +98,8 @@ If the .Fl v option is specified more than once, the old and new flags of the file will also be printed, in octal notation. +.It Fl x +Do not cross mount points. .El .Pp The flags are specified as an octal number or a comma separated list Modified: head/bin/chflags/chflags.c ============================================================================== --- head/bin/chflags/chflags.c Mon Mar 5 01:18:32 2018 (r330435) +++ head/bin/chflags/chflags.c Mon Mar 5 01:56:07 2018 (r330436) @@ -65,12 +65,12 @@ main(int argc, char *argv[]) FTSENT *p; u_long clear, newflags, set; long val; - int Hflag, Lflag, Rflag, fflag, hflag, vflag; + int Hflag, Lflag, Rflag, fflag, hflag, vflag, xflag; int ch, fts_options, oct, rval; char *flags, *ep; - Hflag = Lflag = Rflag = fflag = hflag = vflag = 0; - while ((ch = getopt(argc, argv, "HLPRfhv")) != -1) + Hflag = Lflag = Rflag = fflag = hflag = vflag = xflag = 0; + while ((ch = getopt(argc, argv, "HLPRfhvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -95,6 +95,9 @@ main(int argc, char *argv[]) case 'v': vflag++; break; + case 'x': + xflag = 1; + break; case '?': default: usage(); @@ -123,6 +126,8 @@ main(int argc, char *argv[]) } else { fts_options = FTS_LOGICAL; } + if (xflag) + fts_options |= FTS_XDEV; flags = *argv; if (*flags >= '0' && *flags <= '7') { @@ -201,6 +206,6 @@ static void usage(void) { (void)fprintf(stderr, - "usage: chflags [-fhv] [-R [-H | -L | -P]] flags file ...\n"); + "usage: chflags [-fhvx] [-R [-H | -L | -P]] flags file ...\n"); exit(1); } From owner-svn-src-all@freebsd.org Mon Mar 5 02:08:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 810C3F4948F; Mon, 5 Mar 2018 02:08:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCE57CA47; Mon, 5 Mar 2018 02:08:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A9FA1D9E9; Mon, 5 Mar 2018 02:08:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2528YGD026303; Mon, 5 Mar 2018 02:08:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2528Y6S026302; Mon, 5 Mar 2018 02:08:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803050208.w2528Y6S026302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 5 Mar 2018 02:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330437 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 330437 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 02:08:34 -0000 Author: ian Date: Mon Mar 5 02:08:33 2018 New Revision: 330437 URL: https://svnweb.freebsd.org/changeset/base/330437 Log: Do not stop the loop that configures gpio chipselect pins on the first error, just ignore pins that don't configure and keep setting up the ones that do. (But when bootverbose is on, whine about the errors.) Modified: head/sys/arm/freescale/imx/imx_spi.c Modified: head/sys/arm/freescale/imx/imx_spi.c ============================================================================== --- head/sys/arm/freescale/imx/imx_spi.c Mon Mar 5 01:56:07 2018 (r330436) +++ head/sys/arm/freescale/imx/imx_spi.c Mon Mar 5 02:08:33 2018 (r330437) @@ -541,7 +541,7 @@ spi_attach(device_t dev) /* Allocate gpio pins for configured chip selects. */ node = ofw_bus_get_node(sc->dev); - for (err = 0, idx = 0; err == 0 && idx < nitems(sc->cspins); ++idx) { + for (idx = 0; idx < nitems(sc->cspins); ++idx) { err = gpio_pin_get_by_ofw_propidx(sc->dev, node, "cs-gpios", idx, &sc->cspins[idx]); if (err == 0) { From owner-svn-src-all@freebsd.org Mon Mar 5 02:11:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93DF0F498C2 for ; Mon, 5 Mar 2018 02:11:09 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EDFA7CCC7 for ; Mon, 5 Mar 2018 02:11:08 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6477c6f2-201a-11e8-bb8e-b35b57339d60 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 6477c6f2-201a-11e8-bb8e-b35b57339d60; Mon, 05 Mar 2018 02:10:36 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w252B0TD094434; Sun, 4 Mar 2018 19:11:00 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1520215860.38056.3.camel@freebsd.org> Subject: Re: svn commit: r330436 - head/bin/chflags From: Ian Lepore To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 04 Mar 2018 19:11:00 -0700 In-Reply-To: <201803050156.w251u7Y8020941@repo.freebsd.org> References: <201803050156.w251u7Y8020941@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 02:11:09 -0000 On Mon, 2018-03-05 at 01:56 +0000, Bryan Drewery wrote: > Author: bdrewery > Date: Mon Mar5 01:56:07 2018 > New Revision: 330436 > URL: https://svnweb.freebsd.org/changeset/base/330436 > > Log: > chflags: Add -x option to not traverse mount points. Yay! One day later than I needed it, but still, yay! -- Ian From owner-svn-src-all@freebsd.org Mon Mar 5 02:13:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54E95F49B87; Mon, 5 Mar 2018 02:13:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8DE87D0AB; Mon, 5 Mar 2018 02:13:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDC2E1DB77; Mon, 5 Mar 2018 02:13:28 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w252DS70031279; Mon, 5 Mar 2018 02:13:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w252DSqh031278; Mon, 5 Mar 2018 02:13:28 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803050213.w252DSqh031278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 5 Mar 2018 02:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330438 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 330438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 02:13:29 -0000 Author: ian Date: Mon Mar 5 02:13:28 2018 New Revision: 330438 URL: https://svnweb.freebsd.org/changeset/base/330438 Log: Defer attaching the spibus until timers and interrupts are working. The driver requires interrupts to do transfers, and the drivers for the SPI devices on the bus quite reasonably expect to be able to do IO while probing and attaching. Modified: head/sys/arm/freescale/imx/imx_spi.c Modified: head/sys/arm/freescale/imx/imx_spi.c ============================================================================== --- head/sys/arm/freescale/imx/imx_spi.c Mon Mar 5 02:08:33 2018 (r330437) +++ head/sys/arm/freescale/imx/imx_spi.c Mon Mar 5 02:13:28 2018 (r330438) @@ -558,9 +558,16 @@ spi_attach(device_t dev) */ WR4(sc, ECSPI_CTLREG, CTLREG_CMODES_MASTER); - /* Attach the bus driver. */ + /* + * Add the spibus driver as a child, and setup a one-shot intrhook to + * attach it after interrupts are working. It will attach actual SPI + * devices as its children, and those devices may need to do IO during + * their attach. We can't do IO until timers and interrupts are working. + */ sc->spibus = device_add_child(dev, "spibus", -1); - return (bus_generic_attach(sc->dev)); + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); + + return (0); } static int From owner-svn-src-all@freebsd.org Mon Mar 5 02:28:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 422E0F24E30; Mon, 5 Mar 2018 02:28:26 +0000 (UTC) (envelope-from anish@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E94DB7D919; Mon, 5 Mar 2018 02:28:25 +0000 (UTC) (envelope-from anish@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E44101DD29; Mon, 5 Mar 2018 02:28:25 +0000 (UTC) (envelope-from anish@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w252SPkU036574; Mon, 5 Mar 2018 02:28:25 GMT (envelope-from anish@FreeBSD.org) Received: (from anish@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w252SP6v036571; Mon, 5 Mar 2018 02:28:25 GMT (envelope-from anish@FreeBSD.org) Message-Id: <201803050228.w252SP6v036571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: anish set sender to anish@FreeBSD.org using -f From: Anish Gupta Date: Mon, 5 Mar 2018 02:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330439 - in head/sys: amd64/vmm/amd contrib/dev/acpica/include X-SVN-Group: head X-SVN-Commit-Author: anish X-SVN-Commit-Paths: in head/sys: amd64/vmm/amd contrib/dev/acpica/include X-SVN-Commit-Revision: 330439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 02:28:26 -0000 Author: anish Date: Mon Mar 5 02:28:25 2018 New Revision: 330439 URL: https://svnweb.freebsd.org/changeset/base/330439 Log: Move the new AMD-Vi IVHD [ACPI_IVRS_HARDWARE_NEW]definitions added in r329360 in contrib ACPI to local files till ACPI code adds new definitions reported by jkim. Rename ACPI_IVRS_HARDWARE_NEW to ACPI_IVRS_HARDWARE_EFRSUP, since new definitions add Extended Feature Register support. Use IvrsType to distinguish three types of IVHD - 0x10(legacy), 0x11 and 0x40(with EFR). IVHD 0x40 is also called mixed type since it supports HID device entries. Fix 2 coverity bugs reported by cem. Reported by:jkim, cem Approved by:grehan Differential Revision://reviews.freebsd.org/D14501 Modified: head/sys/amd64/vmm/amd/amdvi_priv.h head/sys/amd64/vmm/amd/ivrs_drv.c head/sys/contrib/dev/acpica/include/actbl2.h Modified: head/sys/amd64/vmm/amd/amdvi_priv.h ============================================================================== --- head/sys/amd64/vmm/amd/amdvi_priv.h Mon Mar 5 02:13:28 2018 (r330438) +++ head/sys/amd64/vmm/amd/amdvi_priv.h Mon Mar 5 02:28:25 2018 (r330439) @@ -355,12 +355,43 @@ struct amdvi_domain { }; /* + * I/O Virtualization Hardware Definition Block (IVHD) type 0x10 (legacy) + * uses ACPI_IVRS_HARDWARE define in contrib/dev/acpica/include/actbl2.h + * New IVHD types 0x11 and 0x40 as defined in AMD IOMMU spec[48882] are missing in + * ACPI code. These new types add extra field EFR(Extended Feature Register). + * XXX : Use definition from ACPI when it is available. + */ +typedef struct acpi_ivrs_hardware_efr_sup +{ + ACPI_IVRS_HEADER Header; + UINT16 CapabilityOffset; /* Offset for IOMMU control fields */ + UINT64 BaseAddress; /* IOMMU control registers */ + UINT16 PciSegmentGroup; + UINT16 Info; /* MSI number and unit ID */ + UINT32 Attr; /* IOMMU Feature */ + UINT64 ExtFR; /* IOMMU Extended Feature */ + UINT64 Reserved; /* v1 feature or v2 attribute */ +} __attribute__ ((__packed__)) ACPI_IVRS_HARDWARE_EFRSUP; +CTASSERT(sizeof(ACPI_IVRS_HARDWARE_EFRSUP) == 40); + +/* + * Different type of IVHD. + * XXX: Use AcpiIvrsType once new IVHD types are available. +*/ +enum IvrsType +{ + IVRS_TYPE_HARDWARE_LEGACY = 0x10, /* Legacy without EFRi support. */ + IVRS_TYPE_HARDWARE_EFR = 0x11, /* With EFR support. */ + IVRS_TYPE_HARDWARE_MIXED = 0x40, /* Mixed with EFR support. */ +}; + +/* * AMD IOMMU softc. */ struct amdvi_softc { struct amdvi_ctrl *ctrl; /* Control area. */ device_t dev; /* IOMMU device. */ - enum AcpiIvrsType ivhd_type; /* IOMMU IVHD type 0x10/0x11 or 0x40 */ + enum IvrsType ivhd_type; /* IOMMU IVHD type. */ bool iotlb; /* IOTLB supported by IOMMU */ struct amdvi_cmd *cmd; /* Command descriptor area. */ int cmd_max; /* Max number of commands. */ Modified: head/sys/amd64/vmm/amd/ivrs_drv.c ============================================================================== --- head/sys/amd64/vmm/amd/ivrs_drv.c Mon Mar 5 02:13:28 2018 (r330438) +++ head/sys/amd64/vmm/amd/ivrs_drv.c Mon Mar 5 02:28:25 2018 (r330439) @@ -86,9 +86,9 @@ ivrs_hdr_iterate_tbl(ivhd_iter_t iter, void *arg) } switch (ivrs_hdr->Type) { - case ACPI_IVRS_TYPE_HARDWARE: /* Legacy */ - case 0x11: - case 0x40: /* ACPI HID */ + case IVRS_TYPE_HARDWARE_LEGACY: /* Legacy */ + case IVRS_TYPE_HARDWARE_EFR: + case IVRS_TYPE_HARDWARE_MIXED: if (!iter(ivrs_hdr, arg)) return; break; @@ -116,9 +116,9 @@ ivrs_is_ivhd(UINT8 type) { switch(type) { - case ACPI_IVRS_TYPE_HARDWARE: - case ACPI_IVRS_TYPE_HARDWARE_EXT1: - case ACPI_IVRS_TYPE_HARDWARE_EXT2: + case IVRS_TYPE_HARDWARE_LEGACY: + case IVRS_TYPE_HARDWARE_EFR: + case IVRS_TYPE_HARDWARE_MIXED: return (true); default: @@ -206,17 +206,13 @@ ivhd_dev_parse(ACPI_IVRS_HARDWARE* ivhd, struct amdvi_ softc->end_dev_rid = 0; switch (ivhd->Header.Type) { - case ACPI_IVRS_TYPE_HARDWARE_EXT1: - case ACPI_IVRS_TYPE_HARDWARE_EXT2: - p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE_NEW); - de = (ACPI_IVRS_DE_HEADER *) ((uint8_t *)ivhd + - sizeof(ACPI_IVRS_HARDWARE_NEW)); + case IVRS_TYPE_HARDWARE_LEGACY: + p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE); break; - case ACPI_IVRS_TYPE_HARDWARE: - p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE); - de = (ACPI_IVRS_DE_HEADER *) ((uint8_t *)ivhd + - sizeof(ACPI_IVRS_HARDWARE)); + case IVRS_TYPE_HARDWARE_EFR: + case IVRS_TYPE_HARDWARE_MIXED: + p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE_EFRSUP); break; default: @@ -316,9 +312,9 @@ ivhd_is_newer(ACPI_IVRS_HEADER *old, ACPI_IVRS_HEADER * Newer IVRS header type take precedence. */ if ((old->DeviceId == new->DeviceId) && - (old->Type == ACPI_IVRS_TYPE_HARDWARE) && - ((new->Type == ACPI_IVRS_TYPE_HARDWARE_EXT1) || - (new->Type == ACPI_IVRS_TYPE_HARDWARE_EXT1))) { + (old->Type == IVRS_TYPE_HARDWARE_LEGACY) && + ((new->Type == IVRS_TYPE_HARDWARE_EFR) || + (new->Type == IVRS_TYPE_HARDWARE_MIXED))) { return (true); } @@ -422,23 +418,33 @@ ivhd_probe(device_t dev) ivhd = ivhd_hdrs[unit]; KASSERT(ivhd, ("ivhd is NULL")); - if (ivhd->Header.Type == ACPI_IVRS_TYPE_HARDWARE) - device_set_desc(dev, "AMD-Vi/IOMMU ivhd"); - else + switch (ivhd->Header.Type) { + case IVRS_TYPE_HARDWARE_EFR: device_set_desc(dev, "AMD-Vi/IOMMU ivhd with EFR"); + break; + + case IVRS_TYPE_HARDWARE_MIXED: + device_set_desc(dev, "AMD-Vi/IOMMU ivhd in mixed format"); + break; + case IVRS_TYPE_HARDWARE_LEGACY: + default: + device_set_desc(dev, "AMD-Vi/IOMMU ivhd"); + break; + } + return (BUS_PROBE_NOWILDCARD); } static void -ivhd_print_flag(device_t dev, enum AcpiIvrsType ivhd_type, uint8_t flag) +ivhd_print_flag(device_t dev, enum IvrsType ivhd_type, uint8_t flag) { /* * IVHD lgeacy type has two extra high bits in flag which has * been moved to EFR for non-legacy device. */ switch (ivhd_type) { - case ACPI_IVRS_TYPE_HARDWARE: + case IVRS_TYPE_HARDWARE_LEGACY: device_printf(dev, "Flag:%b\n", flag, "\020" "\001HtTunEn" @@ -451,8 +457,8 @@ ivhd_print_flag(device_t dev, enum AcpiIvrsType ivhd_t "\008PPRSup"); break; - case ACPI_IVRS_TYPE_HARDWARE_EXT1: - case ACPI_IVRS_TYPE_HARDWARE_EXT2: + case IVRS_TYPE_HARDWARE_EFR: + case IVRS_TYPE_HARDWARE_MIXED: device_printf(dev, "Flag:%b\n", flag, "\020" "\001HtTunEn" @@ -474,10 +480,10 @@ ivhd_print_flag(device_t dev, enum AcpiIvrsType ivhd_t * Feature in legacy IVHD type(0x10) and attribute in newer type(0x11 and 0x40). */ static void -ivhd_print_feature(device_t dev, enum AcpiIvrsType ivhd_type, uint32_t feature) +ivhd_print_feature(device_t dev, enum IvrsType ivhd_type, uint32_t feature) { switch (ivhd_type) { - case ACPI_IVRS_TYPE_HARDWARE: + case IVRS_TYPE_HARDWARE_LEGACY: device_printf(dev, "Features(type:0x%x) HATS = %d GATS = %d" " MsiNumPPR = %d PNBanks= %d PNCounters= %d\n", ivhd_type, @@ -500,8 +506,8 @@ ivhd_print_feature(device_t dev, enum AcpiIvrsType ivh break; /* Fewer features or attributes are reported in non-legacy type. */ - case ACPI_IVRS_TYPE_HARDWARE_EXT1: - case ACPI_IVRS_TYPE_HARDWARE_EXT2: + case IVRS_TYPE_HARDWARE_EFR: + case IVRS_TYPE_HARDWARE_MIXED: device_printf(dev, "Features(type:0x%x) MsiNumPPR = %d" " PNBanks= %d PNCounters= %d\n", ivhd_type, @@ -605,7 +611,7 @@ static int ivhd_attach(device_t dev) { ACPI_IVRS_HARDWARE *ivhd; - ACPI_IVRS_HARDWARE_NEW *ivhd1; + ACPI_IVRS_HARDWARE_EFRSUP *ivhd_efr; struct amdvi_softc *softc; int status, unit; @@ -640,10 +646,10 @@ ivhd_attach(device_t dev) softc->event_msix = ivhd->Info & 0x1F; #endif switch (ivhd->Header.Type) { - case ACPI_IVRS_TYPE_HARDWARE_EXT1: - case ACPI_IVRS_TYPE_HARDWARE_EXT2: - ivhd1 = (ACPI_IVRS_HARDWARE_NEW *)ivhd; - softc->ext_feature = ivhd1->ExtFR; + case IVRS_TYPE_HARDWARE_EFR: + case IVRS_TYPE_HARDWARE_MIXED: + ivhd_efr = (ACPI_IVRS_HARDWARE_EFRSUP *)ivhd; + softc->ext_feature = ivhd_efr->ExtFR; break; } Modified: head/sys/contrib/dev/acpica/include/actbl2.h ============================================================================== --- head/sys/contrib/dev/acpica/include/actbl2.h Mon Mar 5 02:13:28 2018 (r330438) +++ head/sys/contrib/dev/acpica/include/actbl2.h Mon Mar 5 02:28:25 2018 (r330439) @@ -444,8 +444,6 @@ typedef struct acpi_ivrs_header enum AcpiIvrsType { ACPI_IVRS_TYPE_HARDWARE = 0x10, - ACPI_IVRS_TYPE_HARDWARE_EXT1 = 0x11, - ACPI_IVRS_TYPE_HARDWARE_EXT2 = 0x40, ACPI_IVRS_TYPE_MEMORY1 = 0x20, ACPI_IVRS_TYPE_MEMORY2 = 0x21, ACPI_IVRS_TYPE_MEMORY3 = 0x22 @@ -483,21 +481,6 @@ typedef struct acpi_ivrs_hardware UINT32 Reserved; } ACPI_IVRS_HARDWARE; - -/* 0x11 and 0x40: I/O Virtualization Hardware Definition Block (IVHD) */ - -typedef struct acpi_ivrs_hardware_new -{ - ACPI_IVRS_HEADER Header; - UINT16 CapabilityOffset; /* Offset for IOMMU control fields */ - UINT64 BaseAddress; /* IOMMU control registers */ - UINT16 PciSegmentGroup; - UINT16 Info; /* MSI number and unit ID */ - UINT32 Attr; /* IOMMU Feature */ - UINT64 ExtFR; /* IOMMU Extended Feature */ - UINT64 Reserved; /* v1 feature or v2 attribute */ - -} ACPI_IVRS_HARDWARE_NEW; /* Masks for Info field above */ From owner-svn-src-all@freebsd.org Mon Mar 5 02:32:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3546FF255DB; Mon, 5 Mar 2018 02:32:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDD5D7DE80; Mon, 5 Mar 2018 02:32:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8C131DEB4; Mon, 5 Mar 2018 02:32:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w252WNph041209; Mon, 5 Mar 2018 02:32:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w252WN72041208; Mon, 5 Mar 2018 02:32:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803050232.w252WN72041208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 5 Mar 2018 02:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330440 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 330440 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 02:32:24 -0000 Author: ian Date: Mon Mar 5 02:32:23 2018 New Revision: 330440 URL: https://svnweb.freebsd.org/changeset/base/330440 Log: Switch imx_gpio to attach at BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE. Pretty much any other device might need to manipulate a gpio pin during its probe or attach routines, so these devices must be available as early as possible. The gpio device is an interrupt controller, but I didn't choose the INTERRUPT pass for that reason (it works fine as an interrupt controller as long as it attaches any time before interrupts are enabled). That just looked like the right place in the passes to ensure that it attaches before any type of device that might need gpio pin manipulations. Modified: head/sys/arm/freescale/imx/imx_gpio.c Modified: head/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpio.c Mon Mar 5 02:28:25 2018 (r330439) +++ head/sys/arm/freescale/imx/imx_gpio.c Mon Mar 5 02:32:23 2018 (r330440) @@ -868,5 +868,5 @@ static driver_t imx51_gpio_driver = { }; static devclass_t imx51_gpio_devclass; -DRIVER_MODULE(imx51_gpio, simplebus, imx51_gpio_driver, imx51_gpio_devclass, - 0, 0); +EARLY_DRIVER_MODULE(imx51_gpio, simplebus, imx51_gpio_driver, + imx51_gpio_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE); From owner-svn-src-all@freebsd.org Mon Mar 5 03:34:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D11EF2ABE8; Mon, 5 Mar 2018 03:34:02 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E04F2800B4; Mon, 5 Mar 2018 03:34:01 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA2FC1E8CB; Mon, 5 Mar 2018 03:34:01 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w253Y18h071836; Mon, 5 Mar 2018 03:34:01 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w253Y1Rq071835; Mon, 5 Mar 2018 03:34:01 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201803050334.w253Y1Rq071835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 5 Mar 2018 03:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330441 - head/usr.sbin/rpcbind X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: head/usr.sbin/rpcbind X-SVN-Commit-Revision: 330441 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 03:34:02 -0000 Author: hrs Date: Mon Mar 5 03:34:01 2018 New Revision: 330441 URL: https://svnweb.freebsd.org/changeset/base/330441 Log: Partially back out changes in r327464. stdlib.h is used when RPCBIND_DEBUG is enabled. Modified: head/usr.sbin/rpcbind/rpcb_svc.c Modified: head/usr.sbin/rpcbind/rpcb_svc.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc.c Mon Mar 5 02:32:23 2018 (r330440) +++ head/usr.sbin/rpcbind/rpcb_svc.c Mon Mar 5 03:34:01 2018 (r330441) @@ -48,6 +48,9 @@ #include #include #include +#ifdef RPCBIND_DEBUG +#include +#endif #include #include "rpcbind.h" From owner-svn-src-all@freebsd.org Mon Mar 5 03:38:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C947EF2B105; Mon, 5 Mar 2018 03:38:31 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7344B80354; Mon, 5 Mar 2018 03:38:31 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E5511E8D4; Mon, 5 Mar 2018 03:38:31 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w253cVBv072023; Mon, 5 Mar 2018 03:38:31 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w253cVLt072022; Mon, 5 Mar 2018 03:38:31 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201803050338.w253cVLt072022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 5 Mar 2018 03:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330442 - head/usr.sbin/rpcbind X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: head/usr.sbin/rpcbind X-SVN-Commit-Revision: 330442 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 03:38:32 -0000 Author: hrs Date: Mon Mar 5 03:38:31 2018 New Revision: 330442 URL: https://svnweb.freebsd.org/changeset/base/330442 Log: - Remove extra NULL check before free(). - Fix null pointer dereference in netbuffree() and use netbuffree() where applicable. Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_com.c Mon Mar 5 03:34:01 2018 (r330441) +++ head/usr.sbin/rpcbind/rpcb_svc_com.c Mon Mar 5 03:38:31 2018 (r330442) @@ -183,12 +183,9 @@ map_set(RPCB *regp, char *owner) a->r_addr = strdup(reg.r_addr); a->r_owner = strdup(owner); if (!a->r_addr || !a->r_netid || !a->r_owner) { - if (a->r_netid) - free(a->r_netid); - if (a->r_addr) - free(a->r_addr); - if (a->r_owner) - free(a->r_owner); + free(a->r_netid); + free(a->r_addr); + free(a->r_owner); free(rbl); return (FALSE); } @@ -372,11 +369,8 @@ rpcbproc_uaddr2taddr_com(void *arg, struct svc_req *rq static struct netbuf nbuf; static struct netbuf *taddr; - if (taddr) { - free(taddr->buf); - free(taddr); - taddr = NULL; - } + netbuffree(taddr); + taddr = NULL; if (((nconf = rpcbind_get_conf(transp->xp_netid)) == NULL) || ((taddr = uaddr2taddr(nconf, *uaddrp)) == NULL)) { (void) memset((char *)&nbuf, 0, sizeof (struct netbuf)); @@ -685,8 +679,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *tr (unsigned long)a.rmt_prog, (unsigned long)a.rmt_vers, (unsigned long)a.rmt_proc, transp->xp_netid, uaddr ? uaddr : "unknown"); - if (uaddr) - free(uaddr); + free(uaddr); } #endif @@ -730,8 +723,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *tr rbl->rpcb_map.r_addr, NULL); if (uaddr == NULL || uaddr[0] == '\0') { svcerr_noprog(transp); - if (uaddr != NULL) - free(uaddr); + free(uaddr); goto error; } free(uaddr); @@ -910,18 +902,11 @@ error: if (call_msg.rm_xid != 0) (void) free_slot_by_xid(call_msg.rm_xid); out: - if (local_uaddr) - free(local_uaddr); - if (buf_alloc) - free(buf_alloc); - if (outbuf_alloc) - free(outbuf_alloc); - if (na) { - free(na->buf); - free(na); - } - if (m_uaddr != NULL) - free(m_uaddr); + free(local_uaddr); + free(buf_alloc); + free(outbuf_alloc); + netbuffree(na); + free(m_uaddr); } /* @@ -1058,8 +1043,7 @@ netbuf_copybuf(struct netbuf *dst, const struct netbuf assert(src->len <= src->maxlen); if (dst->maxlen < src->len || dst->buf == NULL) { - if (dst->buf != NULL) - free(dst->buf); + free(dst->buf); if ((dst->buf = calloc(1, src->maxlen)) == NULL) return (FALSE); dst->maxlen = src->maxlen; @@ -1088,6 +1072,9 @@ netbufdup(struct netbuf *ap) static void netbuffree(struct netbuf *ap) { + + if (ap == NULL) + return; free(ap->buf); ap->buf = NULL; free(ap); @@ -1317,13 +1304,11 @@ handle_reply(int fd, SVCXPRT *xprt) fprintf(stderr, "handle_reply: forwarding address %s to %s\n", a.rmt_uaddr, uaddr ? uaddr : "unknown"); } - if (uaddr) - free(uaddr); + free(uaddr); #endif svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a); done: - if (buffer) - free(buffer); + free(buffer); if (reply_msg.rm_xid == 0) { #ifdef SVC_RUN_DEBUG From owner-svn-src-all@freebsd.org Mon Mar 5 04:30:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 507B6F2EB17; Mon, 5 Mar 2018 04:30:15 +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 9913381D43; Mon, 5 Mar 2018 04:30:14 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 1CF833C598C; Mon, 5 Mar 2018 15:30:06 +1100 (AEDT) Date: Mon, 5 Mar 2018 15:30:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330436 - head/bin/chflags In-Reply-To: <1520215860.38056.3.camel@freebsd.org> Message-ID: <20180305140228.P935@besplex.bde.org> References: <201803050156.w251u7Y8020941@repo.freebsd.org> <1520215860.38056.3.camel@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=VJytp5HX c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=NBMmwN1QNX4WqbsGi18A:9 a=aKvoep2yXyZLnYum:21 a=h_QEmZbpdLjRLaRh:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 04:30:15 -0000 On Sun, 4 Mar 2018, Ian Lepore wrote: > On Mon, 2018-03-05 at 01:56 +0000, Bryan Drewery wrote: >> >> Log: >> \xa0 chflags: Add -x option to not traverse mount points. > > Yay! \xa0One day later than I needed it, but still, yay! I recently noticed that find(1) needs an option to not look at mount points at all, and further options to classify mount points so that you can prune them. After reading the above and investigating further, I noticed that -x is broken in most FreeBSD utilities, since POSIX requires not looking at mount points at all for the few utilities that support -x. E.g., for du in 2001 draft 7 POSIX: 12578 -x When evaluating file sizes, evaluate only those files that have the same device as 12579 the file specified by the file operand. 12580 Specifying more than one of the mutually-exclusive options -H and -L shall not be considered Mount points are on a different device, but FreeBSD du -x is broken by using FTS_XDEV and not filtering out the mount points. Linux du -x (an old version in /compat/linyx/usr/bin) works correctly. (Elsewhere, POSIX uses the terms "mount point" and "file system" without specifying what they mean. E.g., for FTW_MOUNT which corresponds tp FTS_XDEV, it says "The walk does not cross a mount point". It is also unclear what "cross" means here -- the names of mount points are in the same file system although everything (?) else is in another file system. "mount point" should be specified as "a file whose device differs from the device of its directory", and "file system" should be specified as "all files on the system with the same given device". The latter allows the trees for file system to have weird topologies but is as good as anything. It is better than "all files under a mount point with the same device as the mount point". With the latter definition, given stat structs or even pathnames to 2 files, you would potentially have to walk all files starting at the root directory (if there is one) to determine if the 2 files satisfy the topological condtion of being under the same mount point.) FTS_XDEV is documented as doing the wrong thing for du -x by saying that it doesn't "descend" "into directories that have a different device number than the file from which the descent began". Its description of "same device" is too verbose. It would benefit from formally specifying mount points and file systems and "cross" too. Its "descent" is just good enough without a formal specification since the mount point is at level 0 in the new file system and a descent of 0 levels is not a descent in informal use (like for "negative", but unlike for ascent/positive where it is unclear if 0 levels is an degenerate ascent). The old POSIX draft uses "same.*device" just once according to a simple grep. This is the one quoted above for du -x. Old POSIX find doesn't even have -x. It has -xdev. This is strange, since FreeBSD's man page has said since long before 2001 that it is -xdev that is deprecated. It specifies -xdev using "descending", like for FTS_XDEV but with worse verbose wording. find(1) seems to be missing a classification option for mount points in both FreeBSD and POSIX. This could be used to prune mount points, but pruning is much harder than using a flag that works like -x should work. Perhaps something can be done with pruning levels for any utility that supports -x). E.g. -xx could descend to N levels, where the level counter is set to 0 when a mount point is _first_ reached. Then -xx-1 would give the correct du -x behaviour of not doing the degenerate descent to level 0; -xx0 would give the find behaviour of doing the degenerate descent to level 0; -xx1 would descend 1 level; other positive descents are easy to implement; ther negative descents are too hard to implement. Bruce From owner-svn-src-all@freebsd.org Mon Mar 5 06:37:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40789F359CC; Mon, 5 Mar 2018 06:37:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9FE385DCD; Mon, 5 Mar 2018 06:37:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA17D2058D; Mon, 5 Mar 2018 06:37:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w256b2jx061287; Mon, 5 Mar 2018 06:37:02 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w256b2Ss061285; Mon, 5 Mar 2018 06:37:02 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050637.w256b2Ss061285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 06:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330443 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 330443 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 06:37:03 -0000 Author: eadler Date: Mon Mar 5 06:37:02 2018 New Revision: 330443 URL: https://svnweb.freebsd.org/changeset/base/330443 Log: MFC r306896: Fix spurious white space introduced in r301059 r301059 accidently introduced a subtle change for point to point interfaces where an extra space is inserted before the netmask. This can cause issues for scripts that parse ifconfig output. Modified: stable/11/sbin/ifconfig/af_inet.c stable/11/sbin/ifconfig/af_inet6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/af_inet.c ============================================================================== --- stable/11/sbin/ifconfig/af_inet.c Mon Mar 5 03:38:31 2018 (r330442) +++ stable/11/sbin/ifconfig/af_inet.c Mon Mar 5 06:37:02 2018 (r330443) @@ -88,7 +88,7 @@ in_status(int s __unused, const struct ifaddrs *ifa) sin = (struct sockaddr_in *)ifa->ifa_dstaddr; if (sin == NULL) sin = &null_sin; - printf(" --> %s ", inet_ntoa(sin->sin_addr)); + printf(" --> %s", inet_ntoa(sin->sin_addr)); } sin = (struct sockaddr_in *)ifa->ifa_netmask; Modified: stable/11/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/11/sbin/ifconfig/af_inet6.c Mon Mar 5 03:38:31 2018 (r330442) +++ stable/11/sbin/ifconfig/af_inet6.c Mon Mar 5 06:37:02 2018 (r330443) @@ -237,7 +237,7 @@ in6_status(int s __unused, const struct ifaddrs *ifa) if (error != 0) inet_ntop(AF_INET6, &sin->sin6_addr, addr_buf, sizeof(addr_buf)); - printf(" --> %s ", addr_buf); + printf(" --> %s", addr_buf); } } From owner-svn-src-all@freebsd.org Mon Mar 5 06:47:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F374FF360E9; Mon, 5 Mar 2018 06:47:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A478986450; Mon, 5 Mar 2018 06:47:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E53720732; Mon, 5 Mar 2018 06:47:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w256lSvX066039; Mon, 5 Mar 2018 06:47:28 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w256lSTU066038; Mon, 5 Mar 2018 06:47:28 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050647.w256lSTU066038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 06:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330444 - stable/11/sys/dev/aacraid X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/aacraid X-SVN-Commit-Revision: 330444 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 06:47:29 -0000 Author: eadler Date: Mon Mar 5 06:47:28 2018 New Revision: 330444 URL: https://svnweb.freebsd.org/changeset/base/330444 Log: MFC r308065: Remove a PCI ID for a raid controller from Adaptec that was planned, but never released. Since no real hardware was released with this ID, just drop it from the aacraid driver. This paves the path for future drivers for hardware that actually has this ID. Submitted by: Scott Benesh from Microsemi. Differential Revision: https://reviews.freebsd.org/D8377 MFC After: 3 days Modified: stable/11/sys/dev/aacraid/aacraid_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/aacraid/aacraid_pci.c ============================================================================== --- stable/11/sys/dev/aacraid/aacraid_pci.c Mon Mar 5 06:37:02 2018 (r330443) +++ stable/11/sys/dev/aacraid/aacraid_pci.c Mon Mar 5 06:47:28 2018 (r330444) @@ -102,8 +102,6 @@ struct aac_ident "Adaptec RAID Controller"}, {0x9005, 0x028d, 0, 0, AAC_HWIF_SRCV, 0, "Adaptec RAID Controller"}, - {0x9005, 0x028f, 0, 0, AAC_HWIF_SRCV, 0, - "Adaptec RAID Controller"}, {0, 0, 0, 0, 0, 0, 0} }; From owner-svn-src-all@freebsd.org Mon Mar 5 06:52:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 034B0F362D0; Mon, 5 Mar 2018 06:52:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A721D86866; Mon, 5 Mar 2018 06:52:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1EF2208BB; Mon, 5 Mar 2018 06:52:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w256qRbk071214; Mon, 5 Mar 2018 06:52:27 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w256qQvu071205; Mon, 5 Mar 2018 06:52:26 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050652.w256qQvu071205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 06:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330445 - in stable/11/sys/netinet: . cc tcp_stacks X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys/netinet: . cc tcp_stacks X-SVN-Commit-Revision: 330445 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 06:52:28 -0000 Author: eadler Date: Mon Mar 5 06:52:26 2018 New Revision: 330445 URL: https://svnweb.freebsd.org/changeset/base/330445 Log: MFC r307901,r308180: FreeBSD tcp stack used to inform respective congestion control module about the loss event but not use or obay the recommendations i.e. values set by it in some cases. Here is an attempt to solve that confusion by following relevant RFCs/drafts. Stack only sets congestion window/slow start threshold values when there is no CC module availalbe to take that action. All CC modules are inspected and updated when needed to take appropriate action on loss. tcp_stacks/fastpath module has been updated to adapt these changes. Note: Probably, the most significant change would be to not bring congestion window down to 1MSS on a loss signaled by 3-duplicate acks and letting respective CC decide that value. Modified: stable/11/sys/netinet/cc/cc_cdg.c stable/11/sys/netinet/cc/cc_chd.c stable/11/sys/netinet/cc/cc_cubic.c stable/11/sys/netinet/cc/cc_dctcp.c stable/11/sys/netinet/cc/cc_htcp.c stable/11/sys/netinet/cc/cc_newreno.c stable/11/sys/netinet/tcp_input.c stable/11/sys/netinet/tcp_stacks/fastpath.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/cc/cc_cdg.c ============================================================================== --- stable/11/sys/netinet/cc/cc_cdg.c Mon Mar 5 06:47:28 2018 (r330444) +++ stable/11/sys/netinet/cc/cc_cdg.c Mon Mar 5 06:52:26 2018 (r330445) @@ -431,7 +431,12 @@ static void cdg_cong_signal(struct cc_var *ccv, uint32_t signal_type) { struct cdg *cdg_data = ccv->cc_data; + uint32_t cwin; + u_int mss; + cwin = CCV(ccv, snd_cwnd); + mss = CCV(ccv, t_maxseg); + switch(signal_type) { case CC_CDG_DELAY: CCV(ccv, snd_ssthresh) = cdg_window_decrease(ccv, @@ -448,7 +453,7 @@ cdg_cong_signal(struct cc_var *ccv, uint32_t signal_ty */ if (IN_CONGRECOVERY(CCV(ccv, t_flags)) || cdg_data->queue_state < CDG_Q_FULL) { - CCV(ccv, snd_ssthresh) = CCV(ccv, snd_cwnd); + CCV(ccv, snd_ssthresh) = cwin; CCV(ccv, snd_recover) = CCV(ccv, snd_max); } else { /* @@ -461,12 +466,18 @@ cdg_cong_signal(struct cc_var *ccv, uint32_t signal_ty cdg_data->shadow_w, RENO_BETA); CCV(ccv, snd_ssthresh) = ulmax(cdg_data->shadow_w, - cdg_window_decrease(ccv, CCV(ccv, snd_cwnd), - V_cdg_beta_loss)); + cdg_window_decrease(ccv, cwin, V_cdg_beta_loss)); + CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); cdg_data->window_incr = cdg_data->rtt_count = 0; } ENTER_RECOVERY(CCV(ccv, t_flags)); + break; + case CC_RTO: + CCV(ccv, snd_ssthresh) = + max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) + * mss; + CCV(ccv, snd_cwnd) = mss; break; default: newreno_cc_algo.cong_signal(ccv, signal_type); Modified: stable/11/sys/netinet/cc/cc_chd.c ============================================================================== --- stable/11/sys/netinet/cc/cc_chd.c Mon Mar 5 06:47:28 2018 (r330444) +++ stable/11/sys/netinet/cc/cc_chd.c Mon Mar 5 06:52:26 2018 (r330445) @@ -330,10 +330,12 @@ chd_cong_signal(struct cc_var *ccv, uint32_t signal_ty struct ertt *e_t; struct chd *chd_data; int qdly; + u_int mss; e_t = khelp_get_osd(CCV(ccv, osd), ertt_id); chd_data = ccv->cc_data; qdly = imax(e_t->rtt, chd_data->maxrtt_in_rtt) - e_t->minrtt; + mss = CCV(ccv, t_maxseg); switch(signal_type) { case CC_CHD_DELAY: @@ -372,6 +374,12 @@ chd_cong_signal(struct cc_var *ccv, uint32_t signal_ty CCV(ccv, t_maxseg) / 2, 2) * CCV(ccv, t_maxseg); } ENTER_FASTRECOVERY(CCV(ccv, t_flags)); + break; + case CC_RTO: + CCV(ccv, snd_ssthresh) = + max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) + * mss; + CCV(ccv, snd_cwnd) = mss; break; default: Modified: stable/11/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/11/sys/netinet/cc/cc_cubic.c Mon Mar 5 06:47:28 2018 (r330444) +++ stable/11/sys/netinet/cc/cc_cubic.c Mon Mar 5 06:52:26 2018 (r330445) @@ -225,8 +225,12 @@ static void cubic_cong_signal(struct cc_var *ccv, uint32_t type) { struct cubic *cubic_data; + uint32_t cwin; + u_int mss; cubic_data = ccv->cc_data; + cwin = CCV(ccv, snd_cwnd); + mss = CCV(ccv, t_maxseg); switch (type) { case CC_NDUPACK: @@ -235,7 +239,8 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) cubic_ssthresh_update(ccv); cubic_data->num_cong_events++; cubic_data->prev_max_cwnd = cubic_data->max_cwnd; - cubic_data->max_cwnd = CCV(ccv, snd_cwnd); + cubic_data->max_cwnd = cwin; + CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); } ENTER_RECOVERY(CCV(ccv, t_flags)); } @@ -246,7 +251,7 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) cubic_ssthresh_update(ccv); cubic_data->num_cong_events++; cubic_data->prev_max_cwnd = cubic_data->max_cwnd; - cubic_data->max_cwnd = CCV(ccv, snd_cwnd); + cubic_data->max_cwnd = cwin; cubic_data->t_last_cong = ticks; CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); ENTER_CONGRECOVERY(CCV(ccv, t_flags)); @@ -261,9 +266,13 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) * chance the first one is a false alarm and may not indicate * congestion. */ - if (CCV(ccv, t_rxtshift) >= 2) + if (CCV(ccv, t_rxtshift) >= 2) { cubic_data->num_cong_events++; cubic_data->t_last_cong = ticks; + cubic_ssthresh_update(ccv); + cubic_data->max_cwnd = cwin; + CCV(ccv, snd_cwnd) = mss; + } break; } } Modified: stable/11/sys/netinet/cc/cc_dctcp.c ============================================================================== --- stable/11/sys/netinet/cc/cc_dctcp.c Mon Mar 5 06:47:28 2018 (r330444) +++ stable/11/sys/netinet/cc/cc_dctcp.c Mon Mar 5 06:52:26 2018 (r330445) @@ -230,27 +230,29 @@ static void dctcp_cong_signal(struct cc_var *ccv, uint32_t type) { struct dctcp *dctcp_data; - u_int win, mss; + uint32_t cwin, ssthresh_on_loss; + u_int mss; dctcp_data = ccv->cc_data; - win = CCV(ccv, snd_cwnd); + cwin = CCV(ccv, snd_cwnd); mss = CCV(ccv, t_maxseg); + ssthresh_on_loss = + max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) + * mss; switch (type) { case CC_NDUPACK: if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { - CCV(ccv, snd_ssthresh) = mss * - max(win / 2 / mss, 2); + CCV(ccv, snd_ssthresh) = ssthresh_on_loss; dctcp_data->num_cong_events++; } else { /* cwnd has already updated as congestion * recovery. Reverse cwnd value using * snd_cwnd_prev and recalculate snd_ssthresh */ - win = CCV(ccv, snd_cwnd_prev); - CCV(ccv, snd_ssthresh) = - max(win / 2 / mss, 2) * mss; + cwin = CCV(ccv, snd_cwnd_prev); + CCV(ccv, snd_ssthresh) = ssthresh_on_loss; } ENTER_RECOVERY(CCV(ccv, t_flags)); } @@ -260,18 +262,17 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type) * Save current snd_cwnd when the host encounters both * congestion recovery and fast recovery. */ - CCV(ccv, snd_cwnd_prev) = win; + CCV(ccv, snd_cwnd_prev) = cwin; if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { if (V_dctcp_slowstart && dctcp_data->num_cong_events++ == 0) { - CCV(ccv, snd_ssthresh) = - mss * max(win / 2 / mss, 2); + CCV(ccv, snd_ssthresh) = ssthresh_on_loss; dctcp_data->alpha = MAX_ALPHA_VALUE; dctcp_data->bytes_ecn = 0; dctcp_data->bytes_total = 0; dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); } else - CCV(ccv, snd_ssthresh) = max((win - ((win * + CCV(ccv, snd_ssthresh) = max((cwin - ((cwin * dctcp_data->alpha) >> 11)) / mss, 2) * mss; CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); ENTER_CONGRECOVERY(CCV(ccv, t_flags)); @@ -284,6 +285,8 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type) dctcp_update_alpha(ccv); dctcp_data->save_sndnxt += CCV(ccv, t_maxseg); dctcp_data->num_cong_events++; + CCV(ccv, snd_ssthresh) = ssthresh_on_loss; + CCV(ccv, snd_cwnd) = mss; } break; } Modified: stable/11/sys/netinet/cc/cc_htcp.c ============================================================================== --- stable/11/sys/netinet/cc/cc_htcp.c Mon Mar 5 06:47:28 2018 (r330444) +++ stable/11/sys/netinet/cc/cc_htcp.c Mon Mar 5 06:52:26 2018 (r330445) @@ -271,8 +271,12 @@ static void htcp_cong_signal(struct cc_var *ccv, uint32_t type) { struct htcp *htcp_data; + uint32_t cwin; + u_int mss; htcp_data = ccv->cc_data; + cwin = CCV(ccv, snd_cwnd); + mss = CCV(ccv, t_maxseg); switch (type) { case CC_NDUPACK: @@ -287,8 +291,9 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type) (htcp_data->maxrtt - htcp_data->minrtt) * 95) / 100; htcp_ssthresh_update(ccv); + CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); htcp_data->t_last_cong = ticks; - htcp_data->prev_cwnd = CCV(ccv, snd_cwnd); + htcp_data->prev_cwnd = cwin; } ENTER_RECOVERY(CCV(ccv, t_flags)); } @@ -305,7 +310,7 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type) htcp_ssthresh_update(ccv); CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); htcp_data->t_last_cong = ticks; - htcp_data->prev_cwnd = CCV(ccv, snd_cwnd); + htcp_data->prev_cwnd = cwin; ENTER_CONGRECOVERY(CCV(ccv, t_flags)); } break; @@ -320,6 +325,10 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type) */ if (CCV(ccv, t_rxtshift) >= 2) htcp_data->t_last_cong = ticks; + CCV(ccv, snd_ssthresh) = + max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) + * mss; + CCV(ccv, snd_cwnd) = mss; break; } } @@ -511,6 +520,10 @@ htcp_ssthresh_update(struct cc_var *ccv) CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * htcp_data->beta) >> HTCP_SHIFT; } + + /* Align ssthresh to MSS boundary */ + CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_ssthresh) / CCV(ccv, t_maxseg)) + * CCV(ccv, t_maxseg); } Modified: stable/11/sys/netinet/cc/cc_newreno.c ============================================================================== --- stable/11/sys/netinet/cc/cc_newreno.c Mon Mar 5 06:47:28 2018 (r330444) +++ stable/11/sys/netinet/cc/cc_newreno.c Mon Mar 5 06:52:26 2018 (r330445) @@ -181,29 +181,41 @@ newreno_after_idle(struct cc_var *ccv) static void newreno_cong_signal(struct cc_var *ccv, uint32_t type) { - u_int win; + uint32_t cwin, ssthresh_on_loss; + u_int mss; + cwin = CCV(ccv, snd_cwnd); + mss = CCV(ccv, t_maxseg); + ssthresh_on_loss = + max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) + * mss; + /* Catch algos which mistakenly leak private signal types. */ KASSERT((type & CC_SIGPRIVMASK) == 0, ("%s: congestion signal type 0x%08x is private\n", __func__, type)); - win = max(CCV(ccv, snd_cwnd) / 2 / CCV(ccv, t_maxseg), 2) * - CCV(ccv, t_maxseg); + cwin = max(cwin / 2 / mss, 2) * mss; switch (type) { case CC_NDUPACK: if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { - if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) - CCV(ccv, snd_ssthresh) = win; + if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { + CCV(ccv, snd_ssthresh) = ssthresh_on_loss; + CCV(ccv, snd_cwnd) = cwin; + } ENTER_RECOVERY(CCV(ccv, t_flags)); } break; case CC_ECN: if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { - CCV(ccv, snd_ssthresh) = win; - CCV(ccv, snd_cwnd) = win; + CCV(ccv, snd_ssthresh) = ssthresh_on_loss; + CCV(ccv, snd_cwnd) = cwin; ENTER_CONGRECOVERY(CCV(ccv, t_flags)); } + break; + case CC_RTO: + CCV(ccv, snd_ssthresh) = ssthresh_on_loss; + CCV(ccv, snd_cwnd) = mss; break; } } Modified: stable/11/sys/netinet/tcp_input.c ============================================================================== --- stable/11/sys/netinet/tcp_input.c Mon Mar 5 06:47:28 2018 (r330444) +++ stable/11/sys/netinet/tcp_input.c Mon Mar 5 06:52:26 2018 (r330445) @@ -429,9 +429,16 @@ cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, ui tp->t_dupacks = 0; tp->t_bytes_acked = 0; EXIT_RECOVERY(tp->t_flags); - tp->snd_ssthresh = max(2, min(tp->snd_wnd, tp->snd_cwnd) / 2 / - maxseg) * maxseg; - tp->snd_cwnd = maxseg; + if (CC_ALGO(tp)->cong_signal == NULL) { + /* + * RFC5681 Section 3.1 + * ssthresh = max (FlightSize / 2, 2*SMSS) eq (4) + */ + tp->snd_ssthresh = + max((tp->snd_max - tp->snd_una) / 2 / maxseg, 2) + * maxseg; + tp->snd_cwnd = maxseg; + } break; case CC_RTO_ERR: TCPSTAT_INC(tcps_sndrexmitbad); @@ -2592,6 +2599,15 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if (awnd < tp->snd_ssthresh) { tp->snd_cwnd += maxseg; + /* + * RFC5681 Section 3.2 talks about cwnd + * inflation on additional dupacks and + * deflation on recovering from loss. + * + * We keep cwnd into check so that + * we don't have to 'deflate' it when we + * get out of recovery. + */ if (tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; } @@ -2630,19 +2646,22 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru TCPSTAT_INC( tcps_sack_recovery_episode); tp->sack_newdata = tp->snd_nxt; - tp->snd_cwnd = maxseg; + if (CC_ALGO(tp)->cong_signal == NULL) + tp->snd_cwnd = maxseg; (void) tp->t_fb->tfb_tcp_output(tp); goto drop; } tp->snd_nxt = th->th_ack; - tp->snd_cwnd = maxseg; + if (CC_ALGO(tp)->cong_signal == NULL) + tp->snd_cwnd = maxseg; (void) tp->t_fb->tfb_tcp_output(tp); KASSERT(tp->snd_limited <= 2, ("%s: tp->snd_limited too big", __func__)); - tp->snd_cwnd = tp->snd_ssthresh + - maxseg * - (tp->t_dupacks - tp->snd_limited); + if (CC_ALGO(tp)->cong_signal == NULL) + tp->snd_cwnd = tp->snd_ssthresh + + maxseg * + (tp->t_dupacks - tp->snd_limited); if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; goto drop; Modified: stable/11/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- stable/11/sys/netinet/tcp_stacks/fastpath.c Mon Mar 5 06:47:28 2018 (r330444) +++ stable/11/sys/netinet/tcp_stacks/fastpath.c Mon Mar 5 06:52:26 2018 (r330445) @@ -1035,6 +1035,15 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, str if (awnd < tp->snd_ssthresh) { tp->snd_cwnd += tp->t_maxseg; + /* + * RFC5681 Section 3.2 talks about cwnd + * inflation on additional dupacks and + * deflation on recovering from loss. + * + * We keep cwnd into check so that + * we don't have to 'deflate' it when we + * get out of recovery. + */ if (tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; } @@ -1073,19 +1082,22 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, str TCPSTAT_INC( tcps_sack_recovery_episode); tp->sack_newdata = tp->snd_nxt; - tp->snd_cwnd = tp->t_maxseg; + if (CC_ALGO(tp)->cong_signal == NULL) + tp->snd_cwnd = tp->t_maxseg; (void) tp->t_fb->tfb_tcp_output(tp); goto drop; } tp->snd_nxt = th->th_ack; - tp->snd_cwnd = tp->t_maxseg; + if (CC_ALGO(tp)->cong_signal == NULL) + tp->snd_cwnd = tp->t_maxseg; (void) tp->t_fb->tfb_tcp_output(tp); KASSERT(tp->snd_limited <= 2, ("%s: tp->snd_limited too big", __func__)); - tp->snd_cwnd = tp->snd_ssthresh + - tp->t_maxseg * - (tp->t_dupacks - tp->snd_limited); + if (CC_ALGO(tp)->cong_signal == NULL) + tp->snd_cwnd = tp->snd_ssthresh + + tp->t_maxseg * + (tp->t_dupacks - tp->snd_limited); if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; goto drop; From owner-svn-src-all@freebsd.org Mon Mar 5 06:59:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECF20F36728; Mon, 5 Mar 2018 06:59:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BBB286B66; Mon, 5 Mar 2018 06:59:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82E48208C5; Mon, 5 Mar 2018 06:59:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w256xYsE071656; Mon, 5 Mar 2018 06:59:34 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w256xVAx071623; Mon, 5 Mar 2018 06:59:31 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050659.w256xVAx071623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 06:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330446 - in stable/11: lib/libc/include lib/libc/sparc64/fpu lib/libedit lib/libefivar lib/msun/src sys/amd64/amd64 sys/dev/ath sys/dev/cadence sys/dev/de sys/dev/drm sys/dev/e1000 sys... X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11: lib/libc/include lib/libc/sparc64/fpu lib/libedit lib/libefivar lib/msun/src sys/amd64/amd64 sys/dev/ath sys/dev/cadence sys/dev/de sys/dev/drm sys/dev/e1000 sys/dev/isci/scil sys/dev/iw... X-SVN-Commit-Revision: 330446 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 06:59:35 -0000 Author: eadler Date: Mon Mar 5 06:59:30 2018 New Revision: 330446 URL: https://svnweb.freebsd.org/changeset/base/330446 Log: MFC r327231,r327232: kernel: Fix several typos and minor errors lib: Fix several typos and minor errors - duplicate words - typos - references to old versions of FreeBSD Modified: stable/11/lib/libc/include/reentrant.h stable/11/lib/libc/sparc64/fpu/fpu_reg.h stable/11/lib/libedit/map.c stable/11/lib/libedit/refresh.c stable/11/lib/libefivar/uefi-dputil.c stable/11/lib/msun/src/catrig.c stable/11/sys/amd64/amd64/support.S stable/11/sys/dev/ath/if_ath.c stable/11/sys/dev/cadence/if_cgem.c stable/11/sys/dev/de/if_de.c stable/11/sys/dev/drm/mga_state.c stable/11/sys/dev/e1000/e1000_82543.c stable/11/sys/dev/isci/scil/scic_sds_remote_node_context.c stable/11/sys/dev/isci/scil/scif_sas_controller.c stable/11/sys/dev/iwm/if_iwmreg.h stable/11/sys/dev/mvs/mvs_pci.c stable/11/sys/dev/mwl/if_mwl.c stable/11/sys/dev/sfxge/common/siena_nvram.c stable/11/sys/dev/sio/sio.c stable/11/sys/dev/sound/isa/mss.h stable/11/sys/dev/syscons/scvgarndr.c stable/11/sys/fs/nfsclient/nfs_clrpcops.c stable/11/sys/i386/i386/support.s stable/11/sys/kern/vfs_subr.c stable/11/sys/mips/conf/BERI_SOCKIT stable/11/sys/net/altq/altq_hfsc.h stable/11/sys/net/bpf.c stable/11/sys/net80211/ieee80211_ht.c stable/11/sys/net80211/ieee80211_scan_sta.c stable/11/sys/powerpc/booke/locore.S stable/11/sys/sparc64/pci/sbbc.c stable/11/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/include/reentrant.h ============================================================================== --- stable/11/lib/libc/include/reentrant.h Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/lib/libc/include/reentrant.h Mon Mar 5 06:59:30 2018 (r330446) @@ -65,7 +65,7 @@ * Implementation Details: * * The mutex primitives used by the library (mutex_t, mutex_lock, etc.) - * are macros which expand to the cooresponding primitives provided by + * are macros which expand to the corresponding primitives provided by * the thread engine or to nothing. The latter is used so that code is * not unreasonably cluttered with #ifdefs when all thread safe support * is removed. Modified: stable/11/lib/libc/sparc64/fpu/fpu_reg.h ============================================================================== --- stable/11/lib/libc/sparc64/fpu/fpu_reg.h Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/lib/libc/sparc64/fpu/fpu_reg.h Mon Mar 5 06:59:30 2018 (r330446) @@ -29,7 +29,7 @@ #define _LIBC_SPARC64_FPU_FPU_REG_H_ /* - * These are not really of type char[]. They are are arrays of functions defined + * These are not really of type char[]. They are arrays of functions defined * in fpu_reg.S; each array member loads/stores a certain fpu register of the * given size. */ Modified: stable/11/lib/libedit/map.c ============================================================================== --- stable/11/lib/libedit/map.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/lib/libedit/map.c Mon Mar 5 06:59:30 2018 (r330446) @@ -370,7 +370,7 @@ private const el_action_t el_map_vi_insert[] = { * NOTE: These mappings do NOT Correspond well * to the KSH VI editing assignments. * On the other and they are convenient and - * many people have have gotten used to them. + * many people have gotten used to them. */ /* 0 */ ED_UNASSIGNED, /* ^@ */ /* 1 */ ED_MOVE_TO_BEG, /* ^A */ Modified: stable/11/lib/libedit/refresh.c ============================================================================== --- stable/11/lib/libedit/refresh.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/lib/libedit/refresh.c Mon Mar 5 06:59:30 2018 (r330446) @@ -1148,7 +1148,7 @@ re_fastaddc(EditLine *el) /* re_clear_display(): - * clear the screen buffers so that new new prompt starts fresh. + * clear the screen buffers so that new prompt starts fresh. */ protected void re_clear_display(EditLine *el) Modified: stable/11/lib/libefivar/uefi-dputil.c ============================================================================== --- stable/11/lib/libefivar/uefi-dputil.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/lib/libefivar/uefi-dputil.c Mon Mar 5 06:59:30 2018 (r330446) @@ -134,7 +134,7 @@ GetDevicePathSize ( @param MaxSize The maximum size of the device path data structure. @retval TRUE DevicePath is valid. - @retval FALSE The length of any node node in the DevicePath is less + @retval FALSE The length of any node in the DevicePath is less than sizeof (EFI_DEVICE_PATH_PROTOCOL). @retval FALSE If MaxSize is not zero, the size of the DevicePath exceeds MaxSize. Modified: stable/11/lib/msun/src/catrig.c ============================================================================== --- stable/11/lib/msun/src/catrig.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/lib/msun/src/catrig.c Mon Mar 5 06:59:30 2018 (r330446) @@ -609,7 +609,7 @@ catanh(double complex z) if (ax < SQRT_3_EPSILON / 2 && ay < SQRT_3_EPSILON / 2) { /* * z = 0 was filtered out above. All other cases must raise - * inexact, but this is the only only that needs to do it + * inexact, but this is the only case that needs to do it * explicitly. */ raise_inexact(); Modified: stable/11/sys/amd64/amd64/support.S ============================================================================== --- stable/11/sys/amd64/amd64/support.S Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/amd64/amd64/support.S Mon Mar 5 06:59:30 2018 (r330446) @@ -565,7 +565,7 @@ END(subyte) * copyinstr(from, to, maxlen, int *lencopied) * %rdi, %rsi, %rdx, %rcx * - * copy a string from from to to, stop when a 0 character is reached. + * copy a string from 'from' to 'to', stop when a 0 character is reached. * return ENAMETOOLONG if string is longer than maxlen, and * EFAULT on protection violations. If lencopied is non-zero, * return the actual length in *lencopied. Modified: stable/11/sys/dev/ath/if_ath.c ============================================================================== --- stable/11/sys/dev/ath/if_ath.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/ath/if_ath.c Mon Mar 5 06:59:30 2018 (r330446) @@ -1007,9 +1007,8 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) sc->sc_txq_node_psq_maxdepth = 16; /* - * Default the maximum queue depth for a given node - * to 1/4'th the TX buffers, or 64, whichever - * is larger. + * Default the maximum queue to to 1/4'th the TX buffers, or + * 64, whichever is smaller. */ sc->sc_txq_node_maxdepth = MAX(64, ath_txbuf / 4); Modified: stable/11/sys/dev/cadence/if_cgem.c ============================================================================== --- stable/11/sys/dev/cadence/if_cgem.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/cadence/if_cgem.c Mon Mar 5 06:59:30 2018 (r330446) @@ -809,7 +809,7 @@ cgem_start_locked(if_t ifp) WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow | CGEM_NET_CTRL_START_TX); - /* If there is a BPF listener, bounce a copy to to him. */ + /* If there is a BPF listener, bounce a copy to him. */ ETHER_BPF_MTAP(ifp, m); } } Modified: stable/11/sys/dev/de/if_de.c ============================================================================== --- stable/11/sys/dev/de/if_de.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/de/if_de.c Mon Mar 5 06:59:30 2018 (r330446) @@ -3918,7 +3918,7 @@ tulip_txput(tulip_softc_t * const sc, struct mbuf *m) * a bit reminiscent of going on the Ark two by two * since each descriptor for the TULIP can describe * two buffers. So we advance through packet filling - * each of the two entries at a time to to fill each + * each of the two entries at a time to fill each * descriptor. Clear the first and last segment bits * in each descriptor (actually just clear everything * but the end-of-ring or chain bits) to make sure Modified: stable/11/sys/dev/drm/mga_state.c ============================================================================== --- stable/11/sys/dev/drm/mga_state.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/drm/mga_state.c Mon Mar 5 06:59:30 2018 (r330446) @@ -258,7 +258,7 @@ static __inline__ void mga_g200_emit_pipe(drm_mga_priv MGA_WR42, 0x0000ffff, MGA_WR60, 0x0000ffff); - /* Padding required to to hardware bug. + /* Padding required due to hardware bug. */ DMA_BLOCK(MGA_DMAPAD, 0xffffffff, MGA_DMAPAD, 0xffffffff, @@ -340,7 +340,7 @@ static __inline__ void mga_g400_emit_pipe(drm_mga_priv MGA_WR52, MGA_G400_WR_MAGIC, /* tex1 width */ MGA_WR60, MGA_G400_WR_MAGIC); /* tex1 height */ - /* Padding required to to hardware bug */ + /* Padding required due to hardware bug */ DMA_BLOCK(MGA_DMAPAD, 0xffffffff, MGA_DMAPAD, 0xffffffff, MGA_DMAPAD, 0xffffffff, Modified: stable/11/sys/dev/e1000/e1000_82543.c ============================================================================== --- stable/11/sys/dev/e1000/e1000_82543.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/e1000/e1000_82543.c Mon Mar 5 06:59:30 2018 (r330446) @@ -1309,7 +1309,7 @@ static s32 e1000_check_for_copper_link_82543(struct e1 * turn it on. For compatibility with a TBI link * partner, we will store bad packets. Some * frames have an additional byte on the end and - * will look like CRC errors to to the hardware. + * will look like CRC errors to the hardware. */ if (!e1000_tbi_sbp_enabled_82543(hw)) { e1000_set_tbi_sbp_82543(hw, TRUE); Modified: stable/11/sys/dev/isci/scil/scic_sds_remote_node_context.c ============================================================================== --- stable/11/sys/dev/isci/scil/scic_sds_remote_node_context.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/isci/scil/scic_sds_remote_node_context.c Mon Mar 5 06:59:30 2018 (r330446) @@ -897,7 +897,7 @@ SCI_STATUS scic_sds_remote_node_context_tx_suspended_s * * @param[in] this_rnc The remote node context which is to receive the task * request. -* @param[in] the_request The task request to be transmitted to to the remote +* @param[in] the_request The task request to be transmitted to the remote * target device. * * @return SCI_STATUS Modified: stable/11/sys/dev/isci/scil/scif_sas_controller.c ============================================================================== --- stable/11/sys/dev/isci/scil/scif_sas_controller.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/isci/scil/scif_sas_controller.c Mon Mar 5 06:59:30 2018 (r330446) @@ -911,7 +911,7 @@ void scif_sas_controller_free_internal_request( fw_controller, fw_internal_request_buffer )); - //return the memory to to pool. + //return the memory to the pool. if( !sci_pool_full(fw_controller->internal_request_memory_pool) ) { sci_pool_put( Modified: stable/11/sys/dev/iwm/if_iwmreg.h ============================================================================== --- stable/11/sys/dev/iwm/if_iwmreg.h Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/iwm/if_iwmreg.h Mon Mar 5 06:59:30 2018 (r330446) @@ -3734,7 +3734,7 @@ struct iwm_uapsd_misbehaving_ap_notif { * beacon filtering; beacons will not be forced to be sent to driver * regardless of whether its temperature has been changed. * @bf_enable_beacon_filter: 1, beacon filtering is enabled; 0, disabled. - * @bf_filter_escape_timer: Send beacons to to driver if no beacons were passed + * @bf_filter_escape_timer: Send beacons to the driver if no beacons were passed * for a specific period of time. Units: Beacons. * @ba_escape_timer: Fully receive and parse beacon if no beacons were passed * for a longer period of time then this escape-timeout. Units: Beacons. Modified: stable/11/sys/dev/mvs/mvs_pci.c ============================================================================== --- stable/11/sys/dev/mvs/mvs_pci.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/mvs/mvs_pci.c Mon Mar 5 06:59:30 2018 (r330446) @@ -336,7 +336,7 @@ mvs_intr(void *data) ic = ATA_INL(ctlr->r_mem, CHIP_MIC); if (ctlr->msi) { - /* We have to to mask MSI during processing. */ + /* We have to mask MSI during processing. */ mtx_lock(&ctlr->mtx); ATA_OUTL(ctlr->r_mem, CHIP_MIM, 0); ctlr->msia = 1; /* Deny MIM update during processing. */ Modified: stable/11/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/11/sys/dev/mwl/if_mwl.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/mwl/if_mwl.c Mon Mar 5 06:59:30 2018 (r330446) @@ -1237,7 +1237,7 @@ mwl_reset_vap(struct ieee80211vap *vap, int state) /* * Reset the hardware w/o losing operational state. - * Used to to reset or reload hardware state for a vap. + * Used to reset or reload hardware state for a vap. */ static int mwl_reset(struct ieee80211vap *vap, u_long cmd) Modified: stable/11/sys/dev/sfxge/common/siena_nvram.c ============================================================================== --- stable/11/sys/dev/sfxge/common/siena_nvram.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/sfxge/common/siena_nvram.c Mon Mar 5 06:59:30 2018 (r330446) @@ -525,7 +525,7 @@ siena_nvram_partn_get_version( : MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT1; /* * Ingore missing partitions on port 2, assuming they're due - * to to running on a single port part. + * to running on a single port part. */ if ((1 << dcfg_partn) & ~enp->en_u.siena.enu_partn_mask) { if (entry->port == 2) Modified: stable/11/sys/dev/sio/sio.c ============================================================================== --- stable/11/sys/dev/sio/sio.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/sio/sio.c Mon Mar 5 06:59:30 2018 (r330446) @@ -590,7 +590,7 @@ sioprobe(dev, xrid, rclk, noprobe) * junk after a (very fast) soft reboot and (apparently) after * master reset. * XXX what about the UART bug avoided by waiting in comparam()? - * We don't want to to wait long enough to drain at 2 bps. + * We don't want to wait long enough to drain at 2 bps. */ if (iobase == siocniobase) DELAY((16 + 1) * 1000000 / (comdefaultrate / 10)); Modified: stable/11/sys/dev/sound/isa/mss.h ============================================================================== --- stable/11/sys/dev/sound/isa/mss.h Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/sound/isa/mss.h Mon Mar 5 06:59:30 2018 (r330446) @@ -181,7 +181,7 @@ typedef struct mixer_def mixer_tab[32][2]; * The AD1848 codec has generic input lines called Line, Aux1 and Aux2. * Soundcard manufacturers have connected actual inputs (CD, synth, line, * etc) to these inputs in different order. Therefore it's difficult - * to assign mixer channels to to these inputs correctly. The following + * to assign mixer channels to these inputs correctly. The following * contains two alternative mappings. The first one is for GUS MAX and * the second is just a generic one (line1, line2 and line3). * (Actually this is not a mapping but rather some kind of interleaving Modified: stable/11/sys/dev/syscons/scvgarndr.c ============================================================================== --- stable/11/sys/dev/syscons/scvgarndr.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/dev/syscons/scvgarndr.c Mon Mar 5 06:59:30 2018 (r330446) @@ -467,7 +467,7 @@ draw_txtmouse(scr_stat *scp, int x, int y) } else #endif /* SC_ALT_MOUSE_IMAGE */ { - /* Red, magenta and brown are mapped to green to to keep it readable */ + /* Red, magenta and brown are mapped to green to keep it readable */ static const int col_conv[16] = { 6, 6, 6, 6, 2, 2, 2, 6, 14, 14, 14, 14, 10, 10, 10, 14 }; Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clrpcops.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c Mon Mar 5 06:59:30 2018 (r330446) @@ -5548,7 +5548,7 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode /* * Find a file layout that will handle the first bytes of the requested - * range and return the information from it needed to to the I/O operation. + * range and return the information from it needed to the I/O operation. */ int nfscl_findlayoutforio(struct nfscllayout *lyp, uint64_t off, uint32_t rwaccess, Modified: stable/11/sys/i386/i386/support.s ============================================================================== --- stable/11/sys/i386/i386/support.s Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/i386/i386/support.s Mon Mar 5 06:59:30 2018 (r330446) @@ -540,7 +540,7 @@ END(subyte) /* * copyinstr(from, to, maxlen, int *lencopied) - MP SAFE * - * copy a string from from to to, stop when a 0 character is reached. + * copy a string from 'from' to 'to', stop when a 0 character is reached. * return ENAMETOOLONG if string is longer than maxlen, and * EFAULT on protection violations. If lencopied is non-zero, * return the actual length in *lencopied. Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/kern/vfs_subr.c Mon Mar 5 06:59:30 2018 (r330446) @@ -342,7 +342,7 @@ PCTRIE_DEFINE(BUF, buf, b_lblkno, buf_trie_alloc, buf_ * * Reevaluate the following cap on the number of vnodes after the physical * memory size exceeds 512GB. In the limit, as the physical memory size - * grows, the ratio of the memory size in KB to to vnodes approaches 64:1. + * grows, the ratio of the memory size in KB to vnodes approaches 64:1. */ #ifndef MAXVNODES_MAX #define MAXVNODES_MAX (512 * 1024 * 1024 / 64) /* 8M */ Modified: stable/11/sys/mips/conf/BERI_SOCKIT ============================================================================== --- stable/11/sys/mips/conf/BERI_SOCKIT Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/mips/conf/BERI_SOCKIT Mon Mar 5 06:59:30 2018 (r330446) @@ -2,7 +2,7 @@ # BERI_SOCKIT -- Kernel for the SRI/Cambridge "BERI" (Bluespec Extensible # RISC Implementation) FPGA soft core, as configured in its Terasic SoCKit # reference configuration. This kernel configration must be further -# specialized to to include a root filesystem specification. +# specialized to include a root filesystem specification. # # $FreeBSD$ # Modified: stable/11/sys/net/altq/altq_hfsc.h ============================================================================== --- stable/11/sys/net/altq/altq_hfsc.h Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/net/altq/altq_hfsc.h Mon Mar 5 06:59:30 2018 (r330446) @@ -192,7 +192,7 @@ struct hfsc_class_stats { * representation. * the slope values are scaled to avoid overflow. * the inverse slope values as well as the y-projection of the 1st - * segment are kept in order to to avoid 64-bit divide operations + * segment are kept in order to avoid 64-bit divide operations * that are expensive on 32-bit architectures. * * note: Intel Pentium TSC never wraps around in several thousands of years. Modified: stable/11/sys/net/bpf.c ============================================================================== --- stable/11/sys/net/bpf.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/net/bpf.c Mon Mar 5 06:59:30 2018 (r330446) @@ -687,7 +687,7 @@ bpf_check_upgrade(u_long cmd, struct bpf_d *d, struct * Check if cmd looks like snaplen setting from * pcap_bpf.c:pcap_open_live(). * Note we're not checking .k value here: - * while pcap_open_live() definitely sets to to non-zero value, + * while pcap_open_live() definitely sets to non-zero value, * we'd prefer to treat k=0 (deny ALL) case the same way: e.g. * do not consider upgrading immediately */ Modified: stable/11/sys/net80211/ieee80211_ht.c ============================================================================== --- stable/11/sys/net80211/ieee80211_ht.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/net80211/ieee80211_ht.c Mon Mar 5 06:59:30 2018 (r330446) @@ -2965,7 +2965,7 @@ ieee80211_add_htinfo_body(uint8_t *frm, struct ieee802 } /* - * Add 802.11n HT information information element. + * Add 802.11n HT information element. */ uint8_t * ieee80211_add_htinfo(uint8_t *frm, struct ieee80211_node *ni) Modified: stable/11/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- stable/11/sys/net80211/ieee80211_scan_sta.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/net80211/ieee80211_scan_sta.c Mon Mar 5 06:59:30 2018 (r330446) @@ -116,7 +116,7 @@ static void sta_flush_table(struct sta_table *); /* * match_bss returns a bitmask describing if an entry is suitable * for use. If non-zero the entry was deemed not suitable and it's - * contents explains why. The following flags are or'd to to this + * contents explains why. The following flags are or'd to this * mask and can be used to figure out why the entry was rejected. */ #define MATCH_CHANNEL 0x00001 /* channel mismatch */ Modified: stable/11/sys/powerpc/booke/locore.S ============================================================================== --- stable/11/sys/powerpc/booke/locore.S Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/powerpc/booke/locore.S Mon Mar 5 06:59:30 2018 (r330446) @@ -79,7 +79,7 @@ __start: * - Switch to temp mapping * - Map 64MB of RAM in TLB1[1] * - Use AS=1, set EPN to KERNBASE and RPN to kernel load address - * - Switch to to TLB1[1] mapping + * - Switch to TLB1[1] mapping * - Invalidate temp mapping * * locore registers use: Modified: stable/11/sys/sparc64/pci/sbbc.c ============================================================================== --- stable/11/sys/sparc64/pci/sbbc.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/sparc64/pci/sbbc.c Mon Mar 5 06:59:30 2018 (r330446) @@ -325,7 +325,7 @@ sbbc_pci_attach(device_t dev) int error, rid; uint32_t val; - /* Nothing to to if we're not the chosen one. */ + /* Nothing to do if we're not the chosen one. */ if ((node = OF_finddevice("/chosen")) == -1) { device_printf(dev, "failed to find /chosen\n"); return (ENXIO); Modified: stable/11/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_softdep.c Mon Mar 5 06:52:26 2018 (r330445) +++ stable/11/sys/ufs/ffs/ffs_softdep.c Mon Mar 5 06:59:30 2018 (r330446) @@ -6900,7 +6900,7 @@ softdep_setup_freeblocks(ip, length, flags) UFS_UNLOCK(ump); DIP_SET(ip, i_blocks, DIP(ip, i_blocks) - datablocks); /* - * Push the zero'ed inode to to its disk buffer so that we are free + * Push the zero'ed inode to its disk buffer so that we are free * to delete its dependencies below. Once the dependencies are gone * the buffer can be safely released. */ From owner-svn-src-all@freebsd.org Mon Mar 5 07:08:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B93DF37121; Mon, 5 Mar 2018 07:08:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C0F28721F; Mon, 5 Mar 2018 07:08:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CBBC20A59; Mon, 5 Mar 2018 07:08:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2578xnZ076497; Mon, 5 Mar 2018 07:08:59 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2578xeV076496; Mon, 5 Mar 2018 07:08:59 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050708.w2578xeV076496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 07:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330447 - stable/11/sys/dev/iwm X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/iwm X-SVN-Commit-Revision: 330447 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 07:08:59 -0000 Author: eadler Date: Mon Mar 5 07:08:58 2018 New Revision: 330447 URL: https://svnweb.freebsd.org/changeset/base/330447 Log: MFC r315924: [iwm] GC unused code from if_iwm_scan.c, copyied from iwn or iwlwifi/dvm. Obtained from: dragonflybsd.git 10881df269b93c26e5ee6af629c36db5672e6e52 Modified: stable/11/sys/dev/iwm/if_iwm_scan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_scan.c Mon Mar 5 06:59:30 2018 (r330446) +++ stable/11/sys/dev/iwm/if_iwm_scan.c Mon Mar 5 07:08:58 2018 (r330447) @@ -161,12 +161,6 @@ __FBSDID("$FreeBSD$"); * BEGIN mvm/scan.c */ -#define IWM_PLCP_QUIET_THRESH 1 -#define IWM_ACTIVE_QUIET_TIME 10 -#define LONG_OUT_TIME_PERIOD (600 * IEEE80211_DUR_TU) -#define SHORT_OUT_TIME_PERIOD (200 * IEEE80211_DUR_TU) -#define SUSPEND_TIME_PERIOD (100 * IEEE80211_DUR_TU) - static uint16_t iwm_mvm_scan_rx_chain(struct iwm_softc *sc) { @@ -181,27 +175,7 @@ iwm_mvm_scan_rx_chain(struct iwm_softc *sc) return htole16(rx_chain); } -#if 0 static uint32_t -iwm_mvm_scan_max_out_time(struct iwm_softc *sc, uint32_t flags, int is_assoc) -{ - if (!is_assoc) - return 0; - if (flags & 0x1) - return htole32(SHORT_OUT_TIME_PERIOD); - return htole32(LONG_OUT_TIME_PERIOD); -} - -static uint32_t -iwm_mvm_scan_suspend_time(struct iwm_softc *sc, int is_assoc) -{ - if (!is_assoc) - return 0; - return htole32(SUSPEND_TIME_PERIOD); -} -#endif - -static uint32_t iwm_mvm_scan_rate_n_flags(struct iwm_softc *sc, int flags, int no_cck) { uint32_t tx_ant; @@ -223,32 +197,6 @@ iwm_mvm_scan_rate_n_flags(struct iwm_softc *sc, int fl else return htole32(IWM_RATE_6M_PLCP | tx_ant); } - -#if 0 -/* - * If req->n_ssids > 0, it means we should do an active scan. - * In case of active scan w/o directed scan, we receive a zero-length SSID - * just to notify that this scan is active and not passive. - * In order to notify the FW of the number of SSIDs we wish to scan (including - * the zero-length one), we need to set the corresponding bits in chan->type, - * one for each SSID, and set the active bit (first). If the first SSID is - * already included in the probe template, so we need to set only - * req->n_ssids - 1 bits in addition to the first bit. - */ -static uint16_t -iwm_mvm_get_active_dwell(struct iwm_softc *sc, int flags, int n_ssids) -{ - if (flags & IEEE80211_CHAN_2GHZ) - return 30 + 3 * (n_ssids + 1); - return 20 + 2 * (n_ssids + 1); -} - -static uint16_t -iwm_mvm_get_passive_dwell(struct iwm_softc *sc, int flags) -{ - return (flags & IEEE80211_CHAN_2GHZ) ? 100 + 20 : 100 + 10; -} -#endif static int iwm_mvm_scan_skip_channel(struct ieee80211_channel *c) From owner-svn-src-all@freebsd.org Mon Mar 5 07:14:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67B08F37814; Mon, 5 Mar 2018 07:14:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D72B876EF; Mon, 5 Mar 2018 07:14:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03AE420BFB; Mon, 5 Mar 2018 07:14:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w257EupH081243; Mon, 5 Mar 2018 07:14:56 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w257EuL3081242; Mon, 5 Mar 2018 07:14:56 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050714.w257EuL3081242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 07:14:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330448 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 330448 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 07:14:57 -0000 Author: eadler Date: Mon Mar 5 07:14:56 2018 New Revision: 330448 URL: https://svnweb.freebsd.org/changeset/base/330448 Log: MFC r314181: [ifconfig] handle illegal WPS frames Some APs broadcast WPS IE frames with totally broken data. Ifconfig's printwpsie() loops through WPS frames printing the attributes out; if the frame's data is bad, printwpsie() can end up looking at out-of-bounds addresses causing ifconfig to bus error. Thanks to Takashi Inoue at Nihon U for his efforts in debugging this. PR: bin/217312 Modified: stable/11/sbin/ifconfig/ifieee80211.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/11/sbin/ifconfig/ifieee80211.c Mon Mar 5 07:08:58 2018 (r330447) +++ stable/11/sbin/ifconfig/ifieee80211.c Mon Mar 5 07:14:56 2018 (r330448) @@ -2997,6 +2997,14 @@ printwpsie(const char *tag, const u_int8_t *ie, size_t uint16_t tlv_type = BE_READ_2(ie); uint16_t tlv_len = BE_READ_2(ie + 2); + /* some devices broadcast invalid WPS frames */ + if (tlv_len > len) { + printf("bad frame length tlv_type=0x%02x " + "tlv_len=%d len=%d", tlv_type, tlv_len, + len); + break; + } + ie += 4, len -= 4; switch (tlv_type) { From owner-svn-src-all@freebsd.org Mon Mar 5 07:26:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 450C8F38576; Mon, 5 Mar 2018 07:26:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E903987DFB; Mon, 5 Mar 2018 07:26:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC65120D89; Mon, 5 Mar 2018 07:26:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w257QGJf086398; Mon, 5 Mar 2018 07:26:16 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w257Q6rM086291; Mon, 5 Mar 2018 07:26:06 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050726.w257Q6rM086291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 07:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330449 - in stable/11: bin/pkill etc/pam.d kerberos5/lib/libgssapi_krb5 kerberos5/lib/libgssapi_ntlm kerberos5/lib/libgssapi_spnego sbin/adjkerntz sbin/camcontrol sbin/ccdconfig sbin/c... X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11: bin/pkill etc/pam.d kerberos5/lib/libgssapi_krb5 kerberos5/lib/libgssapi_ntlm kerberos5/lib/libgssapi_spnego sbin/adjkerntz sbin/camcontrol sbin/ccdconfig sbin/comcontrol sbin/conscontro... X-SVN-Commit-Revision: 330449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 07:26:18 -0000 Author: eadler Date: Mon Mar 5 07:26:05 2018 New Revision: 330449 URL: https://svnweb.freebsd.org/changeset/base/330449 Log: MFC r326276: various: general adoption of SPDX licensing ID tags. Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Modified: stable/11/bin/pkill/pkill.c stable/11/etc/pam.d/convert.pl stable/11/kerberos5/lib/libgssapi_krb5/gss_krb5.c stable/11/kerberos5/lib/libgssapi_krb5/pname_to_uid.c stable/11/kerberos5/lib/libgssapi_krb5/prefix.c stable/11/kerberos5/lib/libgssapi_ntlm/prefix.c stable/11/kerberos5/lib/libgssapi_spnego/freebsd_compat.c stable/11/sbin/adjkerntz/adjkerntz.c stable/11/sbin/adjkerntz/pathnames.h stable/11/sbin/camcontrol/camcontrol.h stable/11/sbin/camcontrol/fwdownload.c stable/11/sbin/camcontrol/modeedit.c stable/11/sbin/camcontrol/progress.c stable/11/sbin/camcontrol/progress.h stable/11/sbin/camcontrol/util.c stable/11/sbin/ccdconfig/ccdconfig.c stable/11/sbin/ccdconfig/pathnames.h stable/11/sbin/comcontrol/comcontrol.c stable/11/sbin/conscontrol/conscontrol.c stable/11/sbin/ddb/ddb.c stable/11/sbin/ddb/ddb.h stable/11/sbin/ddb/ddb_capture.c stable/11/sbin/ddb/ddb_script.c stable/11/sbin/devd/devd.h stable/11/sbin/devd/devd.hh stable/11/sbin/devd/parse.y stable/11/sbin/devd/token.l stable/11/sbin/devfs/devfs.c stable/11/sbin/devfs/extern.h stable/11/sbin/devfs/rule.c stable/11/sbin/etherswitchcfg/etherswitchcfg.c stable/11/sbin/fsck/fsutil.h stable/11/sbin/fsck_ffs/ea.c stable/11/sbin/fsck_ffs/suj.c stable/11/sbin/fsck_msdosfs/boot.c stable/11/sbin/fsck_msdosfs/check.c stable/11/sbin/fsck_msdosfs/dir.c stable/11/sbin/fsck_msdosfs/dosfs.h stable/11/sbin/fsck_msdosfs/ext.h stable/11/sbin/fsck_msdosfs/fat.c stable/11/sbin/fsck_msdosfs/main.c stable/11/sbin/fsdb/fsdb.c stable/11/sbin/fsdb/fsdb.h stable/11/sbin/fsdb/fsdbutil.c stable/11/sbin/fsirand/fsirand.c stable/11/sbin/gbde/gbde.c stable/11/sbin/geom/class/cache/geom_cache.c stable/11/sbin/geom/class/concat/geom_concat.c stable/11/sbin/geom/class/eli/geom_eli.c stable/11/sbin/geom/class/journal/geom_journal.c stable/11/sbin/geom/class/journal/geom_journal.h stable/11/sbin/geom/class/journal/geom_journal_ufs.c stable/11/sbin/geom/class/label/geom_label.c stable/11/sbin/geom/class/mirror/geom_mirror.c stable/11/sbin/geom/class/mountver/geom_mountver.c stable/11/sbin/geom/class/multipath/geom_multipath.c stable/11/sbin/geom/class/nop/geom_nop.c stable/11/sbin/geom/class/part/geom_part.c stable/11/sbin/geom/class/raid/geom_raid.c stable/11/sbin/geom/class/raid3/geom_raid3.c stable/11/sbin/geom/class/sched/geom_sched.c stable/11/sbin/geom/class/shsec/geom_shsec.c stable/11/sbin/geom/class/stripe/geom_stripe.c stable/11/sbin/geom/class/virstor/geom_virstor.c stable/11/sbin/geom/core/geom.c stable/11/sbin/geom/core/geom.h stable/11/sbin/geom/misc/subr.c stable/11/sbin/geom/misc/subr.h stable/11/sbin/ggate/ggatec/ggatec.c stable/11/sbin/ggate/ggated/ggated.c stable/11/sbin/ggate/ggatel/ggatel.c stable/11/sbin/ggate/shared/ggate.c stable/11/sbin/ggate/shared/ggate.h stable/11/sbin/gvinum/gvinum.c stable/11/sbin/hastctl/hastctl.c stable/11/sbin/hastd/activemap.c stable/11/sbin/hastd/activemap.h stable/11/sbin/hastd/control.c stable/11/sbin/hastd/control.h stable/11/sbin/hastd/ebuf.c stable/11/sbin/hastd/ebuf.h stable/11/sbin/hastd/event.c stable/11/sbin/hastd/event.h stable/11/sbin/hastd/hast.h stable/11/sbin/hastd/hast_checksum.c stable/11/sbin/hastd/hast_checksum.h stable/11/sbin/hastd/hast_compression.c stable/11/sbin/hastd/hast_compression.h stable/11/sbin/hastd/hast_proto.c stable/11/sbin/hastd/hast_proto.h stable/11/sbin/hastd/hastd.c stable/11/sbin/hastd/hastd.h stable/11/sbin/hastd/hooks.c stable/11/sbin/hastd/hooks.h stable/11/sbin/hastd/lzf.c stable/11/sbin/hastd/lzf.h stable/11/sbin/hastd/metadata.c stable/11/sbin/hastd/metadata.h stable/11/sbin/hastd/nv.c stable/11/sbin/hastd/nv.h stable/11/sbin/hastd/parse.y stable/11/sbin/hastd/pjdlog.c stable/11/sbin/hastd/pjdlog.h stable/11/sbin/hastd/primary.c stable/11/sbin/hastd/proto.c stable/11/sbin/hastd/proto.h stable/11/sbin/hastd/proto_common.c stable/11/sbin/hastd/proto_impl.h stable/11/sbin/hastd/proto_socketpair.c stable/11/sbin/hastd/proto_tcp.c stable/11/sbin/hastd/proto_uds.c stable/11/sbin/hastd/rangelock.c stable/11/sbin/hastd/rangelock.h stable/11/sbin/hastd/refcnt.h stable/11/sbin/hastd/secondary.c stable/11/sbin/hastd/subr.c stable/11/sbin/hastd/subr.h stable/11/sbin/hastd/synch.h stable/11/sbin/hastd/token.l stable/11/sbin/ifconfig/af_nd6.c stable/11/sbin/ifconfig/carp.c stable/11/sbin/ifconfig/ifbridge.c stable/11/sbin/ifconfig/ifconfig.h stable/11/sbin/ifconfig/iffib.c stable/11/sbin/ifconfig/ifgif.c stable/11/sbin/ifconfig/ifgre.c stable/11/sbin/ifconfig/ifgroup.c stable/11/sbin/ifconfig/ifieee80211.c stable/11/sbin/ifconfig/ifmac.c stable/11/sbin/ifconfig/ifpfsync.c stable/11/sbin/iscontrol/auth_subr.c stable/11/sbin/iscontrol/config.c stable/11/sbin/iscontrol/fsm.c stable/11/sbin/iscontrol/iscontrol.c stable/11/sbin/iscontrol/iscontrol.h stable/11/sbin/iscontrol/login.c stable/11/sbin/iscontrol/misc.c stable/11/sbin/iscontrol/pdu.c stable/11/sbin/kldconfig/kldconfig.c stable/11/sbin/kldload/kldload.c stable/11/sbin/kldstat/kldstat.c stable/11/sbin/kldunload/kldunload.c stable/11/sbin/ldconfig/elfhints.c stable/11/sbin/ldconfig/ldconfig.c stable/11/sbin/ldconfig/ldconfig.h stable/11/sbin/mdconfig/mdconfig.c stable/11/sbin/mdmfs/mdmfs.c stable/11/sbin/mksnap_ffs/mksnap_ffs.c stable/11/sbin/mount/extern.h stable/11/sbin/mount_fusefs/mount_fusefs.c stable/11/sbin/mount_msdosfs/mount_msdosfs.c stable/11/sbin/nandfs/lssnap.c stable/11/sbin/nandfs/mksnap.c stable/11/sbin/nandfs/nandfs.c stable/11/sbin/nandfs/nandfs.h stable/11/sbin/nandfs/rmsnap.c stable/11/sbin/newfs_msdos/newfs_msdos.c stable/11/sbin/newfs_nandfs/newfs_nandfs.c stable/11/sbin/nos-tun/nos-tun.c stable/11/sbin/nvmecontrol/devlist.c stable/11/sbin/nvmecontrol/firmware.c stable/11/sbin/nvmecontrol/identify.c stable/11/sbin/nvmecontrol/logpage.c stable/11/sbin/nvmecontrol/nvmecontrol.c stable/11/sbin/nvmecontrol/nvmecontrol.h stable/11/sbin/nvmecontrol/perftest.c stable/11/sbin/nvmecontrol/reset.c stable/11/sbin/pfctl/parse.y stable/11/sbin/pfctl/pf_print_state.c stable/11/sbin/pfctl/pfctl.c stable/11/sbin/pfctl/pfctl.h stable/11/sbin/pfctl/pfctl_parser.c stable/11/sbin/pfctl/pfctl_parser.h stable/11/sbin/pfctl/pfctl_radix.c stable/11/sbin/pfctl/pfctl_table.c stable/11/sbin/rcorder/rcorder.c stable/11/sbin/reboot/nextboot.sh stable/11/sbin/spppcontrol/spppcontrol.c stable/11/usr.bin/ar/acplex.l stable/11/usr.bin/ar/acpyacc.y stable/11/usr.bin/ar/ar.h stable/11/usr.bin/ar/read.c stable/11/usr.bin/ar/util.c stable/11/usr.bin/ar/write.c stable/11/usr.bin/asa/asa.c stable/11/usr.bin/at/at.c stable/11/usr.bin/at/at.h stable/11/usr.bin/at/panic.c stable/11/usr.bin/at/panic.h stable/11/usr.bin/at/parsetime.c stable/11/usr.bin/at/parsetime.h stable/11/usr.bin/at/perm.c stable/11/usr.bin/at/perm.h stable/11/usr.bin/at/privs.h stable/11/usr.bin/bluetooth/bthost/bthost.c stable/11/usr.bin/bluetooth/btsockstat/btsockstat.c stable/11/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sdp.c stable/11/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c stable/11/usr.bin/brandelf/brandelf.c stable/11/usr.bin/bsdiff/bsdiff/bsdiff.c stable/11/usr.bin/bsdiff/bspatch/bspatch.c stable/11/usr.bin/c89/c89.c stable/11/usr.bin/c99/c99.c stable/11/usr.bin/calendar/dates.c stable/11/usr.bin/calendar/events.c stable/11/usr.bin/calendar/ostern.c stable/11/usr.bin/calendar/parsedata.c stable/11/usr.bin/calendar/paskha.c stable/11/usr.bin/calendar/sunpos.c stable/11/usr.bin/cmp/link.c stable/11/usr.bin/colldef/parse.y stable/11/usr.bin/colldef/scan.l stable/11/usr.bin/compress/zopen.h stable/11/usr.bin/cpuset/cpuset.c stable/11/usr.bin/csplit/csplit.c stable/11/usr.bin/ctlstat/ctlstat.c stable/11/usr.bin/dtc/checking.cc stable/11/usr.bin/dtc/checking.hh stable/11/usr.bin/dtc/dtb.cc stable/11/usr.bin/dtc/dtb.hh stable/11/usr.bin/dtc/dtc.cc stable/11/usr.bin/dtc/fdt.cc stable/11/usr.bin/dtc/fdt.hh stable/11/usr.bin/dtc/input_buffer.cc stable/11/usr.bin/dtc/input_buffer.hh stable/11/usr.bin/dtc/string.cc stable/11/usr.bin/dtc/util.hh stable/11/usr.bin/elf2aout/elf2aout.c stable/11/usr.bin/elfdump/elfdump.c stable/11/usr.bin/env/envopts.c stable/11/usr.bin/env/envopts.h stable/11/usr.bin/fetch/fetch.c stable/11/usr.bin/finger/pathnames.h stable/11/usr.bin/fstat/functions.h stable/11/usr.bin/fstat/fuser.c stable/11/usr.bin/fstat/main.c stable/11/usr.bin/fsync/fsync.c stable/11/usr.bin/gcore/elfcore.c stable/11/usr.bin/gencat/gencat.c stable/11/usr.bin/getent/getent.c stable/11/usr.bin/grep/file.c stable/11/usr.bin/grep/grep.c stable/11/usr.bin/grep/grep.h stable/11/usr.bin/grep/queue.c stable/11/usr.bin/grep/regex/fastmatch.c stable/11/usr.bin/grep/regex/hashtable.c stable/11/usr.bin/grep/regex/tre-fastmatch.c stable/11/usr.bin/grep/util.c stable/11/usr.bin/gzip/gzip.c stable/11/usr.bin/gzip/unbzip2.c stable/11/usr.bin/gzip/unpack.c stable/11/usr.bin/gzip/unxz.c stable/11/usr.bin/iconv/iconv.c stable/11/usr.bin/indent/indent.h stable/11/usr.bin/ipcrm/ipcrm.c stable/11/usr.bin/ipcs/ipc.c stable/11/usr.bin/ipcs/ipc.h stable/11/usr.bin/ipcs/ipcs.c stable/11/usr.bin/iscsictl/iscsictl.c stable/11/usr.bin/iscsictl/iscsictl.h stable/11/usr.bin/iscsictl/parse.y stable/11/usr.bin/iscsictl/periphs.c stable/11/usr.bin/iscsictl/token.l stable/11/usr.bin/killall/killall.c stable/11/usr.bin/ktrdump/ktrdump.c stable/11/usr.bin/lastcomm/readrec.c stable/11/usr.bin/ldd/extern.h stable/11/usr.bin/ldd/ldd.c stable/11/usr.bin/ldd/sods.c stable/11/usr.bin/locale/locale.c stable/11/usr.bin/locate/locate/concatdb.sh stable/11/usr.bin/locate/locate/mklocatedb.sh stable/11/usr.bin/locate/locate/updatedb.sh stable/11/usr.bin/lockf/lockf.c stable/11/usr.bin/login/login.h stable/11/usr.bin/logins/logins.c stable/11/usr.bin/m4/gnum4.c stable/11/usr.bin/m4/trace.c stable/11/usr.bin/man/man.sh stable/11/usr.bin/mkcsmapper/ldef.h stable/11/usr.bin/mkcsmapper/lex.l stable/11/usr.bin/mkcsmapper/yacc.y stable/11/usr.bin/mkesdb/ldef.h stable/11/usr.bin/mkesdb/lex.l stable/11/usr.bin/mkesdb/yacc.y stable/11/usr.bin/mktemp/mktemp.c stable/11/usr.bin/mkuzip/mkuzip.c stable/11/usr.bin/ncal/ncal.c stable/11/usr.bin/netstat/bpf.c stable/11/usr.bin/netstat/netisr.c stable/11/usr.bin/newgrp/newgrp.c stable/11/usr.bin/nl/nl.c stable/11/usr.bin/passwd/passwd.c stable/11/usr.bin/pathchk/pathchk.c stable/11/usr.bin/perror/perror.c stable/11/usr.bin/procstat/procstat.c stable/11/usr.bin/procstat/procstat.h stable/11/usr.bin/procstat/procstat_args.c stable/11/usr.bin/procstat/procstat_auxv.c stable/11/usr.bin/procstat/procstat_basic.c stable/11/usr.bin/procstat/procstat_bin.c stable/11/usr.bin/procstat/procstat_cred.c stable/11/usr.bin/procstat/procstat_files.c stable/11/usr.bin/procstat/procstat_kstack.c stable/11/usr.bin/procstat/procstat_rlimit.c stable/11/usr.bin/procstat/procstat_sigs.c stable/11/usr.bin/procstat/procstat_threads.c stable/11/usr.bin/procstat/procstat_vm.c stable/11/usr.bin/protect/protect.c stable/11/usr.bin/rctl/rctl.c stable/11/usr.bin/revoke/revoke.c stable/11/usr.bin/seq/seq.c stable/11/usr.bin/setchannel/setchannel.c stable/11/usr.bin/sockstat/sockstat.c stable/11/usr.bin/sort/bwstring.c stable/11/usr.bin/sort/bwstring.h stable/11/usr.bin/sort/coll.c stable/11/usr.bin/sort/coll.h stable/11/usr.bin/sort/file.c stable/11/usr.bin/sort/file.h stable/11/usr.bin/sort/mem.c stable/11/usr.bin/sort/mem.h stable/11/usr.bin/sort/radixsort.c stable/11/usr.bin/sort/radixsort.h stable/11/usr.bin/sort/sort.c stable/11/usr.bin/sort/sort.h stable/11/usr.bin/sort/vsort.c stable/11/usr.bin/sort/vsort.h stable/11/usr.bin/ssh-copy-id/ssh-copy-id.sh stable/11/usr.bin/stat/stat.c stable/11/usr.bin/stdbuf/stdbuf.c stable/11/usr.bin/systat/convtbl.c stable/11/usr.bin/systat/convtbl.h stable/11/usr.bin/systat/devs.h stable/11/usr.bin/systat/ifcmds.c stable/11/usr.bin/systat/ifstat.c stable/11/usr.bin/tabs/tabs.c stable/11/usr.bin/tr/cmap.c stable/11/usr.bin/tr/cmap.h stable/11/usr.bin/tr/cset.c stable/11/usr.bin/tr/cset.h stable/11/usr.bin/truncate/truncate.c stable/11/usr.bin/truss/truss.h stable/11/usr.bin/unifdef/unifdef.c stable/11/usr.bin/unifdef/unifdef.h stable/11/usr.bin/unifdef/unifdefall.sh stable/11/usr.bin/units/units.c stable/11/usr.bin/unzip/unzip.c stable/11/usr.bin/usbhidaction/usbhidaction.c stable/11/usr.bin/usbhidctl/usbhid.c stable/11/usr.bin/whereis/pathnames.h stable/11/usr.bin/whereis/whereis.c stable/11/usr.bin/which/which.c stable/11/usr.bin/who/who.c stable/11/usr.bin/ypcat/ypcat.c stable/11/usr.bin/ypmatch/ypmatch.c stable/11/usr.bin/ypwhich/ypwhich.c stable/11/usr.sbin/ac/ac.c stable/11/usr.sbin/acpi/acpiconf/acpiconf.c stable/11/usr.sbin/acpi/acpidb/acpidb.c stable/11/usr.sbin/acpi/acpidump/acpi.c stable/11/usr.sbin/acpi/acpidump/acpi_user.c stable/11/usr.sbin/acpi/acpidump/acpidump.c stable/11/usr.sbin/acpi/acpidump/acpidump.h stable/11/usr.sbin/adduser/adduser.sh stable/11/usr.sbin/adduser/rmuser.sh stable/11/usr.sbin/apmd/apmd.c stable/11/usr.sbin/apmd/apmd.h stable/11/usr.sbin/apmd/apmdlex.l stable/11/usr.sbin/apmd/apmdparse.y stable/11/usr.sbin/asf/asf.c stable/11/usr.sbin/asf/asf.h stable/11/usr.sbin/asf/asf_kld.c stable/11/usr.sbin/asf/asf_kvm.c stable/11/usr.sbin/asf/asf_prog.c stable/11/usr.sbin/bhyve/acpi.c stable/11/usr.sbin/bhyve/acpi.h stable/11/usr.sbin/bhyve/ahci.h stable/11/usr.sbin/bhyve/bhyverun.c stable/11/usr.sbin/bhyve/bhyverun.h stable/11/usr.sbin/bhyve/block_if.c stable/11/usr.sbin/bhyve/block_if.h stable/11/usr.sbin/bhyve/consport.c stable/11/usr.sbin/bhyve/dbgport.c stable/11/usr.sbin/bhyve/dbgport.h stable/11/usr.sbin/bhyve/inout.c stable/11/usr.sbin/bhyve/inout.h stable/11/usr.sbin/bhyve/ioapic.c stable/11/usr.sbin/bhyve/ioapic.h stable/11/usr.sbin/bhyve/mem.c stable/11/usr.sbin/bhyve/mem.h stable/11/usr.sbin/bhyve/mevent.c stable/11/usr.sbin/bhyve/mevent.h stable/11/usr.sbin/bhyve/mevent_test.c stable/11/usr.sbin/bhyve/mptbl.c stable/11/usr.sbin/bhyve/mptbl.h stable/11/usr.sbin/bhyve/pci_ahci.c stable/11/usr.sbin/bhyve/pci_emul.c stable/11/usr.sbin/bhyve/pci_emul.h stable/11/usr.sbin/bhyve/pci_hostbridge.c stable/11/usr.sbin/bhyve/pci_lpc.c stable/11/usr.sbin/bhyve/pci_lpc.h stable/11/usr.sbin/bhyve/pci_passthru.c stable/11/usr.sbin/bhyve/pci_uart.c stable/11/usr.sbin/bhyve/pci_virtio_block.c stable/11/usr.sbin/bhyve/pci_virtio_net.c stable/11/usr.sbin/bhyve/pm.c stable/11/usr.sbin/bhyve/post.c stable/11/usr.sbin/bhyve/rtc.c stable/11/usr.sbin/bhyve/rtc.h stable/11/usr.sbin/bhyve/smbiostbl.c stable/11/usr.sbin/bhyve/smbiostbl.h stable/11/usr.sbin/bhyve/spinup_ap.c stable/11/usr.sbin/bhyve/spinup_ap.h stable/11/usr.sbin/bhyve/uart_emul.c stable/11/usr.sbin/bhyve/uart_emul.h stable/11/usr.sbin/bhyve/virtio.c stable/11/usr.sbin/bhyve/virtio.h stable/11/usr.sbin/bhyve/xmsr.c stable/11/usr.sbin/bhyve/xmsr.h stable/11/usr.sbin/bhyvectl/bhyvectl.c stable/11/usr.sbin/bhyveload/bhyveload.c stable/11/usr.sbin/bluetooth/bcmfw/bcmfw.c stable/11/usr.sbin/bluetooth/bt3cfw/bt3cfw.c stable/11/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c stable/11/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.h stable/11/usr.sbin/bluetooth/bthidcontrol/hid.c stable/11/usr.sbin/bluetooth/bthidcontrol/sdp.c stable/11/usr.sbin/bluetooth/bthidd/bthid_config.h stable/11/usr.sbin/bluetooth/bthidd/bthidd.c stable/11/usr.sbin/bluetooth/bthidd/bthidd.h stable/11/usr.sbin/bluetooth/bthidd/client.c stable/11/usr.sbin/bluetooth/bthidd/hid.c stable/11/usr.sbin/bluetooth/bthidd/kbd.c stable/11/usr.sbin/bluetooth/bthidd/kbd.h stable/11/usr.sbin/bluetooth/bthidd/lexer.l stable/11/usr.sbin/bluetooth/bthidd/parser.y stable/11/usr.sbin/bluetooth/bthidd/server.c stable/11/usr.sbin/bluetooth/bthidd/session.c stable/11/usr.sbin/bluetooth/btpand/bnep.c stable/11/usr.sbin/bluetooth/btpand/bnep.h stable/11/usr.sbin/bluetooth/btpand/btpand.c stable/11/usr.sbin/bluetooth/btpand/btpand.h stable/11/usr.sbin/bluetooth/btpand/channel.c stable/11/usr.sbin/bluetooth/btpand/client.c stable/11/usr.sbin/bluetooth/btpand/event.c stable/11/usr.sbin/bluetooth/btpand/event.h stable/11/usr.sbin/bluetooth/btpand/packet.c stable/11/usr.sbin/bluetooth/btpand/sdp.c stable/11/usr.sbin/bluetooth/btpand/sdp.h stable/11/usr.sbin/bluetooth/btpand/server.c stable/11/usr.sbin/bluetooth/btpand/tap.c stable/11/usr.sbin/bluetooth/hccontrol/hccontrol.c stable/11/usr.sbin/bluetooth/hccontrol/hccontrol.h stable/11/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c stable/11/usr.sbin/bluetooth/hccontrol/info.c stable/11/usr.sbin/bluetooth/hccontrol/link_control.c stable/11/usr.sbin/bluetooth/hccontrol/link_policy.c stable/11/usr.sbin/bluetooth/hccontrol/node.c stable/11/usr.sbin/bluetooth/hccontrol/send_recv.c stable/11/usr.sbin/bluetooth/hccontrol/status.c stable/11/usr.sbin/bluetooth/hccontrol/util.c stable/11/usr.sbin/bluetooth/hcsecd/hcsecd.c stable/11/usr.sbin/bluetooth/hcsecd/hcsecd.h stable/11/usr.sbin/bluetooth/hcsecd/lexer.l stable/11/usr.sbin/bluetooth/hcsecd/parser.y stable/11/usr.sbin/bluetooth/hcseriald/hcseriald.c stable/11/usr.sbin/bluetooth/l2control/l2cap.c stable/11/usr.sbin/bluetooth/l2control/l2control.c stable/11/usr.sbin/bluetooth/l2control/l2control.h stable/11/usr.sbin/bluetooth/l2ping/l2ping.c stable/11/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c stable/11/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c stable/11/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.h stable/11/usr.sbin/bluetooth/sdpcontrol/search.c stable/11/usr.sbin/bluetooth/sdpd/bgd.c stable/11/usr.sbin/bluetooth/sdpd/dun.c stable/11/usr.sbin/bluetooth/sdpd/ftrn.c stable/11/usr.sbin/bluetooth/sdpd/gn.c stable/11/usr.sbin/bluetooth/sdpd/irmc.c stable/11/usr.sbin/bluetooth/sdpd/irmc_command.c stable/11/usr.sbin/bluetooth/sdpd/lan.c stable/11/usr.sbin/bluetooth/sdpd/log.c stable/11/usr.sbin/bluetooth/sdpd/log.h stable/11/usr.sbin/bluetooth/sdpd/main.c stable/11/usr.sbin/bluetooth/sdpd/nap.c stable/11/usr.sbin/bluetooth/sdpd/opush.c stable/11/usr.sbin/bluetooth/sdpd/panu.c stable/11/usr.sbin/bluetooth/sdpd/profile.c stable/11/usr.sbin/bluetooth/sdpd/profile.h stable/11/usr.sbin/bluetooth/sdpd/provider.c stable/11/usr.sbin/bluetooth/sdpd/provider.h stable/11/usr.sbin/bluetooth/sdpd/sar.c stable/11/usr.sbin/bluetooth/sdpd/scr.c stable/11/usr.sbin/bluetooth/sdpd/sd.c stable/11/usr.sbin/bluetooth/sdpd/server.c stable/11/usr.sbin/bluetooth/sdpd/server.h stable/11/usr.sbin/bluetooth/sdpd/sp.c stable/11/usr.sbin/bluetooth/sdpd/srr.c stable/11/usr.sbin/bluetooth/sdpd/ssar.c stable/11/usr.sbin/bluetooth/sdpd/ssr.c stable/11/usr.sbin/bluetooth/sdpd/sur.c stable/11/usr.sbin/bluetooth/sdpd/uuid-private.h stable/11/usr.sbin/bluetooth/sdpd/uuid.c stable/11/usr.sbin/boot0cfg/boot0cfg.c stable/11/usr.sbin/bsdinstall/distextract/distextract.c stable/11/usr.sbin/bsdinstall/distfetch/distfetch.c stable/11/usr.sbin/bsdinstall/partedit/diskeditor.c stable/11/usr.sbin/bsdinstall/partedit/diskeditor.h stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c stable/11/usr.sbin/bsdinstall/partedit/part_wizard.c stable/11/usr.sbin/bsdinstall/partedit/partedit.c stable/11/usr.sbin/bsdinstall/partedit/partedit.h stable/11/usr.sbin/bsdinstall/partedit/partedit_generic.c stable/11/usr.sbin/bsdinstall/partedit/partedit_powerpc.c stable/11/usr.sbin/bsdinstall/partedit/partedit_sparc64.c stable/11/usr.sbin/bsdinstall/partedit/partedit_x86.c stable/11/usr.sbin/bsdinstall/partedit/scripted.c stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_pf.c stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.c stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c stable/11/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c stable/11/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c stable/11/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.c stable/11/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h stable/11/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c stable/11/usr.sbin/btxld/btx.h stable/11/usr.sbin/btxld/btxld.c stable/11/usr.sbin/btxld/elfh.c stable/11/usr.sbin/btxld/elfh.h stable/11/usr.sbin/chkgrp/chkgrp.c stable/11/usr.sbin/ckdist/ckdist.c stable/11/usr.sbin/clear_locks/clear_locks.c stable/11/usr.sbin/cpucontrol/amd.c stable/11/usr.sbin/cpucontrol/amd.h stable/11/usr.sbin/cpucontrol/cpucontrol.c stable/11/usr.sbin/cpucontrol/cpucontrol.h stable/11/usr.sbin/cpucontrol/intel.c stable/11/usr.sbin/cpucontrol/intel.h stable/11/usr.sbin/cpucontrol/via.c stable/11/usr.sbin/cpucontrol/via.h stable/11/usr.sbin/crunch/crunchide/exec_elf32.c stable/11/usr.sbin/crunch/crunchide/exec_elf64.c stable/11/usr.sbin/crunch/crunchide/extern.h stable/11/usr.sbin/ctladm/ctladm.h stable/11/usr.sbin/ctladm/util.c stable/11/usr.sbin/ctld/ctld.c stable/11/usr.sbin/ctld/ctld.h stable/11/usr.sbin/ctld/discovery.c stable/11/usr.sbin/ctld/kernel.c stable/11/usr.sbin/ctld/keys.c stable/11/usr.sbin/ctld/log.c stable/11/usr.sbin/ctld/login.c stable/11/usr.sbin/ctld/parse.y stable/11/usr.sbin/ctld/pdu.c stable/11/usr.sbin/ctld/token.l stable/11/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c stable/11/usr.sbin/daemon/daemon.c stable/11/usr.sbin/devinfo/devinfo.c stable/11/usr.sbin/digictl/digictl.c stable/11/usr.sbin/diskinfo/diskinfo.c stable/11/usr.sbin/dumpcis/cardinfo.h stable/11/usr.sbin/dumpcis/cis.h stable/11/usr.sbin/dumpcis/main.c stable/11/usr.sbin/dumpcis/printcis.c stable/11/usr.sbin/dumpcis/readcis.c stable/11/usr.sbin/dumpcis/readcis.h stable/11/usr.sbin/eeprom/eeprom.c stable/11/usr.sbin/eeprom/ofw_options.c stable/11/usr.sbin/eeprom/ofw_options.h stable/11/usr.sbin/etcupdate/etcupdate.sh stable/11/usr.sbin/extattr/rmextattr.c stable/11/usr.sbin/extattrctl/extattrctl.c stable/11/usr.sbin/fdcontrol/fdcontrol.c stable/11/usr.sbin/fdformat/fdformat.c stable/11/usr.sbin/fdread/fdread.c stable/11/usr.sbin/fdread/fdutil.c stable/11/usr.sbin/fdread/fdutil.h stable/11/usr.sbin/fifolog/fifolog_create/fifolog_create.c stable/11/usr.sbin/fifolog/fifolog_reader/fifolog_reader.c stable/11/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c stable/11/usr.sbin/fifolog/lib/fifolog.h stable/11/usr.sbin/fifolog/lib/fifolog_create.c stable/11/usr.sbin/fifolog/lib/fifolog_int.c stable/11/usr.sbin/fifolog/lib/fifolog_reader.c stable/11/usr.sbin/fifolog/lib/fifolog_write.h stable/11/usr.sbin/fifolog/lib/fifolog_write_poll.c stable/11/usr.sbin/fifolog/lib/libfifolog.h stable/11/usr.sbin/fifolog/lib/libfifolog_int.h stable/11/usr.sbin/fifolog/lib/miniobj.h stable/11/usr.sbin/flowctl/flowctl.c stable/11/usr.sbin/freebsd-update/freebsd-update.sh stable/11/usr.sbin/getfmac/getfmac.c stable/11/usr.sbin/getpmac/getpmac.c stable/11/usr.sbin/gpioctl/gpioctl.c stable/11/usr.sbin/gssd/gssd.c stable/11/usr.sbin/gstat/gstat.c stable/11/usr.sbin/i2c/i2c.c stable/11/usr.sbin/inetd/builtins.c stable/11/usr.sbin/iscsid/discovery.c stable/11/usr.sbin/iscsid/iscsid.c stable/11/usr.sbin/iscsid/iscsid.h stable/11/usr.sbin/iscsid/keys.c stable/11/usr.sbin/iscsid/log.c stable/11/usr.sbin/iscsid/login.c stable/11/usr.sbin/iscsid/pdu.c stable/11/usr.sbin/jail/command.c stable/11/usr.sbin/jail/config.c stable/11/usr.sbin/jail/jail.c stable/11/usr.sbin/jail/jaillex.l stable/11/usr.sbin/jail/jailp.h stable/11/usr.sbin/jail/jailparse.y stable/11/usr.sbin/jail/state.c stable/11/usr.sbin/jexec/jexec.c stable/11/usr.sbin/jls/jls.c stable/11/usr.sbin/kbdcontrol/kbdcontrol.c stable/11/usr.sbin/kbdcontrol/lex.h stable/11/usr.sbin/kbdcontrol/lex.l stable/11/usr.sbin/kbdmap/kbdmap.c stable/11/usr.sbin/kbdmap/kbdmap.h stable/11/usr.sbin/kgzip/aouthdr.c stable/11/usr.sbin/kgzip/aouthdr.h stable/11/usr.sbin/kgzip/elfhdr.c stable/11/usr.sbin/kgzip/elfhdr.h stable/11/usr.sbin/kgzip/kgz.h stable/11/usr.sbin/kgzip/kgzcmp.c stable/11/usr.sbin/kgzip/kgzip.c stable/11/usr.sbin/kgzip/kgzip.h stable/11/usr.sbin/kgzip/kgzld.c stable/11/usr.sbin/kgzip/xio.c stable/11/usr.sbin/kldxref/ef_amd64.c stable/11/usr.sbin/kldxref/ef_i386.c stable/11/usr.sbin/kldxref/ef_nop.c stable/11/usr.sbin/kldxref/ef_powerpc.c stable/11/usr.sbin/kldxref/ef_sparc64.c stable/11/usr.sbin/lastlogin/lastlogin.c stable/11/usr.sbin/lpr/chkprintcap/skimprintcap.c stable/11/usr.sbin/lpr/chkprintcap/skimprintcap.h stable/11/usr.sbin/lpr/common_source/ctlinfo.c stable/11/usr.sbin/lpr/common_source/ctlinfo.h stable/11/usr.sbin/lpr/common_source/lp.cdefs.h stable/11/usr.sbin/lpr/common_source/matchjobs.c stable/11/usr.sbin/lpr/common_source/matchjobs.h stable/11/usr.sbin/lpr/filters.ru/koi2855/koi2855.c stable/11/usr.sbin/lpr/filters.ru/koi2alt/koi2alt.c stable/11/usr.sbin/lpr/lp/lp.sh stable/11/usr.sbin/lpr/lpc/movejobs.c stable/11/usr.sbin/lptcontrol/lptcontrol.c stable/11/usr.sbin/mailwrapper/mailwrapper.c stable/11/usr.sbin/mailwrapper/pathnames.h stable/11/usr.sbin/makefs/cd9660.c stable/11/usr.sbin/makefs/cd9660.h stable/11/usr.sbin/makefs/cd9660/cd9660_archimedes.c stable/11/usr.sbin/makefs/cd9660/cd9660_archimedes.h stable/11/usr.sbin/makefs/cd9660/cd9660_conversion.c stable/11/usr.sbin/makefs/cd9660/cd9660_debug.c stable/11/usr.sbin/makefs/cd9660/cd9660_eltorito.c stable/11/usr.sbin/makefs/cd9660/cd9660_eltorito.h stable/11/usr.sbin/makefs/cd9660/cd9660_strings.c stable/11/usr.sbin/makefs/cd9660/cd9660_write.c stable/11/usr.sbin/makefs/cd9660/iso9660_rrip.c stable/11/usr.sbin/makefs/cd9660/iso9660_rrip.h stable/11/usr.sbin/makefs/ffs.h stable/11/usr.sbin/makefs/ffs/buf.c stable/11/usr.sbin/makefs/ffs/buf.h stable/11/usr.sbin/makefs/ffs/ffs_bswap.c stable/11/usr.sbin/makefs/ffs/newfs_extern.h stable/11/usr.sbin/makefs/ffs/ufs_bswap.h stable/11/usr.sbin/makefs/makefs.c stable/11/usr.sbin/makefs/makefs.h stable/11/usr.sbin/makefs/mtree.c stable/11/usr.sbin/makefs/walk.c stable/11/usr.sbin/memcontrol/memcontrol.c stable/11/usr.sbin/mfiutil/mfi_bbu.c stable/11/usr.sbin/mfiutil/mfi_cmd.c stable/11/usr.sbin/mfiutil/mfi_config.c stable/11/usr.sbin/mfiutil/mfi_drive.c stable/11/usr.sbin/mfiutil/mfi_evt.c stable/11/usr.sbin/mfiutil/mfi_flash.c stable/11/usr.sbin/mfiutil/mfi_foreign.c stable/11/usr.sbin/mfiutil/mfi_patrol.c stable/11/usr.sbin/mfiutil/mfi_properties.c stable/11/usr.sbin/mfiutil/mfi_show.c stable/11/usr.sbin/mfiutil/mfi_volume.c stable/11/usr.sbin/mfiutil/mfiutil.c stable/11/usr.sbin/mfiutil/mfiutil.h stable/11/usr.sbin/mlxcontrol/command.c stable/11/usr.sbin/mlxcontrol/config.c stable/11/usr.sbin/mlxcontrol/interface.c stable/11/usr.sbin/mlxcontrol/mlxcontrol.h stable/11/usr.sbin/mlxcontrol/util.c stable/11/usr.sbin/moused/moused.c stable/11/usr.sbin/mptable/mptable.c stable/11/usr.sbin/mtest/mtest.c stable/11/usr.sbin/nandsim/nandsim.c stable/11/usr.sbin/nandsim/nandsim_cfgparse.c stable/11/usr.sbin/nandsim/nandsim_cfgparse.h stable/11/usr.sbin/nandtool/nand_erase.c stable/11/usr.sbin/nandtool/nand_info.c stable/11/usr.sbin/nandtool/nand_read.c stable/11/usr.sbin/nandtool/nand_readoob.c stable/11/usr.sbin/nandtool/nand_write.c stable/11/usr.sbin/nandtool/nand_writeoob.c stable/11/usr.sbin/nandtool/nandtool.c stable/11/usr.sbin/nandtool/nandtool.h stable/11/usr.sbin/nandtool/usage.h stable/11/usr.sbin/newsyslog/extern.h stable/11/usr.sbin/pciconf/err.c stable/11/usr.sbin/pkg/config.c stable/11/usr.sbin/pkg/config.h stable/11/usr.sbin/pkg/dns_utils.c stable/11/usr.sbin/pkg/dns_utils.h stable/11/usr.sbin/pkg/pkg.c stable/11/usr.sbin/pmcannotate/pmcannotate.c stable/11/usr.sbin/pmccontrol/pmccontrol.c stable/11/usr.sbin/pmcstat/pmcpl_annotate.c stable/11/usr.sbin/pmcstat/pmcpl_annotate.h stable/11/usr.sbin/pmcstat/pmcpl_annotate_cg.c stable/11/usr.sbin/pmcstat/pmcpl_annotate_cg.h stable/11/usr.sbin/pmcstat/pmcpl_callgraph.c stable/11/usr.sbin/pmcstat/pmcpl_callgraph.h stable/11/usr.sbin/pmcstat/pmcpl_calltree.c stable/11/usr.sbin/pmcstat/pmcpl_calltree.h stable/11/usr.sbin/pmcstat/pmcpl_gprof.c stable/11/usr.sbin/pmcstat/pmcpl_gprof.h stable/11/usr.sbin/pmcstat/pmcstat.c stable/11/usr.sbin/pmcstat/pmcstat.h stable/11/usr.sbin/pmcstat/pmcstat_log.c stable/11/usr.sbin/pmcstat/pmcstat_log.h stable/11/usr.sbin/pmcstat/pmcstat_top.h stable/11/usr.sbin/portsnap/make_index/make_index.c stable/11/usr.sbin/portsnap/phttpget/phttpget.c stable/11/usr.sbin/portsnap/portsnap/portsnap.sh stable/11/usr.sbin/powerd/powerd.c stable/11/usr.sbin/ppp/acf.c stable/11/usr.sbin/ppp/acf.h stable/11/usr.sbin/ppp/arp.c stable/11/usr.sbin/ppp/arp.h stable/11/usr.sbin/ppp/async.c stable/11/usr.sbin/ppp/async.h stable/11/usr.sbin/ppp/auth.c stable/11/usr.sbin/ppp/auth.h stable/11/usr.sbin/ppp/bundle.c stable/11/usr.sbin/ppp/bundle.h stable/11/usr.sbin/ppp/cbcp.c stable/11/usr.sbin/ppp/cbcp.h stable/11/usr.sbin/ppp/ccp.c stable/11/usr.sbin/ppp/ccp.h stable/11/usr.sbin/ppp/chap.c stable/11/usr.sbin/ppp/chap.h stable/11/usr.sbin/ppp/chap_ms.c stable/11/usr.sbin/ppp/chap_ms.h stable/11/usr.sbin/ppp/chat.c stable/11/usr.sbin/ppp/chat.h stable/11/usr.sbin/ppp/command.c stable/11/usr.sbin/ppp/command.h stable/11/usr.sbin/ppp/datalink.c stable/11/usr.sbin/ppp/datalink.h stable/11/usr.sbin/ppp/deflate.c stable/11/usr.sbin/ppp/deflate.h stable/11/usr.sbin/ppp/defs.c stable/11/usr.sbin/ppp/defs.h stable/11/usr.sbin/ppp/descriptor.h stable/11/usr.sbin/ppp/ether.c stable/11/usr.sbin/ppp/ether.h stable/11/usr.sbin/ppp/exec.c stable/11/usr.sbin/ppp/exec.h stable/11/usr.sbin/ppp/filter.c stable/11/usr.sbin/ppp/filter.h stable/11/usr.sbin/ppp/fsm.c stable/11/usr.sbin/ppp/fsm.h stable/11/usr.sbin/ppp/hdlc.c stable/11/usr.sbin/ppp/hdlc.h stable/11/usr.sbin/ppp/i4b.h stable/11/usr.sbin/ppp/id.c stable/11/usr.sbin/ppp/id.h stable/11/usr.sbin/ppp/iface.c stable/11/usr.sbin/ppp/iface.h stable/11/usr.sbin/ppp/ip.c stable/11/usr.sbin/ppp/ip.h stable/11/usr.sbin/ppp/ipcp.c stable/11/usr.sbin/ppp/ipcp.h stable/11/usr.sbin/ppp/iplist.c stable/11/usr.sbin/ppp/iplist.h stable/11/usr.sbin/ppp/ipv6cp.c stable/11/usr.sbin/ppp/ipv6cp.h stable/11/usr.sbin/ppp/layer.h stable/11/usr.sbin/ppp/lcp.c stable/11/usr.sbin/ppp/lcp.h stable/11/usr.sbin/ppp/link.c stable/11/usr.sbin/ppp/link.h stable/11/usr.sbin/ppp/log.c stable/11/usr.sbin/ppp/log.h stable/11/usr.sbin/ppp/lqr.c stable/11/usr.sbin/ppp/lqr.h stable/11/usr.sbin/ppp/main.c stable/11/usr.sbin/ppp/main.h stable/11/usr.sbin/ppp/mbuf.c stable/11/usr.sbin/ppp/mbuf.h stable/11/usr.sbin/ppp/mp.c stable/11/usr.sbin/ppp/mp.h stable/11/usr.sbin/ppp/mppe.c stable/11/usr.sbin/ppp/mppe.h stable/11/usr.sbin/ppp/nat_cmd.c stable/11/usr.sbin/ppp/nat_cmd.h stable/11/usr.sbin/ppp/ncp.c stable/11/usr.sbin/ppp/ncp.h stable/11/usr.sbin/ppp/ncpaddr.c stable/11/usr.sbin/ppp/ncpaddr.h stable/11/usr.sbin/ppp/netgraph.c stable/11/usr.sbin/ppp/netgraph.h stable/11/usr.sbin/ppp/pap.c stable/11/usr.sbin/ppp/pap.h stable/11/usr.sbin/ppp/pred.c stable/11/usr.sbin/ppp/pred.h stable/11/usr.sbin/ppp/probe.c stable/11/usr.sbin/ppp/probe.h stable/11/usr.sbin/ppp/prompt.c stable/11/usr.sbin/ppp/prompt.h stable/11/usr.sbin/ppp/proto.c stable/11/usr.sbin/ppp/proto.h stable/11/usr.sbin/ppp/radius.c stable/11/usr.sbin/ppp/radius.h stable/11/usr.sbin/ppp/route.c stable/11/usr.sbin/ppp/route.h stable/11/usr.sbin/ppp/server.c stable/11/usr.sbin/ppp/server.h stable/11/usr.sbin/ppp/sig.c stable/11/usr.sbin/ppp/sig.h stable/11/usr.sbin/ppp/sync.c stable/11/usr.sbin/ppp/sync.h stable/11/usr.sbin/ppp/systems.c stable/11/usr.sbin/ppp/systems.h stable/11/usr.sbin/ppp/tcp.c stable/11/usr.sbin/ppp/tcp.h stable/11/usr.sbin/ppp/tcpmss.c stable/11/usr.sbin/ppp/tcpmss.h stable/11/usr.sbin/ppp/throughput.c stable/11/usr.sbin/ppp/throughput.h stable/11/usr.sbin/ppp/timer.c stable/11/usr.sbin/ppp/timer.h stable/11/usr.sbin/ppp/tty.c stable/11/usr.sbin/ppp/tty.h stable/11/usr.sbin/ppp/tun.c stable/11/usr.sbin/ppp/tun.h stable/11/usr.sbin/ppp/ua.h stable/11/usr.sbin/ppp/udp.c stable/11/usr.sbin/ppp/udp.h stable/11/usr.sbin/ppp/vjcomp.c stable/11/usr.sbin/ppp/vjcomp.h stable/11/usr.sbin/pppctl/pppctl.c stable/11/usr.sbin/pw/bitmap.c stable/11/usr.sbin/pw/bitmap.h stable/11/usr.sbin/pw/cpdir.c stable/11/usr.sbin/pw/grupd.c stable/11/usr.sbin/pw/psdate.c stable/11/usr.sbin/pw/psdate.h stable/11/usr.sbin/pw/pw.c stable/11/usr.sbin/pw/pw.h stable/11/usr.sbin/pw/pw_conf.c stable/11/usr.sbin/pw/pw_group.c stable/11/usr.sbin/pw/pw_log.c stable/11/usr.sbin/pw/pw_nis.c stable/11/usr.sbin/pw/pw_user.c stable/11/usr.sbin/pw/pw_vpw.c stable/11/usr.sbin/pw/pwupd.c stable/11/usr.sbin/pw/pwupd.h stable/11/usr.sbin/pw/rm_r.c stable/11/usr.sbin/quot/quot.c stable/11/usr.sbin/rarpd/rarpd.c stable/11/usr.sbin/rpc.lockd/kern.c stable/11/usr.sbin/rpc.umntall/mounttab.c stable/11/usr.sbin/rpc.umntall/mounttab.h stable/11/usr.sbin/rpc.umntall/rpc.umntall.c stable/11/usr.sbin/rpcbind/util.c stable/11/usr.sbin/rtadvctl/rtadvctl.c stable/11/usr.sbin/rtadvd/advcap.h stable/11/usr.sbin/rtadvd/control.c stable/11/usr.sbin/rtadvd/control.h stable/11/usr.sbin/rtadvd/control_client.c stable/11/usr.sbin/rtadvd/control_client.h stable/11/usr.sbin/rtadvd/control_server.c stable/11/usr.sbin/rtadvd/control_server.h stable/11/usr.sbin/rtprio/rtprio.c stable/11/usr.sbin/sa/db.c stable/11/usr.sbin/sa/extern.h stable/11/usr.sbin/sa/main.c stable/11/usr.sbin/sa/pathnames.h stable/11/usr.sbin/sa/pdb.c stable/11/usr.sbin/sa/usrdb.c stable/11/usr.sbin/service/service.sh stable/11/usr.sbin/services_mkdb/extern.h stable/11/usr.sbin/services_mkdb/services_mkdb.c stable/11/usr.sbin/services_mkdb/uniq.c stable/11/usr.sbin/setfmac/setfmac.c stable/11/usr.sbin/setpmac/setpmac.c stable/11/usr.sbin/smbmsg/pathnames.h stable/11/usr.sbin/smbmsg/smbmsg.c stable/11/usr.sbin/snapinfo/snapinfo.c stable/11/usr.sbin/spkrtest/spkrtest.sh stable/11/usr.sbin/spray/spray.c stable/11/usr.sbin/traceroute/findsaddr-udp.c stable/11/usr.sbin/uathload/uathload.c stable/11/usr.sbin/ugidfw/ugidfw.c stable/11/usr.sbin/uhsoctl/uhsoctl.c stable/11/usr.sbin/unbound/local-setup/local-unbound-setup.sh stable/11/usr.sbin/usbconfig/dump.c stable/11/usr.sbin/usbconfig/dump.h stable/11/usr.sbin/usbconfig/usbconfig.c stable/11/usr.sbin/usbdump/usbdump.c stable/11/usr.sbin/utx/utx.c stable/11/usr.sbin/vidcontrol/decode.c stable/11/usr.sbin/vidcontrol/vidcontrol.c stable/11/usr.sbin/wake/wake.c stable/11/usr.sbin/watch/watch.c stable/11/usr.sbin/watchdogd/watchdogd.c stable/11/usr.sbin/wlandebug/wlandebug.c stable/11/usr.sbin/ypbind/ypbind.c stable/11/usr.sbin/yppoll/yppoll.c stable/11/usr.sbin/ypset/ypset.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/pkill/pkill.c ============================================================================== --- stable/11/bin/pkill/pkill.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/bin/pkill/pkill.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /* $NetBSD: pkill.c,v 1.16 2005/10/10 22:13:20 kleink Exp $ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 2002 The NetBSD Foundation, Inc. * Copyright (c) 2005 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/etc/pam.d/convert.pl ============================================================================== --- stable/11/etc/pam.d/convert.pl Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/etc/pam.d/convert.pl Mon Mar 5 07:26:05 2018 (r330449) @@ -1,5 +1,7 @@ #!/usr/bin/perl -w #- +# SPDX-License-Identifier: BSD-3-Clause +# # Copyright (c) 2001,2002 Networks Associates Technologies, Inc. # All rights reserved. # Modified: stable/11/kerberos5/lib/libgssapi_krb5/gss_krb5.c ============================================================================== --- stable/11/kerberos5/lib/libgssapi_krb5/gss_krb5.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/kerberos5/lib/libgssapi_krb5/gss_krb5.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2005 Doug Rabson * All rights reserved. * Modified: stable/11/kerberos5/lib/libgssapi_krb5/pname_to_uid.c ============================================================================== --- stable/11/kerberos5/lib/libgssapi_krb5/pname_to_uid.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/kerberos5/lib/libgssapi_krb5/pname_to_uid.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Isilon Inc http://www.isilon.com/ * Authors: Doug Rabson * Developed with Red Inc: Alfred Perlstein Modified: stable/11/kerberos5/lib/libgssapi_krb5/prefix.c ============================================================================== --- stable/11/kerberos5/lib/libgssapi_krb5/prefix.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/kerberos5/lib/libgssapi_krb5/prefix.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Doug Rabson * All rights reserved. * Modified: stable/11/kerberos5/lib/libgssapi_ntlm/prefix.c ============================================================================== --- stable/11/kerberos5/lib/libgssapi_ntlm/prefix.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/kerberos5/lib/libgssapi_ntlm/prefix.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Doug Rabson * All rights reserved. * Modified: stable/11/kerberos5/lib/libgssapi_spnego/freebsd_compat.c ============================================================================== --- stable/11/kerberos5/lib/libgssapi_spnego/freebsd_compat.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/kerberos5/lib/libgssapi_spnego/freebsd_compat.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Doug Rabson * All rights reserved. * Modified: stable/11/sbin/adjkerntz/adjkerntz.c ============================================================================== --- stable/11/sbin/adjkerntz/adjkerntz.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/adjkerntz/adjkerntz.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (C) 1993-1998 by Andrey A. Chernov, Moscow, Russia. * All rights reserved. * Modified: stable/11/sbin/adjkerntz/pathnames.h ============================================================================== --- stable/11/sbin/adjkerntz/pathnames.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/adjkerntz/pathnames.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (C) 1993 by Andrew A. Chernov, Moscow, Russia. * All rights reserved. * @@ -22,6 +24,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #include Modified: stable/11/sbin/camcontrol/camcontrol.h ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/camcontrol/camcontrol.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1998 Kenneth D. Merry. * All rights reserved. * Modified: stable/11/sbin/camcontrol/fwdownload.c ============================================================================== --- stable/11/sbin/camcontrol/fwdownload.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/camcontrol/fwdownload.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2011 Sandvine Incorporated. All rights reserved. * Copyright (c) 2002-2011 Andre Albsmeier * All rights reserved. Modified: stable/11/sbin/camcontrol/modeedit.c ============================================================================== --- stable/11/sbin/camcontrol/modeedit.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/camcontrol/modeedit.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2000 Kelly Yancey * Derived from work done by Julian Elischer , 1993, and Peter Dufault , 1994. Modified: stable/11/sbin/camcontrol/progress.c ============================================================================== --- stable/11/sbin/camcontrol/progress.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/camcontrol/progress.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /* $NetBSD: progressbar.c,v 1.21 2009/04/12 10:18:52 lukem Exp $ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1997-2009 The NetBSD Foundation, Inc. * All rights reserved. * Modified: stable/11/sbin/camcontrol/progress.h ============================================================================== --- stable/11/sbin/camcontrol/progress.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/camcontrol/progress.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /* $NetBSD: progressbar.c,v 1.21 2009/04/12 10:18:52 lukem Exp $ */ /*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * * Copyright (c) 1997-2012 The NetBSD Foundation, Inc. * All rights reserved. * Modified: stable/11/sbin/camcontrol/util.c ============================================================================== --- stable/11/sbin/camcontrol/util.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/camcontrol/util.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Written By Julian ELischer * Copyright julian Elischer 1993. * Permission is granted to use or redistribute this file in any way as long Modified: stable/11/sbin/ccdconfig/ccdconfig.c ============================================================================== --- stable/11/sbin/ccdconfig/ccdconfig.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ccdconfig/ccdconfig.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 2003 Poul-Henning Kamp * Copyright (c) 1995 Jason R. Thorpe. * All rights reserved. Modified: stable/11/sbin/ccdconfig/pathnames.h ============================================================================== --- stable/11/sbin/ccdconfig/pathnames.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ccdconfig/pathnames.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /* $NetBSD: pathnames.h,v 1.1 1995/08/17 16:37:20 thorpej Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (c) 1995 Jason R. Thorpe. * All rights reserved. * Modified: stable/11/sbin/comcontrol/comcontrol.c ============================================================================== --- stable/11/sbin/comcontrol/comcontrol.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/comcontrol/comcontrol.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1992 Christopher G. Demetriou * All rights reserved. * Modified: stable/11/sbin/conscontrol/conscontrol.c ============================================================================== --- stable/11/sbin/conscontrol/conscontrol.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/conscontrol/conscontrol.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2001 Jonathan Lemon * All rights reserved. * Modified: stable/11/sbin/ddb/ddb.c ============================================================================== --- stable/11/sbin/ddb/ddb.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ddb/ddb.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2007 Robert N. M. Watson * All rights reserved. * Modified: stable/11/sbin/ddb/ddb.h ============================================================================== --- stable/11/sbin/ddb/ddb.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ddb/ddb.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2007 Robert N. M. Watson * All rights reserved. * Modified: stable/11/sbin/ddb/ddb_capture.c ============================================================================== --- stable/11/sbin/ddb/ddb_capture.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ddb/ddb_capture.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2008 Robert N. M. Watson * All rights reserved. * Modified: stable/11/sbin/ddb/ddb_script.c ============================================================================== --- stable/11/sbin/ddb/ddb_script.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ddb/ddb_script.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2007 Robert N. M. Watson * All rights reserved. * Modified: stable/11/sbin/devd/devd.h ============================================================================== --- stable/11/sbin/devd/devd.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/devd/devd.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /*- * DEVD (Device action daemon) * + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002 M. Warner Losh . * All rights reserved. * Modified: stable/11/sbin/devd/devd.hh ============================================================================== --- stable/11/sbin/devd/devd.hh Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/devd/devd.hh Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002-2003 M. Warner Losh. * All rights reserved. * Modified: stable/11/sbin/devd/parse.y ============================================================================== --- stable/11/sbin/devd/parse.y Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/devd/parse.y Mon Mar 5 07:26:05 2018 (r330449) @@ -2,6 +2,8 @@ /*- * DEVD (Device action daemon) * + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002 M. Warner Losh . * All rights reserved. * Modified: stable/11/sbin/devd/token.l ============================================================================== --- stable/11/sbin/devd/token.l Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/devd/token.l Mon Mar 5 07:26:05 2018 (r330449) @@ -2,6 +2,8 @@ /*- * DEVD (Device action daemon) * + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002 M. Warner Losh . * All rights reserved. * Modified: stable/11/sbin/devfs/devfs.c ============================================================================== --- stable/11/sbin/devfs/devfs.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/devfs/devfs.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2001, 2002 Dima Dorfman. * All rights reserved. * Modified: stable/11/sbin/devfs/extern.h ============================================================================== --- stable/11/sbin/devfs/extern.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/devfs/extern.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002 Dima Dorfman. * All rights reserved. * Modified: stable/11/sbin/devfs/rule.c ============================================================================== --- stable/11/sbin/devfs/rule.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/devfs/rule.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002 Dima Dorfman. * All rights reserved. * Modified: stable/11/sbin/etherswitchcfg/etherswitchcfg.c ============================================================================== --- stable/11/sbin/etherswitchcfg/etherswitchcfg.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/etherswitchcfg/etherswitchcfg.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2011-2012 Stefan Bethke. * All rights reserved. * Modified: stable/11/sbin/fsck/fsutil.h ============================================================================== --- stable/11/sbin/fsck/fsutil.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck/fsutil.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /* $NetBSD: fsutil.h,v 1.114 2009/10/21 01:07:46 snj Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 1996 Christos Zoulas. All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/11/sbin/fsck_ffs/ea.c ============================================================================== --- stable/11/sbin/fsck_ffs/ea.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck_ffs/ea.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002 Poul-Henning Kamp * Copyright (c) 2002 Networks Associates Technology, Inc. * All rights reserved. Modified: stable/11/sbin/fsck_ffs/suj.c ============================================================================== --- stable/11/sbin/fsck_ffs/suj.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck_ffs/suj.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright 2009, 2010 Jeffrey W. Roberson * All rights reserved. * Modified: stable/11/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/11/sbin/fsck_msdosfs/boot.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck_msdosfs/boot.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (C) 1995, 1997 Wolfgang Solfrank * Copyright (c) 1995 Martin Husemann * Modified: stable/11/sbin/fsck_msdosfs/check.c ============================================================================== --- stable/11/sbin/fsck_msdosfs/check.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck_msdosfs/check.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank * Copyright (c) 1995 Martin Husemann * Modified: stable/11/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/11/sbin/fsck_msdosfs/dir.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck_msdosfs/dir.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank * Copyright (c) 1995 Martin Husemann * Some structure declaration borrowed from Paul Popelka Modified: stable/11/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- stable/11/sbin/fsck_msdosfs/dosfs.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck_msdosfs/dosfs.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank * Copyright (c) 1995 Martin Husemann * Some structure declaration borrowed from Paul Popelka Modified: stable/11/sbin/fsck_msdosfs/ext.h ============================================================================== --- stable/11/sbin/fsck_msdosfs/ext.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck_msdosfs/ext.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank * Copyright (c) 1995 Martin Husemann * Modified: stable/11/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/11/sbin/fsck_msdosfs/fat.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck_msdosfs/fat.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank * Copyright (c) 1995 Martin Husemann * Modified: stable/11/sbin/fsck_msdosfs/main.c ============================================================================== --- stable/11/sbin/fsck_msdosfs/main.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsck_msdosfs/main.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (C) 1995 Wolfgang Solfrank * Copyright (c) 1995 Martin Husemann * Modified: stable/11/sbin/fsdb/fsdb.c ============================================================================== --- stable/11/sbin/fsdb/fsdb.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsdb/fsdb.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /* $NetBSD: fsdb.c,v 1.2 1995/10/08 23:18:10 thorpej Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1995 John T. Kohl * All rights reserved. * Modified: stable/11/sbin/fsdb/fsdb.h ============================================================================== --- stable/11/sbin/fsdb/fsdb.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsdb/fsdb.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /* $NetBSD: fsdb.h,v 1.2 1995/10/08 23:18:11 thorpej Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1995 John T. Kohl * All rights reserved. * Modified: stable/11/sbin/fsdb/fsdbutil.c ============================================================================== --- stable/11/sbin/fsdb/fsdbutil.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsdb/fsdbutil.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /* $NetBSD: fsdbutil.c,v 1.2 1995/10/08 23:18:12 thorpej Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1995 John T. Kohl * All rights reserved. * Modified: stable/11/sbin/fsirand/fsirand.c ============================================================================== --- stable/11/sbin/fsirand/fsirand.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/fsirand/fsirand.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,6 +1,8 @@ /* $OpenBSD: fsirand.c,v 1.9 1997/02/28 00:46:33 millert Exp $ */ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1997 Todd C. Miller * All rights reserved. * Modified: stable/11/sbin/gbde/gbde.c ============================================================================== --- stable/11/sbin/gbde/gbde.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/gbde/gbde.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002 Poul-Henning Kamp * Copyright (c) 2002 Networks Associates Technology, Inc. * All rights reserved. Modified: stable/11/sbin/geom/class/cache/geom_cache.c ============================================================================== --- stable/11/sbin/geom/class/cache/geom_cache.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/cache/geom_cache.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2006 Ruslan Ermilov * All rights reserved. * Modified: stable/11/sbin/geom/class/concat/geom_concat.c ============================================================================== --- stable/11/sbin/geom/class/concat/geom_concat.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/concat/geom_concat.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2005 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/eli/geom_eli.c ============================================================================== --- stable/11/sbin/geom/class/eli/geom_eli.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/eli/geom_eli.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2010 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/journal/geom_journal.c ============================================================================== --- stable/11/sbin/geom/class/journal/geom_journal.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/journal/geom_journal.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2005-2006 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/journal/geom_journal.h ============================================================================== --- stable/11/sbin/geom/class/journal/geom_journal.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/journal/geom_journal.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2006 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/journal/geom_journal_ufs.c ============================================================================== --- stable/11/sbin/geom/class/journal/geom_journal_ufs.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/journal/geom_journal_ufs.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2006 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/label/geom_label.c ============================================================================== --- stable/11/sbin/geom/class/label/geom_label.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/label/geom_label.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2005 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/mirror/geom_mirror.c ============================================================================== --- stable/11/sbin/geom/class/mirror/geom_mirror.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/mirror/geom_mirror.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2009 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/mountver/geom_mountver.c ============================================================================== --- stable/11/sbin/geom/class/mountver/geom_mountver.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/mountver/geom_mountver.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 Edward Tomasz Napierala * All rights reserved. * Modified: stable/11/sbin/geom/class/multipath/geom_multipath.c ============================================================================== --- stable/11/sbin/geom/class/multipath/geom_multipath.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/multipath/geom_multipath.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2006 Mathew Jacob * All rights reserved. * Modified: stable/11/sbin/geom/class/nop/geom_nop.c ============================================================================== --- stable/11/sbin/geom/class/nop/geom_nop.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/nop/geom_nop.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2006 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/11/sbin/geom/class/part/geom_part.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/part/geom_part.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2007, 2008 Marcel Moolenaar * All rights reserved. * Modified: stable/11/sbin/geom/class/raid/geom_raid.c ============================================================================== --- stable/11/sbin/geom/class/raid/geom_raid.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/raid/geom_raid.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 Alexander Motin * All rights reserved. * Modified: stable/11/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- stable/11/sbin/geom/class/raid3/geom_raid3.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/raid3/geom_raid3.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2005 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/sched/geom_sched.c ============================================================================== --- stable/11/sbin/geom/class/sched/geom_sched.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/sched/geom_sched.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009 Fabio Checconi * Copyright (c) 2010 Luigi Rizzo, Universita` di Pisa * All rights reserved. Modified: stable/11/sbin/geom/class/shsec/geom_shsec.c ============================================================================== --- stable/11/sbin/geom/class/shsec/geom_shsec.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/shsec/geom_shsec.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2005 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/stripe/geom_stripe.c ============================================================================== --- stable/11/sbin/geom/class/stripe/geom_stripe.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/stripe/geom_stripe.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2005 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/class/virstor/geom_virstor.c ============================================================================== --- stable/11/sbin/geom/class/virstor/geom_virstor.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/class/virstor/geom_virstor.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2005 Ivan Voras * * Redistribution and use in source and binary forms, with or without Modified: stable/11/sbin/geom/core/geom.c ============================================================================== --- stable/11/sbin/geom/core/geom.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/core/geom.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2009 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/core/geom.h ============================================================================== --- stable/11/sbin/geom/core/geom.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/core/geom.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/misc/subr.c ============================================================================== --- stable/11/sbin/geom/misc/subr.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/misc/subr.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2010 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/geom/misc/subr.h ============================================================================== --- stable/11/sbin/geom/misc/subr.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/geom/misc/subr.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004-2010 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/ggate/ggatec/ggatec.c ============================================================================== --- stable/11/sbin/ggate/ggatec/ggatec.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ggate/ggatec/ggatec.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/ggate/ggated/ggated.c ============================================================================== --- stable/11/sbin/ggate/ggated/ggated.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ggate/ggated/ggated.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/ggate/ggatel/ggatel.c ============================================================================== --- stable/11/sbin/ggate/ggatel/ggatel.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ggate/ggatel/ggatel.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/ggate/shared/ggate.c ============================================================================== --- stable/11/sbin/ggate/shared/ggate.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ggate/shared/ggate.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/ggate/shared/ggate.h ============================================================================== --- stable/11/sbin/ggate/shared/ggate.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/ggate/shared/ggate.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/gvinum/gvinum.c ============================================================================== --- stable/11/sbin/gvinum/gvinum.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/gvinum/gvinum.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2004 Lukas Ertl * Copyright (c) 2005 Chris Jones * Copyright (c) 2007 Ulf Lilleengen Modified: stable/11/sbin/hastctl/hastctl.c ============================================================================== --- stable/11/sbin/hastctl/hastctl.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastctl/hastctl.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/activemap.c ============================================================================== --- stable/11/sbin/hastd/activemap.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/activemap.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/activemap.h ============================================================================== --- stable/11/sbin/hastd/activemap.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/activemap.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/control.c ============================================================================== --- stable/11/sbin/hastd/control.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/control.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/control.h ============================================================================== --- stable/11/sbin/hastd/control.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/control.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/ebuf.c ============================================================================== --- stable/11/sbin/hastd/ebuf.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/ebuf.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/ebuf.h ============================================================================== --- stable/11/sbin/hastd/ebuf.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/ebuf.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/event.c ============================================================================== --- stable/11/sbin/hastd/event.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/event.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/hastd/event.h ============================================================================== --- stable/11/sbin/hastd/event.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/event.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/hastd/hast.h ============================================================================== --- stable/11/sbin/hastd/hast.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hast.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/sbin/hastd/hast_checksum.c ============================================================================== --- stable/11/sbin/hastd/hast_checksum.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hast_checksum.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/hastd/hast_checksum.h ============================================================================== --- stable/11/sbin/hastd/hast_checksum.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hast_checksum.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/hastd/hast_compression.c ============================================================================== --- stable/11/sbin/hastd/hast_compression.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hast_compression.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/hastd/hast_compression.h ============================================================================== --- stable/11/sbin/hastd/hast_compression.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hast_compression.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. * Modified: stable/11/sbin/hastd/hast_proto.c ============================================================================== --- stable/11/sbin/hastd/hast_proto.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hast_proto.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/sbin/hastd/hast_proto.h ============================================================================== --- stable/11/sbin/hastd/hast_proto.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hast_proto.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/hastd.c ============================================================================== --- stable/11/sbin/hastd/hastd.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hastd.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * Copyright (c) 2010-2011 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/sbin/hastd/hastd.h ============================================================================== --- stable/11/sbin/hastd/hastd.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hastd.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/hooks.c ============================================================================== --- stable/11/sbin/hastd/hooks.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hooks.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 The FreeBSD Foundation * Copyright (c) 2010 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/sbin/hastd/hooks.h ============================================================================== --- stable/11/sbin/hastd/hooks.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/hooks.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 The FreeBSD Foundation * Copyright (c) 2010 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/sbin/hastd/lzf.c ============================================================================== --- stable/11/sbin/hastd/lzf.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/lzf.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2000-2008 Marc Alexander Lehmann * * Redistribution and use in source and binary forms, with or without modifica- Modified: stable/11/sbin/hastd/lzf.h ============================================================================== --- stable/11/sbin/hastd/lzf.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/lzf.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2000-2008 Marc Alexander Lehmann * * Redistribution and use in source and binary forms, with or without modifica- Modified: stable/11/sbin/hastd/metadata.c ============================================================================== --- stable/11/sbin/hastd/metadata.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/metadata.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/metadata.h ============================================================================== --- stable/11/sbin/hastd/metadata.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/metadata.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/nv.c ============================================================================== --- stable/11/sbin/hastd/nv.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/nv.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/nv.h ============================================================================== --- stable/11/sbin/hastd/nv.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/nv.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * All rights reserved. * Modified: stable/11/sbin/hastd/parse.y ============================================================================== --- stable/11/sbin/hastd/parse.y Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/parse.y Mon Mar 5 07:26:05 2018 (r330449) @@ -1,5 +1,7 @@ %{ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/sbin/hastd/pjdlog.c ============================================================================== --- stable/11/sbin/hastd/pjdlog.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/pjdlog.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/sbin/hastd/pjdlog.h ============================================================================== --- stable/11/sbin/hastd/pjdlog.h Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/pjdlog.h Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/sbin/hastd/primary.c ============================================================================== --- stable/11/sbin/hastd/primary.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/primary.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009 The FreeBSD Foundation * Copyright (c) 2010-2011 Pawel Jakub Dawidek * All rights reserved. Modified: stable/11/sbin/hastd/proto.c ============================================================================== --- stable/11/sbin/hastd/proto.c Mon Mar 5 07:14:56 2018 (r330448) +++ stable/11/sbin/hastd/proto.c Mon Mar 5 07:26:05 2018 (r330449) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2009-2010 The FreeBSD Foundation *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Mar 5 07:33:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59ED8F38FA1; Mon, 5 Mar 2018 07:33:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 051A46843D; Mon, 5 Mar 2018 07:33:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 000BF20F16; Mon, 5 Mar 2018 07:33:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w257X0qP091448; Mon, 5 Mar 2018 07:33:00 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w257X0EV091447; Mon, 5 Mar 2018 07:33:00 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050733.w257X0EV091447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 07:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330450 - stable/11/sys/dev/ioat X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/ioat X-SVN-Commit-Revision: 330450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 07:33:01 -0000 Author: eadler Date: Mon Mar 5 07:33:00 2018 New Revision: 330450 URL: https://svnweb.freebsd.org/changeset/base/330450 Log: MFC r326572: ioat(4): Add Skylake Xeon PCI-ID SKX IOAT is just another 3.2 version of the CBDMA engine. Modified: stable/11/sys/dev/ioat/ioat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ioat/ioat.c ============================================================================== --- stable/11/sys/dev/ioat/ioat.c Mon Mar 5 07:26:05 2018 (r330449) +++ stable/11/sys/dev/ioat/ioat.c Mon Mar 5 07:33:00 2018 (r330450) @@ -241,8 +241,8 @@ static struct _pcsid { 0x6f278086, "BDX IOAT Ch7" }, { 0x6f2e8086, "BDX IOAT Ch0 (RAID)" }, { 0x6f2f8086, "BDX IOAT Ch1 (RAID)" }, - - { 0x00000000, NULL } + { 0x20218086, "SKX IOAT" }, + { 0x00000000, NULL } }; /* From owner-svn-src-all@freebsd.org Mon Mar 5 07:54:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 775F9F3A73B; Mon, 5 Mar 2018 07:54:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A32C368F6B; Mon, 5 Mar 2018 07:54:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99B8D21249; Mon, 5 Mar 2018 07:54:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w257swQ6001440; Mon, 5 Mar 2018 07:54:58 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w257swAE001435; Mon, 5 Mar 2018 07:54:58 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050754.w257swAE001435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 07:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 X-SVN-Commit-Revision: 330451 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 07:54:59 -0000 Author: eadler Date: Mon Mar 5 07:54:57 2018 New Revision: 330451 URL: https://svnweb.freebsd.org/changeset/base/330451 Log: MFC r306837: [net80211] extend the ieee80211_rx_stats struct to include more information. There are a variety of more interesting RX statistics that we should keep track of but we don't. This is a starting point for adding more information. Specifically: * now the RX rate information and some of the packet status is passed up; * The 32 bit or 64 bit TSF is passed up; * the PHY mode is passed up; * the "I'm decap'ed AMSDU!" state is passed up; * number of RX chains is bumped to 4. This is all mostly a placeholder for getting the data into the RX status before we pass it up to net80211 - unfortunately we don't yet enforce that drivers provide it, nor do we pass the provided info back up the stack so anyone can use the data. We're going to need to use some of this data moving forward. Notably, now that some hardware can do AMSDU decap for us (the intel iwm driver can do it when we flip it on; the ath10k port I'm doing does it for us) then we need to pass it up through the stack so the duplicate RX sequence numbers and crypto/IV details don't cause the packet to be dropped and/or counted against a replay counter. It's also the beginning of being able to do more interesting node accounting in net80211. Specifically, once drivers start populating per-packet rate information, AMPDU information, timestamps, etc, we can start providing histograms of rate-versus-RSSI, account for receive time spent per node and other such interesting things. (Note: I'm also hoping to include ranging and RTT information for future chipset support; and it's likely going to include it in this kind of fashion.) Modified: stable/11/sys/dev/iwm/if_iwm.c stable/11/sys/dev/otus/if_otus.c stable/11/sys/dev/usb/wlan/if_rsu.c stable/11/sys/net80211/ieee80211_freebsd.h stable/11/sys/net80211/ieee80211_input.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 07:33:00 2018 (r330450) +++ stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 07:54:57 2018 (r330451) @@ -3259,8 +3259,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf * } /* rssi is in 1/2db units */ - rxs.rssi = rssi * 2; - rxs.nf = sc->sc_noise; + rxs.c_rssi = rssi * 2; + rxs.c_nf = sc->sc_noise; if (ieee80211_radiotap_active_vap(vap)) { struct iwm_rx_radiotap_header *tap = &sc->sc_rxtap; Modified: stable/11/sys/dev/otus/if_otus.c ============================================================================== --- stable/11/sys/dev/otus/if_otus.c Mon Mar 5 07:33:00 2018 (r330450) +++ stable/11/sys/dev/otus/if_otus.c Mon Mar 5 07:54:57 2018 (r330451) @@ -1710,8 +1710,8 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, in /* Add RSSI/NF to this mbuf */ bzero(&rxs, sizeof(rxs)); rxs.r_flags = IEEE80211_R_NF | IEEE80211_R_RSSI; - rxs.nf = sc->sc_nf[0]; /* XXX chain 0 != combined rssi/nf */ - rxs.rssi = tail->rssi; + rxs.c_nf = sc->sc_nf[0]; /* XXX chain 0 != combined rssi/nf */ + rxs.c_rssi = tail->rssi; /* XXX TODO: add MIMO RSSI/NF as well */ ieee80211_add_rx_params(m, &rxs); Modified: stable/11/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsu.c Mon Mar 5 07:33:00 2018 (r330450) +++ stable/11/sys/dev/usb/wlan/if_rsu.c Mon Mar 5 07:54:57 2018 (r330451) @@ -1540,8 +1540,8 @@ rsu_event_survey(struct rsu_softc *sc, uint8_t *buf, i rxs.c_ieee = le32toh(bss->config.dsconfig); rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); /* This is a number from 0..100; so let's just divide it down a bit */ - rxs.rssi = le32toh(bss->rssi) / 2; - rxs.nf = -96; + rxs.c_rssi = le32toh(bss->rssi) / 2; + rxs.c_nf = -96; /* XXX avoid a LOR */ RSU_UNLOCK(sc); Modified: stable/11/sys/net80211/ieee80211_freebsd.h ============================================================================== --- stable/11/sys/net80211/ieee80211_freebsd.h Mon Mar 5 07:33:00 2018 (r330450) +++ stable/11/sys/net80211/ieee80211_freebsd.h Mon Mar 5 07:54:57 2018 (r330451) @@ -620,33 +620,82 @@ int ieee80211_add_xmit_params(struct mbuf *m, int ieee80211_get_xmit_params(struct mbuf *m, struct ieee80211_bpf_params *); -#define IEEE80211_MAX_CHAINS 3 +/* + * Note: this is fine for 3x3 (and 4x4) 11n HT40; + * but getting EVM information for VHT80, VHT160 + * will involve more than 6 EVM pilots. + */ +#define IEEE80211_MAX_CHAINS 4 #define IEEE80211_MAX_EVM_PILOTS 6 -#define IEEE80211_R_NF 0x0000001 /* global NF value valid */ -#define IEEE80211_R_RSSI 0x0000002 /* global RSSI value valid */ -#define IEEE80211_R_C_CHAIN 0x0000004 /* RX chain count valid */ -#define IEEE80211_R_C_NF 0x0000008 /* per-chain NF value valid */ -#define IEEE80211_R_C_RSSI 0x0000010 /* per-chain RSSI value valid */ -#define IEEE80211_R_C_EVM 0x0000020 /* per-chain EVM valid */ -#define IEEE80211_R_C_HT40 0x0000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */ -#define IEEE80211_R_FREQ 0x0000080 /* Freq value populated, MHz */ -#define IEEE80211_R_IEEE 0x0000100 /* IEEE value populated */ -#define IEEE80211_R_BAND 0x0000200 /* Frequency band populated */ +#define IEEE80211_R_NF 0x00000001 /* global NF value valid */ +#define IEEE80211_R_RSSI 0x00000002 /* global RSSI value valid */ +#define IEEE80211_R_C_CHAIN 0x00000004 /* RX chain count valid */ +#define IEEE80211_R_C_NF 0x00000008 /* per-chain NF value valid */ +#define IEEE80211_R_C_RSSI 0x00000010 /* per-chain RSSI value valid */ +#define IEEE80211_R_C_EVM 0x00000020 /* per-chain EVM valid */ +#define IEEE80211_R_C_HT40 0x00000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */ +#define IEEE80211_R_FREQ 0x00000080 /* Freq value populated, MHz */ +#define IEEE80211_R_IEEE 0x00000100 /* IEEE value populated */ +#define IEEE80211_R_BAND 0x00000200 /* Frequency band populated */ +#define IEEE80211_R_TSF32 0x00004000 /* 32 bit TSF */ +#define IEEE80211_R_TSF64 0x00008000 /* 64 bit TSF */ +#define IEEE80211_R_TSF_START 0x00010000 /* TSF is sampled at start of frame */ +#define IEEE80211_R_TSF_END 0x00020000 /* TSF is sampled at end of frame */ +/* RX packet flags - describe the kind of frame */ +#define IEEE80211_RX_F_STBC 0x00000001 +#define IEEE80211_RX_F_LDPC 0x00000002 +#define IEEE80211_RX_F_AMSDU 0x00000004 /* This is the start of an decap AMSDU list */ +#define IEEE80211_RX_F_AMSDU_MORE 0x00000008 /* This is another decap AMSDU frame in the batch */ +#define IEEE80211_RX_F_AMPDU 0x00000010 /* This is the start of an decap AMPDU list */ +#define IEEE80211_RX_F_AMPDU_MORE 0x00000020 /* This is another decap AMPDU frame in the batch */ + +/* Channel width */ +#define IEEE80211_RX_FW_20MHZ 1 +#define IEEE80211_RX_FW_40MHZ 2 +#define IEEE80211_RX_FW_80MHZ 3 + +/* PHY type */ +#define IEEE80211_RX_FP_11B 1 +#define IEEE80211_RX_FP_11G 2 +#define IEEE80211_RX_FP_11A 3 +#define IEEE80211_RX_FP_11NA 4 +#define IEEE80211_RX_FP_11NG 5 + struct ieee80211_rx_stats { uint32_t r_flags; /* IEEE80211_R_* flags */ + uint32_t c_pktflags; /* IEEE80211_RX_F_* flags */ + + uint64_t c_rx_tsf; /* 32 or 64 bit TSF */ + + /* All DWORD aligned */ + int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */ + int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ + int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ + int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ + + /* 32 bits */ + uint8_t c_nf; /* global NF */ + uint8_t c_rssi; /* global RSSI */ uint8_t c_chain; /* number of RX chains involved */ - int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */ - int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ - int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ - int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ - uint8_t nf; /* global NF */ - uint8_t rssi; /* global RSSI */ - uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; - /* per-chain, per-pilot EVM values */ - uint16_t c_freq; - uint8_t c_ieee; + uint8_t c_rate; /* legacy + 11n rate code */ + + /* 32 bits */ + uint16_t c_freq; /* Frequency, MHz */ + uint8_t c_ieee; /* Channel */ + uint8_t c_width; /* channel width, FW flags above */ + + /* Force alignment to DWORD */ + union { + uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; + /* per-chain, per-pilot EVM values */ + uint32_t __aln[8]; + } evm; + + /* 32 bits */ + uint8_t c_phytype; /* PHY type, FW flags above */ + uint8_t c_pad2[3]; }; struct ieee80211_rx_params { Modified: stable/11/sys/net80211/ieee80211_input.c ============================================================================== --- stable/11/sys/net80211/ieee80211_input.c Mon Mar 5 07:33:00 2018 (r330450) +++ stable/11/sys/net80211/ieee80211_input.c Mon Mar 5 07:54:57 2018 (r330451) @@ -100,7 +100,7 @@ ieee80211_input_mimo(struct ieee80211_node *ni, struct ieee80211_process_mimo(ni, &rxs); //return ieee80211_input(ni, m, rx->rssi, rx->nf); - return ni->ni_vap->iv_input(ni, m, &rxs, rxs.rssi, rxs.nf); + return ni->ni_vap->iv_input(ni, m, &rxs, rxs.c_rssi, rxs.c_nf); } int @@ -109,8 +109,8 @@ ieee80211_input_all(struct ieee80211com *ic, struct mb struct ieee80211_rx_stats rx; rx.r_flags = IEEE80211_R_NF | IEEE80211_R_RSSI; - rx.nf = nf; - rx.rssi = rssi; + rx.c_nf = nf; + rx.c_rssi = rssi; return ieee80211_input_mimo_all(ic, m, &rx); } From owner-svn-src-all@freebsd.org Mon Mar 5 07:58:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0602DF3AAEE; Mon, 5 Mar 2018 07:58:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5BD66919D; Mon, 5 Mar 2018 07:58:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C4D32124B; Mon, 5 Mar 2018 07:58:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w257wnU3001660; Mon, 5 Mar 2018 07:58:49 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w257wndE001655; Mon, 5 Mar 2018 07:58:49 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050758.w257wndE001655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 07:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330452 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 X-SVN-Commit-Revision: 330452 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 07:58:50 -0000 Author: eadler Date: Mon Mar 5 07:58:48 2018 New Revision: 330452 URL: https://svnweb.freebsd.org/changeset/base/330452 Log: MFC r307158: net80211: convert all ieee80211_input_mimo*() consumers to ieee80211_add_rx_params() + drop last (ieee80211_rx_stats) parameter Note: there is an additional check for ieee80211_get_rx_params() return value (which does not exist in the original diff). Modified: stable/11/sys/dev/iwm/if_iwm.c stable/11/sys/dev/otus/if_otus.c stable/11/sys/dev/usb/wlan/if_rsu.c stable/11/sys/net80211/ieee80211_input.c stable/11/sys/net80211/ieee80211_proto.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 07:54:57 2018 (r330451) +++ stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 07:58:48 2018 (r330452) @@ -3261,6 +3261,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf * /* rssi is in 1/2db units */ rxs.c_rssi = rssi * 2; rxs.c_nf = sc->sc_noise; + if (ieee80211_add_rx_params(m, &rxs) == 0) + goto fail; if (ieee80211_radiotap_active_vap(vap)) { struct iwm_rx_radiotap_header *tap = &sc->sc_rxtap; @@ -3297,11 +3299,11 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf * IWM_UNLOCK(sc); if (ni != NULL) { IWM_DPRINTF(sc, IWM_DEBUG_RECV, "input m %p\n", m); - ieee80211_input_mimo(ni, m, &rxs); + ieee80211_input_mimo(ni, m); ieee80211_free_node(ni); } else { IWM_DPRINTF(sc, IWM_DEBUG_RECV, "inputall m %p\n", m); - ieee80211_input_mimo_all(ic, m, &rxs); + ieee80211_input_mimo_all(ic, m); } IWM_LOCK(sc); Modified: stable/11/sys/dev/otus/if_otus.c ============================================================================== --- stable/11/sys/dev/otus/if_otus.c Mon Mar 5 07:54:57 2018 (r330451) +++ stable/11/sys/dev/otus/if_otus.c Mon Mar 5 07:58:48 2018 (r330452) @@ -1713,7 +1713,10 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, in rxs.c_nf = sc->sc_nf[0]; /* XXX chain 0 != combined rssi/nf */ rxs.c_rssi = tail->rssi; /* XXX TODO: add MIMO RSSI/NF as well */ - ieee80211_add_rx_params(m, &rxs); + if (ieee80211_add_rx_params(m, &rxs) == 0) { + counter_u64_add(ic->ic_ierrors, 1); + return; + } /* XXX make a method */ STAILQ_INSERT_TAIL(&rxq->mq_head, m, m_stailqpkt); @@ -1826,10 +1829,10 @@ tr_setup: if (ni != NULL) { if (ni->ni_flags & IEEE80211_NODE_HT) m->m_flags |= M_AMPDU; - (void)ieee80211_input_mimo(ni, m, NULL); + (void)ieee80211_input_mimo(ni, m); ieee80211_free_node(ni); } else - (void)ieee80211_input_mimo_all(ic, m, NULL); + (void)ieee80211_input_mimo_all(ic, m); } #ifdef IEEE80211_SUPPORT_SUPERG ieee80211_ff_age_all(ic, 100); Modified: stable/11/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsu.c Mon Mar 5 07:54:57 2018 (r330451) +++ stable/11/sys/dev/usb/wlan/if_rsu.c Mon Mar 5 07:58:48 2018 (r330452) @@ -1542,10 +1542,12 @@ rsu_event_survey(struct rsu_softc *sc, uint8_t *buf, i /* This is a number from 0..100; so let's just divide it down a bit */ rxs.c_rssi = le32toh(bss->rssi) / 2; rxs.c_nf = -96; + if (ieee80211_add_rx_params(m, &rxs) == 0) + return; /* XXX avoid a LOR */ RSU_UNLOCK(sc); - ieee80211_input_mimo_all(ic, m, &rxs); + ieee80211_input_mimo_all(ic, m); RSU_LOCK(sc); } Modified: stable/11/sys/net80211/ieee80211_input.c ============================================================================== --- stable/11/sys/net80211/ieee80211_input.c Mon Mar 5 07:54:57 2018 (r330451) +++ stable/11/sys/net80211/ieee80211_input.c Mon Mar 5 07:58:48 2018 (r330452) @@ -83,18 +83,14 @@ ieee80211_process_mimo(struct ieee80211_node *ni, stru } int -ieee80211_input_mimo(struct ieee80211_node *ni, struct mbuf *m, - struct ieee80211_rx_stats *rx) +ieee80211_input_mimo(struct ieee80211_node *ni, struct mbuf *m) { struct ieee80211_rx_stats rxs; - if (rx) { - memcpy(&rxs, rx, sizeof(*rx)); - } else { - /* try to read from mbuf */ - bzero(&rxs, sizeof(rxs)); - ieee80211_get_rx_params(m, &rxs); - } + /* try to read stats from mbuf */ + bzero(&rxs, sizeof(rxs)); + if (ieee80211_get_rx_params(m, &rxs) != 0) + return (-1); /* XXX should assert IEEE80211_R_NF and IEEE80211_R_RSSI are set */ ieee80211_process_mimo(ni, &rxs); @@ -111,27 +107,21 @@ ieee80211_input_all(struct ieee80211com *ic, struct mb rx.r_flags = IEEE80211_R_NF | IEEE80211_R_RSSI; rx.c_nf = nf; rx.c_rssi = rssi; - return ieee80211_input_mimo_all(ic, m, &rx); + + if (!ieee80211_add_rx_params(m, &rx)) + return (-1); + + return ieee80211_input_mimo_all(ic, m); } int -ieee80211_input_mimo_all(struct ieee80211com *ic, struct mbuf *m, - struct ieee80211_rx_stats *rx) +ieee80211_input_mimo_all(struct ieee80211com *ic, struct mbuf *m) { - struct ieee80211_rx_stats rxs; struct ieee80211vap *vap; int type = -1; m->m_flags |= M_BCAST; /* NB: mark for bpf tap'ing */ - if (rx) { - memcpy(&rxs, rx, sizeof(*rx)); - } else { - /* try to read from mbuf */ - bzero(&rxs, sizeof(rxs)); - ieee80211_get_rx_params(m, &rxs); - } - /* XXX locking */ TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { struct ieee80211_node *ni; @@ -152,6 +142,7 @@ ieee80211_input_mimo_all(struct ieee80211com *ic, stru /* * Packet contents are changed by ieee80211_decap * so do a deep copy of the packet. + * NB: tags are copied too. */ mcopy = m_dup(m, M_NOWAIT); if (mcopy == NULL) { @@ -163,7 +154,7 @@ ieee80211_input_mimo_all(struct ieee80211com *ic, stru m = NULL; } ni = ieee80211_ref_node(vap->iv_bss); - type = ieee80211_input_mimo(ni, mcopy, &rxs); + type = ieee80211_input_mimo(ni, mcopy); ieee80211_free_node(ni); } if (m != NULL) /* no vaps, reclaim mbuf */ Modified: stable/11/sys/net80211/ieee80211_proto.h ============================================================================== --- stable/11/sys/net80211/ieee80211_proto.h Mon Mar 5 07:54:57 2018 (r330451) +++ stable/11/sys/net80211/ieee80211_proto.h Mon Mar 5 07:58:48 2018 (r330452) @@ -83,10 +83,8 @@ void ieee80211_syncflag_ext(struct ieee80211vap *, int ((ni)->ni_vap->iv_input(ni, m, NULL, rssi, nf)) int ieee80211_input_all(struct ieee80211com *, struct mbuf *, int, int); -int ieee80211_input_mimo(struct ieee80211_node *, struct mbuf *, - struct ieee80211_rx_stats *); -int ieee80211_input_mimo_all(struct ieee80211com *, struct mbuf *, - struct ieee80211_rx_stats *); +int ieee80211_input_mimo(struct ieee80211_node *, struct mbuf *); +int ieee80211_input_mimo_all(struct ieee80211com *, struct mbuf *); struct ieee80211_bpf_params; int ieee80211_mgmt_output(struct ieee80211_node *, struct mbuf *, int, From owner-svn-src-all@freebsd.org Mon Mar 5 08:00:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DD96F3ADAD; Mon, 5 Mar 2018 08:00:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C425069326; Mon, 5 Mar 2018 08:00:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF03C2124F; Mon, 5 Mar 2018 08:00:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2580H3Y001811; Mon, 5 Mar 2018 08:00:17 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2580Hb6001810; Mon, 5 Mar 2018 08:00:17 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050800.w2580Hb6001810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330453 - stable/11/sys/dev/iwm X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/iwm X-SVN-Commit-Revision: 330453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:00:18 -0000 Author: eadler Date: Mon Mar 5 08:00:17 2018 New Revision: 330453 URL: https://svnweb.freebsd.org/changeset/base/330453 Log: MFC r308185: [iwm] Set full-offload scan flag. Fixes fw panic when already associated. * Starting a scan from wpa_supplicant or via ifconfig while associated, should no longer cause firmware panics or abort early. Tested: * AC7260, STA mode Modified: stable/11/sys/dev/iwm/if_iwm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 07:58:48 2018 (r330452) +++ stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 08:00:17 2018 (r330453) @@ -6140,6 +6140,8 @@ iwm_attach(device_t dev) IEEE80211_C_SHPREAMBLE /* short preamble supported */ // IEEE80211_C_BGSCAN /* capable of bg scanning */ ; + /* Advertise full-offload scanning */ + ic->ic_flags_ext = IEEE80211_FEXT_SCAN_OFFLOAD; for (i = 0; i < nitems(sc->sc_phyctxt); i++) { sc->sc_phyctxt[i].id = i; sc->sc_phyctxt[i].color = 0; From owner-svn-src-all@freebsd.org Mon Mar 5 08:01:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FFCEF3B013; Mon, 5 Mar 2018 08:01:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A6F6694B1; Mon, 5 Mar 2018 08:01:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 353352127E; Mon, 5 Mar 2018 08:01:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258195e002581; Mon, 5 Mar 2018 08:01:09 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2581979002580; Mon, 5 Mar 2018 08:01:09 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050801.w2581979002580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330454 - stable/11/sys/dev/iwm X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/iwm X-SVN-Commit-Revision: 330454 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:01:09 -0000 Author: eadler Date: Mon Mar 5 08:01:08 2018 New Revision: 330454 URL: https://svnweb.freebsd.org/changeset/base/330454 Log: MFC r313306: [iwm] free node reference if rxparams addition fails. Modified: stable/11/sys/dev/iwm/if_iwm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 08:00:17 2018 (r330453) +++ stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 08:01:08 2018 (r330454) @@ -3261,8 +3261,11 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf * /* rssi is in 1/2db units */ rxs.c_rssi = rssi * 2; rxs.c_nf = sc->sc_noise; - if (ieee80211_add_rx_params(m, &rxs) == 0) + if (ieee80211_add_rx_params(m, &rxs) == 0) { + if (ni) + ieee80211_free_node(ni); goto fail; + } if (ieee80211_radiotap_active_vap(vap)) { struct iwm_rx_radiotap_header *tap = &sc->sc_rxtap; @@ -3309,7 +3312,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf * return TRUE; -fail: counter_u64_add(ic->ic_ierrors, 1); +fail: + counter_u64_add(ic->ic_ierrors, 1); return FALSE; } From owner-svn-src-all@freebsd.org Mon Mar 5 08:05:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3980F3B45F; Mon, 5 Mar 2018 08:05:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9108869968; Mon, 5 Mar 2018 08:05:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87C69213DA; Mon, 5 Mar 2018 08:05:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2585Wad006616; Mon, 5 Mar 2018 08:05:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2585U49006601; Mon, 5 Mar 2018 08:05:30 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050805.w2585U49006601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:05:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330455 - stable/11/sys/dev/iwm X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/iwm X-SVN-Commit-Revision: 330455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:05:33 -0000 Author: eadler Date: Mon Mar 5 08:05:30 2018 New Revision: 330455 URL: https://svnweb.freebsd.org/changeset/base/330455 Log: MFC r318001: [iwm] include opt_iwm.h and opt_wlan.h consistently in all files. Modified: stable/11/sys/dev/iwm/if_iwm.c stable/11/sys/dev/iwm/if_iwm_7000.c stable/11/sys/dev/iwm/if_iwm_8000.c stable/11/sys/dev/iwm/if_iwm_binding.c stable/11/sys/dev/iwm/if_iwm_fw.c stable/11/sys/dev/iwm/if_iwm_led.c stable/11/sys/dev/iwm/if_iwm_mac_ctxt.c stable/11/sys/dev/iwm/if_iwm_notif_wait.c stable/11/sys/dev/iwm/if_iwm_pcie_trans.c stable/11/sys/dev/iwm/if_iwm_phy_ctxt.c stable/11/sys/dev/iwm/if_iwm_phy_db.c stable/11/sys/dev/iwm/if_iwm_power.c stable/11/sys/dev/iwm/if_iwm_scan.c stable/11/sys/dev/iwm/if_iwm_time_event.c stable/11/sys/dev/iwm/if_iwm_util.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm.c Mon Mar 5 08:05:30 2018 (r330455) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_7000.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_7000.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_7000.c Mon Mar 5 08:05:30 2018 (r330455) @@ -72,6 +72,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_wlan.h" +#include "opt_iwm.h" + #include #include "if_iwm_config.h" Modified: stable/11/sys/dev/iwm/if_iwm_8000.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_8000.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_8000.c Mon Mar 5 08:05:30 2018 (r330455) @@ -71,6 +71,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_wlan.h" +#include "opt_iwm.h" + #include #include "if_iwm_config.h" Modified: stable/11/sys/dev/iwm/if_iwm_binding.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_binding.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_binding.c Mon Mar 5 08:05:30 2018 (r330455) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_fw.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_fw.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_fw.c Mon Mar 5 08:05:30 2018 (r330455) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_led.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_led.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_led.c Mon Mar 5 08:05:30 2018 (r330455) @@ -89,6 +89,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_wlan.h" +#include "opt_iwm.h" + #include #include #include Modified: stable/11/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_mac_ctxt.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_mac_ctxt.c Mon Mar 5 08:05:30 2018 (r330455) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_notif_wait.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_notif_wait.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_notif_wait.c Mon Mar 5 08:05:30 2018 (r330455) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_pcie_trans.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_pcie_trans.c Mon Mar 5 08:05:30 2018 (r330455) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_phy_ctxt.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_phy_ctxt.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_phy_ctxt.c Mon Mar 5 08:05:30 2018 (r330455) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_phy_db.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_phy_db.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_phy_db.c Mon Mar 5 08:05:30 2018 (r330455) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_power.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_power.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_power.c Mon Mar 5 08:05:30 2018 (r330455) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_scan.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_scan.c Mon Mar 5 08:05:30 2018 (r330455) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_time_event.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_time_event.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_time_event.c Mon Mar 5 08:05:30 2018 (r330455) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: stable/11/sys/dev/iwm/if_iwm_util.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm_util.c Mon Mar 5 08:01:08 2018 (r330454) +++ stable/11/sys/dev/iwm/if_iwm_util.c Mon Mar 5 08:05:30 2018 (r330455) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include From owner-svn-src-all@freebsd.org Mon Mar 5 08:14:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C97BF3BFF4; Mon, 5 Mar 2018 08:14:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0CC26A238; Mon, 5 Mar 2018 08:14:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABABD2156C; Mon, 5 Mar 2018 08:14:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258EBIM011872; Mon, 5 Mar 2018 08:14:11 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258EBQ7011870; Mon, 5 Mar 2018 08:14:11 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050814.w258EBQ7011870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330456 - stable/11/sys/dev/etherswitch/arswitch X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/etherswitch/arswitch X-SVN-Commit-Revision: 330456 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:14:12 -0000 Author: eadler Date: Mon Mar 5 08:14:11 2018 New Revision: 330456 URL: https://svnweb.freebsd.org/changeset/base/330456 Log: MFC r303339: Update my TODO items. Modified: stable/11/sys/dev/etherswitch/arswitch/arswitch_7240.c stable/11/sys/dev/etherswitch/arswitch/arswitch_8316.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/etherswitch/arswitch/arswitch_7240.c ============================================================================== --- stable/11/sys/dev/etherswitch/arswitch/arswitch_7240.c Mon Mar 5 08:05:30 2018 (r330455) +++ stable/11/sys/dev/etherswitch/arswitch/arswitch_7240.c Mon Mar 5 08:14:11 2018 (r330456) @@ -97,6 +97,8 @@ ar7240_hw_global_setup(struct arswitch_softc *sc) AR7240_GLOBAL_CTRL_MTU_MASK, SM(1536, AR7240_GLOBAL_CTRL_MTU_MASK)); + /* XXX ARP? Frame Age enable? */ + /* Service Tag */ arswitch_modifyreg(sc->sc_dev, AR8X16_REG_SERVICE_TAG, AR8X16_SERVICE_TAG_MASK, 0); Modified: stable/11/sys/dev/etherswitch/arswitch/arswitch_8316.c ============================================================================== --- stable/11/sys/dev/etherswitch/arswitch/arswitch_8316.c Mon Mar 5 08:05:30 2018 (r330455) +++ stable/11/sys/dev/etherswitch/arswitch/arswitch_8316.c Mon Mar 5 08:14:11 2018 (r330456) @@ -137,6 +137,7 @@ ar8316_hw_global_setup(struct arswitch_softc *sc) arswitch_writereg(sc->sc_dev, AR8X16_REG_TAG_PRIO, 0xfa50); /* Enable ARP frame acknowledge. */ + /* XXX TODO: aging? */ arswitch_modifyreg(sc->sc_dev, AR8X16_REG_AT_CTRL, 0, AR8X16_AT_CTRL_ARP_EN); From owner-svn-src-all@freebsd.org Mon Mar 5 08:17:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69B06F3C375; Mon, 5 Mar 2018 08:17:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C1766A480; Mon, 5 Mar 2018 08:17:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12BDA2156E; Mon, 5 Mar 2018 08:17:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258H2IA012017; Mon, 5 Mar 2018 08:17:02 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258H21T012015; Mon, 5 Mar 2018 08:17:02 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050817.w258H21T012015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:17:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330457 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 330457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:17:03 -0000 Author: eadler Date: Mon Mar 5 08:17:02 2018 New Revision: 330457 URL: https://svnweb.freebsd.org/changeset/base/330457 Log: MFC r305895: [net80211] add a HT method to populate HTCAP based on IBSS requirements. IBSS negotiation is a subset of the STA/AP negotiation. We always have a current channel, so base the HT capabilities on the current channel. This is then put into IBSS probe requests to inform peers of our 11n capabilities. Modified: stable/11/sys/net80211/ieee80211_ht.c stable/11/sys/net80211/ieee80211_ht.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_ht.c ============================================================================== --- stable/11/sys/net80211/ieee80211_ht.c Mon Mar 5 08:14:11 2018 (r330456) +++ stable/11/sys/net80211/ieee80211_ht.c Mon Mar 5 08:17:02 2018 (r330457) @@ -2846,6 +2846,96 @@ ieee80211_add_htcap(uint8_t *frm, struct ieee80211_nod } /* + * Non-associated probe request - add HT capabilities based on + * the current channel configuration. + */ +static uint8_t * +ieee80211_add_htcap_body_ch(uint8_t *frm, struct ieee80211vap *vap, + struct ieee80211_channel *c) +{ +#define ADDSHORT(frm, v) do { \ + frm[0] = (v) & 0xff; \ + frm[1] = (v) >> 8; \ + frm += 2; \ +} while (0) + struct ieee80211com *ic = vap->iv_ic; + uint16_t caps, extcaps; + int rxmax, density; + + /* HT capabilities */ + caps = vap->iv_htcaps & 0xffff; + + /* + * We don't use this in STA mode; only in IBSS mode. + * So in IBSS mode we base our HTCAP flags on the + * given channel. + */ + + /* override 20/40 use based on current channel */ + if (IEEE80211_IS_CHAN_HT40(c)) + caps |= IEEE80211_HTCAP_CHWIDTH40; + else + caps &= ~IEEE80211_HTCAP_CHWIDTH40; + + /* Use the currently configured values */ + rxmax = vap->iv_ampdu_rxmax; + density = vap->iv_ampdu_density; + + /* adjust short GI based on channel and config */ + if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20) == 0) + caps &= ~IEEE80211_HTCAP_SHORTGI20; + if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40) == 0 || + (caps & IEEE80211_HTCAP_CHWIDTH40) == 0) + caps &= ~IEEE80211_HTCAP_SHORTGI40; + ADDSHORT(frm, caps); + + /* HT parameters */ + *frm = SM(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) + | SM(density, IEEE80211_HTCAP_MPDUDENSITY) + ; + frm++; + + /* pre-zero remainder of ie */ + memset(frm, 0, sizeof(struct ieee80211_ie_htcap) - + __offsetof(struct ieee80211_ie_htcap, hc_mcsset)); + + /* supported MCS set */ + /* + * XXX: For sta mode the rate set should be restricted based + * on the AP's capabilities, but ni_htrates isn't setup when + * we're called to form an AssocReq frame so for now we're + * restricted to the device capabilities. + */ + ieee80211_set_mcsset(ic, frm); + + frm += __offsetof(struct ieee80211_ie_htcap, hc_extcap) - + __offsetof(struct ieee80211_ie_htcap, hc_mcsset); + + /* HT extended capabilities */ + extcaps = vap->iv_htextcaps & 0xffff; + + ADDSHORT(frm, extcaps); + + frm += sizeof(struct ieee80211_ie_htcap) - + __offsetof(struct ieee80211_ie_htcap, hc_txbf); + + return frm; +#undef ADDSHORT +} + +/* + * Add 802.11n HT capabilities information element + */ +uint8_t * +ieee80211_add_htcap_ch(uint8_t *frm, struct ieee80211vap *vap, + struct ieee80211_channel *c) +{ + frm[0] = IEEE80211_ELEMID_HTCAP; + frm[1] = sizeof(struct ieee80211_ie_htcap) - 2; + return ieee80211_add_htcap_body_ch(frm + 2, vap, c); +} + +/* * Add Broadcom OUI wrapped standard HTCAP ie; this is * used for compatibility w/ pre-draft implementations. */ Modified: stable/11/sys/net80211/ieee80211_ht.h ============================================================================== --- stable/11/sys/net80211/ieee80211_ht.h Mon Mar 5 08:14:11 2018 (r330456) +++ stable/11/sys/net80211/ieee80211_ht.h Mon Mar 5 08:17:02 2018 (r330457) @@ -210,6 +210,8 @@ void ieee80211_ampdu_stop(struct ieee80211_node *, int ieee80211_send_bar(struct ieee80211_node *, struct ieee80211_tx_ampdu *, ieee80211_seq); uint8_t *ieee80211_add_htcap(uint8_t *, struct ieee80211_node *); +uint8_t *ieee80211_add_htcap_ch(uint8_t *, struct ieee80211vap *, + struct ieee80211_channel *); uint8_t *ieee80211_add_htcap_vendor(uint8_t *, struct ieee80211_node *); uint8_t *ieee80211_add_htinfo(uint8_t *, struct ieee80211_node *); uint8_t *ieee80211_add_htinfo_vendor(uint8_t *, struct ieee80211_node *); From owner-svn-src-all@freebsd.org Mon Mar 5 08:18:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAB08F3C568; Mon, 5 Mar 2018 08:18:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6936A6A632; Mon, 5 Mar 2018 08:18:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6430E21570; Mon, 5 Mar 2018 08:18:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258IE0s012101; Mon, 5 Mar 2018 08:18:14 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258IE9o012098; Mon, 5 Mar 2018 08:18:14 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050818.w258IE9o012098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330458 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 330458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:18:15 -0000 Author: eadler Date: Mon Mar 5 08:18:13 2018 New Revision: 330458 URL: https://svnweb.freebsd.org/changeset/base/330458 Log: MFC r306139: [net80211] don't add IBSS node table entries for neighbors from other SSIDs. The adhoc probe/beacon input path was creating nodes for all SSIDs. This wasn't a problem when the NICs were configured to only process frames for the current BSSID, but that didn't allow IBSS merges. Once avos and I flipped on "beacons from all BSSIDs" to allow for correct IBSS merging, we found this interesting behaviour. This adds a check against the current SSID. * If there's no VAP SSID, allow anything * If there's a VAP SSID, check if the incoming frame has a suitable SSID and if so, allow it. This prevents nodes being created for other SSIDs in probe and beacon frames - ie, beacons overlapping IBSSes with different SSIDs, and probe requests from arbitrary devices. Tested: * AR9380, IBSS mode, both local and other IBSSes. Modified: stable/11/sys/net80211/ieee80211_adhoc.c stable/11/sys/net80211/ieee80211_node.c stable/11/sys/net80211/ieee80211_node.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_adhoc.c ============================================================================== --- stable/11/sys/net80211/ieee80211_adhoc.c Mon Mar 5 08:17:02 2018 (r330457) +++ stable/11/sys/net80211/ieee80211_adhoc.c Mon Mar 5 08:18:13 2018 (r330458) @@ -734,8 +734,20 @@ adhoc_recv_mgmt(struct ieee80211_node *ni, struct mbuf if (!IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) { /* * Create a new entry in the neighbor table. + * + * XXX TODO: + * + * Here we're not scanning; so if we have an + * SSID then make sure it matches our SSID. + * Otherwise this code will match on all IBSS + * beacons/probe requests for all SSIDs, + * filling the node table with nodes that + * aren't ours. */ - ni = ieee80211_add_neighbor(vap, wh, &scan); + if (ieee80211_ibss_node_check_new(ni, &scan)) + ni = ieee80211_add_neighbor(vap, wh, &scan); + else + ni = NULL; } else if (ni->ni_capinfo == 0) { /* * Update faked node created on transmit. Modified: stable/11/sys/net80211/ieee80211_node.c ============================================================================== --- stable/11/sys/net80211/ieee80211_node.c Mon Mar 5 08:17:02 2018 (r330457) +++ stable/11/sys/net80211/ieee80211_node.c Mon Mar 5 08:18:13 2018 (r330458) @@ -579,6 +579,62 @@ ieee80211_ibss_merge_check(struct ieee80211_node *ni) } /* + * Check if the given node should populate the node table. + * + * We need to be in "see all beacons for all ssids" mode in order + * to do IBSS merges, however this means we will populate nodes for + * /all/ IBSS SSIDs, versus just the one we care about. + * + * So this check ensures the node can actually belong to our IBSS + * configuration. For now it simply checks the SSID. + */ +int +ieee80211_ibss_node_check_new(struct ieee80211_node *ni, + const struct ieee80211_scanparams *scan) +{ + struct ieee80211vap *vap = ni->ni_vap; + int i; + + /* + * If we have no SSID and no scan SSID, return OK. + */ + if (vap->iv_des_nssid == 0 && scan->ssid == NULL) + goto ok; + + /* + * If we have one of (SSID, scan SSID) then return error. + */ + if (!! (vap->iv_des_nssid == 0) != !! (scan->ssid == NULL)) + goto mismatch; + + /* + * Double-check - we need scan SSID. + */ + if (scan->ssid == NULL) + goto mismatch; + + /* + * Check if the scan SSID matches the SSID list for the VAP. + */ + for (i = 0; i < vap->iv_des_nssid; i++) { + + /* Sanity length check */ + if (vap->iv_des_ssid[i].len != scan->ssid[1]) + continue; + + /* Note: SSID in the scan entry is the IE format */ + if (memcmp(vap->iv_des_ssid[i].ssid, scan->ssid + 2, + vap->iv_des_ssid[i].len) == 0) + goto ok; + } + +mismatch: + return (0); +ok: + return (1); +} + +/* * Handle 802.11 ad hoc network merge. The * convention, set by the Wireless Ethernet Compatibility Alliance * (WECA), is that an 802.11 station will change its BSSID to match Modified: stable/11/sys/net80211/ieee80211_node.h ============================================================================== --- stable/11/sys/net80211/ieee80211_node.h Mon Mar 5 08:17:02 2018 (r330457) +++ stable/11/sys/net80211/ieee80211_node.h Mon Mar 5 08:18:13 2018 (r330458) @@ -65,6 +65,7 @@ struct ieee80211_node_table; struct ieee80211com; struct ieee80211vap; +struct ieee80211_scanparams; /* * Information element ``blob''. We use this structure @@ -330,6 +331,8 @@ void ieee80211_setupcurchan(struct ieee80211com *, void ieee80211_setcurchan(struct ieee80211com *, struct ieee80211_channel *); void ieee80211_update_chw(struct ieee80211com *); int ieee80211_ibss_merge_check(struct ieee80211_node *); +int ieee80211_ibss_node_check_new(struct ieee80211_node *ni, + const struct ieee80211_scanparams *); int ieee80211_ibss_merge(struct ieee80211_node *); struct ieee80211_scan_entry; int ieee80211_sta_join(struct ieee80211vap *, struct ieee80211_channel *, From owner-svn-src-all@freebsd.org Mon Mar 5 08:19:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9672EF3C736 for ; Mon, 5 Mar 2018 08:19:24 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22f.google.com (mail-yw0-x22f.google.com [IPv6:2607:f8b0:4002:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35D3E6A858 for ; Mon, 5 Mar 2018 08:19:24 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22f.google.com with SMTP id l24so5357878ywk.6 for ; Mon, 05 Mar 2018 00:19:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ltHISW9qns7DXK1iF1O4O7LAmmeDA7N40c/16R2nPBE=; b=mRWJoQpuOn3DW/+VT14sRecbeNKW/Kn42Uzieqop4qUX30FVSwqXCtQ492Edrj1hAv UkFE3P5RVITURBQQkwHX1HTVwgINeaSqAEsc4kxRg5ElU96VP3QkTmHORKF6375X0DzX H6EieFIb02YGQZGYwrH6FZnVRK4I63LvsvE9w= 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=ltHISW9qns7DXK1iF1O4O7LAmmeDA7N40c/16R2nPBE=; b=GaUwl9IKsmLiKvxIxSIFHstrh7+SLCV3+BbySJgvhVyrPA5JKUS34hK9MwfMr9dDb5 e32YH4GuV2ZjfV3pb6Hm6LdUb0Ru5qdT3yM940cxpgFyLQPD+rkEvBVhqmEyw3GIk1JT C0kThEtP2u9/l8ajVjbpaCT+DQy5y26CAxPoCwnLyKlx+qfziIjEo/eZ0HBJPPbh9ixO EBnjlc8JfZWxCaosBpE+8Aa0nd0M8Pm0Hb/+7PmOnTTEZBJrVPINubJvqmulHecPRy9B 2JZz9DUdjaJkLrgWPf10lFCpsK6pZHEZCPOhPqE79VZyYnNTG9KRANRQoNqwNHRm8ZmR xjHw== X-Gm-Message-State: AElRT7HQ5bto56zJlkGlCknjjLR797n5bv8l0yy1rd5TrFZ/wYlOF0cP E9CS3Txa5HnTrX2JXcUmjoo0AtvT1FSK7H/LG8fvXQ== X-Google-Smtp-Source: AG47ELvbDbNc/UZoEpIrb2BxVSVStU8THude1Jgh61393dz5aAYosne/7lh1OvGjTKZYZXUvD5pJQyAEX2L+e7gCzN4= X-Received: by 10.13.243.198 with SMTP id c189mr8672307ywf.141.1520237963551; Mon, 05 Mar 2018 00:19:23 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Mon, 5 Mar 2018 00:18:53 -0800 (PST) In-Reply-To: <201609301959.u8UJxvJg011567@repo.freebsd.org> References: <201609301959.u8UJxvJg011567@repo.freebsd.org> From: Eitan Adler Date: Mon, 5 Mar 2018 00:18:53 -0800 Message-ID: Subject: Re: svn commit: r306525 - in head/lib: . librss To: Adrian Chadd Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:19:24 -0000 On 30 September 2016 at 12:59, Adrian Chadd wrote: > Author: adrian > Date: Fri Sep 30 19:59:56 2016 > New Revision: 306525 > URL: https://svnweb.freebsd.org/changeset/base/306525 > > Log: > Add librss, a simple wrapper around RSS APIs so applications can begin auto-tuning. Any reason to not MFC this? -- Eitan Adler From owner-svn-src-all@freebsd.org Mon Mar 5 08:21:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0763FF3CA63; Mon, 5 Mar 2018 08:21:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABED26AC46; Mon, 5 Mar 2018 08:21:31 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6DF1216C1; Mon, 5 Mar 2018 08:21:31 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258LVhA015386; Mon, 5 Mar 2018 08:21:31 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258LViE015385; Mon, 5 Mar 2018 08:21:31 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050821.w258LViE015385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330459 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 330459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:21:32 -0000 Author: eadler Date: Mon Mar 5 08:21:31 2018 New Revision: 330459 URL: https://svnweb.freebsd.org/changeset/base/330459 Log: MFC r306836: [ifconfig] correctly display RSSI. Modified: stable/11/sbin/ifconfig/ifieee80211.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/11/sbin/ifconfig/ifieee80211.c Mon Mar 5 08:18:13 2018 (r330458) +++ stable/11/sbin/ifconfig/ifieee80211.c Mon Mar 5 08:21:31 2018 (r330459) @@ -3300,8 +3300,8 @@ printmimo(const struct ieee80211_mimo_info *mi) /* NB: don't muddy display unless there's something to show */ if (mi->rssi[0] != 0 || mi->rssi[1] != 0 || mi->rssi[2] != 0) { /* XXX ignore EVM for now */ - printf(" (rssi %d:%d:%d nf %d:%d:%d)", - mi->rssi[0], mi->rssi[1], mi->rssi[2], + printf(" (rssi %.1f:%.1f:%.1f nf %d:%d:%d)", + mi->rssi[0] / 2.0, mi->rssi[1] / 2.0, mi->rssi[2] / 2.0, mi->noise[0], mi->noise[1], mi->noise[2]); } } From owner-svn-src-all@freebsd.org Mon Mar 5 08:22:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D68FDF3CD3C; Mon, 5 Mar 2018 08:22:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86A206AE46; Mon, 5 Mar 2018 08:22:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 818F421703; Mon, 5 Mar 2018 08:22:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258MOeM017067; Mon, 5 Mar 2018 08:22:24 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258MO8s017066; Mon, 5 Mar 2018 08:22:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050822.w258MO8s017066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:22:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330460 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 330460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:22:25 -0000 Author: eadler Date: Mon Mar 5 08:22:24 2018 New Revision: 330460 URL: https://svnweb.freebsd.org/changeset/base/330460 Log: MFC r308007: [net80211] don't abort a background scan upon reception of a single packet. Full offload drivers don't need this behaviour - they do it in firmware. Modified: stable/11/sys/net80211/ieee80211_scan_sw.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- stable/11/sys/net80211/ieee80211_scan_sw.c Mon Mar 5 08:21:31 2018 (r330459) +++ stable/11/sys/net80211/ieee80211_scan_sw.c Mon Mar 5 08:22:24 2018 (r330460) @@ -461,6 +461,11 @@ ieee80211_swscan_cancel_scan(struct ieee80211vap *vap) static void ieee80211_swscan_cancel_anyscan(struct ieee80211vap *vap) { + + /* XXX for now - just don't do this per packet. */ + if (vap->iv_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) + return; + cancel_scan(vap, 1, __func__); } From owner-svn-src-all@freebsd.org Mon Mar 5 08:22:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F3A5F3CDC8; Mon, 5 Mar 2018 08:22:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 107576AF91; Mon, 5 Mar 2018 08:22:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B91A21714; Mon, 5 Mar 2018 08:22:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258Mm7p017127; Mon, 5 Mar 2018 08:22:48 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258MmvD017126; Mon, 5 Mar 2018 08:22:48 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050822.w258MmvD017126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:22:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330461 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 330461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:22:49 -0000 Author: eadler Date: Mon Mar 5 08:22:48 2018 New Revision: 330461 URL: https://svnweb.freebsd.org/changeset/base/330461 Log: MFC r308008: [net80211] add comments! Modified: stable/11/sys/net80211/ieee80211_scan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_scan.c ============================================================================== --- stable/11/sys/net80211/ieee80211_scan.c Mon Mar 5 08:22:24 2018 (r330460) +++ stable/11/sys/net80211/ieee80211_scan.c Mon Mar 5 08:22:48 2018 (r330461) @@ -443,6 +443,9 @@ ieee80211_cancel_scan(struct ieee80211vap *vap) /* * Cancel any scan currently going on. + * + * This is called during normal 802.11 data path to cancel + * a scan so a newly arrived normal data packet can be sent. */ void ieee80211_cancel_anyscan(struct ieee80211vap *vap) From owner-svn-src-all@freebsd.org Mon Mar 5 08:24:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7F26F3D0F3; Mon, 5 Mar 2018 08:24:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 785726B1C6; Mon, 5 Mar 2018 08:24:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EDA421715; Mon, 5 Mar 2018 08:24:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258OwNG017243; Mon, 5 Mar 2018 08:24:58 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258OwUT017242; Mon, 5 Mar 2018 08:24:58 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050824.w258OwUT017242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330462 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 330462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:24:59 -0000 Author: eadler Date: Mon Mar 5 08:24:58 2018 New Revision: 330462 URL: https://svnweb.freebsd.org/changeset/base/330462 Log: MFC r308663: [net80211] announce 11n capabilities in probe requests in IBSS mode. The 802.11-2012 specification notes that a subset of IEs should be present in IBSS probe requests. This is what (initially) allows nodes to discover that other nodes are 11n capable. Notably - HTCAP, but not HTINFO. This isn't everything required to reliably enable 11n between net80211 peers; there's more work to come. Tested: * AR9380, IBSS+11n mode Modified: stable/11/sys/net80211/ieee80211_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_output.c ============================================================================== --- stable/11/sys/net80211/ieee80211_output.c Mon Mar 5 08:22:48 2018 (r330461) +++ stable/11/sys/net80211/ieee80211_output.c Mon Mar 5 08:24:58 2018 (r330462) @@ -2074,6 +2074,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; + struct ieee80211_node *bss; const struct ieee80211_txparam *tp; struct ieee80211_bpf_params params; const struct ieee80211_rateset *rs; @@ -2081,10 +2082,13 @@ ieee80211_send_probereq(struct ieee80211_node *ni, uint8_t *frm; int ret; + bss = ieee80211_ref_node(vap->iv_bss); + if (vap->iv_state == IEEE80211_S_CAC) { IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT, ni, "block %s frame in CAC state", "probe request"); vap->iv_stats.is_tx_badstate++; + ieee80211_free_node(bss); return EIO; /* XXX */ } @@ -2106,6 +2110,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, * [tlv] supported rates * [tlv] RSN (optional) * [tlv] extended supported rates + * [tlv] HT cap (optional) * [tlv] WPA (optional) * [tlv] user-specified ie's */ @@ -2113,6 +2118,8 @@ ieee80211_send_probereq(struct ieee80211_node *ni, ic->ic_headroom + sizeof(struct ieee80211_frame), 2 + IEEE80211_NWID_LEN + 2 + IEEE80211_RATE_SIZE + + sizeof(struct ieee80211_ie_htcap) + + sizeof(struct ieee80211_ie_htinfo) + sizeof(struct ieee80211_ie_wpa) + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE) + sizeof(struct ieee80211_ie_wpa) @@ -2122,6 +2129,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, if (m == NULL) { vap->iv_stats.is_tx_nobuf++; ieee80211_free_node(ni); + ieee80211_free_node(bss); return ENOMEM; } @@ -2130,6 +2138,27 @@ ieee80211_send_probereq(struct ieee80211_node *ni, frm = ieee80211_add_rates(frm, rs); frm = ieee80211_add_rsn(frm, vap); frm = ieee80211_add_xrates(frm, rs); + + /* + * Note: we can't use bss; we don't have one yet. + * + * So, we should announce our capabilities + * in this channel mode (2g/5g), not the + * channel details itself. + */ + if ((vap->iv_opmode == IEEE80211_M_IBSS) && + (vap->iv_flags_ht & IEEE80211_FHT_HT)) { + struct ieee80211_channel *c; + + /* + * Get the HT channel that we should try upgrading to. + * If we can do 40MHz then this'll upgrade it appropriately. + */ + c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan, + vap->iv_flags_ht); + frm = ieee80211_add_htcap_ch(frm, vap, c); + } + frm = ieee80211_add_wpa(frm, vap); if (vap->iv_appie_probereq != NULL) frm = add_appie(frm, vap->iv_appie_probereq); @@ -2141,6 +2170,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, if (m == NULL) { /* NB: cannot happen */ ieee80211_free_node(ni); + ieee80211_free_node(bss); return ENOMEM; } @@ -2157,8 +2187,11 @@ ieee80211_send_probereq(struct ieee80211_node *ni, IEEE80211_NODE_STAT(ni, tx_mgmt); IEEE80211_DPRINTF(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_DUMPPKTS, - "send probe req on channel %u bssid %s ssid \"%.*s\"\n", - ieee80211_chan2ieee(ic, ic->ic_curchan), ether_sprintf(bssid), + "send probe req on channel %u bssid %s sa %6D da %6D ssid \"%.*s\"\n", + ieee80211_chan2ieee(ic, ic->ic_curchan), + ether_sprintf(bssid), + sa, ":", + da, ":", ssidlen, ssid); memset(¶ms, 0, sizeof(params)); @@ -2173,6 +2206,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, params.ibp_power = ni->ni_txpower; ret = ieee80211_raw_output(vap, ni, m, ¶ms); IEEE80211_TX_UNLOCK(ic); + ieee80211_free_node(bss); return (ret); } From owner-svn-src-all@freebsd.org Mon Mar 5 08:25:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0210EF3D171; Mon, 5 Mar 2018 08:25:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A56366B2FC; Mon, 5 Mar 2018 08:25:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A07D321716; Mon, 5 Mar 2018 08:25:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258PNZ1017313; Mon, 5 Mar 2018 08:25:23 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258PNew017312; Mon, 5 Mar 2018 08:25:23 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050825.w258PNew017312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330463 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 330463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:25:24 -0000 Author: eadler Date: Mon Mar 5 08:25:23 2018 New Revision: 330463 URL: https://svnweb.freebsd.org/changeset/base/330463 Log: MFC r308950: [net80211] Remove extra \n. Modified: stable/11/sys/net80211/ieee80211_ht.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_ht.c ============================================================================== --- stable/11/sys/net80211/ieee80211_ht.c Mon Mar 5 08:24:58 2018 (r330462) +++ stable/11/sys/net80211/ieee80211_ht.c Mon Mar 5 08:25:23 2018 (r330463) @@ -586,7 +586,7 @@ ieee80211_ampdu_rx_start_ext(struct ieee80211_node *ni rap->rxa_flags |= IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_XCHGPEND; IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, - "%s: tid=%d, start=%d, wnd=%d, flags=0x%08x\n", + "%s: tid=%d, start=%d, wnd=%d, flags=0x%08x", __func__, tid, seq, From owner-svn-src-all@freebsd.org Mon Mar 5 08:27:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8A60F3D52F; Mon, 5 Mar 2018 08:27:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 77E496B641; Mon, 5 Mar 2018 08:27:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72E5E21719; Mon, 5 Mar 2018 08:27:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258RTwi017588; Mon, 5 Mar 2018 08:27:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258RTPj017587; Mon, 5 Mar 2018 08:27:29 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050827.w258RTPj017587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330464 - stable/11/usr.bin/users X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/users X-SVN-Commit-Revision: 330464 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:27:30 -0000 Author: eadler Date: Mon Mar 5 08:27:29 2018 New Revision: 330464 URL: https://svnweb.freebsd.org/changeset/base/330464 Log: MFC r311581: Capsicum: add capability mode to users binary Submitted by: Tyler Littlefield Reviewed by: cem, oshogbo Differential Revision: https://reviews.freebsd.org/D9046 Modified: stable/11/usr.bin/users/users.cc Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/users/users.cc ============================================================================== --- stable/11/usr.bin/users/users.cc Mon Mar 5 08:25:23 2018 (r330463) +++ stable/11/usr.bin/users/users.cc Mon Mar 5 08:27:29 2018 (r330464) @@ -27,9 +27,12 @@ * SUCH DAMAGE. */ +#include #include __FBSDID("$FreeBSD$"); +#include +#include #include #include @@ -51,6 +54,10 @@ main(int argc, char **) } setutxent(); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "Failed to enter capability mode."); + while ((ut = getutxent()) != NULL) if (ut->ut_type == USER_PROCESS) names.insert(ut->ut_user); From owner-svn-src-all@freebsd.org Mon Mar 5 08:29:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78034F3D7D3; Mon, 5 Mar 2018 08:29:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFED16B8C3; Mon, 5 Mar 2018 08:29:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B73AA2171C; Mon, 5 Mar 2018 08:29:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258TcGg017811; Mon, 5 Mar 2018 08:29:38 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258Tcr2017810; Mon, 5 Mar 2018 08:29:38 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050829.w258Tcr2017810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330465 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 330465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:29:40 -0000 Author: eadler Date: Mon Mar 5 08:29:38 2018 New Revision: 330465 URL: https://svnweb.freebsd.org/changeset/base/330465 Log: MFC r313425: [iwm] add version 17 firmware. Modified: stable/11/sys/conf/files Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Mon Mar 5 08:27:29 2018 (r330464) +++ stable/11/sys/conf/files Mon Mar 5 08:29:38 2018 (r330465) @@ -1926,7 +1926,7 @@ iwm3160fw.fwo optional iwm3160fw | iwmfw \ no-implicit-rule \ clean "iwm3160fw.fwo" iwm3160.fw optional iwm3160fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-3160-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-3160-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3160.fw" @@ -1940,7 +1940,7 @@ iwm7260fw.fwo optional iwm7260fw | iwmfw \ no-implicit-rule \ clean "iwm7260fw.fwo" iwm7260.fw optional iwm7260fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-7260-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-7260-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7260.fw" @@ -1954,7 +1954,7 @@ iwm7265fw.fwo optional iwm7265fw | iwmfw \ no-implicit-rule \ clean "iwm7265fw.fwo" iwm7265.fw optional iwm7265fw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-7265-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-7265-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265.fw" @@ -1982,7 +1982,7 @@ iwm8000Cfw.fwo optional iwm8000Cfw | iwmfw \ no-implicit-rule \ clean "iwm8000Cfw.fwo" iwm8000C.fw optional iwm8000Cfw | iwmfw \ - dependency "$S/contrib/dev/iwm/iwm-8000C-16.fw.uu" \ + dependency "$S/contrib/dev/iwm/iwm-8000C-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8000C.fw" From owner-svn-src-all@freebsd.org Mon Mar 5 08:30:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B306F3D966; Mon, 5 Mar 2018 08:30:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEE866BADA; Mon, 5 Mar 2018 08:30:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9D6A21736; Mon, 5 Mar 2018 08:30:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258UlNI017922; Mon, 5 Mar 2018 08:30:47 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258Ul2n017921; Mon, 5 Mar 2018 08:30:47 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050830.w258Ul2n017921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330466 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 330466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:30:48 -0000 Author: eadler Date: Mon Mar 5 08:30:47 2018 New Revision: 330466 URL: https://svnweb.freebsd.org/changeset/base/330466 Log: MFC r313578: [net80211] add a sysctl that forces a vap restart. Well, vap restart really does "all restart" for now, which will be a good way of debugging firmware restart issues. Modified: stable/11/sys/net80211/ieee80211_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_freebsd.c ============================================================================== --- stable/11/sys/net80211/ieee80211_freebsd.c Mon Mar 5 08:29:38 2018 (r330465) +++ stable/11/sys/net80211/ieee80211_freebsd.c Mon Mar 5 08:30:47 2018 (r330466) @@ -180,6 +180,26 @@ ieee80211_sysctl_radar(SYSCTL_HANDLER_ARGS) return 0; } +/* + * For now, just restart everything. + * + * Later on, it'd be nice to have a separate VAP restart to + * full-device restart. + */ +static int +ieee80211_sysctl_vap_restart(SYSCTL_HANDLER_ARGS) +{ + struct ieee80211vap *vap = arg1; + int t = 0, error; + + error = sysctl_handle_int(oidp, &t, 0, req); + if (error || !req->newptr) + return error; + + ieee80211_restart_all(vap->iv_ic); + return 0; +} + void ieee80211_sysctl_attach(struct ieee80211com *ic) { @@ -259,6 +279,12 @@ ieee80211_sysctl_vattach(struct ieee80211vap *vap) &vap->iv_ampdu_mintraffic[WME_AC_VI], 0, "VI traffic tx aggr threshold (pps)"); } + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "force_restart", CTLTYPE_INT | CTLFLAG_RW, vap, 0, + ieee80211_sysctl_vap_restart, "I", + "force a VAP restart"); + if (vap->iv_caps & IEEE80211_C_DFS) { SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "radar", CTLTYPE_INT | CTLFLAG_RW, vap->iv_ic, 0, From owner-svn-src-all@freebsd.org Mon Mar 5 08:32:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 653EEF3DC66; Mon, 5 Mar 2018 08:32:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 160956BE74; Mon, 5 Mar 2018 08:32:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECC6421892; Mon, 5 Mar 2018 08:32:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258WFxD021781; Mon, 5 Mar 2018 08:32:15 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258WFWw021779; Mon, 5 Mar 2018 08:32:15 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050832.w258WFWw021779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330467 - stable/11/sys/dev/asmc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/asmc X-SVN-Commit-Revision: 330467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:32:16 -0000 Author: eadler Date: Mon Mar 5 08:32:15 2018 New Revision: 330467 URL: https://svnweb.freebsd.org/changeset/base/330467 Log: MFC r313880: [asmc] Add support for MacBook Pro 11,2 This patch will add support for MacBookPro 11.2. For the macros, the MBP11_* macros (for the existing MacBookPro11.3) did not match so they have been renamed to MBP113_* and a new MBP112_* has been added (modified copy of MBP11_*). Some trailing whitespaces may have been removed automatically. PR: kern/214836 Modified: stable/11/sys/dev/asmc/asmc.c stable/11/sys/dev/asmc/asmcvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/asmc/asmc.c ============================================================================== --- stable/11/sys/dev/asmc/asmc.c Mon Mar 5 08:30:47 2018 (r330466) +++ stable/11/sys/dev/asmc/asmc.c Mon Mar 5 08:32:15 2018 (r330467) @@ -155,13 +155,13 @@ static struct asmc_model *asmc_match(device_t dev); asmc_mbp_sysctl_light_control struct asmc_model asmc_models[] = { - { + { "MacBook1,1", "Apple SMC MacBook Core Duo", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL, ASMC_MB_TEMPS, ASMC_MB_TEMPNAMES, ASMC_MB_TEMPDESCS }, - { + { "MacBook2,1", "Apple SMC MacBook Core 2 Duo", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL, ASMC_MB_TEMPS, ASMC_MB_TEMPNAMES, ASMC_MB_TEMPDESCS @@ -173,68 +173,74 @@ struct asmc_model asmc_models[] = { ASMC_MB31_TEMPS, ASMC_MB31_TEMPNAMES, ASMC_MB31_TEMPDESCS }, - { + { "MacBookPro1,1", "Apple SMC MacBook Pro Core Duo (15-inch)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP_TEMPS, ASMC_MBP_TEMPNAMES, ASMC_MBP_TEMPDESCS }, - { + { "MacBookPro1,2", "Apple SMC MacBook Pro Core Duo (17-inch)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP_TEMPS, ASMC_MBP_TEMPNAMES, ASMC_MBP_TEMPDESCS }, - { + { "MacBookPro2,1", "Apple SMC MacBook Pro Core 2 Duo (17-inch)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP_TEMPS, ASMC_MBP_TEMPNAMES, ASMC_MBP_TEMPDESCS }, - { + { "MacBookPro2,2", "Apple SMC MacBook Pro Core 2 Duo (15-inch)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP_TEMPS, ASMC_MBP_TEMPNAMES, ASMC_MBP_TEMPDESCS }, - { + { "MacBookPro3,1", "Apple SMC MacBook Pro Core 2 Duo (15-inch LED)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP_TEMPS, ASMC_MBP_TEMPNAMES, ASMC_MBP_TEMPDESCS }, - { + { "MacBookPro3,2", "Apple SMC MacBook Pro Core 2 Duo (17-inch HD)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP_TEMPS, ASMC_MBP_TEMPNAMES, ASMC_MBP_TEMPDESCS }, - - { + + { "MacBookPro4,1", "Apple SMC MacBook Pro Core 2 Duo (Penryn)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP4_TEMPS, ASMC_MBP4_TEMPNAMES, ASMC_MBP4_TEMPDESCS }, - { + { "MacBookPro5,1", "Apple SMC MacBook Pro Core 2 Duo (2008/2009)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP5_TEMPS, ASMC_MBP5_TEMPNAMES, ASMC_MBP5_TEMPDESCS }, - { + { "MacBookPro8,2", "Apple SMC MacBook Pro (early 2011)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP8_TEMPS, ASMC_MBP8_TEMPNAMES, ASMC_MBP8_TEMPDESCS }, - { + { + "MacBookPro11,2", "Apple SMC MacBook Pro Retina Core i7 (2013/2014)", + ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, + ASMC_MBP112_TEMPS, ASMC_MBP112_TEMPNAMES, ASMC_MBP112_TEMPDESCS + }, + + { "MacBookPro11,3", "Apple SMC MacBook Pro Retina Core i7 (2013/2014)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, - ASMC_MBP11_TEMPS, ASMC_MBP11_TEMPNAMES, ASMC_MBP11_TEMPDESCS + ASMC_MBP113_TEMPS, ASMC_MBP113_TEMPNAMES, ASMC_MBP113_TEMPDESCS }, - + /* The Mac Mini has no SMS */ - { + { "Macmini1,1", "Apple SMC Mac Mini", NULL, NULL, NULL, ASMC_FAN_FUNCS, @@ -243,7 +249,7 @@ struct asmc_model asmc_models[] = { }, /* The Mac Mini 3,1 has no SMS */ - { + { "Macmini3,1", "Apple SMC Mac Mini 3,1", NULL, NULL, NULL, ASMC_FAN_FUNCS, @@ -273,31 +279,31 @@ struct asmc_model asmc_models[] = { "MacBookAir1,1", "Apple SMC MacBook Air", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL, ASMC_MBA_TEMPS, ASMC_MBA_TEMPNAMES, ASMC_MBA_TEMPDESCS - }, + }, { "MacBookAir3,1", "Apple SMC MacBook Air Core 2 Duo (Late 2010)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL, ASMC_MBA3_TEMPS, ASMC_MBA3_TEMPNAMES, ASMC_MBA3_TEMPDESCS - }, + }, { "MacBookAir5,1", "Apple SMC MacBook Air 11-inch (Mid 2012)", ASMC_SMS_FUNCS_DISABLED, - ASMC_FAN_FUNCS2, + ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, ASMC_MBA5_TEMPS, ASMC_MBA5_TEMPNAMES, ASMC_MBA5_TEMPDESCS - }, + }, { "MacBookAir5,2", "Apple SMC MacBook Air 13-inch (Mid 2012)", ASMC_SMS_FUNCS_DISABLED, - ASMC_FAN_FUNCS2, + ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, ASMC_MBA5_TEMPS, ASMC_MBA5_TEMPNAMES, ASMC_MBA5_TEMPDESCS - }, + }, - + { NULL, NULL } }; @@ -333,7 +339,7 @@ ACPI_MODULE_NAME("ASMC") #ifdef DEBUG #define ASMC_DPRINTF(str) device_printf(dev, str) #else -#define ASMC_DPRINTF(str) +#define ASMC_DPRINTF(str) #endif /* NB: can't be const */ @@ -376,7 +382,7 @@ asmc_probe(device_t dev) return (ENXIO); if (ACPI_ID_PROBE(device_get_parent(dev), dev, asmc_ids) == NULL) return (ENXIO); - + model = asmc_match(dev); if (!model) { device_printf(dev, "model not recognized\n"); @@ -404,10 +410,10 @@ asmc_attach(device_t dev) device_printf(dev, "unable to allocate IO port\n"); return (ENOMEM); } - + sysctlctx = device_get_sysctl_ctx(dev); sysctlnode = device_get_sysctl_tree(dev); - + model = asmc_match(dev); mtx_init(&sc->sc_mtx, "asmc", NULL, MTX_SPIN); @@ -495,13 +501,13 @@ asmc_attach(device_t dev) sc->sc_light_tree = SYSCTL_ADD_NODE(sysctlctx, SYSCTL_CHILDREN(sysctlnode), OID_AUTO, "light", CTLFLAG_RD, 0, "Keyboard backlight sensors"); - + SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "left", CTLTYPE_INT | CTLFLAG_RD, dev, 0, model->smc_light_left, "I", "Keyboard backlight left sensor"); - + SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "right", CTLTYPE_INT | CTLFLAG_RD, @@ -574,7 +580,7 @@ asmc_attach(device_t dev) goto err2; } - ret = bus_setup_intr(dev, sc->sc_irq, + ret = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC | INTR_MPSAFE, #ifdef INTR_FILTER asmc_sms_intrfast, asmc_sms_handler, @@ -663,7 +669,7 @@ asmc_init(device_t dev) asmc_key_write(dev, ASMC_KEY_INTOK, buf, 1); DELAY(50); - /* + /* * Initiate the polling intervals. */ buf[0] = 20; /* msecs */ @@ -698,13 +704,13 @@ asmc_init(device_t dev) DELAY(100); sc->sc_sms_intr_works = 0; - + /* * Retry SMS initialization 1000 times * (takes approx. 2 seconds in worst case) */ for (i = 0; i < 1000; i++) { - if (asmc_key_read(dev, ASMC_KEY_SMS, buf, 2) == 0 && + if (asmc_key_read(dev, ASMC_KEY_SMS, buf, 2) == 0 && (buf[0] == ASMC_SMS_INIT1 && buf[1] == ASMC_SMS_INIT2)) { error = 0; sc->sc_sms_intr_works = 1; @@ -734,7 +740,7 @@ nosms: */ asmc_key_read(dev, ASMC_NKEYS, buf, 4); device_printf(dev, "number of keys: %d\n", ntohl(*(uint32_t*)buf)); - } + } #ifdef DEBUG asmc_dumpall(dev); @@ -782,10 +788,10 @@ asmc_wait(device_t dev, uint8_t val) #ifdef DEBUG device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, val, ASMC_CMDPORT_READ(sc)); -#endif +#endif return (1); } - + /* * Send the given command, retrying up to 10 times if * the acknowledgement fails. @@ -919,7 +925,7 @@ out: maxlen = type[0]; type[0] = ' '; type[5] = 0; - if (maxlen > sizeof(v)) { + if (maxlen > sizeof(v)) { device_printf(dev, "WARNING: cropping maxlen from %d to %zu\n", maxlen, sizeof(v)); @@ -1189,7 +1195,7 @@ asmc_sms_read(device_t dev, const char *key, int16_t * uint8_t buf[2]; int error; - /* no need to do locking here as asmc_key_read() already does it */ + /* no need to do locking here as asmc_key_read() already does it */ switch (key[3]) { case 'X': case 'Y': @@ -1246,7 +1252,7 @@ static void asmc_sms_handler(void *arg) { struct asmc_softc *sc = device_get_softc(arg); - + asmc_sms_task(sc, 0); } #endif @@ -1293,7 +1299,7 @@ asmc_sms_task(void *arg, int pending) } snprintf(notify, sizeof(notify), " notify=0x%x", type); - devctl_notify("ACPI", "asmc", "SMS", notify); + devctl_notify("ACPI", "asmc", "SMS", notify); } static int @@ -1363,11 +1369,11 @@ asmc_mbp_sysctl_light_right(SYSCTL_HANDLER_ARGS) uint8_t buf[6]; int error; int32_t v; - + asmc_key_read(dev, ASMC_KEY_LIGHTRIGHT, buf, sizeof buf); v = buf[2]; error = sysctl_handle_int(oidp, &v, 0, req); - + return (error); } Modified: stable/11/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/11/sys/dev/asmc/asmcvar.h Mon Mar 5 08:30:47 2018 (r330466) +++ stable/11/sys/dev/asmc/asmcvar.h Mon Mar 5 08:32:15 2018 (r330467) @@ -76,7 +76,7 @@ struct asmc_softc { /* Number of keys */ -#define ASMC_NKEYS "#KEY" /* RO; 4 bytes */ +#define ASMC_NKEYS "#KEY" /* RO; 4 bytes */ /* * Fan control via SMC. @@ -154,7 +154,7 @@ struct asmc_softc { #define ASMC_MB31_TEMPDESCS { "Enclosure Bottomside", \ "Northbridge Point 1", \ "Heatsink 1","Heatsink 2" \ - "Memory Bank A", } + "Memory Bank A", } #define ASMC_MBP_TEMPS { "TB0T", "Th0H", "Th1H", "Tm0P", \ "TG0H", "TG0P", "TG0T", NULL } @@ -167,7 +167,7 @@ struct asmc_softc { "Heatsink 1", "Heatsink 2", \ "Memory Controller", \ "Graphics Chip", "Graphics Heatsink", \ - "Unknown", } + "Unknown", } #define ASMC_MBP4_TEMPS { "TB0T", "Th0H", "Th1H", "Th2H", "Tm0P", \ "TG0H", "TG0D", "TC0D", "TC0P", "Ts0P", \ @@ -186,13 +186,13 @@ struct asmc_softc { "Graphics Chip Diode", \ "CPU Temperature Diode", "CPU Point 2", \ "Unknown", "Unknown", \ - "Wireless Module", } + "Wireless Module", } #define ASMC_MBP5_TEMPS { "TB0T", "TB1T", "TB2T", "TB3T", "TC0D", \ "TC0F", "TC0P", "TG0D", "TG0F", "TG0H", \ "TG0P", "TG0T", "TG1H", "TN0D", "TN0P", \ "TTF0", "Th2H", "Tm0P", "Ts0P", "Ts0S", \ - NULL } + NULL } #define ASMC_MBP5_TEMPNAMES { "enclosure_bottom_0", "enclosure_bottom_1", \ "enclosure_bottom_2", "enclosure_bottom_3", \ @@ -203,7 +203,7 @@ struct asmc_softc { "gpu_2_heatsink", "northbridge_diode", \ "northbridge_pin", "unknown", \ "heatsink_2", "memory_controller", \ - "pci_express_slot_pin", "pci_express_slot_unk" } + "pci_express_slot_pin", "pci_express_slot_unk" } #define ASMC_MBP5_TEMPDESCS { "Enclosure Bottom 0", "Enclosure Bottom 1", \ "Enclosure Bottom 2", "Enclosure Bottom 3", \ @@ -214,40 +214,67 @@ struct asmc_softc { "GPU 2 Heatsink", "Northbridge Diode", \ "Northbridge Pin", "Unknown", \ "Heatsink 2", "Memory Controller", \ - "PCI Express Slot Pin", "PCI Express Slot (unk)" } + "PCI Express Slot Pin", "PCI Express Slot (unk)" } #define ASMC_MBP8_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \ "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ "TC3C", "TC4C", "TCFC", "TCGC", "TCSA", \ "TCTD", "TG0D", "TG0P", "THSP", "TM0S", \ "TMBS", "TP0P", "TPCD", "TW0P", "Th1H", \ - "Th2H", "Tm0P", "Ts0P", "Ts0S", NULL } + "Th2H", "Tm0P", "Ts0P", "Ts0S", NULL } #define ASMC_MBP8_TEMPNAMES { "enclosure", "TB1T", "TB2T", "TC0C", "TC0D", \ "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ "TC3C", "TC4C", "TCFC", "TCGC", "TCSA", \ "TCTD", "graphics", "TG0P", "THSP", "TM0S", \ "TMBS", "TP0P", "TPCD", "wireless", "Th1H", \ - "Th2H", "memory", "Ts0P", "Ts0S" } + "Th2H", "memory", "Ts0P", "Ts0S" } #define ASMC_MBP8_TEMPDESCS { "Enclosure Bottomside", "TB1T", "TB2T", "TC0C", "TC0D", \ "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ "TC3C", "TC4C", "TCFC", "TCGC", "TCSA", \ "TCTD", "TG0D", "TG0P", "THSP", "TM0S", \ "TMBS", "TP0P", "TPCD", "TW0P", "Th1H", \ - "Th2H", "Tm0P", "Ts0P", "Ts0S" } + "Th2H", "Tm0P", "Ts0P", "Ts0S" } -#define ASMC_MBP11_TEMPS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ +#define ASMC_MBP112_TEMPS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ + "TCXC", "TH0A", "TH0B", "TH0F", "TH0R", \ + "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ + "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ + "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ + "Ts1S", NULL } + +#define ASMC_MBP112_TEMPNAMES { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ + "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ + "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ + "TCXC", "TH0A", "TH0B", "TH0F", "TH0R", \ + "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ + "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ + "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ + "Ts1S" } + +#define ASMC_MBP112_TEMPDESCS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ + "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ + "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ + "TCXC", "TH0A", "TH0B", "TH0F", "TH0R", \ + "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ + "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ + "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ + "Ts1S" } + +#define ASMC_MBP113_TEMPS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ + "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ + "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ "TCXC", "TG0D", "TG0P", "TG1D", "TG1F", \ "TG1d", "TH0A", "TH0B", "TH0F", "TH0R", \ "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ - "Ts1S", NULL } + "Ts1S", NULL } -#define ASMC_MBP11_TEMPNAMES { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ +#define ASMC_MBP113_TEMPNAMES { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ "TCXC", "TG0D", "TG0P", "TG1D", "TG1F", \ @@ -255,9 +282,9 @@ struct asmc_softc { "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ - "Ts1S" } + "Ts1S" } -#define ASMC_MBP11_TEMPDESCS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ +#define ASMC_MBP113_TEMPDESCS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ "TCXC", "TG0D", "TG0P", "TG1D", "TG1F", \ @@ -265,7 +292,8 @@ struct asmc_softc { "TH0V", "TH0a", "TH0b", "TH0c", "TM0P", \ "TM0S", "TP0P", "TPCD", "TW0P", "Ta0P", \ "TaSP", "Th1H", "Th2H", "Ts0P", "Ts0S", \ - "Ts1S" } + "Ts1S" } + #define ASMC_MM_TEMPS { "TN0P", "TN1P", NULL } #define ASMC_MM_TEMPNAMES { "northbridge1", "northbridge2" } From owner-svn-src-all@freebsd.org Mon Mar 5 08:32:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33603F3DD89; Mon, 5 Mar 2018 08:32:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0B786BFDC; Mon, 5 Mar 2018 08:32:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB8C2218AA; Mon, 5 Mar 2018 08:32:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258Ws13022656; Mon, 5 Mar 2018 08:32:54 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258WsHM022655; Mon, 5 Mar 2018 08:32:54 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050832.w258WsHM022655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330468 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 330468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:32:55 -0000 Author: eadler Date: Mon Mar 5 08:32:54 2018 New Revision: 330468 URL: https://svnweb.freebsd.org/changeset/base/330468 Log: MFC r313978: [ifconfig] fix a memory leak. Modified: stable/11/sbin/ifconfig/ifieee80211.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/11/sbin/ifconfig/ifieee80211.c Mon Mar 5 08:32:15 2018 (r330467) +++ stable/11/sbin/ifconfig/ifieee80211.c Mon Mar 5 08:32:54 2018 (r330468) @@ -1083,6 +1083,7 @@ set80211chanlist(const char *val, int d, int s, const cp = tp; } set80211(s, IEEE80211_IOC_CHANLIST, 0, sizeof(chanlist), &chanlist); + free(temp); } static void From owner-svn-src-all@freebsd.org Mon Mar 5 08:33:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FF74F3DEE6; Mon, 5 Mar 2018 08:33:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2957A6C1EF; Mon, 5 Mar 2018 08:33:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 246D3218AC; Mon, 5 Mar 2018 08:33:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258XURf022841; Mon, 5 Mar 2018 08:33:30 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258XUg4022840; Mon, 5 Mar 2018 08:33:30 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050833.w258XUg4022840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330469 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 330469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:33:30 -0000 Author: eadler Date: Mon Mar 5 08:33:29 2018 New Revision: 330469 URL: https://svnweb.freebsd.org/changeset/base/330469 Log: MFC r313979: [ifconfig] fix a memory leak! Modified: stable/11/sbin/ifconfig/ifbridge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifbridge.c ============================================================================== --- stable/11/sbin/ifconfig/ifbridge.c Mon Mar 5 08:32:54 2018 (r330468) +++ stable/11/sbin/ifconfig/ifbridge.c Mon Mar 5 08:33:29 2018 (r330469) @@ -207,7 +207,7 @@ bridge_interfaces(int s, const char *prefix) } printf("\n"); } - + free(pad); free(inbuf); } From owner-svn-src-all@freebsd.org Mon Mar 5 08:37:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C06D5F3E2F0; Mon, 5 Mar 2018 08:37:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 714DB6C429; Mon, 5 Mar 2018 08:37:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67F39218AD; Mon, 5 Mar 2018 08:37:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258b9V6023023; Mon, 5 Mar 2018 08:37:09 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258b9O4023021; Mon, 5 Mar 2018 08:37:09 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050837.w258b9O4023021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330470 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 330470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:37:10 -0000 Author: eadler Date: Mon Mar 5 08:37:08 2018 New Revision: 330470 URL: https://svnweb.freebsd.org/changeset/base/330470 Log: MFC r310891: [net80211] add placeholders for the VHT action frame handling. Upcoming vht support will register send/receive action handlers. Modified: stable/11/sys/net80211/ieee80211.h stable/11/sys/net80211/ieee80211_action.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211.h ============================================================================== --- stable/11/sys/net80211/ieee80211.h Mon Mar 5 08:33:29 2018 (r330469) +++ stable/11/sys/net80211/ieee80211.h Mon Mar 5 08:37:08 2018 (r330470) @@ -367,7 +367,7 @@ struct ieee80211_action { #define IEEE80211_ACTION_CAT_MESH 13 /* Mesh */ #define IEEE80211_ACTION_CAT_SELF_PROT 15 /* Self-protected */ /* 16 - 125 reserved */ -#define IEEE80211_ACTION_VHT 21 +#define IEEE80211_ACTION_CAT_VHT 21 #define IEEE80211_ACTION_CAT_VENDOR 127 /* Vendor Specific */ #define IEEE80211_ACTION_HT_TXCHWIDTH 0 /* recommended xmit chan width*/ Modified: stable/11/sys/net80211/ieee80211_action.c ============================================================================== --- stable/11/sys/net80211/ieee80211_action.c Mon Mar 5 08:33:29 2018 (r330469) +++ stable/11/sys/net80211/ieee80211_action.c Mon Mar 5 08:37:08 2018 (r330470) @@ -79,6 +79,10 @@ static ieee80211_send_action_func *vendor_send_action[ send_inval, send_inval, send_inval, send_inval, }; +static ieee80211_send_action_func *vht_send_action[3] = { + send_inval, send_inval, send_inval, +}; + int ieee80211_send_action_register(int cat, int act, ieee80211_send_action_func *f) { @@ -108,6 +112,11 @@ ieee80211_send_action_register(int cat, int act, ieee8 break; vendor_send_action[act] = f; return 0; + case IEEE80211_ACTION_CAT_VHT: + if (act >= nitems(vht_send_action)) + break; + vht_send_action[act] = f; + return 0; } return EINVAL; } @@ -144,6 +153,10 @@ ieee80211_send_action(struct ieee80211_node *ni, int c if (act < nitems(vendor_send_action)) f = vendor_send_action[act]; break; + case IEEE80211_ACTION_CAT_VHT: + if (act < nitems(vht_send_action)) + f = vht_send_action[act]; + break; } return f(ni, cat, act, sa); } @@ -177,6 +190,10 @@ static ieee80211_recv_action_func *vendor_recv_action[ recv_inval, recv_inval, recv_inval, recv_inval, }; +static ieee80211_recv_action_func *vht_recv_action[3] = { + recv_inval, recv_inval, recv_inval +}; + int ieee80211_recv_action_register(int cat, int act, ieee80211_recv_action_func *f) { @@ -206,6 +223,11 @@ ieee80211_recv_action_register(int cat, int act, ieee8 break; vendor_recv_action[act] = f; return 0; + case IEEE80211_ACTION_CAT_VHT: + if (act >= nitems(vht_recv_action)) + break; + vht_recv_action[act] = f; + return 0; } return EINVAL; } @@ -255,6 +277,10 @@ ieee80211_recv_action(struct ieee80211_node *ni, case IEEE80211_ACTION_CAT_VENDOR: if (ia->ia_action < nitems(vendor_recv_action)) f = vendor_recv_action[ia->ia_action]; + break; + case IEEE80211_ACTION_CAT_VHT: + if (ia->ia_action < nitems(vht_recv_action)) + f = vht_recv_action[ia->ia_action]; break; } return f(ni, wh, frm, efrm); From owner-svn-src-all@freebsd.org Mon Mar 5 08:40:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0EADF3E6A7; Mon, 5 Mar 2018 08:40:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 908C46C681; Mon, 5 Mar 2018 08:40:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85AC1218B6; Mon, 5 Mar 2018 08:40:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258eIFG023204; Mon, 5 Mar 2018 08:40:18 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258eIQx023203; Mon, 5 Mar 2018 08:40:18 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050840.w258eIQx023203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:40:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330471 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 330471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:40:19 -0000 Author: eadler Date: Mon Mar 5 08:40:18 2018 New Revision: 330471 URL: https://svnweb.freebsd.org/changeset/base/330471 Log: MFC r311861: [net80211] Add default parameters for 11ac. I doubt TDMA code will ever work for 11ac, but you never know, someone may one day make it happen. Modified: stable/11/sys/net80211/ieee80211_tdma.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_tdma.c ============================================================================== --- stable/11/sys/net80211/ieee80211_tdma.c Mon Mar 5 08:37:08 2018 (r330470) +++ stable/11/sys/net80211/ieee80211_tdma.c Mon Mar 5 08:40:18 2018 (r330471) @@ -176,6 +176,8 @@ ieee80211_tdma_vattach(struct ieee80211vap *vap) settxparms(vap, IEEE80211_MODE_11NG, TDMA_TXRATE_11NG_DEFAULT); settxparms(vap, IEEE80211_MODE_HALF, TDMA_TXRATE_HALF_DEFAULT); settxparms(vap, IEEE80211_MODE_QUARTER, TDMA_TXRATE_QUARTER_DEFAULT); + settxparms(vap, IEEE80211_MODE_VHT_2GHZ, TDMA_TXRATE_11NG_DEFAULT); + settxparms(vap, IEEE80211_MODE_VHT_5GHZ, TDMA_TXRATE_11NA_DEFAULT); setackpolicy(vap->iv_ic, 1); /* disable ACK's */ From owner-svn-src-all@freebsd.org Mon Mar 5 08:42:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDE70F3E853; Mon, 5 Mar 2018 08:42:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 915FA6C8F3; Mon, 5 Mar 2018 08:42:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C4DB21A19; Mon, 5 Mar 2018 08:42:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258g7YZ027826; Mon, 5 Mar 2018 08:42:07 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258g7m9027825; Mon, 5 Mar 2018 08:42:07 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050842.w258g7m9027825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330472 - stable/11/sys/dev/usb/wlan X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/usb/wlan X-SVN-Commit-Revision: 330472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:42:08 -0000 Author: eadler Date: Mon Mar 5 08:42:07 2018 New Revision: 330472 URL: https://svnweb.freebsd.org/changeset/base/330472 Log: MFC r311830: [rsu] add support for the "green" rsu NICs. They're still a 1T2R NIC, so reuse the same rfconfig and nstream configuration. Modified: stable/11/sys/dev/usb/wlan/if_rsu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsu.c Mon Mar 5 08:40:18 2018 (r330471) +++ stable/11/sys/dev/usb/wlan/if_rsu.c Mon Mar 5 08:42:07 2018 (r330472) @@ -492,6 +492,12 @@ rsu_attach(device_t self) sc->sc_ntxstream = 2; rft = "2T2R"; break; + case 0x3: /* "green" NIC */ + sc->sc_rftype = RTL8712_RFCONFIG_1T2R; + sc->sc_nrxstream = 2; + sc->sc_ntxstream = 1; + rft = "1T2R ('green')"; + break; default: device_printf(sc->sc_dev, "%s: unknown board type (rfconfig=0x%02x)\n", From owner-svn-src-all@freebsd.org Mon Mar 5 08:44:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F013F3EC4D; Mon, 5 Mar 2018 08:44:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E3D36CCB8; Mon, 5 Mar 2018 08:44:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 391AB21A3D; Mon, 5 Mar 2018 08:44:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258i9pt027959; Mon, 5 Mar 2018 08:44:09 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258i9qc027958; Mon, 5 Mar 2018 08:44:09 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050844.w258i9qc027958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:44:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330473 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 330473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:44:09 -0000 Author: eadler Date: Mon Mar 5 08:44:08 2018 New Revision: 330473 URL: https://svnweb.freebsd.org/changeset/base/330473 Log: MFC r324423,r324436: Update iso3166 codes Based on https://raw.githubusercontent.com/lukes/ISO-3166-Countries-with-Regional-Codes/master/all/all.csv and hand massaged. Modified: stable/11/share/misc/iso3166 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/iso3166 ============================================================================== --- stable/11/share/misc/iso3166 Mon Mar 5 08:42:07 2018 (r330472) +++ stable/11/share/misc/iso3166 Mon Mar 5 08:44:08 2018 (r330473) @@ -21,7 +21,7 @@ # two three number name AF AFG 004 Afghanistan AL ALB 008 Albania -AX ALA 248 Aland Islands +AX ALA 248 Åland Islands DZ DZA 012 Algeria AS ASM 016 American Samoa AD AND 020 Andorra @@ -59,7 +59,7 @@ BI BDI 108 Burundi KH KHM 116 Cambodia CM CMR 120 Cameroon CA CAN 124 Canada -CV CPV 132 Cape Verde +CV CPV 132 Cabo Verde KY CYM 136 Cayman Islands CF CAF 140 Central African Republic TD TCD 148 Chad @@ -70,20 +70,19 @@ CC CCK 166 Cocos (Keeling) Islands CO COL 170 Colombia KM COM 174 Comoros CG COG 178 Congo -CD COD 180 Congo, the Democratic Republic of the +CD COD 180 Congo, Democratic Republic of the CK COK 184 Cook Islands CR CRI 188 Costa Rica -CI CIV 384 Cote d'Ivoire +CI CIV 384 Côte d'Ivoire HR HRV 191 Croatia CU CUB 192 Cuba -CW CUW 531 Curacao +CW CUW 531 Curaçao CY CYP 196 Cyprus CZ CZE 203 Czech Republic DK DNK 208 Denmark DJ DJI 262 Djibouti DM DMA 212 Dominica DO DOM 214 Dominican Republic -TL TLS 626 Timor-Leste EC ECU 218 Ecuador EG EGY 818 Egypt SV SLV 222 El Salvador @@ -117,13 +116,14 @@ GW GNB 624 Guinea-Bissau GY GUY 328 Guyana HT HTI 332 Haiti HM HMD 334 Heard Island and McDonald Islands +VA VAT 336 Holy See HN HND 340 Honduras HK HKG 344 Hong Kong HU HUN 348 Hungary IS ISL 352 Iceland IN IND 356 India ID IDN 360 Indonesia -IR IRN 364 Iran, Islamic Republic of +IR IRN 364 Iran (Islamic Republic of) IQ IRQ 368 Iraq IE IRL 372 Ireland IM IMN 833 Isle of Man @@ -136,8 +136,8 @@ JO JOR 400 Jordan KZ KAZ 398 Kazakhstan KE KEN 404 Kenya KI KIR 296 Kiribati -KP PRK 408 Korea, Democratic People's Republic of -KR KOR 410 Korea, Republic of +KP PRK 408 Korea (Democratic People's Republic of) +KR KOR 410 Korea (Republic of) KW KWT 414 Kuwait KG KGZ 417 Kyrgyzstan LA LAO 418 Lao People's Democratic Republic @@ -145,12 +145,12 @@ LV LVA 428 Latvia LB LBN 422 Lebanon LS LSO 426 Lesotho LR LBR 430 Liberia -LY LBY 434 Libyan Arab Jamahiriya +LY LBY 434 Libya LI LIE 438 Liechtenstein LT LTU 440 Lithuania LU LUX 442 Luxembourg MO MAC 446 Macao -MK MKD 807 Macedonia, the Former Yugoslav Republic of +MK MKD 807 Macedonia (the former Yugoslav Republic of) MG MDG 450 Madagascar MW MWI 454 Malawi MY MYS 458 Malaysia @@ -163,8 +163,8 @@ MR MRT 478 Mauritania MU MUS 480 Mauritius YT MYT 175 Mayotte MX MEX 484 Mexico -FM FSM 583 Micronesia, Federated States of -MD MDA 498 Moldova, Republic of +FM FSM 583 Micronesia (Federated States of) +MD MDA 498 Moldova (Republic of) MC MCO 492 Monaco MN MNG 496 Mongolia ME MNE 499 Montenegro @@ -188,7 +188,7 @@ NO NOR 578 Norway OM OMN 512 Oman PK PAK 586 Pakistan PW PLW 585 Palau -PS PSE 275 Palestinian Territory, Occupied +PS PSE 275 Palestine, State of PA PAN 591 Panama PG PNG 598 Papua New Guinea PY PRY 600 Paraguay @@ -199,14 +199,16 @@ PL POL 616 Poland PT PRT 620 Portugal PR PRI 630 Puerto Rico QA QAT 634 Qatar -RE REU 638 Reunion +RE REU 638 Réunion RO ROU 642 Romania RU RUS 643 Russian Federation RW RWA 646 Rwanda -BL BLM 652 Saint Barthelemy +BL BLM 652 Saint Barthélemy +SH SHN 654 Saint Helena Ascension and Tristan da Cunha KN KNA 659 Saint Kitts and Nevis LC LCA 662 Saint Lucia -MF MAF 663 Saint Martin (French Part) +MF MAF 663 Saint Martin (French part) +PM SPM 666 Saint Pierre and Miquelon VC VCT 670 Saint Vincent and the Grenadines WS WSM 882 Samoa SM SMR 674 San Marino @@ -227,8 +229,6 @@ GS SGS 239 South Georgia and the South Sandwich Island SS SSD 728 South Sudan ES ESP 724 Spain LK LKA 144 Sri Lanka -SH SHN 654 Saint Helena, Ascension and Tristan da Cunha -PM SPM 666 Saint Pierre and Miquelon SD SDN 729 Sudan SR SUR 740 Suriname SJ SJM 744 Svalbard and Jan Mayen @@ -238,8 +238,9 @@ CH CHE 756 Switzerland SY SYR 760 Syrian Arab Republic TW TWN 158 Taiwan TJ TJK 762 Tajikistan -TZ TZA 834 Tanzania, United Republic of +TZ TZA 834 Tanzania United Republic of TH THA 764 Thailand +TL TLS 626 Timor-Leste TG TGO 768 Togo TK TKL 772 Tokelau TO TON 776 Tonga @@ -252,17 +253,16 @@ TV TUV 798 Tuvalu UG UGA 800 Uganda UA UKR 804 Ukraine AE ARE 784 United Arab Emirates -GB GBR 826 United Kingdom -US USA 840 United States +GB GBR 826 United Kingdom of Great Britain and Northern Ireland +US USA 840 United States of America UM UMI 581 United States Minor Outlying Islands UY URY 858 Uruguay UZ UZB 860 Uzbekistan VU VUT 548 Vanuatu -VA VAT 336 Holy See (Vatican City State) VE VEN 862 Venezuela, Bolivarian Republic of VN VNM 704 Viet Nam -VG VGB 092 Virgin Islands, British -VI VIR 850 Virgin Islands, U.S. +VG VGB 092 Virgin Islands (British) +VI VIR 850 Virgin Islands (U.S.) WF WLF 876 Wallis and Futuna EH ESH 732 Western Sahara YE YEM 887 Yemen From owner-svn-src-all@freebsd.org Mon Mar 5 08:44:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5CD5F3ECDC; Mon, 5 Mar 2018 08:44:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74D916CDF2; Mon, 5 Mar 2018 08:44:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FED621A3E; Mon, 5 Mar 2018 08:44:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258inan028026; Mon, 5 Mar 2018 08:44:49 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258ina1028025; Mon, 5 Mar 2018 08:44:49 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050844.w258ina1028025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330474 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 330474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:44:50 -0000 Author: eadler Date: Mon Mar 5 08:44:49 2018 New Revision: 330474 URL: https://svnweb.freebsd.org/changeset/base/330474 Log: MFC r306435: callsign isn't required anymore Modified: stable/11/.arcconfig Directory Properties: stable/11/ (props changed) Modified: stable/11/.arcconfig ============================================================================== --- stable/11/.arcconfig Mon Mar 5 08:44:08 2018 (r330473) +++ stable/11/.arcconfig Mon Mar 5 08:44:49 2018 (r330474) @@ -1,5 +1,4 @@ { - "repository.callsign" : "S", "phabricator.uri" : "https://reviews.freebsd.org/", "history.immutable" : true } From owner-svn-src-all@freebsd.org Mon Mar 5 08:45:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F16FEF3EDCE; Mon, 5 Mar 2018 08:45:39 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A45416CF38; Mon, 5 Mar 2018 08:45:39 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F17221A3F; Mon, 5 Mar 2018 08:45:39 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258jdUV028114; Mon, 5 Mar 2018 08:45:39 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258jdwX028113; Mon, 5 Mar 2018 08:45:39 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050845.w258jdwX028113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330475 - stable/11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 330475 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:45:40 -0000 Author: eadler Date: Mon Mar 5 08:45:39 2018 New Revision: 330475 URL: https://svnweb.freebsd.org/changeset/base/330475 Log: MFC r306449: Remove an extra etter. Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Mon Mar 5 08:44:49 2018 (r330474) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Mon Mar 5 08:45:39 2018 (r330475) @@ -421,7 +421,7 @@ static ipftuneable_t ipf_main_tuneables[] = { /* - * The next section of code is a a collection of small routines that set + * The next section of code is a collection of small routines that set * fields in the fr_info_t structure passed based on properties of the * current packet. There are different routines for the same protocol * for each of IPv4 and IPv6. Adding a new protocol, for which there From owner-svn-src-all@freebsd.org Mon Mar 5 08:47:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F9FEF3F006; Mon, 5 Mar 2018 08:47:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2D5C6D107; Mon, 5 Mar 2018 08:47:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E94CA21A40; Mon, 5 Mar 2018 08:47:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258lRP6028221; Mon, 5 Mar 2018 08:47:27 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258lRL3028220; Mon, 5 Mar 2018 08:47:27 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050847.w258lRL3028220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330476 - stable/11/etc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/etc X-SVN-Commit-Revision: 330476 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:47:28 -0000 Author: eadler Date: Mon Mar 5 08:47:27 2018 New Revision: 330476 URL: https://svnweb.freebsd.org/changeset/base/330476 Log: MFC r326456: pf.os: Add OpenBSD:6.1 Obtained From: OpenBSD Modified: stable/11/etc/pf.os Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/pf.os ============================================================================== --- stable/11/etc/pf.os Mon Mar 5 08:45:39 2018 (r330475) +++ stable/11/etc/pf.os Mon Mar 5 08:47:27 2018 (r330476) @@ -1,5 +1,5 @@ # $FreeBSD$ -# $OpenBSD: pf.os,v 1.26 2012/08/03 12:25:16 jsg Exp $ +# $OpenBSD: pf.os,v 1.27 2016/09/03 17:08:57 sthen Exp $ # passive OS fingerprinting # ------------------------- # @@ -314,6 +314,9 @@ S22:64:1:52:M*,N,N,S,N,W0: Linux:2.2:ts:Linux 2.2 w/o 16384:64:1:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9::OpenBSD 4.9 16384:64:0:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9:no-df:OpenBSD 4.9 (scrub no-df) + +16384:64:1:64:M*,N,N,S,N,W6,N,N,T: OpenBSD:6.1::OpenBSD 6.1 +16384:64:0:64:M*,N,N,S,N,W6,N,N,T: OpenBSD:6.1:no-df:OpenBSD 6.1 (scrub no-df) # ----------------- DragonFly BSD ----------------- From owner-svn-src-all@freebsd.org Mon Mar 5 08:49:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA609F3F278; Mon, 5 Mar 2018 08:49:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69B3F6D28C; Mon, 5 Mar 2018 08:49:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64C0121A42; Mon, 5 Mar 2018 08:49:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258nCph028327; Mon, 5 Mar 2018 08:49:12 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258nC7e028326; Mon, 5 Mar 2018 08:49:12 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050849.w258nC7e028326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:49:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330477 - stable/11/usr.bin/fmt X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/fmt X-SVN-Commit-Revision: 330477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:49:12 -0000 Author: eadler Date: Mon Mar 5 08:49:11 2018 New Revision: 330477 URL: https://svnweb.freebsd.org/changeset/base/330477 Log: MFC r326434: fmt(1): Fix usage of Nm macro Modified: stable/11/usr.bin/fmt/fmt.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/fmt/fmt.1 ============================================================================== --- stable/11/usr.bin/fmt/fmt.1 Mon Mar 5 08:47:27 2018 (r330476) +++ stable/11/usr.bin/fmt/fmt.1 Mon Mar 5 08:49:11 2018 (r330477) @@ -30,14 +30,14 @@ .\" .\" Modified by Gareth McCaughan to describe the new version of `fmt' .\" rather than the old one. -.Dd August 2, 2004 +.Dd December 1, 2017 .Dt FMT 1 .Os .Sh NAME .Nm fmt .Nd simple text formatter .Sh SYNOPSIS -.Nm fmt +.Nm .Op Fl cmnps .Op Fl d Ar chars .Op Fl l Ar num From owner-svn-src-all@freebsd.org Mon Mar 5 08:50:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC0A1F3F3E6; Mon, 5 Mar 2018 08:50:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 979626D3E5; Mon, 5 Mar 2018 08:50:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9114B21A46; Mon, 5 Mar 2018 08:50:16 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258oGYj028438; Mon, 5 Mar 2018 08:50:16 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258oGG3028437; Mon, 5 Mar 2018 08:50:16 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050850.w258oGG3028437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330478 - stable/11/targets/pseudo/userland X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/targets/pseudo/userland X-SVN-Commit-Revision: 330478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:50:17 -0000 Author: eadler Date: Mon Mar 5 08:50:16 2018 New Revision: 330478 URL: https://svnweb.freebsd.org/changeset/base/330478 Log: MFC r325353: chase removal of csup in r267863 from 2014.. Modified: stable/11/targets/pseudo/userland/Makefile.depend Directory Properties: stable/11/ (props changed) Modified: stable/11/targets/pseudo/userland/Makefile.depend ============================================================================== --- stable/11/targets/pseudo/userland/Makefile.depend Mon Mar 5 08:49:11 2018 (r330477) +++ stable/11/targets/pseudo/userland/Makefile.depend Mon Mar 5 08:50:16 2018 (r330478) @@ -204,7 +204,6 @@ DIRDEPS+= \ usr.bin/cpio \ usr.bin/cpuset \ usr.bin/csplit \ - usr.bin/csup \ usr.bin/ctags \ usr.bin/ctlstat \ usr.bin/cut \ From owner-svn-src-all@freebsd.org Mon Mar 5 08:50:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A461CF3F4AB; Mon, 5 Mar 2018 08:50:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 511036D635; Mon, 5 Mar 2018 08:50:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C09521A57; Mon, 5 Mar 2018 08:50:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258othG028501; Mon, 5 Mar 2018 08:50:55 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258otJD028500; Mon, 5 Mar 2018 08:50:55 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050850.w258otJD028500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330479 - stable/11/share/man/man7 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/man/man7 X-SVN-Commit-Revision: 330479 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:50:55 -0000 Author: eadler Date: Mon Mar 5 08:50:54 2018 New Revision: 330479 URL: https://svnweb.freebsd.org/changeset/base/330479 Log: MFC r325217: Fix '\' in binary ascii table Modified: stable/11/share/man/man7/ascii.7 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man7/ascii.7 ============================================================================== --- stable/11/share/man/man7/ascii.7 Mon Mar 5 08:50:16 2018 (r330478) +++ stable/11/share/man/man7/ascii.7 Mon Mar 5 08:50:54 2018 (r330479) @@ -28,7 +28,7 @@ .\" @(#)ascii.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd March 10, 2017 +.Dd October 30, 2017 .Dt ASCII 7 .Os .Sh NAME @@ -137,7 +137,7 @@ CAN 8 X x 11000 EM 9 Y y 11001 SUB : Z z 11010 ESC ; [ { 11011 - FS < \ | 11100 + FS < \e\ | 11100 GS = ] } 11101 RS > ^ - 11110 US ? _ DEL 11111 From owner-svn-src-all@freebsd.org Mon Mar 5 08:56:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD054F3FB9C; Mon, 5 Mar 2018 08:56:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EDD86DA0C; Mon, 5 Mar 2018 08:56:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74E4521BCD; Mon, 5 Mar 2018 08:56:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258uFbL033404; Mon, 5 Mar 2018 08:56:15 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258uFVN033403; Mon, 5 Mar 2018 08:56:15 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050856.w258uFVN033403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330480 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 330480 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:56:16 -0000 Author: eadler Date: Mon Mar 5 08:56:15 2018 New Revision: 330480 URL: https://svnweb.freebsd.org/changeset/base/330480 Log: MFC r314705,r315406,r315407,r316025,r316082,r316731: Add macOS 10.12 NetBSD 7.1 release added. Indentation for the DragonFlyBSD trunk fixed, EoL whitespace removed. macOS 10.12 release date added. DragonFly BSD 4.8.0 release added. OpenBSD 6.1 release added. Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Mon Mar 5 08:50:54 2018 (r330479) +++ stable/11/share/misc/bsd-family-tree Mon Mar 5 08:56:15 2018 (r330480) @@ -176,7 +176,7 @@ FreeBSD 4.0 | | | | | NetBSD 1.4.2 | | | | | \ FreeBSD 5.0 | | | | | | | | | -FreeBSD 5.1 | | | DragonFly 1.0 +FreeBSD 5.1 | | | DragonFly 1.0 | \ | | | | | ----- Mac OS X | | | | 10.3 | | | @@ -187,7 +187,7 @@ FreeBSD 5.2 | | | *-------FreeBSD 5.3 | | | | | | | | OpenBSD 3.6 | | | | NetBSD 2.0 | | - | | | | | | | DragonFly 1.2.0 + | | | | | | | DragonFly 1.2.0 | | Mac OS X | | NetBSD 2.0.2 | | | | 10.4 | | | | | | FreeBSD 5.4 | | | | | | @@ -200,50 +200,50 @@ FreeBSD 5.2 | | | | | | | | NetBSD 2.1 | | | | | | | | | | | | | NetBSD 3.0 | | - | | | | | | | | DragonFly 1.4.0 + | | | | | | | | DragonFly 1.4.0 | | | | | | | OpenBSD 3.9 | | FreeBSD | | | | | | | | 6.1 | | | | | | | | | FreeBSD 5.5 | | | | | | - | | | | | NetBSD 3.0.1 | DragonFly 1.6.0 + | | | | | NetBSD 3.0.1 | DragonFly 1.6.0 | | | | | | | | | | | | | | OpenBSD 4.0 | | | | | | NetBSD 3.0.2 | | | | | | NetBSD 3.1 | | | FreeBSD 6.2 | | | | - | | | | | DragonFly 1.8.0 + | | | | | DragonFly 1.8.0 | | | | OpenBSD 4.1 | - | | | | | DragonFly 1.10.0 + | | | | | DragonFly 1.10.0 | | Mac OS X | | | | | 10.5 | | | | | | | OpenBSD 4.2 | | | | NetBSD 4.0 | | | FreeBSD 6.3 | | | | | | \ | | | | | - *--FreeBSD | | | | | DragonFly 1.12.0 + *--FreeBSD | | | | | DragonFly 1.12.0 | 7.0 | | | | | | | | | | | | OpenBSD 4.3 | - | | | | | NetBSD | DragonFly 2.0.0 + | | | | | NetBSD | DragonFly 2.0.0 | | FreeBSD | | 4.0.1 OpenBSD 4.4 | | | 6.4 | | | | | | | | | | | FreeBSD 7.1 | | | | - | | | | | DragonFly 2.2.0 + | | | | | DragonFly 2.2.0 | FreeBSD 7.2 | NetBSD 5.0 OpenBSD 4.5 | | \ | | | \ | | | | Mac OS X | | \ | | | | 10.6 | | \ | | - | | | | | NetBSD | DragonFly 2.4.0 + | | | | | NetBSD | DragonFly 2.4.0 | | | | | 5.0.1 OpenBSD 4.6 | | | | | | | | | *--FreeBSD | | | | | | | | 8.0 | | | | | | | | | FreeBSD | | | NetBSD | | - | | 7.3 | | | 5.0.2 | DragonFly 2.6.0 + | | 7.3 | | | 5.0.2 | DragonFly 2.6.0 | | | | | | OpenBSD 4.7 | | FreeBSD | | | | | | | 8.1 | | | | | | - | | | | | | | DragonFly 2.8.2 + | | | | | | | DragonFly 2.8.2 | | | | | | OpenBSD 4.8 | | | | | | *--NetBSD | | | FreeBSD FreeBSD | | | 5.1 | | @@ -281,7 +281,7 @@ FreeBSD 5.2 | | | | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 | | | | | | NetBSD | | | | | | | | 6.0.2 | | - | | | | | | | | | + | | | | | | | | | | | | | | | NetBSD | | | | | | | | 6.0.3 | | | | | | | | | | | @@ -346,12 +346,16 @@ FreeBSD 5.2 | | | | 10.3 | | | | | | NetBSD 7.0.1 | | | | | | DragonFly 4.6.0 - *--FreeBSD | | OpenBSD 6.0 | - | 11.0 | | | | | | | | | | | | | | -FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current + *--FreeBSD macOS | OpenBSD 6.0 | + | 11.0 10.12 | | | + | | NetBSD 7.1 | | + | | | | DragonFly 4.8.0 + | | | OpenBSD 6.1 | | | | | | +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current + | | | | | v v v v v Time @@ -703,7 +707,11 @@ FreeBSD 10.3 2016-04-04 [FBD] NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] +macOS 10.12 2016-09-20 [APL] FreeBSD 11.0 2016-10-10 [FBD] +NetBSD 7.1 2017-03-11 [NBD] +DragonFly 4.8.0 2017-03-27 [DFB] +OpenBSD 6.1 2017-04-11 [OBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Mon Mar 5 08:57:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01E49F3FD08; Mon, 5 Mar 2018 08:57:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A691F6DBB0; Mon, 5 Mar 2018 08:57:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A180A21BCE; Mon, 5 Mar 2018 08:57:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w258veUh033495; Mon, 5 Mar 2018 08:57:40 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w258vexZ033494; Mon, 5 Mar 2018 08:57:40 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050857.w258vexZ033494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 08:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330481 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 330481 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 08:57:41 -0000 Author: eadler Date: Mon Mar 5 08:57:40 2018 New Revision: 330481 URL: https://svnweb.freebsd.org/changeset/base/330481 Log: MFC r322668,r324239,r324240,r324422,r324476,r324688: FreeBSD 11.1 release added. ------------------------------------------------------------------------ r324239 | maxim | 2017-10-03 13:31:22 +0000 (Tue, 03 Oct 2017) | 2 lines FreeBSD 10.4 release added. ------------------------------------------------------------------------ r324240 | maxim | 2017-10-03 14:23:49 +0000 (Tue, 03 Oct 2017) | 5 lines o FreeBSD 10.4 happened after 11.1, adjust the branches accordingly. o The current FreeBSD branch is 12 not 13. Suggested by: lidl ------------------------------------------------------------------------ r324422 | eadler | 2017-10-09 04:43:05 +0000 (Mon, 09 Oct 2017) | 2 lines Add macOS 10.13 ------------------------------------------------------------------------ r324476 | eadler | 2017-10-10 05:47:10 +0000 (Tue, 10 Oct 2017) | 2 lines Add OpenBSD 6.2, reorder macOS 10.13 ------------------------------------------------------------------------ r324688 | maxim | 2017-10-17 14:37:12 +0000 (Tue, 17 Oct 2017) | 2 lines DragonFly 5.0.0 release added. Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Mon Mar 5 08:56:15 2018 (r330480) +++ stable/11/share/misc/bsd-family-tree Mon Mar 5 08:57:40 2018 (r330481) @@ -339,21 +339,25 @@ FreeBSD 5.2 | | | | | | | | DragonFly 4.2.0 | FreeBSD | | | | | 10.2 | | | | - | | OS X NetBSD 7.0 | | + | | macOS NetBSD 7.0 | | | | 10.11 | OpenBSD 5.8 | | | | | | DragonFly 4.4.1 | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | - | | NetBSD 7.0.1 | | - | | | | DragonFly 4.6.0 + | | | NetBSD 7.0.1 | | + | `------. | | | DragonFly 4.6.0 + | | | | | | + | | | | | | + *--FreeBSD | macOS | OpenBSD 6.0 | + | 11.0 | 10.12 | | | + | | | | NetBSD 7.1 | | + | | | macOS | | DragonFly 4.8.0 + | | | 10.13 | OpenBSD 6.1 | + | FreeBSD | | | | | + | 11.1 FreeBSD | | | | + | | 10.4 | | OpenBSD 6.2 | + | v | | | DragonFly 5.0.0 | | | | | - | | | | | - *--FreeBSD macOS | OpenBSD 6.0 | - | 11.0 10.12 | | | - | | NetBSD 7.1 | | - | | | | DragonFly 4.8.0 - | | | OpenBSD 6.1 | - | | | | | FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -712,6 +716,11 @@ FreeBSD 11.0 2016-10-10 [FBD] NetBSD 7.1 2017-03-11 [NBD] DragonFly 4.8.0 2017-03-27 [DFB] OpenBSD 6.1 2017-04-11 [OBD] +FreeBSD 11.1 2017-07-26 [FBD] +macOS 10.13 2017-09-25 [APL] +FreeBSD 10.4 2017-10-03 [FBD] +OpenBSD 6.2 2017-10-09 [OBD] +DragonFly 5.0.0 2017-10-16 [DFB] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Mon Mar 5 09:01:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 758CAF403A4; Mon, 5 Mar 2018 09:01:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27B746DFA7; Mon, 5 Mar 2018 09:01:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 229B921D4B; Mon, 5 Mar 2018 09:01:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2591p3Z037276; Mon, 5 Mar 2018 09:01:51 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2591p7v037275; Mon, 5 Mar 2018 09:01:51 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050901.w2591p7v037275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 09:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330482 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 330482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 09:01:52 -0000 Author: eadler Date: Mon Mar 5 09:01:51 2018 New Revision: 330482 URL: https://svnweb.freebsd.org/changeset/base/330482 Log: MFC r326724,r326868,r326869,r327096,r327333,r327334,r327342,r327361,r327510: Add two dates derived from looking at archival source tarballs in the TUHS collection for 7th Edition and V32. ------------------------------------------------------------------------ r326868 | eadler | 2017-12-15 03:36:48 +0000 (Fri, 15 Dec 2017) | 4 lines bsd-family-tree: Add NetBSD 7.0.2 Pulled directly from NetBSD ------------------------------------------------------------------------ r326869 | eadler | 2017-12-15 03:46:52 +0000 (Fri, 15 Dec 2017) | 2 lines bsd-family-tree: add dfly 5.0.[12] ------------------------------------------------------------------------ r327096 | sevan | 2017-12-22 21:54:39 +0000 (Fri, 22 Dec 2017) | 5 lines Drop the NetBSD rcs tag introduced in r326868. Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D13511 ------------------------------------------------------------------------ r327333 | eadler | 2017-12-29 04:49:59 +0000 (Fri, 29 Dec 2017) | 7 lines bsd-family-tree: add HardenedBSD This adds HardenedBSD which is a pseudo-fork of FreeBSD. It hasn't had a release yet, but does does have active users and a community. As such document it as a branch off of FreeBSD-stable. Ideally this adds enough space so that future releases are easy enough to add. ------------------------------------------------------------------------ r327334 | eadler | 2017-12-29 05:01:07 +0000 (Fri, 29 Dec 2017) | 5 lines bsd-family-tree: add NetBSD 6.0.6 This was a missing release. Released on the same day as 6.1.5 per https://blog.netbsd.org/tnf/entry/netbsd_6_1_5_and ------------------------------------------------------------------------ r327342 | eadler | 2017-12-29 14:31:43 +0000 (Fri, 29 Dec 2017) | 5 lines bsd-family-tree: add NetBSD 7.1.1; correct NetBSD abbrev Reported by: Herbert J. Skuhra Reported by: N.J. Mann ------------------------------------------------------------------------ r327361 | maxim | 2017-12-29 21:37:36 +0000 (Fri, 29 Dec 2017) | 2 lines Sort by time. ------------------------------------------------------------------------ r327510 | eadler | 2018-01-03 03:46:28 +0000 (Wed, 03 Jan 2018) | 7 lines bsd-family-tree: revert r327333 bsd-family-tree should only contain projects that have had actual releases. Requested by: core Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Mon Mar 5 08:57:40 2018 (r330481) +++ stable/11/share/misc/bsd-family-tree Mon Mar 5 09:01:51 2018 (r330482) @@ -290,6 +290,9 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | | | NetBSD | | | | | | | | 6.0.5 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 6.0.6 | | | | | | | | | | | | | | | |`-NetBSD 6.1 | | | | FreeBSD | | | | | @@ -339,28 +342,35 @@ FreeBSD 5.2 | | | | | | | | DragonFly 4.2.0 | FreeBSD | | | | | 10.2 | | | | - | | macOS NetBSD 7.0 | | - | | 10.11 | OpenBSD 5.8 | - | | | | | DragonFly 4.4.1 - | FreeBSD | | OpenBSD 5.9 | - | 10.3 | | | | - | | | NetBSD 7.0.1 | | - | `------. | | | DragonFly 4.6.0 - | | | | | | - | | | | | | - *--FreeBSD | macOS | OpenBSD 6.0 | - | 11.0 | 10.12 | | | - | | | | NetBSD 7.1 | | - | | | macOS | | DragonFly 4.8.0 - | | | 10.13 | OpenBSD 6.1 | - | FreeBSD | | | | | - | 11.1 FreeBSD | | | | - | | 10.4 | | OpenBSD 6.2 | - | v | | | DragonFly 5.0.0 - | | | | | -FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current - | | | | | - v v v v v + | | macOS NetBSD 7.0 | | + | | 10.11 | | | OpenBSD 5.8 | + | | | | | `--. | DragonFly 4.4.1 + | FreeBSD | | | | OpenBSD 5.9 | + | 10.3 | | | | | | + | | | | | NetBSD 7.0.1 | | + | `------. | | | | | DragonFly 4.6.0 + | | | | | | | | + | | | | | | | | + *--FreeBSD | macOS | | | OpenBSD 6.0 | + | 11.0 | 10.12 | | NetBSD 7.0.2 | | + | | | | | | | | + | | | | | *- NetBSD 7.1 | | + | | | | | | | | + | | | | | | | | + | | | macOS | | | DragonFly 4.8.0 + | | | 10.13 | | OpenBSD 6.1 | + | FreeBSD | | | | | DragonFly 5.0.0 + | 11.1 FreeBSD | | | | | + | | 10.4 | | | OpenBSD 6.2 DragonFly 5.0.1 + | | | | | | | + | | | | NetBSD 7.1.1 | DragonFly 5.0.2 + | | | | | | | + | | | | v | | + | v | | | | + | | | | | +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current + | | | | | + v v v v v Time ---------------- @@ -408,7 +418,7 @@ Fifth Edition 1974-06-xx [QCU] above 50 installations Sixth Edition 1975-05-xx [QCU] port to DEC Vax -Seventh Edition 1979-01-xx [QCU] +Seventh Edition 1979-01-xx [QCU] 1979-01-10 [TUHS] first portable UNIX Eighth Edition 1985-02-xx [QCU] VAX 11/750, VAX 11/780 [dmr] @@ -440,7 +450,7 @@ Tenth Edition 1989-10-xx [QCU] 2.11BSD 1992-02-xx [SMS] 2.11BSD rev #430 1999-12-13 [SMS] -32V 1978-1[01]-xx [QCU] +32V 1978-1[01]-xx [QCU] 1979-03-26 [TUHS] 3BSD late 1979 [QCU] March 1980 [TUHS] virtual memory, page replacement, demand paging @@ -682,14 +692,15 @@ NetBSD 6.0.4 2014-01-25 [NBD] NetBSD 6.1.3 2014-01-25 [NBD] DragonFly 3.6.1 2014-02-22 [DFB] DragonFly 3.6.2 2014-04-10 [DFB] -NetBSD 6.0.5 2014-04-12 [NDB] -NetBSD 6.1.4 2014-04-12 [NDB] +NetBSD 6.0.5 2014-04-12 [NBD] +NetBSD 6.1.4 2014-04-12 [NBD] OpenBSD 5.5 2014-05-01 [OBD] DragonFly 3.8.0 2014-06-04 [DFB] DragonFly 3.8.1 2014-06-16 [DFB] DragonFly 3.6.3 2014-06-17 [DFB] FreeBSD 9.3 2014-07-05 [FBD] DragonFly 3.8.2 2014-08-08 [DFB] +NetBSD 6.0.6 2014-09-22 [NBD] NetBSD 6.1.5 2014-09-22 [NBD] Mac OS X 10.10 2014-10-16 [APL] OpenBSD 5.6 2014-11-01 [OBD] @@ -713,6 +724,7 @@ DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] macOS 10.12 2016-09-20 [APL] FreeBSD 11.0 2016-10-10 [FBD] +NetBSD 7.0.2 2016-10-21 [NBD] NetBSD 7.1 2017-03-11 [NBD] DragonFly 4.8.0 2017-03-27 [DFB] OpenBSD 6.1 2017-04-11 [OBD] @@ -721,6 +733,9 @@ macOS 10.13 2017-09-25 [APL] FreeBSD 10.4 2017-10-03 [FBD] OpenBSD 6.2 2017-10-09 [OBD] DragonFly 5.0.0 2017-10-16 [DFB] +DragonFly 5.0.1 2017-11-06 [DFB] +DragonFly 5.0.2 2017-12-04 [DFB] +NetBSD 7.1.1 2017-12-22 [NBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Mon Mar 5 09:05:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD89EF407EC; Mon, 5 Mar 2018 09:05:37 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 808B46E3B9; Mon, 5 Mar 2018 09:05:37 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B0F121D70; Mon, 5 Mar 2018 09:05:37 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2595bca038445; Mon, 5 Mar 2018 09:05:37 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2595bMC038444; Mon, 5 Mar 2018 09:05:37 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050905.w2595bMC038444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 09:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330483 - in stable/11/tools/diag: . httpd-error X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/tools/diag: . httpd-error X-SVN-Commit-Revision: 330483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 09:05:38 -0000 Author: eadler Date: Mon Mar 5 09:05:37 2018 New Revision: 330483 URL: https://svnweb.freebsd.org/changeset/base/330483 Log: MFC r326473: diag/httpd-error: remove This is a script for a web server in a specific configuration. Current web servers don't produce similar log files and it isn't FreeBSD's goal to produce a log file analyzer. Deleted: stable/11/tools/diag/httpd-error/ Modified: stable/11/tools/diag/README Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/diag/README ============================================================================== --- stable/11/tools/diag/README Mon Mar 5 09:01:51 2018 (r330482) +++ stable/11/tools/diag/README Mon Mar 5 09:05:37 2018 (r330483) @@ -10,6 +10,5 @@ Please make a subdir per program, and add a brief desc dumpvfscache program that can be used to examine the contents of the vfs name cache. -httpd-error check for Web files which does not exists on your host localeck check for invalid/incomplete locales From owner-svn-src-all@freebsd.org Mon Mar 5 09:06:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7788FF408B0; Mon, 5 Mar 2018 09:06:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DA166E4DA; Mon, 5 Mar 2018 09:06:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1893021D71; Mon, 5 Mar 2018 09:06:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2596Eem038514; Mon, 5 Mar 2018 09:06:14 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2596E3h038513; Mon, 5 Mar 2018 09:06:14 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050906.w2596E3h038513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 09:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330484 - stable/11/usr.bin/calendar X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/calendar X-SVN-Commit-Revision: 330484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 09:06:15 -0000 Author: eadler Date: Mon Mar 5 09:06:14 2018 New Revision: 330484 URL: https://svnweb.freebsd.org/changeset/base/330484 Log: MFC r327117: calendar: add missing header file time.h is required for strftime and struct tm Modified: stable/11/usr.bin/calendar/io.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/calendar/io.c ============================================================================== --- stable/11/usr.bin/calendar/io.c Mon Mar 5 09:05:37 2018 (r330483) +++ stable/11/usr.bin/calendar/io.c Mon Mar 5 09:06:14 2018 (r330484) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "pathnames.h" From owner-svn-src-all@freebsd.org Mon Mar 5 09:17:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35209F4165D; Mon, 5 Mar 2018 09:17:19 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D4D96ED2B; Mon, 5 Mar 2018 09:17:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93E9021EFE; Mon, 5 Mar 2018 09:17:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w259HIa7043987; Mon, 5 Mar 2018 09:17:18 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w259HIgN043986; Mon, 5 Mar 2018 09:17:18 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050917.w259HIgN043986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 09:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330485 - stable/11/lib/libc/include X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/lib/libc/include X-SVN-Commit-Revision: 330485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 09:17:19 -0000 Author: eadler Date: Mon Mar 5 09:17:18 2018 New Revision: 330485 URL: https://svnweb.freebsd.org/changeset/base/330485 Log: MFC r326479: Add include guard to fpmath.h Modified: stable/11/lib/libc/include/fpmath.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/include/fpmath.h ============================================================================== --- stable/11/lib/libc/include/fpmath.h Mon Mar 5 09:06:14 2018 (r330484) +++ stable/11/lib/libc/include/fpmath.h Mon Mar 5 09:17:18 2018 (r330485) @@ -27,6 +27,9 @@ * $FreeBSD$ */ +#ifndef _FPMATH_H_ +#define _FPMATH_H_ + #include #include "_fpmath.h" @@ -73,3 +76,5 @@ union IEEEd2bits { #endif } bits; }; + +#endif /* !_FPMATH_H */ From owner-svn-src-all@freebsd.org Mon Mar 5 09:17:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70F6DF4176A; Mon, 5 Mar 2018 09:17:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 206706EE85; Mon, 5 Mar 2018 09:17:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B53B21EFF; Mon, 5 Mar 2018 09:17:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w259HtXN044050; Mon, 5 Mar 2018 09:17:55 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w259Htp9044049; Mon, 5 Mar 2018 09:17:55 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050917.w259Htp9044049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 09:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330486 - stable/11/share/man/man3 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/man/man3 X-SVN-Commit-Revision: 330486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 09:17:56 -0000 Author: eadler Date: Mon Mar 5 09:17:55 2018 New Revision: 330486 URL: https://svnweb.freebsd.org/changeset/base/330486 Log: MFC r326386: Fix pthread_condattr(3) type Modified: stable/11/share/man/man3/pthread_condattr.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man3/pthread_condattr.3 ============================================================================== --- stable/11/share/man/man3/pthread_condattr.3 Mon Mar 5 09:17:18 2018 (r330485) +++ stable/11/share/man/man3/pthread_condattr.3 Mon Mar 5 09:17:55 2018 (r330486) @@ -46,9 +46,9 @@ .Ft int .Fn pthread_condattr_destroy "pthread_condattr_t *attr" .Ft int -.Fn pthread_condattr_getclock "pthread_condattr_t * restrict attr" "clock_t * restrict clock_id" +.Fn pthread_condattr_getclock "pthread_condattr_t * restrict attr" "clockid_t * restrict clock_id" .Ft int -.Fn pthread_condattr_setclock "pthread_condattr_t *attr" "clock_t clock_id" +.Fn pthread_condattr_setclock "pthread_condattr_t *attr" "clockid_t clock_id" .Ft int .Fn pthread_condattr_getpshared "pthread_condattr_t * restrict attr" "int * restrict pshared" .Ft int From owner-svn-src-all@freebsd.org Mon Mar 5 09:18:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92B02F4189B; Mon, 5 Mar 2018 09:18:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F8AD6EFCA; Mon, 5 Mar 2018 09:18:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A8CB21F00; Mon, 5 Mar 2018 09:18:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w259IfjS044120; Mon, 5 Mar 2018 09:18:41 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w259IfaZ044119; Mon, 5 Mar 2018 09:18:41 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803050918.w259IfaZ044119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 09:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330487 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 330487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 09:18:41 -0000 Author: eadler Date: Mon Mar 5 09:18:40 2018 New Revision: 330487 URL: https://svnweb.freebsd.org/changeset/base/330487 Log: MFC r324424: Remove CVS - we don't run that infrastructure anymore Modified: stable/11/share/misc/organization.dot Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/organization.dot ============================================================================== --- stable/11/share/misc/organization.dot Mon Mar 5 09:17:55 2018 (r330486) +++ stable/11/share/misc/organization.dot Mon Mar 5 09:18:40 2018 (r330487) @@ -45,10 +45,8 @@ accounts [label="Accounts Team\naccounts@FreeBSD.org\n backups [label="Backup Administrators\nbackups@FreeBSD.org\nsimon, kensmith,\ndhw"] bugmeister [label="Bugmeister Team\nbugmeister@FreeBSD.org\neadler, gavin, gonzo"] clusteradm [label="Cluster Administrators\nclusteradm@FreeBSD.org\nbrd, simon, ps,\nkensmith, peter"] -cvsupmaster [label="CVSup Mirror Site Coordinators\ncvsup-master@FreeBSD.org\nkuriyama, jdp,\nkensmith"] dnsadm [label="DNS Administrators\ndnsadm@FreeBSD.org\nbillf, dg, ps,\nkensmith, peter"] mirroradmin [label="FTP/WWW Mirror Site Coordinators\nmirror-admin@FreeBSD.org\nkuriyama, kensmith"] -ncvs [label="CVS src Repository Managers\nncvs@FreeBSD.org\njoe, kuriyama, markm,\nsimon, peter"] perforceadmin [label="Perforce Repository Administrators\nperforce-admin@FreeBSD.org\nscottl, kensmith, gordon,\nrwatson, peter, dhw"] postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\njmb, brd, sahil, dhw"] refadm [label="Reference Systems Administrators\nrefadm@FreeBSD.org\njake, billf, markm, simon,\nobrien, ps, kensmith,\npeter, dhw"] @@ -68,8 +66,6 @@ _admin -> accounts _admin -> backups _admin -> bugmeister _admin -> clusteradm -_admin -> ncvs -_admin -> cvsupmaster _admin -> dnsadm _admin -> mirroradmin _admin -> perforceadmin From owner-svn-src-all@freebsd.org Mon Mar 5 10:09:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A1F8F44AD7; Mon, 5 Mar 2018 10:09:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B65A70CD9; Mon, 5 Mar 2018 10:09:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F12A226EB; Mon, 5 Mar 2018 10:09:19 +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 w25A9IgN069368; Mon, 5 Mar 2018 10:09:18 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25A9I83069367; Mon, 5 Mar 2018 10:09:18 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201803051009.w25A9I83069367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 5 Mar 2018 10:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330488 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 330488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 10:09:19 -0000 Author: andrew Date: Mon Mar 5 10:09:18 2018 New Revision: 330488 URL: https://svnweb.freebsd.org/changeset/base/330488 Log: In the ACPI GICv3 attach function call device_get_children to get the list of children. We expect this to be populated when configuring the secondary cores. Sponsored by: DARPA, AFRL Sponsored by: Cavium (Hardware) Modified: head/sys/arm64/arm64/gic_v3_acpi.c Modified: head/sys/arm64/arm64/gic_v3_acpi.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_acpi.c Mon Mar 5 09:18:40 2018 (r330487) +++ head/sys/arm64/arm64/gic_v3_acpi.c Mon Mar 5 10:09:18 2018 (r330488) @@ -280,6 +280,9 @@ gic_v3_acpi_attach(device_t dev) */ gic_v3_acpi_bus_attach(dev); + if (device_get_children(dev, &sc->gic_children, &sc->gic_nchildren) !=0) + sc->gic_nchildren = 0; + return (0); error: From owner-svn-src-all@freebsd.org Mon Mar 5 10:11:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D42DF44CF2; Mon, 5 Mar 2018 10:11:31 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D470570F0E; Mon, 5 Mar 2018 10:11:30 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF8032272E; Mon, 5 Mar 2018 10:11:30 +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 w25ABUd1073093; Mon, 5 Mar 2018 10:11:30 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25ABUh2073092; Mon, 5 Mar 2018 10:11:30 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201803051011.w25ABUh2073092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 5 Mar 2018 10:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330489 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 330489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 10:11:31 -0000 Author: andrew Date: Mon Mar 5 10:11:30 2018 New Revision: 330489 URL: https://svnweb.freebsd.org/changeset/base/330489 Log: Register each GICv3 ITS driver with a useful cross reference. We currently only use the first driver, however this may change in the future and hardware exists with multiple ITS devices. Sponsored by: DARPA, AFRL Sponsored by: Cavium (Hardware) Modified: head/sys/arm64/arm64/gicv3_its.c Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Mon Mar 5 10:09:18 2018 (r330488) +++ head/sys/arm64/arm64/gicv3_its.c Mon Mar 5 10:11:30 2018 (r330489) @@ -1734,7 +1734,7 @@ gicv3_its_acpi_attach(device_t dev) if (err != 0) return (err); - sc->sc_pic = intr_pic_register(dev, 1); + sc->sc_pic = intr_pic_register(dev, device_get_unit(dev) + 1); intr_pic_add_handler(device_get_parent(dev), sc->sc_pic, gicv3_its_intr, sc, GIC_FIRST_LPI, LPI_NIRQS); From owner-svn-src-all@freebsd.org Mon Mar 5 11:49:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04E4EF25687; Mon, 5 Mar 2018 11:49:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7ACBB74886; Mon, 5 Mar 2018 11:49:52 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56361236A5; Mon, 5 Mar 2018 11:49:52 +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 w25Bnqaf019628; Mon, 5 Mar 2018 11:49:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25BnjKp019562; Mon, 5 Mar 2018 11:49:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051149.w25BnjKp019562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 11:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330490 - in head/sys/ofed: drivers/infiniband/core include/rdma include/uapi/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/ofed: drivers/infiniband/core include/rdma include/uapi/rdma X-SVN-Commit-Revision: 330490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 11:49:53 -0000 Author: hselasky Date: Mon Mar 5 11:49:45 2018 New Revision: 330490 URL: https://svnweb.freebsd.org/changeset/base/330490 Log: Add missing FreeBSD tags and SVN properties to ibcore. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/agent.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/cm_msgs.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/core_priv.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/ib_addr.c head/sys/ofed/drivers/infiniband/core/ib_agent.c head/sys/ofed/drivers/infiniband/core/ib_cache.c head/sys/ofed/drivers/infiniband/core/ib_cm.c head/sys/ofed/drivers/infiniband/core/ib_cma.c head/sys/ofed/drivers/infiniband/core/ib_cq.c head/sys/ofed/drivers/infiniband/core/ib_device.c head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c head/sys/ofed/drivers/infiniband/core/ib_iwcm.c head/sys/ofed/drivers/infiniband/core/ib_iwpm_msg.c head/sys/ofed/drivers/infiniband/core/ib_iwpm_util.c head/sys/ofed/drivers/infiniband/core/ib_mad.c head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c head/sys/ofed/drivers/infiniband/core/ib_multicast.c head/sys/ofed/drivers/infiniband/core/ib_packer.c head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c head/sys/ofed/drivers/infiniband/core/ib_sa_query.c head/sys/ofed/drivers/infiniband/core/ib_smi.c head/sys/ofed/drivers/infiniband/core/ib_sysfs.c head/sys/ofed/drivers/infiniband/core/ib_ucm.c head/sys/ofed/drivers/infiniband/core/ib_ucma.c head/sys/ofed/drivers/infiniband/core/ib_ud_header.c head/sys/ofed/drivers/infiniband/core/ib_umem.c head/sys/ofed/drivers/infiniband/core/ib_umem_odp.c head/sys/ofed/drivers/infiniband/core/ib_umem_rbtree.c head/sys/ofed/drivers/infiniband/core/ib_user_mad.c head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c head/sys/ofed/drivers/infiniband/core/ib_uverbs_marshall.c head/sys/ofed/drivers/infiniband/core/ib_verbs.c head/sys/ofed/drivers/infiniband/core/iwcm.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/iwpm_util.h head/sys/ofed/drivers/infiniband/core/mad_priv.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/mad_rmpp.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/opa_smi.h head/sys/ofed/drivers/infiniband/core/sa.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/smi.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/uverbs.h (contents, props changed) head/sys/ofed/include/rdma/ib.h head/sys/ofed/include/rdma/ib_addr.h (contents, props changed) head/sys/ofed/include/rdma/ib_cache.h (contents, props changed) head/sys/ofed/include/rdma/ib_cm.h (contents, props changed) head/sys/ofed/include/rdma/ib_fmr_pool.h (contents, props changed) head/sys/ofed/include/rdma/ib_hdrs.h head/sys/ofed/include/rdma/ib_mad.h (contents, props changed) head/sys/ofed/include/rdma/ib_marshall.h (contents, props changed) head/sys/ofed/include/rdma/ib_pack.h (contents, props changed) head/sys/ofed/include/rdma/ib_pma.h (contents, props changed) head/sys/ofed/include/rdma/ib_sa.h (contents, props changed) head/sys/ofed/include/rdma/ib_smi.h (contents, props changed) head/sys/ofed/include/rdma/ib_umem.h (contents, props changed) head/sys/ofed/include/rdma/ib_umem_odp.h head/sys/ofed/include/rdma/ib_verbs.h (contents, props changed) head/sys/ofed/include/rdma/iw_cm.h (contents, props changed) head/sys/ofed/include/rdma/iw_portmap.h head/sys/ofed/include/rdma/opa_port_info.h head/sys/ofed/include/rdma/opa_smi.h head/sys/ofed/include/rdma/rdma_cm.h (contents, props changed) head/sys/ofed/include/rdma/rdma_cm_ib.h (contents, props changed) head/sys/ofed/include/rdma/rdma_vt.h head/sys/ofed/include/rdma/rdmavt_cq.h head/sys/ofed/include/rdma/rdmavt_mr.h head/sys/ofed/include/rdma/rdmavt_qp.h head/sys/ofed/include/uapi/rdma/ib_user_cm.h head/sys/ofed/include/uapi/rdma/ib_user_mad.h head/sys/ofed/include/uapi/rdma/ib_user_sa.h head/sys/ofed/include/uapi/rdma/ib_user_verbs.h head/sys/ofed/include/uapi/rdma/mlx4-abi.h head/sys/ofed/include/uapi/rdma/mlx5-abi.h head/sys/ofed/include/uapi/rdma/mthca-abi.h (contents, props changed) head/sys/ofed/include/uapi/rdma/rdma_user_cm.h Modified: head/sys/ofed/drivers/infiniband/core/agent.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/agent.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/agent.h Mon Mar 5 11:49:45 2018 (r330490) @@ -34,6 +34,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef __AGENT_H_ Modified: head/sys/ofed/drivers/infiniband/core/cm_msgs.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/cm_msgs.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/cm_msgs.h Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004, 2011 Intel Corporation. All rights reserved. * Copyright (c) 2004 Topspin Corporation. All rights reserved. * Copyright (c) 2004 Voltaire Corporation. All rights reserved. @@ -30,7 +32,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS THE * SOFTWARE. + * + * $FreeBSD$ */ + #if !defined(CM_MSGS_H) #define CM_MSGS_H Modified: head/sys/ofed/drivers/infiniband/core/core_priv.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/core_priv.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/core_priv.h Mon Mar 5 11:49:45 2018 (r330490) @@ -30,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef _CORE_PRIV_H Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2005 Voltaire Inc. All rights reserved. * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. @@ -31,6 +33,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_agent.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_agent.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_agent.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004, 2005 Mellanox Technologies Ltd. All rights reserved. * Copyright (c) 2004, 2005 Infinicon Corporation. All rights reserved. * Copyright (c) 2004, 2005 Intel Corporation. All rights reserved. @@ -34,6 +36,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_cache.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cache.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_cache.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004 Topspin Communications. All rights reserved. * Copyright (c) 2005 Intel Corporation. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. @@ -31,6 +33,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cm.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_cm.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004-2007 Intel Corporation. All rights reserved. * Copyright (c) 2004 Topspin Corporation. All rights reserved. * Copyright (c) 2004, 2005 Voltaire Corporation. All rights reserved. @@ -31,6 +33,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2005 Voltaire Inc. All rights reserved. * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. @@ -31,6 +33,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #define LINUXKPI_PARAM_PREFIX ibcore_ Modified: head/sys/ofed/drivers/infiniband/core/ib_cq.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cq.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_cq.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2017 Mellanox Technologies Ltd. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_device.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_device.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_device.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004 Topspin Communications. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * @@ -29,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004 Topspin Communications. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * @@ -29,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_iwcm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_iwcm.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_iwcm.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004, 2005 Intel Corporation. All rights reserved. * Copyright (c) 2004 Topspin Corporation. All rights reserved. * Copyright (c) 2004, 2005 Voltaire Corporation. All rights reserved. @@ -34,7 +36,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * + * $FreeBSD$ */ + #include #include #include Modified: head/sys/ofed/drivers/infiniband/core/ib_iwpm_msg.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_iwpm_msg.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_iwpm_msg.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Intel Corporation. All rights reserved. * Copyright (c) 2014 Chelsio, Inc. All rights reserved. * @@ -29,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include "iwpm_util.h" Modified: head/sys/ofed/drivers/infiniband/core/ib_iwpm_util.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_iwpm_util.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_iwpm_util.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Chelsio, Inc. All rights reserved. * Copyright (c) 2014 Intel Corporation. All rights reserved. * @@ -29,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include "iwpm_util.h" Modified: head/sys/ofed/drivers/infiniband/core/ib_mad.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_mad.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_mad.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004-2007 Voltaire, Inc. All rights reserved. * Copyright (c) 2005 Intel Corporation. All rights reserved. * Copyright (c) 2005 Mellanox Technologies Ltd. All rights reserved. @@ -33,6 +35,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * + * $FreeBSD$ */ #define LINUXKPI_PARAM_PREFIX ibcore_ Modified: head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2005 Intel Inc. All rights reserved. * Copyright (c) 2005-2006 Voltaire, Inc. All rights reserved. * Copyright (c) 2014 Intel Corporation. All rights reserved. @@ -30,6 +32,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_multicast.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_multicast.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_multicast.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2006 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #define LINUXKPI_PARAM_PREFIX ibcore_ Modified: head/sys/ofed/drivers/infiniband/core/ib_packer.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_packer.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_packer.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004 Topspin Corporation. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * @@ -29,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2015-2017, Mellanox Technologies inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include "core_priv.h" Modified: head/sys/ofed/drivers/infiniband/core/ib_sa_query.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_sa_query.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_sa_query.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004 Topspin Communications. All rights reserved. * Copyright (c) 2005 Voltaire, Inc. All rights reserved. * Copyright (c) 2006 Intel Corporation. All rights reserved. @@ -30,6 +32,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_smi.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_smi.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_smi.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004, 2005 Mellanox Technologies Ltd. All rights reserved. * Copyright (c) 2004, 2005 Infinicon Corporation. All rights reserved. * Copyright (c) 2004, 2005 Intel Corporation. All rights reserved. @@ -35,6 +37,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_sysfs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_sysfs.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_sysfs.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. * Copyright (c) 2005 Mellanox Technologies Ltd. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. @@ -30,6 +32,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include "core_priv.h" Modified: head/sys/ofed/drivers/infiniband/core/ib_ucm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucm.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_ucm.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2005 Topspin Communications. All rights reserved. * Copyright (c) 2005 Intel Corporation. All rights reserved. * @@ -29,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_ucma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ucma.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_ucma.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_ud_header.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_ud_header.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_ud_header.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004 Topspin Corporation. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * @@ -29,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_umem.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_umem.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_umem.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2005 Topspin Communications. All rights reserved. * Copyright (c) 2005 Cisco Systems. All rights reserved. * Copyright (c) 2005 Mellanox Technologies. All rights reserved. @@ -30,6 +32,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #define LINUXKPI_PARAM_PREFIX ibcore_ Modified: head/sys/ofed/drivers/infiniband/core/ib_umem_odp.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_umem_odp.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_umem_odp.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_umem_rbtree.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_umem_rbtree.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_umem_rbtree.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_user_mad.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_user_mad.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_user_mad.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004 Topspin Communications. All rights reserved. * Copyright (c) 2005 Voltaire, Inc. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. @@ -31,6 +33,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #define pr_fmt(fmt) "user_mad: " fmt Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2005 Topspin Communications. All rights reserved. * Copyright (c) 2005, 2006, 2007 Cisco Systems. All rights reserved. * Copyright (c) 2005 PathScale, Inc. All rights reserved. @@ -31,6 +33,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #define LINUXKPI_PARAM_PREFIX ibcore_ Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_main.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2005 Topspin Communications. All rights reserved. * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. * Copyright (c) 2005 Mellanox Technologies. All rights reserved. @@ -32,6 +34,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_marshall.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_marshall.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_marshall.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2005 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved. * Copyright (c) 2004 Infinicon Corporation. All rights reserved. * Copyright (c) 2004 Intel Corporation. All rights reserved. @@ -34,6 +36,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #include Modified: head/sys/ofed/drivers/infiniband/core/iwcm.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/iwcm.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/iwcm.h Mon Mar 5 11:49:45 2018 (r330490) @@ -31,7 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ + #ifndef IWCM_H #define IWCM_H Modified: head/sys/ofed/drivers/infiniband/core/iwpm_util.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/iwpm_util.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/iwpm_util.h Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Intel Corporation. All rights reserved. * Copyright (c) 2014 Chelsio, Inc. All rights reserved. * @@ -29,7 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ + #ifndef _IWPM_UTIL_H #define _IWPM_UTIL_H Modified: head/sys/ofed/drivers/infiniband/core/mad_priv.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/mad_priv.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/mad_priv.h Mon Mar 5 11:49:45 2018 (r330490) @@ -33,6 +33,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef __IB_MAD_PRIV_H__ Modified: head/sys/ofed/drivers/infiniband/core/mad_rmpp.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/mad_rmpp.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/mad_rmpp.h Mon Mar 5 11:49:45 2018 (r330490) @@ -30,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef __MAD_RMPP_H__ Modified: head/sys/ofed/drivers/infiniband/core/opa_smi.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/opa_smi.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/opa_smi.h Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two @@ -29,6 +31,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * + * $FreeBSD$ */ #ifndef __OPA_SMI_H_ Modified: head/sys/ofed/drivers/infiniband/core/sa.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/sa.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/sa.h Mon Mar 5 11:49:45 2018 (r330490) @@ -32,6 +32,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef SA_H Modified: head/sys/ofed/drivers/infiniband/core/smi.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/smi.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/smi.h Mon Mar 5 11:49:45 2018 (r330490) @@ -35,6 +35,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * + * $FreeBSD$ */ #ifndef __SMI_H_ Modified: head/sys/ofed/drivers/infiniband/core/uverbs.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/uverbs.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/drivers/infiniband/core/uverbs.h Mon Mar 5 11:49:45 2018 (r330490) @@ -34,6 +34,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef UVERBS_H Modified: head/sys/ofed/include/rdma/ib.h ============================================================================== --- head/sys/ofed/include/rdma/ib.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib.h Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2010 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(_RDMA_IB_H) Modified: head/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- head/sys/ofed/include/rdma/ib_addr.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_addr.h Mon Mar 5 11:49:45 2018 (r330490) @@ -31,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(IB_ADDR_H) Modified: head/sys/ofed/include/rdma/ib_cache.h ============================================================================== --- head/sys/ofed/include/rdma/ib_cache.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_cache.h Mon Mar 5 11:49:45 2018 (r330490) @@ -32,6 +32,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef _IB_CACHE_H Modified: head/sys/ofed/include/rdma/ib_cm.h ============================================================================== --- head/sys/ofed/include/rdma/ib_cm.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_cm.h Mon Mar 5 11:49:45 2018 (r330490) @@ -33,7 +33,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ + #if !defined(IB_CM_H) #define IB_CM_H Modified: head/sys/ofed/include/rdma/ib_fmr_pool.h ============================================================================== --- head/sys/ofed/include/rdma/ib_fmr_pool.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_fmr_pool.h Mon Mar 5 11:49:45 2018 (r330490) @@ -31,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(IB_FMR_POOL_H) Modified: head/sys/ofed/include/rdma/ib_hdrs.h ============================================================================== --- head/sys/ofed/include/rdma/ib_hdrs.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_hdrs.h Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright(c) 2016 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or @@ -43,6 +45,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * + * $FreeBSD$ */ #ifndef IB_HDRS_H Modified: head/sys/ofed/include/rdma/ib_mad.h ============================================================================== --- head/sys/ofed/include/rdma/ib_mad.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_mad.h Mon Mar 5 11:49:45 2018 (r330490) @@ -34,6 +34,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(IB_MAD_H) Modified: head/sys/ofed/include/rdma/ib_marshall.h ============================================================================== --- head/sys/ofed/include/rdma/ib_marshall.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_marshall.h Mon Mar 5 11:49:45 2018 (r330490) @@ -30,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(IB_USER_MARSHALL_H) Modified: head/sys/ofed/include/rdma/ib_pack.h ============================================================================== --- head/sys/ofed/include/rdma/ib_pack.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_pack.h Mon Mar 5 11:49:45 2018 (r330490) @@ -30,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef IB_PACK_H Modified: head/sys/ofed/include/rdma/ib_pma.h ============================================================================== --- head/sys/ofed/include/rdma/ib_pma.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_pma.h Mon Mar 5 11:49:45 2018 (r330490) @@ -32,6 +32,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(IB_PMA_H) Modified: head/sys/ofed/include/rdma/ib_sa.h ============================================================================== --- head/sys/ofed/include/rdma/ib_sa.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_sa.h Mon Mar 5 11:49:45 2018 (r330490) @@ -32,6 +32,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef IB_SA_H Modified: head/sys/ofed/include/rdma/ib_smi.h ============================================================================== --- head/sys/ofed/include/rdma/ib_smi.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_smi.h Mon Mar 5 11:49:45 2018 (r330490) @@ -34,6 +34,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(IB_SMI_H) Modified: head/sys/ofed/include/rdma/ib_umem.h ============================================================================== --- head/sys/ofed/include/rdma/ib_umem.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_umem.h Mon Mar 5 11:49:45 2018 (r330490) @@ -30,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef IB_UMEM_H Modified: head/sys/ofed/include/rdma/ib_umem_odp.h ============================================================================== --- head/sys/ofed/include/rdma/ib_umem_odp.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_umem_odp.h Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #ifndef IB_UMEM_ODP_H Modified: head/sys/ofed/include/rdma/ib_verbs.h ============================================================================== --- head/sys/ofed/include/rdma/ib_verbs.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/ib_verbs.h Mon Mar 5 11:49:45 2018 (r330490) @@ -36,6 +36,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(IB_VERBS_H) Modified: head/sys/ofed/include/rdma/iw_cm.h ============================================================================== --- head/sys/ofed/include/rdma/iw_cm.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/iw_cm.h Mon Mar 5 11:49:45 2018 (r330490) @@ -31,7 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ + #ifndef IW_CM_H #define IW_CM_H Modified: head/sys/ofed/include/rdma/iw_portmap.h ============================================================================== --- head/sys/ofed/include/rdma/iw_portmap.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/iw_portmap.h Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Intel Corporation. All rights reserved. * Copyright (c) 2014 Chelsio, Inc. All rights reserved. * @@ -29,7 +31,10 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ + #ifndef _IW_PORTMAP_H #define _IW_PORTMAP_H Modified: head/sys/ofed/include/rdma/opa_port_info.h ============================================================================== --- head/sys/ofed/include/rdma/opa_port_info.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/opa_port_info.h Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(OPA_PORT_INFO_H) Modified: head/sys/ofed/include/rdma/opa_smi.h ============================================================================== --- head/sys/ofed/include/rdma/opa_smi.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/opa_smi.h Mon Mar 5 11:49:45 2018 (r330490) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 + * * Copyright (c) 2014 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two @@ -28,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(OPA_SMI_H) Modified: head/sys/ofed/include/rdma/rdma_cm.h ============================================================================== --- head/sys/ofed/include/rdma/rdma_cm.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/rdma_cm.h Mon Mar 5 11:49:45 2018 (r330490) @@ -31,6 +31,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ #if !defined(RDMA_CM_H) Modified: head/sys/ofed/include/rdma/rdma_cm_ib.h ============================================================================== --- head/sys/ofed/include/rdma/rdma_cm_ib.h Mon Mar 5 10:11:30 2018 (r330489) +++ head/sys/ofed/include/rdma/rdma_cm_ib.h Mon Mar 5 11:49:45 2018 (r330490) @@ -30,6 +30,8 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Mar 5 11:52:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 425EFF25BC8; Mon, 5 Mar 2018 11:52:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6FA674D00; Mon, 5 Mar 2018 11:52:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1F5A2382E; Mon, 5 Mar 2018 11:52:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25BqdBY024130; Mon, 5 Mar 2018 11:52:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25Bqd0H024129; Mon, 5 Mar 2018 11:52:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051152.w25Bqd0H024129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 11:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330491 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 11:52:40 -0000 Author: hselasky Date: Mon Mar 5 11:52:39 2018 New Revision: 330491 URL: https://svnweb.freebsd.org/changeset/base/330491 Log: Do not add RoCEv2 default GID in ibcore when IPv6 is disabled to honor the networking stack's IPv6 disabled setting. Else the offload HCA can start using IPv6 packets for QPs. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cache.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cache.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cache.c Mon Mar 5 11:49:45 2018 (r330490) +++ head/sys/ofed/drivers/infiniband/core/ib_cache.c Mon Mar 5 11:52:39 2018 (r330491) @@ -42,6 +42,7 @@ #include #include #include +#include #include @@ -702,6 +703,16 @@ void ib_cache_gid_set_default_gid(struct ib_device *ib make_default_gid(ndev, &gid); memset(&gid_attr, 0, sizeof(gid_attr)); gid_attr.ndev = ndev; + + /* Default GID is created using unique GUID and local subnet prefix, + * as described in section 4.1.1 and 3.5.10 in IB spec 1.3. + * Therefore don't create RoCEv2 default GID based on it that + * resembles as IPv6 GID based on link local address when IPv6 is + * disabled in kernel. + */ +#ifndef INET6 + gid_type_mask &= ~BIT(IB_GID_TYPE_ROCE_UDP_ENCAP); +#endif for (gid_type = 0; gid_type < IB_GID_TYPE_SIZE; ++gid_type) { int ix; From owner-svn-src-all@freebsd.org Mon Mar 5 11:55:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77B68F25F80; Mon, 5 Mar 2018 11:55:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27F6C74EFB; Mon, 5 Mar 2018 11:55:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C9C22382F; Mon, 5 Mar 2018 11:55:30 +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 w25BtTn8024313; Mon, 5 Mar 2018 11:55:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25BtTh2024312; Mon, 5 Mar 2018 11:55:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051155.w25BtTh2024312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 11:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330492 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 11:55:30 -0000 Author: hselasky Date: Mon Mar 5 11:55:29 2018 New Revision: 330492 URL: https://svnweb.freebsd.org/changeset/base/330492 Log: Add support for IPv6 link local GIDs equal to the default GID for VLANs in ibcore. IPv6 link local addresses are usually derived from the netdev MAC address. This is applicable to VLAN devices and its lower netdevice as well. In such cases the IPv6 link local address is a duplicate of the default GID. Now that link local IPv6 addresses based GIDs are supported, allow adding such GID entries in the GID table. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cache.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cache.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cache.c Mon Mar 5 11:52:39 2018 (r330491) +++ head/sys/ofed/drivers/infiniband/core/ib_cache.c Mon Mar 5 11:55:29 2018 (r330492) @@ -336,29 +336,12 @@ int ib_cache_gid_add(struct ib_device *ib_dev, u8 port struct ib_gid_table *table; int ix; int ret = 0; - struct net_device *idev; int empty; table = ports_table[port - rdma_start_port(ib_dev)]; if (!memcmp(gid, &zgid, sizeof(*gid))) return -EINVAL; - - if (ib_dev->get_netdev) { - idev = ib_dev->get_netdev(ib_dev, port); - if (idev && attr->ndev != idev) { - union ib_gid default_gid; - - /* Adding default GIDs in not permitted */ - make_default_gid(idev, &default_gid); - if (!memcmp(gid, &default_gid, sizeof(*gid))) { - dev_put(idev); - return -EPERM; - } - } - if (idev) - dev_put(idev); - } mutex_lock(&table->lock); write_lock_irq(&table->rwlock); From owner-svn-src-all@freebsd.org Mon Mar 5 11:57:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53C02F26224; Mon, 5 Mar 2018 11:57:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 058F6750D9; Mon, 5 Mar 2018 11:57:27 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F00D323830; Mon, 5 Mar 2018 11:57:26 +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 w25BvQMg024423; Mon, 5 Mar 2018 11:57:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25BvQ0X024422; Mon, 5 Mar 2018 11:57:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051157.w25BvQ0X024422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 11:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330493 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 11:57:27 -0000 Author: hselasky Date: Mon Mar 5 11:57:26 2018 New Revision: 330493 URL: https://svnweb.freebsd.org/changeset/base/330493 Log: Make deletion of RoCE GID entries synchronous in ibcore. When a network device is departing, the RoCE GID entries should be cleared before the default L2 link layer address is freed. Else a NULL pointer access may happen. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Modified: head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Mon Mar 5 11:55:29 2018 (r330492) +++ head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Mon Mar 5 11:57:26 2018 (r330493) @@ -362,6 +362,9 @@ roce_gid_delete_all_event(struct net_device *ndev) dev_hold(ndev); work->ndev = ndev; queue_work(roce_gid_mgmt_wq, &work->work); + + /* make sure job is complete before returning */ + flush_workqueue(roce_gid_mgmt_wq); } static int From owner-svn-src-all@freebsd.org Mon Mar 5 11:58:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 364C3F26476; Mon, 5 Mar 2018 11:58:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0E6475262; Mon, 5 Mar 2018 11:58:37 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBA1723831; Mon, 5 Mar 2018 11:58:37 +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 w25BwbNQ024503; Mon, 5 Mar 2018 11:58:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25BwbAC024502; Mon, 5 Mar 2018 11:58:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051158.w25BwbAC024502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 11:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330494 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 11:58:38 -0000 Author: hselasky Date: Mon Mar 5 11:58:37 2018 New Revision: 330494 URL: https://svnweb.freebsd.org/changeset/base/330494 Log: Select RoCEv2 by default in ibcore. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 11:57:26 2018 (r330493) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 11:58:37 2018 (r330494) @@ -4137,7 +4137,6 @@ static void cma_add_one(struct ib_device *device) struct cma_device *cma_dev; struct rdma_id_private *id_priv; unsigned int i; - unsigned long supported_gids = 0; cma_dev = kmalloc(sizeof *cma_dev, GFP_KERNEL); if (!cma_dev) @@ -4154,10 +4153,23 @@ static void cma_add_one(struct ib_device *device) return; } for (i = rdma_start_port(device); i <= rdma_end_port(device); i++) { + unsigned long supported_gids; + unsigned int default_gid_type; + supported_gids = roce_gid_type_mask_support(device, i); - WARN_ON(!supported_gids); + + if (WARN_ON(!supported_gids)) { + /* set something valid */ + default_gid_type = 0; + } else if (test_bit(IB_GID_TYPE_ROCE_UDP_ENCAP, &supported_gids)) { + /* prefer RoCEv2, if supported */ + default_gid_type = IB_GID_TYPE_ROCE_UDP_ENCAP; + } else { + default_gid_type = find_first_bit(&supported_gids, + BITS_PER_LONG); + } cma_dev->default_gid_type[i - rdma_start_port(device)] = - find_first_bit(&supported_gids, BITS_PER_LONG); + default_gid_type; } init_completion(&cma_dev->comp); From owner-svn-src-all@freebsd.org Mon Mar 5 11:59:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6DEFF265ED; Mon, 5 Mar 2018 11:59:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73E94753CD; Mon, 5 Mar 2018 11:59:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EEBD23832; Mon, 5 Mar 2018 11:59:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25BxsdL024585; Mon, 5 Mar 2018 11:59:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25Bxsrb024584; Mon, 5 Mar 2018 11:59:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051159.w25Bxsrb024584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 11:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330495 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 11:59:55 -0000 Author: hselasky Date: Mon Mar 5 11:59:54 2018 New Revision: 330495 URL: https://svnweb.freebsd.org/changeset/base/330495 Log: Map type of service, TOS, to IB or VLAN service level 1:1 in ibcore. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 11:58:37 2018 (r330494) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 11:59:54 2018 (r330495) @@ -2422,8 +2422,17 @@ static int cma_resolve_iw_route(struct rdma_id_private static int iboe_tos_to_sl(struct net_device *ndev, int tos) { - /* TODO: Implement this function */ - return 0; + /* get service level, SL, from type of service, TOS */ + int sl = tos; + + /* range check input argument and map 1:1 */ + if (sl > 255) + sl = 255; + else if (sl < 0) + sl = 0; + + /* final mappings are done by the vendor specific drivers */ + return sl; } static enum ib_gid_type cma_route_gid_type(enum rdma_network_type network_type, From owner-svn-src-all@freebsd.org Mon Mar 5 12:04:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26E3EF2768C; Mon, 5 Mar 2018 12:04:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2E2675B81; Mon, 5 Mar 2018 12:04:34 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9A3D239BB; Mon, 5 Mar 2018 12:04:34 +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 w25C4Ypf029564; Mon, 5 Mar 2018 12:04:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25C4YW2029563; Mon, 5 Mar 2018 12:04:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051204.w25C4YW2029563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 12:04:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330496 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 12:04:35 -0000 Author: hselasky Date: Mon Mar 5 12:04:34 2018 New Revision: 330496 URL: https://svnweb.freebsd.org/changeset/base/330496 Log: Need to check for IPv6 linklocal address inside rdma_resolve_addr() in ibcore. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 11:59:54 2018 (r330495) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 12:04:34 2018 (r330496) @@ -107,6 +107,7 @@ const char *__attribute_const__ rdma_event_msg(enum rd } EXPORT_SYMBOL(rdma_event_msg); +static int cma_check_linklocal(struct rdma_dev_addr *, struct sockaddr *); static void cma_add_one(struct ib_device *device); static void cma_remove_one(struct ib_device *device, void *client_data); @@ -2807,6 +2808,10 @@ int rdma_resolve_addr(struct rdma_cm_id *id, struct so if (dst_addr->sa_family == AF_IB) { ret = cma_resolve_ib_addr(id_priv); } else { + ret = cma_check_linklocal(&id->route.addr.dev_addr, dst_addr); + if (ret) + goto err; + ret = rdma_resolve_ip(&addr_client, cma_src_addr(id_priv), dst_addr, &id->route.addr.dev_addr, timeout_ms, addr_handler, id_priv); From owner-svn-src-all@freebsd.org Mon Mar 5 12:04:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 090F4F27703; Mon, 5 Mar 2018 12:04:44 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB39975C75; Mon, 5 Mar 2018 12:04:43 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D7D5239BC; Mon, 5 Mar 2018 12:04:43 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25C4heX029617; Mon, 5 Mar 2018 12:04:43 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25C4hgv029616; Mon, 5 Mar 2018 12:04:43 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803051204.w25C4hgv029616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 5 Mar 2018 12:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330497 - stable/11/sbin/route X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sbin/route X-SVN-Commit-Revision: 330497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 12:04:44 -0000 Author: eugen Date: Mon Mar 5 12:04:43 2018 New Revision: 330497 URL: https://svnweb.freebsd.org/changeset/base/330497 Log: MFC r329930: route(8): make it possible to manually delete pinned route Reported by: Andreas Longwitz Approved by: avg (mentor) Modified: stable/11/sbin/route/route.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/route/route.c ============================================================================== --- stable/11/sbin/route/route.c Mon Mar 5 12:04:34 2018 (r330496) +++ stable/11/sbin/route/route.c Mon Mar 5 12:04:43 2018 (r330497) @@ -1520,8 +1520,10 @@ rtmsg(int cmd, int flags, int fib) so[RTAX_IFP].ss_len = sizeof(struct sockaddr_dl); rtm_addrs |= RTA_IFP; } - } else + } else { cmd = RTM_DELETE; + flags |= RTF_PINNED; + } #define rtm m_rtmsg.m_rtm rtm.rtm_type = cmd; rtm.rtm_flags = flags; From owner-svn-src-all@freebsd.org Mon Mar 5 12:06:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69DB1F27AF2; Mon, 5 Mar 2018 12:06:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13F9A75EF5; Mon, 5 Mar 2018 12:06:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AB66239BD; Mon, 5 Mar 2018 12:06:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25C6fYq029744; Mon, 5 Mar 2018 12:06:41 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25C6fW4029743; Mon, 5 Mar 2018 12:06:41 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803051206.w25C6fW4029743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 5 Mar 2018 12:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330498 - stable/10/sbin/route X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/sbin/route X-SVN-Commit-Revision: 330498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 12:06:42 -0000 Author: eugen Date: Mon Mar 5 12:06:41 2018 New Revision: 330498 URL: https://svnweb.freebsd.org/changeset/base/330498 Log: MFC r329930: route(8): make it possible to manually delete pinned route Reported by: Andreas Longwitz Approved by: avg (mentor) Modified: stable/10/sbin/route/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/route/route.c ============================================================================== --- stable/10/sbin/route/route.c Mon Mar 5 12:04:43 2018 (r330497) +++ stable/10/sbin/route/route.c Mon Mar 5 12:06:41 2018 (r330498) @@ -1535,8 +1535,10 @@ rtmsg(int cmd, int flags, int fib) so[RTAX_IFP].ss_len = sizeof(struct sockaddr_dl); rtm_addrs |= RTA_IFP; } - } else + } else { cmd = RTM_DELETE; + flags |= RTF_PINNED; + } #define rtm m_rtmsg.m_rtm rtm.rtm_type = cmd; rtm.rtm_flags = flags; From owner-svn-src-all@freebsd.org Mon Mar 5 12:16:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4681DF29883; Mon, 5 Mar 2018 12:16:38 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3251766B6; Mon, 5 Mar 2018 12:16:37 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9CFD23B5D; Mon, 5 Mar 2018 12:16:37 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25CGbP0034896; Mon, 5 Mar 2018 12:16:37 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25CGbu2034895; Mon, 5 Mar 2018 12:16:37 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803051216.w25CGbu2034895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 5 Mar 2018 12:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330499 - stable/11/sys/security/mac_portacl X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/security/mac_portacl X-SVN-Commit-Revision: 330499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 12:16:38 -0000 Author: eugen Date: Mon Mar 5 12:16:37 2018 New Revision: 330499 URL: https://svnweb.freebsd.org/changeset/base/330499 Log: MFC r329994: mac_portacl(4): stop panicing INVARIANTS-enabled kernel by loading .ko when kernel already has options MAC_PORTACL. PR: 183817 Approved by: avg (mentor) Modified: stable/11/sys/security/mac_portacl/mac_portacl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/security/mac_portacl/mac_portacl.c ============================================================================== --- stable/11/sys/security/mac_portacl/mac_portacl.c Mon Mar 5 12:06:41 2018 (r330498) +++ stable/11/sys/security/mac_portacl/mac_portacl.c Mon Mar 5 12:16:37 2018 (r330499) @@ -487,3 +487,4 @@ static struct mac_policy_ops portacl_ops = MAC_POLICY_SET(&portacl_ops, mac_portacl, "TrustedBSD MAC/portacl", MPC_LOADTIME_FLAG_UNLOADOK, NULL); +MODULE_VERSION(mac_portacl, 1); From owner-svn-src-all@freebsd.org Mon Mar 5 12:21:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3889FF2A076; Mon, 5 Mar 2018 12:21:37 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8B7A76C66; Mon, 5 Mar 2018 12:21:36 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3BC423CA6; Mon, 5 Mar 2018 12:21:36 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25CLaKv035763; Mon, 5 Mar 2018 12:21:36 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25CLafg035744; Mon, 5 Mar 2018 12:21:36 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803051221.w25CLafg035744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 5 Mar 2018 12:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330500 - stable/10/sys/security/mac_portacl X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/sys/security/mac_portacl X-SVN-Commit-Revision: 330500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 12:21:37 -0000 Author: eugen Date: Mon Mar 5 12:21:36 2018 New Revision: 330500 URL: https://svnweb.freebsd.org/changeset/base/330500 Log: MFC r329994: mac_portacl(4): stop panicing INVARIANTS-enabled kernel by loading .ko when kernel already has options MAC_PORTACL. PR: 183817 Approved by: avg (mentor) Modified: stable/10/sys/security/mac_portacl/mac_portacl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/security/mac_portacl/mac_portacl.c ============================================================================== --- stable/10/sys/security/mac_portacl/mac_portacl.c Mon Mar 5 12:16:37 2018 (r330499) +++ stable/10/sys/security/mac_portacl/mac_portacl.c Mon Mar 5 12:21:36 2018 (r330500) @@ -493,3 +493,4 @@ static struct mac_policy_ops portacl_ops = MAC_POLICY_SET(&portacl_ops, mac_portacl, "TrustedBSD MAC/portacl", MPC_LOADTIME_FLAG_UNLOADOK, NULL); +MODULE_VERSION(mac_portacl, 1); From owner-svn-src-all@freebsd.org Mon Mar 5 12:39:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EC32F2B808; Mon, 5 Mar 2018 12:39:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AED4877A73; Mon, 5 Mar 2018 12:39:34 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FA8B23E77; Mon, 5 Mar 2018 12:39:34 +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 w25CdYj5044745; Mon, 5 Mar 2018 12:39:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25CdYKr044744; Mon, 5 Mar 2018 12:39:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051239.w25CdYKr044744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 12:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330501 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 12:39:35 -0000 Author: hselasky Date: Mon Mar 5 12:39:34 2018 New Revision: 330501 URL: https://svnweb.freebsd.org/changeset/base/330501 Log: Make sure to register the VLAN GIDs using the VLAN network interface and not the parent one in ibcore. Else looking up the VLAN GIDs will fail for VLAN IPs. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Modified: head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Mon Mar 5 12:21:36 2018 (r330500) +++ head/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Mon Mar 5 12:39:34 2018 (r330501) @@ -169,12 +169,14 @@ roce_gid_update_addr_callback(struct ib_device *device struct sockaddr_in v4; struct sockaddr_in6 v6; } ipx_addr; + struct net_device *ndev; }; struct ipx_entry *entry; struct net_device *idev; #if defined(INET) || defined(INET6) struct ifaddr *ifa; #endif + struct ib_gid_attr gid_attr; union ib_gid gid; int default_gids; u16 index_num; @@ -211,6 +213,7 @@ roce_gid_update_addr_callback(struct ib_device *device continue; } entry->ipx_addr.v4 = *((struct sockaddr_in *)ifa->ifa_addr); + entry->ndev = idev; STAILQ_INSERT_TAIL(&ipx_head, entry, entry); } #endif @@ -226,6 +229,7 @@ roce_gid_update_addr_callback(struct ib_device *device continue; } entry->ipx_addr.v6 = *((struct sockaddr_in6 *)ifa->ifa_addr); + entry->ndev = idev; /* trash IPv6 scope ID */ sa6_recoverscope(&entry->ipx_addr.v6); @@ -251,19 +255,25 @@ roce_gid_update_addr_callback(struct ib_device *device continue; /* check if entry found */ if (ib_find_cached_gid_by_port(device, &gid, i, - port, ndev, &index_num) == 0) + port, entry->ndev, &index_num) == 0) break; } if (i != IB_GID_TYPE_SIZE) continue; /* add new GID */ - update_gid(GID_ADD, device, port, &gid, ndev); + update_gid(GID_ADD, device, port, &gid, entry->ndev); } /* remove stale GIDs, if any */ - for (i = default_gids; ib_get_cached_gid(device, port, i, &gid, NULL) == 0; i++) { + for (i = default_gids; ib_get_cached_gid(device, port, i, &gid, &gid_attr) == 0; i++) { union ipx_addr ipx; + /* check for valid network device pointer */ + ndev = gid_attr.ndev; + if (ndev == NULL) + continue; + dev_put(ndev); + /* don't delete empty entries */ if (memcmp(&gid, &zgid, sizeof(zgid)) == 0) continue; @@ -274,7 +284,8 @@ roce_gid_update_addr_callback(struct ib_device *device rdma_gid2ip(&ipx.sa[0], &gid); STAILQ_FOREACH(entry, &ipx_head, entry) { - if (memcmp(&entry->ipx_addr, &ipx, sizeof(ipx)) == 0) + if (entry->ndev == ndev && + memcmp(&entry->ipx_addr, &ipx, sizeof(ipx)) == 0) break; } /* check if entry found */ From owner-svn-src-all@freebsd.org Mon Mar 5 13:57:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A53CEF3157A; Mon, 5 Mar 2018 13:57:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5413D7AC2A; Mon, 5 Mar 2018 13:57:38 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A8D324AF4; Mon, 5 Mar 2018 13:57:38 +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 w25DvcMm084583; Mon, 5 Mar 2018 13:57:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25Dvcr5084582; Mon, 5 Mar 2018 13:57:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051357.w25Dvcr5084582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 13:57:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330504 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 13:57:39 -0000 Author: hselasky Date: Mon Mar 5 13:57:37 2018 New Revision: 330504 URL: https://svnweb.freebsd.org/changeset/base/330504 Log: Add support for loopback in ibcore. Implement the missing pieces in addr_resolve() to support loopback addresses. IB core will test for the IFF_LOOPBACK flag in the network interface and treat these devices in a special way. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Mon Mar 5 13:52:25 2018 (r330503) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Mon Mar 5 13:57:37 2018 (r330504) @@ -123,7 +123,15 @@ rdma_copy_addr_sub(u8 *dst, const u8 *src, unsigned mi int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev, const unsigned char *dst_dev_addr) { - if (dev->if_type == IFT_INFINIBAND) + /* check for loopback device */ + if (dev->if_type == IFT_LOOP) { + dev_addr->dev_type = ARPHRD_ETHER; + memset(dev_addr->src_dev_addr, 0, MAX_ADDR_LEN); + memset(dev_addr->broadcast, 0, MAX_ADDR_LEN); + memset(dev_addr->dst_dev_addr, 0, MAX_ADDR_LEN); + dev_addr->bound_dev_if = dev->if_index; + return (0); + } else if (dev->if_type == IFT_INFINIBAND) dev_addr->dev_type = ARPHRD_INFINIBAND; else if (dev->if_type == IFT_ETHER) dev_addr->dev_type = ARPHRD_ETHER; @@ -240,10 +248,10 @@ static int addr_resolve_multi(u8 *edst, struct ifnet * static int addr4_resolve(struct sockaddr_in *src_in, const struct sockaddr_in *dst_in, struct rdma_dev_addr *addr, + u8 *edst, struct ifnet **ifpp) { struct sockaddr_in dst_tmp = *dst_in; - u8 edst[MAX_ADDR_LEN]; in_port_t src_port; struct sockaddr *saddr; struct rtentry *rte; @@ -278,8 +286,7 @@ static int addr4_resolve(struct sockaddr_in *src_in, if (rte == NULL) { error = EHOSTUNREACH; goto done; - } else if (rte->rt_ifp == NULL || rte->rt_ifp == V_loif || - RT_LINK_IS_UP(rte->rt_ifp) == 0) { + } else if (rte->rt_ifp == NULL || RT_LINK_IS_UP(rte->rt_ifp) == 0) { RTFREE_LOCKED(rte); error = EHOSTUNREACH; goto done; @@ -294,8 +301,14 @@ static int addr4_resolve(struct sockaddr_in *src_in, /* Step 2 - find outgoing network interface */ switch (type) { case 0: - /* source check */ - ifp = ip_dev_find(addr->net, src_in->sin_addr.s_addr); + /* check for loopback device */ + if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { + ifp = rte->rt_ifp; + dev_hold(ifp); + } else { + ifp = ip_dev_find(addr->net, src_in->sin_addr.s_addr); + } + /* check source interface */ if (ifp == NULL) { error = ENETUNREACH; goto error_rt_free; @@ -305,11 +318,17 @@ static int addr4_resolve(struct sockaddr_in *src_in, } break; case 1: + /* check for loopback device */ + if (rte->rt_ifp->if_flags & IFF_LOOPBACK) + saddr = (struct sockaddr *)&dst_tmp; + else + saddr = rte->rt_ifa->ifa_addr; + /* get destination network interface from route */ ifp = rte->rt_ifp; dev_hold(ifp); - saddr = rte->rt_ifa->ifa_addr; + /* update source address */ src_port = src_in->sin_port; memcpy(src_in, saddr, rdma_addr_size(saddr)); src_in->sin_port = src_port; /* preserve port number */ @@ -324,13 +343,17 @@ static int addr4_resolve(struct sockaddr_in *src_in, if (dst_tmp.sin_addr.s_addr == INADDR_BROADCAST) { rdma_copy_addr_sub(edst, ifp->if_broadcastaddr, ifp->if_addrlen, MAX_ADDR_LEN); + error = 0; } else if (IN_MULTICAST(ntohl(dst_tmp.sin_addr.s_addr))) { error = addr_resolve_multi(edst, ifp, (struct sockaddr *)&dst_tmp); if (error != 0) goto error_put_ifp; + } else if (ifp->if_flags & IFF_LOOPBACK) { + memset(edst, 0, MAX_ADDR_LEN); + error = 0; } else { bool is_gw = (rte->rt_flags & RTF_GATEWAY) != 0; - memset(edst, 0, sizeof(edst)); + memset(edst, 0, MAX_ADDR_LEN); error = arpresolve(ifp, is_gw, NULL, is_gw ? rte->rt_gateway : (const struct sockaddr *)&dst_tmp, edst, NULL, NULL); @@ -340,13 +363,6 @@ static int addr4_resolve(struct sockaddr_in *src_in, addr->network = RDMA_NETWORK_IPV4; } - /* - * Step 4 - copy destination and source MAC addresses - */ - error = -rdma_copy_addr(addr, ifp, edst); - if (error != 0) - goto error_put_ifp; - if (rte != NULL) RTFREE(rte); @@ -369,6 +385,7 @@ done: static int addr4_resolve(struct sockaddr_in *src_in, const struct sockaddr_in *dst_in, struct rdma_dev_addr *addr, + u8 *edst, struct ifnet **ifpp) { return -EADDRNOTAVAIL; @@ -379,10 +396,10 @@ static int addr4_resolve(struct sockaddr_in *src_in, static int addr6_resolve(struct sockaddr_in6 *src_in, const struct sockaddr_in6 *dst_in, struct rdma_dev_addr *addr, + u8 *edst, struct ifnet **ifpp) { struct sockaddr_in6 dst_tmp = *dst_in; - u8 edst[MAX_ADDR_LEN]; in_port_t src_port; struct sockaddr *saddr; struct rtentry *rte; @@ -424,8 +441,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, if (rte == NULL) { error = EHOSTUNREACH; goto done; - } else if (rte->rt_ifp == NULL || rte->rt_ifp == V_loif || - RT_LINK_IS_UP(rte->rt_ifp) == 0) { + } else if (rte->rt_ifp == NULL || RT_LINK_IS_UP(rte->rt_ifp) == 0) { RTFREE_LOCKED(rte); error = EHOSTUNREACH; goto done; @@ -440,8 +456,14 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, /* Step 2 - find outgoing network interface */ switch (type) { case 0: - /* source check */ - ifp = ip6_dev_find(addr->net, src_in->sin6_addr); + /* check for loopback device */ + if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { + ifp = rte->rt_ifp; + dev_hold(ifp); + } else { + ifp = ip6_dev_find(addr->net, src_in->sin6_addr); + } + /* check source interface */ if (ifp == NULL) { error = ENETUNREACH; goto error_rt_free; @@ -451,10 +473,15 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, } break; case 1: + /* check for loopback device */ + if (rte->rt_ifp->if_flags & IFF_LOOPBACK) + saddr = (struct sockaddr *)&dst_tmp; + else + saddr = rte->rt_ifa->ifa_addr; + /* get destination network interface from route */ ifp = rte->rt_ifp; dev_hold(ifp); - saddr = rte->rt_ifa->ifa_addr; src_port = src_in->sin6_port; memcpy(src_in, saddr, rdma_addr_size(saddr)); @@ -472,9 +499,12 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, (struct sockaddr *)&dst_tmp); if (error != 0) goto error_put_ifp; + } else if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { + memset(edst, 0, MAX_ADDR_LEN); + error = 0; } else { bool is_gw = (rte->rt_flags & RTF_GATEWAY) != 0; - memset(edst, 0, sizeof(edst)); + memset(edst, 0, MAX_ADDR_LEN); error = nd6_resolve(ifp, is_gw, NULL, is_gw ? rte->rt_gateway : (const struct sockaddr *)&dst_tmp, edst, NULL, NULL); @@ -484,13 +514,6 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, addr->network = RDMA_NETWORK_IPV6; } - /* - * Step 4 - copy destination and source MAC addresses - */ - error = -rdma_copy_addr(addr, ifp, edst); - if (error != 0) - goto error_put_ifp; - if (rte != NULL) RTFREE(rte); @@ -513,6 +536,7 @@ done: static int addr6_resolve(struct sockaddr_in6 *src_in, const struct sockaddr_in6 *dst_in, struct rdma_dev_addr *addr, + u8 *edst, struct ifnet **ifpp) { return -EADDRNOTAVAIL; @@ -521,6 +545,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, static int addr_resolve_neigh(struct ifnet *dev, const struct sockaddr *dst_in, + u8 *edst, struct rdma_dev_addr *addr) { if (dev->if_flags & IFF_LOOPBACK) { @@ -536,7 +561,7 @@ static int addr_resolve_neigh(struct ifnet *dev, /* If the device doesn't do ARP internally */ if (!(dev->if_flags & IFF_NOARP)) - return 0; + return rdma_copy_addr(addr, dev, edst); return rdma_copy_addr(addr, dev, NULL); } @@ -547,6 +572,7 @@ static int addr_resolve(struct sockaddr *src_in, bool resolve_neigh) { struct net_device *ndev = NULL; + u8 edst[MAX_ADDR_LEN]; int ret; if (dst_in->sa_family != src_in->sa_family) @@ -555,21 +581,21 @@ static int addr_resolve(struct sockaddr *src_in, if (src_in->sa_family == AF_INET) { ret = addr4_resolve((struct sockaddr_in *)src_in, (const struct sockaddr_in *)dst_in, - addr, &ndev); + addr, edst, &ndev); if (ret) return ret; if (resolve_neigh) - ret = addr_resolve_neigh(ndev, dst_in, addr); + ret = addr_resolve_neigh(ndev, dst_in, edst, addr); } else { ret = addr6_resolve((struct sockaddr_in6 *)src_in, (const struct sockaddr_in6 *)dst_in, addr, - &ndev); + edst, &ndev); if (ret) return ret; if (resolve_neigh) - ret = addr_resolve_neigh(ndev, dst_in, addr); + ret = addr_resolve_neigh(ndev, dst_in, edst, addr); } addr->bound_dev_if = ndev->if_index; From owner-svn-src-all@freebsd.org Mon Mar 5 13:58:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B447AF31617; Mon, 5 Mar 2018 13:58:04 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F9F07AD5B; Mon, 5 Mar 2018 13:58:04 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41CDD24AF5; Mon, 5 Mar 2018 13:58:04 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25Dw4O5084650; Mon, 5 Mar 2018 13:58:04 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25Dw4U9084649; Mon, 5 Mar 2018 13:58:04 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803051358.w25Dw4U9084649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 5 Mar 2018 13:58:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330505 - stable/11/sys/libkern X-SVN-Group: stable-11 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/11/sys/libkern X-SVN-Commit-Revision: 330505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 13:58:05 -0000 Author: dab Date: Mon Mar 5 13:58:03 2018 New Revision: 330505 URL: https://svnweb.freebsd.org/changeset/base/330505 Log: MFC r330027 iconv uses strlen directly on user supplied memory `iconv_sysctl_add` from `sys/libkern/iconv.c` incorrectly limits the size of user strings, such that several out of bounds reads could have been possible. static int iconv_sysctl_add(SYSCTL_HANDLER_ARGS) { struct iconv_converter_class *dcp; struct iconv_cspair *csp; struct iconv_add_in din; struct iconv_add_out dout; int error; error = SYSCTL_IN(req, &din, sizeof(din)); if (error) return error; if (din.ia_version != ICONV_ADD_VER) return EINVAL; if (din.ia_datalen > ICONV_CSMAXDATALEN) return EINVAL; if (strlen(din.ia_from) >= ICONV_CSNMAXLEN) return EINVAL; if (strlen(din.ia_to) >= ICONV_CSNMAXLEN) return EINVAL; if (strlen(din.ia_converter) >= ICONV_CNVNMAXLEN) return EINVAL; ... Since the `din` struct is directly copied from userland, there is no guarantee that the strings supplied will be NULL terminated. The `strlen` calls could continue reading past the designated buffer sizes. Declaration of `struct iconv_add_in` is found in `sys/sys/iconv.h`: struct iconv_add_in { int ia_version; char ia_converter[ICONV_CNVNMAXLEN]; char ia_to[ICONV_CSNMAXLEN]; char ia_from[ICONV_CSNMAXLEN]; int ia_datalen; const void *ia_data; }; Our strings are followed by the `ia_datalen` member, which is checked before the `strlen` calls: if (din.ia_datalen > ICONV_CSMAXDATALEN) Since `ICONV_CSMAXDATALEN` has value `0x41000` (and is `unsigned`), this ensures that `din.ia_datalen` contains at least 1 byte of 0, so it is not possible to trigger a read out of bounds of the `struct` however, this code is fragile and could introduce subtle bugs in the future if the `struct` is ever modified. PR: 207302 Submitted by: CTurt Reported by: CTurt Sponsored by: Dell EMC Modified: stable/11/sys/libkern/iconv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/libkern/iconv.c ============================================================================== --- stable/11/sys/libkern/iconv.c Mon Mar 5 13:57:37 2018 (r330504) +++ stable/11/sys/libkern/iconv.c Mon Mar 5 13:58:03 2018 (r330505) @@ -411,11 +411,11 @@ iconv_sysctl_add(SYSCTL_HANDLER_ARGS) return EINVAL; if (din.ia_datalen > ICONV_CSMAXDATALEN) return EINVAL; - if (strlen(din.ia_from) >= ICONV_CSNMAXLEN) + if (strnlen(din.ia_from, sizeof(din.ia_from)) >= ICONV_CSNMAXLEN) return EINVAL; - if (strlen(din.ia_to) >= ICONV_CSNMAXLEN) + if (strnlen(din.ia_to, sizeof(din.ia_to)) >= ICONV_CSNMAXLEN) return EINVAL; - if (strlen(din.ia_converter) >= ICONV_CNVNMAXLEN) + if (strnlen(din.ia_converter, sizeof(din.ia_converter)) >= ICONV_CNVNMAXLEN) return EINVAL; if (iconv_lookupconv(din.ia_converter, &dcp) != 0) return EINVAL; From owner-svn-src-all@freebsd.org Mon Mar 5 14:22:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13D58F330B0; Mon, 5 Mar 2018 14:22:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B05127BCB7; Mon, 5 Mar 2018 14:22:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB39324FAB; Mon, 5 Mar 2018 14:22:36 +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 w25EMafM099062; Mon, 5 Mar 2018 14:22:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25EMah5099061; Mon, 5 Mar 2018 14:22:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051422.w25EMah5099061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 14:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330506 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 14:22:37 -0000 Author: hselasky Date: Mon Mar 5 14:22:36 2018 New Revision: 330506 URL: https://svnweb.freebsd.org/changeset/base/330506 Log: Pass valid if_index to rdma_addr_find_l2_eth_by_grh() in ibcore when possible. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Mar 5 13:58:03 2018 (r330505) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Mar 5 14:22:36 2018 (r330506) @@ -483,7 +483,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po return ret; if (rdma_protocol_roce(device, port_num)) { - int if_index = 0; + int if_index; u16 vlan_id = wc->wc_flags & IB_WC_WITH_VLAN ? wc->vlan_id : 0xffff; struct net_device *idev; @@ -498,6 +498,12 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po idev = device->get_netdev(device, port_num); if (!idev) return -ENODEV; + + /* + * Get network interface index early on. This is + * useful for IPv6 link local addresses: + */ + if_index = idev->if_index; ret = rdma_addr_find_l2_eth_by_grh(&dgid, &sgid, ah_attr->dmac, From owner-svn-src-all@freebsd.org Mon Mar 5 14:24:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3EF9F33228; Mon, 5 Mar 2018 14:24:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 521917BE48; Mon, 5 Mar 2018 14:24:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47E6C24FAC; Mon, 5 Mar 2018 14:24:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25EOVAu099175; Mon, 5 Mar 2018 14:24:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25EOUPC099171; Mon, 5 Mar 2018 14:24:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051424.w25EOUPC099171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 14:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330507 - in head/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/ofed: drivers/infiniband/core include/rdma X-SVN-Commit-Revision: 330507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 14:24:32 -0000 Author: hselasky Date: Mon Mar 5 14:24:30 2018 New Revision: 330507 URL: https://svnweb.freebsd.org/changeset/base/330507 Log: Get correct network device when accepting incoming RDMA connections in ibcore. This patch ensures the GID index is always used as a basis of resolving incoming RDMA connections, as compared to the GID value itself. Background: On a per infiniband port basis, the GID identifier is not a unique identifier! This assumption falls apart when VLAN ID, IPv6 scope ID and RoCE type, as supported by RoCE v2, is taken into account. This additional information is stored in the so-called GID attributes and is needed to correctly identify the destination network interface for an incoming connection. Different VLANs are allowed to define the same IPv4 addresses and especially for the default IPv6 link-local addresses or when using so-called containers or jails, this is true. The VNET information for the destination network interface is needed in order to perform the L2 address lookup in the right Virtual Network Stack context. Consequently old functions previously used by RoCE v1, like rdma_addr_find_smac_by_sgid() are impossible to support, because there can be multiple identical GIDs associated with the same infiniband port, and the answer to such a request becomes undefined. This function has been removed. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c head/sys/ofed/drivers/infiniband/core/ib_cma.c head/sys/ofed/drivers/infiniband/core/ib_verbs.c head/sys/ofed/include/rdma/ib_addr.h Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Mon Mar 5 14:22:36 2018 (r330506) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Mon Mar 5 14:24:30 2018 (r330507) @@ -151,8 +151,7 @@ int rdma_copy_addr(struct rdma_dev_addr *dev_addr, str EXPORT_SYMBOL(rdma_copy_addr); int rdma_translate_ip(const struct sockaddr *addr, - struct rdma_dev_addr *dev_addr, - u16 *vlan_id) + struct rdma_dev_addr *dev_addr) { struct net_device *dev = NULL; int ret = -EADDRNOTAVAIL; @@ -185,8 +184,6 @@ int rdma_translate_ip(const struct sockaddr *addr, if (dev != NULL) { ret = rdma_copy_addr(dev_addr, dev, NULL); - if (vlan_id) - *vlan_id = rdma_vlan_dev_vlan_id(dev); dev_put(dev); } return ret; @@ -305,6 +302,8 @@ static int addr4_resolve(struct sockaddr_in *src_in, if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { ifp = rte->rt_ifp; dev_hold(ifp); + } else if (addr->bound_dev_if != 0) { + ifp = dev_get_by_index(addr->net, addr->bound_dev_if); } else { ifp = ip_dev_find(addr->net, src_in->sin_addr.s_addr); } @@ -460,6 +459,8 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { ifp = rte->rt_ifp; dev_hold(ifp); + } else if (addr->bound_dev_if != 0) { + ifp = dev_get_by_index(addr->net, addr->bound_dev_if); } else { ifp = ip6_dev_find(addr->net, src_in->sin6_addr); } @@ -551,7 +552,7 @@ static int addr_resolve_neigh(struct ifnet *dev, if (dev->if_flags & IFF_LOOPBACK) { int ret; - ret = rdma_translate_ip(dst_in, addr, NULL); + ret = rdma_translate_ip(dst_in, addr); if (!ret) memcpy(addr->dst_dev_addr, addr->src_dev_addr, MAX_ADDR_LEN); @@ -757,13 +758,12 @@ static void resolve_cb(int status, struct sockaddr *sr int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid, const union ib_gid *dgid, - u8 *dmac, u16 *vlan_id, int *if_index, + u8 *dmac, struct net_device *dev, int *hoplimit) { int ret = 0; struct rdma_dev_addr dev_addr; struct resolve_cb_context ctx; - struct net_device *dev; union { struct sockaddr _sockaddr; @@ -771,15 +771,14 @@ int rdma_addr_find_l2_eth_by_grh(const union ib_gid *s struct sockaddr_in6 _sockaddr_in6; } sgid_addr, dgid_addr; - rdma_gid2ip(&sgid_addr._sockaddr, sgid); rdma_gid2ip(&dgid_addr._sockaddr, dgid); memset(&dev_addr, 0, sizeof(dev_addr)); - if (if_index) - dev_addr.bound_dev_if = *if_index; - dev_addr.net = TD_TO_VNET(curthread); + dev_addr.bound_dev_if = dev->if_index; + dev_addr.net = dev_net(dev); + ctx.addr = &dev_addr; init_completion(&ctx.comp); ret = rdma_resolve_ip(&self, &sgid_addr._sockaddr, &dgid_addr._sockaddr, @@ -794,42 +793,11 @@ int rdma_addr_find_l2_eth_by_grh(const union ib_gid *s return ret; memcpy(dmac, dev_addr.dst_dev_addr, ETH_ALEN); - dev = dev_get_by_index(dev_addr.net, dev_addr.bound_dev_if); - if (!dev) - return -ENODEV; - if (if_index) - *if_index = dev_addr.bound_dev_if; - if (vlan_id) - *vlan_id = rdma_vlan_dev_vlan_id(dev); if (hoplimit) *hoplimit = dev_addr.hoplimit; - dev_put(dev); return ret; } EXPORT_SYMBOL(rdma_addr_find_l2_eth_by_grh); - -int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id) -{ - int ret = 0; - struct rdma_dev_addr dev_addr; - union { - struct sockaddr _sockaddr; - struct sockaddr_in _sockaddr_in; - struct sockaddr_in6 _sockaddr_in6; - } gid_addr; - - rdma_gid2ip(&gid_addr._sockaddr, sgid); - - memset(&dev_addr, 0, sizeof(dev_addr)); - dev_addr.net = TD_TO_VNET(curthread); - ret = rdma_translate_ip(&gid_addr._sockaddr, &dev_addr, vlan_id); - if (ret) - return ret; - - memcpy(smac, dev_addr.src_dev_addr, ETH_ALEN); - return ret; -} -EXPORT_SYMBOL(rdma_addr_find_smac_by_sgid); int addr_init(void) { Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 14:22:36 2018 (r330506) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Mon Mar 5 14:24:30 2018 (r330507) @@ -533,7 +533,7 @@ static int cma_translate_addr(struct sockaddr *addr, s int ret; if (addr->sa_family != AF_IB) { - ret = rdma_translate_ip(addr, dev_addr, NULL); + ret = rdma_translate_ip(addr, dev_addr); } else { cma_translate_ib((struct sockaddr_ib *) addr, dev_addr); ret = 0; @@ -2094,7 +2094,7 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id, mutex_lock_nested(&conn_id->handler_mutex, SINGLE_DEPTH_NESTING); conn_id->state = RDMA_CM_CONNECT; - ret = rdma_translate_ip(laddr, &conn_id->id.route.addr.dev_addr, NULL); + ret = rdma_translate_ip(laddr, &conn_id->id.route.addr.dev_addr); if (ret) { mutex_unlock(&conn_id->handler_mutex); rdma_destroy_id(new_cm_id); Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Mar 5 14:22:36 2018 (r330506) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Mar 5 14:24:30 2018 (r330507) @@ -483,56 +483,29 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po return ret; if (rdma_protocol_roce(device, port_num)) { - int if_index; - u16 vlan_id = wc->wc_flags & IB_WC_WITH_VLAN ? + struct ib_gid_attr dgid_attr; + const u16 vlan_id = wc->wc_flags & IB_WC_WITH_VLAN ? wc->vlan_id : 0xffff; - struct net_device *idev; - struct net_device *resolved_dev; if (!(wc->wc_flags & IB_WC_GRH)) return -EPROTOTYPE; - if (!device->get_netdev) - return -EOPNOTSUPP; - - idev = device->get_netdev(device, port_num); - if (!idev) - return -ENODEV; - - /* - * Get network interface index early on. This is - * useful for IPv6 link local addresses: - */ - if_index = idev->if_index; - - ret = rdma_addr_find_l2_eth_by_grh(&dgid, &sgid, - ah_attr->dmac, - wc->wc_flags & IB_WC_WITH_VLAN ? - NULL : &vlan_id, - &if_index, &hoplimit); - if (ret) { - dev_put(idev); + ret = get_sgid_index_from_eth(device, port_num, vlan_id, + &dgid, gid_type, &gid_index); + if (ret) return ret; - } - resolved_dev = dev_get_by_index(&init_net, if_index); - if (resolved_dev->if_flags & IFF_LOOPBACK) { - dev_put(resolved_dev); - resolved_dev = idev; - dev_hold(resolved_dev); - } - rcu_read_lock(); - if (resolved_dev != idev && !rdma_is_upper_dev_rcu(idev, - resolved_dev)) - ret = -EHOSTUNREACH; - rcu_read_unlock(); - dev_put(idev); - dev_put(resolved_dev); + ret = ib_get_cached_gid(device, port_num, gid_index, &dgid, &dgid_attr); if (ret) return ret; - ret = get_sgid_index_from_eth(device, port_num, vlan_id, - &dgid, gid_type, &gid_index); + if (dgid_attr.ndev == NULL) + return -ENODEV; + + ret = rdma_addr_find_l2_eth_by_grh(&dgid, &sgid, ah_attr->dmac, + dgid_attr.ndev, &hoplimit); + + dev_put(dgid_attr.ndev); if (ret) return ret; } @@ -1207,7 +1180,6 @@ int ib_resolve_eth_dmac(struct ib_qp *qp, } else { union ib_gid sgid; struct ib_gid_attr sgid_attr; - int ifindex; int hop_limit; ret = ib_query_gid(qp->device, @@ -1221,12 +1193,10 @@ int ib_resolve_eth_dmac(struct ib_qp *qp, goto out; } - ifindex = sgid_attr.ndev->if_index; - ret = rdma_addr_find_l2_eth_by_grh(&sgid, &qp_attr->ah_attr.grh.dgid, qp_attr->ah_attr.dmac, - NULL, &ifindex, &hop_limit); + sgid_attr.ndev, &hop_limit); dev_put(sgid_attr.ndev); Modified: head/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- head/sys/ofed/include/rdma/ib_addr.h Mon Mar 5 14:22:36 2018 (r330506) +++ head/sys/ofed/include/rdma/ib_addr.h Mon Mar 5 14:24:30 2018 (r330507) @@ -95,10 +95,10 @@ struct rdma_dev_addr { * rdma_translate_ip - Translate a local IP address to an RDMA hardware * address. * - * The dev_addr->net field must be initialized. + * The dev_addr->net and dev_addr->bound_dev_if fields must be initialized. */ int rdma_translate_ip(const struct sockaddr *addr, - struct rdma_dev_addr *dev_addr, u16 *vlan_id); + struct rdma_dev_addr *dev_addr); /** * rdma_resolve_ip - Resolve source and destination IP addresses to @@ -134,10 +134,9 @@ int rdma_copy_addr(struct rdma_dev_addr *dev_addr, str int rdma_addr_size(struct sockaddr *addr); -int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id); int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid, const union ib_gid *dgid, - u8 *smac, u16 *vlan_id, int *if_index, + u8 *smac, struct net_device *dev, int *hoplimit); static inline u16 ib_addr_get_pkey(struct rdma_dev_addr *dev_addr) From owner-svn-src-all@freebsd.org Mon Mar 5 14:34:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 699E1F33DEE; Mon, 5 Mar 2018 14:34:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12C6F7C556; Mon, 5 Mar 2018 14:34:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0994225136; Mon, 5 Mar 2018 14:34:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25EYr26004405; Mon, 5 Mar 2018 14:34:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25EYqRb004391; Mon, 5 Mar 2018 14:34:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803051434.w25EYqRb004391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Mar 2018 14:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330508 - in head/sys: dev/cxgbe/iw_cxgbe dev/mlx4/mlx4_ib dev/mlx5/mlx5_ib dev/mthca ofed/drivers/infiniband/core ofed/include/rdma ofed/include/uapi/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: dev/cxgbe/iw_cxgbe dev/mlx4/mlx4_ib dev/mlx5/mlx5_ib dev/mthca ofed/drivers/infiniband/core ofed/include/rdma ofed/include/uapi/rdma X-SVN-Commit-Revision: 330508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 14:34:54 -0000 Author: hselasky Date: Mon Mar 5 14:34:52 2018 New Revision: 330508 URL: https://svnweb.freebsd.org/changeset/base/330508 Log: Optimize ibcore RoCE address handle creation from user-space. Creating a UD address handle from user-space or from the kernel-space, when the link layer is ethernet, requires resolving the remote L3 address into a L2 address. Doing this from the kernel is easy because the required ARP(IPv4) and ND6(IPv6) address resolving APIs are readily available. In userspace such an interface does not exist and kernel help is required. It should be noted that in an IP-based GID environment, the GID itself does not contain all the information needed to resolve the destination IP address. For example information like VLAN ID and SCOPE ID, is not part of the GID and must be fetched from the GID attributes. Therefore a source GID should always be referred to as a GID index. Instead of going through various racy steps to obtain information about the GID attributes from user-space, this is now all done by the kernel. This patch optimises the L3 to L2 address resolving using the existing create address handle uverbs interface, retrieving back the L2 address as an additional user-space information structure. This commit combines the following Linux upstream commits: IB/core: Let create_ah return extended response to user IB/core: Change ib_resolve_eth_dmac to use it in create AH IB/mlx5: Make create/destroy_ah available to userspace IB/mlx5: Use kernel driver to help userspace create ah IB/mlx5: Report that device has udata response in create_ah MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib.h head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h head/sys/dev/mlx5/mlx5_ib/mlx5_ib_ah.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c head/sys/dev/mthca/mthca_provider.c head/sys/ofed/drivers/infiniband/core/core_priv.h head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c head/sys/ofed/drivers/infiniband/core/ib_verbs.c head/sys/ofed/include/rdma/ib_verbs.h head/sys/ofed/include/uapi/rdma/mlx5-abi.h Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/provider.c Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/dev/cxgbe/iw_cxgbe/provider.c Mon Mar 5 14:34:52 2018 (r330508) @@ -59,7 +59,8 @@ static int c4iw_modify_port(struct ib_device *ibdev, } static struct ib_ah *c4iw_ah_create(struct ib_pd *pd, - struct ib_ah_attr *ah_attr) + struct ib_ah_attr *ah_attr, + struct ib_udata *udata) { return ERR_PTR(-ENOSYS); } Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib.h ============================================================================== --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib.h Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib.h Mon Mar 5 14:34:52 2018 (r330508) @@ -747,7 +747,8 @@ int mlx4_ib_arm_cq(struct ib_cq *cq, enum ib_cq_notify void __mlx4_ib_cq_clean(struct mlx4_ib_cq *cq, u32 qpn, struct mlx4_ib_srq *srq); void mlx4_ib_cq_clean(struct mlx4_ib_cq *cq, u32 qpn, struct mlx4_ib_srq *srq); -struct ib_ah *mlx4_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr); +struct ib_ah *mlx4_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr, + struct ib_udata *udata); int mlx4_ib_query_ah(struct ib_ah *ibah, struct ib_ah_attr *ah_attr); int mlx4_ib_destroy_ah(struct ib_ah *ah); Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c ============================================================================== --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_ah.c Mon Mar 5 14:34:52 2018 (r330508) @@ -129,7 +129,9 @@ static struct ib_ah *create_iboe_ah(struct ib_pd *pd, return &ah->ibah; } -struct ib_ah *mlx4_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr) +struct ib_ah *mlx4_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr, + struct ib_udata *udata) + { struct mlx4_ib_ah *ah; struct ib_ah *ret; Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Mon Mar 5 14:34:52 2018 (r330508) @@ -734,7 +734,8 @@ void mlx5_ib_free_srq_wqe(struct mlx5_ib_srq *srq, int int mlx5_MAD_IFC(struct mlx5_ib_dev *dev, int ignore_mkey, int ignore_bkey, u8 port, const struct ib_wc *in_wc, const struct ib_grh *in_grh, const void *in_mad, void *response_mad); -struct ib_ah *mlx5_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr); +struct ib_ah *mlx5_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr, + struct ib_udata *udata); int mlx5_ib_query_ah(struct ib_ah *ibah, struct ib_ah_attr *ah_attr); int mlx5_ib_destroy_ah(struct ib_ah *ah); struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_ah.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_ah.c Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_ah.c Mon Mar 5 14:34:52 2018 (r330508) @@ -59,7 +59,9 @@ static struct ib_ah *create_ib_ah(struct mlx5_ib_dev * return &ah->ibah; } -struct ib_ah *mlx5_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr) +struct ib_ah *mlx5_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr, + struct ib_udata *udata) + { struct mlx5_ib_ah *ah; struct mlx5_ib_dev *dev = to_mdev(pd->device); @@ -69,6 +71,27 @@ struct ib_ah *mlx5_ib_create_ah(struct ib_pd *pd, stru if (ll == IB_LINK_LAYER_ETHERNET && !(ah_attr->ah_flags & IB_AH_GRH)) return ERR_PTR(-EINVAL); + + if (ll == IB_LINK_LAYER_ETHERNET && udata) { + int err; + struct mlx5_ib_create_ah_resp resp = {}; + u32 min_resp_len = offsetof(typeof(resp), dmac) + + sizeof(resp.dmac); + + if (udata->outlen < min_resp_len) + return ERR_PTR(-EINVAL); + + resp.response_length = min_resp_len; + + err = ib_resolve_eth_dmac(pd->device, ah_attr); + if (err) + return ERR_PTR(err); + + memcpy(resp.dmac, ah_attr->dmac, ETH_ALEN); + err = ib_copy_to_udata(udata, &resp, resp.response_length); + if (err) + return ERR_PTR(err); + } ah = kzalloc(sizeof(*ah), GFP_ATOMIC); if (!ah) Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Mon Mar 5 14:34:52 2018 (r330508) @@ -1080,7 +1080,8 @@ static struct ib_ucontext *mlx5_ib_alloc_ucontext(stru resp.response_length += sizeof(resp.cqe_version); if (field_avail(typeof(resp), cmds_supp_uhw, udata->outlen)) { - resp.cmds_supp_uhw |= MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE; + resp.cmds_supp_uhw |= MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE | + MLX5_USER_CMDS_SUPP_UHW_CREATE_AH; resp.response_length += sizeof(resp.cmds_supp_uhw); } @@ -2974,6 +2975,8 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) (1ull << IB_USER_VERBS_CMD_QUERY_PORT) | (1ull << IB_USER_VERBS_CMD_ALLOC_PD) | (1ull << IB_USER_VERBS_CMD_DEALLOC_PD) | + (1ull << IB_USER_VERBS_CMD_CREATE_AH) | + (1ull << IB_USER_VERBS_CMD_DESTROY_AH) | (1ull << IB_USER_VERBS_CMD_REG_MR) | (1ull << IB_USER_VERBS_CMD_REREG_MR) | (1ull << IB_USER_VERBS_CMD_DEREG_MR) | Modified: head/sys/dev/mthca/mthca_provider.c ============================================================================== --- head/sys/dev/mthca/mthca_provider.c Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/dev/mthca/mthca_provider.c Mon Mar 5 14:34:52 2018 (r330508) @@ -409,7 +409,8 @@ static int mthca_dealloc_pd(struct ib_pd *pd) } static struct ib_ah *mthca_ah_create(struct ib_pd *pd, - struct ib_ah_attr *ah_attr) + struct ib_ah_attr *ah_attr, + struct ib_udata *udata) { int err; struct mthca_ah *ah; Modified: head/sys/ofed/drivers/infiniband/core/core_priv.h ============================================================================== --- head/sys/ofed/drivers/infiniband/core/core_priv.h Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/ofed/drivers/infiniband/core/core_priv.h Mon Mar 5 14:34:52 2018 (r330508) @@ -78,9 +78,6 @@ void ib_device_unregister_sysfs(struct ib_device *devi void ib_cache_setup(void); void ib_cache_cleanup(void); -int ib_resolve_eth_dmac(struct ib_qp *qp, - struct ib_qp_attr *qp_attr, int *qp_attr_mask); - typedef void (*roce_netdev_callback)(struct ib_device *device, u8 port, struct net_device *idev, void *cookie); Modified: head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c Mon Mar 5 14:34:52 2018 (r330508) @@ -2409,9 +2409,11 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *fil attr->alt_ah_attr.port_num = cmd.alt_dest.port_num; if (qp->real_qp == qp) { - ret = ib_resolve_eth_dmac(qp, attr, &cmd.attr_mask); - if (ret) - goto release_qp; + if (cmd.attr_mask & IB_QP_AV) { + ret = ib_resolve_eth_dmac(qp->device, &attr->ah_attr); + if (ret) + goto release_qp; + } ret = qp->device->modify_qp(qp, attr, modify_qp_mask(qp->qp_type, cmd.attr_mask), &udata); } else { @@ -2882,6 +2884,7 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *fil struct ib_ah *ah; struct ib_ah_attr attr; int ret; + struct ib_udata udata; if (out_len < sizeof resp) return -ENOSPC; @@ -2889,6 +2892,10 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *fil if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long)cmd.response + sizeof(resp), + in_len - sizeof(cmd), out_len - sizeof(resp)); + uobj = kmalloc(sizeof *uobj, GFP_KERNEL); if (!uobj) return -ENOMEM; @@ -2915,12 +2922,16 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *fil memset(&attr.dmac, 0, sizeof(attr.dmac)); memcpy(attr.grh.dgid.raw, cmd.attr.grh.dgid, 16); - ah = ib_create_ah(pd, &attr); + ah = pd->device->create_ah(pd, &attr, &udata); + if (IS_ERR(ah)) { ret = PTR_ERR(ah); goto err_put; } + ah->device = pd->device; + ah->pd = pd; + atomic_inc(&pd->usecnt); ah->uobject = uobj; uobj->object = ah; Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c Mon Mar 5 14:34:52 2018 (r330508) @@ -321,7 +321,7 @@ struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib { struct ib_ah *ah; - ah = pd->device->create_ah(pd, ah_attr); + ah = pd->device->create_ah(pd, ah_attr, NULL); if (!IS_ERR(ah)) { ah->device = pd->device; @@ -1161,47 +1161,45 @@ int ib_modify_qp_is_ok(enum ib_qp_state cur_state, enu } EXPORT_SYMBOL(ib_modify_qp_is_ok); -int ib_resolve_eth_dmac(struct ib_qp *qp, - struct ib_qp_attr *qp_attr, int *qp_attr_mask) +int ib_resolve_eth_dmac(struct ib_device *device, + struct ib_ah_attr *ah_attr) { int ret = 0; - if (*qp_attr_mask & IB_QP_AV) { - if (qp_attr->ah_attr.port_num < rdma_start_port(qp->device) || - qp_attr->ah_attr.port_num > rdma_end_port(qp->device)) - return -EINVAL; + if (ah_attr->port_num < rdma_start_port(device) || + ah_attr->port_num > rdma_end_port(device)) + return -EINVAL; - if (!rdma_cap_eth_ah(qp->device, qp_attr->ah_attr.port_num)) - return 0; + if (!rdma_cap_eth_ah(device, ah_attr->port_num)) + return 0; - if (rdma_link_local_addr((struct in6_addr *)qp_attr->ah_attr.grh.dgid.raw)) { - rdma_get_ll_mac((struct in6_addr *)qp_attr->ah_attr.grh.dgid.raw, - qp_attr->ah_attr.dmac); - } else { - union ib_gid sgid; - struct ib_gid_attr sgid_attr; - int hop_limit; + if (rdma_link_local_addr((struct in6_addr *)ah_attr->grh.dgid.raw)) { + rdma_get_ll_mac((struct in6_addr *)ah_attr->grh.dgid.raw, + ah_attr->dmac); + } else { + union ib_gid sgid; + struct ib_gid_attr sgid_attr; + int hop_limit; - ret = ib_query_gid(qp->device, - qp_attr->ah_attr.port_num, - qp_attr->ah_attr.grh.sgid_index, - &sgid, &sgid_attr); + ret = ib_query_gid(device, + ah_attr->port_num, + ah_attr->grh.sgid_index, + &sgid, &sgid_attr); - if (ret || !sgid_attr.ndev) { - if (!ret) - ret = -ENXIO; - goto out; - } + if (ret || !sgid_attr.ndev) { + if (!ret) + ret = -ENXIO; + goto out; + } - ret = rdma_addr_find_l2_eth_by_grh(&sgid, - &qp_attr->ah_attr.grh.dgid, - qp_attr->ah_attr.dmac, - sgid_attr.ndev, &hop_limit); + ret = rdma_addr_find_l2_eth_by_grh(&sgid, + &ah_attr->grh.dgid, + ah_attr->dmac, + sgid_attr.ndev, &hop_limit); - dev_put(sgid_attr.ndev); + dev_put(sgid_attr.ndev); - qp_attr->ah_attr.grh.hop_limit = hop_limit; - } + ah_attr->grh.hop_limit = hop_limit; } out: return ret; @@ -1213,11 +1211,13 @@ int ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr, int qp_attr_mask) { - int ret; + if (qp_attr_mask & IB_QP_AV) { + int ret; - ret = ib_resolve_eth_dmac(qp, qp_attr, &qp_attr_mask); - if (ret) - return ret; + ret = ib_resolve_eth_dmac(qp->device, &qp_attr->ah_attr); + if (ret) + return ret; + } return qp->device->modify_qp(qp->real_qp, qp_attr, qp_attr_mask, NULL); } Modified: head/sys/ofed/include/rdma/ib_verbs.h ============================================================================== --- head/sys/ofed/include/rdma/ib_verbs.h Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/ofed/include/rdma/ib_verbs.h Mon Mar 5 14:34:52 2018 (r330508) @@ -1937,7 +1937,8 @@ struct ib_device { struct ib_udata *udata); int (*dealloc_pd)(struct ib_pd *pd); struct ib_ah * (*create_ah)(struct ib_pd *pd, - struct ib_ah_attr *ah_attr); + struct ib_ah_attr *ah_attr, + struct ib_udata *udata); int (*modify_ah)(struct ib_ah *ah, struct ib_ah_attr *ah_attr); int (*query_ah)(struct ib_ah *ah, @@ -3360,4 +3361,7 @@ int ib_sg_to_pages(struct ib_mr *mr, struct scatterlis void ib_drain_rq(struct ib_qp *qp); void ib_drain_sq(struct ib_qp *qp); void ib_drain_qp(struct ib_qp *qp); + +int ib_resolve_eth_dmac(struct ib_device *device, + struct ib_ah_attr *ah_attr); #endif /* IB_VERBS_H */ Modified: head/sys/ofed/include/uapi/rdma/mlx5-abi.h ============================================================================== --- head/sys/ofed/include/uapi/rdma/mlx5-abi.h Mon Mar 5 14:24:30 2018 (r330507) +++ head/sys/ofed/include/uapi/rdma/mlx5-abi.h Mon Mar 5 14:34:52 2018 (r330508) @@ -90,6 +90,7 @@ enum mlx5_ib_alloc_ucontext_resp_mask { enum mlx5_user_cmds_supp_uhw { MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0, + MLX5_USER_CMDS_SUPP_UHW_CREATE_AH = 1 << 1, }; struct mlx5_ib_alloc_ucontext_resp { @@ -238,6 +239,12 @@ struct mlx5_ib_create_wq { __u32 flags; __u32 comp_mask; __u32 reserved; +}; + +struct mlx5_ib_create_ah_resp { + __u32 response_length; + __u8 dmac[ETH_ALEN]; + __u8 reserved[6]; }; struct mlx5_ib_create_wq_resp { From owner-svn-src-all@freebsd.org Mon Mar 5 15:10:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49741F3689D; Mon, 5 Mar 2018 15:10:18 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECF197DB21; Mon, 5 Mar 2018 15:10:17 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E631E2562B; Mon, 5 Mar 2018 15:10:17 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25FAHvl019370; Mon, 5 Mar 2018 15:10:17 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25FAHVl019369; Mon, 5 Mar 2018 15:10:17 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201803051510.w25FAHVl019369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Mon, 5 Mar 2018 15:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330510 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 330510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 15:10:18 -0000 Author: jtl Date: Mon Mar 5 15:10:17 2018 New Revision: 330510 URL: https://svnweb.freebsd.org/changeset/base/330510 Log: Prior to r329071, pmap_bootstrap() used pmap_kmem_choose() to round the first available virtual address to a 2MB boundary. After r329071, create_pagetables() rounds firstaddr up to a 2MB boundary. This ensures the kernel is mapped in super-pages, which is the point of the logic in pmap_kmem_choose(). Therefore, it is no longer necessary for pmap_bootstrap() to round up to the 2MB boundary again. As pmap_bootstrap() was the only user of pmap_kmem_choose(), we can delete pmap_kmem_choose(). Reviewed by: kib MFC after: 2 weeks X-MFC-with: r329071 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14355 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Mar 5 14:54:01 2018 (r330509) +++ head/sys/amd64/amd64/pmap.c Mon Mar 5 15:10:17 2018 (r330510) @@ -687,23 +687,7 @@ static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_ static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free); static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, struct spglist *); -static vm_offset_t pmap_kmem_choose(vm_offset_t addr); -/* - * Move the kernel virtual free pointer to the next - * 2MB. This is used to help improve performance - * by using a large (2MB) page for much of the kernel - * (.text, .data, .bss) - */ -static vm_offset_t -pmap_kmem_choose(vm_offset_t addr) -{ - vm_offset_t newaddr = addr; - - newaddr = roundup2(addr, NBPDR); - return (newaddr); -} - /********************/ /* Inline functions */ /********************/ @@ -1049,7 +1033,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) vm_phys_add_seg(KPTphys, KPTphys + ptoa(nkpt)); virtual_avail = (vm_offset_t) KERNBASE + *firstaddr; - virtual_avail = pmap_kmem_choose(virtual_avail); virtual_end = VM_MAX_KERNEL_ADDRESS; From owner-svn-src-all@freebsd.org Mon Mar 5 15:12:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 039DFF36D12; Mon, 5 Mar 2018 15:12:36 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A91D17E036; Mon, 5 Mar 2018 15:12:35 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3ABB257B6; Mon, 5 Mar 2018 15:12:35 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25FCZb4024348; Mon, 5 Mar 2018 15:12:35 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25FCZEW024347; Mon, 5 Mar 2018 15:12:35 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201803051512.w25FCZEW024347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Mon, 5 Mar 2018 15:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330511 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 330511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 15:12:36 -0000 Author: jtl Date: Mon Mar 5 15:12:35 2018 New Revision: 330511 URL: https://svnweb.freebsd.org/changeset/base/330511 Log: We shouldn't need to execute code in the recursive page table mappings; therefore, it should be safe to set the NX bit on the PML4E for the recursive page table mappings. According to the Intel docs, the effect of the NX bit should propogate to any page reached through a PML4E which has the NX bit set. Reviewed by: kib, markj MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14333 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Mar 5 15:10:17 2018 (r330510) +++ head/sys/amd64/amd64/pmap.c Mon Mar 5 15:12:35 2018 (r330511) @@ -983,7 +983,7 @@ create_pagetables(vm_paddr_t *firstaddr) /* And recursively map PML4 to itself in order to get PTmap */ p4_p = (pml4_entry_t *)KPML4phys; p4_p[PML4PML4I] = KPML4phys; - p4_p[PML4PML4I] |= X86_PG_RW | X86_PG_V | PG_U; + p4_p[PML4PML4I] |= X86_PG_RW | X86_PG_V | PG_U | pg_nx; /* Connect the Direct Map slot(s) up to the PML4. */ for (i = 0; i < ndmpdpphys; i++) { From owner-svn-src-all@freebsd.org Mon Mar 5 15:25:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3572EF37C72; Mon, 5 Mar 2018 15:25:07 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80FD57E83C; Mon, 5 Mar 2018 15:25:06 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (75-173-115-219.albq.qwest.net [75.173.115.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id BEF3D192830; Mon, 5 Mar 2018 07:02:16 +0000 (UTC) Subject: Re: svn commit: r330445 - in stable/11/sys/netinet: . cc tcp_stacks To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201803050652.w256qQvu071205@repo.freebsd.org> From: Sean Bruno Message-ID: <21d58c93-0a5a-8dae-376c-516526fba747@freebsd.org> Date: Mon, 5 Mar 2018 08:25:02 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803050652.w256qQvu071205@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="r98E0ltgiJOW2l3KafORGNVJ4g3aNIF3o" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 15:25:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --r98E0ltgiJOW2l3KafORGNVJ4g3aNIF3o Content-Type: multipart/mixed; boundary="7NO6evRwyiLYUVIzT5C9PKohcSKUInSoH"; protected-headers="v1" From: Sean Bruno To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Message-ID: <21d58c93-0a5a-8dae-376c-516526fba747@freebsd.org> Subject: Re: svn commit: r330445 - in stable/11/sys/netinet: . cc tcp_stacks References: <201803050652.w256qQvu071205@repo.freebsd.org> In-Reply-To: <201803050652.w256qQvu071205@repo.freebsd.org> --7NO6evRwyiLYUVIzT5C9PKohcSKUInSoH Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 03/04/18 23:52, Eitan Adler wrote: > Author: eadler > Date: Mon Mar 5 06:52:26 2018 > New Revision: 330445 > URL: https://svnweb.freebsd.org/changeset/base/330445 >=20 > Log: > MFC r307901,r308180: This commit was reverted at r321480 and should not have been MFC'd. Want me to revert this? sean --7NO6evRwyiLYUVIzT5C9PKohcSKUInSoH-- --r98E0ltgiJOW2l3KafORGNVJ4g3aNIF3o Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAlqdYU5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 /LZvRwgAgAC3o3HAmW8y6s4t6lX/xpm1m5h1NjYfekQYQtPXYXYqbgjIl6SrnwGX W1mobDbMRz0g6MknXJQLaWtp+AxaHDhYtm4YpN2OuXi0e6+hDH957pU/XwojqX0+ 0ZweCUM1JvFovCHHo3vf6zcFK/g00/EXs9GAwbtEMQaxxCZLoITTLrXZXQoY0EzR xm53t1RSzTcWY9fiDxCheXgt0LfB5NxR4RRQwoVolaNIhlAnLVlpgnZG8o+1t32q HI9grFOJXRALkhIzUoPnX7a0MR59nJd1QDLLliGgIZWplyJsN4c4jHtL81YTLAdf z8P6IGFoSHwyTI5EenrbwxqFebNtXA== =HCLA -----END PGP SIGNATURE----- --r98E0ltgiJOW2l3KafORGNVJ4g3aNIF3o-- From owner-svn-src-all@freebsd.org Mon Mar 5 16:00:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B3E5F3AA0F; Mon, 5 Mar 2018 16:00:06 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3230F7FCE0; Mon, 5 Mar 2018 16:00:06 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E3F925E38; Mon, 5 Mar 2018 16:00:06 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25G05QA044280; Mon, 5 Mar 2018 16:00:05 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25G05E8044279; Mon, 5 Mar 2018 16:00:05 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803051600.w25G05E8044279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 5 Mar 2018 16:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330512 - stable/10/sys/libkern X-SVN-Group: stable-10 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/10/sys/libkern X-SVN-Commit-Revision: 330512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 16:00:06 -0000 Author: dab Date: Mon Mar 5 16:00:05 2018 New Revision: 330512 URL: https://svnweb.freebsd.org/changeset/base/330512 Log: MFC r330027 iconv uses strlen directly on user supplied memory `iconv_sysctl_add` from `sys/libkern/iconv.c` incorrectly limits the size of user strings, such that several out of bounds reads could have been possible. static int iconv_sysctl_add(SYSCTL_HANDLER_ARGS) { struct iconv_converter_class *dcp; struct iconv_cspair *csp; struct iconv_add_in din; struct iconv_add_out dout; int error; error = SYSCTL_IN(req, &din, sizeof(din)); if (error) return error; if (din.ia_version != ICONV_ADD_VER) return EINVAL; if (din.ia_datalen > ICONV_CSMAXDATALEN) return EINVAL; if (strlen(din.ia_from) >= ICONV_CSNMAXLEN) return EINVAL; if (strlen(din.ia_to) >= ICONV_CSNMAXLEN) return EINVAL; if (strlen(din.ia_converter) >= ICONV_CNVNMAXLEN) return EINVAL; ... Since the `din` struct is directly copied from userland, there is no guarantee that the strings supplied will be NULL terminated. The `strlen` calls could continue reading past the designated buffer sizes. Declaration of `struct iconv_add_in` is found in `sys/sys/iconv.h`: struct iconv_add_in { int ia_version; char ia_converter[ICONV_CNVNMAXLEN]; char ia_to[ICONV_CSNMAXLEN]; char ia_from[ICONV_CSNMAXLEN]; int ia_datalen; const void *ia_data; }; Our strings are followed by the `ia_datalen` member, which is checked before the `strlen` calls: if (din.ia_datalen > ICONV_CSMAXDATALEN) Since `ICONV_CSMAXDATALEN` has value `0x41000` (and is `unsigned`), this ensures that `din.ia_datalen` contains at least 1 byte of 0, so it is not possible to trigger a read out of bounds of the `struct` however, this code is fragile and could introduce subtle bugs in the future if the `struct` is ever modified. PR: 207302 Submitted by: CTurt Reported by: CTurt Sponsored by: Dell EMC Modified: stable/10/sys/libkern/iconv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/libkern/iconv.c ============================================================================== --- stable/10/sys/libkern/iconv.c Mon Mar 5 15:12:35 2018 (r330511) +++ stable/10/sys/libkern/iconv.c Mon Mar 5 16:00:05 2018 (r330512) @@ -411,11 +411,11 @@ iconv_sysctl_add(SYSCTL_HANDLER_ARGS) return EINVAL; if (din.ia_datalen > ICONV_CSMAXDATALEN) return EINVAL; - if (strlen(din.ia_from) >= ICONV_CSNMAXLEN) + if (strnlen(din.ia_from, sizeof(din.ia_from)) >= ICONV_CSNMAXLEN) return EINVAL; - if (strlen(din.ia_to) >= ICONV_CSNMAXLEN) + if (strnlen(din.ia_to, sizeof(din.ia_to)) >= ICONV_CSNMAXLEN) return EINVAL; - if (strlen(din.ia_converter) >= ICONV_CNVNMAXLEN) + if (strnlen(din.ia_converter, sizeof(din.ia_converter)) >= ICONV_CNVNMAXLEN) return EINVAL; if (iconv_lookupconv(din.ia_converter, &dcp) != 0) return EINVAL; From owner-svn-src-all@freebsd.org Mon Mar 5 16:07:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CAEBF3B431; Mon, 5 Mar 2018 16:07:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BE1C802A2; Mon, 5 Mar 2018 16:07:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0271A25FDA; Mon, 5 Mar 2018 16:07:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25G7t3B048956; Mon, 5 Mar 2018 16:07:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25G7t9w048954; Mon, 5 Mar 2018 16:07:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201803051607.w25G7t9w048954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 5 Mar 2018 16:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r330513 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: kib X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 330513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 16:07:56 -0000 Author: kib Date: Mon Mar 5 16:07:55 2018 New Revision: 330513 URL: https://svnweb.freebsd.org/changeset/base/330513 Log: Add Slava Shwartsman to src committers. Hans Petter Selasky is co-mentor. This is a vendor commit bit, requested by Mellanox Technologies. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Mar 5 16:00:05 2018 (r330512) +++ svnadmin/conf/access Mon Mar 5 16:07:55 2018 (r330513) @@ -197,6 +197,7 @@ shurd silby sjg skra +slavash slm smh sobomax Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Mar 5 16:00:05 2018 (r330512) +++ svnadmin/conf/mentors Mon Mar 5 16:07:55 2018 (r330513) @@ -26,5 +26,6 @@ mahrens mckusick mjoras rstone peterj jhb Co-mentor: grog rgrimes grehan +slavash kib Co-mentor: hselasky slm ken Co-mentor: scottl, ambrisko wosch cem From owner-svn-src-all@freebsd.org Mon Mar 5 16:11:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C630F3B92D; Mon, 5 Mar 2018 16:11:08 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF768805D6; Mon, 5 Mar 2018 16:11:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA862260F9; Mon, 5 Mar 2018 16:11:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25GB7I9052109; Mon, 5 Mar 2018 16:11:07 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25GB72e052107; Mon, 5 Mar 2018 16:11:07 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803051611.w25GB72e052107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 5 Mar 2018 16:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330514 - head/libexec/rpc.sprayd X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/libexec/rpc.sprayd X-SVN-Commit-Revision: 330514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 16:11:08 -0000 Author: asomers Date: Mon Mar 5 16:11:07 2018 New Revision: 330514 URL: https://svnweb.freebsd.org/changeset/base/330514 Log: rpc.sprayd: raise WARNS to 6 MFC after: 3 weeks Modified: head/libexec/rpc.sprayd/Makefile head/libexec/rpc.sprayd/sprayd.c Modified: head/libexec/rpc.sprayd/Makefile ============================================================================== --- head/libexec/rpc.sprayd/Makefile Mon Mar 5 16:07:55 2018 (r330513) +++ head/libexec/rpc.sprayd/Makefile Mon Mar 5 16:11:07 2018 (r330514) @@ -6,6 +6,4 @@ MAN = rpc.sprayd.8 LIBADD= rpcsvc -WARNS?= 2 - .include Modified: head/libexec/rpc.sprayd/sprayd.c ============================================================================== --- head/libexec/rpc.sprayd/sprayd.c Mon Mar 5 16:07:55 2018 (r330513) +++ head/libexec/rpc.sprayd/sprayd.c Mon Mar 5 16:11:07 2018 (r330514) @@ -58,21 +58,21 @@ static int from_inetd = 1; #define TIMEOUT 120 -void +static void cleanup(int sig __unused) { (void)rpcb_unset(SPRAYPROG, SPRAYVERS, NULL); exit(0); } -void +static void die(int sig __unused) { exit(0); } int -main(int argc, char *argv[]) +main(int argc __unused, char *argv[] __unused) { SVCXPRT *transp; int ok; From owner-svn-src-all@freebsd.org Mon Mar 5 16:13:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85962F3BBF3; Mon, 5 Mar 2018 16:13:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 292388089C; Mon, 5 Mar 2018 16:13:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2155626167; Mon, 5 Mar 2018 16:13:30 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25GDT2k053815; Mon, 5 Mar 2018 16:13:29 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25GDTel053814; Mon, 5 Mar 2018 16:13:29 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803051613.w25GDTel053814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 5 Mar 2018 16:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330515 - head/usr.sbin/spray X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/usr.sbin/spray X-SVN-Commit-Revision: 330515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 16:13:30 -0000 Author: asomers Date: Mon Mar 5 16:13:29 2018 New Revision: 330515 URL: https://svnweb.freebsd.org/changeset/base/330515 Log: spray: fix the spelling in an output string MFC after: 3 weeks Modified: head/usr.sbin/spray/spray.c Modified: head/usr.sbin/spray/spray.c ============================================================================== --- head/usr.sbin/spray/spray.c Mon Mar 5 16:11:07 2018 (r330514) +++ head/usr.sbin/spray/spray.c Mon Mar 5 16:13:29 2018 (r330515) @@ -145,7 +145,7 @@ main(int argc, char *argv[]) /* Spray server with packets */ - printf ("sending %u packets of lnth %d to %s ...", count, length, + printf ("sending %u packets of length %d to %s ...", count, length, *argv); fflush (stdout); From owner-svn-src-all@freebsd.org Mon Mar 5 16:14:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84891F3BCB3; Mon, 5 Mar 2018 16:14:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FE96809D9; Mon, 5 Mar 2018 16:14:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io0-x235.google.com with SMTP id g21so18537225ioj.5; Mon, 05 Mar 2018 08:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tmhl+4VFksFcsotEfVlbaYTWOkye/uuWlTtJ02CVkg4=; b=qUVy4r+qDzJP9I6LvpDZcCBJ+4xxsQ5cg6w8s7H0BKASXI/Miwo9OVE+bUhCDQ5E1/ ldPdPW5endFJJ7Z6xs/3ZbsTeXER5G+K6geXxZxJgkSVcuym60PqOXNcvrBvzwf4JXXk LkUSHW4i97SzMgR5nzAqqWy+ZAeuw3cCUmEP25asVJSPgEMVLgAOKWyNKCt9TpwuGSZ0 Mzfw5To83rnYTN1sDWm6hEDBYNqcDNGj6YMRtS6v6KmxvUHMItvZpcl1AXGS+zOGcmLq mDGvFrMMhWIuSpwPM8+wkqQza37FGpp7BTqCq8RTFrG5Hn9PvBckG3MwPNzUd8OQg67W eXbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=tmhl+4VFksFcsotEfVlbaYTWOkye/uuWlTtJ02CVkg4=; b=TpUzIbI2tG6cu+Pq5gzcJPD0Ntm6p+igPH7FvGwa8y/iSC4I7WTch0WDOf/Foe+tvw jh+MEKyGi7nyvUQkC9CoLjXZJOoXm1lb/kKf/NTDF3zkP+1KfH/QW3wOq9u2he5zKeR+ QvyP6Lenygdp5PAoHygi4X2XqTuVzfsqfVMf2Z7f6WMJS+7ElLtfK+ouTzflzNeHfpy9 VcrMMg8Pq9ezTLVF/Eb9K8XnLYGTrOmmjTDfMEKWfeExa6O3eCMidGd+05mQju1IjPCa NiW1oVlZhnxkFDePN09cZwQBonH86TtZ9nbrYrq7X+jkL/3THM4AR/Z2M0dMEgYnFCY1 x7+g== X-Gm-Message-State: APf1xPDPqJOcUuBe2d/DTUvUAbG1AYerMEYSueWYkgB8BivMx280CQBf yg+M/fR8sIKIqSKj6HKhRSkKvA== X-Google-Smtp-Source: AG47ELuYU4xAmVEFHZfVbRnxAE26NQ3HsdDuoVyb+1s4KVt/C42od3HGzDVwJlR2k+8s207Zx1GmlA== X-Received: by 10.107.131.82 with SMTP id f79mr17731259iod.102.1520266444151; Mon, 05 Mar 2018 08:14:04 -0800 (PST) Received: from raichu (toroon0560w-lp130-01-174-88-76-226.dsl.bell.ca. [174.88.76.226]) by smtp.gmail.com with ESMTPSA id k76sm4963445ita.32.2018.03.05.08.14.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 08:14:03 -0800 (PST) Sender: Mark Johnston Date: Mon, 5 Mar 2018 11:13:58 -0500 From: Mark Johnston To: Mariusz Zaborski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325739 - in head: lib/libcasper/services lib/libcasper/services/cap_syslog share/mk Message-ID: <20180305161358.GA704@raichu> References: <201711120834.vAC8YQUq006611@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201711120834.vAC8YQUq006611@repo.freebsd.org> User-Agent: Mutt/1.9.3 (2018-01-21) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 16:14:05 -0000 On Sun, Nov 12, 2017 at 08:34:26AM +0000, Mariusz Zaborski wrote: > Author: oshogbo > Date: Sun Nov 12 08:34:25 2017 > New Revision: 325739 > URL: https://svnweb.freebsd.org/changeset/base/325739 > > Log: > Introduce syslog service for Casper. > > syslog in libc secretly reconnects to the daemon. > Another issue is that we don't have any information from openlog(3) if we > succeeded to open log or not so we don't know if we are ready > to enter cabability mode. > Because all of that we decided we need a syslog service for Caspser. Hi, Do you plan to MFC this or any of the other recent changes to libcasper? The growing divergence with stable/11 makes it rather painful to maintain a port, depending on libcasper, that aims to work on both 11 and head. From owner-svn-src-all@freebsd.org Mon Mar 5 16:38:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AD58F3D947; Mon, 5 Mar 2018 16:38:03 +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 B419C81AA7; Mon, 5 Mar 2018 16:38:02 +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 6D8E51CC46; Mon, 5 Mar 2018 16:38:02 +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 2C4CB113A; Mon, 5 Mar 2018 16:38:01 +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 mpyh5rfIkH5n; Mon, 5 Mar 2018 16:37:58 +0000 (UTC) Subject: Re: svn commit: r330436 - head/bin/chflags DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 8A2D61135 To: Bruce Evans , Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803050156.w251u7Y8020941@repo.freebsd.org> <1520215860.38056.3.camel@freebsd.org> <20180305140228.P935@besplex.bde.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Mon, 5 Mar 2018 08:37:58 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180305140228.P935@besplex.bde.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EXNBP6NHEphxYPszBEMjUwEYkFEbwxtMd" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 16:38:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EXNBP6NHEphxYPszBEMjUwEYkFEbwxtMd Content-Type: multipart/mixed; boundary="nfyizFNlDLrVdEOF1v75JkIMKxLEUuwwp"; protected-headers="v1" From: Bryan Drewery To: Bruce Evans , Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r330436 - head/bin/chflags References: <201803050156.w251u7Y8020941@repo.freebsd.org> <1520215860.38056.3.camel@freebsd.org> <20180305140228.P935@besplex.bde.org> In-Reply-To: <20180305140228.P935@besplex.bde.org> --nfyizFNlDLrVdEOF1v75JkIMKxLEUuwwp Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 3/4/2018 8:30 PM, Bruce Evans wrote: > On Sun, 4 Mar 2018, Ian Lepore wrote: >=20 >> On Mon, 2018-03-05 at 01:56 +0000, Bryan Drewery wrote: >>> >>> Log: >>> \xa0 chflags: Add -x option to not traverse mount points. >> >> Yay! \xa0One day later than I needed it, but still, yay! >=20 > I recently noticed that find(1) needs an option to not look at mount > points at all, and further options to classify mount points so that > you can prune them. >=20 > After reading the above and investigating further, I noticed that -x > is broken in most FreeBSD utilities, since POSIX requires not looking > at mount points at all for the few utilities that support -x.=C2=A0 E.g= =2E, > for du in 2001 draft 7 POSIX: >=20 > 12578=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= -x=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Whe= n evaluating file sizes, evaluate only > those files that have the same device as > 12579=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 the file specified by the file operand. > 12580=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Specifying more than one of the mutually-exclusive > options -H and -L shall not be considered Yes I'm quite annoyed that my workaround for chflags not having -x, using `find -x ... -exec chflags`, is still trying to modify mountpoints but not descending into them. >=20 > Mount points are on a different device, but FreeBSD du -x is broken by > using FTS_XDEV and not filtering out the mount points. Linux du -x > (an old version in /compat/linyx/usr/bin) works correctly. --=20 Regards, Bryan Drewery --nfyizFNlDLrVdEOF1v75JkIMKxLEUuwwp-- --EXNBP6NHEphxYPszBEMjUwEYkFEbwxtMd 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 iQEcBAEBAgAGBQJanXJnAAoJEDXXcbtuRpfP3OAIAJgz2iFO/vuWWpMfUZ8/3R57 LYWSyO+T5krJMg+qtLmrnbN3VKmFyktNgZszSuLa3qiVzFcaTTJiFDom9kqWxhlb Mp9WUn0JTm4nZB05IgGzMwsgdsx6c6hsuG7CXU/nZ6vARJywoV0jGvvEqzq91F6V qq1euJmc4VRky0m6b2Tl8ex2t7gU1Dg6XQKAHBW1Ug0A96bCr1hDoZJitPZ2trgo YAWQGJCqtDYMZ6DZGJZ2witQ3Jo0dPXQ1gwmw4BYTXVjhGowXA9PsCtkepHwYDAS gWAzrTaQ3pNLeLeR7wvB4zp/Uapllo0uA2irL2846yvDGjR4vWWTCdJaD/J5H24= =KL3i -----END PGP SIGNATURE----- --EXNBP6NHEphxYPszBEMjUwEYkFEbwxtMd-- From owner-svn-src-all@freebsd.org Mon Mar 5 17:01:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B98EF3F565; Mon, 5 Mar 2018 17:01:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A08F482CE1; Mon, 5 Mar 2018 17:01:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8229026833; Mon, 5 Mar 2018 17:01:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25H1Rjl074894; Mon, 5 Mar 2018 17:01:27 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25H1QwP074886; Mon, 5 Mar 2018 17:01:26 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803051701.w25H1QwP074886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 5 Mar 2018 17:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330516 - in stable/11/sys/netinet: . cc tcp_stacks X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys/netinet: . cc tcp_stacks X-SVN-Commit-Revision: 330516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 17:01:28 -0000 Author: eadler Date: Mon Mar 5 17:01:26 2018 New Revision: 330516 URL: https://svnweb.freebsd.org/changeset/base/330516 Log: Revert r330445 This commit was reverted in r321480 in head Reported by: sbruno Modified: stable/11/sys/netinet/cc/cc_cdg.c stable/11/sys/netinet/cc/cc_chd.c stable/11/sys/netinet/cc/cc_cubic.c stable/11/sys/netinet/cc/cc_dctcp.c stable/11/sys/netinet/cc/cc_htcp.c stable/11/sys/netinet/cc/cc_newreno.c stable/11/sys/netinet/tcp_input.c stable/11/sys/netinet/tcp_stacks/fastpath.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/cc/cc_cdg.c ============================================================================== --- stable/11/sys/netinet/cc/cc_cdg.c Mon Mar 5 16:13:29 2018 (r330515) +++ stable/11/sys/netinet/cc/cc_cdg.c Mon Mar 5 17:01:26 2018 (r330516) @@ -431,12 +431,7 @@ static void cdg_cong_signal(struct cc_var *ccv, uint32_t signal_type) { struct cdg *cdg_data = ccv->cc_data; - uint32_t cwin; - u_int mss; - cwin = CCV(ccv, snd_cwnd); - mss = CCV(ccv, t_maxseg); - switch(signal_type) { case CC_CDG_DELAY: CCV(ccv, snd_ssthresh) = cdg_window_decrease(ccv, @@ -453,7 +448,7 @@ cdg_cong_signal(struct cc_var *ccv, uint32_t signal_ty */ if (IN_CONGRECOVERY(CCV(ccv, t_flags)) || cdg_data->queue_state < CDG_Q_FULL) { - CCV(ccv, snd_ssthresh) = cwin; + CCV(ccv, snd_ssthresh) = CCV(ccv, snd_cwnd); CCV(ccv, snd_recover) = CCV(ccv, snd_max); } else { /* @@ -466,18 +461,12 @@ cdg_cong_signal(struct cc_var *ccv, uint32_t signal_ty cdg_data->shadow_w, RENO_BETA); CCV(ccv, snd_ssthresh) = ulmax(cdg_data->shadow_w, - cdg_window_decrease(ccv, cwin, V_cdg_beta_loss)); - CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); + cdg_window_decrease(ccv, CCV(ccv, snd_cwnd), + V_cdg_beta_loss)); cdg_data->window_incr = cdg_data->rtt_count = 0; } ENTER_RECOVERY(CCV(ccv, t_flags)); - break; - case CC_RTO: - CCV(ccv, snd_ssthresh) = - max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) - * mss; - CCV(ccv, snd_cwnd) = mss; break; default: newreno_cc_algo.cong_signal(ccv, signal_type); Modified: stable/11/sys/netinet/cc/cc_chd.c ============================================================================== --- stable/11/sys/netinet/cc/cc_chd.c Mon Mar 5 16:13:29 2018 (r330515) +++ stable/11/sys/netinet/cc/cc_chd.c Mon Mar 5 17:01:26 2018 (r330516) @@ -330,12 +330,10 @@ chd_cong_signal(struct cc_var *ccv, uint32_t signal_ty struct ertt *e_t; struct chd *chd_data; int qdly; - u_int mss; e_t = khelp_get_osd(CCV(ccv, osd), ertt_id); chd_data = ccv->cc_data; qdly = imax(e_t->rtt, chd_data->maxrtt_in_rtt) - e_t->minrtt; - mss = CCV(ccv, t_maxseg); switch(signal_type) { case CC_CHD_DELAY: @@ -374,12 +372,6 @@ chd_cong_signal(struct cc_var *ccv, uint32_t signal_ty CCV(ccv, t_maxseg) / 2, 2) * CCV(ccv, t_maxseg); } ENTER_FASTRECOVERY(CCV(ccv, t_flags)); - break; - case CC_RTO: - CCV(ccv, snd_ssthresh) = - max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) - * mss; - CCV(ccv, snd_cwnd) = mss; break; default: Modified: stable/11/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/11/sys/netinet/cc/cc_cubic.c Mon Mar 5 16:13:29 2018 (r330515) +++ stable/11/sys/netinet/cc/cc_cubic.c Mon Mar 5 17:01:26 2018 (r330516) @@ -225,12 +225,8 @@ static void cubic_cong_signal(struct cc_var *ccv, uint32_t type) { struct cubic *cubic_data; - uint32_t cwin; - u_int mss; cubic_data = ccv->cc_data; - cwin = CCV(ccv, snd_cwnd); - mss = CCV(ccv, t_maxseg); switch (type) { case CC_NDUPACK: @@ -239,8 +235,7 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) cubic_ssthresh_update(ccv); cubic_data->num_cong_events++; cubic_data->prev_max_cwnd = cubic_data->max_cwnd; - cubic_data->max_cwnd = cwin; - CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); + cubic_data->max_cwnd = CCV(ccv, snd_cwnd); } ENTER_RECOVERY(CCV(ccv, t_flags)); } @@ -251,7 +246,7 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) cubic_ssthresh_update(ccv); cubic_data->num_cong_events++; cubic_data->prev_max_cwnd = cubic_data->max_cwnd; - cubic_data->max_cwnd = cwin; + cubic_data->max_cwnd = CCV(ccv, snd_cwnd); cubic_data->t_last_cong = ticks; CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); ENTER_CONGRECOVERY(CCV(ccv, t_flags)); @@ -266,13 +261,9 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) * chance the first one is a false alarm and may not indicate * congestion. */ - if (CCV(ccv, t_rxtshift) >= 2) { + if (CCV(ccv, t_rxtshift) >= 2) cubic_data->num_cong_events++; cubic_data->t_last_cong = ticks; - cubic_ssthresh_update(ccv); - cubic_data->max_cwnd = cwin; - CCV(ccv, snd_cwnd) = mss; - } break; } } Modified: stable/11/sys/netinet/cc/cc_dctcp.c ============================================================================== --- stable/11/sys/netinet/cc/cc_dctcp.c Mon Mar 5 16:13:29 2018 (r330515) +++ stable/11/sys/netinet/cc/cc_dctcp.c Mon Mar 5 17:01:26 2018 (r330516) @@ -230,29 +230,27 @@ static void dctcp_cong_signal(struct cc_var *ccv, uint32_t type) { struct dctcp *dctcp_data; - uint32_t cwin, ssthresh_on_loss; - u_int mss; + u_int win, mss; dctcp_data = ccv->cc_data; - cwin = CCV(ccv, snd_cwnd); + win = CCV(ccv, snd_cwnd); mss = CCV(ccv, t_maxseg); - ssthresh_on_loss = - max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) - * mss; switch (type) { case CC_NDUPACK: if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { - CCV(ccv, snd_ssthresh) = ssthresh_on_loss; + CCV(ccv, snd_ssthresh) = mss * + max(win / 2 / mss, 2); dctcp_data->num_cong_events++; } else { /* cwnd has already updated as congestion * recovery. Reverse cwnd value using * snd_cwnd_prev and recalculate snd_ssthresh */ - cwin = CCV(ccv, snd_cwnd_prev); - CCV(ccv, snd_ssthresh) = ssthresh_on_loss; + win = CCV(ccv, snd_cwnd_prev); + CCV(ccv, snd_ssthresh) = + max(win / 2 / mss, 2) * mss; } ENTER_RECOVERY(CCV(ccv, t_flags)); } @@ -262,17 +260,18 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type) * Save current snd_cwnd when the host encounters both * congestion recovery and fast recovery. */ - CCV(ccv, snd_cwnd_prev) = cwin; + CCV(ccv, snd_cwnd_prev) = win; if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { if (V_dctcp_slowstart && dctcp_data->num_cong_events++ == 0) { - CCV(ccv, snd_ssthresh) = ssthresh_on_loss; + CCV(ccv, snd_ssthresh) = + mss * max(win / 2 / mss, 2); dctcp_data->alpha = MAX_ALPHA_VALUE; dctcp_data->bytes_ecn = 0; dctcp_data->bytes_total = 0; dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); } else - CCV(ccv, snd_ssthresh) = max((cwin - ((cwin * + CCV(ccv, snd_ssthresh) = max((win - ((win * dctcp_data->alpha) >> 11)) / mss, 2) * mss; CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); ENTER_CONGRECOVERY(CCV(ccv, t_flags)); @@ -285,8 +284,6 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type) dctcp_update_alpha(ccv); dctcp_data->save_sndnxt += CCV(ccv, t_maxseg); dctcp_data->num_cong_events++; - CCV(ccv, snd_ssthresh) = ssthresh_on_loss; - CCV(ccv, snd_cwnd) = mss; } break; } Modified: stable/11/sys/netinet/cc/cc_htcp.c ============================================================================== --- stable/11/sys/netinet/cc/cc_htcp.c Mon Mar 5 16:13:29 2018 (r330515) +++ stable/11/sys/netinet/cc/cc_htcp.c Mon Mar 5 17:01:26 2018 (r330516) @@ -271,12 +271,8 @@ static void htcp_cong_signal(struct cc_var *ccv, uint32_t type) { struct htcp *htcp_data; - uint32_t cwin; - u_int mss; htcp_data = ccv->cc_data; - cwin = CCV(ccv, snd_cwnd); - mss = CCV(ccv, t_maxseg); switch (type) { case CC_NDUPACK: @@ -291,9 +287,8 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type) (htcp_data->maxrtt - htcp_data->minrtt) * 95) / 100; htcp_ssthresh_update(ccv); - CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); htcp_data->t_last_cong = ticks; - htcp_data->prev_cwnd = cwin; + htcp_data->prev_cwnd = CCV(ccv, snd_cwnd); } ENTER_RECOVERY(CCV(ccv, t_flags)); } @@ -310,7 +305,7 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type) htcp_ssthresh_update(ccv); CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); htcp_data->t_last_cong = ticks; - htcp_data->prev_cwnd = cwin; + htcp_data->prev_cwnd = CCV(ccv, snd_cwnd); ENTER_CONGRECOVERY(CCV(ccv, t_flags)); } break; @@ -325,10 +320,6 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type) */ if (CCV(ccv, t_rxtshift) >= 2) htcp_data->t_last_cong = ticks; - CCV(ccv, snd_ssthresh) = - max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) - * mss; - CCV(ccv, snd_cwnd) = mss; break; } } @@ -520,10 +511,6 @@ htcp_ssthresh_update(struct cc_var *ccv) CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * htcp_data->beta) >> HTCP_SHIFT; } - - /* Align ssthresh to MSS boundary */ - CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_ssthresh) / CCV(ccv, t_maxseg)) - * CCV(ccv, t_maxseg); } Modified: stable/11/sys/netinet/cc/cc_newreno.c ============================================================================== --- stable/11/sys/netinet/cc/cc_newreno.c Mon Mar 5 16:13:29 2018 (r330515) +++ stable/11/sys/netinet/cc/cc_newreno.c Mon Mar 5 17:01:26 2018 (r330516) @@ -181,41 +181,29 @@ newreno_after_idle(struct cc_var *ccv) static void newreno_cong_signal(struct cc_var *ccv, uint32_t type) { - uint32_t cwin, ssthresh_on_loss; - u_int mss; + u_int win; - cwin = CCV(ccv, snd_cwnd); - mss = CCV(ccv, t_maxseg); - ssthresh_on_loss = - max((CCV(ccv, snd_max) - CCV(ccv, snd_una)) / 2 / mss, 2) - * mss; - /* Catch algos which mistakenly leak private signal types. */ KASSERT((type & CC_SIGPRIVMASK) == 0, ("%s: congestion signal type 0x%08x is private\n", __func__, type)); - cwin = max(cwin / 2 / mss, 2) * mss; + win = max(CCV(ccv, snd_cwnd) / 2 / CCV(ccv, t_maxseg), 2) * + CCV(ccv, t_maxseg); switch (type) { case CC_NDUPACK: if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { - if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { - CCV(ccv, snd_ssthresh) = ssthresh_on_loss; - CCV(ccv, snd_cwnd) = cwin; - } + if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) + CCV(ccv, snd_ssthresh) = win; ENTER_RECOVERY(CCV(ccv, t_flags)); } break; case CC_ECN: if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { - CCV(ccv, snd_ssthresh) = ssthresh_on_loss; - CCV(ccv, snd_cwnd) = cwin; + CCV(ccv, snd_ssthresh) = win; + CCV(ccv, snd_cwnd) = win; ENTER_CONGRECOVERY(CCV(ccv, t_flags)); } - break; - case CC_RTO: - CCV(ccv, snd_ssthresh) = ssthresh_on_loss; - CCV(ccv, snd_cwnd) = mss; break; } } Modified: stable/11/sys/netinet/tcp_input.c ============================================================================== --- stable/11/sys/netinet/tcp_input.c Mon Mar 5 16:13:29 2018 (r330515) +++ stable/11/sys/netinet/tcp_input.c Mon Mar 5 17:01:26 2018 (r330516) @@ -429,16 +429,9 @@ cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, ui tp->t_dupacks = 0; tp->t_bytes_acked = 0; EXIT_RECOVERY(tp->t_flags); - if (CC_ALGO(tp)->cong_signal == NULL) { - /* - * RFC5681 Section 3.1 - * ssthresh = max (FlightSize / 2, 2*SMSS) eq (4) - */ - tp->snd_ssthresh = - max((tp->snd_max - tp->snd_una) / 2 / maxseg, 2) - * maxseg; - tp->snd_cwnd = maxseg; - } + tp->snd_ssthresh = max(2, min(tp->snd_wnd, tp->snd_cwnd) / 2 / + maxseg) * maxseg; + tp->snd_cwnd = maxseg; break; case CC_RTO_ERR: TCPSTAT_INC(tcps_sndrexmitbad); @@ -2599,15 +2592,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if (awnd < tp->snd_ssthresh) { tp->snd_cwnd += maxseg; - /* - * RFC5681 Section 3.2 talks about cwnd - * inflation on additional dupacks and - * deflation on recovering from loss. - * - * We keep cwnd into check so that - * we don't have to 'deflate' it when we - * get out of recovery. - */ if (tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; } @@ -2646,22 +2630,19 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru TCPSTAT_INC( tcps_sack_recovery_episode); tp->sack_newdata = tp->snd_nxt; - if (CC_ALGO(tp)->cong_signal == NULL) - tp->snd_cwnd = maxseg; + tp->snd_cwnd = maxseg; (void) tp->t_fb->tfb_tcp_output(tp); goto drop; } tp->snd_nxt = th->th_ack; - if (CC_ALGO(tp)->cong_signal == NULL) - tp->snd_cwnd = maxseg; + tp->snd_cwnd = maxseg; (void) tp->t_fb->tfb_tcp_output(tp); KASSERT(tp->snd_limited <= 2, ("%s: tp->snd_limited too big", __func__)); - if (CC_ALGO(tp)->cong_signal == NULL) - tp->snd_cwnd = tp->snd_ssthresh + - maxseg * - (tp->t_dupacks - tp->snd_limited); + tp->snd_cwnd = tp->snd_ssthresh + + maxseg * + (tp->t_dupacks - tp->snd_limited); if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; goto drop; Modified: stable/11/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- stable/11/sys/netinet/tcp_stacks/fastpath.c Mon Mar 5 16:13:29 2018 (r330515) +++ stable/11/sys/netinet/tcp_stacks/fastpath.c Mon Mar 5 17:01:26 2018 (r330516) @@ -1035,15 +1035,6 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, str if (awnd < tp->snd_ssthresh) { tp->snd_cwnd += tp->t_maxseg; - /* - * RFC5681 Section 3.2 talks about cwnd - * inflation on additional dupacks and - * deflation on recovering from loss. - * - * We keep cwnd into check so that - * we don't have to 'deflate' it when we - * get out of recovery. - */ if (tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; } @@ -1082,22 +1073,19 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, str TCPSTAT_INC( tcps_sack_recovery_episode); tp->sack_newdata = tp->snd_nxt; - if (CC_ALGO(tp)->cong_signal == NULL) - tp->snd_cwnd = tp->t_maxseg; + tp->snd_cwnd = tp->t_maxseg; (void) tp->t_fb->tfb_tcp_output(tp); goto drop; } tp->snd_nxt = th->th_ack; - if (CC_ALGO(tp)->cong_signal == NULL) - tp->snd_cwnd = tp->t_maxseg; + tp->snd_cwnd = tp->t_maxseg; (void) tp->t_fb->tfb_tcp_output(tp); KASSERT(tp->snd_limited <= 2, ("%s: tp->snd_limited too big", __func__)); - if (CC_ALGO(tp)->cong_signal == NULL) - tp->snd_cwnd = tp->snd_ssthresh + - tp->t_maxseg * - (tp->t_dupacks - tp->snd_limited); + tp->snd_cwnd = tp->snd_ssthresh + + tp->t_maxseg * + (tp->t_dupacks - tp->snd_limited); if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; goto drop; From owner-svn-src-all@freebsd.org Mon Mar 5 17:02:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92B47F3F6DF for ; Mon, 5 Mar 2018 17:02:12 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::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 2F4FB82EE8 for ; Mon, 5 Mar 2018 17:02:12 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22a.google.com with SMTP id s199so5862779ywg.12 for ; Mon, 05 Mar 2018 09:02:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9kTeJ+hrvbCSROq/pAqUlmVxjS8ryf3vVBB0rMbzukk=; b=cCkWyvln87udyJS7D66XEsyd/GBaqwczI5gRx6PlrR+DbMSnNd6GyzS5xECRMy09Wv SxUGZPStqcTBxIpgUTN1lZws6wQDg76nxFUkhVND0GweJElcexpvAz3Y9poXE0i55wLf hLiFEgyW8DYUE8R8nOnrxItiaHaYM8mc9utSk= 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=9kTeJ+hrvbCSROq/pAqUlmVxjS8ryf3vVBB0rMbzukk=; b=Gcl/b9Kn4u10h0gNAk2LjMFpHi7miJdz548RwkdiYJHQqHcBnoyhamyl0qQNDP4MHE gO6C3g1UQMHLkK7AI9RFjh/M/CK6nTcAI5z9L5tNld3IBsPA80XU8E79oMN/7nZ5XCZH xom2SFLUDEVlXeM7obqgoarm3g4n5UmI0rmc7vKikcfg0pXkj9JfXZFyGNT//XYBLAnP Oymg3OYGx9D7LSipwgQOb7RJy2s0WGjlh2bCKivQba2sl5ptFSb+yD6WrvXa0hTQKra7 FnOBgXqgIdEYv5gbmgegdSHmkQOLjKiYrgEShifLaaSltcsw8od3X62DQaQNbkEwArjg ohGw== X-Gm-Message-State: APf1xPBzjmYb9fvbsHjY7sYoeV6sbbG35yjIjWsD3GCLLUNBwmWclJ9P EYx1eIBeMmeW1awkGQMw31r8pm2SUt1QRnhIMj3G/w== X-Google-Smtp-Source: AG47ELuPtJ9w/58Q/yWVrRl/N1gSIYbZcXJrWoWOxZZLV0OTaDI1WbZcGbQrYRo5KRJvQBsrd50cYlei8TuT0KTQA6M= X-Received: by 10.129.109.1 with SMTP id i1mr9515184ywc.113.1520269331516; Mon, 05 Mar 2018 09:02:11 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Mon, 5 Mar 2018 09:01:41 -0800 (PST) In-Reply-To: <21d58c93-0a5a-8dae-376c-516526fba747@freebsd.org> References: <201803050652.w256qQvu071205@repo.freebsd.org> <21d58c93-0a5a-8dae-376c-516526fba747@freebsd.org> From: Eitan Adler Date: Mon, 5 Mar 2018 09:01:41 -0800 X-Google-Sender-Auth: Qa7jqwrdHTWiL1OgsTrOa0ZIWP8 Message-ID: Subject: Re: svn commit: r330445 - in stable/11/sys/netinet: . cc tcp_stacks To: Sean Bruno Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 17:02:12 -0000 On 5 March 2018 at 07:25, Sean Bruno wrote: > > > On 03/04/18 23:52, Eitan Adler wrote: >> Author: eadler >> Date: Mon Mar 5 06:52:26 2018 >> New Revision: 330445 >> URL: https://svnweb.freebsd.org/changeset/base/330445 >> >> Log: >> MFC r307901,r308180: > > > This commit was reverted at r321480 and should not have been MFC'd. > Want me to revert this? Thanks for the note. I'll look to see why I missed that. Thanks! Reverted in 330516. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Mon Mar 5 17:02:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16B10F3F706; Mon, 5 Mar 2018 17:02:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 959B482F1F; Mon, 5 Mar 2018 17:02:16 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C2AD26973; Mon, 5 Mar 2018 17:02:16 +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 w25H2G3u078937; Mon, 5 Mar 2018 17:02:16 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25H2Gg5078935; Mon, 5 Mar 2018 17:02:16 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803051702.w25H2Gg5078935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 5 Mar 2018 17:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330517 - in head/sys: compat/freebsd32 kern X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 330517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 17:02:17 -0000 Author: brooks Date: Mon Mar 5 17:02:16 2018 New Revision: 330517 URL: https://svnweb.freebsd.org/changeset/base/330517 Log: Remove remenants of 1990s efforts to let us run Net/OpenBSD binaries. No functional change (comments change in some generated files.) Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14571 Modified: head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Mon Mar 5 17:01:26 2018 (r330516) +++ head/sys/compat/freebsd32/syscalls.master Mon Mar 5 17:02:16 2018 (r330517) @@ -392,7 +392,7 @@ 206 AUE_FUTIMES STD { int freebsd32_futimes(int fd, \ struct timeval32 *tptr); } 207 AUE_GETPGID NOPROTO { int getpgid(pid_t pid); } -208 AUE_NULL UNIMPL newreboot (NetBSD) +208 AUE_NULL UNIMPL nosys 209 AUE_POLL NOPROTO { int poll(struct pollfd *fds, u_int nfds, \ int timeout); } @@ -410,10 +410,6 @@ 218 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int 219 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int -; -; The following were introduced with NetBSD/4.4Lite-2 -; They are initialized by their respective modules/sysinits -; XXX PROBLEM!! 220 AUE_SEMCTL COMPAT7|NOSTD { int freebsd32_semctl( \ int semid, int semnum, \ int cmd, union semun32 *arg); } @@ -475,7 +471,6 @@ int which, clockid_t *clock_id); } 248 AUE_NULL UNIMPL ntp_gettime 249 AUE_NULL UNIMPL nosys -; syscall numbers initially used in OpenBSD 250 AUE_MINHERIT NOPROTO { int minherit(void *addr, size_t len, \ int inherit); } 251 AUE_RFORK NOPROTO { int rfork(int flags); } @@ -525,7 +520,6 @@ 286 AUE_NULL UNIMPL nosys 287 AUE_NULL UNIMPL nosys 288 AUE_NULL UNIMPL nosys -; 289 and 290 from NetBSD (OpenBSD: 267 and 268) 289 AUE_PREADV STD { ssize_t freebsd32_preadv(int fd, \ struct iovec32 *iovp, \ u_int iovcnt, \ @@ -540,7 +534,6 @@ 294 AUE_NULL UNIMPL nosys 295 AUE_NULL UNIMPL nosys 296 AUE_NULL UNIMPL nosys -; XXX 297 is 300 in NetBSD 297 AUE_FHSTATFS COMPAT4 { int freebsd32_fhstatfs( \ const struct fhandle *u_fhp, \ struct statfs32 *buf); } Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Mon Mar 5 17:01:26 2018 (r330516) +++ head/sys/kern/syscalls.master Mon Mar 5 17:02:16 2018 (r330517) @@ -400,7 +400,7 @@ 205 AUE_UNDELETE STD { int undelete(char *path); } 206 AUE_FUTIMES STD { int futimes(int fd, struct timeval *tptr); } 207 AUE_GETPGID STD { int getpgid(pid_t pid); } -208 AUE_NULL UNIMPL newreboot (NetBSD) +208 AUE_NULL UNIMPL nosys 209 AUE_POLL STD { int poll(struct pollfd *fds, u_int nfds, \ int timeout); } @@ -418,8 +418,6 @@ 218 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int 219 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int -; -; The following were introduced with NetBSD/4.4Lite-2 220 AUE_SEMCTL COMPAT7|NOSTD { int __semctl(int semid, int semnum, \ int cmd, union semun_old *arg); } 221 AUE_SEMGET NOSTD { int semget(key_t key, int nsems, \ @@ -474,7 +472,6 @@ int which, clockid_t *clock_id); } 248 AUE_NULL STD { int ntp_gettime(struct ntptimeval *ntvp); } 249 AUE_NULL UNIMPL nosys -; syscall numbers initially used in OpenBSD 250 AUE_MINHERIT STD { int minherit(void *addr, size_t len, \ int inherit); } 251 AUE_RFORK STD { int rfork(int flags); } @@ -522,7 +519,6 @@ 286 AUE_NULL UNIMPL nosys 287 AUE_NULL UNIMPL nosys 288 AUE_NULL UNIMPL nosys -; 289 and 290 from NetBSD (OpenBSD: 267 and 268) 289 AUE_PREADV STD { ssize_t preadv(int fd, struct iovec *iovp, \ u_int iovcnt, off_t offset); } 290 AUE_PWRITEV STD { ssize_t pwritev(int fd, struct iovec *iovp, \ @@ -533,7 +529,6 @@ 294 AUE_NULL UNIMPL nosys 295 AUE_NULL UNIMPL nosys 296 AUE_NULL UNIMPL nosys -; XXX 297 is 300 in NetBSD 297 AUE_FHSTATFS COMPAT4 { int fhstatfs( \ const struct fhandle *u_fhp, \ struct ostatfs *buf); } @@ -541,7 +536,6 @@ int flags); } 299 AUE_FHSTAT COMPAT11 { int fhstat(const struct fhandle *u_fhp, \ struct freebsd11_stat *sb); } -; syscall numbers for FreeBSD 300 AUE_NULL STD { int modnext(int modid); } 301 AUE_NULL STD { int modstat(int modid, \ struct module_stat *stat); } From owner-svn-src-all@freebsd.org Mon Mar 5 17:02:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AD71F3F8DF; Mon, 5 Mar 2018 17:02:52 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94E01831C1; Mon, 5 Mar 2018 17:02:51 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FDF02698C; Mon, 5 Mar 2018 17:02:51 +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 w25H2pp9079006; Mon, 5 Mar 2018 17:02:51 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25H2pvL079002; Mon, 5 Mar 2018 17:02:51 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803051702.w25H2pvL079002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 5 Mar 2018 17:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330518 - in head/sys: compat/freebsd32 kern X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 330518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 17:02:52 -0000 Author: brooks Date: Mon Mar 5 17:02:50 2018 New Revision: 330518 URL: https://svnweb.freebsd.org/changeset/base/330518 Log: Regen after r330517. Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Mon Mar 5 17:02:16 2018 (r330517) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Mon Mar 5 17:02:50 2018 (r330518) @@ -217,7 +217,7 @@ const char *freebsd32_syscallnames[] = { "undelete", /* 205 = undelete */ "freebsd32_futimes", /* 206 = freebsd32_futimes */ "getpgid", /* 207 = getpgid */ - "#208", /* 208 = newreboot */ + "#208", /* 208 = nosys */ "poll", /* 209 = poll */ "lkmnosys", /* 210 = lkmnosys */ "lkmnosys", /* 211 = lkmnosys */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Mon Mar 5 17:02:16 2018 (r330517) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Mon Mar 5 17:02:50 2018 (r330518) @@ -266,7 +266,7 @@ struct sysent freebsd32_sysent[] = { { AS(undelete_args), (sy_call_t *)sys_undelete, AUE_UNDELETE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 205 = undelete */ { AS(freebsd32_futimes_args), (sy_call_t *)freebsd32_futimes, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 206 = freebsd32_futimes */ { AS(getpgid_args), (sy_call_t *)sys_getpgid, AUE_GETPGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 207 = getpgid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 208 = newreboot */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 208 = nosys */ { AS(poll_args), (sy_call_t *)sys_poll, AUE_POLL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 209 = poll */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 210 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 211 = lkmnosys */ Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Mon Mar 5 17:02:16 2018 (r330517) +++ head/sys/kern/init_sysent.c Mon Mar 5 17:02:50 2018 (r330518) @@ -259,7 +259,7 @@ struct sysent sysent[] = { { AS(undelete_args), (sy_call_t *)sys_undelete, AUE_UNDELETE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 205 = undelete */ { AS(futimes_args), (sy_call_t *)sys_futimes, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 206 = futimes */ { AS(getpgid_args), (sy_call_t *)sys_getpgid, AUE_GETPGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 207 = getpgid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 208 = newreboot */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 208 = nosys */ { AS(poll_args), (sy_call_t *)sys_poll, AUE_POLL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 209 = poll */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 210 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 211 = lkmnosys */ Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Mon Mar 5 17:02:16 2018 (r330517) +++ head/sys/kern/syscalls.c Mon Mar 5 17:02:50 2018 (r330518) @@ -214,7 +214,7 @@ const char *syscallnames[] = { "undelete", /* 205 = undelete */ "futimes", /* 206 = futimes */ "getpgid", /* 207 = getpgid */ - "#208", /* 208 = newreboot */ + "#208", /* 208 = nosys */ "poll", /* 209 = poll */ "lkmnosys", /* 210 = lkmnosys */ "lkmnosys", /* 211 = lkmnosys */ From owner-svn-src-all@freebsd.org Mon Mar 5 17:19:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86C5BF40EF7; Mon, 5 Mar 2018 17:19:19 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 156168476D; Mon, 5 Mar 2018 17:19:18 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id C41D9EA8; Mon, 5 Mar 2018 11:19:17 -0600 (CST) Date: Mon, 5 Mar 2018 11:19:16 -0600 From: Mark Linimon To: Mark Johnston Cc: Mariusz Zaborski , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r325739 - in head: lib/libcasper/services lib/libcasper/services/cap_syslog share/mk Message-ID: <20180305171916.GA2359@lonesome.com> References: <201711120834.vAC8YQUq006611@repo.freebsd.org> <20180305161358.GA704@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180305161358.GA704@raichu> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 17:19:19 -0000 On Mon, Mar 05, 2018 at 11:13:58AM -0500, Mark Johnston wrote: > The growing divergence with stable/11 makes it rather painful to > maintain a port, depending on libcasper, that aims to work on both 11 > and head. Even an MFC won't help you, in the medium-term. e.g. via https://www.freebsd.org/security/#sup, even if the MFC made it into 11.2, you would still have several months of supporting the old one. (The FreeBSD package builds are based on the oldest supported point release from a branch.) The current estimate for 11.2 is late June. mcl From owner-svn-src-all@freebsd.org Mon Mar 5 17:19:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F1C1F40FB7; Mon, 5 Mar 2018 17:19:54 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A3B48488C; Mon, 5 Mar 2018 17:19:53 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (75-173-115-219.albq.qwest.net [75.173.115.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 436C4192830; Mon, 5 Mar 2018 08:57:01 +0000 (UTC) Subject: Re: svn commit: r330445 - in stable/11/sys/netinet: . cc tcp_stacks To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201803050652.w256qQvu071205@repo.freebsd.org> <21d58c93-0a5a-8dae-376c-516526fba747@freebsd.org> From: Sean Bruno Message-ID: Date: Mon, 5 Mar 2018 10:19:48 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fZRIKSRr7Z20LRwIdv5pNLGwWOmYhFftZ" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 17:19:54 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fZRIKSRr7Z20LRwIdv5pNLGwWOmYhFftZ Content-Type: multipart/mixed; boundary="OHuPKcrKwxcXMrKhMWOJ6D2krXEh49apJ"; protected-headers="v1" From: Sean Bruno To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Message-ID: Subject: Re: svn commit: r330445 - in stable/11/sys/netinet: . cc tcp_stacks References: <201803050652.w256qQvu071205@repo.freebsd.org> <21d58c93-0a5a-8dae-376c-516526fba747@freebsd.org> In-Reply-To: --OHuPKcrKwxcXMrKhMWOJ6D2krXEh49apJ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable No worries, thanks. sean On 03/05/18 10:01, Eitan Adler wrote: > On 5 March 2018 at 07:25, Sean Bruno wrote: >> >> >> On 03/04/18 23:52, Eitan Adler wrote: >>> Author: eadler >>> Date: Mon Mar 5 06:52:26 2018 >>> New Revision: 330445 >>> URL: https://svnweb.freebsd.org/changeset/base/330445 >>> >>> Log: >>> MFC r307901,r308180: >> >> >> This commit was reverted at r321480 and should not have been MFC'd. >> Want me to revert this? >=20 > Thanks for the note. I'll look to see why I missed that. Thanks! >=20 > Reverted in 330516. >=20 >=20 >=20 --OHuPKcrKwxcXMrKhMWOJ6D2krXEh49apJ-- --fZRIKSRr7Z20LRwIdv5pNLGwWOmYhFftZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAlqdfDRfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 /La/1ggAlsLoZxHrKSd9y/n+A+foRyRsWQRZcGsP5W+qqPkZORmLnkG218l7LAWw TA/zJEYzarcRiltFxrtBznXLfX9ByMQ63rtzosouhLqZYGCuxpmMEHBrCeE3dQU2 T4Zuy2glsvmYpWLiW0cSF79taNmaR1HV5cdKO2OibSEfdPBwDzMqwHVQ2KBa2q7V nSrQg0yYKo1lB1jM6JCDchzPJN90q/xXt8kkGFYFxhiirKnkpeVHzTf2KaojVZ6T ajukwijaw4/VEn5/rgGed6hlRQCqSDxXJgtRq4df9JsNaUA4LXLC5O1kVimrSJRQ ibfKWrTkGnis9Ll0ceGmCnHqfqQk3Q== =tab7 -----END PGP SIGNATURE----- --fZRIKSRr7Z20LRwIdv5pNLGwWOmYhFftZ-- From owner-svn-src-all@freebsd.org Mon Mar 5 17:32:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68DB8F41F63; Mon, 5 Mar 2018 17:32:32 +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 102908536B; Mon, 5 Mar 2018 17:32:32 +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 D4F8A1ECC7; Mon, 5 Mar 2018 17:32:31 +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 CC45A12CE; Mon, 5 Mar 2018 17:32:30 +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 nDIqjrWiShoK; Mon, 5 Mar 2018 17:32:28 +0000 (UTC) Subject: Re: svn commit: r330436 - head/bin/chflags DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com F20A612C7 From: Bryan Drewery To: Bruce Evans , Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803050156.w251u7Y8020941@repo.freebsd.org> <1520215860.38056.3.camel@freebsd.org> <20180305140228.P935@besplex.bde.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <8a8cd29b-9936-6d23-4e2b-4c646eca6aba@FreeBSD.org> Date: Mon, 5 Mar 2018 09:32:29 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3wTtYlb06OSDXKKVpMTEWxCYNc6tcWPUi" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 17:32:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3wTtYlb06OSDXKKVpMTEWxCYNc6tcWPUi Content-Type: multipart/mixed; boundary="X5VoSTSGGBACKRZqY0WzRvrcvy6RCefaO"; protected-headers="v1" From: Bryan Drewery To: Bruce Evans , Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <8a8cd29b-9936-6d23-4e2b-4c646eca6aba@FreeBSD.org> Subject: Re: svn commit: r330436 - head/bin/chflags References: <201803050156.w251u7Y8020941@repo.freebsd.org> <1520215860.38056.3.camel@freebsd.org> <20180305140228.P935@besplex.bde.org> In-Reply-To: --X5VoSTSGGBACKRZqY0WzRvrcvy6RCefaO Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 3/5/2018 8:37 AM, Bryan Drewery wrote: > On 3/4/2018 8:30 PM, Bruce Evans wrote: >> On Sun, 4 Mar 2018, Ian Lepore wrote: >> >>> On Mon, 2018-03-05 at 01:56 +0000, Bryan Drewery wrote: >>>> >>>> Log: >>>> \xa0 chflags: Add -x option to not traverse mount points. >>> >>> Yay! \xa0One day later than I needed it, but still, yay! >> >> I recently noticed that find(1) needs an option to not look at mount >> points at all, and further options to classify mount points so that >> you can prune them. >> >> After reading the above and investigating further, I noticed that -x >> is broken in most FreeBSD utilities, since POSIX requires not looking >> at mount points at all for the few utilities that support -x.=C2=A0 E.= g., >> for du in 2001 draft 7 POSIX: >> >> 12578=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= -x=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Whe= n evaluating file sizes, evaluate only >> those files that have the same device as >> 12579=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 the file specified by the file operand. >> 12580=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Specifying more than one of the mutually-exclusive >> options -H and -L shall not be considered >=20 > Yes I'm quite annoyed that my workaround for chflags not having -x, > using `find -x ... -exec chflags`, is still trying to modify mountpoint= s > but not descending into them. >=20 Note of course my chflags change suffers the same problem of course since it's just using FTS (these are null-mounted read-only or devfs/procfs paths): > # /scratch/obj/root/git/freebsd/amd64.amd64/bin/chflags/chflags.full -R= x schg /poudriere/data/.m/exp-11amd64-commit-test/ref > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/distfiles:= Operation not supported > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/compat/lin= ux/proc: Operation not supported > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/proc: Oper= ation not supported > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/dev: Inval= id argument > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/rescue: Re= ad-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/tests:= Read-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/share:= Read-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/ports:= Read-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/src: R= ead-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/packages: = Read-only file system Personally I find this behavior surprising and wrong and think all of the tools -x[dev] behavior should not interact with these paths either by default or with an option. >> >> Mount points are on a different device, but FreeBSD du -x is broken by= >> using FTS_XDEV and not filtering out the mount points. Linux du -x >> (an old version in /compat/linyx/usr/bin) works correctly. >=20 >=20 --=20 Regards, Bryan Drewery --X5VoSTSGGBACKRZqY0WzRvrcvy6RCefaO-- --3wTtYlb06OSDXKKVpMTEWxCYNc6tcWPUi 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 iQEcBAEBAgAGBQJanX8tAAoJEDXXcbtuRpfPB70H/im82x6xxvceGRXWtmJ18ssL 5DsIHjgwIjpulBoJHdgW6Liewj3S5BQ+4DkQDmHHPckId9xMehXapwhY289Q48Tc uJTpkUItKOYMRpgCuMOusCtNLsukwcRyRNOzyY3U6O/iiEMxQsCp613jhTX9HB9+ YNkvq7uhw3Xmvrv701hUxEqRe1PFVikZ2Lqx/rqARt0Qe7N69XdK+k40UT0pnVrX AJzhrBMqskYpFBD7cAndHIm2H7uoAjXu/EoV2co7LHZBa8aaJSiwyp9f2mryYw83 UPo3rDTDSmm2SkHBUjg8tiy4RL2usIgSirggMk0q+os8B2LVSviqZRhtSQuMrYk= =vpAc -----END PGP SIGNATURE----- --3wTtYlb06OSDXKKVpMTEWxCYNc6tcWPUi-- From owner-svn-src-all@freebsd.org Mon Mar 5 18:20:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49927F45025; Mon, 5 Mar 2018 18:20:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E434A8727E; Mon, 5 Mar 2018 18:20:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id BD34810A7DB; Mon, 5 Mar 2018 13:20:49 -0500 (EST) From: John Baldwin To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 Date: Mon, 05 Mar 2018 10:08:04 -0800 Message-ID: <1861296.ksaTdANMae@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201803050754.w257swAE001435@repo.freebsd.org> References: <201803050754.w257swAE001435@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 05 Mar 2018 13:20:49 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 18:20:51 -0000 On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: > Author: eadler > Date: Mon Mar 5 07:54:57 2018 > New Revision: 330451 > URL: https://svnweb.freebsd.org/changeset/base/330451 > > Log: > MFC r306837: > > [net80211] extend the ieee80211_rx_stats struct to include more information. Have you thought about the KBI implications of this change and some of the other changes you've merged? In theory we try to not break existing kernel modules on a stable branch. That is, one should be able to kldload an if_iwn.ko built on 11.0 on a 11-stable kernel. If this structure is used by any device drivers directly then changing its layout would seem to break existing modules that were built against the old ABI and pass in pointers to the old structures to functions in the kernel. There are some fuzzy areas in the ABI we try to preserve, but we generally try to keep drivers working. Also, we may choose to break the ABI if there is a strong argument for it, but then that is usually something discussed with re@ and noted in the commit log and UPDATING. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Mar 5 18:20:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFC62F45037; Mon, 5 Mar 2018 18:20:52 +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 7EA1387288; Mon, 5 Mar 2018 18:20:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 2308F10A87D; Mon, 5 Mar 2018 13:20:51 -0500 (EST) From: John Baldwin To: Emmanuel Vadot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330335 - head/sys/sys Date: Mon, 05 Mar 2018 09:40:25 -0800 Message-ID: <1619920.YOJitH0Jj0@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201803031243.w23ChBMQ096308@repo.freebsd.org> References: <201803031243.w23ChBMQ096308@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 05 Mar 2018 13:20:51 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 18:20:53 -0000 On Saturday, March 03, 2018 12:43:11 PM Emmanuel Vadot wrote: > Author: manu > Date: Sat Mar 3 12:43:11 2018 > New Revision: 330335 > URL: https://svnweb.freebsd.org/changeset/base/330335 > > Log: > Introduce BUS_PASS_SUPPORTDEV > > The reason for this new pass is : > > The earlier pass names are really specific (interrupt, timer, scheduler etc ..) > and making a driver that other device driver (that attach at DEFAULT pass) > needs probe at earlier pass can be confiusing. We can live with GPIO driver > at INTERRUPT pass because they are often an interrupt controller too but having > a usb phy driver probed at RESOURCES (or SCHEDULER for example) is silly. > The number was choosen to have a lot of margin if we want to introduce other > pass in the futur. > > Reviewed by: ian, imp, kevans > Differential Revision: https://reviews.freebsd.org/D14568 I have a different issue on x86 which is that I want acpi0 to kind of probe even before BUS_PASS_BUS. I've wondered if the pass stuff actually needs to be recursive in some way. That is, when a bus first enumerates children, we start probing drivers for those children starting at pass 0 and working up to the current global pass level before increasing the global pass level. This scheme would also making bus passes still operate the same in a post-boot environment as the I think an implementation would mean that each bus device had its own pass level that governed the attach logic and we would raise that pass level up across the different levels to the current level when attaching a new bus device. (I would perhaps handle this logic in bus_generic_attach() to make it transparent to bus drivers.) Do you have any thoughts on that and if it would help with any situations you are aware of? It would mean that if some new bus was discovered when the global pass level was a higher number, the new bus could still "step up" through the pass levels. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Mar 5 18:37:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1640F45F92; Mon, 5 Mar 2018 18:37:05 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A7B287E64; Mon, 5 Mar 2018 18:37:05 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9438E278D9; Mon, 5 Mar 2018 18:37:05 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25Ib5rZ025099; Mon, 5 Mar 2018 18:37:05 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25Ib5aU025098; Mon, 5 Mar 2018 18:37:05 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803051837.w25Ib5aU025098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 5 Mar 2018 18:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330519 - stable/11/contrib/netbsd-tests/lib/libc/stdio X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/contrib/netbsd-tests/lib/libc/stdio X-SVN-Commit-Revision: 330519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 18:37:06 -0000 Author: asomers Date: Mon Mar 5 18:37:05 2018 New Revision: 330519 URL: https://svnweb.freebsd.org/changeset/base/330519 Log: MFC r320726, r320727 r320726: Expect :snprintf_float to segfault This issue started occurring within the past month or so. PR: 220502 Reported by: Jenkins (amd64-head job) r320727: :snprintf_float: don't blindly set RLIMIT_DATA and RLIMIT_AS to 1 MB -- raise the limit to 32MB instead. Require user=root and memory=64MB+ first so one can be reasonably sure that the test will function appropriately. MFC with: r320726 PR: 220502 Modified: stable/11/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/stdio/t_printf.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Mon Mar 5 17:02:50 2018 (r330518) +++ stable/11/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Mon Mar 5 18:37:05 2018 (r330519) @@ -137,6 +137,10 @@ ATF_TC_HEAD(snprintf_float, tc) atf_tc_set_md_var(tc, "descr", "test that floating conversions don't" " leak memory"); +#ifdef __FreeBSD__ + atf_tc_set_md_var(tc, "require.memory", "64m"); + atf_tc_set_md_var(tc, "require.user", "root"); +#endif } ATF_TC_BODY(snprintf_float, tc) @@ -150,10 +154,17 @@ ATF_TC_BODY(snprintf_float, tc) char buf[1000]; struct rlimit rl; +#ifdef __FreeBSD__ + rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; + ATF_CHECK(setrlimit(RLIMIT_AS, &rl) != -1); + rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; + ATF_CHECK(setrlimit(RLIMIT_DATA, &rl) != -1); +#else rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; ATF_CHECK(setrlimit(RLIMIT_AS, &rl) != -1); rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; ATF_CHECK(setrlimit(RLIMIT_DATA, &rl) != -1); +#endif time(&now); srand(now); From owner-svn-src-all@freebsd.org Mon Mar 5 18:56:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D5A6F47268; Mon, 5 Mar 2018 18:56:32 +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 E6B0068B13; Mon, 5 Mar 2018 18:56:31 +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 w25IuT7k045285; Mon, 5 Mar 2018 10:56:29 -0800 (PST) (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 w25IuTid045284; Mon, 5 Mar 2018 10:56:29 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803051856.w25IuTid045284@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330436 - head/bin/chflags In-Reply-To: <8a8cd29b-9936-6d23-4e2b-4c646eca6aba@FreeBSD.org> To: Bryan Drewery Date: Mon, 5 Mar 2018 10:56:29 -0800 (PST) CC: Bruce Evans , Ian Lepore , 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 18:56:32 -0000 > On 3/5/2018 8:37 AM, Bryan Drewery wrote: > > On 3/4/2018 8:30 PM, Bruce Evans wrote: > >> On Sun, 4 Mar 2018, Ian Lepore wrote: > >> > >>> On Mon, 2018-03-05 at 01:56 +0000, Bryan Drewery wrote: > >>>> > >>>> Log: > >>>> \xa0 chflags: Add -x option to not traverse mount points. > >>> > >>> Yay! \xa0One day later than I needed it, but still, yay! > >> > >> I recently noticed that find(1) needs an option to not look at mount > >> points at all, and further options to classify mount points so that > >> you can prune them. > >> > >> After reading the above and investigating further, I noticed that -x > >> is broken in most FreeBSD utilities, since POSIX requires not looking > >> at mount points at all for the few utilities that support -x.? E.g., > >> for du in 2001 draft 7 POSIX: > >> > >> 12578??????????? -x??????????? When evaluating file sizes, evaluate only > >> those files that have the same device as > >> 12579????????????????????????? the file specified by the file operand. > >> 12580??????????? Specifying more than one of the mutually-exclusive > >> options -H and -L shall not be considered > > > > Yes I'm quite annoyed that my workaround for chflags not having -x, > > using `find -x ... -exec chflags`, is still trying to modify mountpoints > > but not descending into them. > > > > Note of course my chflags change suffers the same problem of course > since it's just using FTS (these are null-mounted read-only or > devfs/procfs paths): > > > # /scratch/obj/root/git/freebsd/amd64.amd64/bin/chflags/chflags.full -Rx schg /poudriere/data/.m/exp-11amd64-commit-test/ref > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/distfiles: Operation not supported > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/compat/linux/proc: Operation not supported > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/proc: Operation not supported > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/dev: Invalid argument > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/rescue: Read-only file system > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/tests: Read-only file system > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/share: Read-only file system > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/ports: Read-only file system > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/src: Read-only file system > > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/packages: Read-only file system > > Personally I find this behavior surprising and wrong and think all of > the tools -x[dev] behavior should not interact with these paths either > by default or with an option. Isnt part of the problem the directory under the mount point is technically a part of the parent file system, such that FTS is getting that, but then stating aginst the root of mounted directory? Would it be wrong to make it return the data for the hidden, and probably empty directory that is mounted over the top of, as technically that is part of the traversed file system. I also think this may be time for a change, especially in the zfs world of lots of datasets! > > >> > >> Mount points are on a different device, but FreeBSD du -x is broken by > >> using FTS_XDEV and not filtering out the mount points. Linux du -x > >> (an old version in /compat/linyx/usr/bin) works correctly. > -- > Regards, > Bryan Drewery -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Mar 5 19:02:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C04CEF4794D; Mon, 5 Mar 2018 19:02:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 705EC690F7; Mon, 5 Mar 2018 19:02:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B60627DA2; Mon, 5 Mar 2018 19:02:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25J2Wxm039882; Mon, 5 Mar 2018 19:02:32 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25J2W0R039881; Mon, 5 Mar 2018 19:02:32 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803051902.w25J2W0R039881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 5 Mar 2018 19:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330520 - stable/10/contrib/netbsd-tests/lib/libc/stdio X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/10/contrib/netbsd-tests/lib/libc/stdio X-SVN-Commit-Revision: 330520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 19:02:32 -0000 Author: asomers Date: Mon Mar 5 19:02:32 2018 New Revision: 330520 URL: https://svnweb.freebsd.org/changeset/base/330520 Log: MFC r320726, r320727 r320726: Expect :snprintf_float to segfault This issue started occurring within the past month or so. PR: 220502 Reported by: Jenkins (amd64-head job) r320727: :snprintf_float: don't blindly set RLIMIT_DATA and RLIMIT_AS to 1 MB -- raise the limit to 32MB instead. Require user=root and memory=64MB+ first so one can be reasonably sure that the test will function appropriately. MFC with: r320726 PR: 220502 Modified: stable/10/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/stdio/t_printf.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Mon Mar 5 18:37:05 2018 (r330519) +++ stable/10/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Mon Mar 5 19:02:32 2018 (r330520) @@ -137,6 +137,10 @@ ATF_TC_HEAD(snprintf_float, tc) atf_tc_set_md_var(tc, "descr", "test that floating conversions don't" " leak memory"); +#ifdef __FreeBSD__ + atf_tc_set_md_var(tc, "require.memory", "64m"); + atf_tc_set_md_var(tc, "require.user", "root"); +#endif } ATF_TC_BODY(snprintf_float, tc) @@ -150,10 +154,17 @@ ATF_TC_BODY(snprintf_float, tc) char buf[1000]; struct rlimit rl; +#ifdef __FreeBSD__ + rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; + ATF_CHECK(setrlimit(RLIMIT_AS, &rl) != -1); + rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; + ATF_CHECK(setrlimit(RLIMIT_DATA, &rl) != -1); +#else rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; ATF_CHECK(setrlimit(RLIMIT_AS, &rl) != -1); rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; ATF_CHECK(setrlimit(RLIMIT_DATA, &rl) != -1); +#endif time(&now); srand(now); From owner-svn-src-all@freebsd.org Mon Mar 5 20:03:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EA32F23A97; Mon, 5 Mar 2018 20:03:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C27B46B472; Mon, 5 Mar 2018 20:03:45 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BBC5A7AB; Mon, 5 Mar 2018 20:03:45 +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 w25K3jsf069458; Mon, 5 Mar 2018 20:03:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25K3jdH069457; Mon, 5 Mar 2018 20:03:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803052003.w25K3jdH069457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 5 Mar 2018 20:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330521 - head/sys/contrib/zstd/programs X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/contrib/zstd/programs X-SVN-Commit-Revision: 330521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 20:03:46 -0000 Author: cem Date: Mon Mar 5 20:03:45 2018 New Revision: 330521 URL: https://svnweb.freebsd.org/changeset/base/330521 Log: MFV: zstd: FIO_addFInfo: Fully initialize output 'total' struct Silence a Coverity warning about 'windowSize' being uninitialized. (Yes, nothing that calls this routine actually uses the windowSize value. Still, appeasing Coverity is pretty harmless in this case.) Reported by: Coverity Reviewed by: Yann Collet Obtained from: zstd 606374269cf3485972c90b993fbb84dc20da032f Sponsored by: Dell EMC Isilon Modified: head/sys/contrib/zstd/programs/fileio.c Modified: head/sys/contrib/zstd/programs/fileio.c ============================================================================== --- head/sys/contrib/zstd/programs/fileio.c Mon Mar 5 19:02:32 2018 (r330520) +++ head/sys/contrib/zstd/programs/fileio.c Mon Mar 5 20:03:45 2018 (r330521) @@ -1971,6 +1971,7 @@ static void displayInfo(const char* inFileName, fileIn static fileInfo_t FIO_addFInfo(fileInfo_t fi1, fileInfo_t fi2) { fileInfo_t total; + memset(&total, 0, sizeof(total)); total.numActualFrames = fi1.numActualFrames + fi2.numActualFrames; total.numSkippableFrames = fi1.numSkippableFrames + fi2.numSkippableFrames; total.compressedSize = fi1.compressedSize + fi2.compressedSize; From owner-svn-src-all@freebsd.org Mon Mar 5 20:28:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3180AF25836; Mon, 5 Mar 2018 20:28:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC54D6C201; Mon, 5 Mar 2018 20:28:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2A70AF5; Mon, 5 Mar 2018 20:28:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25KSn2k079619; Mon, 5 Mar 2018 20:28:49 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25KSn1g079618; Mon, 5 Mar 2018 20:28:49 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803052028.w25KSn1g079618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 5 Mar 2018 20:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330522 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 20:28:50 -0000 Author: asomers Date: Mon Mar 5 20:28:49 2018 New Revision: 330522 URL: https://svnweb.freebsd.org/changeset/base/330522 Log: MFC r326401: Fix assertion when ZFS fails to open certain devices "panic: vdev_geom_close_locked: cp->private is NULL" This panic will result if ZFS fails to open a device due to either of the following reasons: 1) The device's sector size is greater than 8KB. 2) ZFS wants to open the device RW, but it can't be opened for writing. The solution is to change the initialization order to ensure that the assertion will be satisfied. PR: 221066 Reported by: David NewHamlet Reviewed by: avg Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13278 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Mar 5 20:03:45 2018 (r330521) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Mar 5 20:28:49 2018 (r330522) @@ -851,35 +851,10 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t * if (cp == NULL) { ZFS_LOG(1, "Vdev %s not found.", vd->vdev_path); error = ENOENT; - } else if (cp->provider->sectorsize > VDEV_PAD_SIZE || - !ISP2(cp->provider->sectorsize)) { - ZFS_LOG(1, "Provider %s has unsupported sectorsize.", - cp->provider->name); - - vdev_geom_close_locked(vd); - error = EINVAL; - cp = NULL; - } else if (cp->acw == 0 && (spa_mode(vd->vdev_spa) & FWRITE) != 0) { - int i; - - for (i = 0; i < 5; i++) { - error = g_access(cp, 0, 1, 0); - if (error == 0) - break; - g_topology_unlock(); - tsleep(vd, 0, "vdev", hz / 2); - g_topology_lock(); - } - if (error != 0) { - printf("ZFS WARNING: Unable to open %s for writing (error=%d).\n", - cp->provider->name, error); - vdev_geom_close_locked(vd); - cp = NULL; - } - } - if (cp != NULL) { + } else { struct consumer_priv_t *priv; struct consumer_vdev_elem *elem; + int spamode; priv = (struct consumer_priv_t*)&cp->private; if (cp->private == NULL) @@ -887,6 +862,34 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t * elem = g_malloc(sizeof(*elem), M_WAITOK|M_ZERO); elem->vd = vd; SLIST_INSERT_HEAD(priv, elem, elems); + + spamode = spa_mode(vd->vdev_spa); + if (cp->provider->sectorsize > VDEV_PAD_SIZE || + !ISP2(cp->provider->sectorsize)) { + ZFS_LOG(1, "Provider %s has unsupported sectorsize.", + cp->provider->name); + + vdev_geom_close_locked(vd); + error = EINVAL; + cp = NULL; + } else if (cp->acw == 0 && (spamode & FWRITE) != 0) { + int i; + + for (i = 0; i < 5; i++) { + error = g_access(cp, 0, 1, 0); + if (error == 0) + break; + g_topology_unlock(); + tsleep(vd, 0, "vdev", hz / 2); + g_topology_lock(); + } + if (error != 0) { + printf("ZFS WARNING: Unable to open %s for writing (error=%d).\n", + cp->provider->name, error); + vdev_geom_close_locked(vd); + cp = NULL; + } + } } /* Fetch initial physical path information for this device. */ From owner-svn-src-all@freebsd.org Mon Mar 5 20:37:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1E88F267D0; Mon, 5 Mar 2018 20:37:54 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A72596CA91; Mon, 5 Mar 2018 20:37:54 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D8F7C86; Mon, 5 Mar 2018 20:37:54 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25Kbsqs084665; Mon, 5 Mar 2018 20:37:54 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25KbsXA084664; Mon, 5 Mar 2018 20:37:54 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803052037.w25KbsXA084664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 5 Mar 2018 20:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330523 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330523 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 20:37:55 -0000 Author: asomers Date: Mon Mar 5 20:37:54 2018 New Revision: 330523 URL: https://svnweb.freebsd.org/changeset/base/330523 Log: MFC r326400 Revert r326399 Accidentally committed wrong file Pointy hat to: asomers Sponsored by: Spectra Logic Corp Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Mon Mar 5 20:28:49 2018 (r330522) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Mon Mar 5 20:37:54 2018 (r330523) @@ -2398,7 +2398,7 @@ vdev_raidz_io_done(zio_t *zio) */ if (parity_errors + parity_untried < rm->rm_firstdatacol || - (zio->io_flags & (ZIO_FLAG_RESILVER | ZIO_FLAG_SCRUB))) { + (zio->io_flags & ZIO_FLAG_RESILVER)) { n = raidz_parity_verify(zio, rm); unexpected_errors += n; ASSERT(parity_errors + n <= @@ -2450,7 +2450,7 @@ vdev_raidz_io_done(zio_t *zio) * out to failed devices later. */ if (parity_errors < rm->rm_firstdatacol - n || - (zio->io_flags & (ZIO_FLAG_RESILVER | ZIO_FLAG_SCRUB))) { + (zio->io_flags & ZIO_FLAG_RESILVER)) { n = raidz_parity_verify(zio, rm); unexpected_errors += n; ASSERT(parity_errors + n <= @@ -2552,8 +2552,7 @@ done: zio_checksum_verified(zio); if (zio->io_error == 0 && spa_writeable(zio->io_spa) && - (unexpected_errors || - (zio->io_flags & (ZIO_FLAG_RESILVER | ZIO_FLAG_SCRUB)))) { + (unexpected_errors || (zio->io_flags & ZIO_FLAG_RESILVER))) { /* * Use the good data we have in hand to repair damaged children. */ From owner-svn-src-all@freebsd.org Mon Mar 5 20:43:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DE4FF2712A; Mon, 5 Mar 2018 20:43:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFAB26D140; Mon, 5 Mar 2018 20:43:43 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA8A9E12; Mon, 5 Mar 2018 20:43:43 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w25KhhFl089475; Mon, 5 Mar 2018 20:43:43 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25Khh9v089474; Mon, 5 Mar 2018 20:43:43 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803052043.w25Khh9v089474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 5 Mar 2018 20:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330524 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 20:43:44 -0000 Author: asomers Date: Mon Mar 5 20:43:43 2018 New Revision: 330524 URL: https://svnweb.freebsd.org/changeset/base/330524 Log: MFC r324940: Fix the error message when creating a zpool on a too-small device Don't check for SPA_MINDEVSIZE in vdev_geom_attach when opening by path. It's redundant with the check in vdev_open, and failing to attach here results in the wrong error message being printed. However, still check for it in some other situations: * When opening by guids, so we don't get bogged down reading from slow devices like floppy drives. * In vdev_geom_read_pool_label for the same reason, because we iterate over all providers. * If the caller requests that we verify the guid, because then we'll have to read from the device before vdev_open verifies the size. PR: 222227 Reported by: Marie Helene Kvello-Aune Reviewed by: avg, mav Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12531 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Mar 5 20:37:54 2018 (r330523) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Mar 5 20:43:43 2018 (r330524) @@ -195,7 +195,7 @@ vdev_geom_orphan(struct g_consumer *cp) } static struct g_consumer * -vdev_geom_attach(struct g_provider *pp, vdev_t *vd) +vdev_geom_attach(struct g_provider *pp, vdev_t *vd, boolean_t sanity) { struct g_geom *gp; struct g_consumer *cp; @@ -205,14 +205,18 @@ vdev_geom_attach(struct g_provider *pp, vdev_t *vd) ZFS_LOG(1, "Attaching to %s.", pp->name); - if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize)) { - ZFS_LOG(1, "Failing attach of %s. Incompatible sectorsize %d\n", - pp->name, pp->sectorsize); - return (NULL); - } else if (pp->mediasize < SPA_MINDEVSIZE) { - ZFS_LOG(1, "Failing attach of %s. Incompatible mediasize %ju\n", - pp->name, pp->mediasize); - return (NULL); + if (sanity) { + if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize)) { + ZFS_LOG(1, "Failing attach of %s. " + "Incompatible sectorsize %d\n", + pp->name, pp->sectorsize); + return (NULL); + } else if (pp->mediasize < SPA_MINDEVSIZE) { + ZFS_LOG(1, "Failing attach of %s. " + "Incompatible mediasize %ju\n", + pp->name, pp->mediasize); + return (NULL); + } } /* Do we have geom already? No? Create one. */ @@ -589,7 +593,7 @@ vdev_geom_read_pool_label(const char *name, LIST_FOREACH(pp, &gp->provider, provider) { if (pp->flags & G_PF_WITHER) continue; - zcp = vdev_geom_attach(pp, NULL); + zcp = vdev_geom_attach(pp, NULL, B_TRUE); if (zcp == NULL) continue; g_topology_unlock(); @@ -629,7 +633,7 @@ vdev_attach_ok(vdev_t *vd, struct g_provider *pp) struct g_consumer *cp; int nlabels; - cp = vdev_geom_attach(pp, NULL); + cp = vdev_geom_attach(pp, NULL, B_TRUE); if (cp == NULL) { ZFS_LOG(1, "Unable to attach tasting instance to %s.", pp->name); @@ -637,14 +641,12 @@ vdev_attach_ok(vdev_t *vd, struct g_provider *pp) } g_topology_unlock(); nlabels = vdev_geom_read_config(cp, &config); + g_topology_lock(); + vdev_geom_detach(cp, B_TRUE); if (nlabels == 0) { - g_topology_lock(); - vdev_geom_detach(cp, B_TRUE); ZFS_LOG(1, "Unable to read config from %s.", pp->name); return (NO_MATCH); } - g_topology_lock(); - vdev_geom_detach(cp, B_TRUE); pool_guid = 0; (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, &pool_guid); @@ -716,7 +718,7 @@ vdev_geom_attach_by_guids(vdev_t *vd) out: if (best_pp) { - cp = vdev_geom_attach(best_pp, vd); + cp = vdev_geom_attach(best_pp, vd, B_TRUE); if (cp == NULL) { printf("ZFS WARNING: Unable to attach to %s.\n", best_pp->name); @@ -770,7 +772,7 @@ vdev_geom_open_by_path(vdev_t *vd, int check_guid) if (pp != NULL) { ZFS_LOG(1, "Found provider by name %s.", vd->vdev_path); if (!check_guid || vdev_attach_ok(vd, pp) == FULL_MATCH) - cp = vdev_geom_attach(pp, vd); + cp = vdev_geom_attach(pp, vd, B_FALSE); } return (cp); From owner-svn-src-all@freebsd.org Mon Mar 5 20:51:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D0F3F279ED; Mon, 5 Mar 2018 20:51:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 511A96D754; Mon, 5 Mar 2018 20:51:24 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B617F5E; Mon, 5 Mar 2018 20:51:24 +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 w25KpOh9093471; Mon, 5 Mar 2018 20:51:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25KpNbu093467; Mon, 5 Mar 2018 20:51:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803052051.w25KpNbu093467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 5 Mar 2018 20:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330525 - in head/lib/libc: arm mips riscv softfloat X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/lib/libc: arm mips riscv softfloat X-SVN-Commit-Revision: 330525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 20:51:25 -0000 Author: jhb Date: Mon Mar 5 20:51:23 2018 New Revision: 330525 URL: https://svnweb.freebsd.org/changeset/base/330525 Log: Move softfloat symbol map entries to softfloat/Symbol.map. The arm, mips, and riscv MD Symbol.map files listed some (but not all) of the softfloat symbols that were actually defined in softfloat.c. While here, also remove entries for __fixuns[sd]fsi which are provided by libcompiler_rt and not by libc. Sponsored by: DARPA / AFRL Modified: head/lib/libc/arm/Symbol.map head/lib/libc/mips/Symbol.map head/lib/libc/riscv/Symbol.map head/lib/libc/softfloat/Symbol.map Modified: head/lib/libc/arm/Symbol.map ============================================================================== --- head/lib/libc/arm/Symbol.map Mon Mar 5 20:43:43 2018 (r330524) +++ head/lib/libc/arm/Symbol.map Mon Mar 5 20:51:23 2018 (r330525) @@ -61,23 +61,5 @@ FBSDprivate_1.0 { _end; _sbrk; - /* softfloat */ - __addsf3; - __adddf3; - __subsf3; - __subdf3; - __mulsf3; - __muldf3; - __divsf3; - __divdf3; - __floatsisf; - __floatsidf; - __fixsfsi; - __fixdfsi; - __fixunssfsi; - __fixunsdfsi; - __extendsfdf2; - __truncdfsf2; - _libc_arm_fpu_present; }; Modified: head/lib/libc/mips/Symbol.map ============================================================================== --- head/lib/libc/mips/Symbol.map Mon Mar 5 20:43:43 2018 (r330524) +++ head/lib/libc/mips/Symbol.map Mon Mar 5 20:51:23 2018 (r330525) @@ -53,22 +53,4 @@ FBSDprivate_1.0 { _end; _brk; _sbrk; - - /* softfloat */ - __addsf3; - __adddf3; - __subsf3; - __subdf3; - __mulsf3; - __muldf3; - __divsf3; - __divdf3; - __floatsisf; - __floatsidf; - __fixsfsi; - __fixdfsi; - __fixunssfsi; - __fixunsdfsi; - __extendsfdf2; - __truncdfsf2; }; Modified: head/lib/libc/riscv/Symbol.map ============================================================================== --- head/lib/libc/riscv/Symbol.map Mon Mar 5 20:43:43 2018 (r330524) +++ head/lib/libc/riscv/Symbol.map Mon Mar 5 20:51:23 2018 (r330525) @@ -35,22 +35,4 @@ FBSDprivate_1.0 { _set_tp; _end; __makecontext; - - /* softfloat */ - __addsf3; - __adddf3; - __subsf3; - __subdf3; - __mulsf3; - __muldf3; - __divsf3; - __divdf3; - __floatsisf; - __floatsidf; - __fixsfsi; - __fixdfsi; - __fixunssfsi; - __fixunsdfsi; - __extendsfdf2; - __truncdfsf2; }; Modified: head/lib/libc/softfloat/Symbol.map ============================================================================== --- head/lib/libc/softfloat/Symbol.map Mon Mar 5 20:43:43 2018 (r330524) +++ head/lib/libc/softfloat/Symbol.map Mon Mar 5 20:51:23 2018 (r330525) @@ -22,8 +22,17 @@ FBSDprivate_1.0 { __softfloat_float_exception_mask; __softfloat_float_rounding_mode; __softfloat_float_raise; + __adddf3; + __addsf3; + __divdf3; + __divsf3; __eqdf2; __eqsf2; + __extendsfdf2; + __fixdfsi; + __fixsfsi; + __floatsidf; + __floatsisf; __gedf2; __gesf2; __gtdf2; @@ -32,10 +41,15 @@ FBSDprivate_1.0 { __lesf2; __ltdf2; __ltsf2; + __muldf3; + __mulsf3; __nedf2; __negdf2; __negsf2; __nesf2; + __subdf3; + __subsf3; + __truncdfsf2; __unorddf2; __unordsf2; }; From owner-svn-src-all@freebsd.org Mon Mar 5 23:51:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5211CF352D4; Mon, 5 Mar 2018 23:51:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F182273DE2; Mon, 5 Mar 2018 23:51:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC0612C97; Mon, 5 Mar 2018 23:51:29 +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 w25NpTOv080402; Mon, 5 Mar 2018 23:51:29 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w25NpT5x080401; Mon, 5 Mar 2018 23:51:29 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201803052351.w25NpT5x080401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 5 Mar 2018 23:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330526 - stable/11/sys/amd64/acpica X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: stable/11/sys/amd64/acpica X-SVN-Commit-Revision: 330526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 23:51:30 -0000 Author: jkim Date: Mon Mar 5 23:51:29 2018 New Revision: 330526 URL: https://svnweb.freebsd.org/changeset/base/330526 Log: MFC: r329889 Partially revert r197863 to reduce diff against i386. Modified: stable/11/sys/amd64/acpica/acpi_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- stable/11/sys/amd64/acpica/acpi_machdep.c Mon Mar 5 20:51:23 2018 (r330525) +++ stable/11/sys/amd64/acpica/acpi_machdep.c Mon Mar 5 23:51:29 2018 (r330526) @@ -61,6 +61,7 @@ acpi_machdep_init(device_t dev) sc = device_get_softc(dev); acpi_apm_init(sc); + acpi_install_wakeup_handler(sc); if (intr_model != ACPI_INTR_PIC) acpi_SetIntrModel(intr_model); @@ -347,20 +348,13 @@ nexus_acpi_probe(device_t dev) static int nexus_acpi_attach(device_t dev) { - device_t acpi_dev; - int error; nexus_init_resources(); bus_generic_probe(dev); - acpi_dev = BUS_ADD_CHILD(dev, 10, "acpi", 0); - if (acpi_dev == NULL) + if (BUS_ADD_CHILD(dev, 10, "acpi", 0) == NULL) panic("failed to add acpi0 device"); - error = bus_generic_attach(dev); - if (error == 0) - acpi_install_wakeup_handler(device_get_softc(acpi_dev)); - - return (error); + return (bus_generic_attach(dev)); } static device_method_t nexus_acpi_methods[] = { From owner-svn-src-all@freebsd.org Tue Mar 6 00:05:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7549CF367EA; Tue, 6 Mar 2018 00:05:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-wr0-x22e.google.com (mail-wr0-x22e.google.com [IPv6:2a00:1450:400c:c0c::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 D8CDC749B7; Tue, 6 Mar 2018 00:05:46 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wr0-x22e.google.com with SMTP id v18so18478632wrv.0; Mon, 05 Mar 2018 16:05:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Q28ESpLKjIOc1fbz8i+bgjxnIPkqW8n6jfX21+mnRvs=; b=izECDC++gAA0DcOOiA7eNDMfkVv4b27Za959IK7EwvDuss7cEeBU6eaecWjKkTC4BO zrDgsE2W9ZBthoJRfYYCjsZ9EEyc6xu37VvGsWixQYw+oAsQnXr6Dj/5cWm65ImMeSbx Ps4piBvWbc26NHucOMDSR4ilYSQv92O3kDUNQPQAU5Bo1GlHgPkFrNrcfYtqiYQpr00c j9Nqo6K6tdF5IMXbIIhmaq9AiOtgW++iAIBliFL6diIda8zmzZiw1xQT7W3J5gFb8AG5 H0A6Nt8TN/zSds3oObvb28fR+yWhjizlrOBsy316sZH0vRHR3lmzgRWk1IovjUMxkRMk u+PQ== 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=Q28ESpLKjIOc1fbz8i+bgjxnIPkqW8n6jfX21+mnRvs=; b=IODdplq36Ot0QRYFdxh72LVPaBWtYk3txor2cyk213a3H2qON52jJLCQbC2lGc7bv4 Y4F52TY4Am64eNp5EqQXd3GsVAm8kyss08Kq7mGc5Z5ulsQl32ZmUw7I26iQZ9kk38fg 3ixOUYMWoAZC+2ePOmQClB2XlT58SioudfG/59mFKVmdiedh957B252G//J2TZX4x7JL x4BO3qkqyYSRwBeDMcm8VbB/YaT4Y/uyBcyTVSpIWXEh1iL59ljPcbic2AifKZCkD7ZA NDKyIHjkxWxMG3JS7q0jB4uGqtogIbnmxy2ye9cTX+p3Wi/1AtzLKZaQf0PNJ16gFUf7 s2SA== X-Gm-Message-State: APf1xPA+olWYQcvVT6BMj0NLIby2xRyB/cZ3gFMO/FoxIUJLjKl79X1B vBd3Rur3LcsUNbm2LBbL7C/mtJjd2g0AUNMIyGkucTmZ X-Google-Smtp-Source: AG47ELuNVMvc6wW8fFtVs0O+SxUAR64XaY73g4N/EkDpZHgzYr3nKXN6zlnZjwVqBDH8npPykVkpD4A/1Nz8lJyqjQo= X-Received: by 10.223.209.205 with SMTP id m13mr12930307wri.99.1520294745645; Mon, 05 Mar 2018 16:05:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.192.2 with HTTP; Mon, 5 Mar 2018 16:05:45 -0800 (PST) In-Reply-To: <201803041932.w24JWqei028169@repo.freebsd.org> References: <201803041932.w24JWqei028169@repo.freebsd.org> From: Jonathan Looney Date: Mon, 5 Mar 2018 19:05:45 -0500 Message-ID: Subject: Re: svn commit: r330407 - head/sys/dev/iicbus To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 00:05:47 -0000 It looks like this is causing compilation failures: /home/jtl/head/sys/dev/iicbus/ds1672.c:147:20: error: use of undeclared identifier 'sc' clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_READ, ts); ^ /home/jtl/head/sys/dev/iicbus/ds1672.c:162:20: error: use of undeclared identifier 'sc' clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_WRITE, ts); ^ 2 errors generated. Jonathan On Sun, Mar 4, 2018 at 2:32 PM, Ian Lepore wrote: > Author: ian > Date: Sun Mar 4 19:32:52 2018 > New Revision: 330407 > URL: https://svnweb.freebsd.org/changeset/base/330407 > > Log: > Add calls to the new clock_dbgprint_xxx() functions. Also, stop applying > a local .5 second adjustment to the time, since that is now done by the > code in subr_rtc.c. > > Modified: > head/sys/dev/iicbus/ds1672.c > > Modified: head/sys/dev/iicbus/ds1672.c > ============================================================ > ================== > --- head/sys/dev/iicbus/ds1672.c Sun Mar 4 19:26:47 2018 > (r330406) > +++ head/sys/dev/iicbus/ds1672.c Sun Mar 4 19:32:52 2018 > (r330407) > @@ -54,8 +54,6 @@ __FBSDID("$FreeBSD$"); > > #define DS1672_CTRL_EOSC (1 << 7) /* Stop/start > flag. */ > > -#define NANOSEC 1000000000 > - > #define MAX_IIC_DATA_SIZE 4 > > struct ds1672_softc { > @@ -144,8 +142,9 @@ ds1672_gettime(device_t dev, struct timespec *ts) > /* counter has seconds since epoch */ > ts->tv_sec = (secs[3] << 24) | (secs[2] << 16) > | (secs[1] << 8) | (secs[0] << 0); > - ts->tv_nsec = NANOSEC / 2; > + ts->tv_nsec = 0; > } > + clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_READ, ts); > return (error); > } > > @@ -159,6 +158,8 @@ ds1672_settime(device_t dev, struct timespec *ts) > data[2] = (ts->tv_sec >> 16) & 0xff; > data[3] = (ts->tv_sec >> 24) & 0xff; > > + ts->tv_nsec = 0; > + clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_WRITE, ts); > return (ds1672_write(dev, DS1672_COUNTER, data, 4)); > } > > > From owner-svn-src-all@freebsd.org Tue Mar 6 01:52:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06DE6F40168; Tue, 6 Mar 2018 01:52:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB2FC79C0E; Tue, 6 Mar 2018 01:52:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A62D845EB; Tue, 6 Mar 2018 01:52:04 +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 w261q4IT044218; Tue, 6 Mar 2018 01:52:04 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w261q4Bf044217; Tue, 6 Mar 2018 01:52:04 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803060152.w261q4Bf044217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 6 Mar 2018 01:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330527 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 01:52:05 -0000 Author: brooks Date: Tue Mar 6 01:52:04 2018 New Revision: 330527 URL: https://svnweb.freebsd.org/changeset/base/330527 Log: Use umtx_copyin_umtx_time32() in __umtx_op_lock_umutex_compat32(). Non-NULL timeouts where copied in improperly and could produce failures due to incompatible data structures. Reviewed by: kib MFC after: 3 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14587 Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Mon Mar 5 23:51:29 2018 (r330526) +++ head/sys/kern/kern_umtx.c Tue Mar 6 01:52:04 2018 (r330527) @@ -4118,7 +4118,7 @@ __umtx_op_lock_umutex_compat32(struct thread *td, stru if (uap->uaddr2 == NULL) tm_p = NULL; else { - error = umtx_copyin_umtx_time(uap->uaddr2, + error = umtx_copyin_umtx_time32(uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); From owner-svn-src-all@freebsd.org Tue Mar 6 02:21:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E188F42F00; Tue, 6 Mar 2018 02:21:42 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A1727B143; Tue, 6 Mar 2018 02:21:42 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14FAD4B04; Tue, 6 Mar 2018 02:21:42 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w262LfR8056731; Tue, 6 Mar 2018 02:21:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w262LfdD056730; Tue, 6 Mar 2018 02:21:41 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803060221.w262LfdD056730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 6 Mar 2018 02:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330528 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 330528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 02:21:42 -0000 Author: ian Date: Tue Mar 6 02:21:41 2018 New Revision: 330528 URL: https://svnweb.freebsd.org/changeset/base/330528 Log: Fix a paste-o that broke the build. There is no softc pointer here, just use the dev arg. Reported by: Jonathan Looney Pointy hat: ian@ Modified: head/sys/dev/iicbus/ds1672.c Modified: head/sys/dev/iicbus/ds1672.c ============================================================================== --- head/sys/dev/iicbus/ds1672.c Tue Mar 6 01:52:04 2018 (r330527) +++ head/sys/dev/iicbus/ds1672.c Tue Mar 6 02:21:41 2018 (r330528) @@ -144,7 +144,7 @@ ds1672_gettime(device_t dev, struct timespec *ts) | (secs[1] << 8) | (secs[0] << 0); ts->tv_nsec = 0; } - clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_READ, ts); + clock_dbgprint_ts(dev, CLOCK_DBG_READ, ts); return (error); } @@ -159,7 +159,7 @@ ds1672_settime(device_t dev, struct timespec *ts) data[3] = (ts->tv_sec >> 24) & 0xff; ts->tv_nsec = 0; - clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_WRITE, ts); + clock_dbgprint_ts(dev, CLOCK_DBG_WRITE, ts); return (ds1672_write(dev, DS1672_COUNTER, data, 4)); } From owner-svn-src-all@freebsd.org Tue Mar 6 02:23:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD09BF4326B for ; Tue, 6 Mar 2018 02:23:01 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB897B3DF for ; Tue, 6 Mar 2018 02:23:01 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 45bd274f-20e5-11e8-91c6-33ffc249f3e8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 45bd274f-20e5-11e8-91c6-33ffc249f3e8; Tue, 06 Mar 2018 02:22:53 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w262Mmbp097441; Mon, 5 Mar 2018 19:22:48 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1520302968.15494.7.camel@freebsd.org> Subject: Re: svn commit: r330407 - head/sys/dev/iicbus From: Ian Lepore To: Jonathan Looney Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 05 Mar 2018 19:22:48 -0700 In-Reply-To: References: <201803041932.w24JWqei028169@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 02:23:02 -0000 On Mon, 2018-03-05 at 19:05 -0500, Jonathan Looney wrote: > It looks like this is causing compilation failures: > > /home/jtl/head/sys/dev/iicbus/ds1672.c:147:20: error: use of > undeclared > identifier 'sc' > clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_READ, ts); > ^ > /home/jtl/head/sys/dev/iicbus/ds1672.c:162:20: error: use of > undeclared > identifier 'sc' > clock_dbgprint_ts(sc->sc_dev, CLOCK_DBG_WRITE, ts); > ^ > 2 errors generated. > > > Jonathan Oops, sorry about that. I didn't realize it wasn't being built as a module, so I never actually compile-tested it. Fixed in r330528. -- Ian > On Sun, Mar 4, 2018 at 2:32 PM, Ian Lepore wrote: > > > > > Author: ian > > Date: Sun Mar4 19:32:52 2018 > > New Revision: 330407 > > URL: https://svnweb.freebsd.org/changeset/base/330407 > > > > Log: > > Add calls to the new clock_dbgprint_xxx() functions.Also, stop > > applying > > a local .5 second adjustment to the time, since that is now done > > by the > > code in subr_rtc.c. > > > > Modified: > > head/sys/dev/iicbus/ds1672.c > > > > > > From owner-svn-src-all@freebsd.org Tue Mar 6 02:30:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FEDDF43E52; Tue, 6 Mar 2018 02:30:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BDEB7BA8B; Tue, 6 Mar 2018 02:30:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 364BE4B79; Tue, 6 Mar 2018 02:30:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w262UZ8F060139; Tue, 6 Mar 2018 02:30:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w262UYXe060136; Tue, 6 Mar 2018 02:30:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803060230.w262UYXe060136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 6 Mar 2018 02:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330529 - in head/sys: dev/iicbus modules/i2c modules/i2c/ds1672 X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: dev/iicbus modules/i2c modules/i2c/ds1672 X-SVN-Commit-Revision: 330529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 02:30:35 -0000 Author: ian Date: Tue Mar 6 02:30:34 2018 New Revision: 330529 URL: https://svnweb.freebsd.org/changeset/base/330529 Log: Build the ds1672 driver as a module. Add a detach() to unregister the rtc. Added: head/sys/modules/i2c/ds1672/ head/sys/modules/i2c/ds1672/Makefile (contents, props changed) Modified: head/sys/dev/iicbus/ds1672.c head/sys/modules/i2c/Makefile Modified: head/sys/dev/iicbus/ds1672.c ============================================================================== --- head/sys/dev/iicbus/ds1672.c Tue Mar 6 02:21:41 2018 (r330528) +++ head/sys/dev/iicbus/ds1672.c Tue Mar 6 02:30:34 2018 (r330529) @@ -118,6 +118,14 @@ ds1672_init(device_t dev) } static int +ds1672_detach(device_t dev) +{ + + clock_unregister(dev); + return (0); +} + +static int ds1672_attach(device_t dev) { struct ds1672_softc *sc = device_get_softc(dev); @@ -166,6 +174,7 @@ ds1672_settime(device_t dev, struct timespec *ts) static device_method_t ds1672_methods[] = { DEVMETHOD(device_probe, ds1672_probe), DEVMETHOD(device_attach, ds1672_attach), + DEVMETHOD(device_detach, ds1672_detach), DEVMETHOD(clock_gettime, ds1672_gettime), DEVMETHOD(clock_settime, ds1672_settime), Modified: head/sys/modules/i2c/Makefile ============================================================================== --- head/sys/modules/i2c/Makefile Tue Mar 6 02:21:41 2018 (r330528) +++ head/sys/modules/i2c/Makefile Tue Mar 6 02:30:34 2018 (r330529) @@ -5,6 +5,7 @@ SUBDIR = \ cyapa \ ds1307 \ ds13rtc \ + ds1672 \ ds3231 \ icee \ if_ic \ Added: head/sys/modules/i2c/ds1672/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/i2c/ds1672/Makefile Tue Mar 6 02:30:34 2018 (r330529) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus +KMOD = ds1672 +SRCS = ds1672.c + +# Generated files... +SRCS+= \ + bus_if.h \ + clock_if.h \ + device_if.h \ + iicbus_if.h \ + opt_platform.h \ + +.if !empty(OPT_FDT) +SRCS+= ofw_bus_if.h +.endif + +.include From owner-svn-src-all@freebsd.org Tue Mar 6 03:14:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E9BEF47923 for ; Tue, 6 Mar 2018 03:14:31 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::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 D6A2C7DDC7 for ; Tue, 6 Mar 2018 03:14:30 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22c.google.com with SMTP id u84so6437428ywg.9 for ; Mon, 05 Mar 2018 19:14:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tfnceKhelMDBxk6AHSAxeznShW+ukR5WeYPMWOTI3hY=; b=RRetPRTyAG6vow8KEIbHvbVmzwpMngWkaeT+t7Nw4dorVFogcDYBFJjHL6RygMcZZB n2n3mNR0NHVG7J5rEo+hnvY5BUlO4nPlHf2rsX0xf0gW5MNXb1TS0f0kC8y8dqHPe9OU U434Uce9GWnsfU8iyRYpvrZBmrvKuq8ceXJ8U= 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=tfnceKhelMDBxk6AHSAxeznShW+ukR5WeYPMWOTI3hY=; b=O9iFX910lmFefqNJDmltOgjMT+kELOfC+8tGGvrAOcIyIkTuuJayryffdqluRfReaG DHFOqGszMWf31HCopuOVpEtiTMH3z3YEYNmS46ubNPe+GZlva7I5T/GKcHIiVcJrE40D qOFbdD8er0PIAVUU42JIlxrgT/bFiWtJeLPYPP9Q8dKAUDPyj/Z/5pHBaG2mMln3hgbY hk1phHGJ+zbFisUpjiLnaErfkwv0jR/oqMEV7PLmEHwKlFo/1P4UrOgkvmmE+l4gFEPd WV5U28P60AK7h2/ZkQJRDkn7+4e1vb+0bmaqOsputkOaU1ZljqItoVFFENCxDZnFkPO5 B2Qw== X-Gm-Message-State: AElRT7E+GM5rnYhCHTg66mAZaJUAaDo+plXTll3GTatId3PPSjvwuHrB FRkKnW3mkTexuTzZqOnvuWkVqJqgaBp/yHKl6cQ3lg== X-Google-Smtp-Source: AG47ELuyYnRtLSNUYdgHIpdJR+e4mUim3WO0h6w+zkKoPCU+aibA+X6Z5K24Qpw+m4gkGs5FFLmjY2XWpLZQUInD4Nw= X-Received: by 10.13.214.214 with SMTP id y205mr10508798ywd.37.1520306070158; Mon, 05 Mar 2018 19:14:30 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Mon, 5 Mar 2018 19:13:59 -0800 (PST) In-Reply-To: <1861296.ksaTdANMae@ralph.baldwin.cx> References: <201803050754.w257swAE001435@repo.freebsd.org> <1861296.ksaTdANMae@ralph.baldwin.cx> From: Eitan Adler Date: Mon, 5 Mar 2018 19:13:59 -0800 X-Google-Sender-Auth: J7a39vVd4xhfAI8WzE9WwBXqTsM Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 03:14:31 -0000 On 5 March 2018 at 10:08, John Baldwin wrote: > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: >> Author: eadler >> Date: Mon Mar 5 07:54:57 2018 >> New Revision: 330451 >> URL: https://svnweb.freebsd.org/changeset/base/330451 >> >> Log: >> MFC r306837: >> >> [net80211] extend the ieee80211_rx_stats struct to include more information. > > Have you thought about the KBI implications of this change and some of the > other changes you've merged? I do have a copy of the modules from 11.1 and have loaded them at various points in time after merging. That said, I am not perfect. Unfortunately, my -STABLE box did not have fully functioning drivers before these changes so its difficult to test anything beyond "loads and does not panic.". I havn't done so today yet, but that will happen soon. Ensuring these things work through code inspection is certainly possible and I've skipped over several changes as a result. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Tue Mar 6 12:01:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A9BFF2A128; Tue, 6 Mar 2018 12:01:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47F5572FF6; Tue, 6 Mar 2018 12:01:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4307C1299F; Tue, 6 Mar 2018 12:01:32 +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 w26C1WOW047410; Tue, 6 Mar 2018 12:01:32 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26C1Wja047409; Tue, 6 Mar 2018 12:01:32 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803061201.w26C1Wja047409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 6 Mar 2018 12:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330536 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 330536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 12:01:32 -0000 Author: ae Date: Tue Mar 6 12:01:31 2018 New Revision: 330536 URL: https://svnweb.freebsd.org/changeset/base/330536 Log: Define ethernet type 0x88A8 as ETHERTYPE_QINQ. Reviewed by: kp Obtained from: OpenBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14593 Modified: head/sys/net/ethernet.h Modified: head/sys/net/ethernet.h ============================================================================== --- head/sys/net/ethernet.h Tue Mar 6 07:38:32 2018 (r330535) +++ head/sys/net/ethernet.h Tue Mar 6 12:01:31 2018 (r330536) @@ -344,6 +344,7 @@ struct ether_vlan_header { #define ETHERTYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */ #define ETHERTYPE_LANPROBE 0x8888 /* HP LanProbe test? */ #define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */ +#define ETHERTYPE_QINQ 0x88A8 /* 802.1ad VLAN stacking */ #define ETHERTYPE_LOOPBACK 0x9000 /* Loopback: used to test interfaces */ #define ETHERTYPE_LBACK ETHERTYPE_LOOPBACK /* DEC MOP loopback */ #define ETHERTYPE_XNSSM 0x9001 /* 3Com (Formerly Bridge Communications), XNS Systems Management */ From owner-svn-src-all@freebsd.org Tue Mar 6 12:58:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F964F2F624; Tue, 6 Mar 2018 12:58:01 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFA1975DA0; Tue, 6 Mar 2018 12:58:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C97001321E; Tue, 6 Mar 2018 12:58:00 +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 w26Cw08a076388; Tue, 6 Mar 2018 12:58:00 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26Cw05B076386; Tue, 6 Mar 2018 12:58:00 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803061258.w26Cw05B076386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 6 Mar 2018 12:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330537 - in head/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core X-SVN-Commit-Revision: 330537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 12:58:01 -0000 Author: ae Date: Tue Mar 6 12:58:00 2018 New Revision: 330537 URL: https://svnweb.freebsd.org/changeset/base/330537 Log: Add mapping for several ethernet types used by Linux to FreeBSD ethernet types. Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14594 Modified: head/sys/compat/linuxkpi/common/include/linux/if_ether.h head/sys/dev/mlx4/mlx4_core/mlx4.h Modified: head/sys/compat/linuxkpi/common/include/linux/if_ether.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/if_ether.h Tue Mar 6 12:01:31 2018 (r330536) +++ head/sys/compat/linuxkpi/common/include/linux/if_ether.h Tue Mar 6 12:58:00 2018 (r330537) @@ -35,8 +35,6 @@ #include -#define ETH_P_8021Q ETHERTYPE_VLAN - #define ETH_HLEN ETHER_HDR_LEN /* Total octets in header. */ #ifndef ETH_ALEN #define ETH_ALEN ETHER_ADDR_LEN @@ -47,6 +45,11 @@ /* * defined Ethernet Protocol ID's. */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ +#define ETH_P_IP ETHERTYPE_IP +#define ETH_P_IPV6 ETHERTYPE_IPV6 +#define ETH_P_MPLS_UC ETHERTYPE_MPLS +#define ETH_P_MPLS_MC ETHERTYPE_MPLS_MCAST +#define ETH_P_8021Q ETHERTYPE_VLAN +#define ETH_P_8021AD ETHERTYPE_QINQ #endif /* _LINUX_IF_ETHER_H_ */ Modified: head/sys/dev/mlx4/mlx4_core/mlx4.h ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4.h Tue Mar 6 12:01:31 2018 (r330536) +++ head/sys/dev/mlx4/mlx4_core/mlx4.h Tue Mar 6 12:58:00 2018 (r330537) @@ -66,8 +66,6 @@ #define MLX4_QUERY_IF_STAT_RESET BIT(31) -#define ETH_P_8021AD 0x88A8 - enum { MLX4_HCR_BASE = 0x80680, MLX4_HCR_SIZE = 0x0001c, From owner-svn-src-all@freebsd.org Tue Mar 6 14:18:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0D24F3547F; Tue, 6 Mar 2018 14:18:45 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F21978CAB; Tue, 6 Mar 2018 14:18:45 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79F3E13F06; Tue, 6 Mar 2018 14:18:45 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26EIjHH016090; Tue, 6 Mar 2018 14:18:45 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26EIjZB016089; Tue, 6 Mar 2018 14:18:45 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201803061418.w26EIjZB016089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 6 Mar 2018 14:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330538 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 330538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 14:18:46 -0000 Author: jtl Date: Tue Mar 6 14:18:45 2018 New Revision: 330538 URL: https://svnweb.freebsd.org/changeset/base/330538 Log: Nudge lld to break the kernel read-only and read-write sections into separate 2M pages. The binutils default for max-page-size and common-page-size used to produce this result. By setting these values, we can nudge lld to also separate these sections into separate 2M pages. Reviewed by: jhb, kib Discussed with: emaste Sponsored by: Netflix Differential Revision: D14282 Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Mar 6 12:58:00 2018 (r330537) +++ head/sys/conf/kern.pre.mk Tue Mar 6 14:18:45 2018 (r330538) @@ -120,6 +120,10 @@ CFLAGS+= ${CONF_CFLAGS} LDFLAGS+= -Wl,--build-id=sha1 .endif +.if ${MACHINE_CPUARCH} == "amd64" +LDFLAGS+= -Wl,-z max-page-size=2097152 -Wl,-z common-page-size=4096 +.endif + NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} NORMAL_S= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} From owner-svn-src-all@freebsd.org Tue Mar 6 14:28:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01108F360FE; Tue, 6 Mar 2018 14:28:40 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A14B979395; Tue, 6 Mar 2018 14:28:39 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93C5D140B2; Tue, 6 Mar 2018 14:28:39 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26ESd1i020940; Tue, 6 Mar 2018 14:28:39 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26EScwJ020926; Tue, 6 Mar 2018 14:28:38 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201803061428.w26EScwJ020926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Tue, 6 Mar 2018 14:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330539 - in head/sys: amd64/amd64 amd64/include arm/include conf gdb i386/include mips/include powerpc/include sparc64/include X-SVN-Group: head X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include arm/include conf gdb i386/include mips/include powerpc/include sparc64/include X-SVN-Commit-Revision: 330539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 14:28:40 -0000 Author: jtl Date: Tue Mar 6 14:28:37 2018 New Revision: 330539 URL: https://svnweb.freebsd.org/changeset/base/330539 Log: amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits correctly for the data contained on each memory page. There are several components to this change: * Add a variable to indicate the start of the R/W portion of the initial memory. * Stop detecting NX bit support for each AP. Instead, use the value from the BSP and, if supported, activate the feature on the other APs just before loading the correct page table. (Functionally, we already assume that the BSP and all APs had the same support or lack of support for the NX bit.) * Set the RW and NX bits correctly for the kernel text, data, and BSS (subject to some caveats below). * Ensure DDB can write to memory when necessary (such as to set a breakpoint). * Ensure GDB can write to memory when necessary (such as to set a breakpoint). For this purpose, add new MD functions gdb_begin_write() and gdb_end_write() which the GDB support code can call before and after writing to memory. This change is not comprehensive: * It doesn't do anything to protect modules. * It doesn't do anything for kernel memory allocated after the kernel starts running. * In order to avoid excessive memory inefficiency, it may let multiple types of data share a 2M page, and assigns the most permissions needed for data on that page. Reviewed by: jhb, kib Discussed with: emaste MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14282 Modified: head/sys/amd64/amd64/db_interface.c head/sys/amd64/amd64/gdb_machdep.c head/sys/amd64/amd64/initcpu.c head/sys/amd64/amd64/mpboot.S head/sys/amd64/amd64/pmap.c head/sys/amd64/include/cpu.h head/sys/amd64/include/gdb_machdep.h head/sys/arm/include/gdb_machdep.h head/sys/conf/ldscript.amd64 head/sys/gdb/gdb_packet.c head/sys/i386/include/gdb_machdep.h head/sys/mips/include/gdb_machdep.h head/sys/powerpc/include/gdb_machdep.h head/sys/sparc64/include/gdb_machdep.h Modified: head/sys/amd64/amd64/db_interface.c ============================================================================== --- head/sys/amd64/amd64/db_interface.c Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/amd64/amd64/db_interface.c Tue Mar 6 14:28:37 2018 (r330539) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include /* @@ -62,6 +65,9 @@ db_read_bytes(vm_offset_t addr, size_t size, char *dat /* * Write bytes to kernel address space for debugger. + * We need to disable write protection temporarily so we can write + * things (such as break points) that might be in write-protected + * memory. */ int db_write_bytes(vm_offset_t addr, size_t size, char *data) @@ -69,15 +75,19 @@ db_write_bytes(vm_offset_t addr, size_t size, char *da jmp_buf jb; void *prev_jb; char *dst; + u_long cr0save; int ret; + cr0save = rcr0(); prev_jb = kdb_jmpbuf(jb); ret = setjmp(jb); if (ret == 0) { + load_cr0(cr0save & ~CR0_WP); dst = (char *)addr; while (size-- > 0) *dst++ = *data++; } + load_cr0(cr0save); (void)kdb_jmpbuf(prev_jb); return (ret); } Modified: head/sys/amd64/amd64/gdb_machdep.c ============================================================================== --- head/sys/amd64/amd64/gdb_machdep.c Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/amd64/amd64/gdb_machdep.c Tue Mar 6 14:28:37 2018 (r330539) @@ -36,11 +36,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -121,3 +123,21 @@ gdb_cpu_signal(int type, int code) } return (SIGEMT); } + +void * +gdb_begin_write(void) +{ + u_long cr0save; + + cr0save = rcr0(); + load_cr0(cr0save & ~CR0_WP); + return ((void *)cr0save); +} + +void +gdb_end_write(void *arg) +{ + + load_cr0((u_long)arg); +} + Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/amd64/amd64/initcpu.c Tue Mar 6 14:28:37 2018 (r330539) @@ -218,7 +218,7 @@ initializecpu(void) if (!IS_BSP() && (cpu_stdext_feature & CPUID_STDEXT_SMEP)) cr4 |= CR4_SMEP; load_cr4(cr4); - if ((amd_feature & AMDID_NX) != 0) { + if (IS_BSP() && (amd_feature & AMDID_NX) != 0) { msr = rdmsr(MSR_EFER) | EFER_NXE; wrmsr(MSR_EFER, msr); pg_nx = PG_NX; Modified: head/sys/amd64/amd64/mpboot.S ============================================================================== --- head/sys/amd64/amd64/mpboot.S Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/amd64/amd64/mpboot.S Tue Mar 6 14:28:37 2018 (r330539) @@ -221,15 +221,31 @@ mptramp_end: /* * From here on down is executed in the kernel .text section. - * - * Load a real %cr3 that has all the direct map stuff and switches - * off the 1GB replicated mirror. Load a stack pointer and jump - * into AP startup code in C. */ .text .code64 .p2align 4,0 entry_64: + /* + * If the BSP reported NXE support, enable EFER.NXE for all APs + * prior to loading %cr3. This avoids page faults if the AP + * encounters memory marked with the NX bit prior to detecting and + * enabling NXE support. + */ + movq pg_nx, %rbx + testq %rbx, %rbx + je 1f + movl $MSR_EFER, %ecx + rdmsr + orl $EFER_NXE, %eax + wrmsr + +1: + /* + * Load a real %cr3 that has all the direct map stuff and switches + * off the 1GB replicated mirror. Load a stack pointer and jump + * into AP startup code in C. + */ movq KPML4phys, %rax movq %rax, %cr3 movq bootSTK, %rsp Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/amd64/amd64/pmap.c Tue Mar 6 14:28:37 2018 (r330539) @@ -870,14 +870,64 @@ nkpt_init(vm_paddr_t addr) nkpt = pt_pages; } +/* + * Returns the proper write/execute permission for a physical page that is + * part of the initial boot allocations. + * + * If the page has kernel text, it is marked as read-only. If the page has + * kernel read-only data, it is marked as read-only/not-executable. If the + * page has only read-write data, it is marked as read-write/not-executable. + * If the page is below/above the kernel range, it is marked as read-write. + * + * This function operates on 2M pages, since we map the kernel space that + * way. + * + * Note that this doesn't currently provide any protection for modules. + */ +static inline pt_entry_t +bootaddr_rwx(vm_paddr_t pa) +{ + + /* + * Everything in the same 2M page as the start of the kernel + * should be static. On the other hand, things in the same 2M + * page as the end of the kernel could be read-write/executable, + * as the kernel image is not guaranteed to end on a 2M boundary. + */ + if (pa < trunc_2mpage(btext - KERNBASE) || + pa >= trunc_2mpage(_end - KERNBASE)) + return (X86_PG_RW); + /* + * The linker should ensure that the read-only and read-write + * portions don't share the same 2M page, so this shouldn't + * impact read-only data. However, in any case, any page with + * read-write data needs to be read-write. + */ + if (pa >= trunc_2mpage(brwsection - KERNBASE)) + return (X86_PG_RW | pg_nx); + /* + * Mark any 2M page containing kernel text as read-only. Mark + * other pages with read-only data as read-only and not executable. + * (It is likely a small portion of the read-only data section will + * be marked as read-only, but executable. This should be acceptable + * since the read-only protection will keep the data from changing.) + * Note that fixups to the .text section will still work until we + * set CR0.WP. + */ + if (pa < round_2mpage(etext - KERNBASE)) + return (0); + return (pg_nx); +} + static void create_pagetables(vm_paddr_t *firstaddr) { - int i, j, ndm1g, nkpdpe; + int i, j, ndm1g, nkpdpe, nkdmpde; pt_entry_t *pt_p; pd_entry_t *pd_p; pdp_entry_t *pdp_p; pml4_entry_t *p4_p; + uint64_t DMPDkernphys; /* Allocate page table pages for the direct map */ ndmpdp = howmany(ptoa(Maxmem), NBPDP); @@ -896,8 +946,20 @@ create_pagetables(vm_paddr_t *firstaddr) } DMPDPphys = allocpages(firstaddr, ndmpdpphys); ndm1g = 0; - if ((amd_feature & AMDID_PAGE1GB) != 0) + if ((amd_feature & AMDID_PAGE1GB) != 0) { + /* + * Calculate the number of 1G pages that will fully fit in + * Maxmem. + */ ndm1g = ptoa(Maxmem) >> PDPSHIFT; + + /* + * Allocate 2M pages for the kernel. These will be used in + * place of the first one or more 1G pages from ndm1g. + */ + nkdmpde = howmany((vm_offset_t)(brwsection - KERNBASE), NBPDP); + DMPDkernphys = allocpages(firstaddr, nkdmpde); + } if (ndm1g < ndmpdp) DMPDphys = allocpages(firstaddr, ndmpdp - ndm1g); dmaplimit = (vm_paddr_t)ndmpdp << PDPSHIFT; @@ -923,11 +985,10 @@ create_pagetables(vm_paddr_t *firstaddr) KPDphys = allocpages(firstaddr, nkpdpe); /* Fill in the underlying page table pages */ - /* Nominally read-only (but really R/W) from zero to physfree */ /* XXX not fully used, underneath 2M pages */ pt_p = (pt_entry_t *)KPTphys; for (i = 0; ptoa(i) < *firstaddr; i++) - pt_p[i] = ptoa(i) | X86_PG_RW | X86_PG_V | pg_g; + pt_p[i] = ptoa(i) | X86_PG_V | pg_g | bootaddr_rwx(ptoa(i)); /* Now map the page tables at their location within PTmap */ pd_p = (pd_entry_t *)KPDphys; @@ -937,8 +998,8 @@ create_pagetables(vm_paddr_t *firstaddr) /* Map from zero to end of allocations under 2M pages */ /* This replaces some of the KPTphys entries above */ for (i = 0; (i << PDRSHIFT) < *firstaddr; i++) - pd_p[i] = (i << PDRSHIFT) | X86_PG_RW | X86_PG_V | PG_PS | - pg_g; + pd_p[i] = (i << PDRSHIFT) | X86_PG_V | PG_PS | pg_g | + bootaddr_rwx(i << PDRSHIFT); /* * Because we map the physical blocks in 2M pages, adjust firstaddr @@ -978,6 +1039,22 @@ create_pagetables(vm_paddr_t *firstaddr) for (j = 0; i < ndmpdp; i++, j++) { pdp_p[i] = DMPDphys + ptoa(j); pdp_p[i] |= X86_PG_RW | X86_PG_V | PG_U; + } + + /* + * Instead of using a 1G page for the memory containing the kernel, + * use 2M pages with appropriate permissions. (If using 1G pages, + * this will partially overwrite the PDPEs above.) + */ + if (ndm1g) { + pd_p = (pd_entry_t *)DMPDkernphys; + for (i = 0; i < (NPDEPG * nkdmpde); i++) + pd_p[i] = (i << PDRSHIFT) | X86_PG_V | PG_PS | pg_g | + X86_PG_M | X86_PG_A | pg_nx | + bootaddr_rwx(i << PDRSHIFT); + for (i = 0; i < nkdmpde; i++) + pdp_p[i] = (DMPDkernphys + ptoa(i)) | X86_PG_RW | + X86_PG_V | PG_U; } /* And recursively map PML4 to itself in order to get PTmap */ Modified: head/sys/amd64/include/cpu.h ============================================================================== --- head/sys/amd64/include/cpu.h Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/amd64/include/cpu.h Tue Mar 6 14:28:37 2018 (r330539) @@ -68,7 +68,9 @@ struct cpu_ops { }; extern struct cpu_ops cpu_ops; +extern char brwsection[]; extern char btext[]; +extern char _end[]; extern char etext[]; /* Resume hook for VMM. */ Modified: head/sys/amd64/include/gdb_machdep.h ============================================================================== --- head/sys/amd64/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/amd64/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) @@ -47,8 +47,10 @@ gdb_cpu_query(void) return (0); } +void *gdb_begin_write(void); void *gdb_cpu_getreg(int, size_t *); void gdb_cpu_setreg(int, void *); int gdb_cpu_signal(int, int); +void gdb_end_write(void *); #endif /* !_MACHINE_GDB_MACHDEP_H_ */ Modified: head/sys/arm/include/gdb_machdep.h ============================================================================== --- head/sys/arm/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/arm/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) @@ -47,6 +47,19 @@ gdb_cpu_query(void) return (0); } +static __inline void * +gdb_begin_write(void) +{ + + return (NULL); +} + +static __inline void +gdb_end_write(void *arg __unused) +{ + +} + void *gdb_cpu_getreg(int, size_t *); void gdb_cpu_setreg(int, void *); int gdb_cpu_signal(int, int); Modified: head/sys/conf/ldscript.amd64 ============================================================================== --- head/sys/conf/ldscript.amd64 Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/conf/ldscript.amd64 Tue Mar 6 14:28:37 2018 (r330539) @@ -80,6 +80,7 @@ SECTIONS /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); + PROVIDE (brwsection = .); /* Exception handling */ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } Modified: head/sys/gdb/gdb_packet.c ============================================================================== --- head/sys/gdb/gdb_packet.c Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/gdb/gdb_packet.c Tue Mar 6 14:28:37 2018 (r330539) @@ -147,6 +147,7 @@ gdb_rx_mem(unsigned char *addr, size_t size) { unsigned char *p; void *prev; + void *wctx; jmp_buf jb; size_t cnt; int ret; @@ -155,6 +156,7 @@ gdb_rx_mem(unsigned char *addr, size_t size) if (size * 2 != gdb_rxsz) return (-1); + wctx = gdb_begin_write(); prev = kdb_jmpbuf(jb); ret = setjmp(jb); if (ret == 0) { @@ -170,6 +172,7 @@ gdb_rx_mem(unsigned char *addr, size_t size) kdb_cpu_sync_icache(addr, size); } (void)kdb_jmpbuf(prev); + gdb_end_write(wctx); return ((ret == 0) ? 1 : 0); } Modified: head/sys/i386/include/gdb_machdep.h ============================================================================== --- head/sys/i386/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/i386/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) @@ -47,6 +47,19 @@ gdb_cpu_query(void) return (0); } +static __inline void * +gdb_begin_write(void) +{ + + return (NULL); +} + +static __inline void +gdb_end_write(void *arg __unused) +{ + +} + void *gdb_cpu_getreg(int, size_t *); void gdb_cpu_setreg(int, void *); int gdb_cpu_signal(int, int); Modified: head/sys/mips/include/gdb_machdep.h ============================================================================== --- head/sys/mips/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/mips/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) @@ -51,6 +51,19 @@ gdb_cpu_query(void) return (0); } +static __inline void * +gdb_begin_write(void) +{ + + return (NULL); +} + +static __inline void +gdb_end_write(void *arg __unused) +{ + +} + void *gdb_cpu_getreg(int, size_t *); void gdb_cpu_setreg(int, void *); int gdb_cpu_signal(int, int); Modified: head/sys/powerpc/include/gdb_machdep.h ============================================================================== --- head/sys/powerpc/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/powerpc/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) @@ -76,6 +76,19 @@ gdb_cpu_query(void) return (0); } +static __inline void * +gdb_begin_write(void) +{ + + return (NULL); +} + +static __inline void +gdb_end_write(void *arg __unused) +{ + +} + void *gdb_cpu_getreg(int, size_t *); void gdb_cpu_setreg(int, void *); int gdb_cpu_signal(int, int); Modified: head/sys/sparc64/include/gdb_machdep.h ============================================================================== --- head/sys/sparc64/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) +++ head/sys/sparc64/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) @@ -53,6 +53,19 @@ gdb_cpu_signal(int vector, int _) return (vector); } +static __inline void * +gdb_begin_write(void) +{ + + return (NULL); +} + +static __inline void +gdb_end_write(void *arg __unused) +{ + +} + void *gdb_cpu_getreg(int, size_t *); void gdb_cpu_setreg(int, void *); From owner-svn-src-all@freebsd.org Tue Mar 6 14:31:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5280F363B5; Tue, 6 Mar 2018 14:31:15 +0000 (UTC) (envelope-from rodrigo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 832E3795EC; Tue, 6 Mar 2018 14:31:15 +0000 (UTC) (envelope-from rodrigo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E229141DE; Tue, 6 Mar 2018 14:31:15 +0000 (UTC) (envelope-from rodrigo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26EVFpd021094; Tue, 6 Mar 2018 14:31:15 GMT (envelope-from rodrigo@FreeBSD.org) Received: (from rodrigo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26EVF5u021093; Tue, 6 Mar 2018 14:31:15 GMT (envelope-from rodrigo@FreeBSD.org) Message-Id: <201803061431.w26EVF5u021093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigo set sender to rodrigo@FreeBSD.org using -f From: Rodrigo Osorio Date: Tue, 6 Mar 2018 14:31:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330540 - head/share/man/man8 X-SVN-Group: head X-SVN-Commit-Author: rodrigo X-SVN-Commit-Paths: head/share/man/man8 X-SVN-Commit-Revision: 330540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 14:31:16 -0000 Author: rodrigo (ports committer) Date: Tue Mar 6 14:31:15 2018 New Revision: 330540 URL: https://svnweb.freebsd.org/changeset/base/330540 Log: Update the diskless manpage According with /etc/rc.initdiskless the default mfs allocation is now 5Mb (10240 x 512 bytes sectors) Submitted by: rodrigo Reviewed by: bcr Approved by: manpages (bcr) Differential Revision: https://reviews.freebsd.org/D14592 Modified: head/share/man/man8/diskless.8 Modified: head/share/man/man8/diskless.8 ============================================================================== --- head/share/man/man8/diskless.8 Tue Mar 6 14:28:37 2018 (r330539) +++ head/share/man/man8/diskless.8 Tue Mar 6 14:31:15 2018 (r330540) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2011 +.Dd March 6, 2018 .Dt DISKLESS 8 .Os .Sh NAME @@ -311,7 +311,7 @@ The .Nm scripts create memory file systems to hold the overridden directories. -Only a 2MB partition is created by default, which may not +Only a 5MB partition is created by default, which may not be sufficient for your purposes. To override this, you can create the file From owner-svn-src-all@freebsd.org Tue Mar 6 15:00:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EAECF384CB; Tue, 6 Mar 2018 15:00:22 +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 D35B97A6DE; Tue, 6 Mar 2018 15:00:21 +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 w26F0I5a049324; Tue, 6 Mar 2018 07:00:19 -0800 (PST) (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 w26F0INX049323; Tue, 6 Mar 2018 07:00:18 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803061500.w26F0INX049323@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330540 - head/share/man/man8 In-Reply-To: <201803061431.w26EVF5u021093@repo.freebsd.org> To: Rodrigo Osorio Date: Tue, 6 Mar 2018 07:00:18 -0800 (PST) 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 15:00:22 -0000 > Author: rodrigo (ports committer) > Date: Tue Mar 6 14:31:15 2018 > New Revision: 330540 > URL: https://svnweb.freebsd.org/changeset/base/330540 > > Log: > Update the diskless manpage > > According with /etc/rc.initdiskless the default mfs allocation > is now 5Mb (10240 x 512 bytes sectors) > > Submitted by: rodrigo > Reviewed by: bcr > Approved by: manpages (bcr) > Differential Revision: https://reviews.freebsd.org/D14592 Thank you for fixing the man page, if someone wants to do some additional related cleanup in the /etc/rc.initdiskless script that would be great. One issue is we have "one size fits all" for the md files default size of 5MB, which is for all practical puposes too small. IIRC you need at least 8MB to hold what is in a 11.1 var.cpio.gz file, and possibly more for ^head. It would be nice to have the size of /var and /etc set seperatly with resonable defaults. At present my diskless environment over rides both of these with md_size files in the ./conf directory. There may be some lingering comments about 4MB, but I am looking at 11.1 /etc right now. > Modified: > head/share/man/man8/diskless.8 > > Modified: head/share/man/man8/diskless.8 > ============================================================================== > --- head/share/man/man8/diskless.8 Tue Mar 6 14:28:37 2018 (r330539) > +++ head/share/man/man8/diskless.8 Tue Mar 6 14:31:15 2018 (r330540) > @@ -26,7 +26,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd August 7, 2011 > +.Dd March 6, 2018 > .Dt DISKLESS 8 > .Os > .Sh NAME > @@ -311,7 +311,7 @@ The > .Nm > scripts create memory file systems to hold the overridden > directories. > -Only a 2MB partition is created by default, which may not > +Only a 5MB partition is created by default, which may not > be sufficient for your purposes. > To override this, you can create the > file > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Mar 6 15:52:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07365F3CD04; Tue, 6 Mar 2018 15:52:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADBA97C91A; Tue, 6 Mar 2018 15:51:59 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8B0414EF8; Tue, 6 Mar 2018 15:51:59 +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 w26FpxMi065414; Tue, 6 Mar 2018 15:51:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26FpxXj065413; Tue, 6 Mar 2018 15:51:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803061551.w26FpxXj065413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 6 Mar 2018 15:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330541 - head/sys/cddl/dev/fbt/x86 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/cddl/dev/fbt/x86 X-SVN-Commit-Revision: 330541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 15:52:00 -0000 Author: markj Date: Tue Mar 6 15:51:59 2018 New Revision: 330541 URL: https://svnweb.freebsd.org/changeset/base/330541 Log: Unbreak amd64 FBT after r330539. X-MFC with: r330539 Modified: head/sys/cddl/dev/fbt/x86/fbt_isa.c Modified: head/sys/cddl/dev/fbt/x86/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/x86/fbt_isa.c Tue Mar 6 14:31:15 2018 (r330540) +++ head/sys/cddl/dev/fbt/x86/fbt_isa.c Tue Mar 6 15:51:59 2018 (r330541) @@ -34,6 +34,8 @@ #include +#include + #include "fbt.h" #define FBT_PUSHL_EBP 0x55 @@ -143,8 +145,15 @@ fbt_invop(uintptr_t addr, struct trapframe *frame, uin void fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val) { + u_long cr0save; + register_t intr; + intr = intr_disable(); + cr0save = rcr0(); + load_cr0(cr0save & ~CR0_WP); *fbt->fbtp_patchpoint = val; + load_cr0(cr0save); + intr_restore(intr); } int From owner-svn-src-all@freebsd.org Tue Mar 6 15:52:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 000F3F3CFF2; Tue, 6 Mar 2018 15:52:43 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6E137CAE2; Tue, 6 Mar 2018 15:52:43 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1C7C14F26; Tue, 6 Mar 2018 15:52:43 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26FqhXI065482; Tue, 6 Mar 2018 15:52:43 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26Fqhxw065480; Tue, 6 Mar 2018 15:52:43 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201803061552.w26Fqhxw065480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 6 Mar 2018 15:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330542 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 330542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 15:52:44 -0000 Author: nwhitehorn Date: Tue Mar 6 15:52:43 2018 New Revision: 330542 URL: https://svnweb.freebsd.org/changeset/base/330542 Log: Fix use of unitialized variables. Modified: head/sys/powerpc/powernv/opal_pci.c head/sys/powerpc/powernv/platform_powernv.c Modified: head/sys/powerpc/powernv/opal_pci.c ============================================================================== --- head/sys/powerpc/powernv/opal_pci.c Tue Mar 6 15:51:59 2018 (r330541) +++ head/sys/powerpc/powernv/opal_pci.c Tue Mar 6 15:52:43 2018 (r330542) @@ -429,6 +429,7 @@ opalpci_read_config(device_t dev, u_int bus, u_int slo config_addr, reg, vtophys(&word)); break; default: + error = OPAL_SUCCESS; word = 0xffffffff; } Modified: head/sys/powerpc/powernv/platform_powernv.c ============================================================================== --- head/sys/powerpc/powernv/platform_powernv.c Tue Mar 6 15:51:59 2018 (r330541) +++ head/sys/powerpc/powernv/platform_powernv.c Tue Mar 6 15:52:43 2018 (r330542) @@ -127,7 +127,7 @@ powernv_attach(platform_t plat) char buf[255]; pcell_t prop; phandle_t cpu; - int res, len, node, idx; + int res, len, idx; register_t msr; /* Ping OPAL again just to make sure */ @@ -194,7 +194,7 @@ powernv_attach(platform_t plat) * for the encoding of the property. */ - len = OF_getproplen(node, "ibm,segment-page-sizes"); + len = OF_getproplen(cpu, "ibm,segment-page-sizes"); if (len > 0) { /* * We have to use a variable length array on the stack From owner-svn-src-all@freebsd.org Tue Mar 6 16:16:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03ABBF3F27A; Tue, 6 Mar 2018 16:16:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD6707DEF7; Tue, 6 Mar 2018 16:16:30 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3C7F15263; Tue, 6 Mar 2018 16:16:30 +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 w26GGUMw075975; Tue, 6 Mar 2018 16:16:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26GGUwl075974; Tue, 6 Mar 2018 16:16:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803061616.w26GGUwl075974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 6 Mar 2018 16:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330544 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 330544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 16:16:31 -0000 Author: markj Date: Tue Mar 6 16:16:30 2018 New Revision: 330544 URL: https://svnweb.freebsd.org/changeset/base/330544 Log: MFC r330075: Give the 0th domain's page daemon thread a consistent name. Modified: stable/11/sys/vm/vm_pageout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_pageout.c ============================================================================== --- stable/11/sys/vm/vm_pageout.c Tue Mar 6 16:10:47 2018 (r330543) +++ stable/11/sys/vm/vm_pageout.c Tue Mar 6 16:16:30 2018 (r330544) @@ -1863,6 +1863,7 @@ vm_pageout(void) #endif swap_pager_swap_init(); + snprintf(curthread->td_name, sizeof(curthread->td_name), "dom0"); error = kthread_add(vm_pageout_laundry_worker, NULL, curproc, NULL, 0, 0, "laundry: dom0"); if (error != 0) From owner-svn-src-all@freebsd.org Tue Mar 6 16:39:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CC28F410FA; Tue, 6 Mar 2018 16:39:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A921B7F01E; Tue, 6 Mar 2018 16:39:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 3D30E10AC13; Tue, 6 Mar 2018 11:39:33 -0500 (EST) From: John Baldwin To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 Date: Tue, 06 Mar 2018 08:26:43 -0800 Message-ID: <6465173.s2nWvWCLOs@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <201803050754.w257swAE001435@repo.freebsd.org> <1861296.ksaTdANMae@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 06 Mar 2018 11:39:33 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 16:39:35 -0000 On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: > On 5 March 2018 at 10:08, John Baldwin wrote: > > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: > >> Author: eadler > >> Date: Mon Mar 5 07:54:57 2018 > >> New Revision: 330451 > >> URL: https://svnweb.freebsd.org/changeset/base/330451 > >> > >> Log: > >> MFC r306837: > >> > >> [net80211] extend the ieee80211_rx_stats struct to include more information. > > > > Have you thought about the KBI implications of this change and some of the > > other changes you've merged? > > I do have a copy of the modules from 11.1 and have loaded them at > various points in time after merging. That said, I am not perfect. > Unfortunately, my -STABLE box did not have fully functioning drivers > before these changes so its difficult to test anything beyond "loads > and does not panic.". I havn't done so today yet, but that will happen > soon. > > Ensuring these things work through code inspection is certainly > possible and I've skipped over several changes as a result. Loading a module doesn't alone doesn't actually test for breakage. That only breaks if you remove symbols. Changing the semantics of how functions work or the layout of a structure that is passed between structures is an ABI change even if it doesn't change the function signature. In this case, this change inserts new fields and changes the size of 'struct ieee80211_rx_stats'. Thus if a otus(4) or iwm(4) driver built against the prior revision (330450) is used with a kernel built with this revision (330451), the driver will pass in an 'rxs' structure in a call to ieee80211_input_mimo() that is smaller, and in the first few lines of ieeee80211_input_mimo() these statements will overflow that pointer and read stack garbage: 85 int 86 ieee80211_input_mimo(struct ieee80211_node *ni, struct mbuf *m, 87 struct ieee80211_rx_stats *rx) 88 { 89 struct ieee80211_rx_stats rxs; 90 91 if (rx) { 92 memcpy(&rxs, rx, sizeof(*rx)); 93 } else { Furthermore, the now garbage 'rxs' (since fields in *rx are in different places so even the bits of 'rxs' that isn't stack garbage will be wrong) will now be used by other routines in net80211. Your next MFC commit then causes another ABI breakage as it removes the 'rx' parameter from the function. You can't do that. If you don't know how to recognize those types of ABI breakages, then you probably shouldn't be MFC'ing changes without getting some sort of review. It also tends to be a lot harder to find these breakages in code one didn't write. The fact that there are back-to-back ABI breakages also suggests that it is much better to consolidate MFCs into larger commits because you limit the amount of compatibilty ABI shims you have to provide. I think for net80211 you need to generate a diff of all of the wireless related changes you have MFC'd to stable/11 and then review that for ABI changes and come up with a plan for how to restore the ABI and get re@'s approval. (kib@ is a pretty good resource for devising ABI shims.) I think that going forward you shouldn't MFC changes if you aren't certain about the ABI implications until you have had someone review them. Batching up changes into a single diff is also helpful since if an API changes back and forth in HEAD multiple times, collapsing them means that for stable you may only need a single compat shim rather than several. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Mar 6 17:07:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BF45F4369D; Tue, 6 Mar 2018 17:07:34 +0000 (UTC) (envelope-from danfe@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 1A997806E9; Tue, 6 Mar 2018 17:07:34 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 0F0CA16294; Tue, 6 Mar 2018 17:07:34 +0000 (UTC) Date: Tue, 6 Mar 2018 17:07:34 +0000 From: Alexey Dokuchaev To: John Baldwin Cc: Eitan Adler , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 Message-ID: <20180306170733.GA84985@FreeBSD.org> References: <201803050754.w257swAE001435@repo.freebsd.org> <1861296.ksaTdANMae@ralph.baldwin.cx> <6465173.s2nWvWCLOs@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6465173.s2nWvWCLOs@ralph.baldwin.cx> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 17:07:34 -0000 On Tue, Mar 06, 2018 at 08:26:43AM -0800, John Baldwin wrote: > The fact that there are back-to-back ABI breakages also suggests that it is > much better to consolidate MFCs into larger commits [...] +1. > I think that going forward you shouldn't MFC changes if you aren't certain > about the ABI implications until you have had someone review them. Batching > up changes into a single diff is also helpful since if an API changes back > and forth in HEAD multiple times, collapsing them means that for stable you > may only need a single compat shim rather than several. +1. ./danfe From owner-svn-src-all@freebsd.org Tue Mar 6 18:28:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B74FF48F97; Tue, 6 Mar 2018 18:28:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D97D83BD6; Tue, 6 Mar 2018 18:28:56 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3892A16787; Tue, 6 Mar 2018 18:28:56 +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 w26ISuel040818; Tue, 6 Mar 2018 18:28:56 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26ISuEL040817; Tue, 6 Mar 2018 18:28:56 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803061828.w26ISuEL040817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 6 Mar 2018 18:28:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330545 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 330545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 18:28:56 -0000 Author: brooks Date: Tue Mar 6 18:28:55 2018 New Revision: 330545 URL: https://svnweb.freebsd.org/changeset/base/330545 Log: Remove reference to unimplemented fuiword, etc. We don't support Harvard architectures. Modified: head/sys/mips/mips/support.S Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Tue Mar 6 16:16:30 2018 (r330544) +++ head/sys/mips/mips/support.S Tue Mar 6 18:28:55 2018 (r330545) @@ -281,10 +281,8 @@ LEAF(copyerr) END(copyerr) /* - * {fu,su},{ibyte,isword,iword}, fetch or store a byte, short or word to - * user text space. * {fu,su},{byte,sword,word}, fetch or store a byte, short or word to - * user data space. + * user-space. */ #ifdef __mips_n64 LEAF(fuword64) From owner-svn-src-all@freebsd.org Tue Mar 6 20:31:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7C5FF2C726; Tue, 6 Mar 2018 20:31:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A6ED68F16; Tue, 6 Mar 2018 20:31:14 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9587817B06; Tue, 6 Mar 2018 20:31:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26KVE0O001609; Tue, 6 Mar 2018 20:31:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26KVES5001608; Tue, 6 Mar 2018 20:31:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803062031.w26KVES5001608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 6 Mar 2018 20:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330546 - head/sys/dev/atkbdc X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/atkbdc X-SVN-Commit-Revision: 330546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 20:31:15 -0000 Author: cem Date: Tue Mar 6 20:31:14 2018 New Revision: 330546 URL: https://svnweb.freebsd.org/changeset/base/330546 Log: psm(4): Initialize variables before use dxp/dyp could have been used uninitialized in the subsequent debugging log invocation. Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Tue Mar 6 18:28:55 2018 (r330545) +++ head/sys/dev/atkbdc/psm.c Tue Mar 6 20:31:14 2018 (r330546) @@ -3781,6 +3781,9 @@ psmgestures(struct psm_softc *sc, finger_t *fingers, i if (queue_len < gest->window_min) return; + dyp = -1; + dxp = -1; + /* Is a scrolling action occurring? */ if (!gest->in_taphold && !ms->button && (!gest->in_vscroll || two_finger_scroll)) { From owner-svn-src-all@freebsd.org Tue Mar 6 21:05:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4D8BF2F4E0; Tue, 6 Mar 2018 21:05:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B0626B6A9; Tue, 6 Mar 2018 21:05:35 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5147D18156; Tue, 6 Mar 2018 21:05:35 +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 w26L5ZmR023592; Tue, 6 Mar 2018 21:05:35 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26L5ZAY023591; Tue, 6 Mar 2018 21:05:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201803062105.w26L5ZAY023591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 6 Mar 2018 21:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330547 - head/etc X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 330547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 21:05:35 -0000 Author: trasz Date: Tue Mar 6 21:05:34 2018 New Revision: 330547 URL: https://svnweb.freebsd.org/changeset/base/330547 Log: Add example devd.conf(5) entry for notifying init(8) about new USB ttys. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/etc/devd.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Tue Mar 6 20:31:14 2018 (r330546) +++ head/etc/devd.conf Tue Mar 6 21:05:34 2018 (r330547) @@ -339,4 +339,15 @@ notify 10 { action "logger $comm $core"; }; +# Let the init(8) know there's a new USB serial interface it might +# want to run getty(8) for. This includes device-side tty created +# by usb_template(4). +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "ttyU[0-9]+"; + action "/sbin/init q"; +}; + */ From owner-svn-src-all@freebsd.org Tue Mar 6 22:45:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD9A8F3656E; Tue, 6 Mar 2018 22:45:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 620F96F78C; Tue, 6 Mar 2018 22:45:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D18419160; Tue, 6 Mar 2018 22:45:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26MjjSj073835; Tue, 6 Mar 2018 22:45:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26MjjJK073834; Tue, 6 Mar 2018 22:45:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803062245.w26MjjJK073834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 6 Mar 2018 22:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330554 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 330554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 22:45:45 -0000 Author: kevans Date: Tue Mar 6 22:45:45 2018 New Revision: 330554 URL: https://svnweb.freebsd.org/changeset/base/330554 Log: aw_usbphy: Move later to SUPPORTDEV pass vbus-supply properties may be specified for each PHY. These properties reference a regulator that we must turn on/off as we turn the PHY on/off. However, if the usbphy comes up before the regulator in question (as is the case with GPIO-controlled regulators), then we will fail to grab a handle to the regulator and control it as the PHY power state changes. Fix it by just attaching the usbphy driver later. We don't really need it at RESOURCE, we just need it to be before DEFAULT when ehci/ohci attach. In particular, this fixes the USB NIC on a board that we don't yet supported- without this, it will not power on and if_ure cannot attach. Tested on: various boards [manu] Tested on: OrangePi R1 [Rap2 (irc)] Reported by: Rap2 (irc, "Cannot find USB NIC") Modified: head/sys/arm/allwinner/aw_usbphy.c Modified: head/sys/arm/allwinner/aw_usbphy.c ============================================================================== --- head/sys/arm/allwinner/aw_usbphy.c Tue Mar 6 21:45:23 2018 (r330553) +++ head/sys/arm/allwinner/aw_usbphy.c Tue Mar 6 22:45:45 2018 (r330554) @@ -418,7 +418,7 @@ static driver_t awusbphy_driver = { }; static devclass_t awusbphy_devclass; - +/* aw_usbphy needs to come up after regulators/gpio/etc, but before ehci/ohci */ EARLY_DRIVER_MODULE(awusbphy, simplebus, awusbphy_driver, awusbphy_devclass, - 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); + 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(awusbphy, 1); From owner-svn-src-all@freebsd.org Tue Mar 6 23:12:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C758F3849A; Tue, 6 Mar 2018 23:12:33 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 124F1709D6; Tue, 6 Mar 2018 23:12:33 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D06319658; Tue, 6 Mar 2018 23:12:33 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26NCWOw088646; Tue, 6 Mar 2018 23:12:32 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26NCW4n088637; Tue, 6 Mar 2018 23:12:32 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201803062312.w26NCW4n088637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 6 Mar 2018 23:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330555 - stable/11/sys/dev/qlxgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: stable/11/sys/dev/qlxgbe X-SVN-Commit-Revision: 330555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 23:12:33 -0000 Author: davidcs Date: Tue Mar 6 23:12:32 2018 New Revision: 330555 URL: https://svnweb.freebsd.org/changeset/base/330555 Log: MFC r329855 1. Added support to offline a port if is error recovery on successful. 2. Sysctls to enable/disable driver_state_dump and error_recovery. 3. Sysctl to control the delay between hw/fw reinitialization and restarting the fastpath. 4. Stop periodic stats retrieval if interface has IFF_DRV_RUNNING flag off. 5. Print contents of PEG_HALT_STATUS1 and PEG_HALT_STATUS2 on heartbeat failure. 6. Speed up slowpath shutdown during error recovery. 7. link_state update using atomic_store. 8. Added timestamp information on driver state and minidump captures. 9. Added support for Slowpath event logging 10.Added additional failure injection types to simulate failures. Modified: stable/11/sys/dev/qlxgbe/ql_dbg.h stable/11/sys/dev/qlxgbe/ql_def.h stable/11/sys/dev/qlxgbe/ql_glbl.h stable/11/sys/dev/qlxgbe/ql_hw.c stable/11/sys/dev/qlxgbe/ql_hw.h stable/11/sys/dev/qlxgbe/ql_inline.h stable/11/sys/dev/qlxgbe/ql_ioctl.c stable/11/sys/dev/qlxgbe/ql_ioctl.h stable/11/sys/dev/qlxgbe/ql_isr.c stable/11/sys/dev/qlxgbe/ql_misc.c stable/11/sys/dev/qlxgbe/ql_os.c stable/11/sys/dev/qlxgbe/ql_os.h stable/11/sys/dev/qlxgbe/ql_ver.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlxgbe/ql_dbg.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_dbg.h Tue Mar 6 22:45:45 2018 (r330554) +++ stable/11/sys/dev/qlxgbe/ql_dbg.h Tue Mar 6 23:12:32 2018 (r330555) @@ -42,17 +42,21 @@ extern void ql_dump_buf16(qla_host_t *ha, const char * extern void ql_dump_buf32(qla_host_t *ha, const char *str, void *dbuf, uint32_t len32); -#define INJCT_RX_RXB_INVAL 0x00001 -#define INJCT_RX_MP_NULL 0x00002 -#define INJCT_LRO_RXB_INVAL 0x00003 -#define INJCT_LRO_MP_NULL 0x00004 -#define INJCT_NUM_HNDLE_INVALID 0x00005 -#define INJCT_RDWR_INDREG_FAILURE 0x00006 -#define INJCT_RDWR_OFFCHIPMEM_FAILURE 0x00007 -#define INJCT_MBX_CMD_FAILURE 0x00008 -#define INJCT_HEARTBEAT_FAILURE 0x00009 -#define INJCT_TEMPERATURE_FAILURE 0x0000A -#define INJCT_M_GETCL_M_GETJCL_FAILURE 0x0000B +#define INJCT_RX_RXB_INVAL 0x00001 +#define INJCT_RX_MP_NULL 0x00002 +#define INJCT_LRO_RXB_INVAL 0x00003 +#define INJCT_LRO_MP_NULL 0x00004 +#define INJCT_NUM_HNDLE_INVALID 0x00005 +#define INJCT_RDWR_INDREG_FAILURE 0x00006 +#define INJCT_RDWR_OFFCHIPMEM_FAILURE 0x00007 +#define INJCT_MBX_CMD_FAILURE 0x00008 +#define INJCT_HEARTBEAT_FAILURE 0x00009 +#define INJCT_TEMPERATURE_FAILURE 0x0000A +#define INJCT_M_GETCL_M_GETJCL_FAILURE 0x0000B +#define INJCT_INV_CONT_OPCODE 0x0000C +#define INJCT_SGL_RCV_INV_DESC_COUNT 0x0000D +#define INJCT_SGL_LRO_INV_DESC_COUNT 0x0000E +#define INJCT_PEER_PORT_FAILURE_ERR_RECOVERY 0x0000F #ifdef QL_DBG Modified: stable/11/sys/dev/qlxgbe/ql_def.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_def.h Tue Mar 6 22:45:45 2018 (r330554) +++ stable/11/sys/dev/qlxgbe/ql_def.h Tue Mar 6 23:12:32 2018 (r330555) @@ -144,12 +144,12 @@ struct qla_host { volatile uint32_t qla_watchdog_paused; volatile uint32_t qla_initiate_recovery; volatile uint32_t qla_detach_active; + volatile uint32_t offline; device_t pci_dev; - uint16_t watchdog_ticks; + volatile uint16_t watchdog_ticks; uint8_t pci_func; - uint8_t resvd; /* ioctl related */ struct cdev *ioctl_dev; @@ -182,6 +182,7 @@ struct qla_host { /* hardware access lock */ + struct mtx sp_log_lock; struct mtx hw_lock; volatile uint32_t hw_lock_held; uint64_t hw_lock_failed; @@ -239,6 +240,9 @@ struct qla_host { volatile const char *qla_unlock; uint32_t dbg_level; uint32_t enable_minidump; + uint32_t enable_driverstate_dump; + uint32_t enable_error_recovery; + uint32_t ms_delay_after_init; uint8_t fw_ver_str[32]; @@ -272,5 +276,7 @@ typedef struct qla_host qla_host_t; #define QL_MAC_CMP(mac1, mac2) \ ((((*(uint32_t *) mac1) == (*(uint32_t *) mac2) && \ (*(uint16_t *)(mac1 + 4)) == (*(uint16_t *)(mac2 + 4)))) ? 0 : 1) + +#define QL_INITIATE_RECOVERY(ha) qla_set_error_recovery(ha) #endif /* #ifndef _QL_DEF_H_ */ Modified: stable/11/sys/dev/qlxgbe/ql_glbl.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_glbl.h Tue Mar 6 22:45:45 2018 (r330554) +++ stable/11/sys/dev/qlxgbe/ql_glbl.h Tue Mar 6 23:12:32 2018 (r330555) @@ -47,6 +47,7 @@ extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sd extern int ql_alloc_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf); extern void ql_free_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf); extern int ql_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp); +extern void qla_set_error_recovery(qla_host_t *ha); /* * from ql_hw.c @@ -115,5 +116,11 @@ extern unsigned int ql83xx_minidump_len; extern void ql_alloc_drvr_state_buffer(qla_host_t *ha); extern void ql_free_drvr_state_buffer(qla_host_t *ha); extern void ql_capture_drvr_state(qla_host_t *ha); +extern void ql_sp_log(qla_host_t *ha, uint16_t fmtstr_idx, uint16_t num_params, + uint32_t param0, uint32_t param1, uint32_t param2, + uint32_t param3, uint32_t param4); +extern void ql_alloc_sp_log_buffer(qla_host_t *ha); +extern void ql_free_sp_log_buffer(qla_host_t *ha); + #endif /* #ifndef_QL_GLBL_H_ */ Modified: stable/11/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_hw.c Tue Mar 6 22:45:45 2018 (r330554) +++ stable/11/sys/dev/qlxgbe/ql_hw.c Tue Mar 6 23:12:32 2018 (r330555) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); static void qla_del_rcv_cntxt(qla_host_t *ha); static int qla_init_rcv_cntxt(qla_host_t *ha); -static void qla_del_xmt_cntxt(qla_host_t *ha); +static int qla_del_xmt_cntxt(qla_host_t *ha); static int qla_init_xmt_cntxt(qla_host_t *ha); static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox, uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause); @@ -647,11 +647,118 @@ qlnx_add_hw_xmt_stats_sysctls(qla_host_t *ha) } static void +qlnx_add_hw_mbx_cmpl_stats_sysctls(qla_host_t *ha) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *node_children; + + ctx = device_get_sysctl_ctx(ha->pci_dev); + node_children = SYSCTL_CHILDREN(device_get_sysctl_tree(ha->pci_dev)); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_lt_200ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[0], + "mbx_completion_time_lt_200ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_200ms_400ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[1], + "mbx_completion_time_200ms_400ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_400ms_600ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[2], + "mbx_completion_time_400ms_600ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_600ms_800ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[3], + "mbx_completion_time_600ms_800ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_800ms_1000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[4], + "mbx_completion_time_800ms_1000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1000ms_1200ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[5], + "mbx_completion_time_1000ms_1200ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1200ms_1400ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[6], + "mbx_completion_time_1200ms_1400ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1400ms_1600ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[7], + "mbx_completion_time_1400ms_1600ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1600ms_1800ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[8], + "mbx_completion_time_1600ms_1800ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1800ms_2000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[9], + "mbx_completion_time_1800ms_2000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2000ms_2200ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[10], + "mbx_completion_time_2000ms_2200ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2200ms_2400ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[11], + "mbx_completion_time_2200ms_2400ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2400ms_2600ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[12], + "mbx_completion_time_2400ms_2600ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2600ms_2800ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[13], + "mbx_completion_time_2600ms_2800ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2800ms_3000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[14], + "mbx_completion_time_2800ms_3000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_3000ms_4000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[15], + "mbx_completion_time_3000ms_4000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_4000ms_5000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[16], + "mbx_completion_time_4000ms_5000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_host_mbx_cntrl_timeout", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[17], + "mbx_completion_host_mbx_cntrl_timeout"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_fw_mbx_cntrl_timeout", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[18], + "mbx_completion_fw_mbx_cntrl_timeout"); + return; +} + +static void qlnx_add_hw_stats_sysctls(qla_host_t *ha) { qlnx_add_hw_mac_stats_sysctls(ha); qlnx_add_hw_rcv_stats_sysctls(ha); qlnx_add_hw_xmt_stats_sysctls(ha); + qlnx_add_hw_mbx_cmpl_stats_sysctls(ha); return; } @@ -918,6 +1025,30 @@ ql_hw_add_sysctls(qla_host_t *ha) "\t Any change requires ifconfig down/up to take effect\n" "\t Note that LRO may be turned off/on via ifconfig\n"); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "sp_log_index", CTLFLAG_RW, &ha->hw.sp_log_index, + ha->hw.sp_log_index, "sp_log_index"); + + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "sp_log_stop", CTLFLAG_RW, &ha->hw.sp_log_stop, + ha->hw.sp_log_stop, "sp_log_stop"); + + ha->hw.sp_log_stop_events = 0; + + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "sp_log_stop_events", CTLFLAG_RW, + &ha->hw.sp_log_stop_events, + ha->hw.sp_log_stop_events, "Slow path event log is stopped" + " when OR of the following events occur \n" + "\t 0x01 : Heart beat Failure\n" + "\t 0x02 : Temperature Failure\n" + "\t 0x04 : HW Initialization Failure\n" + "\t 0x08 : Interface Initialization Failure\n" + "\t 0x10 : Error Recovery Failure\n"); + ha->hw.mdump_active = 0; SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -998,13 +1129,13 @@ ql_hw_link_status(qla_host_t *ha) device_printf(ha->pci_dev, "link Down\n"); } - if (ha->hw.flags.fduplex) { + if (ha->hw.fduplex) { device_printf(ha->pci_dev, "Full Duplex\n"); } else { device_printf(ha->pci_dev, "Half Duplex\n"); } - if (ha->hw.flags.autoneg) { + if (ha->hw.autoneg) { device_printf(ha->pci_dev, "Auto Negotiation Enabled\n"); } else { device_printf(ha->pci_dev, "Auto Negotiation Disabled\n"); @@ -1255,19 +1386,39 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t uint32_t i; uint32_t data; int ret = 0; + uint64_t start_usecs; + uint64_t end_usecs; + uint64_t msecs_200; - if (QL_ERR_INJECT(ha, INJCT_MBX_CMD_FAILURE)) { + ql_sp_log(ha, 0, 5, no_pause, h_mbox[0], h_mbox[1], h_mbox[2], h_mbox[3]); + + if (ha->offline || ha->qla_initiate_recovery) { + ql_sp_log(ha, 1, 2, ha->offline, ha->qla_initiate_recovery, 0, 0, 0); + goto exit_qla_mbx_cmd; + } + + if (((ha->err_inject & 0xFFFF) == INJCT_MBX_CMD_FAILURE) && + (((ha->err_inject & ~0xFFFF) == ((h_mbox[0] & 0xFFFF) << 16))|| + !(ha->err_inject & ~0xFFFF))) { ret = -3; - ha->qla_initiate_recovery = 1; + QL_INITIATE_RECOVERY(ha); goto exit_qla_mbx_cmd; } + start_usecs = qla_get_usec_timestamp(); + if (no_pause) i = 1000; else i = Q8_MBX_MSEC_DELAY; while (i) { + + if (ha->qla_initiate_recovery) { + ql_sp_log(ha, 2, 1, ha->qla_initiate_recovery, 0, 0, 0, 0); + return (-1); + } + data = READ_REG32(ha, Q8_HOST_MBOX_CNTRL); if (data == 0) break; @@ -1282,8 +1433,10 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t if (i == 0) { device_printf(ha->pci_dev, "%s: host_mbx_cntrl 0x%08x\n", __func__, data); + ql_sp_log(ha, 3, 1, data, 0, 0, 0, 0); ret = -1; - ha->qla_initiate_recovery = 1; + ha->hw.mbx_comp_msecs[(Q8_MBX_COMP_MSECS - 2)]++; + QL_INITIATE_RECOVERY(ha); goto exit_qla_mbx_cmd; } @@ -1297,6 +1450,12 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t i = Q8_MBX_MSEC_DELAY; while (i) { + + if (ha->qla_initiate_recovery) { + ql_sp_log(ha, 4, 1, ha->qla_initiate_recovery, 0, 0, 0, 0); + return (-1); + } + data = READ_REG32(ha, Q8_FW_MBOX_CNTRL); if ((data & 0x3) == 1) { @@ -1314,18 +1473,44 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t if (i == 0) { device_printf(ha->pci_dev, "%s: fw_mbx_cntrl 0x%08x\n", __func__, data); + ql_sp_log(ha, 5, 1, data, 0, 0, 0, 0); ret = -2; - ha->qla_initiate_recovery = 1; + ha->hw.mbx_comp_msecs[(Q8_MBX_COMP_MSECS - 1)]++; + QL_INITIATE_RECOVERY(ha); goto exit_qla_mbx_cmd; } for (i = 0; i < n_fwmbox; i++) { + + if (ha->qla_initiate_recovery) { + ql_sp_log(ha, 6, 1, ha->qla_initiate_recovery, 0, 0, 0, 0); + return (-1); + } + *fw_mbox++ = READ_REG32(ha, (Q8_FW_MBOX0 + (i << 2))); } WRITE_REG32(ha, Q8_FW_MBOX_CNTRL, 0x0); WRITE_REG32(ha, ha->hw.mbx_intr_mask_offset, 0x0); + end_usecs = qla_get_usec_timestamp(); + + if (end_usecs > start_usecs) { + msecs_200 = (end_usecs - start_usecs)/(1000 * 200); + + if (msecs_200 < 15) + ha->hw.mbx_comp_msecs[msecs_200]++; + else if (msecs_200 < 20) + ha->hw.mbx_comp_msecs[15]++; + else { + device_printf(ha->pci_dev, "%s: [%ld, %ld] %ld\n", __func__, + start_usecs, end_usecs, msecs_200); + ha->hw.mbx_comp_msecs[16]++; + } + } + ql_sp_log(ha, 7, 5, fw_mbox[0], fw_mbox[1], fw_mbox[2], fw_mbox[3], fw_mbox[4]); + + exit_qla_mbx_cmd: return (ret); } @@ -1401,7 +1586,8 @@ qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_i if (qla_mbx_cmd(ha, (uint32_t *)c_intr, (sizeof (q80_config_intr_t) >> 2), ha->hw.mbox, (sizeof (q80_config_intr_rsp_t) >> 2), 0)) { - device_printf(dev, "%s: failed0\n", __func__); + device_printf(dev, "%s: %s failed0\n", __func__, + (create ? "create" : "delete")); return (-1); } @@ -1410,8 +1596,8 @@ qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_i err = Q8_MBX_RSP_STATUS(c_intr_rsp->regcnt_status); if (err) { - device_printf(dev, "%s: failed1 [0x%08x, %d]\n", __func__, err, - c_intr_rsp->nentries); + device_printf(dev, "%s: %s failed1 [0x%08x, %d]\n", __func__, + (create ? "create" : "delete"), err, c_intr_rsp->nentries); for (i = 0; i < c_intr_rsp->nentries; i++) { device_printf(dev, "%s: [%d]:[0x%x 0x%x 0x%x]\n", @@ -2015,7 +2201,8 @@ ql_get_stats(qla_host_t *ha) cmd |= ((ha->pci_func & 0x1) << 16); - if (ha->qla_watchdog_pause) + if (ha->qla_watchdog_pause || (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) goto ql_get_stats_exit; if (qla_get_hw_stats(ha, cmd, sizeof (q80_get_stats_rsp_t)) == 0) { @@ -2032,7 +2219,8 @@ ql_get_stats(qla_host_t *ha) // cmd |= Q8_GET_STATS_CMD_CLEAR; cmd |= (ha->hw.rcv_cntxt_id << 16); - if (ha->qla_watchdog_pause) + if (ha->qla_watchdog_pause || (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) goto ql_get_stats_exit; if (qla_get_hw_stats(ha, cmd, sizeof (q80_get_stats_rsp_t)) == 0) { @@ -2043,13 +2231,18 @@ ql_get_stats(qla_host_t *ha) __func__, ha->hw.mbox[0]); } - if (ha->qla_watchdog_pause) + if (ha->qla_watchdog_pause || (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) goto ql_get_stats_exit; /* * Get XMT Statistics */ - for (i = 0 ; ((i < ha->hw.num_tx_rings) && (!ha->qla_watchdog_pause)); - i++) { + for (i = 0 ; (i < ha->hw.num_tx_rings); i++) { + if (ha->qla_watchdog_pause || + (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) + goto ql_get_stats_exit; + cmd = Q8_GET_STATS_CMD_XMT | Q8_GET_STATS_CMD_TYPE_CNTXT; // cmd |= Q8_GET_STATS_CMD_CLEAR; cmd |= (ha->hw.tx_cntxt[i].tx_cntxt_id << 16); @@ -2679,7 +2872,8 @@ ql_del_hw_if(qla_host_t *ha) qla_del_rcv_cntxt(ha); - qla_del_xmt_cntxt(ha); + if(qla_del_xmt_cntxt(ha)) + goto ql_del_hw_if_exit; if (ha->hw.flags.init_intr_cnxt) { for (i = 0; i < ha->hw.num_sds_rings; ) { @@ -2688,14 +2882,17 @@ ql_del_hw_if(qla_host_t *ha) num_msix = Q8_MAX_INTR_VECTORS; else num_msix = ha->hw.num_sds_rings - i; - qla_config_intr_cntxt(ha, i, num_msix, 0); + if (qla_config_intr_cntxt(ha, i, num_msix, 0)) + break; + i += num_msix; } ha->hw.flags.init_intr_cnxt = 0; } +ql_del_hw_if_exit: if (ha->hw.enable_soft_lro) { qla_drain_soft_lro(ha); qla_free_soft_lro(ha); @@ -3328,19 +3525,22 @@ qla_del_xmt_cntxt_i(qla_host_t *ha, uint32_t txr_idx) return (0); } -static void +static int qla_del_xmt_cntxt(qla_host_t *ha) { uint32_t i; + int ret = 0; if (!ha->hw.flags.init_tx_cnxt) - return; + return (ret); for (i = 0; i < ha->hw.num_tx_rings; i++) { - if (qla_del_xmt_cntxt_i(ha, i)) + if ((ret = qla_del_xmt_cntxt_i(ha, i)) != 0) break; } ha->hw.flags.init_tx_cnxt = 0; + + return (ret); } static int @@ -3350,8 +3550,10 @@ qla_init_xmt_cntxt(qla_host_t *ha) for (i = 0; i < ha->hw.num_tx_rings; i++) { if (qla_init_xmt_cntxt_i(ha, i) != 0) { - for (j = 0; j < i; j++) - qla_del_xmt_cntxt_i(ha, j); + for (j = 0; j < i; j++) { + if (qla_del_xmt_cntxt_i(ha, j)) + break; + } return (-1); } } @@ -3627,22 +3829,23 @@ ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) void ql_update_link_state(qla_host_t *ha) { - uint32_t link_state; + uint32_t link_state = 0; uint32_t prev_link_state; - if (!(ha->ifp->if_drv_flags & IFF_DRV_RUNNING)) { - ha->hw.link_up = 0; - return; - } - link_state = READ_REG32(ha, Q8_LINK_STATE); - prev_link_state = ha->hw.link_up; - if (ha->pci_func == 0) - ha->hw.link_up = (((link_state & 0xF) == 1)? 1 : 0); - else - ha->hw.link_up = ((((link_state >> 4)& 0xF) == 1)? 1 : 0); + if (ha->ifp->if_drv_flags & IFF_DRV_RUNNING) { + link_state = READ_REG32(ha, Q8_LINK_STATE); + if (ha->pci_func == 0) { + link_state = (((link_state & 0xF) == 1)? 1 : 0); + } else { + link_state = ((((link_state >> 4)& 0xF) == 1)? 1 : 0); + } + } + + atomic_store_rel_8(&ha->hw.link_up, (uint8_t)link_state); + if (prev_link_state != ha->hw.link_up) { if (ha->hw.link_up) { if_link_state_change(ha->ifp, LINK_STATE_UP); @@ -3669,8 +3872,14 @@ ql_hw_check_health(qla_host_t *ha) if (((val & 0xFFFF) == 2) || ((val & 0xFFFF) == 3) || (QL_ERR_INJECT(ha, INJCT_TEMPERATURE_FAILURE))) { - device_printf(ha->pci_dev, "%s: Temperature Alert [0x%08x]\n", - __func__, val); + device_printf(ha->pci_dev, "%s: Temperature Alert" + " at ts_usecs %ld ts_reg = 0x%08x\n", + __func__, qla_get_usec_timestamp(), val); + + if (ha->hw.sp_log_stop_events & Q8_SP_LOG_STOP_TEMP_FAILURE) + ha->hw.sp_log_stop = -1; + + QL_INITIATE_RECOVERY(ha); return -1; } @@ -3691,10 +3900,26 @@ ql_hw_check_health(qla_host_t *ha) __func__, val); if (ha->hw.hbeat_failure < 2) /* we ignore the first failure */ return 0; - else - device_printf(ha->pci_dev, "%s: Heartbeat Failue [0x%08x]\n", - __func__, val); + else { + uint32_t peg_halt_status1; + uint32_t peg_halt_status2; + peg_halt_status1 = READ_REG32(ha, Q8_PEG_HALT_STATUS1); + peg_halt_status2 = READ_REG32(ha, Q8_PEG_HALT_STATUS2); + + device_printf(ha->pci_dev, + "%s: Heartbeat Failue at ts_usecs = %ld " + "fw_heart_beat = 0x%08x " + "peg_halt_status1 = 0x%08x " + "peg_halt_status2 = 0x%08x\n", + __func__, qla_get_usec_timestamp(), val, + peg_halt_status1, peg_halt_status2); + + if (ha->hw.sp_log_stop_events & Q8_SP_LOG_STOP_HBEAT_FAILURE) + ha->hw.sp_log_stop = -1; + } + QL_INITIATE_RECOVERY(ha); + return -1; } @@ -4429,8 +4654,8 @@ ql_minidump(qla_host_t *ha) if (ha->hw.mdump_done) return; - - ha->hw.mdump_start_seq_index = ql_stop_sequence(ha); + ha->hw.mdump_usec_ts = qla_get_usec_timestamp(); + ha->hw.mdump_start_seq_index = ql_stop_sequence(ha); bzero(ha->hw.mdump_buffer, ha->hw.mdump_buffer_size); bzero(ha->hw.mdump_template, ha->hw.mdump_template_size); Modified: stable/11/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_hw.h Tue Mar 6 22:45:45 2018 (r330554) +++ stable/11/sys/dev/qlxgbe/ql_hw.h Tue Mar 6 23:12:32 2018 (r330555) @@ -1600,26 +1600,26 @@ typedef struct _qla_hw { uint32_t unicast_mac :1, bcast_mac :1, - loopback_mode :2, init_tx_cnxt :1, init_rx_cnxt :1, init_intr_cnxt :1, - fduplex :1, - autoneg :1, fdt_valid :1; } flags; - uint16_t link_speed; - uint16_t cable_length; - uint32_t cable_oui; - uint8_t link_up; - uint8_t module_type; - uint8_t link_faults; + volatile uint16_t link_speed; + volatile uint16_t cable_length; + volatile uint32_t cable_oui; + volatile uint8_t link_up; + volatile uint8_t module_type; + volatile uint8_t link_faults; + volatile uint8_t loopback_mode; + volatile uint8_t fduplex; + volatile uint8_t autoneg; - uint8_t mac_rcv_mode; + volatile uint8_t mac_rcv_mode; - uint32_t max_mtu; + volatile uint32_t max_mtu; uint8_t mac_addr[ETHER_ADDR_LEN]; @@ -1703,9 +1703,25 @@ typedef struct _qla_hw { uint32_t mdump_buffer_size; void *mdump_template; uint32_t mdump_template_size; + uint64_t mdump_usec_ts; +#define Q8_MBX_COMP_MSECS (19) + uint64_t mbx_comp_msecs[Q8_MBX_COMP_MSECS]; /* driver state related */ void *drvr_state; + + /* slow path trace */ + uint32_t sp_log_stop_events; +#define Q8_SP_LOG_STOP_HBEAT_FAILURE 0x001 +#define Q8_SP_LOG_STOP_TEMP_FAILURE 0x002 +#define Q8_SP_LOG_STOP_HW_INIT_FAILURE 0x004 +#define Q8_SP_LOG_STOP_IF_START_FAILURE 0x008 +#define Q8_SP_LOG_STOP_ERR_RECOVERY_FAILURE 0x010 + + uint32_t sp_log_stop; + uint32_t sp_log_index; + uint32_t sp_log_num_entries; + void *sp_log; } qla_hw_t; #define QL_UPDATE_RDS_PRODUCER_INDEX(ha, prod_reg, val) \ Modified: stable/11/sys/dev/qlxgbe/ql_inline.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_inline.h Tue Mar 6 22:45:45 2018 (r330554) +++ stable/11/sys/dev/qlxgbe/ql_inline.h Tue Mar 6 23:12:32 2018 (r330555) @@ -166,7 +166,7 @@ qla_lock(qla_host_t *ha, const char *str, uint32_t tim while (1) { mtx_lock(&ha->hw_lock); - if (ha->qla_detach_active) { + if (ha->qla_detach_active || ha->offline) { mtx_unlock(&ha->hw_lock); break; } @@ -191,7 +191,10 @@ qla_lock(qla_host_t *ha, const char *str, uint32_t tim } } - //device_printf(ha->pci_dev, "%s: %s ret = %d\n", __func__, str,ret); +// if (!ha->enable_error_recovery) +// device_printf(ha->pci_dev, "%s: %s ret = %d\n", __func__, +// str,ret); + return (ret); } @@ -202,7 +205,9 @@ qla_unlock(qla_host_t *ha, const char *str) ha->hw_lock_held = 0; ha->qla_unlock = str; mtx_unlock(&ha->hw_lock); - //device_printf(ha->pci_dev, "%s: %s\n", __func__, str); + +// if (!ha->enable_error_recovery) +// device_printf(ha->pci_dev, "%s: %s\n", __func__, str); return; } Modified: stable/11/sys/dev/qlxgbe/ql_ioctl.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_ioctl.c Tue Mar 6 22:45:45 2018 (r330554) +++ stable/11/sys/dev/qlxgbe/ql_ioctl.c Tue Mar 6 23:12:32 2018 (r330555) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "ql_ver.h" #include "ql_dbg.h" +static int ql_slowpath_log(qla_host_t *ha, qla_sp_log_t *log); static int ql_drvr_state(qla_host_t *ha, qla_driver_state_t *drvr_state); static uint32_t ql_drvr_state_size(qla_host_t *ha); static int ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, @@ -224,6 +225,7 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, case QLA_RD_FW_DUMP: if (ha->hw.mdump_init == 0) { + device_printf(pci_dev, "%s: minidump not initialized\n", __func__); rval = EINVAL; break; } @@ -233,45 +235,85 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, if ((fw_dump->minidump == NULL) || (fw_dump->minidump_size != (ha->hw.mdump_buffer_size + ha->hw.mdump_template_size))) { + device_printf(pci_dev, + "%s: minidump buffer [%p] size = [%d, %d] invalid\n", __func__, + fw_dump->minidump, fw_dump->minidump_size, + (ha->hw.mdump_buffer_size + ha->hw.mdump_template_size)); rval = EINVAL; break; } - if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { - if (!ha->hw.mdump_done) - ha->qla_initiate_recovery = 1; - QLA_UNLOCK(ha, __func__); - } else { + if ((ha->pci_func & 0x1)) { + device_printf(pci_dev, "%s: mindump allowed only on Port0\n", __func__); rval = ENXIO; break; } + + fw_dump->saved = 1; + + if (ha->offline) { + + if (ha->enable_minidump) + ql_minidump(ha); + + fw_dump->saved = 0; + fw_dump->usec_ts = ha->hw.mdump_usec_ts; + + if (!ha->hw.mdump_done) { + device_printf(pci_dev, + "%s: port offline minidump failed\n", __func__); + rval = ENXIO; + break; + } + } else { + + if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { + if (!ha->hw.mdump_done) { + fw_dump->saved = 0; + QL_INITIATE_RECOVERY(ha); + device_printf(pci_dev, "%s: recovery initiated " + " to trigger minidump\n", + __func__); + } + QLA_UNLOCK(ha, __func__); + } else { + device_printf(pci_dev, "%s: QLA_LOCK() failed0\n", __func__); + rval = ENXIO; + break; + } #define QLNX_DUMP_WAIT_SECS 30 - count = QLNX_DUMP_WAIT_SECS * 1000; + count = QLNX_DUMP_WAIT_SECS * 1000; - while (count) { - if (ha->hw.mdump_done) - break; - qla_mdelay(__func__, 100); - count -= 100; - } + while (count) { + if (ha->hw.mdump_done) + break; + qla_mdelay(__func__, 100); + count -= 100; + } - if (!ha->hw.mdump_done) { - rval = ENXIO; - break; - } + if (!ha->hw.mdump_done) { + device_printf(pci_dev, + "%s: port not offline minidump failed\n", __func__); + rval = ENXIO; + break; + } + fw_dump->usec_ts = ha->hw.mdump_usec_ts; - if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { - ha->hw.mdump_done = 0; - QLA_UNLOCK(ha, __func__); - } else { - rval = ENXIO; - break; + if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { + ha->hw.mdump_done = 0; + QLA_UNLOCK(ha, __func__); + } else { + device_printf(pci_dev, "%s: QLA_LOCK() failed1\n", __func__); + rval = ENXIO; + break; + } } if ((rval = copyout(ha->hw.mdump_template, fw_dump->minidump, ha->hw.mdump_template_size))) { + device_printf(pci_dev, "%s: template copyout failed\n", __func__); rval = ENXIO; break; } @@ -279,14 +321,20 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, if ((rval = copyout(ha->hw.mdump_buffer, ((uint8_t *)fw_dump->minidump + ha->hw.mdump_template_size), - ha->hw.mdump_buffer_size))) + ha->hw.mdump_buffer_size))) { + device_printf(pci_dev, "%s: minidump copyout failed\n", __func__); rval = ENXIO; + } break; case QLA_RD_DRVR_STATE: rval = ql_drvr_state(ha, (qla_driver_state_t *)data); break; + case QLA_RD_SLOWPATH_LOG: + rval = ql_slowpath_log(ha, (qla_sp_log_t *)data); + break; + case QLA_RD_PCI_IDS: pci_ids = (qla_rd_pci_ids_t *)data; pci_ids->ven_id = pci_get_vendor(pci_dev); @@ -304,12 +352,12 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, } + static int ql_drvr_state(qla_host_t *ha, qla_driver_state_t *state) { int rval = 0; uint32_t drvr_state_size; - qla_drvr_state_hdr_t *hdr; drvr_state_size = ql_drvr_state_size(ha); @@ -324,11 +372,8 @@ ql_drvr_state(qla_host_t *ha, qla_driver_state_t *stat if (ha->hw.drvr_state == NULL) return (ENOMEM); - hdr = ha->hw.drvr_state; + ql_capture_drvr_state(ha); - if (!hdr->drvr_version_major) - ql_capture_drvr_state(ha); - rval = copyout(ha->hw.drvr_state, state->buffer, drvr_state_size); bzero(ha->hw.drvr_state, drvr_state_size); @@ -416,22 +461,26 @@ ql_capture_drvr_state(qla_host_t *ha) { uint8_t *state_buffer; uint8_t *ptr; - uint32_t drvr_state_size; qla_drvr_state_hdr_t *hdr; uint32_t size; int i; - drvr_state_size = ql_drvr_state_size(ha); - state_buffer = ha->hw.drvr_state; if (state_buffer == NULL) return; - - bzero(state_buffer, drvr_state_size); hdr = (qla_drvr_state_hdr_t *)state_buffer; + + hdr->saved = 0; + if (hdr->drvr_version_major) { + hdr->saved = 1; + return; + } + + hdr->usec_ts = qla_get_usec_timestamp(); + hdr->drvr_version_major = QLA_VERSION_MAJOR; hdr->drvr_version_minor = QLA_VERSION_MINOR; hdr->drvr_version_build = QLA_VERSION_BUILD; @@ -512,6 +561,9 @@ ql_alloc_drvr_state_buffer(qla_host_t *ha) ha->hw.drvr_state = malloc(drvr_state_size, M_QLA83XXBUF, M_NOWAIT); + if (ha->hw.drvr_state != NULL) + bzero(ha->hw.drvr_state, drvr_state_size); + return; } @@ -521,5 +573,95 @@ ql_free_drvr_state_buffer(qla_host_t *ha) if (ha->hw.drvr_state != NULL) free(ha->hw.drvr_state, M_QLA83XXBUF); return; +} + +void +ql_sp_log(qla_host_t *ha, uint16_t fmtstr_idx, uint16_t num_params, + uint32_t param0, uint32_t param1, uint32_t param2, uint32_t param3, + uint32_t param4) +{ + qla_sp_log_entry_t *sp_e, *sp_log; + + if (((sp_log = ha->hw.sp_log) == NULL) || ha->hw.sp_log_stop) + return; + + mtx_lock(&ha->sp_log_lock); + + sp_e = &sp_log[ha->hw.sp_log_index]; + + bzero(sp_e, sizeof (qla_sp_log_entry_t)); + + sp_e->fmtstr_idx = fmtstr_idx; + sp_e->num_params = num_params; + + sp_e->usec_ts = qla_get_usec_timestamp(); + + sp_e->params[0] = param0; + sp_e->params[1] = param1; + sp_e->params[2] = param2; + sp_e->params[3] = param3; + sp_e->params[4] = param4; + + ha->hw.sp_log_index = (ha->hw.sp_log_index + 1) & (NUM_LOG_ENTRIES - 1); + + if (ha->hw.sp_log_num_entries < NUM_LOG_ENTRIES) + ha->hw.sp_log_num_entries++; + + mtx_unlock(&ha->sp_log_lock); + + return; +} + +void +ql_alloc_sp_log_buffer(qla_host_t *ha) +{ + uint32_t size; + + size = (sizeof(qla_sp_log_entry_t)) * NUM_LOG_ENTRIES; + + ha->hw.sp_log = malloc(size, M_QLA83XXBUF, M_NOWAIT); + + if (ha->hw.sp_log != NULL) + bzero(ha->hw.sp_log, size); + + ha->hw.sp_log_index = 0; + ha->hw.sp_log_num_entries = 0; + + return; +} + +void +ql_free_sp_log_buffer(qla_host_t *ha) +{ + if (ha->hw.sp_log != NULL) + free(ha->hw.sp_log, M_QLA83XXBUF); + return; +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Mar 6 23:17:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88700F38AD7; Tue, 6 Mar 2018 23:17:57 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A58670C93; Tue, 6 Mar 2018 23:17:57 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1675E1966D; Tue, 6 Mar 2018 23:17:57 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26NHv1E088880; Tue, 6 Mar 2018 23:17:57 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26NHuOT088871; Tue, 6 Mar 2018 23:17:56 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201803062317.w26NHuOT088871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 6 Mar 2018 23:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330556 - stable/10/sys/dev/qlxgbe X-SVN-Group: stable-10 X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: stable/10/sys/dev/qlxgbe X-SVN-Commit-Revision: 330556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 23:17:57 -0000 Author: davidcs Date: Tue Mar 6 23:17:56 2018 New Revision: 330556 URL: https://svnweb.freebsd.org/changeset/base/330556 Log: MFC r329855 1. Added support to offline a port if is error recovery on successful. 2. Sysctls to enable/disable driver_state_dump and error_recovery. 3. Sysctl to control the delay between hw/fw reinitialization and restarting the fastpath. 4. Stop periodic stats retrieval if interface has IFF_DRV_RUNNING flag off. 5. Print contents of PEG_HALT_STATUS1 and PEG_HALT_STATUS2 on heartbeat failure. 6. Speed up slowpath shutdown during error recovery. 7. link_state update using atomic_store. 8. Added timestamp information on driver state and minidump captures. 9. Added support for Slowpath event logging 10.Added additional failure injection types to simulate failures. Modified: stable/10/sys/dev/qlxgbe/ql_dbg.h stable/10/sys/dev/qlxgbe/ql_def.h stable/10/sys/dev/qlxgbe/ql_glbl.h stable/10/sys/dev/qlxgbe/ql_hw.c stable/10/sys/dev/qlxgbe/ql_hw.h stable/10/sys/dev/qlxgbe/ql_inline.h stable/10/sys/dev/qlxgbe/ql_ioctl.c stable/10/sys/dev/qlxgbe/ql_ioctl.h stable/10/sys/dev/qlxgbe/ql_isr.c stable/10/sys/dev/qlxgbe/ql_misc.c stable/10/sys/dev/qlxgbe/ql_os.c stable/10/sys/dev/qlxgbe/ql_os.h stable/10/sys/dev/qlxgbe/ql_ver.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_dbg.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_dbg.h Tue Mar 6 23:12:32 2018 (r330555) +++ stable/10/sys/dev/qlxgbe/ql_dbg.h Tue Mar 6 23:17:56 2018 (r330556) @@ -42,17 +42,21 @@ extern void ql_dump_buf16(qla_host_t *ha, const char * extern void ql_dump_buf32(qla_host_t *ha, const char *str, void *dbuf, uint32_t len32); -#define INJCT_RX_RXB_INVAL 0x00001 -#define INJCT_RX_MP_NULL 0x00002 -#define INJCT_LRO_RXB_INVAL 0x00003 -#define INJCT_LRO_MP_NULL 0x00004 -#define INJCT_NUM_HNDLE_INVALID 0x00005 -#define INJCT_RDWR_INDREG_FAILURE 0x00006 -#define INJCT_RDWR_OFFCHIPMEM_FAILURE 0x00007 -#define INJCT_MBX_CMD_FAILURE 0x00008 -#define INJCT_HEARTBEAT_FAILURE 0x00009 -#define INJCT_TEMPERATURE_FAILURE 0x0000A -#define INJCT_M_GETCL_M_GETJCL_FAILURE 0x0000B +#define INJCT_RX_RXB_INVAL 0x00001 +#define INJCT_RX_MP_NULL 0x00002 +#define INJCT_LRO_RXB_INVAL 0x00003 +#define INJCT_LRO_MP_NULL 0x00004 +#define INJCT_NUM_HNDLE_INVALID 0x00005 +#define INJCT_RDWR_INDREG_FAILURE 0x00006 +#define INJCT_RDWR_OFFCHIPMEM_FAILURE 0x00007 +#define INJCT_MBX_CMD_FAILURE 0x00008 +#define INJCT_HEARTBEAT_FAILURE 0x00009 +#define INJCT_TEMPERATURE_FAILURE 0x0000A +#define INJCT_M_GETCL_M_GETJCL_FAILURE 0x0000B +#define INJCT_INV_CONT_OPCODE 0x0000C +#define INJCT_SGL_RCV_INV_DESC_COUNT 0x0000D +#define INJCT_SGL_LRO_INV_DESC_COUNT 0x0000E +#define INJCT_PEER_PORT_FAILURE_ERR_RECOVERY 0x0000F #ifdef QL_DBG Modified: stable/10/sys/dev/qlxgbe/ql_def.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_def.h Tue Mar 6 23:12:32 2018 (r330555) +++ stable/10/sys/dev/qlxgbe/ql_def.h Tue Mar 6 23:17:56 2018 (r330556) @@ -144,12 +144,12 @@ struct qla_host { volatile uint32_t qla_watchdog_paused; volatile uint32_t qla_initiate_recovery; volatile uint32_t qla_detach_active; + volatile uint32_t offline; device_t pci_dev; - uint16_t watchdog_ticks; + volatile uint16_t watchdog_ticks; uint8_t pci_func; - uint8_t resvd; /* ioctl related */ struct cdev *ioctl_dev; @@ -182,6 +182,7 @@ struct qla_host { /* hardware access lock */ + struct mtx sp_log_lock; struct mtx hw_lock; volatile uint32_t hw_lock_held; uint64_t hw_lock_failed; @@ -239,6 +240,9 @@ struct qla_host { volatile const char *qla_unlock; uint32_t dbg_level; uint32_t enable_minidump; + uint32_t enable_driverstate_dump; + uint32_t enable_error_recovery; + uint32_t ms_delay_after_init; uint8_t fw_ver_str[32]; @@ -272,5 +276,7 @@ typedef struct qla_host qla_host_t; #define QL_MAC_CMP(mac1, mac2) \ ((((*(uint32_t *) mac1) == (*(uint32_t *) mac2) && \ (*(uint16_t *)(mac1 + 4)) == (*(uint16_t *)(mac2 + 4)))) ? 0 : 1) + +#define QL_INITIATE_RECOVERY(ha) qla_set_error_recovery(ha) #endif /* #ifndef _QL_DEF_H_ */ Modified: stable/10/sys/dev/qlxgbe/ql_glbl.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_glbl.h Tue Mar 6 23:12:32 2018 (r330555) +++ stable/10/sys/dev/qlxgbe/ql_glbl.h Tue Mar 6 23:17:56 2018 (r330556) @@ -47,6 +47,7 @@ extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sd extern int ql_alloc_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf); extern void ql_free_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf); extern int ql_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp); +extern void qla_set_error_recovery(qla_host_t *ha); /* * from ql_hw.c @@ -115,5 +116,11 @@ extern unsigned int ql83xx_minidump_len; extern void ql_alloc_drvr_state_buffer(qla_host_t *ha); extern void ql_free_drvr_state_buffer(qla_host_t *ha); extern void ql_capture_drvr_state(qla_host_t *ha); +extern void ql_sp_log(qla_host_t *ha, uint16_t fmtstr_idx, uint16_t num_params, + uint32_t param0, uint32_t param1, uint32_t param2, + uint32_t param3, uint32_t param4); +extern void ql_alloc_sp_log_buffer(qla_host_t *ha); +extern void ql_free_sp_log_buffer(qla_host_t *ha); + #endif /* #ifndef_QL_GLBL_H_ */ Modified: stable/10/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.c Tue Mar 6 23:12:32 2018 (r330555) +++ stable/10/sys/dev/qlxgbe/ql_hw.c Tue Mar 6 23:17:56 2018 (r330556) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); static void qla_del_rcv_cntxt(qla_host_t *ha); static int qla_init_rcv_cntxt(qla_host_t *ha); -static void qla_del_xmt_cntxt(qla_host_t *ha); +static int qla_del_xmt_cntxt(qla_host_t *ha); static int qla_init_xmt_cntxt(qla_host_t *ha); static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox, uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause); @@ -647,11 +647,118 @@ qlnx_add_hw_xmt_stats_sysctls(qla_host_t *ha) } static void +qlnx_add_hw_mbx_cmpl_stats_sysctls(qla_host_t *ha) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *node_children; + + ctx = device_get_sysctl_ctx(ha->pci_dev); + node_children = SYSCTL_CHILDREN(device_get_sysctl_tree(ha->pci_dev)); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_lt_200ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[0], + "mbx_completion_time_lt_200ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_200ms_400ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[1], + "mbx_completion_time_200ms_400ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_400ms_600ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[2], + "mbx_completion_time_400ms_600ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_600ms_800ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[3], + "mbx_completion_time_600ms_800ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_800ms_1000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[4], + "mbx_completion_time_800ms_1000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1000ms_1200ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[5], + "mbx_completion_time_1000ms_1200ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1200ms_1400ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[6], + "mbx_completion_time_1200ms_1400ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1400ms_1600ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[7], + "mbx_completion_time_1400ms_1600ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1600ms_1800ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[8], + "mbx_completion_time_1600ms_1800ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1800ms_2000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[9], + "mbx_completion_time_1800ms_2000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2000ms_2200ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[10], + "mbx_completion_time_2000ms_2200ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2200ms_2400ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[11], + "mbx_completion_time_2200ms_2400ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2400ms_2600ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[12], + "mbx_completion_time_2400ms_2600ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2600ms_2800ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[13], + "mbx_completion_time_2600ms_2800ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2800ms_3000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[14], + "mbx_completion_time_2800ms_3000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_3000ms_4000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[15], + "mbx_completion_time_3000ms_4000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_4000ms_5000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[16], + "mbx_completion_time_4000ms_5000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_host_mbx_cntrl_timeout", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[17], + "mbx_completion_host_mbx_cntrl_timeout"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_fw_mbx_cntrl_timeout", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[18], + "mbx_completion_fw_mbx_cntrl_timeout"); + return; +} + +static void qlnx_add_hw_stats_sysctls(qla_host_t *ha) { qlnx_add_hw_mac_stats_sysctls(ha); qlnx_add_hw_rcv_stats_sysctls(ha); qlnx_add_hw_xmt_stats_sysctls(ha); + qlnx_add_hw_mbx_cmpl_stats_sysctls(ha); return; } @@ -918,6 +1025,30 @@ ql_hw_add_sysctls(qla_host_t *ha) "\t Any change requires ifconfig down/up to take effect\n" "\t Note that LRO may be turned off/on via ifconfig\n"); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "sp_log_index", CTLFLAG_RW, &ha->hw.sp_log_index, + ha->hw.sp_log_index, "sp_log_index"); + + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "sp_log_stop", CTLFLAG_RW, &ha->hw.sp_log_stop, + ha->hw.sp_log_stop, "sp_log_stop"); + + ha->hw.sp_log_stop_events = 0; + + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "sp_log_stop_events", CTLFLAG_RW, + &ha->hw.sp_log_stop_events, + ha->hw.sp_log_stop_events, "Slow path event log is stopped" + " when OR of the following events occur \n" + "\t 0x01 : Heart beat Failure\n" + "\t 0x02 : Temperature Failure\n" + "\t 0x04 : HW Initialization Failure\n" + "\t 0x08 : Interface Initialization Failure\n" + "\t 0x10 : Error Recovery Failure\n"); + ha->hw.mdump_active = 0; SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -998,13 +1129,13 @@ ql_hw_link_status(qla_host_t *ha) device_printf(ha->pci_dev, "link Down\n"); } - if (ha->hw.flags.fduplex) { + if (ha->hw.fduplex) { device_printf(ha->pci_dev, "Full Duplex\n"); } else { device_printf(ha->pci_dev, "Half Duplex\n"); } - if (ha->hw.flags.autoneg) { + if (ha->hw.autoneg) { device_printf(ha->pci_dev, "Auto Negotiation Enabled\n"); } else { device_printf(ha->pci_dev, "Auto Negotiation Disabled\n"); @@ -1255,19 +1386,39 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t uint32_t i; uint32_t data; int ret = 0; + uint64_t start_usecs; + uint64_t end_usecs; + uint64_t msecs_200; - if (QL_ERR_INJECT(ha, INJCT_MBX_CMD_FAILURE)) { + ql_sp_log(ha, 0, 5, no_pause, h_mbox[0], h_mbox[1], h_mbox[2], h_mbox[3]); + + if (ha->offline || ha->qla_initiate_recovery) { + ql_sp_log(ha, 1, 2, ha->offline, ha->qla_initiate_recovery, 0, 0, 0); + goto exit_qla_mbx_cmd; + } + + if (((ha->err_inject & 0xFFFF) == INJCT_MBX_CMD_FAILURE) && + (((ha->err_inject & ~0xFFFF) == ((h_mbox[0] & 0xFFFF) << 16))|| + !(ha->err_inject & ~0xFFFF))) { ret = -3; - ha->qla_initiate_recovery = 1; + QL_INITIATE_RECOVERY(ha); goto exit_qla_mbx_cmd; } + start_usecs = qla_get_usec_timestamp(); + if (no_pause) i = 1000; else i = Q8_MBX_MSEC_DELAY; while (i) { + + if (ha->qla_initiate_recovery) { + ql_sp_log(ha, 2, 1, ha->qla_initiate_recovery, 0, 0, 0, 0); + return (-1); + } + data = READ_REG32(ha, Q8_HOST_MBOX_CNTRL); if (data == 0) break; @@ -1282,8 +1433,10 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t if (i == 0) { device_printf(ha->pci_dev, "%s: host_mbx_cntrl 0x%08x\n", __func__, data); + ql_sp_log(ha, 3, 1, data, 0, 0, 0, 0); ret = -1; - ha->qla_initiate_recovery = 1; + ha->hw.mbx_comp_msecs[(Q8_MBX_COMP_MSECS - 2)]++; + QL_INITIATE_RECOVERY(ha); goto exit_qla_mbx_cmd; } @@ -1297,6 +1450,12 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t i = Q8_MBX_MSEC_DELAY; while (i) { + + if (ha->qla_initiate_recovery) { + ql_sp_log(ha, 4, 1, ha->qla_initiate_recovery, 0, 0, 0, 0); + return (-1); + } + data = READ_REG32(ha, Q8_FW_MBOX_CNTRL); if ((data & 0x3) == 1) { @@ -1314,18 +1473,44 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t if (i == 0) { device_printf(ha->pci_dev, "%s: fw_mbx_cntrl 0x%08x\n", __func__, data); + ql_sp_log(ha, 5, 1, data, 0, 0, 0, 0); ret = -2; - ha->qla_initiate_recovery = 1; + ha->hw.mbx_comp_msecs[(Q8_MBX_COMP_MSECS - 1)]++; + QL_INITIATE_RECOVERY(ha); goto exit_qla_mbx_cmd; } for (i = 0; i < n_fwmbox; i++) { + + if (ha->qla_initiate_recovery) { + ql_sp_log(ha, 6, 1, ha->qla_initiate_recovery, 0, 0, 0, 0); + return (-1); + } + *fw_mbox++ = READ_REG32(ha, (Q8_FW_MBOX0 + (i << 2))); } WRITE_REG32(ha, Q8_FW_MBOX_CNTRL, 0x0); WRITE_REG32(ha, ha->hw.mbx_intr_mask_offset, 0x0); + end_usecs = qla_get_usec_timestamp(); + + if (end_usecs > start_usecs) { + msecs_200 = (end_usecs - start_usecs)/(1000 * 200); + + if (msecs_200 < 15) + ha->hw.mbx_comp_msecs[msecs_200]++; + else if (msecs_200 < 20) + ha->hw.mbx_comp_msecs[15]++; + else { + device_printf(ha->pci_dev, "%s: [%ld, %ld] %ld\n", __func__, + start_usecs, end_usecs, msecs_200); + ha->hw.mbx_comp_msecs[16]++; + } + } + ql_sp_log(ha, 7, 5, fw_mbox[0], fw_mbox[1], fw_mbox[2], fw_mbox[3], fw_mbox[4]); + + exit_qla_mbx_cmd: return (ret); } @@ -1401,7 +1586,8 @@ qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_i if (qla_mbx_cmd(ha, (uint32_t *)c_intr, (sizeof (q80_config_intr_t) >> 2), ha->hw.mbox, (sizeof (q80_config_intr_rsp_t) >> 2), 0)) { - device_printf(dev, "%s: failed0\n", __func__); + device_printf(dev, "%s: %s failed0\n", __func__, + (create ? "create" : "delete")); return (-1); } @@ -1410,8 +1596,8 @@ qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_i err = Q8_MBX_RSP_STATUS(c_intr_rsp->regcnt_status); if (err) { - device_printf(dev, "%s: failed1 [0x%08x, %d]\n", __func__, err, - c_intr_rsp->nentries); + device_printf(dev, "%s: %s failed1 [0x%08x, %d]\n", __func__, + (create ? "create" : "delete"), err, c_intr_rsp->nentries); for (i = 0; i < c_intr_rsp->nentries; i++) { device_printf(dev, "%s: [%d]:[0x%x 0x%x 0x%x]\n", @@ -2015,7 +2201,8 @@ ql_get_stats(qla_host_t *ha) cmd |= ((ha->pci_func & 0x1) << 16); - if (ha->qla_watchdog_pause) + if (ha->qla_watchdog_pause || (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) goto ql_get_stats_exit; if (qla_get_hw_stats(ha, cmd, sizeof (q80_get_stats_rsp_t)) == 0) { @@ -2032,7 +2219,8 @@ ql_get_stats(qla_host_t *ha) // cmd |= Q8_GET_STATS_CMD_CLEAR; cmd |= (ha->hw.rcv_cntxt_id << 16); - if (ha->qla_watchdog_pause) + if (ha->qla_watchdog_pause || (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) goto ql_get_stats_exit; if (qla_get_hw_stats(ha, cmd, sizeof (q80_get_stats_rsp_t)) == 0) { @@ -2043,13 +2231,18 @@ ql_get_stats(qla_host_t *ha) __func__, ha->hw.mbox[0]); } - if (ha->qla_watchdog_pause) + if (ha->qla_watchdog_pause || (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) goto ql_get_stats_exit; /* * Get XMT Statistics */ - for (i = 0 ; ((i < ha->hw.num_tx_rings) && (!ha->qla_watchdog_pause)); - i++) { + for (i = 0 ; (i < ha->hw.num_tx_rings); i++) { + if (ha->qla_watchdog_pause || + (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) + goto ql_get_stats_exit; + cmd = Q8_GET_STATS_CMD_XMT | Q8_GET_STATS_CMD_TYPE_CNTXT; // cmd |= Q8_GET_STATS_CMD_CLEAR; cmd |= (ha->hw.tx_cntxt[i].tx_cntxt_id << 16); @@ -2679,7 +2872,8 @@ ql_del_hw_if(qla_host_t *ha) qla_del_rcv_cntxt(ha); - qla_del_xmt_cntxt(ha); + if(qla_del_xmt_cntxt(ha)) + goto ql_del_hw_if_exit; if (ha->hw.flags.init_intr_cnxt) { for (i = 0; i < ha->hw.num_sds_rings; ) { @@ -2688,14 +2882,17 @@ ql_del_hw_if(qla_host_t *ha) num_msix = Q8_MAX_INTR_VECTORS; else num_msix = ha->hw.num_sds_rings - i; - qla_config_intr_cntxt(ha, i, num_msix, 0); + if (qla_config_intr_cntxt(ha, i, num_msix, 0)) + break; + i += num_msix; } ha->hw.flags.init_intr_cnxt = 0; } +ql_del_hw_if_exit: if (ha->hw.enable_soft_lro) { qla_drain_soft_lro(ha); qla_free_soft_lro(ha); @@ -3328,19 +3525,22 @@ qla_del_xmt_cntxt_i(qla_host_t *ha, uint32_t txr_idx) return (0); } -static void +static int qla_del_xmt_cntxt(qla_host_t *ha) { uint32_t i; + int ret = 0; if (!ha->hw.flags.init_tx_cnxt) - return; + return (ret); for (i = 0; i < ha->hw.num_tx_rings; i++) { - if (qla_del_xmt_cntxt_i(ha, i)) + if ((ret = qla_del_xmt_cntxt_i(ha, i)) != 0) break; } ha->hw.flags.init_tx_cnxt = 0; + + return (ret); } static int @@ -3350,8 +3550,10 @@ qla_init_xmt_cntxt(qla_host_t *ha) for (i = 0; i < ha->hw.num_tx_rings; i++) { if (qla_init_xmt_cntxt_i(ha, i) != 0) { - for (j = 0; j < i; j++) - qla_del_xmt_cntxt_i(ha, j); + for (j = 0; j < i; j++) { + if (qla_del_xmt_cntxt_i(ha, j)) + break; + } return (-1); } } @@ -3627,22 +3829,23 @@ ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) void ql_update_link_state(qla_host_t *ha) { - uint32_t link_state; + uint32_t link_state = 0; uint32_t prev_link_state; - if (!(ha->ifp->if_drv_flags & IFF_DRV_RUNNING)) { - ha->hw.link_up = 0; - return; - } - link_state = READ_REG32(ha, Q8_LINK_STATE); - prev_link_state = ha->hw.link_up; - if (ha->pci_func == 0) - ha->hw.link_up = (((link_state & 0xF) == 1)? 1 : 0); - else - ha->hw.link_up = ((((link_state >> 4)& 0xF) == 1)? 1 : 0); + if (ha->ifp->if_drv_flags & IFF_DRV_RUNNING) { + link_state = READ_REG32(ha, Q8_LINK_STATE); + if (ha->pci_func == 0) { + link_state = (((link_state & 0xF) == 1)? 1 : 0); + } else { + link_state = ((((link_state >> 4)& 0xF) == 1)? 1 : 0); + } + } + + atomic_store_rel_8(&ha->hw.link_up, (uint8_t)link_state); + if (prev_link_state != ha->hw.link_up) { if (ha->hw.link_up) { if_link_state_change(ha->ifp, LINK_STATE_UP); @@ -3669,8 +3872,14 @@ ql_hw_check_health(qla_host_t *ha) if (((val & 0xFFFF) == 2) || ((val & 0xFFFF) == 3) || (QL_ERR_INJECT(ha, INJCT_TEMPERATURE_FAILURE))) { - device_printf(ha->pci_dev, "%s: Temperature Alert [0x%08x]\n", - __func__, val); + device_printf(ha->pci_dev, "%s: Temperature Alert" + " at ts_usecs %ld ts_reg = 0x%08x\n", + __func__, qla_get_usec_timestamp(), val); + + if (ha->hw.sp_log_stop_events & Q8_SP_LOG_STOP_TEMP_FAILURE) + ha->hw.sp_log_stop = -1; + + QL_INITIATE_RECOVERY(ha); return -1; } @@ -3691,10 +3900,26 @@ ql_hw_check_health(qla_host_t *ha) __func__, val); if (ha->hw.hbeat_failure < 2) /* we ignore the first failure */ return 0; - else - device_printf(ha->pci_dev, "%s: Heartbeat Failue [0x%08x]\n", - __func__, val); + else { + uint32_t peg_halt_status1; + uint32_t peg_halt_status2; + peg_halt_status1 = READ_REG32(ha, Q8_PEG_HALT_STATUS1); + peg_halt_status2 = READ_REG32(ha, Q8_PEG_HALT_STATUS2); + + device_printf(ha->pci_dev, + "%s: Heartbeat Failue at ts_usecs = %ld " + "fw_heart_beat = 0x%08x " + "peg_halt_status1 = 0x%08x " + "peg_halt_status2 = 0x%08x\n", + __func__, qla_get_usec_timestamp(), val, + peg_halt_status1, peg_halt_status2); + + if (ha->hw.sp_log_stop_events & Q8_SP_LOG_STOP_HBEAT_FAILURE) + ha->hw.sp_log_stop = -1; + } + QL_INITIATE_RECOVERY(ha); + return -1; } @@ -4429,8 +4654,8 @@ ql_minidump(qla_host_t *ha) if (ha->hw.mdump_done) return; - - ha->hw.mdump_start_seq_index = ql_stop_sequence(ha); + ha->hw.mdump_usec_ts = qla_get_usec_timestamp(); + ha->hw.mdump_start_seq_index = ql_stop_sequence(ha); bzero(ha->hw.mdump_buffer, ha->hw.mdump_buffer_size); bzero(ha->hw.mdump_template, ha->hw.mdump_template_size); Modified: stable/10/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.h Tue Mar 6 23:12:32 2018 (r330555) +++ stable/10/sys/dev/qlxgbe/ql_hw.h Tue Mar 6 23:17:56 2018 (r330556) @@ -1600,26 +1600,26 @@ typedef struct _qla_hw { uint32_t unicast_mac :1, bcast_mac :1, - loopback_mode :2, init_tx_cnxt :1, init_rx_cnxt :1, init_intr_cnxt :1, - fduplex :1, - autoneg :1, fdt_valid :1; } flags; - uint16_t link_speed; - uint16_t cable_length; - uint32_t cable_oui; - uint8_t link_up; - uint8_t module_type; - uint8_t link_faults; + volatile uint16_t link_speed; + volatile uint16_t cable_length; + volatile uint32_t cable_oui; + volatile uint8_t link_up; + volatile uint8_t module_type; + volatile uint8_t link_faults; + volatile uint8_t loopback_mode; + volatile uint8_t fduplex; + volatile uint8_t autoneg; - uint8_t mac_rcv_mode; + volatile uint8_t mac_rcv_mode; - uint32_t max_mtu; + volatile uint32_t max_mtu; uint8_t mac_addr[ETHER_ADDR_LEN]; @@ -1703,9 +1703,25 @@ typedef struct _qla_hw { uint32_t mdump_buffer_size; void *mdump_template; uint32_t mdump_template_size; + uint64_t mdump_usec_ts; +#define Q8_MBX_COMP_MSECS (19) + uint64_t mbx_comp_msecs[Q8_MBX_COMP_MSECS]; /* driver state related */ void *drvr_state; + + /* slow path trace */ + uint32_t sp_log_stop_events; +#define Q8_SP_LOG_STOP_HBEAT_FAILURE 0x001 +#define Q8_SP_LOG_STOP_TEMP_FAILURE 0x002 +#define Q8_SP_LOG_STOP_HW_INIT_FAILURE 0x004 +#define Q8_SP_LOG_STOP_IF_START_FAILURE 0x008 +#define Q8_SP_LOG_STOP_ERR_RECOVERY_FAILURE 0x010 + + uint32_t sp_log_stop; + uint32_t sp_log_index; + uint32_t sp_log_num_entries; + void *sp_log; } qla_hw_t; #define QL_UPDATE_RDS_PRODUCER_INDEX(ha, prod_reg, val) \ Modified: stable/10/sys/dev/qlxgbe/ql_inline.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_inline.h Tue Mar 6 23:12:32 2018 (r330555) +++ stable/10/sys/dev/qlxgbe/ql_inline.h Tue Mar 6 23:17:56 2018 (r330556) @@ -166,7 +166,7 @@ qla_lock(qla_host_t *ha, const char *str, uint32_t tim while (1) { mtx_lock(&ha->hw_lock); - if (ha->qla_detach_active) { + if (ha->qla_detach_active || ha->offline) { mtx_unlock(&ha->hw_lock); break; } @@ -191,7 +191,10 @@ qla_lock(qla_host_t *ha, const char *str, uint32_t tim } } - //device_printf(ha->pci_dev, "%s: %s ret = %d\n", __func__, str,ret); +// if (!ha->enable_error_recovery) +// device_printf(ha->pci_dev, "%s: %s ret = %d\n", __func__, +// str,ret); + return (ret); } @@ -202,7 +205,9 @@ qla_unlock(qla_host_t *ha, const char *str) ha->hw_lock_held = 0; ha->qla_unlock = str; mtx_unlock(&ha->hw_lock); - //device_printf(ha->pci_dev, "%s: %s\n", __func__, str); + +// if (!ha->enable_error_recovery) +// device_printf(ha->pci_dev, "%s: %s\n", __func__, str); return; } Modified: stable/10/sys/dev/qlxgbe/ql_ioctl.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_ioctl.c Tue Mar 6 23:12:32 2018 (r330555) +++ stable/10/sys/dev/qlxgbe/ql_ioctl.c Tue Mar 6 23:17:56 2018 (r330556) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "ql_ver.h" #include "ql_dbg.h" +static int ql_slowpath_log(qla_host_t *ha, qla_sp_log_t *log); static int ql_drvr_state(qla_host_t *ha, qla_driver_state_t *drvr_state); static uint32_t ql_drvr_state_size(qla_host_t *ha); static int ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, @@ -224,6 +225,7 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, case QLA_RD_FW_DUMP: if (ha->hw.mdump_init == 0) { + device_printf(pci_dev, "%s: minidump not initialized\n", __func__); rval = EINVAL; break; } @@ -233,45 +235,85 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, if ((fw_dump->minidump == NULL) || (fw_dump->minidump_size != (ha->hw.mdump_buffer_size + ha->hw.mdump_template_size))) { + device_printf(pci_dev, + "%s: minidump buffer [%p] size = [%d, %d] invalid\n", __func__, + fw_dump->minidump, fw_dump->minidump_size, + (ha->hw.mdump_buffer_size + ha->hw.mdump_template_size)); rval = EINVAL; break; } - if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { - if (!ha->hw.mdump_done) - ha->qla_initiate_recovery = 1; - QLA_UNLOCK(ha, __func__); - } else { + if ((ha->pci_func & 0x1)) { + device_printf(pci_dev, "%s: mindump allowed only on Port0\n", __func__); rval = ENXIO; break; } + + fw_dump->saved = 1; + + if (ha->offline) { + + if (ha->enable_minidump) + ql_minidump(ha); + + fw_dump->saved = 0; + fw_dump->usec_ts = ha->hw.mdump_usec_ts; + + if (!ha->hw.mdump_done) { + device_printf(pci_dev, + "%s: port offline minidump failed\n", __func__); + rval = ENXIO; + break; + } + } else { + + if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { + if (!ha->hw.mdump_done) { + fw_dump->saved = 0; + QL_INITIATE_RECOVERY(ha); + device_printf(pci_dev, "%s: recovery initiated " + " to trigger minidump\n", + __func__); + } + QLA_UNLOCK(ha, __func__); + } else { + device_printf(pci_dev, "%s: QLA_LOCK() failed0\n", __func__); + rval = ENXIO; + break; + } #define QLNX_DUMP_WAIT_SECS 30 - count = QLNX_DUMP_WAIT_SECS * 1000; + count = QLNX_DUMP_WAIT_SECS * 1000; - while (count) { - if (ha->hw.mdump_done) - break; - qla_mdelay(__func__, 100); - count -= 100; - } + while (count) { + if (ha->hw.mdump_done) + break; + qla_mdelay(__func__, 100); + count -= 100; + } - if (!ha->hw.mdump_done) { - rval = ENXIO; - break; - } + if (!ha->hw.mdump_done) { + device_printf(pci_dev, + "%s: port not offline minidump failed\n", __func__); + rval = ENXIO; + break; + } + fw_dump->usec_ts = ha->hw.mdump_usec_ts; - if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { - ha->hw.mdump_done = 0; - QLA_UNLOCK(ha, __func__); - } else { - rval = ENXIO; - break; + if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { + ha->hw.mdump_done = 0; + QLA_UNLOCK(ha, __func__); + } else { + device_printf(pci_dev, "%s: QLA_LOCK() failed1\n", __func__); + rval = ENXIO; + break; + } } if ((rval = copyout(ha->hw.mdump_template, fw_dump->minidump, ha->hw.mdump_template_size))) { + device_printf(pci_dev, "%s: template copyout failed\n", __func__); rval = ENXIO; break; } @@ -279,14 +321,20 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, if ((rval = copyout(ha->hw.mdump_buffer, ((uint8_t *)fw_dump->minidump + ha->hw.mdump_template_size), - ha->hw.mdump_buffer_size))) + ha->hw.mdump_buffer_size))) { + device_printf(pci_dev, "%s: minidump copyout failed\n", __func__); rval = ENXIO; + } break; case QLA_RD_DRVR_STATE: rval = ql_drvr_state(ha, (qla_driver_state_t *)data); break; + case QLA_RD_SLOWPATH_LOG: + rval = ql_slowpath_log(ha, (qla_sp_log_t *)data); + break; + case QLA_RD_PCI_IDS: pci_ids = (qla_rd_pci_ids_t *)data; pci_ids->ven_id = pci_get_vendor(pci_dev); @@ -304,12 +352,12 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, } + static int ql_drvr_state(qla_host_t *ha, qla_driver_state_t *state) { int rval = 0; uint32_t drvr_state_size; - qla_drvr_state_hdr_t *hdr; drvr_state_size = ql_drvr_state_size(ha); @@ -324,11 +372,8 @@ ql_drvr_state(qla_host_t *ha, qla_driver_state_t *stat if (ha->hw.drvr_state == NULL) return (ENOMEM); - hdr = ha->hw.drvr_state; + ql_capture_drvr_state(ha); - if (!hdr->drvr_version_major) - ql_capture_drvr_state(ha); - rval = copyout(ha->hw.drvr_state, state->buffer, drvr_state_size); bzero(ha->hw.drvr_state, drvr_state_size); @@ -416,22 +461,26 @@ ql_capture_drvr_state(qla_host_t *ha) { uint8_t *state_buffer; uint8_t *ptr; - uint32_t drvr_state_size; qla_drvr_state_hdr_t *hdr; uint32_t size; int i; - drvr_state_size = ql_drvr_state_size(ha); - state_buffer = ha->hw.drvr_state; if (state_buffer == NULL) return; - - bzero(state_buffer, drvr_state_size); hdr = (qla_drvr_state_hdr_t *)state_buffer; + + hdr->saved = 0; + if (hdr->drvr_version_major) { + hdr->saved = 1; + return; + } + + hdr->usec_ts = qla_get_usec_timestamp(); + hdr->drvr_version_major = QLA_VERSION_MAJOR; hdr->drvr_version_minor = QLA_VERSION_MINOR; hdr->drvr_version_build = QLA_VERSION_BUILD; @@ -512,6 +561,9 @@ ql_alloc_drvr_state_buffer(qla_host_t *ha) ha->hw.drvr_state = malloc(drvr_state_size, M_QLA83XXBUF, M_NOWAIT); + if (ha->hw.drvr_state != NULL) + bzero(ha->hw.drvr_state, drvr_state_size); + return; } @@ -521,5 +573,95 @@ ql_free_drvr_state_buffer(qla_host_t *ha) if (ha->hw.drvr_state != NULL) free(ha->hw.drvr_state, M_QLA83XXBUF); return; +} + +void +ql_sp_log(qla_host_t *ha, uint16_t fmtstr_idx, uint16_t num_params, + uint32_t param0, uint32_t param1, uint32_t param2, uint32_t param3, + uint32_t param4) +{ + qla_sp_log_entry_t *sp_e, *sp_log; + + if (((sp_log = ha->hw.sp_log) == NULL) || ha->hw.sp_log_stop) + return; + + mtx_lock(&ha->sp_log_lock); + + sp_e = &sp_log[ha->hw.sp_log_index]; + + bzero(sp_e, sizeof (qla_sp_log_entry_t)); + + sp_e->fmtstr_idx = fmtstr_idx; + sp_e->num_params = num_params; + + sp_e->usec_ts = qla_get_usec_timestamp(); + + sp_e->params[0] = param0; + sp_e->params[1] = param1; + sp_e->params[2] = param2; + sp_e->params[3] = param3; + sp_e->params[4] = param4; + + ha->hw.sp_log_index = (ha->hw.sp_log_index + 1) & (NUM_LOG_ENTRIES - 1); + + if (ha->hw.sp_log_num_entries < NUM_LOG_ENTRIES) + ha->hw.sp_log_num_entries++; + + mtx_unlock(&ha->sp_log_lock); + + return; +} + +void +ql_alloc_sp_log_buffer(qla_host_t *ha) +{ + uint32_t size; + + size = (sizeof(qla_sp_log_entry_t)) * NUM_LOG_ENTRIES; + + ha->hw.sp_log = malloc(size, M_QLA83XXBUF, M_NOWAIT); + + if (ha->hw.sp_log != NULL) + bzero(ha->hw.sp_log, size); + + ha->hw.sp_log_index = 0; + ha->hw.sp_log_num_entries = 0; + + return; +} + +void +ql_free_sp_log_buffer(qla_host_t *ha) +{ + if (ha->hw.sp_log != NULL) + free(ha->hw.sp_log, M_QLA83XXBUF); + return; +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Mar 6 23:28:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25336F39810; Tue, 6 Mar 2018 23:28:14 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC01D71320; Tue, 6 Mar 2018 23:28:13 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C651119802; Tue, 6 Mar 2018 23:28:13 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26NSDDP093654; Tue, 6 Mar 2018 23:28:13 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26NSDmc093645; Tue, 6 Mar 2018 23:28:13 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201803062328.w26NSDmc093645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 6 Mar 2018 23:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r330557 - stable/9/sys/dev/qlxgbe X-SVN-Group: stable-9 X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: stable/9/sys/dev/qlxgbe X-SVN-Commit-Revision: 330557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 23:28:14 -0000 Author: davidcs Date: Tue Mar 6 23:28:12 2018 New Revision: 330557 URL: https://svnweb.freebsd.org/changeset/base/330557 Log: MFC r329855 1. Added support to offline a port if is error recovery on successful. 2. Sysctls to enable/disable driver_state_dump and error_recovery. 3. Sysctl to control the delay between hw/fw reinitialization and restarting the fastpath. 4. Stop periodic stats retrieval if interface has IFF_DRV_RUNNING flag off. 5. Print contents of PEG_HALT_STATUS1 and PEG_HALT_STATUS2 on heartbeat failure. 6. Speed up slowpath shutdown during error recovery. 7. link_state update using atomic_store. 8. Added timestamp information on driver state and minidump captures. 9. Added support for Slowpath event logging 10.Added additional failure injection types to simulate failures. Modified: stable/9/sys/dev/qlxgbe/ql_dbg.h stable/9/sys/dev/qlxgbe/ql_def.h stable/9/sys/dev/qlxgbe/ql_glbl.h stable/9/sys/dev/qlxgbe/ql_hw.c stable/9/sys/dev/qlxgbe/ql_hw.h stable/9/sys/dev/qlxgbe/ql_inline.h stable/9/sys/dev/qlxgbe/ql_ioctl.c stable/9/sys/dev/qlxgbe/ql_ioctl.h stable/9/sys/dev/qlxgbe/ql_isr.c stable/9/sys/dev/qlxgbe/ql_misc.c stable/9/sys/dev/qlxgbe/ql_os.c stable/9/sys/dev/qlxgbe/ql_os.h stable/9/sys/dev/qlxgbe/ql_ver.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/qlxgbe/ql_dbg.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_dbg.h Tue Mar 6 23:17:56 2018 (r330556) +++ stable/9/sys/dev/qlxgbe/ql_dbg.h Tue Mar 6 23:28:12 2018 (r330557) @@ -42,17 +42,21 @@ extern void ql_dump_buf16(qla_host_t *ha, const char * extern void ql_dump_buf32(qla_host_t *ha, const char *str, void *dbuf, uint32_t len32); -#define INJCT_RX_RXB_INVAL 0x00001 -#define INJCT_RX_MP_NULL 0x00002 -#define INJCT_LRO_RXB_INVAL 0x00003 -#define INJCT_LRO_MP_NULL 0x00004 -#define INJCT_NUM_HNDLE_INVALID 0x00005 -#define INJCT_RDWR_INDREG_FAILURE 0x00006 -#define INJCT_RDWR_OFFCHIPMEM_FAILURE 0x00007 -#define INJCT_MBX_CMD_FAILURE 0x00008 -#define INJCT_HEARTBEAT_FAILURE 0x00009 -#define INJCT_TEMPERATURE_FAILURE 0x0000A -#define INJCT_M_GETCL_M_GETJCL_FAILURE 0x0000B +#define INJCT_RX_RXB_INVAL 0x00001 +#define INJCT_RX_MP_NULL 0x00002 +#define INJCT_LRO_RXB_INVAL 0x00003 +#define INJCT_LRO_MP_NULL 0x00004 +#define INJCT_NUM_HNDLE_INVALID 0x00005 +#define INJCT_RDWR_INDREG_FAILURE 0x00006 +#define INJCT_RDWR_OFFCHIPMEM_FAILURE 0x00007 +#define INJCT_MBX_CMD_FAILURE 0x00008 +#define INJCT_HEARTBEAT_FAILURE 0x00009 +#define INJCT_TEMPERATURE_FAILURE 0x0000A +#define INJCT_M_GETCL_M_GETJCL_FAILURE 0x0000B +#define INJCT_INV_CONT_OPCODE 0x0000C +#define INJCT_SGL_RCV_INV_DESC_COUNT 0x0000D +#define INJCT_SGL_LRO_INV_DESC_COUNT 0x0000E +#define INJCT_PEER_PORT_FAILURE_ERR_RECOVERY 0x0000F #ifdef QL_DBG Modified: stable/9/sys/dev/qlxgbe/ql_def.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_def.h Tue Mar 6 23:17:56 2018 (r330556) +++ stable/9/sys/dev/qlxgbe/ql_def.h Tue Mar 6 23:28:12 2018 (r330557) @@ -144,12 +144,12 @@ struct qla_host { volatile uint32_t qla_watchdog_paused; volatile uint32_t qla_initiate_recovery; volatile uint32_t qla_detach_active; + volatile uint32_t offline; device_t pci_dev; - uint16_t watchdog_ticks; + volatile uint16_t watchdog_ticks; uint8_t pci_func; - uint8_t resvd; /* ioctl related */ struct cdev *ioctl_dev; @@ -182,6 +182,7 @@ struct qla_host { /* hardware access lock */ + struct mtx sp_log_lock; struct mtx hw_lock; volatile uint32_t hw_lock_held; uint64_t hw_lock_failed; @@ -239,6 +240,9 @@ struct qla_host { volatile const char *qla_unlock; uint32_t dbg_level; uint32_t enable_minidump; + uint32_t enable_driverstate_dump; + uint32_t enable_error_recovery; + uint32_t ms_delay_after_init; uint8_t fw_ver_str[32]; @@ -272,5 +276,7 @@ typedef struct qla_host qla_host_t; #define QL_MAC_CMP(mac1, mac2) \ ((((*(uint32_t *) mac1) == (*(uint32_t *) mac2) && \ (*(uint16_t *)(mac1 + 4)) == (*(uint16_t *)(mac2 + 4)))) ? 0 : 1) + +#define QL_INITIATE_RECOVERY(ha) qla_set_error_recovery(ha) #endif /* #ifndef _QL_DEF_H_ */ Modified: stable/9/sys/dev/qlxgbe/ql_glbl.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_glbl.h Tue Mar 6 23:17:56 2018 (r330556) +++ stable/9/sys/dev/qlxgbe/ql_glbl.h Tue Mar 6 23:28:12 2018 (r330557) @@ -47,6 +47,7 @@ extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sd extern int ql_alloc_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf); extern void ql_free_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf); extern int ql_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp); +extern void qla_set_error_recovery(qla_host_t *ha); /* * from ql_hw.c @@ -115,5 +116,11 @@ extern unsigned int ql83xx_minidump_len; extern void ql_alloc_drvr_state_buffer(qla_host_t *ha); extern void ql_free_drvr_state_buffer(qla_host_t *ha); extern void ql_capture_drvr_state(qla_host_t *ha); +extern void ql_sp_log(qla_host_t *ha, uint16_t fmtstr_idx, uint16_t num_params, + uint32_t param0, uint32_t param1, uint32_t param2, + uint32_t param3, uint32_t param4); +extern void ql_alloc_sp_log_buffer(qla_host_t *ha); +extern void ql_free_sp_log_buffer(qla_host_t *ha); + #endif /* #ifndef_QL_GLBL_H_ */ Modified: stable/9/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_hw.c Tue Mar 6 23:17:56 2018 (r330556) +++ stable/9/sys/dev/qlxgbe/ql_hw.c Tue Mar 6 23:28:12 2018 (r330557) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); static void qla_del_rcv_cntxt(qla_host_t *ha); static int qla_init_rcv_cntxt(qla_host_t *ha); -static void qla_del_xmt_cntxt(qla_host_t *ha); +static int qla_del_xmt_cntxt(qla_host_t *ha); static int qla_init_xmt_cntxt(qla_host_t *ha); static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox, uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause); @@ -647,11 +647,118 @@ qlnx_add_hw_xmt_stats_sysctls(qla_host_t *ha) } static void +qlnx_add_hw_mbx_cmpl_stats_sysctls(qla_host_t *ha) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *node_children; + + ctx = device_get_sysctl_ctx(ha->pci_dev); + node_children = SYSCTL_CHILDREN(device_get_sysctl_tree(ha->pci_dev)); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_lt_200ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[0], + "mbx_completion_time_lt_200ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_200ms_400ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[1], + "mbx_completion_time_200ms_400ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_400ms_600ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[2], + "mbx_completion_time_400ms_600ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_600ms_800ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[3], + "mbx_completion_time_600ms_800ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_800ms_1000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[4], + "mbx_completion_time_800ms_1000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1000ms_1200ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[5], + "mbx_completion_time_1000ms_1200ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1200ms_1400ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[6], + "mbx_completion_time_1200ms_1400ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1400ms_1600ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[7], + "mbx_completion_time_1400ms_1600ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1600ms_1800ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[8], + "mbx_completion_time_1600ms_1800ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_1800ms_2000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[9], + "mbx_completion_time_1800ms_2000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2000ms_2200ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[10], + "mbx_completion_time_2000ms_2200ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2200ms_2400ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[11], + "mbx_completion_time_2200ms_2400ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2400ms_2600ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[12], + "mbx_completion_time_2400ms_2600ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2600ms_2800ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[13], + "mbx_completion_time_2600ms_2800ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_2800ms_3000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[14], + "mbx_completion_time_2800ms_3000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_3000ms_4000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[15], + "mbx_completion_time_3000ms_4000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_time_4000ms_5000ms", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[16], + "mbx_completion_time_4000ms_5000ms"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_host_mbx_cntrl_timeout", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[17], + "mbx_completion_host_mbx_cntrl_timeout"); + + SYSCTL_ADD_QUAD(ctx, node_children, + OID_AUTO, "mbx_completion_fw_mbx_cntrl_timeout", + CTLFLAG_RD, &ha->hw.mbx_comp_msecs[18], + "mbx_completion_fw_mbx_cntrl_timeout"); + return; +} + +static void qlnx_add_hw_stats_sysctls(qla_host_t *ha) { qlnx_add_hw_mac_stats_sysctls(ha); qlnx_add_hw_rcv_stats_sysctls(ha); qlnx_add_hw_xmt_stats_sysctls(ha); + qlnx_add_hw_mbx_cmpl_stats_sysctls(ha); return; } @@ -918,6 +1025,30 @@ ql_hw_add_sysctls(qla_host_t *ha) "\t Any change requires ifconfig down/up to take effect\n" "\t Note that LRO may be turned off/on via ifconfig\n"); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "sp_log_index", CTLFLAG_RW, &ha->hw.sp_log_index, + ha->hw.sp_log_index, "sp_log_index"); + + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "sp_log_stop", CTLFLAG_RW, &ha->hw.sp_log_stop, + ha->hw.sp_log_stop, "sp_log_stop"); + + ha->hw.sp_log_stop_events = 0; + + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "sp_log_stop_events", CTLFLAG_RW, + &ha->hw.sp_log_stop_events, + ha->hw.sp_log_stop_events, "Slow path event log is stopped" + " when OR of the following events occur \n" + "\t 0x01 : Heart beat Failure\n" + "\t 0x02 : Temperature Failure\n" + "\t 0x04 : HW Initialization Failure\n" + "\t 0x08 : Interface Initialization Failure\n" + "\t 0x10 : Error Recovery Failure\n"); + ha->hw.mdump_active = 0; SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -998,13 +1129,13 @@ ql_hw_link_status(qla_host_t *ha) device_printf(ha->pci_dev, "link Down\n"); } - if (ha->hw.flags.fduplex) { + if (ha->hw.fduplex) { device_printf(ha->pci_dev, "Full Duplex\n"); } else { device_printf(ha->pci_dev, "Half Duplex\n"); } - if (ha->hw.flags.autoneg) { + if (ha->hw.autoneg) { device_printf(ha->pci_dev, "Auto Negotiation Enabled\n"); } else { device_printf(ha->pci_dev, "Auto Negotiation Disabled\n"); @@ -1255,19 +1386,39 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t uint32_t i; uint32_t data; int ret = 0; + uint64_t start_usecs; + uint64_t end_usecs; + uint64_t msecs_200; - if (QL_ERR_INJECT(ha, INJCT_MBX_CMD_FAILURE)) { + ql_sp_log(ha, 0, 5, no_pause, h_mbox[0], h_mbox[1], h_mbox[2], h_mbox[3]); + + if (ha->offline || ha->qla_initiate_recovery) { + ql_sp_log(ha, 1, 2, ha->offline, ha->qla_initiate_recovery, 0, 0, 0); + goto exit_qla_mbx_cmd; + } + + if (((ha->err_inject & 0xFFFF) == INJCT_MBX_CMD_FAILURE) && + (((ha->err_inject & ~0xFFFF) == ((h_mbox[0] & 0xFFFF) << 16))|| + !(ha->err_inject & ~0xFFFF))) { ret = -3; - ha->qla_initiate_recovery = 1; + QL_INITIATE_RECOVERY(ha); goto exit_qla_mbx_cmd; } + start_usecs = qla_get_usec_timestamp(); + if (no_pause) i = 1000; else i = Q8_MBX_MSEC_DELAY; while (i) { + + if (ha->qla_initiate_recovery) { + ql_sp_log(ha, 2, 1, ha->qla_initiate_recovery, 0, 0, 0, 0); + return (-1); + } + data = READ_REG32(ha, Q8_HOST_MBOX_CNTRL); if (data == 0) break; @@ -1282,8 +1433,10 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t if (i == 0) { device_printf(ha->pci_dev, "%s: host_mbx_cntrl 0x%08x\n", __func__, data); + ql_sp_log(ha, 3, 1, data, 0, 0, 0, 0); ret = -1; - ha->qla_initiate_recovery = 1; + ha->hw.mbx_comp_msecs[(Q8_MBX_COMP_MSECS - 2)]++; + QL_INITIATE_RECOVERY(ha); goto exit_qla_mbx_cmd; } @@ -1297,6 +1450,12 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t i = Q8_MBX_MSEC_DELAY; while (i) { + + if (ha->qla_initiate_recovery) { + ql_sp_log(ha, 4, 1, ha->qla_initiate_recovery, 0, 0, 0, 0); + return (-1); + } + data = READ_REG32(ha, Q8_FW_MBOX_CNTRL); if ((data & 0x3) == 1) { @@ -1314,18 +1473,44 @@ qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t if (i == 0) { device_printf(ha->pci_dev, "%s: fw_mbx_cntrl 0x%08x\n", __func__, data); + ql_sp_log(ha, 5, 1, data, 0, 0, 0, 0); ret = -2; - ha->qla_initiate_recovery = 1; + ha->hw.mbx_comp_msecs[(Q8_MBX_COMP_MSECS - 1)]++; + QL_INITIATE_RECOVERY(ha); goto exit_qla_mbx_cmd; } for (i = 0; i < n_fwmbox; i++) { + + if (ha->qla_initiate_recovery) { + ql_sp_log(ha, 6, 1, ha->qla_initiate_recovery, 0, 0, 0, 0); + return (-1); + } + *fw_mbox++ = READ_REG32(ha, (Q8_FW_MBOX0 + (i << 2))); } WRITE_REG32(ha, Q8_FW_MBOX_CNTRL, 0x0); WRITE_REG32(ha, ha->hw.mbx_intr_mask_offset, 0x0); + end_usecs = qla_get_usec_timestamp(); + + if (end_usecs > start_usecs) { + msecs_200 = (end_usecs - start_usecs)/(1000 * 200); + + if (msecs_200 < 15) + ha->hw.mbx_comp_msecs[msecs_200]++; + else if (msecs_200 < 20) + ha->hw.mbx_comp_msecs[15]++; + else { + device_printf(ha->pci_dev, "%s: [%ld, %ld] %ld\n", __func__, + start_usecs, end_usecs, msecs_200); + ha->hw.mbx_comp_msecs[16]++; + } + } + ql_sp_log(ha, 7, 5, fw_mbox[0], fw_mbox[1], fw_mbox[2], fw_mbox[3], fw_mbox[4]); + + exit_qla_mbx_cmd: return (ret); } @@ -1401,7 +1586,8 @@ qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_i if (qla_mbx_cmd(ha, (uint32_t *)c_intr, (sizeof (q80_config_intr_t) >> 2), ha->hw.mbox, (sizeof (q80_config_intr_rsp_t) >> 2), 0)) { - device_printf(dev, "%s: failed0\n", __func__); + device_printf(dev, "%s: %s failed0\n", __func__, + (create ? "create" : "delete")); return (-1); } @@ -1410,8 +1596,8 @@ qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_i err = Q8_MBX_RSP_STATUS(c_intr_rsp->regcnt_status); if (err) { - device_printf(dev, "%s: failed1 [0x%08x, %d]\n", __func__, err, - c_intr_rsp->nentries); + device_printf(dev, "%s: %s failed1 [0x%08x, %d]\n", __func__, + (create ? "create" : "delete"), err, c_intr_rsp->nentries); for (i = 0; i < c_intr_rsp->nentries; i++) { device_printf(dev, "%s: [%d]:[0x%x 0x%x 0x%x]\n", @@ -2015,7 +2201,8 @@ ql_get_stats(qla_host_t *ha) cmd |= ((ha->pci_func & 0x1) << 16); - if (ha->qla_watchdog_pause) + if (ha->qla_watchdog_pause || (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) goto ql_get_stats_exit; if (qla_get_hw_stats(ha, cmd, sizeof (q80_get_stats_rsp_t)) == 0) { @@ -2032,7 +2219,8 @@ ql_get_stats(qla_host_t *ha) // cmd |= Q8_GET_STATS_CMD_CLEAR; cmd |= (ha->hw.rcv_cntxt_id << 16); - if (ha->qla_watchdog_pause) + if (ha->qla_watchdog_pause || (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) goto ql_get_stats_exit; if (qla_get_hw_stats(ha, cmd, sizeof (q80_get_stats_rsp_t)) == 0) { @@ -2043,13 +2231,18 @@ ql_get_stats(qla_host_t *ha) __func__, ha->hw.mbox[0]); } - if (ha->qla_watchdog_pause) + if (ha->qla_watchdog_pause || (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) goto ql_get_stats_exit; /* * Get XMT Statistics */ - for (i = 0 ; ((i < ha->hw.num_tx_rings) && (!ha->qla_watchdog_pause)); - i++) { + for (i = 0 ; (i < ha->hw.num_tx_rings); i++) { + if (ha->qla_watchdog_pause || + (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) || + ha->offline) + goto ql_get_stats_exit; + cmd = Q8_GET_STATS_CMD_XMT | Q8_GET_STATS_CMD_TYPE_CNTXT; // cmd |= Q8_GET_STATS_CMD_CLEAR; cmd |= (ha->hw.tx_cntxt[i].tx_cntxt_id << 16); @@ -2679,7 +2872,8 @@ ql_del_hw_if(qla_host_t *ha) qla_del_rcv_cntxt(ha); - qla_del_xmt_cntxt(ha); + if(qla_del_xmt_cntxt(ha)) + goto ql_del_hw_if_exit; if (ha->hw.flags.init_intr_cnxt) { for (i = 0; i < ha->hw.num_sds_rings; ) { @@ -2688,14 +2882,17 @@ ql_del_hw_if(qla_host_t *ha) num_msix = Q8_MAX_INTR_VECTORS; else num_msix = ha->hw.num_sds_rings - i; - qla_config_intr_cntxt(ha, i, num_msix, 0); + if (qla_config_intr_cntxt(ha, i, num_msix, 0)) + break; + i += num_msix; } ha->hw.flags.init_intr_cnxt = 0; } +ql_del_hw_if_exit: if (ha->hw.enable_soft_lro) { qla_drain_soft_lro(ha); qla_free_soft_lro(ha); @@ -3328,19 +3525,22 @@ qla_del_xmt_cntxt_i(qla_host_t *ha, uint32_t txr_idx) return (0); } -static void +static int qla_del_xmt_cntxt(qla_host_t *ha) { uint32_t i; + int ret = 0; if (!ha->hw.flags.init_tx_cnxt) - return; + return (ret); for (i = 0; i < ha->hw.num_tx_rings; i++) { - if (qla_del_xmt_cntxt_i(ha, i)) + if ((ret = qla_del_xmt_cntxt_i(ha, i)) != 0) break; } ha->hw.flags.init_tx_cnxt = 0; + + return (ret); } static int @@ -3350,8 +3550,10 @@ qla_init_xmt_cntxt(qla_host_t *ha) for (i = 0; i < ha->hw.num_tx_rings; i++) { if (qla_init_xmt_cntxt_i(ha, i) != 0) { - for (j = 0; j < i; j++) - qla_del_xmt_cntxt_i(ha, j); + for (j = 0; j < i; j++) { + if (qla_del_xmt_cntxt_i(ha, j)) + break; + } return (-1); } } @@ -3627,22 +3829,23 @@ ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) void ql_update_link_state(qla_host_t *ha) { - uint32_t link_state; + uint32_t link_state = 0; uint32_t prev_link_state; - if (!(ha->ifp->if_drv_flags & IFF_DRV_RUNNING)) { - ha->hw.link_up = 0; - return; - } - link_state = READ_REG32(ha, Q8_LINK_STATE); - prev_link_state = ha->hw.link_up; - if (ha->pci_func == 0) - ha->hw.link_up = (((link_state & 0xF) == 1)? 1 : 0); - else - ha->hw.link_up = ((((link_state >> 4)& 0xF) == 1)? 1 : 0); + if (ha->ifp->if_drv_flags & IFF_DRV_RUNNING) { + link_state = READ_REG32(ha, Q8_LINK_STATE); + if (ha->pci_func == 0) { + link_state = (((link_state & 0xF) == 1)? 1 : 0); + } else { + link_state = ((((link_state >> 4)& 0xF) == 1)? 1 : 0); + } + } + + atomic_store_rel_8(&ha->hw.link_up, (uint8_t)link_state); + if (prev_link_state != ha->hw.link_up) { if (ha->hw.link_up) { if_link_state_change(ha->ifp, LINK_STATE_UP); @@ -3669,8 +3872,14 @@ ql_hw_check_health(qla_host_t *ha) if (((val & 0xFFFF) == 2) || ((val & 0xFFFF) == 3) || (QL_ERR_INJECT(ha, INJCT_TEMPERATURE_FAILURE))) { - device_printf(ha->pci_dev, "%s: Temperature Alert [0x%08x]\n", - __func__, val); + device_printf(ha->pci_dev, "%s: Temperature Alert" + " at ts_usecs %ld ts_reg = 0x%08x\n", + __func__, qla_get_usec_timestamp(), val); + + if (ha->hw.sp_log_stop_events & Q8_SP_LOG_STOP_TEMP_FAILURE) + ha->hw.sp_log_stop = -1; + + QL_INITIATE_RECOVERY(ha); return -1; } @@ -3691,10 +3900,26 @@ ql_hw_check_health(qla_host_t *ha) __func__, val); if (ha->hw.hbeat_failure < 2) /* we ignore the first failure */ return 0; - else - device_printf(ha->pci_dev, "%s: Heartbeat Failue [0x%08x]\n", - __func__, val); + else { + uint32_t peg_halt_status1; + uint32_t peg_halt_status2; + peg_halt_status1 = READ_REG32(ha, Q8_PEG_HALT_STATUS1); + peg_halt_status2 = READ_REG32(ha, Q8_PEG_HALT_STATUS2); + + device_printf(ha->pci_dev, + "%s: Heartbeat Failue at ts_usecs = %ld " + "fw_heart_beat = 0x%08x " + "peg_halt_status1 = 0x%08x " + "peg_halt_status2 = 0x%08x\n", + __func__, qla_get_usec_timestamp(), val, + peg_halt_status1, peg_halt_status2); + + if (ha->hw.sp_log_stop_events & Q8_SP_LOG_STOP_HBEAT_FAILURE) + ha->hw.sp_log_stop = -1; + } + QL_INITIATE_RECOVERY(ha); + return -1; } @@ -4429,8 +4654,8 @@ ql_minidump(qla_host_t *ha) if (ha->hw.mdump_done) return; - - ha->hw.mdump_start_seq_index = ql_stop_sequence(ha); + ha->hw.mdump_usec_ts = qla_get_usec_timestamp(); + ha->hw.mdump_start_seq_index = ql_stop_sequence(ha); bzero(ha->hw.mdump_buffer, ha->hw.mdump_buffer_size); bzero(ha->hw.mdump_template, ha->hw.mdump_template_size); Modified: stable/9/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_hw.h Tue Mar 6 23:17:56 2018 (r330556) +++ stable/9/sys/dev/qlxgbe/ql_hw.h Tue Mar 6 23:28:12 2018 (r330557) @@ -1600,26 +1600,26 @@ typedef struct _qla_hw { uint32_t unicast_mac :1, bcast_mac :1, - loopback_mode :2, init_tx_cnxt :1, init_rx_cnxt :1, init_intr_cnxt :1, - fduplex :1, - autoneg :1, fdt_valid :1; } flags; - uint16_t link_speed; - uint16_t cable_length; - uint32_t cable_oui; - uint8_t link_up; - uint8_t module_type; - uint8_t link_faults; + volatile uint16_t link_speed; + volatile uint16_t cable_length; + volatile uint32_t cable_oui; + volatile uint8_t link_up; + volatile uint8_t module_type; + volatile uint8_t link_faults; + volatile uint8_t loopback_mode; + volatile uint8_t fduplex; + volatile uint8_t autoneg; - uint8_t mac_rcv_mode; + volatile uint8_t mac_rcv_mode; - uint32_t max_mtu; + volatile uint32_t max_mtu; uint8_t mac_addr[ETHER_ADDR_LEN]; @@ -1703,9 +1703,25 @@ typedef struct _qla_hw { uint32_t mdump_buffer_size; void *mdump_template; uint32_t mdump_template_size; + uint64_t mdump_usec_ts; +#define Q8_MBX_COMP_MSECS (19) + uint64_t mbx_comp_msecs[Q8_MBX_COMP_MSECS]; /* driver state related */ void *drvr_state; + + /* slow path trace */ + uint32_t sp_log_stop_events; +#define Q8_SP_LOG_STOP_HBEAT_FAILURE 0x001 +#define Q8_SP_LOG_STOP_TEMP_FAILURE 0x002 +#define Q8_SP_LOG_STOP_HW_INIT_FAILURE 0x004 +#define Q8_SP_LOG_STOP_IF_START_FAILURE 0x008 +#define Q8_SP_LOG_STOP_ERR_RECOVERY_FAILURE 0x010 + + uint32_t sp_log_stop; + uint32_t sp_log_index; + uint32_t sp_log_num_entries; + void *sp_log; } qla_hw_t; #define QL_UPDATE_RDS_PRODUCER_INDEX(ha, prod_reg, val) \ Modified: stable/9/sys/dev/qlxgbe/ql_inline.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_inline.h Tue Mar 6 23:17:56 2018 (r330556) +++ stable/9/sys/dev/qlxgbe/ql_inline.h Tue Mar 6 23:28:12 2018 (r330557) @@ -166,7 +166,7 @@ qla_lock(qla_host_t *ha, const char *str, uint32_t tim while (1) { mtx_lock(&ha->hw_lock); - if (ha->qla_detach_active) { + if (ha->qla_detach_active || ha->offline) { mtx_unlock(&ha->hw_lock); break; } @@ -191,7 +191,10 @@ qla_lock(qla_host_t *ha, const char *str, uint32_t tim } } - //device_printf(ha->pci_dev, "%s: %s ret = %d\n", __func__, str,ret); +// if (!ha->enable_error_recovery) +// device_printf(ha->pci_dev, "%s: %s ret = %d\n", __func__, +// str,ret); + return (ret); } @@ -202,7 +205,9 @@ qla_unlock(qla_host_t *ha, const char *str) ha->hw_lock_held = 0; ha->qla_unlock = str; mtx_unlock(&ha->hw_lock); - //device_printf(ha->pci_dev, "%s: %s\n", __func__, str); + +// if (!ha->enable_error_recovery) +// device_printf(ha->pci_dev, "%s: %s\n", __func__, str); return; } Modified: stable/9/sys/dev/qlxgbe/ql_ioctl.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_ioctl.c Tue Mar 6 23:17:56 2018 (r330556) +++ stable/9/sys/dev/qlxgbe/ql_ioctl.c Tue Mar 6 23:28:12 2018 (r330557) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "ql_ver.h" #include "ql_dbg.h" +static int ql_slowpath_log(qla_host_t *ha, qla_sp_log_t *log); static int ql_drvr_state(qla_host_t *ha, qla_driver_state_t *drvr_state); static uint32_t ql_drvr_state_size(qla_host_t *ha); static int ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, @@ -224,6 +225,7 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, case QLA_RD_FW_DUMP: if (ha->hw.mdump_init == 0) { + device_printf(pci_dev, "%s: minidump not initialized\n", __func__); rval = EINVAL; break; } @@ -233,45 +235,85 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, if ((fw_dump->minidump == NULL) || (fw_dump->minidump_size != (ha->hw.mdump_buffer_size + ha->hw.mdump_template_size))) { + device_printf(pci_dev, + "%s: minidump buffer [%p] size = [%d, %d] invalid\n", __func__, + fw_dump->minidump, fw_dump->minidump_size, + (ha->hw.mdump_buffer_size + ha->hw.mdump_template_size)); rval = EINVAL; break; } - if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { - if (!ha->hw.mdump_done) - ha->qla_initiate_recovery = 1; - QLA_UNLOCK(ha, __func__); - } else { + if ((ha->pci_func & 0x1)) { + device_printf(pci_dev, "%s: mindump allowed only on Port0\n", __func__); rval = ENXIO; break; } + + fw_dump->saved = 1; + + if (ha->offline) { + + if (ha->enable_minidump) + ql_minidump(ha); + + fw_dump->saved = 0; + fw_dump->usec_ts = ha->hw.mdump_usec_ts; + + if (!ha->hw.mdump_done) { + device_printf(pci_dev, + "%s: port offline minidump failed\n", __func__); + rval = ENXIO; + break; + } + } else { + + if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { + if (!ha->hw.mdump_done) { + fw_dump->saved = 0; + QL_INITIATE_RECOVERY(ha); + device_printf(pci_dev, "%s: recovery initiated " + " to trigger minidump\n", + __func__); + } + QLA_UNLOCK(ha, __func__); + } else { + device_printf(pci_dev, "%s: QLA_LOCK() failed0\n", __func__); + rval = ENXIO; + break; + } #define QLNX_DUMP_WAIT_SECS 30 - count = QLNX_DUMP_WAIT_SECS * 1000; + count = QLNX_DUMP_WAIT_SECS * 1000; - while (count) { - if (ha->hw.mdump_done) - break; - qla_mdelay(__func__, 100); - count -= 100; - } + while (count) { + if (ha->hw.mdump_done) + break; + qla_mdelay(__func__, 100); + count -= 100; + } - if (!ha->hw.mdump_done) { - rval = ENXIO; - break; - } + if (!ha->hw.mdump_done) { + device_printf(pci_dev, + "%s: port not offline minidump failed\n", __func__); + rval = ENXIO; + break; + } + fw_dump->usec_ts = ha->hw.mdump_usec_ts; - if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { - ha->hw.mdump_done = 0; - QLA_UNLOCK(ha, __func__); - } else { - rval = ENXIO; - break; + if (QLA_LOCK(ha, __func__, QLA_LOCK_DEFAULT_MS_TIMEOUT, 0) == 0) { + ha->hw.mdump_done = 0; + QLA_UNLOCK(ha, __func__); + } else { + device_printf(pci_dev, "%s: QLA_LOCK() failed1\n", __func__); + rval = ENXIO; + break; + } } if ((rval = copyout(ha->hw.mdump_template, fw_dump->minidump, ha->hw.mdump_template_size))) { + device_printf(pci_dev, "%s: template copyout failed\n", __func__); rval = ENXIO; break; } @@ -279,14 +321,20 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, if ((rval = copyout(ha->hw.mdump_buffer, ((uint8_t *)fw_dump->minidump + ha->hw.mdump_template_size), - ha->hw.mdump_buffer_size))) + ha->hw.mdump_buffer_size))) { + device_printf(pci_dev, "%s: minidump copyout failed\n", __func__); rval = ENXIO; + } break; case QLA_RD_DRVR_STATE: rval = ql_drvr_state(ha, (qla_driver_state_t *)data); break; + case QLA_RD_SLOWPATH_LOG: + rval = ql_slowpath_log(ha, (qla_sp_log_t *)data); + break; + case QLA_RD_PCI_IDS: pci_ids = (qla_rd_pci_ids_t *)data; pci_ids->ven_id = pci_get_vendor(pci_dev); @@ -304,12 +352,12 @@ ql_eioctl(struct cdev *dev, u_long cmd, caddr_t data, } + static int ql_drvr_state(qla_host_t *ha, qla_driver_state_t *state) { int rval = 0; uint32_t drvr_state_size; - qla_drvr_state_hdr_t *hdr; drvr_state_size = ql_drvr_state_size(ha); @@ -324,11 +372,8 @@ ql_drvr_state(qla_host_t *ha, qla_driver_state_t *stat if (ha->hw.drvr_state == NULL) return (ENOMEM); - hdr = ha->hw.drvr_state; + ql_capture_drvr_state(ha); - if (!hdr->drvr_version_major) - ql_capture_drvr_state(ha); - rval = copyout(ha->hw.drvr_state, state->buffer, drvr_state_size); bzero(ha->hw.drvr_state, drvr_state_size); @@ -416,22 +461,26 @@ ql_capture_drvr_state(qla_host_t *ha) { uint8_t *state_buffer; uint8_t *ptr; - uint32_t drvr_state_size; qla_drvr_state_hdr_t *hdr; uint32_t size; int i; - drvr_state_size = ql_drvr_state_size(ha); - state_buffer = ha->hw.drvr_state; if (state_buffer == NULL) return; - - bzero(state_buffer, drvr_state_size); hdr = (qla_drvr_state_hdr_t *)state_buffer; + + hdr->saved = 0; + if (hdr->drvr_version_major) { + hdr->saved = 1; + return; + } + + hdr->usec_ts = qla_get_usec_timestamp(); + hdr->drvr_version_major = QLA_VERSION_MAJOR; hdr->drvr_version_minor = QLA_VERSION_MINOR; hdr->drvr_version_build = QLA_VERSION_BUILD; @@ -512,6 +561,9 @@ ql_alloc_drvr_state_buffer(qla_host_t *ha) ha->hw.drvr_state = malloc(drvr_state_size, M_QLA83XXBUF, M_NOWAIT); + if (ha->hw.drvr_state != NULL) + bzero(ha->hw.drvr_state, drvr_state_size); + return; } @@ -521,5 +573,95 @@ ql_free_drvr_state_buffer(qla_host_t *ha) if (ha->hw.drvr_state != NULL) free(ha->hw.drvr_state, M_QLA83XXBUF); return; +} + +void +ql_sp_log(qla_host_t *ha, uint16_t fmtstr_idx, uint16_t num_params, + uint32_t param0, uint32_t param1, uint32_t param2, uint32_t param3, + uint32_t param4) +{ + qla_sp_log_entry_t *sp_e, *sp_log; + + if (((sp_log = ha->hw.sp_log) == NULL) || ha->hw.sp_log_stop) + return; + + mtx_lock(&ha->sp_log_lock); + + sp_e = &sp_log[ha->hw.sp_log_index]; + + bzero(sp_e, sizeof (qla_sp_log_entry_t)); + + sp_e->fmtstr_idx = fmtstr_idx; + sp_e->num_params = num_params; + + sp_e->usec_ts = qla_get_usec_timestamp(); + + sp_e->params[0] = param0; + sp_e->params[1] = param1; + sp_e->params[2] = param2; + sp_e->params[3] = param3; + sp_e->params[4] = param4; + + ha->hw.sp_log_index = (ha->hw.sp_log_index + 1) & (NUM_LOG_ENTRIES - 1); + + if (ha->hw.sp_log_num_entries < NUM_LOG_ENTRIES) + ha->hw.sp_log_num_entries++; + + mtx_unlock(&ha->sp_log_lock); + + return; +} + +void +ql_alloc_sp_log_buffer(qla_host_t *ha) +{ + uint32_t size; + + size = (sizeof(qla_sp_log_entry_t)) * NUM_LOG_ENTRIES; + + ha->hw.sp_log = malloc(size, M_QLA83XXBUF, M_NOWAIT); + + if (ha->hw.sp_log != NULL) + bzero(ha->hw.sp_log, size); + + ha->hw.sp_log_index = 0; + ha->hw.sp_log_num_entries = 0; + + return; +} + +void +ql_free_sp_log_buffer(qla_host_t *ha) +{ + if (ha->hw.sp_log != NULL) + free(ha->hw.sp_log, M_QLA83XXBUF); + return; +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Mar 6 23:31:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14339F39C6D for ; Tue, 6 Mar 2018 23:31:51 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yb0-x243.google.com (mail-yb0-x243.google.com [IPv6:2607:f8b0:4002:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7444E715FB for ; Tue, 6 Mar 2018 23:31:50 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yb0-x243.google.com with SMTP id v135-v6so143428ybe.2 for ; Tue, 06 Mar 2018 15:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7A+l66mbrwCKtXfSJB9PzivkIlTP8kNjEOBqDvum8z4=; b=mMMDH90o1zxq4cujTehpFsTIsqkdeV6Z9A19XTaMB5c/3lmU8jYOaxKXJitb0TKv6k GDgK7b8qGsm0MgBrdzbux34GkmMIY341FcWo9/kWgO/XoOPkqICkko8npcd0d5ewyLPj LE+tRBb1CwCN0AacooGoyAQw883wBdLAeRg589io8xSbwkgq4QDQ61rlNbNdL/EmdeQy 9vlRaqsoYFyMLht509UdSvl+HjjxD8ipVJxPA1b9Dfz2YWO5kYySlgN8BqU0Oes+i6i5 ZX5PBPQUxj2R7g7AScBR+aytoBLqc73qfMRGtlswULve82k6XCuDg2Pcdi78Ubvh6wGx jUQA== 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=7A+l66mbrwCKtXfSJB9PzivkIlTP8kNjEOBqDvum8z4=; b=pxzla/WUg8j1j+2hGfhUs/CUVWKvtdK81KfOw7VUcQ8OpFp5bCRy9+bqYYVkz898ei 5RlR9NKrB6He/s8IkqbWJ3dIeJHGwNSuhoew7tjMMnFDcFXw6U+ecSDv3KhckiPC5sRO FogmEf+jPK/QPG1z90yspK6cFs6f8WfoOsIVJH/2tBvg9NegvorxaQvnD9yU5usjNSCL Jt7j3nlbiGXx94x2zmV1bpoDALmi2Huuzsh0kO3d4vHxDg3VpdiEqLVn7YhEC14LVj1X MkYGIWizVMCaIQDMGmO94GRmLXMTwM1UaWJg6F3oZGroxUIlzmStoxG0tyjTjCWchQ4f owIw== X-Gm-Message-State: AElRT7HNAvq/rIlgeBBMTI6wOOGB3B6bSD2EPJ9gHwqTk8QUR+I00eX7 Zw3TuKNytw4O8Lsbw+Kjc/zXBvmLFZpIqxmPxrfqAw== X-Google-Smtp-Source: AG47ELumSLrf8p8pZ5n0WTxTkeoLTqHFoNcoF2eplnapqZENKcphwyCYfPDOejbZ6c8U7wh4kZXMoreDbp7JVX40d8E= X-Received: by 2002:a25:6150:: with SMTP id v77-v6mr3250701ybb.331.1520379109005; Tue, 06 Mar 2018 15:31:49 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:5f41:0:0:0:0:0 with HTTP; Tue, 6 Mar 2018 15:31:48 -0800 (PST) In-Reply-To: <201803061428.w26EScwJ020926@repo.freebsd.org> References: <201803061428.w26EScwJ020926@repo.freebsd.org> From: Oliver Pinter Date: Wed, 7 Mar 2018 00:31:48 +0100 Message-ID: Subject: Re: svn commit: r330539 - in head/sys: amd64/amd64 amd64/include arm/include conf gdb i386/include mips/include powerpc/include sparc64/include To: "Jonathan T. Looney" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 23:31:51 -0000 X-MFC-with: commit 27ac811b7acd31b1bdbf959fe49a957cdeabf780 Author: bde Date: Fri Mar 24 17:34:55 2017 +0000 Remove buggy adjustment of page tables in db_write_bytes(). Long ago, perhaps only on i386, kernel text was mapped read-only and it was necessary to change the mapping to read-write to set breakpoints in kernel text. Other writes by ddb to kernel text were also allowed. This write protection is harder to implement with 4MB pages, and was lost even for 4K pages when 4MB pages were implemented. So changing the mapping became useless. It was actually worse than useless since it followed followed various null and otherwise garbage pointers to not change random memory instead of the mapping. (On i386s, the pointers became good in pmap_bootstrap(), and on amd64 the pointers became bad in pmap_bootstrap() if not before.) Another bug broke detection of following of null pointers on i386, except early in boot where not detecting this was a feature. When I fixed the bug, I accidentally broke the feature and soon got traps in db_write_bytes(). Setting breakpoints early in ddb was broken. kib pointed out that a clean way to do the adjustment would be to use a special [sub]map giving a small window on the bytes to be written. The trap handler didn't know how to fix up errors for pagefaults accessing the map itself. Such errors rarely need fixups, since most traps for the map are for the first access which is a read. Reviewed by: kib Notes: svn path=/head/; revision=315914 On 3/6/18, Jonathan T. Looney wrote: > Author: jtl > Date: Tue Mar 6 14:28:37 2018 > New Revision: 330539 > URL: https://svnweb.freebsd.org/changeset/base/330539 > > Log: > amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits > correctly for the data contained on each memory page. > > There are several components to this change: > * Add a variable to indicate the start of the R/W portion of the > initial memory. > * Stop detecting NX bit support for each AP. Instead, use the value > from the BSP and, if supported, activate the feature on the other > APs just before loading the correct page table. (Functionally, we > already assume that the BSP and all APs had the same support or > lack of support for the NX bit.) > * Set the RW and NX bits correctly for the kernel text, data, and > BSS (subject to some caveats below). > * Ensure DDB can write to memory when necessary (such as to set a > breakpoint). > * Ensure GDB can write to memory when necessary (such as to set a > breakpoint). For this purpose, add new MD functions gdb_begin_write() > and gdb_end_write() which the GDB support code can call before and > after writing to memory. > > This change is not comprehensive: > * It doesn't do anything to protect modules. > * It doesn't do anything for kernel memory allocated after the kernel > starts running. > * In order to avoid excessive memory inefficiency, it may let multiple > types of data share a 2M page, and assigns the most permissions > needed for data on that page. > > Reviewed by: jhb, kib > Discussed with: emaste > MFC after: 2 weeks > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D14282 > > Modified: > head/sys/amd64/amd64/db_interface.c > head/sys/amd64/amd64/gdb_machdep.c > head/sys/amd64/amd64/initcpu.c > head/sys/amd64/amd64/mpboot.S > head/sys/amd64/amd64/pmap.c > head/sys/amd64/include/cpu.h > head/sys/amd64/include/gdb_machdep.h > head/sys/arm/include/gdb_machdep.h > head/sys/conf/ldscript.amd64 > head/sys/gdb/gdb_packet.c > head/sys/i386/include/gdb_machdep.h > head/sys/mips/include/gdb_machdep.h > head/sys/powerpc/include/gdb_machdep.h > head/sys/sparc64/include/gdb_machdep.h > > Modified: head/sys/amd64/amd64/db_interface.c > ============================================================================== > --- head/sys/amd64/amd64/db_interface.c Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/amd64/amd64/db_interface.c Tue Mar 6 14:28:37 2018 (r330539) > @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > +#include > + > #include > > /* > @@ -62,6 +65,9 @@ db_read_bytes(vm_offset_t addr, size_t size, char *dat > > /* > * Write bytes to kernel address space for debugger. > + * We need to disable write protection temporarily so we can write > + * things (such as break points) that might be in write-protected > + * memory. > */ > int > db_write_bytes(vm_offset_t addr, size_t size, char *data) > @@ -69,15 +75,19 @@ db_write_bytes(vm_offset_t addr, size_t size, char *da > jmp_buf jb; > void *prev_jb; > char *dst; > + u_long cr0save; > int ret; > > + cr0save = rcr0(); > prev_jb = kdb_jmpbuf(jb); > ret = setjmp(jb); > if (ret == 0) { > + load_cr0(cr0save & ~CR0_WP); > dst = (char *)addr; > while (size-- > 0) > *dst++ = *data++; > } > + load_cr0(cr0save); > (void)kdb_jmpbuf(prev_jb); > return (ret); > } > > Modified: head/sys/amd64/amd64/gdb_machdep.c > ============================================================================== > --- head/sys/amd64/amd64/gdb_machdep.c Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/amd64/amd64/gdb_machdep.c Tue Mar 6 14:28:37 2018 (r330539) > @@ -36,11 +36,13 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > #include > #include > #include > #include > #include > +#include > #include > #include > #include > @@ -121,3 +123,21 @@ gdb_cpu_signal(int type, int code) > } > return (SIGEMT); > } > + > +void * > +gdb_begin_write(void) > +{ > + u_long cr0save; > + > + cr0save = rcr0(); > + load_cr0(cr0save & ~CR0_WP); > + return ((void *)cr0save); > +} > + > +void > +gdb_end_write(void *arg) > +{ > + > + load_cr0((u_long)arg); > +} > + > > Modified: head/sys/amd64/amd64/initcpu.c > ============================================================================== > --- head/sys/amd64/amd64/initcpu.c Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/amd64/amd64/initcpu.c Tue Mar 6 14:28:37 2018 (r330539) > @@ -218,7 +218,7 @@ initializecpu(void) > if (!IS_BSP() && (cpu_stdext_feature & CPUID_STDEXT_SMEP)) > cr4 |= CR4_SMEP; > load_cr4(cr4); > - if ((amd_feature & AMDID_NX) != 0) { > + if (IS_BSP() && (amd_feature & AMDID_NX) != 0) { > msr = rdmsr(MSR_EFER) | EFER_NXE; > wrmsr(MSR_EFER, msr); > pg_nx = PG_NX; > > Modified: head/sys/amd64/amd64/mpboot.S > ============================================================================== > --- head/sys/amd64/amd64/mpboot.S Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/amd64/amd64/mpboot.S Tue Mar 6 14:28:37 2018 (r330539) > @@ -221,15 +221,31 @@ mptramp_end: > > /* > * From here on down is executed in the kernel .text section. > - * > - * Load a real %cr3 that has all the direct map stuff and switches > - * off the 1GB replicated mirror. Load a stack pointer and jump > - * into AP startup code in C. > */ > .text > .code64 > .p2align 4,0 > entry_64: > + /* > + * If the BSP reported NXE support, enable EFER.NXE for all APs > + * prior to loading %cr3. This avoids page faults if the AP > + * encounters memory marked with the NX bit prior to detecting and > + * enabling NXE support. > + */ > + movq pg_nx, %rbx > + testq %rbx, %rbx > + je 1f > + movl $MSR_EFER, %ecx > + rdmsr > + orl $EFER_NXE, %eax > + wrmsr > + > +1: > + /* > + * Load a real %cr3 that has all the direct map stuff and switches > + * off the 1GB replicated mirror. Load a stack pointer and jump > + * into AP startup code in C. > + */ > movq KPML4phys, %rax > movq %rax, %cr3 > movq bootSTK, %rsp > > Modified: head/sys/amd64/amd64/pmap.c > ============================================================================== > --- head/sys/amd64/amd64/pmap.c Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/amd64/amd64/pmap.c Tue Mar 6 14:28:37 2018 (r330539) > @@ -870,14 +870,64 @@ nkpt_init(vm_paddr_t addr) > nkpt = pt_pages; > } > > +/* > + * Returns the proper write/execute permission for a physical page that is > + * part of the initial boot allocations. > + * > + * If the page has kernel text, it is marked as read-only. If the page has > + * kernel read-only data, it is marked as read-only/not-executable. If the > + * page has only read-write data, it is marked as > read-write/not-executable. > + * If the page is below/above the kernel range, it is marked as > read-write. > + * > + * This function operates on 2M pages, since we map the kernel space that > + * way. > + * > + * Note that this doesn't currently provide any protection for modules. > + */ > +static inline pt_entry_t > +bootaddr_rwx(vm_paddr_t pa) > +{ > + > + /* > + * Everything in the same 2M page as the start of the kernel > + * should be static. On the other hand, things in the same 2M > + * page as the end of the kernel could be read-write/executable, > + * as the kernel image is not guaranteed to end on a 2M boundary. > + */ > + if (pa < trunc_2mpage(btext - KERNBASE) || > + pa >= trunc_2mpage(_end - KERNBASE)) > + return (X86_PG_RW); > + /* > + * The linker should ensure that the read-only and read-write > + * portions don't share the same 2M page, so this shouldn't > + * impact read-only data. However, in any case, any page with > + * read-write data needs to be read-write. > + */ > + if (pa >= trunc_2mpage(brwsection - KERNBASE)) > + return (X86_PG_RW | pg_nx); > + /* > + * Mark any 2M page containing kernel text as read-only. Mark > + * other pages with read-only data as read-only and not executable. > + * (It is likely a small portion of the read-only data section will > + * be marked as read-only, but executable. This should be acceptable > + * since the read-only protection will keep the data from changing.) > + * Note that fixups to the .text section will still work until we > + * set CR0.WP. > + */ > + if (pa < round_2mpage(etext - KERNBASE)) > + return (0); > + return (pg_nx); > +} > + > static void > create_pagetables(vm_paddr_t *firstaddr) > { > - int i, j, ndm1g, nkpdpe; > + int i, j, ndm1g, nkpdpe, nkdmpde; > pt_entry_t *pt_p; > pd_entry_t *pd_p; > pdp_entry_t *pdp_p; > pml4_entry_t *p4_p; > + uint64_t DMPDkernphys; > > /* Allocate page table pages for the direct map */ > ndmpdp = howmany(ptoa(Maxmem), NBPDP); > @@ -896,8 +946,20 @@ create_pagetables(vm_paddr_t *firstaddr) > } > DMPDPphys = allocpages(firstaddr, ndmpdpphys); > ndm1g = 0; > - if ((amd_feature & AMDID_PAGE1GB) != 0) > + if ((amd_feature & AMDID_PAGE1GB) != 0) { > + /* > + * Calculate the number of 1G pages that will fully fit in > + * Maxmem. > + */ > ndm1g = ptoa(Maxmem) >> PDPSHIFT; > + > + /* > + * Allocate 2M pages for the kernel. These will be used in > + * place of the first one or more 1G pages from ndm1g. > + */ > + nkdmpde = howmany((vm_offset_t)(brwsection - KERNBASE), NBPDP); > + DMPDkernphys = allocpages(firstaddr, nkdmpde); > + } > if (ndm1g < ndmpdp) > DMPDphys = allocpages(firstaddr, ndmpdp - ndm1g); > dmaplimit = (vm_paddr_t)ndmpdp << PDPSHIFT; > @@ -923,11 +985,10 @@ create_pagetables(vm_paddr_t *firstaddr) > KPDphys = allocpages(firstaddr, nkpdpe); > > /* Fill in the underlying page table pages */ > - /* Nominally read-only (but really R/W) from zero to physfree */ > /* XXX not fully used, underneath 2M pages */ > pt_p = (pt_entry_t *)KPTphys; > for (i = 0; ptoa(i) < *firstaddr; i++) > - pt_p[i] = ptoa(i) | X86_PG_RW | X86_PG_V | pg_g; > + pt_p[i] = ptoa(i) | X86_PG_V | pg_g | bootaddr_rwx(ptoa(i)); > > /* Now map the page tables at their location within PTmap */ > pd_p = (pd_entry_t *)KPDphys; > @@ -937,8 +998,8 @@ create_pagetables(vm_paddr_t *firstaddr) > /* Map from zero to end of allocations under 2M pages */ > /* This replaces some of the KPTphys entries above */ > for (i = 0; (i << PDRSHIFT) < *firstaddr; i++) > - pd_p[i] = (i << PDRSHIFT) | X86_PG_RW | X86_PG_V | PG_PS | > - pg_g; > + pd_p[i] = (i << PDRSHIFT) | X86_PG_V | PG_PS | pg_g | > + bootaddr_rwx(i << PDRSHIFT); > > /* > * Because we map the physical blocks in 2M pages, adjust firstaddr > @@ -978,6 +1039,22 @@ create_pagetables(vm_paddr_t *firstaddr) > for (j = 0; i < ndmpdp; i++, j++) { > pdp_p[i] = DMPDphys + ptoa(j); > pdp_p[i] |= X86_PG_RW | X86_PG_V | PG_U; > + } > + > + /* > + * Instead of using a 1G page for the memory containing the kernel, > + * use 2M pages with appropriate permissions. (If using 1G pages, > + * this will partially overwrite the PDPEs above.) > + */ > + if (ndm1g) { > + pd_p = (pd_entry_t *)DMPDkernphys; > + for (i = 0; i < (NPDEPG * nkdmpde); i++) > + pd_p[i] = (i << PDRSHIFT) | X86_PG_V | PG_PS | pg_g | > + X86_PG_M | X86_PG_A | pg_nx | > + bootaddr_rwx(i << PDRSHIFT); > + for (i = 0; i < nkdmpde; i++) > + pdp_p[i] = (DMPDkernphys + ptoa(i)) | X86_PG_RW | > + X86_PG_V | PG_U; > } > > /* And recursively map PML4 to itself in order to get PTmap */ > > Modified: head/sys/amd64/include/cpu.h > ============================================================================== > --- head/sys/amd64/include/cpu.h Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/amd64/include/cpu.h Tue Mar 6 14:28:37 2018 (r330539) > @@ -68,7 +68,9 @@ struct cpu_ops { > }; > > extern struct cpu_ops cpu_ops; > +extern char brwsection[]; > extern char btext[]; > +extern char _end[]; > extern char etext[]; > > /* Resume hook for VMM. */ > > Modified: head/sys/amd64/include/gdb_machdep.h > ============================================================================== > --- head/sys/amd64/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/amd64/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) > @@ -47,8 +47,10 @@ gdb_cpu_query(void) > return (0); > } > > +void *gdb_begin_write(void); > void *gdb_cpu_getreg(int, size_t *); > void gdb_cpu_setreg(int, void *); > int gdb_cpu_signal(int, int); > +void gdb_end_write(void *); > > #endif /* !_MACHINE_GDB_MACHDEP_H_ */ > > Modified: head/sys/arm/include/gdb_machdep.h > ============================================================================== > --- head/sys/arm/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/arm/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) > @@ -47,6 +47,19 @@ gdb_cpu_query(void) > return (0); > } > > +static __inline void * > +gdb_begin_write(void) > +{ > + > + return (NULL); > +} > + > +static __inline void > +gdb_end_write(void *arg __unused) > +{ > + > +} > + > void *gdb_cpu_getreg(int, size_t *); > void gdb_cpu_setreg(int, void *); > int gdb_cpu_signal(int, int); > > Modified: head/sys/conf/ldscript.amd64 > ============================================================================== > --- head/sys/conf/ldscript.amd64 Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/conf/ldscript.amd64 Tue Mar 6 14:28:37 2018 (r330539) > @@ -80,6 +80,7 @@ SECTIONS > /* Adjust the address for the data segment. We want to adjust up to > the same address within the page on the next page up. */ > . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & > (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT > (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); > + PROVIDE (brwsection = .); > /* Exception handling */ > .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } > .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table > .gcc_except_table.*) } > > Modified: head/sys/gdb/gdb_packet.c > ============================================================================== > --- head/sys/gdb/gdb_packet.c Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/gdb/gdb_packet.c Tue Mar 6 14:28:37 2018 (r330539) > @@ -147,6 +147,7 @@ gdb_rx_mem(unsigned char *addr, size_t size) > { > unsigned char *p; > void *prev; > + void *wctx; > jmp_buf jb; > size_t cnt; > int ret; > @@ -155,6 +156,7 @@ gdb_rx_mem(unsigned char *addr, size_t size) > if (size * 2 != gdb_rxsz) > return (-1); > > + wctx = gdb_begin_write(); > prev = kdb_jmpbuf(jb); > ret = setjmp(jb); > if (ret == 0) { > @@ -170,6 +172,7 @@ gdb_rx_mem(unsigned char *addr, size_t size) > kdb_cpu_sync_icache(addr, size); > } > (void)kdb_jmpbuf(prev); > + gdb_end_write(wctx); > return ((ret == 0) ? 1 : 0); > } > > > Modified: head/sys/i386/include/gdb_machdep.h > ============================================================================== > --- head/sys/i386/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/i386/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) > @@ -47,6 +47,19 @@ gdb_cpu_query(void) > return (0); > } > > +static __inline void * > +gdb_begin_write(void) > +{ > + > + return (NULL); > +} > + > +static __inline void > +gdb_end_write(void *arg __unused) > +{ > + > +} > + > void *gdb_cpu_getreg(int, size_t *); > void gdb_cpu_setreg(int, void *); > int gdb_cpu_signal(int, int); > > Modified: head/sys/mips/include/gdb_machdep.h > ============================================================================== > --- head/sys/mips/include/gdb_machdep.h Tue Mar 6 14:18:45 2018 (r330538) > +++ head/sys/mips/include/gdb_machdep.h Tue Mar 6 14:28:37 2018 (r330539) > @@ -51,6 +51,19 @@ gdb_cpu_query(void) > return (0); > } > > +static __inline void * > +gdb_begin_write(void) > +{ > + > + return (NULL); > +} > + > +static __inline void > +gdb_end_write(void *arg __unused) > +{ > + > +} > + > void *gdb_cpu_getreg(int, size_t *); > void gdb_cpu_setreg(int, void *); > int gdb_cpu_signal(int, int); > > Modified: head/sys/powerpc/include/gdb_machdep.h > ============================================================================== > --- head/sys/powerpc/include/gdb_machdep.h Tue Mar 6 14:18:45 > 2018 (r330538) > +++ head/sys/powerpc/include/gdb_machdep.h Tue Mar 6 14:28:37 > 2018 (r330539) > @@ -76,6 +76,19 @@ gdb_cpu_query(void) > return (0); > } > > +static __inline void * > +gdb_begin_write(void) > +{ > + > + return (NULL); > +} > + > +static __inline void > +gdb_end_write(void *arg __unused) > +{ > + > +} > + > void *gdb_cpu_getreg(int, size_t *); > void gdb_cpu_setreg(int, void *); > int gdb_cpu_signal(int, int); > > Modified: head/sys/sparc64/include/gdb_machdep.h > ============================================================================== > --- head/sys/sparc64/include/gdb_machdep.h Tue Mar 6 14:18:45 > 2018 (r330538) > +++ head/sys/sparc64/include/gdb_machdep.h Tue Mar 6 14:28:37 > 2018 (r330539) > @@ -53,6 +53,19 @@ gdb_cpu_signal(int vector, int _) > return (vector); > } > > +static __inline void * > +gdb_begin_write(void) > +{ > + > + return (NULL); > +} > + > +static __inline void > +gdb_end_write(void *arg __unused) > +{ > + > +} > + > void *gdb_cpu_getreg(int, size_t *); > void gdb_cpu_setreg(int, void *); > > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Tue Mar 6 23:39:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34225F3A44A; Tue, 6 Mar 2018 23:39:49 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 178E771C06; Tue, 6 Mar 2018 23:39:47 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D49D3199E0; Tue, 6 Mar 2018 23:39:43 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26NdhfO098453; Tue, 6 Mar 2018 23:39:43 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26NdhEl098447; Tue, 6 Mar 2018 23:39:43 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201803062339.w26NdhEl098447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 6 Mar 2018 23:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330558 - head/sys/dev/ichiic X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/ichiic X-SVN-Commit-Revision: 330558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 23:39:49 -0000 Author: gonzo Date: Tue Mar 6 23:39:43 2018 New Revision: 330558 URL: https://svnweb.freebsd.org/changeset/base/330558 Log: [ig4] Add support for i2c controllers on Skylake and Kaby Lake This was tested by Ben on HP Chromebook 13 G1 with a Skylake CPU and Sunrise Point-LP I2C controller and by me on Minnowboard Turbot with Atom E3826 (formerly Bay Trail) Submitted by: Ben Pye Reviewed by: gonzo Obtained from: DragonflyBSD (a4549657 by Imre Vadász) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D13654 Modified: head/sys/dev/ichiic/ig4_acpi.c head/sys/dev/ichiic/ig4_iic.c head/sys/dev/ichiic/ig4_pci.c head/sys/dev/ichiic/ig4_reg.h head/sys/dev/ichiic/ig4_var.h Modified: head/sys/dev/ichiic/ig4_acpi.c ============================================================================== --- head/sys/dev/ichiic/ig4_acpi.c Tue Mar 6 23:28:12 2018 (r330557) +++ head/sys/dev/ichiic/ig4_acpi.c Tue Mar 6 23:39:43 2018 (r330558) @@ -85,6 +85,8 @@ ig4iic_acpi_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; + /* All the HIDs matched are Atom SOCs. */ + sc->version = IG4_ATOM; sc->regs_rid = 0; sc->regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->regs_rid, RF_ACTIVE); Modified: head/sys/dev/ichiic/ig4_iic.c ============================================================================== --- head/sys/dev/ichiic/ig4_iic.c Tue Mar 6 23:28:12 2018 (r330557) +++ head/sys/dev/ichiic/ig4_iic.c Tue Mar 6 23:39:43 2018 (r330558) @@ -525,22 +525,38 @@ ig4iic_attach(ig4iic_softc_t *sc) mtx_init(&sc->io_lock, "IG4 I/O lock", NULL, MTX_DEF); sx_init(&sc->call_lock, "IG4 call lock"); - v = reg_read(sc, IG4_REG_COMP_TYPE); - v = reg_read(sc, IG4_REG_COMP_PARAM1); - v = reg_read(sc, IG4_REG_GENERAL); - if ((v & IG4_GENERAL_SWMODE) == 0) { - v |= IG4_GENERAL_SWMODE; - reg_write(sc, IG4_REG_GENERAL, v); + if (sc->version == IG4_ATOM) + v = reg_read(sc, IG4_REG_COMP_TYPE); + + if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { + v = reg_read(sc, IG4_REG_COMP_PARAM1); v = reg_read(sc, IG4_REG_GENERAL); + /* + * The content of IG4_REG_GENERAL is different for each + * controller version. + */ + if (sc->version == IG4_HASWELL && + (v & IG4_GENERAL_SWMODE) == 0) { + v |= IG4_GENERAL_SWMODE; + reg_write(sc, IG4_REG_GENERAL, v); + v = reg_read(sc, IG4_REG_GENERAL); + } } - v = reg_read(sc, IG4_REG_SW_LTR_VALUE); - v = reg_read(sc, IG4_REG_AUTO_LTR_VALUE); + if (sc->version == IG4_HASWELL) { + v = reg_read(sc, IG4_REG_SW_LTR_VALUE); + v = reg_read(sc, IG4_REG_AUTO_LTR_VALUE); + } else if (sc->version == IG4_SKYLAKE) { + v = reg_read(sc, IG4_REG_ACTIVE_LTR_VALUE); + v = reg_read(sc, IG4_REG_IDLE_LTR_VALUE); + } - v = reg_read(sc, IG4_REG_COMP_VER); - if (v != IG4_COMP_VER) { - error = ENXIO; - goto done; + if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { + v = reg_read(sc, IG4_REG_COMP_VER); + if (v != IG4_COMP_VER) { + error = ENXIO; + goto done; + } } v = reg_read(sc, IG4_REG_SS_SCL_HCNT); v = reg_read(sc, IG4_REG_SS_SCL_LCNT); @@ -591,8 +607,13 @@ ig4iic_attach(ig4iic_softc_t *sc) /* * Don't do this, it blows up the PCI config */ - reg_write(sc, IG4_REG_RESETS, IG4_RESETS_ASSERT); - reg_write(sc, IG4_REG_RESETS, IG4_RESETS_DEASSERT); + if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { + reg_write(sc, IG4_REG_RESETS_HSW, IG4_RESETS_ASSERT_HSW); + reg_write(sc, IG4_REG_RESETS_HSW, IG4_RESETS_DEASSERT_HSW); + } else if (sc->version = IG4_SKYLAKE) { + reg_write(sc, IG4_REG_RESETS_SKL, IG4_RESETS_ASSERT_SKL); + reg_write(sc, IG4_REG_RESETS_SKL, IG4_RESETS_DEASSERT_SKL); + } #endif mtx_lock(&sc->io_lock); @@ -727,14 +748,27 @@ ig4iic_dump(ig4iic_softc_t *sc) REGDUMP(sc, IG4_REG_DMA_RDLR); REGDUMP(sc, IG4_REG_SDA_SETUP); REGDUMP(sc, IG4_REG_ENABLE_STATUS); - REGDUMP(sc, IG4_REG_COMP_PARAM1); - REGDUMP(sc, IG4_REG_COMP_VER); - REGDUMP(sc, IG4_REG_COMP_TYPE); - REGDUMP(sc, IG4_REG_CLK_PARMS); - REGDUMP(sc, IG4_REG_RESETS); - REGDUMP(sc, IG4_REG_GENERAL); - REGDUMP(sc, IG4_REG_SW_LTR_VALUE); - REGDUMP(sc, IG4_REG_AUTO_LTR_VALUE); + if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { + REGDUMP(sc, IG4_REG_COMP_PARAM1); + REGDUMP(sc, IG4_REG_COMP_VER); + } + if (sc->version == IG4_ATOM) { + REGDUMP(sc, IG4_REG_COMP_TYPE); + REGDUMP(sc, IG4_REG_CLK_PARMS); + } + if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { + REGDUMP(sc, IG4_REG_RESETS_HSW); + REGDUMP(sc, IG4_REG_GENERAL); + } else if (sc->version == IG4_SKYLAKE) { + REGDUMP(sc, IG4_REG_RESETS_SKL); + } + if (sc->version == IG4_HASWELL) { + REGDUMP(sc, IG4_REG_SW_LTR_VALUE); + REGDUMP(sc, IG4_REG_AUTO_LTR_VALUE); + } else if (sc->version == IG4_SKYLAKE) { + REGDUMP(sc, IG4_REG_ACTIVE_LTR_VALUE); + REGDUMP(sc, IG4_REG_IDLE_LTR_VALUE); + } } #undef REGDUMP Modified: head/sys/dev/ichiic/ig4_pci.c ============================================================================== --- head/sys/dev/ichiic/ig4_pci.c Tue Mar 6 23:28:12 2018 (r330557) +++ head/sys/dev/ichiic/ig4_pci.c Tue Mar 6 23:39:43 2018 (r330558) @@ -74,34 +74,74 @@ static int ig4iic_pci_detach(device_t dev); #define PCI_CHIP_BRASWELL_I2C_5 0x22c58086 #define PCI_CHIP_BRASWELL_I2C_6 0x22c68086 #define PCI_CHIP_BRASWELL_I2C_7 0x22c78086 +#define PCI_CHIP_SKYLAKE_I2C_0 0x9d608086 +#define PCI_CHIP_SKYLAKE_I2C_1 0x9d618086 +#define PCI_CHIP_SKYLAKE_I2C_2 0x9d628086 +#define PCI_CHIP_SKYLAKE_I2C_3 0x9d638086 +#define PCI_CHIP_SKYLAKE_I2C_4 0x9d648086 +#define PCI_CHIP_SKYLAKE_I2C_5 0x9d658086 static int ig4iic_pci_probe(device_t dev) { + ig4iic_softc_t *sc = device_get_softc(dev); + switch(pci_get_devid(dev)) { case PCI_CHIP_LYNXPT_LP_I2C_1: device_set_desc(dev, "Intel Lynx Point-LP I2C Controller-1"); + sc->version = IG4_HASWELL; break; case PCI_CHIP_LYNXPT_LP_I2C_2: device_set_desc(dev, "Intel Lynx Point-LP I2C Controller-2"); + sc->version = IG4_HASWELL; break; case PCI_CHIP_BRASWELL_I2C_1: device_set_desc(dev, "Intel Braswell Serial I/O I2C Port 1"); + sc->version = IG4_ATOM; break; case PCI_CHIP_BRASWELL_I2C_2: device_set_desc(dev, "Intel Braswell Serial I/O I2C Port 2"); + sc->version = IG4_ATOM; break; case PCI_CHIP_BRASWELL_I2C_3: device_set_desc(dev, "Intel Braswell Serial I/O I2C Port 3"); + sc->version = IG4_ATOM; break; case PCI_CHIP_BRASWELL_I2C_5: device_set_desc(dev, "Intel Braswell Serial I/O I2C Port 5"); + sc->version = IG4_ATOM; break; case PCI_CHIP_BRASWELL_I2C_6: device_set_desc(dev, "Intel Braswell Serial I/O I2C Port 6"); + sc->version = IG4_ATOM; break; case PCI_CHIP_BRASWELL_I2C_7: device_set_desc(dev, "Intel Braswell Serial I/O I2C Port 7"); + sc->version = IG4_ATOM; + break; + case PCI_CHIP_SKYLAKE_I2C_0: + device_set_desc(dev, "Intel Sunrise Point-LP I2C Controller-0"); + sc->version = IG4_SKYLAKE; + break; + case PCI_CHIP_SKYLAKE_I2C_1: + device_set_desc(dev, "Intel Sunrise Point-LP I2C Controller-1"); + sc->version = IG4_SKYLAKE; + break; + case PCI_CHIP_SKYLAKE_I2C_2: + device_set_desc(dev, "Intel Sunrise Point-LP I2C Controller-2"); + sc->version = IG4_SKYLAKE; + break; + case PCI_CHIP_SKYLAKE_I2C_3: + device_set_desc(dev, "Intel Sunrise Point-LP I2C Controller-3"); + sc->version = IG4_SKYLAKE; + break; + case PCI_CHIP_SKYLAKE_I2C_4: + device_set_desc(dev, "Intel Sunrise Point-LP I2C Controller-4"); + sc->version = IG4_SKYLAKE; + break; + case PCI_CHIP_SKYLAKE_I2C_5: + device_set_desc(dev, "Intel Sunrise Point-LP I2C Controller-5"); + sc->version = IG4_SKYLAKE; break; default: return (ENXIO); Modified: head/sys/dev/ichiic/ig4_reg.h ============================================================================== --- head/sys/dev/ichiic/ig4_reg.h Tue Mar 6 23:28:12 2018 (r330557) +++ head/sys/dev/ichiic/ig4_reg.h Tue Mar 6 23:39:43 2018 (r330558) @@ -109,12 +109,21 @@ #define IG4_REG_DMA_RDLR 0x0090 /* RW DMA Receive Data Level */ #define IG4_REG_SDA_SETUP 0x0094 /* RW SDA Setup */ #define IG4_REG_ENABLE_STATUS 0x009C /* RO Enable Status */ +/* Available at least on Atom SoCs and Haswell mobile. */ #define IG4_REG_COMP_PARAM1 0x00F4 /* RO Component Parameter */ #define IG4_REG_COMP_VER 0x00F8 /* RO Component Version */ +/* Available at least on Atom SoCs */ #define IG4_REG_COMP_TYPE 0x00FC /* RO Probe width/endian? (linux) */ +/* Available on Skylake-U/Y and Kaby Lake-U/Y */ +#define IG4_REG_RESETS_SKL 0x0204 /* RW Reset Register */ +#define IG4_REG_ACTIVE_LTR_VALUE 0x0210 /* RW Active LTR Value */ +#define IG4_REG_IDLE_LTR_VALUE 0x0214 /* RW Idle LTR Value */ +/* Available at least on Atom SoCs */ #define IG4_REG_CLK_PARMS 0x0800 /* RW Clock Parameters */ -#define IG4_REG_RESETS 0x0804 /* RW Reset Register */ +/* Available at least on Atom SoCs and Haswell mobile */ +#define IG4_REG_RESETS_HSW 0x0804 /* RW Reset Register */ #define IG4_REG_GENERAL 0x0808 /* RW General Register */ +/* These LTR config registers are at least available on Haswell mobile. */ #define IG4_REG_SW_LTR_VALUE 0x0810 /* RW SW LTR Value */ #define IG4_REG_AUTO_LTR_VALUE 0x0814 /* RW Auto LTR Value */ @@ -566,8 +575,12 @@ * 10 (reserved) * 11 I2C host controller is in reset. */ -#define IG4_RESETS_ASSERT 0x0003 -#define IG4_RESETS_DEASSERT 0x0000 +#define IG4_RESETS_ASSERT_HSW 0x0003 +#define IG4_RESETS_DEASSERT_HSW 0x0000 + +/* Skylake-U/Y and Kaby Lake-U/Y have the reset bits inverted */ +#define IG4_RESETS_DEASSERT_SKL 0x0003 +#define IG4_RESETS_ASSERT_SKL 0x0000 /* * GENERAL - (RW) General Reigster 22.2.38 Modified: head/sys/dev/ichiic/ig4_var.h ============================================================================== --- head/sys/dev/ichiic/ig4_var.h Tue Mar 6 23:28:12 2018 (r330557) +++ head/sys/dev/ichiic/ig4_var.h Tue Mar 6 23:39:43 2018 (r330558) @@ -47,6 +47,7 @@ #define IG4_RBUFMASK (IG4_RBUFSIZE - 1) enum ig4_op { IG4_IDLE, IG4_READ, IG4_WRITE }; +enum ig4_vers { IG4_HASWELL, IG4_ATOM, IG4_SKYLAKE }; struct ig4iic_softc { device_t dev; @@ -58,6 +59,7 @@ struct ig4iic_softc { int intr_rid; void *intr_handle; int intr_type; + enum ig4_vers version; enum ig4_op op; int cmd; int rnext; From owner-svn-src-all@freebsd.org Tue Mar 6 23:44:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C38AF3A93B; Tue, 6 Mar 2018 23:44:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1537072092; Tue, 6 Mar 2018 23:44:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A17619B6A; Tue, 6 Mar 2018 23:44:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26NiKCl003912; Tue, 6 Mar 2018 23:44:20 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26NiJv0003907; Tue, 6 Mar 2018 23:44:19 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803062344.w26NiJv0003907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 6 Mar 2018 23:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330559 - in head: . cddl/usr.sbin cddl/usr.sbin/dwatch cddl/usr.sbin/dwatch/examples cddl/usr.sbin/dwatch/libexec etc/mtree share/dtrace X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: in head: . cddl/usr.sbin cddl/usr.sbin/dwatch cddl/usr.sbin/dwatch/examples cddl/usr.sbin/dwatch/libexec etc/mtree share/dtrace X-SVN-Commit-Revision: 330559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 23:44:20 -0000 Author: dteske Date: Tue Mar 6 23:44:19 2018 New Revision: 330559 URL: https://svnweb.freebsd.org/changeset/base/330559 Log: Introduce dwatch(1) as a tool for making DTrace more useful Reviewed by: markj, gnn, bdrewery (earlier version) Relnotes: yes Sponsored by: Smule, Inc. Differential Revision: https://reviews.freebsd.org/D10006 Added: head/cddl/usr.sbin/dwatch/ head/cddl/usr.sbin/dwatch/Makefile (contents, props changed) head/cddl/usr.sbin/dwatch/dwatch (contents, props changed) head/cddl/usr.sbin/dwatch/dwatch.1 (contents, props changed) head/cddl/usr.sbin/dwatch/examples/ head/cddl/usr.sbin/dwatch/examples/Makefile (contents, props changed) head/cddl/usr.sbin/dwatch/examples/profile_template (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/ head/cddl/usr.sbin/dwatch/libexec/Makefile (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/chmod (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/errno (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/io (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/ip (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/kill (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/nanosleep (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/open (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/proc (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/rw (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/sched (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/tcp (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/udp (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/vop_create (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/vop_readdir (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/vop_rename (contents, props changed) head/cddl/usr.sbin/dwatch/libexec/vop_symlink (contents, props changed) Deleted: head/share/dtrace/watch_execve head/share/dtrace/watch_kill head/share/dtrace/watch_vop_remove Modified: head/ObsoleteFiles.inc head/cddl/usr.sbin/Makefile head/etc/mtree/BSD.usr.dist head/share/dtrace/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Mar 6 23:39:43 2018 (r330558) +++ head/ObsoleteFiles.inc Tue Mar 6 23:44:19 2018 (r330559) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20180306: remove DTrace scripts made obsolete by dwatch(1) +OLD_FILES+=usr/share/dtrace/watch_execve +OLD_FILES+=usr/share/dtrace/watch_kill +OLD_FILES+=usr/share/dtrace/watch_vop_remove # 20180212: move devmatch OLD_FILES+=usr/sbin/devmatch # 20180211: remove usb.conf Modified: head/cddl/usr.sbin/Makefile ============================================================================== --- head/cddl/usr.sbin/Makefile Tue Mar 6 23:39:43 2018 (r330558) +++ head/cddl/usr.sbin/Makefile Tue Mar 6 23:44:19 2018 (r330559) @@ -3,6 +3,7 @@ .include SUBDIR= ${_dtrace} \ + ${_dwatch} \ ${_lockstat} \ ${_plockstat} \ ${_zdb} \ @@ -23,6 +24,7 @@ _zfsd= zfsd .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" _dtrace= dtrace +_dwatch= dwatch _lockstat= lockstat _plockstat= plockstat .endif @@ -30,15 +32,18 @@ _plockstat= plockstat .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ ${MACHINE_CPUARCH} == "riscv" _dtrace= dtrace +_dwatch= dwatch _lockstat= lockstat .endif .if ${MACHINE_CPUARCH} == "mips" _dtrace= dtrace +_dwatch= dwatch .endif .if ${MACHINE_CPUARCH} == "powerpc" _dtrace= dtrace +_dwatch= dwatch _lockstat= lockstat .endif Added: head/cddl/usr.sbin/dwatch/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dwatch/Makefile Tue Mar 6 23:44:19 2018 (r330559) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +SUBDIR= libexec + +.if ${MK_EXAMPLES} != "no" +SUBDIR+= examples +.endif + +SCRIPTS= dwatch + +MAN= dwatch.1 + +.include Added: head/cddl/usr.sbin/dwatch/dwatch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/dwatch/dwatch Tue Mar 6 23:44:19 2018 (r330559) @@ -0,0 +1,1291 @@ +#!/bin/sh +#- +# Copyright (c) 2014-2018 Devin Teske +# 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. +# +############################################################ IDENT(1) +# +# $Title: Watch processes as they trigger a particular DTrace probe $ +# $FreeBSD$ +# +############################################################ CONFIGURATION + +# +# DTrace pragma settings +# +DTRACE_PRAGMA=" + option quiet + option dynvarsize=16m + option switchrate=10hz +" # END-QUOTE + +# +# Profiles +# +: ${DWATCH_PROFILES_PATH="/usr/libexec/dwatch:/usr/local/libexec/dwatch"} + +############################################################ GLOBALS + +VERSION='$Version: 1.0-beta-91 $' # -V + +pgm="${0##*/}" # Program basename + +# +# Command-line arguments +# +PROBE_ARG= + +# +# Command-line options +# +CONSOLE= # -y +CONSOLE_FORCE= # -y +[ -t 1 ] && CONSOLE=1 # -y +COUNT=0 # -N count +CUSTOM_DETAILS= # -E code +CUSTOM_TEST= # -t test +DEBUG= # -d +DESTRUCTIVE_ACTIONS= # -w +EXECNAME= # -k name +EXECREGEX= # -z regex +EXIT_AFTER_COMPILE= # -e +FILTER= # -r regex +PROBE_COALESCE= # -F +GROUP= # -g group +JID= # -j jail +LIST= # -l +LIST_PROFILES= # -Q +MAX_ARGS=64 # -B num +MAX_DEPTH=64 # -K num +ONELINE= # -1 +OUTPUT= # -o file +OUTPUT_CMD= # -O cmd +PID= # -p pid +PROBE_TYPE= # -f -m -n -P +PROFILE= # -X profile +PSTREE= # -R +QUIET= # -q +TIMEOUT= # -T time +TRACE= # -x +USER= # -u user +USE_PROFILE= # -X profile +VERBOSE= # -v + +# +# Global exit status +# +SUCCESS=0 +FAILURE=1 + +# +# Miscellaneous +# +ACTIONS= +EVENT_DETAILS= +EVENT_TAG='printf("%d.%d %s[%d]: ", + this->uid0, this->gid0, execname, this->pid0);' +EVENT_TEST= +FILE= +ID=3 +MODULE_CHECKED= +PROBE= +PSARGS=1 +RGID= +RUID= +SUDO= +export SUDO_PROMPT="[sudo] Password:" +TITLE=\$Title: + +############################################################ FUNCTIONS + +ansi() { local fmt="$2 $4"; [ "$CONSOLE" ] && fmt="\\033[$1m$2\\033[$3m $4"; + shift 4; printf "$fmt\n" "$@"; } +die() { exec >&2; [ "$*" ] && echo "$pgm:" "$@"; exit $FAILURE; } +info() { [ "$QUIET" ] || ansi 35 "INFO" 39 "$@" >&2; } + +usage() +{ + local optfmt="\t%-10s %s\n" + exec >&2 + [ "$*" ] && printf "%s: %s\n" "$pgm" "$*" + printf "Usage: %s [-1defFmnPqRvVwxy] [%s] [%s] [%s] [%s]\n" "$pgm" \ + "-B num" "-E code" "-g group" "-j jail" + printf "\t [%s] [%s] [%s] [%s] [%s] [%s]\n" \ + "-k name" "-K num" "-N count" "-o file" "-O cmd" "-p pid" + printf "\t [%s] [%s] [%s] [%s] [%s] [%s]\n" \ + "-r regex" "-t test" "-T time" "-u user" "-X profile" \ + "-z regex" + printf "\t probe[,...] [args ...]\n" + printf " %s -l [-fmnPqy] [-r regex] [probe ...]\n" "$pgm" + printf " %s -Q [-1qy] [-r regex]\n" "$pgm" + printf "\n" + printf "$optfmt" "-1" \ + "Print one line per process/profile (Default; disables \`-R')." + printf "$optfmt" "-B num" \ + "Maximum process arguments to display (Default $MAX_ARGS)." + printf "$optfmt" "-d" \ + "Debug. Send dtrace(1) script to stdout instead of executing." + printf "$optfmt" "-e" \ + "Exit after compiling request but prior to enabling probes." + printf "$optfmt" "-E code" \ + "DTrace code for event details. If \`-', read from stdin." + printf "$optfmt" "-f" \ + "Enable probe matching the specified function name." + printf "$optfmt" "-F" \ + "Coalesce trace output by function." + printf "$optfmt" "-g group" \ + "Group filter. Only show processes matching group name/gid." + printf "$optfmt" "-j jail" \ + "Jail filter. Only show processes matching jail name/jid." + printf "$optfmt" "-k name" \ + "Only show processes matching name." + printf "$optfmt" "-K num" \ + "Maximum directory depth to display (Default $MAX_DEPTH)." + printf "$optfmt" "-l" \ + "List available probes on standard output and exit." + printf "$optfmt" "-m" \ + "Enable probe matching the specified module name." + printf "$optfmt" "-n" \ + "Enable probe matching the specified probe name." + printf "$optfmt" "-N count" \ + "Exit after count matching entries (Default 0 for disabled)." + printf "$optfmt" "-o file" \ + "Set output file. If \`-', the path \`/dev/stdout' is used." + printf "$optfmt" "-O cmd" \ + "Execute cmd for each event." + printf "$optfmt" "-p pid" \ + "Process id filter. Only show processes with matching pid." + printf "$optfmt" "-P" \ + "Enable probe matching the specified provider name." + printf "$optfmt" "-q" \ + "Quiet. Hide informational messages and all dtrace(1) errors." + printf "$optfmt" "-Q" \ + "List available profiles in DWATCH_PROFILES_PATH and exit." + printf "$optfmt" "-r regex" \ + "Filter. Only show blocks matching awk(1) regular expression." + printf "$optfmt" "-R" \ + "Show parent, grandparent, and ancestor of process." + printf "$optfmt" "-t test" \ + "Test clause (predicate) to limit events (Default none)." + printf "$optfmt" "-T time" \ + "Timeout. Format is \`\#[smhd]' or simply \`\#' for seconds." + printf "$optfmt" "-u user" \ + "User filter. Only show processes matching user name/uid." + printf "$optfmt" "-v" \ + "Verbose. Show all errors from dtrace(1)." + printf "$optfmt" "-V" \ + "Report dwatch version on standard output and exit." + printf "$optfmt" "-w" \ + "Permit destructive actions (copyout*, stop, panic, etc.)." + printf "$optfmt" "-x" \ + "Trace. Print \`' when a probe is triggered." + printf "$optfmt" "-X profile" \ + "Load profile name from DWATCH_PROFILES_PATH." + printf "$optfmt" "-y" \ + "Always treat stdout as console (enable colors/columns/etc.)." + printf "$optfmt" "-z regex" \ + "Only show processes matching awk(1) regular expression." + die +} + +dtrace_cmd() +{ + local status stdout + local timeout= + + if [ "$1" = "-t" ]; then + shift + [ "$TIMEOUT" ] && timeout=1 + fi + + exec 3>&1 + stdout=3 + + # + # Filter dtrace(1) stderr while preserving exit status + # + status=$( + exec 4>&1 + to_status=4 + ( trap 'echo $? >&$to_status' EXIT + eval $SUDO ${timeout:+timeout \"\$TIMEOUT\"} dtrace \ + \"\$@\" 2>&1 ${QUIET:+2> /dev/null} >&$stdout + ) | dtrace_stderr_filter >&2 + ) + + return $status +} + +dtrace_stderr_filter() +{ + if [ "$VERBOSE" ]; then + cat + return + # NOTREACHED + fi + + awk ' # Start awk(1) stderr-filter + /[[:digit:]]+ drops? on CPU [[:digit:]]+/ { next } + /failed to write to : No such file or directory/ { next } + /failed to write to : Broken pipe/ { next } + /processing aborted: Broken pipe/ { next } + /invalid address \(0x[[:xdigit:]]+\) in action #[[:digit:]]+/ { next } + /out of scratch space in action #[[:digit:]]+/ { next } + /^Bus error$/ { next } + { print; fflush() } + ' # END-QUOTE +} + +expand_probe() +{ + local OPTIND=1 OPTARG flag + local type= + + while getopts t: flag; do + case "$flag" in + t) type="$OPTARG" ;; + esac + done + shift $(( $OPTIND - 1 )) + + local probe="$1" + case "$probe" in + *:*) + echo "$probe" + return $SUCCESS + ;; + esac + + dtrace_cmd -l | awk -v probe="$probe" -v type="$type" ' + # Start awk(1) processor + #################################################### BEGIN + BEGIN { getline dtrace_header } + #################################################### FUNCTIONS + function dump(unused1,unused2) { + if (n) { + if (NcF[n] == 1) f = N2F[n] + if (NcM[n] == 1) m = N2M[n] + if (NcP[n] == 1) p = N2P[n] + } else if (f) { + if (FcM[f] == 1) m = F2M[f] + if (FcP[f] == 1) p = F2P[f] + if (FcN[f] == 0 && found) n = "entry" + } else if (m) { + if (McP[m] == 1) p = M2P[m] + } + printf "%s:%s:%s:%s\n", p, m, f, n + exit !found + } + function inFMP() { return probe in F || probe in M || probe in P } + function inNMP() { return probe in N || probe in M || probe in P } + function inNFP() { return probe in N || probe in F || probe in P } + function inNFM() { return probe in N || probe in F || probe in M } + function diva(value, peerA, peerB, peerC) { + return value >= peerA && value >= peerB && value >= peerC + } + #################################################### MAIN + type == "name" && $NF != probe { next } + type == "function" && NF >=4 && $(NF-1) != probe { next } + type == "module" && NF == 5 && $(NF-2) != probe { next } + type == "provider" && $2 != probe { next } + type || $2 == probe || $3 == probe || $4 == probe || $5 == probe { + P[_p = $2]++ + M[_m = (NF >= 5 ? $(NF-2) : "")]++ + F[_f = (NF >= 4 ? $(NF-1) : "")]++ + N[_n = $NF]++ + if (N2F[_n] != _f) NcF[_n]++; N2F[_n] = _f + if (N2M[_n] != _m) NcM[_n]++; N2M[_n] = _m + if (N2P[_n] != _p) NcP[_n]++; N2P[_n] = _p + if (_n !~ /entry|return/) { + if (F2N[_f] != _n) FcN[_f]++ + F2N[_f] = _n + } + if (F2M[_f] != _m) FcM[_f]++; F2M[_f] = _m + if (F2P[_f] != _p) FcP[_f]++; F2P[_f] = _p + if (M2P[_m] != _p) McP[_m]++; M2P[_m] = _p + } + #################################################### END + END { + if (type == "name") dump(n = probe, found = probe in N) + if (type == "function") dump(f = probe, found = probe in F) + if (type == "module") dump(m = probe, found = probe in M) + if (type == "provider") dump(p = probe, found = probe in P) + if (probe in N) { + found = 1 + if (!inFMP()) dump(n = probe) + if (diva(F[probe], N[probe], M[probe], P[probe])) + dump(f = probe) + if (diva(M[probe], N[probe], F[probe], P[probe])) + dump(m = probe) + if (diva(P[probe], N[probe], F[probe], M[probe])) + dump(p = probe) + dump(n = probe) # N is the diva + } else if (probe in F) { + found = 1 + if (!inNMP()) dump(f = probe) + if (diva(N[probe], F[probe], M[probe], P[probe])) + dump(n = probe) + if (diva(M[probe], F[probe], N[probe], P[probe])) + dump(m = probe) + if (diva(P[probe], F[probe], N[probe], M[probe])) + dump(p = probe) + dump(f = probe) # F is the diva + } else if (probe in M) { + found = 1 + if (!inNFP()) dump(m = probe) + if (diva(N[probe], M[probe], F[probe], P[probe])) + dump(n = probe) + if (diva(F[probe], M[probe], N[probe], P[probe])) + dump(f = probe) + if (diva(P[probe], M[probe], N[probe], F[probe])) + dump(p = probe) + dump(m = probe) # M is the diva + } else if (probe in P) { + found = 1 + if (!inNFM()) dump(p = probe) + if (diva(N[probe], P[probe], F[probe], M[probe])) + dump(n = probe) + if (diva(F[probe], P[probe], N[probe], M[probe])) + dump(f = probe) + if (diva(M[probe], P[probe], N[probe], F[probe])) + dump(m = probe) + dump(p = probe) # P is the diva + } + if (!found) print probe + exit !found + } + ' # END-QUOTE +} + +list_probes() +{ + local OPTIND=1 OPTARG flag + local column=0 header="PROVIDER:MODULE:FUNCTION:NAME" + local filter= quiet= type= + + while getopts f:qt: flag; do + case "$flag" in + f) filter="$OPTARG" ;; + q) quiet=1 ;; + t) type="$OPTARG" ;; + esac + done + shift $(( $OPTIND - 1 )) + + if [ $# -eq 0 ]; then + case "$type" in + provider) column=1 header="PROVIDER" ;; + module) column=2 header="MODULE" ;; + function) column=3 header="FUNCTION" ;; + name) column=4 header="NAME" ;; + esac + fi + + [ "$quiet" ] || echo "$header" + + local arg probe= + for arg in "$@"; do + arg=$( expand_probe -t "$type" -- "$arg" ) + probe="$probe${probe:+, }$arg" + done + + dtrace_cmd -l${probe:+n "$probe"} | awk -v pattern="$( + # Prevent backslashes from being lost + echo "$filter" | awk 'gsub(/\\/,"&&")||1' + )" -v want="$column" -v console="$CONSOLE" ' + BEGIN { getline dtrace_header } + function ans(seq) { return console ? "\033[" seq "m" : "" } + NF > 3 && $(NF-1) ~ /^#/ { next } + !_[$0 = column[0] = sprintf("%s:%s:%s:%s", + column[1] = $2, + column[2] = (NF >= 5 ? $(NF-2) : ""), + column[3] = (NF >= 4 ? $(NF-1) : ""), + column[4] = $NF)]++ && + !__[$0 = column[want]]++ && + gsub(pattern, ans("31;1") "&" ans("39;22")) { + print | "sort" + } + END { close("sort") } + ' # END-QUOTE + + exit $SUCCESS +} + +list_profiles() +{ + local OPTIND=1 OPTARG flag + local filter= oneline= quiet= + + while getopts 1f:q flag; do + case "$flag" in + 1) oneline=1 ;; + f) filter="$OPTARG" ;; + q) quiet=1 ;; + esac + done + shift $(( $OPTIND - 1 )) + + # Prevent backslashes from being lost + filter=$( echo "$filter" | awk 'gsub(/\\/,"&&")||1' ) + + # Build a list of profiles available + local profiles + profiles=$( { IFS=: + for dir in $DWATCH_PROFILES_PATH; do + [ -d "$dir" ] || continue + for path in $dir/*; do + [ -f "$path" ] || continue + name="${path##*/}" + [ "$name" = "${name%%[!0-9A-Za-z_-]*}" ] || + continue + echo $name + done + done + } | sort -u ) + + # Get the longest profile name + local longest_profile_name + longest_profile_name=$( echo "$profiles" | + awk -v N=0 '(L = length($0)) > N { N = L } END { print N }' ) + + # Get the width of the terminal + local max_size="$( stty size 2> /dev/null )" + : ${max_size:=24 80} + local max_width="${max_size#*[$IFS]}" + + # Determine how many columns we can display + local x=$longest_profile_name ncols=1 + [ "$QUIET" ] || x=$(( $x + 8 )) # Accommodate leading tab character + x=$(( $x + 3 + $longest_profile_name )) # Preload end of next column + while [ $x -lt $max_width ]; do + ncols=$(( $ncols + 1 )) + x=$(( $x + 3 + $longest_profile_name )) + done + + # Output single lines if sent to a pipe + if [ "$oneline" ]; then + echo "$profiles" | awk -v filter="$filter" -v cons="$CONSOLE" ' + function ans(s) { return cons ? "\033[" s "m" : "" } + gsub(filter, ans("31;1") "&" ans("39;22")) + ' # END-QUOTE + return $SUCCESS + # NOTREACHED + fi + + [ "$quiet" ] || echo PROFILES: + echo "$profiles" | awk \ + -v colsize=$longest_profile_name \ + -v console="$CONSOLE" \ + -v ncols=$ncols \ + -v quiet="$quiet" \ + -v filter="$filter" \ + ' # Begin awk(1) processor + function ans(seq) { return console ? "\033[" seq "m" : "" } + BEGIN { + row_item[1] = "" + replace = ans("31;1") "&" ans("39;22") + ansi_offset = length(replace) - 1 + } + function print_row() + { + cs = colsize + ansi_offset * \ + gsub(filter, replace, row_item[1]) + printf "%s%-*s", quiet ? "" : "\t", cs, row_item[1] + for (i = 2; i <= cur_col; i++) { + cs = colsize + ansi_offset * \ + gsub(filter, replace, row_item[i]) + printf " %-*s", cs, row_item[i] + } + printf "\n" + } + $0 ~ filter { + n++ + cur_col = ((n - 1) % ncols) + 1 + row_item[cur_col] = $0 + if (cur_col == ncols) print_row() + } + END { if (cur_col < ncols) print_row() } + ' # END-QUOTE + + exit $SUCCESS +} + +load_profile() +{ + local profile="$1" + + [ "$profile" ] || + die "missing profile argument (\`$pgm -Q' to list profiles)" + + local oldIFS="$IFS" + local dir found= + + IFS=: + for dir in $DWATCH_PROFILES_PATH; do + [ -d "$dir" ] || continue + [ -f "$dir/$profile" ] || continue + PROFILE="$profile" found=1 + info "Sourcing $profile profile [found in %s]" "$dir" + . "$dir/$profile" + break + done + IFS="$oldIFS" + + [ "$found" ] || + die "no module named \`$profile' (\`$pgm -Q' to list profiles)" +} + +pproc() +{ + local OPTIND=1 OPTARG flag + local P= N=0 + + while getopts P: flag; do + case "$flag" in + P) P="$OPTARG" ;; + esac + done + shift $(( OPTIND - 1 )) + + local proc=$1 + if [ ! "$proc" ]; then + if [ "$P" = "0" ]; then + proc="curthread->td_proc" + else + proc="this->proc ? this->proc->p_pptr : NULL" + fi + fi + + awk 'NR > 1 && $0 { $0 = "\t" $0 } + gsub(/\\\t/, "\t") || 1 + ' <<-EOFPREAMBLE + this->proc = $proc; + this->uid$P = this->proc ? this->proc->p_ucred->cr_uid : -1; + this->gid$P = this->proc ? this->proc->p_ucred->cr_rgid : -1; + this->pid$P = this->proc ? this->proc->p_pid : -1; + this->jid$P = this->proc ? this->proc->p_ucred->cr_prison->pr_id : -1; + + this->p_args = this->proc ? this->proc->p_args : 0; + this->ar_length = this->p_args ? this->p_args->ar_length : 0; + this->ar_args = (char *)(this->p_args ? this->p_args->ar_args : 0); + + this->args$P = this->arg${P}_$N = this->ar_length > 0 ? + \ this->ar_args : stringof(this->proc->p_comm); + this->len = this->ar_length > 0 ? strlen(this->ar_args) + 1 : 0; + this->ar_args += this->len; + this->ar_length -= this->len; + + EOFPREAMBLE + + awk -v P=$P -v MAX_ARGS=$MAX_ARGS ' + $0 { $0 = "\t" $0 } + buf = buf $0 "\n" { } + END { + while (++N <= MAX_ARGS) { + $0 = buf + gsub(/P/, P) + gsub(/N/, N) + gsub(/\\\t/, "\t") + sub(/\n$/, "") + print + } + } + ' <<-EOFARGS + this->argP_N = this->ar_length > 0 ? this->ar_args : ""; + this->argsP = strjoin(this->argsP, + \ strjoin(this->argP_N != "" ? " " : "", this->argP_N)); + this->len = this->ar_length > 0 ? strlen(this->ar_args) + 1 : 0; + this->ar_args += this->len; + this->ar_length -= this->len; + + EOFARGS + + N=$(( $MAX_ARGS + 1 )) + awk 'sub(/^\\\t/, "\t") || 1, $0 = "\t" $0' <<-EOFPROC + this->arg${P}_$N = this->ar_length > 0 ? "..." : ""; + this->args$P = strjoin(this->args$P, + \ strjoin(this->arg${P}_$N != "" ? " " : "", this->arg${P}_$N)); + EOFPROC +} + +pproc_dump() +{ + local OPTIND=1 OPTARG flag + local verbose= + + while getopts v flag; do + case "$flag" in + v) verbose=1 ;; + esac + done + shift $(( $OPTIND - 1 )) + + local P=$1 + if [ "$verbose" ]; then + awk -v P=$P ' + BEGIN { printf "\t" } + NR > 1 && $0 { $0 = "\t" $0 } + buf = buf $0 "\n" { } + END { + $0 = buf + if (P < 3) S = sprintf("%" 7-2*(P+1) "s", "") + gsub(/S/, S) + gsub(/B/, P < 3 ? "\\" : "") + gsub(/\\\t/, "\t") + sub(/\n$/, "") + print + } + ' <<-EOFPREAMBLE + printf(" SB-+= %05d %d.%d %s\n", + \ this->pid$P, this->uid$P, this->gid$P, this->args$P); + EOFPREAMBLE + else + cat <<-EOFPREAMBLE + printf("%s", this->args$P); + EOFPREAMBLE + fi +} + +############################################################ MAIN + +# If we're running as root, no need for sudo(8) +[ "$( id -u )" != 0 ] && type sudo > /dev/null 2>&1 && SUDO=sudo + +# +# Process command-line options +# +while getopts 1B:deE:fFg:j:k:K:lmnN:o:O:p:PqQr:Rt:T:u:vVwxX:yz: flag; do + case "$flag" in + 1) ONELINE=1 PSTREE= ;; + B) MAX_ARGS="$OPTARG" ;; + d) DEBUG=1 ;; + e) EXIT_AFTER_COMPILE=1 ;; + E) CUSTOM_DETAILS=1 + EVENT_DETAILS="${EVENT_DETAILS%;}" + [ "$EVENT_DETAILS" ] && EVENT_DETAILS="$EVENT_DETAILS; + printf(\" \"); + " # END-QUOTE + # Read event code from stdin if `-' is argument + [ "$OPTARG" = "-" ] && OPTARG=$( cat ) + EVENT_DETAILS="$EVENT_DETAILS$OPTARG" ;; + f) PROBE_TYPE=function ;; + F) PROBE_COALESCE=1 ;; + g) GROUP="$OPTARG" ;; + j) JID="$OPTARG" ;; + k) EXECNAME="$EXECNAME${EXECNAME:+ }$OPTARG" + case "$OPTARG" in + \**\*) name="${OPTARG%\*}" + predicate="strstr(execname, \"${name#\*}\") != NULL" ;; + \**) name="${OPTARG#\*}" + predicate="strstr(execname, \"$name\") == (execname +" + predicate="$predicate strlen(execname) - ${#name})" ;; + *\*) predicate="strstr(execname, \"${OPTARG%\*}\") == execname" ;; + *) predicate="execname == \"$OPTARG\"" + esac + EVENT_TEST="$predicate${EVENT_TEST:+ || + ($EVENT_TEST)}" ;; + K) MAX_DEPTH="$OPTARG" ;; + l) LIST=1 ;; + m) PROBE_TYPE=module ;; + n) PROBE_TYPE=name ;; + N) COUNT="$OPTARG" ;; + o) OUTPUT="$OPTARG" ;; + O) OUTPUT_CMD="$OPTARG" ;; + p) PID="$OPTARG" ;; + P) PROBE_TYPE=provider ;; + q) QUIET=1 ;; + Q) LIST_PROFILES=1 ;; + r) FILTER="$OPTARG" ;; + R) PSTREE=1 ;; + t) CUSTOM_TEST="${CUSTOM_TEST:+($CUSTOM_TEST) && }$OPTARG" ;; + T) TIMEOUT="$OPTARG" ;; + u) USER="$OPTARG" ;; + v) VERBOSE=1 ;; + V) vers="${VERSION#\$*[:\$]}" + vers="${vers% \$}" + printf "%s: %s\n" "$pgm" "${vers# }" + exit ;; + w) DESTRUCTIVE_ACTIONS=1 ;; + x) TRACE=1 ;; + X) USE_PROFILE=1 PROFILE="$OPTARG" ;; + y) CONSOLE=1 CONSOLE_FORCE=1 ;; + z) EXECREGEX="$OPTARG" ;; + *) usage + # NOTREACHED + esac +done +shift $(( $OPTIND - 1 )) + +# +# List probes if `-l' was given +# +[ "$LIST" ] && + list_probes -f "$FILTER" ${QUIET:+-q} -t "$PROBE_TYPE" -- "$@" + # NOTREACHED + +# +# List profiles if `-Q' was given +# +[ "$LIST_PROFILES" ] && + list_profiles ${ONELINE:+-1} -f "$FILTER" ${QUIET:+-q} + # NOTREACHED + +# +# Validate number of arguments +# +if [ ! "$PROFILE" ]; then + # If not given `-X profile' then a probe argument is required + [ $# -gt 0 ] || usage # NOTREACHED +fi + +# +# Validate `-N count' option argument +# +case "$COUNT" in +"") usage "-N option requires a number argument" ;; # NOTREACHED +*[!0-9]*) usage "-N argument must be a number" ;; # NOTREACHED +esac + +# +# Validate `-B num' option argument +# +case "$MAX_ARGS" in +"") usage "-B option requires a number argument" ;; # NOTREACHED +*[!0-9]*) usage "-B argument must be a number" ;; # NOTREACHED +esac + +# +# Validate `-K num' option argument +# +case "$MAX_DEPTH" in +"") usage "-K option requires a number argument" ;; # NOTREACHED +*[!0-9]*) usage "-K argument must be a number" ;; # NOTREACHED +esac + +# +# Validate `-j jail' option argument +# +case "$JID" in +"") : fall through ;; +*[!0-9]*) JID=$( jls -j "$JID" jid ) || exit ;; +esac + +# +# Validate `-u user' option argument +# +case "$USER" in +"") : fall through ;; +*[![:alnum:]_-]*) RUID="$USER" ;; +*[!0-9]*) RUID=$( id -u "$USER" 2> /dev/null ) || die "No such user: $USER" ;; +*) RUID=$USER +esac + +# +# Validate `-g group' option argument +# +case "$GROUP" in +"") : fall-through ;; +*[![:alnum:]_-]*) RGID="$GROUP" ;; +*[!0-9]*) + RGID=$( getent group | awk -F: -v group="$GROUP" ' + $1 == group { print $3; exit found=1 } + END { exit !found } + ' ) || die "No such group: $GROUP" ;; +*) RGID=$GROUP +esac + +# +# Expand probe argument into probe(s) +# +case "$1" in +-*) : Assume dtrace options such as "-c cmd" or "-p pid" ;; # No probe(s) given +*) + PROBE_ARG="$1" + shift +esac +if [ "$PROBE_ARG" ]; then + oldIFS="$IFS" + IFS="$IFS," + for arg in $PROBE_ARG; do + arg=$( expand_probe -t "$PROBE_TYPE" -- "$arg" ) + PROBE="$PROBE${PROBE:+, }$arg" + done + IFS="$oldIFS" +fi + +# +# Set default event details if `-E code' was not given +# +[ "$CUSTOM_DETAILS" ] || EVENT_DETAILS=$( pproc_dump 0 ) + +# +# Load profile if given `-X profile' +# +[ "$USE_PROFILE" ] && load_profile "$PROFILE" +[ "$PROBE" ] || die "PROBE not defined by profile and none given as argument" + +# +# Show the user what's being watched +# +[ "$DEBUG$QUIET$EXIT_AFTER_COMPILE" ] || info "Watching '$PROBE' ..." + +# +# Header for watched probe entry +# +case "$PROBE" in +*,*) : fall-through ;; +*:execve:entry|execve:entry) + ACTIONS=$( awk 'gsub(/\\\t/, "\t") || 1' <<-EOF + $PROBE /* probe ID $ID */ + {${TRACE:+ + \ printf("<$ID>");} + \ this->caller_execname = execname; + } + EOF + ) + PROBE="${PROBE%entry}return" + ID=$(( $ID + 1 )) + EVENT_TEST="execname != this->caller_execname${EVENT_TEST:+ && + ($EVENT_TEST)}" + EVENT_TAG='printf("%d.%d %s[%d]: ", + this->uid1, this->gid1, this->caller_execname, this->pid1);' + ;; +esac + +# +# Jail clause/predicate +# +if [ "$JID" ]; then + prison_id="curthread->td_proc->p_ucred->cr_prison->pr_id" + EVENT_TEST="$prison_id == $JID${EVENT_TEST:+ && + ($EVENT_TEST)}" +fi + +# +# Custom test clause/predicate +# +if [ "$CUSTOM_TEST" ]; then + case "$EVENT_TEST" in + "") EVENT_TEST="$CUSTOM_TEST" ;; + *) EVENT_TEST="$EVENT_TEST && + ($CUSTOM_TEST)" + esac +fi + +# +# Make sure dynamic code has trailing semi-colons if non-NULL +# +EVENT_TAG="${EVENT_TAG%;}${EVENT_TAG:+;}" +EVENT_DETAILS="${EVENT_DETAILS%;}${EVENT_DETAILS:+;}" + +# +# DTrace script +# +# If `-d' is given, script is sent to stdout for debugging +# If `-c count", `-g group', `-r regex', or `-u user' is given, run script with +# dtrace and send output to awk(1) post-processor (making sure to preserve the +# exit code returned by dtrace invocation). Otherwise, simply run script with +# dtrace and then exit. +# +exec 9<"); +} + /* + * Examine process, parent process, and grandparent process details + */ + + /******************* CURPROC *******************/ + + $( pproc -P0 ) + + /******************* PPARENT *******************/ + + $( if [ "$PSTREE" ]; then pproc -P1; else echo -n \ + "this->proc = this->proc ? this->proc->p_pptr : NULL; + this->pid1 = this->proc ? this->proc->p_pid : -1; + this->uid1 = this->proc ? this->proc->p_ucred->cr_uid : -1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Mar 6 23:58:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 143D4F3BB82; Tue, 6 Mar 2018 23:58:54 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA958727E4; Tue, 6 Mar 2018 23:58:53 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B124919D35; Tue, 6 Mar 2018 23:58:53 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26Nwr6p008816; Tue, 6 Mar 2018 23:58:53 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26Nwrd3008815; Tue, 6 Mar 2018 23:58:53 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803062358.w26Nwrd3008815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 6 Mar 2018 23:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330560 - head/cddl/usr.sbin/dwatch X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/cddl/usr.sbin/dwatch X-SVN-Commit-Revision: 330560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 23:58:54 -0000 Author: dteske Date: Tue Mar 6 23:58:53 2018 New Revision: 330560 URL: https://svnweb.freebsd.org/changeset/base/330560 Log: Bump dwatch(1) internal version from 1.0-beta-91 to 1.0 Modified: head/cddl/usr.sbin/dwatch/dwatch Modified: head/cddl/usr.sbin/dwatch/dwatch ============================================================================== --- head/cddl/usr.sbin/dwatch/dwatch Tue Mar 6 23:44:19 2018 (r330559) +++ head/cddl/usr.sbin/dwatch/dwatch Tue Mar 6 23:58:53 2018 (r330560) @@ -47,7 +47,7 @@ DTRACE_PRAGMA=" ############################################################ GLOBALS -VERSION='$Version: 1.0-beta-91 $' # -V +VERSION='$Version: 1.0 $' # -V pgm="${0##*/}" # Program basename From owner-svn-src-all@freebsd.org Wed Mar 7 01:55:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D23A2F43798; Wed, 7 Mar 2018 01:55:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F822766EC; Wed, 7 Mar 2018 01:55:39 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A79D1B03E; Wed, 7 Mar 2018 01:55:39 +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 w271tdfG067576; Wed, 7 Mar 2018 01:55:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w271td2J067574; Wed, 7 Mar 2018 01:55:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803070155.w271td2J067574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 7 Mar 2018 01:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330561 - head/bin/chflags X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/bin/chflags X-SVN-Commit-Revision: 330561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 01:55:40 -0000 Author: bdrewery Date: Wed Mar 7 01:55:38 2018 New Revision: 330561 URL: https://svnweb.freebsd.org/changeset/base/330561 Log: chflags: Add SIGINFO support. This is copied from chmod r311668. MFC after: 2 weeks Modified: head/bin/chflags/chflags.1 head/bin/chflags/chflags.c Modified: head/bin/chflags/chflags.1 ============================================================================== --- head/bin/chflags/chflags.1 Tue Mar 6 23:58:53 2018 (r330560) +++ head/bin/chflags/chflags.1 Wed Mar 7 01:55:38 2018 (r330561) @@ -32,7 +32,7 @@ .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd March 4, 2018 +.Dd March 6, 2018 .Dt CHFLAGS 1 .Os .Sh NAME @@ -217,6 +217,16 @@ setting. See .Xr security 7 for more information on this setting. +.Pp +If +.Nm +receives a +.Dv SIGINFO +signal (see the +.Cm status +argument for +.Xr stty 1 ) , +then the current filename as well as the old and new flags are displayed. .Sh EXIT STATUS .Ex -std .Sh SEE ALSO Modified: head/bin/chflags/chflags.c ============================================================================== --- head/bin/chflags/chflags.c Tue Mar 6 23:58:53 2018 (r330560) +++ head/bin/chflags/chflags.c Wed Mar 7 01:55:38 2018 (r330561) @@ -51,13 +51,23 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +static volatile sig_atomic_t siginfo; + static void usage(void); +static void +siginfo_handler(int sig __unused) +{ + + siginfo = 1; +} + int main(int argc, char *argv[]) { @@ -108,6 +118,8 @@ main(int argc, char *argv[]) if (argc < 2) usage(); + (void)signal(SIGINFO, siginfo_handler); + if (Rflag) { if (hflag) errx(1, "the -R and -h options may not be " @@ -188,13 +200,14 @@ main(int argc, char *argv[]) atflag) == -1 && !fflag) { warn("%s", p->fts_path); rval = 1; - } else if (vflag) { + } else if (vflag || siginfo) { (void)printf("%s", p->fts_path); - if (vflag > 1) + if (vflag > 1 || siginfo) (void)printf(": 0%lo -> 0%lo", (u_long)p->fts_statp->st_flags, newflags); (void)printf("\n"); + siginfo = 0; } } if (errno) From owner-svn-src-all@freebsd.org Wed Mar 7 01:55:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14BF9F437DF; Wed, 7 Mar 2018 01:55:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC746767DA; Wed, 7 Mar 2018 01:55:50 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6F2E1B03F; Wed, 7 Mar 2018 01:55:50 +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 w271toP9067627; Wed, 7 Mar 2018 01:55:50 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w271toiB067626; Wed, 7 Mar 2018 01:55:50 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803070155.w271toiB067626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 7 Mar 2018 01:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330562 - head/sys/geom/part X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/geom/part X-SVN-Commit-Revision: 330562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 01:55:51 -0000 Author: cem Date: Wed Mar 7 01:55:50 2018 New Revision: 330562 URL: https://svnweb.freebsd.org/changeset/base/330562 Log: g_part_gpt: Fix memory leak in error path If g_part_gpt_read() encountered a disk with bad primary and secondary tables, it could leak memory. Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/sys/geom/part/g_part_gpt.c Modified: head/sys/geom/part/g_part_gpt.c ============================================================================== --- head/sys/geom/part/g_part_gpt.c Wed Mar 7 01:55:38 2018 (r330561) +++ head/sys/geom/part/g_part_gpt.c Wed Mar 7 01:55:50 2018 (r330562) @@ -923,6 +923,14 @@ g_part_gpt_read(struct g_part_table *basetable, struct pp->name); printf("GEOM: %s: GPT rejected -- may not be recoverable.\n", pp->name); + if (prihdr != NULL) + g_free(prihdr); + if (pritbl != NULL) + g_free(pritbl); + if (sechdr != NULL) + g_free(sechdr); + if (sectbl != NULL) + g_free(sectbl); return (EINVAL); } From owner-svn-src-all@freebsd.org Wed Mar 7 02:47:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D9C5F46A16 for ; Wed, 7 Mar 2018 02:47:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22d.google.com (mail-yb0-x22d.google.com [IPv6:2607:f8b0:4002:c09::22d]) (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 AA8C6785BB for ; Wed, 7 Mar 2018 02:47:08 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22d.google.com with SMTP id j62-v6so259497ybc.12 for ; Tue, 06 Mar 2018 18:47:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6oN+JBcxkpZV7/Xe4wfB4DCR5eXpPI6pfGrnJRg8zrc=; b=k61MXBUCcCncdTs8rtllYJJcd+vmB8el3iKUWuJbS8yP9ojq47NV6hykJ0XGV4pI7M w3dcA2couGw1v9eJAPwBMIBGUbxYM8Pe1ZatFCfzT4kTMppEusmoBlZFizpXQRnGIl5D tAKZmJEj3Z6N1l/dQfI2wiWq08vtwhl6B53o0= 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=6oN+JBcxkpZV7/Xe4wfB4DCR5eXpPI6pfGrnJRg8zrc=; b=fKTkBy2Y6mq5wKl0ZWgGxKiJ2iCBDJnmcNbAZMmif/JgKOnTo6V6ZGSXxshTnIh5WT CotJpYZyRog8n+T1x1pUzxlp7JzjQrRA1KiCRcaKZ+1as8eGgXLSYsgk2rPAzhyVfX0l daOLjV/CVNFfYiWIRRUN0PLh2NVGHSjF1o6X9PKkCCfSJQvEcCwpjy6jGOmpeKBu/N9F lZcHQ04v5zD08ILT4ZDno2Vrx2pBKhAYYUKS2B4kFPmf5pgHrD7AM40CFdxrc6+WtkBg lgzRQ4mushtaJthvzhU+Aztp5GoRdl+X4W/maosbEWRzYhyeHEUDeaP0UlGLfD53IoeM vpdg== X-Gm-Message-State: APf1xPC0OfiuKTjqpt83GInw9a72O/+EFuTAAUGzgV4/PE/lYNsBcJwK PpXw0DlZmu2RzRax6DnjxRDgTeGGdIFVgJG39ubN0Q== X-Google-Smtp-Source: AG47ELuKh5jHIpu7ScNMIu5oDplzc0S3r5z02tuSAbW9IgEtLKu1YxRUO6KfDj00VxcmATqhuDq67cyZ+VkUdn23SXg= X-Received: by 2002:a25:6006:: with SMTP id u6-v6mr12826746ybb.460.1520390827854; Tue, 06 Mar 2018 18:47:07 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Tue, 6 Mar 2018 18:46:37 -0800 (PST) In-Reply-To: <6465173.s2nWvWCLOs@ralph.baldwin.cx> References: <201803050754.w257swAE001435@repo.freebsd.org> <1861296.ksaTdANMae@ralph.baldwin.cx> <6465173.s2nWvWCLOs@ralph.baldwin.cx> From: Eitan Adler Date: Tue, 6 Mar 2018 18:46:37 -0800 X-Google-Sender-Auth: prZXvM2EBngsO6jgR2YPKbdws9w Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 02:47:09 -0000 On 6 March 2018 at 08:26, John Baldwin wrote: > On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: >> On 5 March 2018 at 10:08, John Baldwin wrote: >> > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: >> >> Author: eadler >> >> Date: Mon Mar 5 07:54:57 2018 >> >> New Revision: 330451 >> >> URL: https://svnweb.freebsd.org/changeset/base/330451 >> >> >> >> Log: >> >> MFC r306837: >> >> >> >> [net80211] extend the ieee80211_rx_stats struct to include more information. >> > >> > Have you thought about the KBI implications of this change and some of the >> > other changes you've merged? >> >> I do have a copy of the modules from 11.1 and have loaded them at >> various points in time after merging. That said, I am not perfect. >> Unfortunately, my -STABLE box did not have fully functioning drivers >> before these changes so its difficult to test anything beyond "loads >> and does not panic.". I havn't done so today yet, but that will happen >> soon. >> >> Ensuring these things work through code inspection is certainly >> possible and I've skipped over several changes as a result. > > Loading a module doesn't alone doesn't actually test for breakage. I'm aware. In this case I should likely just revert this change since its a pretty blatant break. > It also tends to be a lot harder to find these > breakages in code one didn't write. This is true > I think for net80211 you need to generate a diff of all of the wireless > related changes you have MFC'd to stable/11 and then review that for ABI > changes and come up with a plan for how to restore the ABI and get re@'s > approval. (kib@ is a pretty good resource for devising ABI shims.) I'll take a look to see what else I broke / changed and either revert or write up a shim. Thanks! > Batching > up changes into a single diff is also helpful since if an API changes back > and forth in HEAD multiple times, collapsing them means that for stable you > may only need a single compat shim rather than several. Understood. My intention in doing them one-by-one was to make it easier to bisect if something goes wrong. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Wed Mar 7 04:11:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C41C9F2638D; Wed, 7 Mar 2018 04:11:14 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 797897B7F2; Wed, 7 Mar 2018 04:11:14 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 747041C6AE; Wed, 7 Mar 2018 04:11:14 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w274BE47037742; Wed, 7 Mar 2018 04:11:14 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w274BEji037741; Wed, 7 Mar 2018 04:11:14 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803070411.w274BEji037741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 7 Mar 2018 04:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330564 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 04:11:14 -0000 Author: kevans Date: Wed Mar 7 04:11:14 2018 New Revision: 330564 URL: https://svnweb.freebsd.org/changeset/base/330564 Log: lualoader: Only loadelf before boot/autoboot if no kernel loaded Back when I "fixed" the loading of kernel/modules to be deferred until booting, I inadvertently broke the ability to manually load a set of kernels and modules in case of something bad having happened. lualoader would instead happily load whatever is specified in loader.conf(5) and go about the boot, leading to a panic loop as you try to rediscover a way to stop the panicky efirt module from loading and fail miserably. Reported by: me, sadly Modified: head/stand/lua/core.lua Modified: head/stand/lua/core.lua ============================================================================== --- head/stand/lua/core.lua Wed Mar 7 03:54:38 2018 (r330563) +++ head/stand/lua/core.lua Wed Mar 7 04:11:14 2018 (r330564) @@ -240,12 +240,18 @@ function core.setDefaults() end function core.autoboot(argstr) - config.loadelf() + -- loadelf() only if we've not already loaded a kernel + if loader.getenv("kernelname") == nil then + config.loadelf() + end loader.perform(composeLoaderCmd("autoboot", argstr)) end function core.boot(argstr) - config.loadelf() + -- loadelf() only if we've not already loaded a kernel + if loader.getenv("kernelname") == nil then + config.loadelf() + end loader.perform(composeLoaderCmd("boot", argstr)) end From owner-svn-src-all@freebsd.org Wed Mar 7 05:47:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98D7FF2E5F0; Wed, 7 Mar 2018 05:47:49 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 328857EFB5; Wed, 7 Mar 2018 05:47:49 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 278701D5A9; Wed, 7 Mar 2018 05:47:49 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w275lmjK083355; Wed, 7 Mar 2018 05:47:48 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w275lm2e083354; Wed, 7 Mar 2018 05:47:48 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803070547.w275lm2e083354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 7 Mar 2018 05:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330565 - stable/10/sys/netipsec X-SVN-Group: stable-10 X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: stable/10/sys/netipsec X-SVN-Commit-Revision: 330565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 05:47:49 -0000 Author: gordon Date: Wed Mar 7 05:47:48 2018 New Revision: 330565 URL: https://svnweb.freebsd.org/changeset/base/330565 Log: Port r329561 to stable/10. There were structural changes preventing MFC. Check packet length to not make an out of bounds access. Also, save ah_nxt value to use later, since the ah pointer can become invalid. Reviewed by: ae@ Approved by: so Security: CVE-2018-6916 Security: FreeBSD-SA-18:01.ipsec Modified: stable/10/sys/netipsec/xform_ah.c Modified: stable/10/sys/netipsec/xform_ah.c ============================================================================== --- stable/10/sys/netipsec/xform_ah.c Wed Mar 7 04:11:14 2018 (r330564) +++ stable/10/sys/netipsec/xform_ah.c Wed Mar 7 05:47:48 2018 (r330565) @@ -599,6 +599,16 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski m_freem(m); return EACCES; } + if (skip + authsize + rplen > m->m_pkthdr.len) { + DPRINTF(("%s: bad mbuf length %u (expecting %lu)" + " for packet in SA %s/%08lx\n", __func__, + m->m_pkthdr.len, (u_long) (skip + authsize + rplen), + ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), + (u_long) ntohl(sav->spi))); + AHSTAT_INC(ahs_badauthl); + error = EACCES; + goto bad; + } AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl); /* Get crypto descriptors. */ @@ -664,6 +674,9 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski /* Zeroize the authenticator on the packet. */ m_copyback(m, skip + rplen, authsize, ipseczeroes); + /* Save ah_nxt, since ah pointer can become invalid after "massage" */ + hl = ah->ah_nxt; + /* "Massage" the packet headers for crypto processing. */ error = ah_massage_headers(&m, sav->sah->saidx.dst.sa.sa_family, skip, ahx->type, 0); @@ -688,7 +701,7 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski tc->tc_spi = sav->spi; tc->tc_dst = sav->sah->saidx.dst; tc->tc_proto = sav->sah->saidx.proto; - tc->tc_nxt = ah->ah_nxt; + tc->tc_nxt = hl; tc->tc_protoff = protoff; tc->tc_skip = skip; tc->tc_ptr = (caddr_t) mtag; /* Save the mtag we've identified. */ From owner-svn-src-all@freebsd.org Wed Mar 7 05:53:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED01CF2EA3F; Wed, 7 Mar 2018 05:53:36 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 980D17F445; Wed, 7 Mar 2018 05:53:36 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92F151D760; Wed, 7 Mar 2018 05:53:36 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w275ralB087948; Wed, 7 Mar 2018 05:53:36 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w275rZaw087939; Wed, 7 Mar 2018 05:53:35 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803070553.w275rZaw087939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 7 Mar 2018 05:53:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r330566 - in releng: 10.3 10.3/sys/conf 10.3/sys/netipsec 10.4 10.4/sys/conf 10.4/sys/netipsec 11.1 11.1/sys/conf 11.1/sys/netipsec X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 10.3 10.3/sys/conf 10.3/sys/netipsec 10.4 10.4/sys/conf 10.4/sys/netipsec 11.1 11.1/sys/conf 11.1/sys/netipsec X-SVN-Commit-Revision: 330566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 05:53:37 -0000 Author: gordon Date: Wed Mar 7 05:53:35 2018 New Revision: 330566 URL: https://svnweb.freebsd.org/changeset/base/330566 Log: Fix ipsec validation and use-after-free. [SA-18:01.ipsec] Approved by: so Security: FreeBSD-SA-18:01.ipsec Security: CVE-2018-6916 Modified: releng/10.3/UPDATING releng/10.3/sys/conf/newvers.sh releng/10.3/sys/netipsec/xform_ah.c releng/10.4/UPDATING releng/10.4/sys/conf/newvers.sh releng/10.4/sys/netipsec/xform_ah.c releng/11.1/UPDATING releng/11.1/sys/conf/newvers.sh releng/11.1/sys/netipsec/xform_ah.c Modified: releng/10.3/UPDATING ============================================================================== --- releng/10.3/UPDATING Wed Mar 7 05:47:48 2018 (r330565) +++ releng/10.3/UPDATING Wed Mar 7 05:53:35 2018 (r330566) @@ -16,6 +16,19 @@ from older versions of FreeBSD, try WITHOUT_CLANG to b stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20180307 p27 FreeBSD-SA-18:01.ipsec + FreeBSD-SA-18:02.ntp + FreeBSD-EN-18:01.tzdata + FreeBSD-EN-18:02.file + + Fix ipsec validation and use-after-free. [SA-18:01.ipsec] + + Fix multiple vulnerabilities in ntp. [SA-18:02.ntp] + + Update timezone database information. [EN-18:01.tzdata] + + Update file(1) to new version with security update. [EN-18:02.file] + 20171209 p26 FreeBSD-SA-17:12.openssl Fix OpenSSL error state vulnerability. Modified: releng/10.3/sys/conf/newvers.sh ============================================================================== --- releng/10.3/sys/conf/newvers.sh Wed Mar 7 05:47:48 2018 (r330565) +++ releng/10.3/sys/conf/newvers.sh Wed Mar 7 05:53:35 2018 (r330566) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="RELEASE-p26" +BRANCH="RELEASE-p27" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.3/sys/netipsec/xform_ah.c ============================================================================== --- releng/10.3/sys/netipsec/xform_ah.c Wed Mar 7 05:47:48 2018 (r330565) +++ releng/10.3/sys/netipsec/xform_ah.c Wed Mar 7 05:53:35 2018 (r330566) @@ -615,6 +615,16 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski m_freem(m); return EACCES; } + if (skip + authsize + rplen > m->m_pkthdr.len) { + DPRINTF(("%s: bad mbuf length %u (expecting %lu)" + " for packet in SA %s/%08lx\n", __func__, + m->m_pkthdr.len, (u_long) (skip + authsize + rplen), + ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), + (u_long) ntohl(sav->spi))); + AHSTAT_INC(ahs_badauthl); + error = EACCES; + goto bad; + } AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl); /* Get crypto descriptors. */ @@ -680,6 +690,9 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski /* Zeroize the authenticator on the packet. */ m_copyback(m, skip + rplen, authsize, ipseczeroes); + /* Save ah_nxt, since ah pointer can become invalid after "massage" */ + hl = ah->ah_nxt; + /* "Massage" the packet headers for crypto processing. */ error = ah_massage_headers(&m, sav->sah->saidx.dst.sa.sa_family, skip, ahx->type, 0); @@ -704,7 +717,7 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski tc->tc_spi = sav->spi; tc->tc_dst = sav->sah->saidx.dst; tc->tc_proto = sav->sah->saidx.proto; - tc->tc_nxt = ah->ah_nxt; + tc->tc_nxt = hl; tc->tc_protoff = protoff; tc->tc_skip = skip; tc->tc_ptr = (caddr_t) mtag; /* Save the mtag we've identified. */ Modified: releng/10.4/UPDATING ============================================================================== --- releng/10.4/UPDATING Wed Mar 7 05:47:48 2018 (r330565) +++ releng/10.4/UPDATING Wed Mar 7 05:53:35 2018 (r330566) @@ -16,6 +16,19 @@ from older versions of FreeBSD, try WITHOUT_CLANG to b stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20180307 p6 FreeBSD-SA-18:01.ipsec + FreeBSD-SA-18:02.ntp + FreeBSD-EN-18:01.tzdata + FreeBSD-EN-18:02.file + + Fix ipsec validation and use-after-free. [SA-18:01.ipsec] + + Fix multiple vulnerabilities in ntp. [SA-18:02.ntp] + + Update timezone database information. [EN-18:01.tzdata] + + Update file(1) to new version with security update. [EN-18:02.file] + 20171209 p5 FreeBSD-SA-17:12.openssl Fix OpenSSL error state vulnerability. Modified: releng/10.4/sys/conf/newvers.sh ============================================================================== --- releng/10.4/sys/conf/newvers.sh Wed Mar 7 05:47:48 2018 (r330565) +++ releng/10.4/sys/conf/newvers.sh Wed Mar 7 05:53:35 2018 (r330566) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.4" -BRANCH="RELEASE-p5" +BRANCH="RELEASE-p6" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.4/sys/netipsec/xform_ah.c ============================================================================== --- releng/10.4/sys/netipsec/xform_ah.c Wed Mar 7 05:47:48 2018 (r330565) +++ releng/10.4/sys/netipsec/xform_ah.c Wed Mar 7 05:53:35 2018 (r330566) @@ -615,6 +615,16 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski m_freem(m); return EACCES; } + if (skip + authsize + rplen > m->m_pkthdr.len) { + DPRINTF(("%s: bad mbuf length %u (expecting %lu)" + " for packet in SA %s/%08lx\n", __func__, + m->m_pkthdr.len, (u_long) (skip + authsize + rplen), + ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), + (u_long) ntohl(sav->spi))); + AHSTAT_INC(ahs_badauthl); + error = EACCES; + goto bad; + } AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl); /* Get crypto descriptors. */ @@ -680,6 +690,9 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski /* Zeroize the authenticator on the packet. */ m_copyback(m, skip + rplen, authsize, ipseczeroes); + /* Save ah_nxt, since ah pointer can become invalid after "massage" */ + hl = ah->ah_nxt; + /* "Massage" the packet headers for crypto processing. */ error = ah_massage_headers(&m, sav->sah->saidx.dst.sa.sa_family, skip, ahx->type, 0); @@ -704,7 +717,7 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski tc->tc_spi = sav->spi; tc->tc_dst = sav->sah->saidx.dst; tc->tc_proto = sav->sah->saidx.proto; - tc->tc_nxt = ah->ah_nxt; + tc->tc_nxt = hl; tc->tc_protoff = protoff; tc->tc_skip = skip; tc->tc_ptr = (caddr_t) mtag; /* Save the mtag we've identified. */ Modified: releng/11.1/UPDATING ============================================================================== --- releng/11.1/UPDATING Wed Mar 7 05:47:48 2018 (r330565) +++ releng/11.1/UPDATING Wed Mar 7 05:53:35 2018 (r330566) @@ -16,6 +16,19 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20180307 p7 FreeBSD-SA-18:01.ipsec + FreeBSD-SA-18:02.ntp + FreeBSD-EN-18:01.tzdata + FreeBSD-EN-18:02.file + + Fix ipsec validation and use-after-free. [SA-18:01.ipsec] + + Fix multiple vulnerabilities in ntp. [SA-18:02.ntp] + + Update timezone database information. [EN-18:01.tzdata] + + Update file(1) to new version with security update. [EN-18:02.file] + 20171209 p6 FreeBSD-SA-17:12.openssl Fix multiple vulnerabilities of OpenSSL. Modified: releng/11.1/sys/conf/newvers.sh ============================================================================== --- releng/11.1/sys/conf/newvers.sh Wed Mar 7 05:47:48 2018 (r330565) +++ releng/11.1/sys/conf/newvers.sh Wed Mar 7 05:53:35 2018 (r330566) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.1" -BRANCH="RELEASE-p6" +BRANCH="RELEASE-p7" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/11.1/sys/netipsec/xform_ah.c ============================================================================== --- releng/11.1/sys/netipsec/xform_ah.c Wed Mar 7 05:47:48 2018 (r330565) +++ releng/11.1/sys/netipsec/xform_ah.c Wed Mar 7 05:53:35 2018 (r330566) @@ -598,6 +598,16 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski error = EACCES; goto bad; } + if (skip + authsize + rplen > m->m_pkthdr.len) { + DPRINTF(("%s: bad mbuf length %u (expecting %lu)" + " for packet in SA %s/%08lx\n", __func__, + m->m_pkthdr.len, (u_long) (skip + authsize + rplen), + ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), + (u_long) ntohl(sav->spi))); + AHSTAT_INC(ahs_badauthl); + error = EACCES; + goto bad; + } AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl); /* Get crypto descriptors. */ @@ -642,6 +652,9 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski /* Zeroize the authenticator on the packet. */ m_copyback(m, skip + rplen, authsize, ipseczeroes); + /* Save ah_nxt, since ah pointer can become invalid after "massage" */ + hl = ah->ah_nxt; + /* "Massage" the packet headers for crypto processing. */ error = ah_massage_headers(&m, sav->sah->saidx.dst.sa.sa_family, skip, ahx->type, 0); @@ -664,7 +677,7 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski /* These are passed as-is to the callback. */ xd->sav = sav; - xd->nxt = ah->ah_nxt; + xd->nxt = hl; xd->protoff = protoff; xd->skip = skip; xd->cryptoid = cryptoid; From owner-svn-src-all@freebsd.org Wed Mar 7 05:58:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 165DFF2ECA4; Wed, 7 Mar 2018 05:58:28 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6E897F636; Wed, 7 Mar 2018 05:58:27 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD5951D765; Wed, 7 Mar 2018 05:58:27 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w275wRSu088177; Wed, 7 Mar 2018 05:58:27 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w275wPGe088165; Wed, 7 Mar 2018 05:58:25 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803070558.w275wPGe088165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 7 Mar 2018 05:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r330567 - in releng: 10.3/contrib/ntp 10.3/contrib/ntp/adjtimed 10.3/contrib/ntp/clockstuff 10.3/contrib/ntp/html 10.3/contrib/ntp/html/drivers 10.3/contrib/ntp/include 10.3/contrib/ntp... X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 10.3/contrib/ntp 10.3/contrib/ntp/adjtimed 10.3/contrib/ntp/clockstuff 10.3/contrib/ntp/html 10.3/contrib/ntp/html/drivers 10.3/contrib/ntp/include 10.3/contrib/ntp/include/isc 10.3/contrib... X-SVN-Commit-Revision: 330567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 05:58:28 -0000 Author: gordon Date: Wed Mar 7 05:58:24 2018 New Revision: 330567 URL: https://svnweb.freebsd.org/changeset/base/330567 Log: Fix multiple vulnerabilities in ntp. [SA-18:02.ntp] Approved by: so Security: FreeBSD-SA-18:02.ntp Security: CVE-2018-7182 Security: CVE-2018-7170 Security: CVE-2018-7184 Security: CVE-2018-7185 Security: CVE-2018-7183 Added: releng/10.3/contrib/ntp/sntp/harden/ releng/10.3/contrib/ntp/sntp/harden/README releng/10.3/contrib/ntp/sntp/harden/default releng/10.3/contrib/ntp/sntp/harden/freebsd10 releng/10.3/contrib/ntp/sntp/harden/freebsd11 releng/10.3/contrib/ntp/sntp/harden/freebsd12 releng/10.3/contrib/ntp/sntp/harden/linux releng/10.3/contrib/ntp/sntp/harden/netbsd7.0 releng/10.3/contrib/ntp/sntp/harden/netbsd7.99 releng/10.3/contrib/ntp/sntp/m4/ntp_af_unspec.m4 releng/10.3/contrib/ntp/sntp/m4/ntp_harden.m4 releng/10.3/contrib/ntp/sntp/scripts/genHardFlags releng/10.3/contrib/ntp/sntp/tests/testconf.yml releng/10.4/contrib/ntp/sntp/m4/ntp_af_unspec.m4 releng/10.4/contrib/ntp/sntp/tests/testconf.yml releng/11.1/contrib/ntp/sntp/m4/ntp_af_unspec.m4 releng/11.1/contrib/ntp/sntp/tests/testconf.yml Modified: releng/10.3/contrib/ntp/ChangeLog releng/10.3/contrib/ntp/Makefile.am releng/10.3/contrib/ntp/Makefile.in releng/10.3/contrib/ntp/NEWS releng/10.3/contrib/ntp/aclocal.m4 releng/10.3/contrib/ntp/adjtimed/Makefile.in releng/10.3/contrib/ntp/clockstuff/Makefile.in releng/10.3/contrib/ntp/configure releng/10.3/contrib/ntp/configure.ac releng/10.3/contrib/ntp/html/access.html releng/10.3/contrib/ntp/html/accopt.html releng/10.3/contrib/ntp/html/authentic.html releng/10.3/contrib/ntp/html/drivers/driver18.html releng/10.3/contrib/ntp/html/drivers/driver40.html releng/10.3/contrib/ntp/html/keygen.html releng/10.3/contrib/ntp/html/miscopt.html releng/10.3/contrib/ntp/html/monopt.html releng/10.3/contrib/ntp/html/ntpq.html releng/10.3/contrib/ntp/include/Makefile.in releng/10.3/contrib/ntp/include/isc/Makefile.in releng/10.3/contrib/ntp/include/ntp.h releng/10.3/contrib/ntp/include/ntp_calendar.h releng/10.3/contrib/ntp/include/ntp_config.h releng/10.3/contrib/ntp/include/ntp_fp.h releng/10.3/contrib/ntp/include/ntp_keyacc.h releng/10.3/contrib/ntp/include/ntp_request.h releng/10.3/contrib/ntp/include/ntp_stdlib.h releng/10.3/contrib/ntp/include/ntpd.h releng/10.3/contrib/ntp/include/recvbuff.h releng/10.3/contrib/ntp/include/ssl_applink.c releng/10.3/contrib/ntp/kernel/Makefile.in releng/10.3/contrib/ntp/kernel/sys/Makefile.in releng/10.3/contrib/ntp/libntp/Makefile.in releng/10.3/contrib/ntp/libntp/a_md5encrypt.c releng/10.3/contrib/ntp/libntp/adjtime.c releng/10.3/contrib/ntp/libntp/authkeys.c releng/10.3/contrib/ntp/libntp/authreadkeys.c releng/10.3/contrib/ntp/libntp/libssl_compat.c releng/10.3/contrib/ntp/libntp/ntp_calendar.c releng/10.3/contrib/ntp/libntp/ssl_init.c releng/10.3/contrib/ntp/libntp/statestr.c releng/10.3/contrib/ntp/libntp/systime.c releng/10.3/contrib/ntp/libntp/work_thread.c releng/10.3/contrib/ntp/libparse/Makefile.in releng/10.3/contrib/ntp/ntpd/Makefile.in releng/10.3/contrib/ntp/ntpd/complete.conf.in releng/10.3/contrib/ntp/ntpd/invoke-ntp.conf.texi releng/10.3/contrib/ntp/ntpd/invoke-ntp.keys.texi releng/10.3/contrib/ntp/ntpd/invoke-ntpd.texi releng/10.3/contrib/ntp/ntpd/keyword-gen-utd releng/10.3/contrib/ntp/ntpd/keyword-gen.c releng/10.3/contrib/ntp/ntpd/ntp.conf.5man releng/10.3/contrib/ntp/ntpd/ntp.conf.5mdoc releng/10.3/contrib/ntp/ntpd/ntp.conf.def releng/10.3/contrib/ntp/ntpd/ntp.conf.html releng/10.3/contrib/ntp/ntpd/ntp.conf.man.in releng/10.3/contrib/ntp/ntpd/ntp.conf.mdoc.in releng/10.3/contrib/ntp/ntpd/ntp.keys.5man releng/10.3/contrib/ntp/ntpd/ntp.keys.5mdoc releng/10.3/contrib/ntp/ntpd/ntp.keys.def releng/10.3/contrib/ntp/ntpd/ntp.keys.html releng/10.3/contrib/ntp/ntpd/ntp.keys.man.in releng/10.3/contrib/ntp/ntpd/ntp.keys.mdoc.in releng/10.3/contrib/ntp/ntpd/ntp_config.c releng/10.3/contrib/ntp/ntpd/ntp_control.c releng/10.3/contrib/ntp/ntpd/ntp_crypto.c releng/10.3/contrib/ntp/ntpd/ntp_io.c releng/10.3/contrib/ntp/ntpd/ntp_keyword.h releng/10.3/contrib/ntp/ntpd/ntp_leapsec.c releng/10.3/contrib/ntp/ntpd/ntp_parser.c releng/10.3/contrib/ntp/ntpd/ntp_parser.h releng/10.3/contrib/ntp/ntpd/ntp_peer.c releng/10.3/contrib/ntp/ntpd/ntp_proto.c releng/10.3/contrib/ntp/ntpd/ntp_refclock.c releng/10.3/contrib/ntp/ntpd/ntp_request.c releng/10.3/contrib/ntp/ntpd/ntp_restrict.c releng/10.3/contrib/ntp/ntpd/ntp_scanner.c releng/10.3/contrib/ntp/ntpd/ntp_util.c releng/10.3/contrib/ntp/ntpd/ntpd-opts.c releng/10.3/contrib/ntp/ntpd/ntpd-opts.h releng/10.3/contrib/ntp/ntpd/ntpd.1ntpdman releng/10.3/contrib/ntp/ntpd/ntpd.1ntpdmdoc releng/10.3/contrib/ntp/ntpd/ntpd.c releng/10.3/contrib/ntp/ntpd/ntpd.html releng/10.3/contrib/ntp/ntpd/ntpd.man.in releng/10.3/contrib/ntp/ntpd/ntpd.mdoc.in releng/10.3/contrib/ntp/ntpd/ntpsim.c releng/10.3/contrib/ntp/ntpd/refclock_gpsdjson.c releng/10.3/contrib/ntp/ntpd/refclock_jjy.c releng/10.3/contrib/ntp/ntpd/refclock_palisade.c releng/10.3/contrib/ntp/ntpd/refclock_parse.c releng/10.3/contrib/ntp/ntpdate/Makefile.in releng/10.3/contrib/ntp/ntpdc/Makefile.in releng/10.3/contrib/ntp/ntpdc/invoke-ntpdc.texi releng/10.3/contrib/ntp/ntpdc/layout.std releng/10.3/contrib/ntp/ntpdc/ntpdc-opts.c releng/10.3/contrib/ntp/ntpdc/ntpdc-opts.h releng/10.3/contrib/ntp/ntpdc/ntpdc.1ntpdcman releng/10.3/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc releng/10.3/contrib/ntp/ntpdc/ntpdc.c releng/10.3/contrib/ntp/ntpdc/ntpdc.html releng/10.3/contrib/ntp/ntpdc/ntpdc.man.in releng/10.3/contrib/ntp/ntpdc/ntpdc.mdoc.in releng/10.3/contrib/ntp/ntpdc/ntpdc_ops.c releng/10.3/contrib/ntp/ntpq/Makefile.am releng/10.3/contrib/ntp/ntpq/Makefile.in releng/10.3/contrib/ntp/ntpq/invoke-ntpq.texi releng/10.3/contrib/ntp/ntpq/ntpq-opts.c releng/10.3/contrib/ntp/ntpq/ntpq-opts.def releng/10.3/contrib/ntp/ntpq/ntpq-opts.h releng/10.3/contrib/ntp/ntpq/ntpq-subs.c releng/10.3/contrib/ntp/ntpq/ntpq.1ntpqman releng/10.3/contrib/ntp/ntpq/ntpq.1ntpqmdoc releng/10.3/contrib/ntp/ntpq/ntpq.c releng/10.3/contrib/ntp/ntpq/ntpq.html releng/10.3/contrib/ntp/ntpq/ntpq.man.in releng/10.3/contrib/ntp/ntpq/ntpq.mdoc.in releng/10.3/contrib/ntp/ntpq/ntpq.texi releng/10.3/contrib/ntp/ntpsnmpd/Makefile.in releng/10.3/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi releng/10.3/contrib/ntp/ntpsnmpd/netsnmp_daemonize.c releng/10.3/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c releng/10.3/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h releng/10.3/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman releng/10.3/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc releng/10.3/contrib/ntp/ntpsnmpd/ntpsnmpd.html releng/10.3/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in releng/10.3/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in releng/10.3/contrib/ntp/packageinfo.sh releng/10.3/contrib/ntp/parseutil/Makefile.in releng/10.3/contrib/ntp/scripts/Makefile.in releng/10.3/contrib/ntp/scripts/build/Makefile.in releng/10.3/contrib/ntp/scripts/build/UpdatePoint releng/10.3/contrib/ntp/scripts/calc_tickadj/Makefile.in releng/10.3/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman releng/10.3/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc releng/10.3/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html releng/10.3/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in releng/10.3/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in releng/10.3/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi releng/10.3/contrib/ntp/scripts/invoke-plot_summary.texi releng/10.3/contrib/ntp/scripts/invoke-summary.texi releng/10.3/contrib/ntp/scripts/lib/Makefile.in releng/10.3/contrib/ntp/scripts/ntp-wait/Makefile.in releng/10.3/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi releng/10.3/contrib/ntp/scripts/ntp-wait/ntp-wait-opts releng/10.3/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman releng/10.3/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc releng/10.3/contrib/ntp/scripts/ntp-wait/ntp-wait.html releng/10.3/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in releng/10.3/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in releng/10.3/contrib/ntp/scripts/ntpsweep/Makefile.in releng/10.3/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi releng/10.3/contrib/ntp/scripts/ntpsweep/ntpsweep-opts releng/10.3/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman releng/10.3/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc releng/10.3/contrib/ntp/scripts/ntpsweep/ntpsweep.html releng/10.3/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in releng/10.3/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in releng/10.3/contrib/ntp/scripts/ntptrace/Makefile.in releng/10.3/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi releng/10.3/contrib/ntp/scripts/ntptrace/ntptrace-opts releng/10.3/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman releng/10.3/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc releng/10.3/contrib/ntp/scripts/ntptrace/ntptrace.html releng/10.3/contrib/ntp/scripts/ntptrace/ntptrace.man.in releng/10.3/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in releng/10.3/contrib/ntp/scripts/plot_summary-opts releng/10.3/contrib/ntp/scripts/plot_summary.1plot_summaryman releng/10.3/contrib/ntp/scripts/plot_summary.1plot_summarymdoc releng/10.3/contrib/ntp/scripts/plot_summary.html releng/10.3/contrib/ntp/scripts/plot_summary.man.in releng/10.3/contrib/ntp/scripts/plot_summary.mdoc.in releng/10.3/contrib/ntp/scripts/summary-opts releng/10.3/contrib/ntp/scripts/summary.1summaryman releng/10.3/contrib/ntp/scripts/summary.1summarymdoc releng/10.3/contrib/ntp/scripts/summary.html releng/10.3/contrib/ntp/scripts/summary.man.in releng/10.3/contrib/ntp/scripts/summary.mdoc.in releng/10.3/contrib/ntp/scripts/update-leap/Makefile.in releng/10.3/contrib/ntp/scripts/update-leap/invoke-update-leap.texi releng/10.3/contrib/ntp/scripts/update-leap/update-leap-opts releng/10.3/contrib/ntp/scripts/update-leap/update-leap.1update-leapman releng/10.3/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc releng/10.3/contrib/ntp/scripts/update-leap/update-leap.html releng/10.3/contrib/ntp/scripts/update-leap/update-leap.in releng/10.3/contrib/ntp/scripts/update-leap/update-leap.man.in releng/10.3/contrib/ntp/scripts/update-leap/update-leap.mdoc.in releng/10.3/contrib/ntp/sntp/Makefile.in releng/10.3/contrib/ntp/sntp/check-libntp.mf releng/10.3/contrib/ntp/sntp/configure releng/10.3/contrib/ntp/sntp/crypto.c releng/10.3/contrib/ntp/sntp/crypto.h releng/10.3/contrib/ntp/sntp/include/version.def releng/10.3/contrib/ntp/sntp/include/version.texi releng/10.3/contrib/ntp/sntp/invoke-sntp.texi releng/10.3/contrib/ntp/sntp/m4/ntp_libevent.m4 releng/10.3/contrib/ntp/sntp/m4/ntp_openssl.m4 releng/10.3/contrib/ntp/sntp/m4/version.m4 releng/10.3/contrib/ntp/sntp/main.c releng/10.3/contrib/ntp/sntp/networking.c releng/10.3/contrib/ntp/sntp/sntp-opts.c releng/10.3/contrib/ntp/sntp/sntp-opts.def releng/10.3/contrib/ntp/sntp/sntp-opts.h releng/10.3/contrib/ntp/sntp/sntp.1sntpman releng/10.3/contrib/ntp/sntp/sntp.1sntpmdoc releng/10.3/contrib/ntp/sntp/sntp.html releng/10.3/contrib/ntp/sntp/sntp.man.in releng/10.3/contrib/ntp/sntp/sntp.mdoc.in releng/10.3/contrib/ntp/sntp/tests/Makefile.am releng/10.3/contrib/ntp/sntp/tests/Makefile.in releng/10.3/contrib/ntp/sntp/tests/crypto.c releng/10.3/contrib/ntp/sntp/tests/keyFile.c releng/10.3/contrib/ntp/sntp/tests/packetHandling.c releng/10.3/contrib/ntp/sntp/tests/packetProcessing.c releng/10.3/contrib/ntp/sntp/tests/run-crypto.c releng/10.3/contrib/ntp/sntp/tests/run-keyFile.c releng/10.3/contrib/ntp/sntp/tests/run-kodDatabase.c releng/10.3/contrib/ntp/sntp/tests/run-kodFile.c releng/10.3/contrib/ntp/sntp/tests/run-networking.c releng/10.3/contrib/ntp/sntp/tests/run-packetHandling.c releng/10.3/contrib/ntp/sntp/tests/run-packetProcessing.c releng/10.3/contrib/ntp/sntp/tests/run-t-log.c releng/10.3/contrib/ntp/sntp/tests/run-utilities.c releng/10.3/contrib/ntp/sntp/unity/auto/generate_test_runner.rb releng/10.3/contrib/ntp/sntp/utilities.c releng/10.3/contrib/ntp/sntp/version.c releng/10.3/contrib/ntp/util/Makefile.in releng/10.3/contrib/ntp/util/invoke-ntp-keygen.texi releng/10.3/contrib/ntp/util/ntp-keygen-opts.c releng/10.3/contrib/ntp/util/ntp-keygen-opts.def releng/10.3/contrib/ntp/util/ntp-keygen-opts.h releng/10.3/contrib/ntp/util/ntp-keygen.1ntp-keygenman releng/10.3/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc releng/10.3/contrib/ntp/util/ntp-keygen.html releng/10.3/contrib/ntp/util/ntp-keygen.man.in releng/10.3/contrib/ntp/util/ntp-keygen.mdoc.in releng/10.3/usr.sbin/ntp/config.h releng/10.3/usr.sbin/ntp/doc/ntp-keygen.8 releng/10.3/usr.sbin/ntp/doc/ntp.conf.5 releng/10.3/usr.sbin/ntp/doc/ntp.keys.5 releng/10.3/usr.sbin/ntp/doc/ntpd.8 releng/10.3/usr.sbin/ntp/doc/ntpdc.8 releng/10.3/usr.sbin/ntp/doc/ntpq.8 releng/10.3/usr.sbin/ntp/doc/sntp.8 releng/10.3/usr.sbin/ntp/ntp-keygen/Makefile releng/10.3/usr.sbin/ntp/ntptime/Makefile releng/10.3/usr.sbin/ntp/scripts/mkver releng/10.3/usr.sbin/ntp/sntp/Makefile releng/10.4/contrib/ntp/ChangeLog releng/10.4/contrib/ntp/Makefile.am releng/10.4/contrib/ntp/Makefile.in releng/10.4/contrib/ntp/NEWS releng/10.4/contrib/ntp/aclocal.m4 releng/10.4/contrib/ntp/adjtimed/Makefile.in releng/10.4/contrib/ntp/clockstuff/Makefile.in releng/10.4/contrib/ntp/configure releng/10.4/contrib/ntp/configure.ac releng/10.4/contrib/ntp/html/access.html releng/10.4/contrib/ntp/html/accopt.html releng/10.4/contrib/ntp/html/authentic.html releng/10.4/contrib/ntp/html/drivers/driver18.html releng/10.4/contrib/ntp/html/drivers/driver40.html releng/10.4/contrib/ntp/html/keygen.html releng/10.4/contrib/ntp/html/miscopt.html releng/10.4/contrib/ntp/html/monopt.html releng/10.4/contrib/ntp/html/ntpq.html releng/10.4/contrib/ntp/include/Makefile.in releng/10.4/contrib/ntp/include/isc/Makefile.in releng/10.4/contrib/ntp/include/ntp.h releng/10.4/contrib/ntp/include/ntp_calendar.h releng/10.4/contrib/ntp/include/ntp_config.h releng/10.4/contrib/ntp/include/ntp_fp.h releng/10.4/contrib/ntp/include/ntp_keyacc.h releng/10.4/contrib/ntp/include/ntp_request.h releng/10.4/contrib/ntp/include/ntp_stdlib.h releng/10.4/contrib/ntp/include/ntpd.h releng/10.4/contrib/ntp/include/recvbuff.h releng/10.4/contrib/ntp/include/ssl_applink.c releng/10.4/contrib/ntp/kernel/Makefile.in releng/10.4/contrib/ntp/kernel/sys/Makefile.in releng/10.4/contrib/ntp/libntp/Makefile.in releng/10.4/contrib/ntp/libntp/a_md5encrypt.c releng/10.4/contrib/ntp/libntp/adjtime.c releng/10.4/contrib/ntp/libntp/authkeys.c releng/10.4/contrib/ntp/libntp/authreadkeys.c releng/10.4/contrib/ntp/libntp/libssl_compat.c releng/10.4/contrib/ntp/libntp/ntp_calendar.c releng/10.4/contrib/ntp/libntp/ssl_init.c releng/10.4/contrib/ntp/libntp/statestr.c releng/10.4/contrib/ntp/libntp/systime.c releng/10.4/contrib/ntp/libntp/work_thread.c releng/10.4/contrib/ntp/libparse/Makefile.in releng/10.4/contrib/ntp/ntpd/Makefile.in releng/10.4/contrib/ntp/ntpd/complete.conf.in releng/10.4/contrib/ntp/ntpd/invoke-ntp.conf.texi releng/10.4/contrib/ntp/ntpd/invoke-ntp.keys.texi releng/10.4/contrib/ntp/ntpd/invoke-ntpd.texi releng/10.4/contrib/ntp/ntpd/keyword-gen-utd releng/10.4/contrib/ntp/ntpd/keyword-gen.c releng/10.4/contrib/ntp/ntpd/ntp.conf.5man releng/10.4/contrib/ntp/ntpd/ntp.conf.5mdoc releng/10.4/contrib/ntp/ntpd/ntp.conf.def releng/10.4/contrib/ntp/ntpd/ntp.conf.html releng/10.4/contrib/ntp/ntpd/ntp.conf.man.in releng/10.4/contrib/ntp/ntpd/ntp.conf.mdoc.in releng/10.4/contrib/ntp/ntpd/ntp.keys.5man releng/10.4/contrib/ntp/ntpd/ntp.keys.5mdoc releng/10.4/contrib/ntp/ntpd/ntp.keys.def releng/10.4/contrib/ntp/ntpd/ntp.keys.html releng/10.4/contrib/ntp/ntpd/ntp.keys.man.in releng/10.4/contrib/ntp/ntpd/ntp.keys.mdoc.in releng/10.4/contrib/ntp/ntpd/ntp_config.c releng/10.4/contrib/ntp/ntpd/ntp_control.c releng/10.4/contrib/ntp/ntpd/ntp_crypto.c releng/10.4/contrib/ntp/ntpd/ntp_io.c releng/10.4/contrib/ntp/ntpd/ntp_keyword.h releng/10.4/contrib/ntp/ntpd/ntp_leapsec.c releng/10.4/contrib/ntp/ntpd/ntp_parser.c releng/10.4/contrib/ntp/ntpd/ntp_parser.h releng/10.4/contrib/ntp/ntpd/ntp_peer.c releng/10.4/contrib/ntp/ntpd/ntp_proto.c releng/10.4/contrib/ntp/ntpd/ntp_refclock.c releng/10.4/contrib/ntp/ntpd/ntp_request.c releng/10.4/contrib/ntp/ntpd/ntp_restrict.c releng/10.4/contrib/ntp/ntpd/ntp_scanner.c releng/10.4/contrib/ntp/ntpd/ntp_util.c releng/10.4/contrib/ntp/ntpd/ntpd-opts.c releng/10.4/contrib/ntp/ntpd/ntpd-opts.h releng/10.4/contrib/ntp/ntpd/ntpd.1ntpdman releng/10.4/contrib/ntp/ntpd/ntpd.1ntpdmdoc releng/10.4/contrib/ntp/ntpd/ntpd.c releng/10.4/contrib/ntp/ntpd/ntpd.html releng/10.4/contrib/ntp/ntpd/ntpd.man.in releng/10.4/contrib/ntp/ntpd/ntpd.mdoc.in releng/10.4/contrib/ntp/ntpd/ntpsim.c releng/10.4/contrib/ntp/ntpd/refclock_gpsdjson.c releng/10.4/contrib/ntp/ntpd/refclock_jjy.c releng/10.4/contrib/ntp/ntpd/refclock_palisade.c releng/10.4/contrib/ntp/ntpd/refclock_parse.c releng/10.4/contrib/ntp/ntpdate/Makefile.in releng/10.4/contrib/ntp/ntpdc/Makefile.in releng/10.4/contrib/ntp/ntpdc/invoke-ntpdc.texi releng/10.4/contrib/ntp/ntpdc/layout.std releng/10.4/contrib/ntp/ntpdc/ntpdc-opts.c releng/10.4/contrib/ntp/ntpdc/ntpdc-opts.h releng/10.4/contrib/ntp/ntpdc/ntpdc.1ntpdcman releng/10.4/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc releng/10.4/contrib/ntp/ntpdc/ntpdc.c releng/10.4/contrib/ntp/ntpdc/ntpdc.html releng/10.4/contrib/ntp/ntpdc/ntpdc.man.in releng/10.4/contrib/ntp/ntpdc/ntpdc.mdoc.in releng/10.4/contrib/ntp/ntpdc/ntpdc_ops.c releng/10.4/contrib/ntp/ntpq/Makefile.am releng/10.4/contrib/ntp/ntpq/Makefile.in releng/10.4/contrib/ntp/ntpq/invoke-ntpq.texi releng/10.4/contrib/ntp/ntpq/ntpq-opts.c releng/10.4/contrib/ntp/ntpq/ntpq-opts.def releng/10.4/contrib/ntp/ntpq/ntpq-opts.h releng/10.4/contrib/ntp/ntpq/ntpq-subs.c releng/10.4/contrib/ntp/ntpq/ntpq.1ntpqman releng/10.4/contrib/ntp/ntpq/ntpq.1ntpqmdoc releng/10.4/contrib/ntp/ntpq/ntpq.c releng/10.4/contrib/ntp/ntpq/ntpq.html releng/10.4/contrib/ntp/ntpq/ntpq.man.in releng/10.4/contrib/ntp/ntpq/ntpq.mdoc.in releng/10.4/contrib/ntp/ntpq/ntpq.texi releng/10.4/contrib/ntp/ntpsnmpd/Makefile.in releng/10.4/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi releng/10.4/contrib/ntp/ntpsnmpd/netsnmp_daemonize.c releng/10.4/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c releng/10.4/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h releng/10.4/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman releng/10.4/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc releng/10.4/contrib/ntp/ntpsnmpd/ntpsnmpd.html releng/10.4/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in releng/10.4/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in releng/10.4/contrib/ntp/packageinfo.sh releng/10.4/contrib/ntp/parseutil/Makefile.in releng/10.4/contrib/ntp/scripts/Makefile.in releng/10.4/contrib/ntp/scripts/build/Makefile.in releng/10.4/contrib/ntp/scripts/build/UpdatePoint releng/10.4/contrib/ntp/scripts/calc_tickadj/Makefile.in releng/10.4/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman releng/10.4/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc releng/10.4/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html releng/10.4/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in releng/10.4/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in releng/10.4/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi releng/10.4/contrib/ntp/scripts/invoke-plot_summary.texi releng/10.4/contrib/ntp/scripts/invoke-summary.texi releng/10.4/contrib/ntp/scripts/lib/Makefile.in releng/10.4/contrib/ntp/scripts/ntp-wait/Makefile.in releng/10.4/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi releng/10.4/contrib/ntp/scripts/ntp-wait/ntp-wait-opts releng/10.4/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman releng/10.4/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc releng/10.4/contrib/ntp/scripts/ntp-wait/ntp-wait.html releng/10.4/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in releng/10.4/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in releng/10.4/contrib/ntp/scripts/ntpsweep/Makefile.in releng/10.4/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi releng/10.4/contrib/ntp/scripts/ntpsweep/ntpsweep-opts releng/10.4/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman releng/10.4/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc releng/10.4/contrib/ntp/scripts/ntpsweep/ntpsweep.html releng/10.4/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in releng/10.4/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in releng/10.4/contrib/ntp/scripts/ntptrace/Makefile.in releng/10.4/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi releng/10.4/contrib/ntp/scripts/ntptrace/ntptrace-opts releng/10.4/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman releng/10.4/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc releng/10.4/contrib/ntp/scripts/ntptrace/ntptrace.html releng/10.4/contrib/ntp/scripts/ntptrace/ntptrace.man.in releng/10.4/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in releng/10.4/contrib/ntp/scripts/plot_summary-opts releng/10.4/contrib/ntp/scripts/plot_summary.1plot_summaryman releng/10.4/contrib/ntp/scripts/plot_summary.1plot_summarymdoc releng/10.4/contrib/ntp/scripts/plot_summary.html releng/10.4/contrib/ntp/scripts/plot_summary.man.in releng/10.4/contrib/ntp/scripts/plot_summary.mdoc.in releng/10.4/contrib/ntp/scripts/summary-opts releng/10.4/contrib/ntp/scripts/summary.1summaryman releng/10.4/contrib/ntp/scripts/summary.1summarymdoc releng/10.4/contrib/ntp/scripts/summary.html releng/10.4/contrib/ntp/scripts/summary.man.in releng/10.4/contrib/ntp/scripts/summary.mdoc.in releng/10.4/contrib/ntp/scripts/update-leap/Makefile.in releng/10.4/contrib/ntp/scripts/update-leap/invoke-update-leap.texi releng/10.4/contrib/ntp/scripts/update-leap/update-leap-opts releng/10.4/contrib/ntp/scripts/update-leap/update-leap.1update-leapman releng/10.4/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc releng/10.4/contrib/ntp/scripts/update-leap/update-leap.html releng/10.4/contrib/ntp/scripts/update-leap/update-leap.in releng/10.4/contrib/ntp/scripts/update-leap/update-leap.man.in releng/10.4/contrib/ntp/scripts/update-leap/update-leap.mdoc.in releng/10.4/contrib/ntp/sntp/Makefile.in releng/10.4/contrib/ntp/sntp/check-libntp.mf releng/10.4/contrib/ntp/sntp/configure releng/10.4/contrib/ntp/sntp/crypto.c releng/10.4/contrib/ntp/sntp/crypto.h releng/10.4/contrib/ntp/sntp/harden/linux releng/10.4/contrib/ntp/sntp/include/version.def releng/10.4/contrib/ntp/sntp/include/version.texi releng/10.4/contrib/ntp/sntp/invoke-sntp.texi releng/10.4/contrib/ntp/sntp/m4/ntp_harden.m4 releng/10.4/contrib/ntp/sntp/m4/ntp_libevent.m4 releng/10.4/contrib/ntp/sntp/m4/ntp_openssl.m4 releng/10.4/contrib/ntp/sntp/m4/version.m4 releng/10.4/contrib/ntp/sntp/main.c releng/10.4/contrib/ntp/sntp/networking.c releng/10.4/contrib/ntp/sntp/sntp-opts.c releng/10.4/contrib/ntp/sntp/sntp-opts.def releng/10.4/contrib/ntp/sntp/sntp-opts.h releng/10.4/contrib/ntp/sntp/sntp.1sntpman releng/10.4/contrib/ntp/sntp/sntp.1sntpmdoc releng/10.4/contrib/ntp/sntp/sntp.html releng/10.4/contrib/ntp/sntp/sntp.man.in releng/10.4/contrib/ntp/sntp/sntp.mdoc.in releng/10.4/contrib/ntp/sntp/tests/Makefile.am releng/10.4/contrib/ntp/sntp/tests/Makefile.in releng/10.4/contrib/ntp/sntp/tests/crypto.c releng/10.4/contrib/ntp/sntp/tests/keyFile.c releng/10.4/contrib/ntp/sntp/tests/packetHandling.c releng/10.4/contrib/ntp/sntp/tests/packetProcessing.c releng/10.4/contrib/ntp/sntp/tests/run-crypto.c releng/10.4/contrib/ntp/sntp/tests/run-keyFile.c releng/10.4/contrib/ntp/sntp/tests/run-kodDatabase.c releng/10.4/contrib/ntp/sntp/tests/run-kodFile.c releng/10.4/contrib/ntp/sntp/tests/run-networking.c releng/10.4/contrib/ntp/sntp/tests/run-packetHandling.c releng/10.4/contrib/ntp/sntp/tests/run-packetProcessing.c releng/10.4/contrib/ntp/sntp/tests/run-t-log.c releng/10.4/contrib/ntp/sntp/tests/run-utilities.c releng/10.4/contrib/ntp/sntp/unity/auto/generate_test_runner.rb releng/10.4/contrib/ntp/sntp/utilities.c releng/10.4/contrib/ntp/sntp/version.c releng/10.4/contrib/ntp/util/Makefile.in releng/10.4/contrib/ntp/util/invoke-ntp-keygen.texi releng/10.4/contrib/ntp/util/ntp-keygen-opts.c releng/10.4/contrib/ntp/util/ntp-keygen-opts.def releng/10.4/contrib/ntp/util/ntp-keygen-opts.h releng/10.4/contrib/ntp/util/ntp-keygen.1ntp-keygenman releng/10.4/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc releng/10.4/contrib/ntp/util/ntp-keygen.html releng/10.4/contrib/ntp/util/ntp-keygen.man.in releng/10.4/contrib/ntp/util/ntp-keygen.mdoc.in releng/10.4/usr.sbin/ntp/config.h releng/10.4/usr.sbin/ntp/doc/ntp-keygen.8 releng/10.4/usr.sbin/ntp/doc/ntp.conf.5 releng/10.4/usr.sbin/ntp/doc/ntp.keys.5 releng/10.4/usr.sbin/ntp/doc/ntpd.8 releng/10.4/usr.sbin/ntp/doc/ntpdc.8 releng/10.4/usr.sbin/ntp/doc/ntpq.8 releng/10.4/usr.sbin/ntp/doc/sntp.8 releng/10.4/usr.sbin/ntp/ntp-keygen/Makefile releng/10.4/usr.sbin/ntp/ntptime/Makefile releng/10.4/usr.sbin/ntp/scripts/mkver releng/11.1/contrib/ntp/ChangeLog releng/11.1/contrib/ntp/Makefile.am releng/11.1/contrib/ntp/Makefile.in releng/11.1/contrib/ntp/NEWS releng/11.1/contrib/ntp/aclocal.m4 releng/11.1/contrib/ntp/adjtimed/Makefile.in releng/11.1/contrib/ntp/clockstuff/Makefile.in releng/11.1/contrib/ntp/configure releng/11.1/contrib/ntp/configure.ac releng/11.1/contrib/ntp/html/access.html releng/11.1/contrib/ntp/html/accopt.html releng/11.1/contrib/ntp/html/authentic.html releng/11.1/contrib/ntp/html/drivers/driver18.html releng/11.1/contrib/ntp/html/drivers/driver40.html releng/11.1/contrib/ntp/html/keygen.html releng/11.1/contrib/ntp/html/miscopt.html releng/11.1/contrib/ntp/html/monopt.html releng/11.1/contrib/ntp/html/ntpq.html releng/11.1/contrib/ntp/include/Makefile.in releng/11.1/contrib/ntp/include/isc/Makefile.in releng/11.1/contrib/ntp/include/ntp.h releng/11.1/contrib/ntp/include/ntp_calendar.h releng/11.1/contrib/ntp/include/ntp_config.h releng/11.1/contrib/ntp/include/ntp_fp.h releng/11.1/contrib/ntp/include/ntp_keyacc.h releng/11.1/contrib/ntp/include/ntp_request.h releng/11.1/contrib/ntp/include/ntp_stdlib.h releng/11.1/contrib/ntp/include/ntpd.h releng/11.1/contrib/ntp/include/recvbuff.h releng/11.1/contrib/ntp/include/ssl_applink.c releng/11.1/contrib/ntp/kernel/Makefile.in releng/11.1/contrib/ntp/kernel/sys/Makefile.in releng/11.1/contrib/ntp/libntp/Makefile.in releng/11.1/contrib/ntp/libntp/a_md5encrypt.c releng/11.1/contrib/ntp/libntp/adjtime.c releng/11.1/contrib/ntp/libntp/authkeys.c releng/11.1/contrib/ntp/libntp/authreadkeys.c releng/11.1/contrib/ntp/libntp/libssl_compat.c releng/11.1/contrib/ntp/libntp/ntp_calendar.c releng/11.1/contrib/ntp/libntp/ssl_init.c releng/11.1/contrib/ntp/libntp/statestr.c releng/11.1/contrib/ntp/libntp/systime.c releng/11.1/contrib/ntp/libntp/work_thread.c releng/11.1/contrib/ntp/libparse/Makefile.in releng/11.1/contrib/ntp/ntpd/Makefile.in releng/11.1/contrib/ntp/ntpd/complete.conf.in releng/11.1/contrib/ntp/ntpd/invoke-ntp.conf.texi releng/11.1/contrib/ntp/ntpd/invoke-ntp.keys.texi releng/11.1/contrib/ntp/ntpd/invoke-ntpd.texi releng/11.1/contrib/ntp/ntpd/keyword-gen-utd releng/11.1/contrib/ntp/ntpd/keyword-gen.c releng/11.1/contrib/ntp/ntpd/ntp.conf.5man releng/11.1/contrib/ntp/ntpd/ntp.conf.5mdoc releng/11.1/contrib/ntp/ntpd/ntp.conf.def releng/11.1/contrib/ntp/ntpd/ntp.conf.html releng/11.1/contrib/ntp/ntpd/ntp.conf.man.in releng/11.1/contrib/ntp/ntpd/ntp.conf.mdoc.in releng/11.1/contrib/ntp/ntpd/ntp.keys.5man releng/11.1/contrib/ntp/ntpd/ntp.keys.5mdoc releng/11.1/contrib/ntp/ntpd/ntp.keys.def releng/11.1/contrib/ntp/ntpd/ntp.keys.html releng/11.1/contrib/ntp/ntpd/ntp.keys.man.in releng/11.1/contrib/ntp/ntpd/ntp.keys.mdoc.in releng/11.1/contrib/ntp/ntpd/ntp_config.c releng/11.1/contrib/ntp/ntpd/ntp_control.c releng/11.1/contrib/ntp/ntpd/ntp_crypto.c releng/11.1/contrib/ntp/ntpd/ntp_io.c releng/11.1/contrib/ntp/ntpd/ntp_keyword.h releng/11.1/contrib/ntp/ntpd/ntp_leapsec.c releng/11.1/contrib/ntp/ntpd/ntp_parser.c releng/11.1/contrib/ntp/ntpd/ntp_parser.h releng/11.1/contrib/ntp/ntpd/ntp_peer.c releng/11.1/contrib/ntp/ntpd/ntp_proto.c releng/11.1/contrib/ntp/ntpd/ntp_refclock.c releng/11.1/contrib/ntp/ntpd/ntp_request.c releng/11.1/contrib/ntp/ntpd/ntp_restrict.c releng/11.1/contrib/ntp/ntpd/ntp_scanner.c releng/11.1/contrib/ntp/ntpd/ntp_util.c releng/11.1/contrib/ntp/ntpd/ntpd-opts.c releng/11.1/contrib/ntp/ntpd/ntpd-opts.h releng/11.1/contrib/ntp/ntpd/ntpd.1ntpdman releng/11.1/contrib/ntp/ntpd/ntpd.1ntpdmdoc releng/11.1/contrib/ntp/ntpd/ntpd.c releng/11.1/contrib/ntp/ntpd/ntpd.html releng/11.1/contrib/ntp/ntpd/ntpd.man.in releng/11.1/contrib/ntp/ntpd/ntpd.mdoc.in releng/11.1/contrib/ntp/ntpd/ntpsim.c releng/11.1/contrib/ntp/ntpd/refclock_gpsdjson.c releng/11.1/contrib/ntp/ntpd/refclock_jjy.c releng/11.1/contrib/ntp/ntpd/refclock_palisade.c releng/11.1/contrib/ntp/ntpd/refclock_parse.c releng/11.1/contrib/ntp/ntpdate/Makefile.in releng/11.1/contrib/ntp/ntpdc/Makefile.in releng/11.1/contrib/ntp/ntpdc/invoke-ntpdc.texi releng/11.1/contrib/ntp/ntpdc/layout.std releng/11.1/contrib/ntp/ntpdc/ntpdc-opts.c releng/11.1/contrib/ntp/ntpdc/ntpdc-opts.h releng/11.1/contrib/ntp/ntpdc/ntpdc.1ntpdcman releng/11.1/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc releng/11.1/contrib/ntp/ntpdc/ntpdc.c releng/11.1/contrib/ntp/ntpdc/ntpdc.html releng/11.1/contrib/ntp/ntpdc/ntpdc.man.in releng/11.1/contrib/ntp/ntpdc/ntpdc.mdoc.in releng/11.1/contrib/ntp/ntpdc/ntpdc_ops.c releng/11.1/contrib/ntp/ntpq/Makefile.am releng/11.1/contrib/ntp/ntpq/Makefile.in releng/11.1/contrib/ntp/ntpq/invoke-ntpq.texi releng/11.1/contrib/ntp/ntpq/ntpq-opts.c releng/11.1/contrib/ntp/ntpq/ntpq-opts.def releng/11.1/contrib/ntp/ntpq/ntpq-opts.h releng/11.1/contrib/ntp/ntpq/ntpq-subs.c releng/11.1/contrib/ntp/ntpq/ntpq.1ntpqman releng/11.1/contrib/ntp/ntpq/ntpq.1ntpqmdoc releng/11.1/contrib/ntp/ntpq/ntpq.c releng/11.1/contrib/ntp/ntpq/ntpq.html releng/11.1/contrib/ntp/ntpq/ntpq.man.in releng/11.1/contrib/ntp/ntpq/ntpq.mdoc.in releng/11.1/contrib/ntp/ntpq/ntpq.texi releng/11.1/contrib/ntp/ntpsnmpd/Makefile.in releng/11.1/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi releng/11.1/contrib/ntp/ntpsnmpd/netsnmp_daemonize.c releng/11.1/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c releng/11.1/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h releng/11.1/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman releng/11.1/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc releng/11.1/contrib/ntp/ntpsnmpd/ntpsnmpd.html releng/11.1/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in releng/11.1/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in releng/11.1/contrib/ntp/packageinfo.sh releng/11.1/contrib/ntp/parseutil/Makefile.in releng/11.1/contrib/ntp/scripts/Makefile.in releng/11.1/contrib/ntp/scripts/build/Makefile.in releng/11.1/contrib/ntp/scripts/build/UpdatePoint releng/11.1/contrib/ntp/scripts/calc_tickadj/Makefile.in releng/11.1/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman releng/11.1/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc releng/11.1/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html releng/11.1/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in releng/11.1/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in releng/11.1/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi releng/11.1/contrib/ntp/scripts/invoke-plot_summary.texi releng/11.1/contrib/ntp/scripts/invoke-summary.texi releng/11.1/contrib/ntp/scripts/lib/Makefile.in releng/11.1/contrib/ntp/scripts/ntp-wait/Makefile.in releng/11.1/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi releng/11.1/contrib/ntp/scripts/ntp-wait/ntp-wait-opts releng/11.1/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman releng/11.1/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc releng/11.1/contrib/ntp/scripts/ntp-wait/ntp-wait.html releng/11.1/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in releng/11.1/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in releng/11.1/contrib/ntp/scripts/ntpsweep/Makefile.in releng/11.1/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi releng/11.1/contrib/ntp/scripts/ntpsweep/ntpsweep-opts releng/11.1/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman releng/11.1/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc releng/11.1/contrib/ntp/scripts/ntpsweep/ntpsweep.html releng/11.1/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in releng/11.1/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in releng/11.1/contrib/ntp/scripts/ntptrace/Makefile.in releng/11.1/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi releng/11.1/contrib/ntp/scripts/ntptrace/ntptrace-opts releng/11.1/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman releng/11.1/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc releng/11.1/contrib/ntp/scripts/ntptrace/ntptrace.html releng/11.1/contrib/ntp/scripts/ntptrace/ntptrace.man.in releng/11.1/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in releng/11.1/contrib/ntp/scripts/plot_summary-opts releng/11.1/contrib/ntp/scripts/plot_summary.1plot_summaryman releng/11.1/contrib/ntp/scripts/plot_summary.1plot_summarymdoc releng/11.1/contrib/ntp/scripts/plot_summary.html releng/11.1/contrib/ntp/scripts/plot_summary.man.in releng/11.1/contrib/ntp/scripts/plot_summary.mdoc.in releng/11.1/contrib/ntp/scripts/summary-opts releng/11.1/contrib/ntp/scripts/summary.1summaryman releng/11.1/contrib/ntp/scripts/summary.1summarymdoc releng/11.1/contrib/ntp/scripts/summary.html releng/11.1/contrib/ntp/scripts/summary.man.in releng/11.1/contrib/ntp/scripts/summary.mdoc.in releng/11.1/contrib/ntp/scripts/update-leap/Makefile.in releng/11.1/contrib/ntp/scripts/update-leap/invoke-update-leap.texi releng/11.1/contrib/ntp/scripts/update-leap/update-leap-opts releng/11.1/contrib/ntp/scripts/update-leap/update-leap.1update-leapman releng/11.1/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc releng/11.1/contrib/ntp/scripts/update-leap/update-leap.html releng/11.1/contrib/ntp/scripts/update-leap/update-leap.in releng/11.1/contrib/ntp/scripts/update-leap/update-leap.man.in releng/11.1/contrib/ntp/scripts/update-leap/update-leap.mdoc.in releng/11.1/contrib/ntp/sntp/Makefile.in releng/11.1/contrib/ntp/sntp/check-libntp.mf releng/11.1/contrib/ntp/sntp/configure releng/11.1/contrib/ntp/sntp/crypto.c releng/11.1/contrib/ntp/sntp/crypto.h releng/11.1/contrib/ntp/sntp/harden/linux releng/11.1/contrib/ntp/sntp/include/version.def releng/11.1/contrib/ntp/sntp/include/version.texi releng/11.1/contrib/ntp/sntp/invoke-sntp.texi releng/11.1/contrib/ntp/sntp/m4/ntp_harden.m4 releng/11.1/contrib/ntp/sntp/m4/ntp_libevent.m4 releng/11.1/contrib/ntp/sntp/m4/ntp_openssl.m4 releng/11.1/contrib/ntp/sntp/m4/version.m4 releng/11.1/contrib/ntp/sntp/main.c releng/11.1/contrib/ntp/sntp/networking.c releng/11.1/contrib/ntp/sntp/sntp-opts.c releng/11.1/contrib/ntp/sntp/sntp-opts.def releng/11.1/contrib/ntp/sntp/sntp-opts.h releng/11.1/contrib/ntp/sntp/sntp.1sntpman releng/11.1/contrib/ntp/sntp/sntp.1sntpmdoc releng/11.1/contrib/ntp/sntp/sntp.html releng/11.1/contrib/ntp/sntp/sntp.man.in releng/11.1/contrib/ntp/sntp/sntp.mdoc.in releng/11.1/contrib/ntp/sntp/tests/Makefile.am releng/11.1/contrib/ntp/sntp/tests/Makefile.in releng/11.1/contrib/ntp/sntp/tests/crypto.c releng/11.1/contrib/ntp/sntp/tests/keyFile.c releng/11.1/contrib/ntp/sntp/tests/packetHandling.c releng/11.1/contrib/ntp/sntp/tests/packetProcessing.c releng/11.1/contrib/ntp/sntp/tests/run-crypto.c releng/11.1/contrib/ntp/sntp/tests/run-keyFile.c releng/11.1/contrib/ntp/sntp/tests/run-kodDatabase.c releng/11.1/contrib/ntp/sntp/tests/run-kodFile.c releng/11.1/contrib/ntp/sntp/tests/run-networking.c releng/11.1/contrib/ntp/sntp/tests/run-packetHandling.c releng/11.1/contrib/ntp/sntp/tests/run-packetProcessing.c releng/11.1/contrib/ntp/sntp/tests/run-t-log.c releng/11.1/contrib/ntp/sntp/tests/run-utilities.c releng/11.1/contrib/ntp/sntp/unity/auto/generate_test_runner.rb releng/11.1/contrib/ntp/sntp/utilities.c releng/11.1/contrib/ntp/sntp/version.c releng/11.1/contrib/ntp/util/Makefile.in releng/11.1/contrib/ntp/util/invoke-ntp-keygen.texi releng/11.1/contrib/ntp/util/ntp-keygen-opts.c releng/11.1/contrib/ntp/util/ntp-keygen-opts.def releng/11.1/contrib/ntp/util/ntp-keygen-opts.h releng/11.1/contrib/ntp/util/ntp-keygen.1ntp-keygenman releng/11.1/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc releng/11.1/contrib/ntp/util/ntp-keygen.html releng/11.1/contrib/ntp/util/ntp-keygen.man.in releng/11.1/contrib/ntp/util/ntp-keygen.mdoc.in releng/11.1/usr.sbin/ntp/config.h releng/11.1/usr.sbin/ntp/doc/ntp-keygen.8 releng/11.1/usr.sbin/ntp/doc/ntp.conf.5 releng/11.1/usr.sbin/ntp/doc/ntp.keys.5 releng/11.1/usr.sbin/ntp/doc/ntpd.8 releng/11.1/usr.sbin/ntp/doc/ntpdc.8 releng/11.1/usr.sbin/ntp/doc/ntpq.8 releng/11.1/usr.sbin/ntp/doc/sntp.8 releng/11.1/usr.sbin/ntp/ntp-keygen/Makefile releng/11.1/usr.sbin/ntp/ntptime/Makefile releng/11.1/usr.sbin/ntp/scripts/mkver Modified: releng/10.3/contrib/ntp/ChangeLog ============================================================================== --- releng/10.3/contrib/ntp/ChangeLog Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/ChangeLog Wed Mar 7 05:58:24 2018 (r330567) @@ -1,6 +1,107 @@ --- -(4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn -(4.2.8p10) + +* [Sec 3454] Unauthenticated packet can reset authenticated interleave + associations. HStenn. +* [Sec 3453] Interleaved symmetric mode cannot recover from bad state. HStenn. +* [Sec 3415] Permit blocking authenticated symmetric/passive associations. + Implement ippeerlimit. HStenn, JPerlinger. +* [Sec 3414] ntpq: decodearr() can write beyond its 'buf' limits + - initial patch by , extended by +* [Sec 3412] ctl_getitem(): Don't compare names past NUL. +* [Sec 3012] Sybil vulnerability: noepeer support. HStenn, JPerlinger. +* [Bug 3457] OpenSSL FIPS mode regression +* [Bug 3455] ntpd doesn't use scope id when binding multicast + - applied patch by Sean Haugh +* [Bug 3452] PARSE driver prints uninitialized memory. +* [Bug 3450] Dubious error messages from plausibility checks in get_systime() + - removed error log caused by rounding/slew, ensured postcondition +* [Bug 3447] AES-128-CMAC (fixes) + - refactoring the MAC code, too +* [Bug 3441] Validate the assumption that AF_UNSPEC is 0. stenn@ntp.org +* [Bug 3439] When running multiple commands / hosts in ntpq... + - applied patch by ggarvey +* [Bug 3438] Negative values and values > 999 days in... + - applied patch by ggarvey (with minor mods) +* [Bug 3437] ntpd tries to open socket with AF_UNSPEC domain + - applied patch (with mods) by Miroslav Lichvar +* [Bug 3435] anchor NTP era alignment +* [Bug 3433] sntp crashes when run with -a. +* [Bug 3430] ntpq dumps core (SIGSEGV) for "keytype md2" + - fixed several issues with hash algos in ntpd, sntp, ntpq, + ntpdc and the test suites +* [Bug 3424] Trimble Thunderbolt 1024 week millenium bug + - initial patch by Daniel Pouzzner +* [Bug 3423] QNX adjtime() implementation error checking is + wrong +* [Bug 3417] ntpq ifstats packet counters can be negative + made IFSTATS counter quantities unsigned +* [Bug 3411] problem about SIGN(6) packet handling for ntp-4.2.8p10 + - raised receive buffer size to 1200 +* [Bug 3408] refclock_jjy.c: Avoid a wrong report of the coverity static + analysis tool. +* [Bug 3405] update-leap.in: general cleanup, HTTPS support. Paul McMath. +* [Bug 3404] Fix openSSL DLL usage under Windows + - fix/drop assumptions on OpenSSL libs directory layout +* [Bug 3399] NTP: linker error in 4.2.8p10 during Linux cross-compilation + - initial patch by timeflies@mail2tor.com +* [Bug 3398] tests fail with core dump + - patch contributed by Alexander Bluhm +* [Bug 3397] ctl_putstr() asserts that data fits in its buffer + rework of formatting & data transfer stuff in 'ntp_control.c' + avoids unecessary buffers and size limitations. +* [Bug 3394] Leap second deletion does not work on ntpd clients + - fixed handling of dynamic deletion w/o leap file +* [Bug 3391] ntpd segfaults on startup due to small warmup thread stack size + - increased mimimum stack size to 32kB +* [Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8 + - reverted handling of PPS kernel consumer to 4.2.6 behavior +* [Bug 3365] Updates driver40(-ja).html and miscopt.html +* [Bug 3358] Spurious KoD log messages in .INIT. phase. HStenn. +* [Bug 3016] wrong error position reported for bad ":config pool" + - fixed location counter & ntpq output +* [Bug 2900] libntp build order problem. HStenn. +* [Bug 2878] Tests are cluttering up syslog +* [Bug 2737] Wrong phone number listed for USNO. ntp-bugs@bodosom.net, + perlinger@ntp.org +* [Bug 2557] Fix Thunderbolt init. ntp-bugs@bodosom.net, perlinger@ntp. +* [Bug 948] Trustedkey config directive leaks memory. +* Use strlcpy() to copy strings, not memcpy(). HStenn. +* Typos. HStenn. +* test_ntp_scanner_LDADD needs ntpd/ntp_io.o. HStenn. +* refclock_jjy.c: Add missing "%s" to an msyslog() call. HStenn. +* Build ntpq and libntpq.a with NTP_HARD_*FLAGS. perlinger@ntp.org +* Fix trivial warnings from 'make check'. perlinger@ntp.org +* Fix bug in the override portion of the compiler hardening macro. HStenn. +* record_raw_stats(): Log entire packet. Log writes. HStenn. +* AES-128-CMAC support. BInglis, HStenn, JPerlinger. +* sntp: tweak key file logging. HStenn. +* sntp: pkt_output(): Improve debug output. HStenn. +* update-leap: updates from Paul McMath. +* When using pkg-config, report --modversion. HStenn. +* Clean up libevent configure checks. HStenn. +* sntp: show the IP of who sent us a crypto-NAK. HStenn. +* Allow .../N to specify subnet bits for IPs in ntp.keys. HStenn, JPerlinger. +* authistrustedip() - use it in more places. HStenn, JPerlinger. +* New sysstats: sys_lamport, sys_tsrounding. HStenn. +* Update ntp.keys .../N documentation. HStenn. +* Distribute testconf.yml. HStenn. +* Add DPRINTF(2,...) lines to receive() for packet drops. HStenn. +* Rename the configuration flag fifo variables. HStenn. +* Improve saveconfig output. HStenn. +* Decode restrict flags on receive() debug output. HStenn. +* Decode interface flags on receive() debug output. HStenn. +* Warn the user if deprecated "driftfile name WanderThreshold" is used. HStenn. +* Update the documentation in ntp.conf.def . HStenn. +* restrictions() must return restrict flags and ippeerlimit. HStenn. +* Update ntpq peer documentation to describe the 'p' type. HStenn. +* Rename restrict 'flags' to 'rflags. Use an enum for the values. HStenn. +* Provide dump_restricts() for debugging. HStenn. +* Use consistent 4th arg type for [gs]etsockopt. JPerlinger. +* Some tests might need LIBM. HStenn. +* update-leap: Allow -h/--help early. HStenn. + +--- +(4.2.8p10) 2017/03/21 Released by Harlan Stenn * [Sec 3389] NTP-01-016: Denial of Service via Malformed Config (Pentest report 01.2017) Modified: releng/10.3/contrib/ntp/Makefile.am ============================================================================== --- releng/10.3/contrib/ntp/Makefile.am Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/Makefile.am Wed Mar 7 05:58:24 2018 (r330567) @@ -5,10 +5,10 @@ NULL = # moved sntp first to get libtool and libevent built. SUBDIRS = \ - sntp \ scripts \ include \ libntp \ + sntp \ libparse \ ntpd \ ntpdate \ Modified: releng/10.3/contrib/ntp/Makefile.in ============================================================================== --- releng/10.3/contrib/ntp/Makefile.in Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/Makefile.in Wed Mar 7 05:58:24 2018 (r330567) @@ -99,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/li $(top_srcdir)/sntp/m4/ltsugar.m4 \ $(top_srcdir)/sntp/m4/ltversion.m4 \ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \ + $(top_srcdir)/sntp/m4/ntp_af_unspec.m4 \ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \ @@ -523,10 +524,10 @@ NULL = # moved sntp first to get libtool and libevent built. SUBDIRS = \ - sntp \ scripts \ include \ libntp \ + sntp \ libparse \ ntpd \ ntpdate \ Modified: releng/10.3/contrib/ntp/NEWS ============================================================================== --- releng/10.3/contrib/ntp/NEWS Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/NEWS Wed Mar 7 05:58:24 2018 (r330567) @@ -1,4 +1,331 @@ -- +NTP 4.2.8p11 (Harlan Stenn , 2018/02/27) + +NOTE: this NEWS file will be undergoing more revisions. + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +This release fixes 2 low-/medium-, 1 informational/medum-, and 2 low-severity +vulnerabilities in ntpd, one medium-severity vulernability in ntpq, and +provides 65 other non-security fixes and improvements: + +* NTP Bug 3454: Unauthenticated packet can reset authenticated interleaved + association (LOW/MED) + Date Resolved: Stable (4.2.8p11) 27 Feb 2018 + References: Sec 3454 / CVE-2018-7185 / VU#961909 + Affects: ntp-4.2.6, up to but not including ntp-4.2.8p11. + CVSS2: MED 4.3 (AV:N/AC:M/Au:N/C:N/I:N/A:P) This could score between + 2.9 and 6.8. + CVSS3: LOW 3.1 CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L This could + score between 2.6 and 3.1 + Summary: + The NTP Protocol allows for both non-authenticated and + authenticated associations, in client/server, symmetric (peer), + and several broadcast modes. In addition to the basic NTP + operational modes, symmetric mode and broadcast servers can + support an interleaved mode of operation. In ntp-4.2.8p4 a bug + was inadvertently introduced into the protocol engine that + allows a non-authenticated zero-origin (reset) packet to reset + an authenticated interleaved peer association. If an attacker + can send a packet with a zero-origin timestamp and the source + IP address of the "other side" of an interleaved association, + the 'victim' ntpd will reset its association. The attacker must + continue sending these packets in order to maintain the + disruption of the association. In ntp-4.0.0 thru ntp-4.2.8p6, + interleave mode could be entered dynamically. As of ntp-4.2.8p7, + interleaved mode must be explicitly configured/enabled. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p11, or later, from the NTP Project Download Page + or the NTP Public Services Project Download Page. + If you are unable to upgrade to 4.2.8p11 or later and have + 'peer HOST xleave' lines in your ntp.conf file, remove the + 'xleave' option. + Have enough sources of time. + Properly monitor your ntpd instances. + If ntpd stops running, auto-restart it without -g . + Credit: + This weakness was discovered by Miroslav Lichvar of Red Hat. + +* NTP Bug 3453: Interleaved symmetric mode cannot recover from bad + state (LOW/MED) + Date Resolved: Stable (4.2.8p11) 27 Feb 2018 + References: Sec 3453 / CVE-2018-7184 / VU#961909 + Affects: ntpd in ntp-4.2.8p4, up to but not including ntp-4.2.8p11. + CVSS2: MED 4.3 (AV:N/AC:M/Au:N/C:P/I:N/A:N) + Could score between 2.9 and 6.8. + CVSS3: LOW 3.1 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L + Could score between 2.6 and 6.0. + Summary: + The fix for NtpBug2952 was incomplete, and while it fixed one + problem it created another. Specifically, it drops bad packets + before updating the "received" timestamp. This means a + third-party can inject a packet with a zero-origin timestamp, + meaning the sender wants to reset the association, and the + transmit timestamp in this bogus packet will be saved as the + most recent "received" timestamp. The real remote peer does + not know this value and this will disrupt the association until + the association resets. + Mitigation: + Implement BCP-38. + Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Use authentication with 'peer' mode. + Have enough sources of time. + Properly monitor your ntpd instances. + If ntpd stops running, auto-restart it without -g . + Credit: + This weakness was discovered by Miroslav Lichvar of Red Hat. + +* NTP Bug 3415: Provide a way to prevent authenticated symmetric passive + peering (LOW) + Date Resolved: Stable (4.2.8p11) 27 Feb 2018 + References: Sec 3415 / CVE-2018-7170 / VU#961909 + Sec 3012 / CVE-2016-1549 / VU#718152 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92. Resolved in 4.2.8p11. + CVSS2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N) + CVSS3: LOW 3.1 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N + Summary: + ntpd can be vulnerable to Sybil attacks. If a system is set up to + use a trustedkey and if one is not using the feature introduced in + ntp-4.2.8p6 allowing an optional 4th field in the ntp.keys file to + specify which IPs can serve time, a malicious authenticated peer + -- i.e. one where the attacker knows the private symmetric key -- + can create arbitrarily-many ephemeral associations in order to win + the clock selection of ntpd and modify a victim's clock. Three + additional protections are offered in ntp-4.2.8p11. One is the + new 'noepeer' directive, which disables symmetric passive + ephemeral peering. Another is the new 'ippeerlimit' directive, + which limits the number of peers that can be created from an IP. + The third extends the functionality of the 4th field in the + ntp.keys file to include specifying a subnet range. + Mitigation: + Implement BCP-38. + Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Use the 'noepeer' directive to prohibit symmetric passive + ephemeral associations. + Use the 'ippeerlimit' directive to limit the number of peers + that can be created from an IP. + Use the 4th argument in the ntp.keys file to limit the IPs and + subnets that can be time servers. + Have enough sources of time. + Properly monitor your ntpd instances. + If ntpd stops running, auto-restart it without -g . + Credit: + This weakness was reported as Bug 3012 by Matthew Van Gundy of + Cisco ASIG, and separately by Stefan Moser as Bug 3415. + +* ntpq Bug 3414: decodearr() can write beyond its 'buf' limits (Medium) + Date Resolved: 27 Feb 2018 + References: Sec 3414 / CVE-2018-7183 / VU#961909 + Affects: ntpq in ntp-4.2.8p6, up to but not including ntp-4.2.8p11. + CVSS2: MED 6.8 (AV:N/AC:M/Au:N/C:P/I:P/A:P) + CVSS3: MED 5.0 CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L + Summary: + ntpq is a monitoring and control program for ntpd. decodearr() + is an internal function of ntpq that is used to -- wait for it -- + decode an array in a response string when formatted data is being + displayed. This is a problem in affected versions of ntpq if a + maliciously-altered ntpd returns an array result that will trip this + bug, or if a bad actor is able to read an ntpq request on its way to + a remote ntpd server and forge and send a response before the remote + ntpd sends its response. It's potentially possible that the + malicious data could become injectable/executable code. + Mitigation: + Implement BCP-38. + Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Credit: + This weakness was discovered by Michael Macnair of Thales e-Security. + +* NTP Bug 3412: ctl_getitem(): buffer read overrun leads to undefined + behavior and information leak (Info/Medium) + Date Resolved: 27 Feb 2018 + References: Sec 3412 / CVE-2018-7182 / VU#961909 + Affects: ntp-4.2.8p6, up to but not including ntp-4.2.8p11. + CVSS2: INFO 0.0 - MED 5.0 (AV:N/AC:L/Au:N/C:P/I:N/A:N) 0.0 if C:N + CVSS3: NONE 0.0 - MED 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N + 0.0 if C:N + Summary: + ctl_getitem() is used by ntpd to process incoming mode 6 packets. + A malicious mode 6 packet can be sent to an ntpd instance, and + if the ntpd instance is from 4.2.8p6 thru 4.2.8p10, that will + cause ctl_getitem() to read past the end of its buffer. + Mitigation: + Implement BCP-38. + Upgrade to ntp-4.2.8p11 or later from the NTP Project Download Page + or the NTP Public Services Project Download Page. + Have enough sources of time. + Properly monitor your ntpd instances. + If ntpd stops running, auto-restart it without -g . + Credit: + This weakness was discovered by Yihan Lian of Qihoo 360. + +* NTP Bug 3012: Sybil vulnerability: ephemeral association attack + Also see Bug 3415, above. + Date Mitigated: Stable (4.2.8p7) 26 Apr 2016; Dev (4.3.92) 26 Apr 2016 + Date Resolved: Stable (4.2.8p11) 27 Feb 2018 + References: Sec 3012 / CVE-2016-1549 / VU#718152 + Affects: All ntp-4 releases up to, but not including 4.2.8p7, and + 4.3.0 up to, but not including 4.3.92. Resolved in 4.2.8p11. + CVSS2: LOW 3.5 - (AV:N/AC:M/Au:S/C:N/I:P/A:N) + CVSS3: MED 5.3 - CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N + Summary: + ntpd can be vulnerable to Sybil attacks. If a system is set up + to use a trustedkey and if one is not using the feature + introduced in ntp-4.2.8p6 allowing an optional 4th field in the + ntp.keys file to specify which IPs can serve time, a malicious + authenticated peer -- i.e. one where the attacker knows the + private symmetric key -- can create arbitrarily-many ephemeral + associations in order to win the clock selection of ntpd and + modify a victim's clock. Two additional protections are + offered in ntp-4.2.8p11. One is the 'noepeer' directive, which + disables symmetric passive ephemeral peering. The other extends + the functionality of the 4th field in the ntp.keys file to + include specifying a subnet range. + Mitigation: + Implement BCP-38. + Upgrade to 4.2.8p11, or later, from the NTP Project Download Page or + the NTP Public Services Project Download Page. + Use the 'noepeer' directive to prohibit symmetric passive + ephemeral associations. + Use the 'ippeerlimit' directive to limit the number of peer + associations from an IP. + Use the 4th argument in the ntp.keys file to limit the IPs + and subnets that can be time servers. + Properly monitor your ntpd instances. + Credit: + This weakness was discovered by Matthew Van Gundy of Cisco ASIG. + +* Bug fixes: + [Bug 3457] OpenSSL FIPS mode regression + [Bug 3455] ntpd doesn't use scope id when binding multicast + - applied patch by Sean Haugh + [Bug 3452] PARSE driver prints uninitialized memory. + [Bug 3450] Dubious error messages from plausibility checks in get_systime() + - removed error log caused by rounding/slew, ensured postcondition + [Bug 3447] AES-128-CMAC (fixes) + - refactoring the MAC code, too + [Bug 3441] Validate the assumption that AF_UNSPEC is 0. stenn@ntp.org + [Bug 3439] When running multiple commands / hosts in ntpq... + - applied patch by ggarvey + [Bug 3438] Negative values and values > 999 days in... + - applied patch by ggarvey (with minor mods) + [Bug 3437] ntpd tries to open socket with AF_UNSPEC domain + - applied patch (with mods) by Miroslav Lichvar + [Bug 3435] anchor NTP era alignment + [Bug 3433] sntp crashes when run with -a. + [Bug 3430] ntpq dumps core (SIGSEGV) for "keytype md2" + - fixed several issues with hash algos in ntpd, sntp, ntpq, + ntpdc and the test suites + [Bug 3424] Trimble Thunderbolt 1024 week millenium bug + - initial patch by Daniel Pouzzner + [Bug 3423] QNX adjtime() implementation error checking is + wrong + [Bug 3417] ntpq ifstats packet counters can be negative + made IFSTATS counter quantities unsigned + [Bug 3411] problem about SIGN(6) packet handling for ntp-4.2.8p10 + - raised receive buffer size to 1200 + [Bug 3408] refclock_jjy.c: Avoid a wrong report of the coverity static + analysis tool. + [Bug 3405] update-leap.in: general cleanup, HTTPS support. Paul McMath. + [Bug 3404] Fix openSSL DLL usage under Windows + - fix/drop assumptions on OpenSSL libs directory layout + [Bug 3399] NTP: linker error in 4.2.8p10 during Linux cross-compilation + - initial patch by timeflies@mail2tor.com + [Bug 3398] tests fail with core dump + - patch contributed by Alexander Bluhm + [Bug 3397] ctl_putstr() asserts that data fits in its buffer + rework of formatting & data transfer stuff in 'ntp_control.c' + avoids unecessary buffers and size limitations. + [Bug 3394] Leap second deletion does not work on ntpd clients + - fixed handling of dynamic deletion w/o leap file + [Bug 3391] ntpd segfaults on startup due to small warmup thread stack size + - increased mimimum stack size to 32kB + [Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8 + - reverted handling of PPS kernel consumer to 4.2.6 behavior + [Bug 3365] Updates driver40(-ja).html and miscopt.html + [Bug 3358] Spurious KoD log messages in .INIT. phase. HStenn. + [Bug 3016] wrong error position reported for bad ":config pool" + - fixed location counter & ntpq output + [Bug 2900] libntp build order problem. HStenn. + [Bug 2878] Tests are cluttering up syslog + [Bug 2737] Wrong phone number listed for USNO. ntp-bugs@bodosom.net, + perlinger@ntp.org + [Bug 2557] Fix Thunderbolt init. ntp-bugs@bodosom.net, perlinger@ntp. + [Bug 948] Trustedkey config directive leaks memory. + Use strlcpy() to copy strings, not memcpy(). HStenn. + Typos. HStenn. + test_ntp_scanner_LDADD needs ntpd/ntp_io.o. HStenn. + refclock_jjy.c: Add missing "%s" to an msyslog() call. HStenn. + Build ntpq and libntpq.a with NTP_HARD_*FLAGS. perlinger@ntp.org + Fix trivial warnings from 'make check'. perlinger@ntp.org + Fix bug in the override portion of the compiler hardening macro. HStenn. + record_raw_stats(): Log entire packet. Log writes. HStenn. + AES-128-CMAC support. BInglis, HStenn, JPerlinger. + sntp: tweak key file logging. HStenn. + sntp: pkt_output(): Improve debug output. HStenn. + update-leap: updates from Paul McMath. + When using pkg-config, report --modversion. HStenn. + Clean up libevent configure checks. HStenn. + sntp: show the IP of who sent us a crypto-NAK. HStenn. + Allow .../N to specify subnet bits for IPs in ntp.keys. HStenn, JPerlinger. + authistrustedip() - use it in more places. HStenn, JPerlinger. + New sysstats: sys_lamport, sys_tsrounding. HStenn. + Update ntp.keys .../N documentation. HStenn. + Distribute testconf.yml. HStenn. + Add DPRINTF(2,...) lines to receive() for packet drops. HStenn. + Rename the configuration flag fifo variables. HStenn. + Improve saveconfig output. HStenn. + Decode restrict flags on receive() debug output. HStenn. + Decode interface flags on receive() debug output. HStenn. + Warn the user if deprecated "driftfile name WanderThreshold" is used. HStenn. + Update the documentation in ntp.conf.def . HStenn. + restrictions() must return restrict flags and ippeerlimit. HStenn. + Update ntpq peer documentation to describe the 'p' type. HStenn. + Rename restrict 'flags' to 'rflags. Use an enum for the values. HStenn. + Provide dump_restricts() for debugging. HStenn. + Use consistent 4th arg type for [gs]etsockopt. JPerlinger. + +* Other items: + +* update-leap needs the following perl modules: + Net::SSLeay + IO::Socket::SSL + +* New sysstats variables: sys_lamport, sys_tsrounding +See them with: ntpq -c "rv 0 ss_lamport,ss_tsrounding" +sys_lamport counts the number of observed Lamport violations, while +sys_tsrounding counts observed timestamp rounding events. + +* New ntp.conf items: + +- restrict ... noepeer +- restrict ... ippeerlimit N + +The 'noepeer' directive will disallow all ephemeral/passive peer +requests. + +The 'ippeerlimit' directive limits the number of time associations +for each IP in the designated set of addresses. This limit does not +apply to explicitly-configured associations. A value of -1, the current +default, means an unlimited number of associations may connect from a +single IP. 0 means "none", etc. Ordinarily the only way multiple +associations would come from the same IP would be if the remote side +was using a proxy. But a trusted machine might become compromised, +in which case an attacker might spin up multiple authenticated sessions +from different ports. This directive should be helpful in this case. + +* New ntp.keys feature: Each IP in the optional list of IPs in the 4th +field may contain a /subnetbits specification, which identifies the +scope of IPs that may use this key. This IP/subnet restriction can be +used to limit the IPs that may use the key in most all situations where +a key is used. +-- NTP 4.2.8p10 (Harlan Stenn , 2017/03/21) Focus: Security, Bug fixes, enhancements. @@ -960,7 +1287,7 @@ following 9 low- and medium-severity vulnerabilities: Implement BCP-38. Upgrade to 4.2.8p7, or later, from the NTP Project Download Page or the NTP Public Services Project Download Page - Properly monitor your =ntpd= instances + Properly monitor your ntpd instances Credit: This weakness was discovered by Stephen Gray and Matthew Van Gundy of Cisco ASIG. @@ -1029,7 +1356,7 @@ following 9 low- and medium-severity vulnerabilities: Implement BCP-38. Upgrade to 4.2.8p7, or later, from the NTP Project Download Page or the NTP Public Services Project Download Page - Properly monitor your =ntpd= instances + Properly monitor your ntpd instances Credit: This weakness was discovered by Yihan Lian of the Cloud Security Team, Qihoo 360. @@ -1266,7 +1593,7 @@ following 1 low- and 8 medium-severity vulnerabilities Configure 'ntpd' to get time from multiple sources. Upgrade to 4.2.8p6, or later, from the NTP Project Download Page or the NTP Public Services Project Download Page. - Monitor your 'ntpd= instances. + Monitor your 'ntpd' instances. Credit: This weakness was discovered by Matthey Van Gundy and Jonathan Gardner of Cisco ASIG. Modified: releng/10.3/contrib/ntp/aclocal.m4 ============================================================================== --- releng/10.3/contrib/ntp/aclocal.m4 Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/aclocal.m4 Wed Mar 7 05:58:24 2018 (r330567) @@ -1339,6 +1339,7 @@ m4_include([sntp/m4/ltoptions.m4]) m4_include([sntp/m4/ltsugar.m4]) m4_include([sntp/m4/ltversion.m4]) m4_include([sntp/m4/lt~obsolete.m4]) +m4_include([sntp/m4/ntp_af_unspec.m4]) m4_include([sntp/m4/ntp_cacheversion.m4]) m4_include([sntp/m4/ntp_compiler.m4]) m4_include([sntp/m4/ntp_crosscompile.m4]) Modified: releng/10.3/contrib/ntp/adjtimed/Makefile.in ============================================================================== --- releng/10.3/contrib/ntp/adjtimed/Makefile.in Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/adjtimed/Makefile.in Wed Mar 7 05:58:24 2018 (r330567) @@ -108,6 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/li $(top_srcdir)/sntp/m4/ltsugar.m4 \ $(top_srcdir)/sntp/m4/ltversion.m4 \ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \ + $(top_srcdir)/sntp/m4/ntp_af_unspec.m4 \ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \ @@ -952,7 +953,6 @@ install-exec-hook: # check-libntp: ../libntp/libntp.a - @echo stamp > $@ ../libntp/libntp.a: cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a Modified: releng/10.3/contrib/ntp/clockstuff/Makefile.in ============================================================================== --- releng/10.3/contrib/ntp/clockstuff/Makefile.in Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/clockstuff/Makefile.in Wed Mar 7 05:58:24 2018 (r330567) @@ -101,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/li $(top_srcdir)/sntp/m4/ltsugar.m4 \ $(top_srcdir)/sntp/m4/ltversion.m4 \ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \ + $(top_srcdir)/sntp/m4/ntp_af_unspec.m4 \ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \ @@ -793,7 +794,6 @@ uninstall-am: check-libntp: ../libntp/libntp.a - @echo stamp > $@ ../libntp/libntp.a: cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a Modified: releng/10.3/contrib/ntp/configure ============================================================================== --- releng/10.3/contrib/ntp/configure Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/configure Wed Mar 7 05:58:24 2018 (r330567) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ntp 4.2.8p10. +# Generated by GNU Autoconf 2.69 for ntp 4.2.8p11. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ntp' PACKAGE_TARNAME='ntp' -PACKAGE_VERSION='4.2.8p10' -PACKAGE_STRING='ntp 4.2.8p10' +PACKAGE_VERSION='4.2.8p11' +PACKAGE_STRING='ntp 4.2.8p11' PACKAGE_BUGREPORT='http://bugs.ntp.org./' PACKAGE_URL='http://www.ntp.org./' @@ -944,6 +944,7 @@ ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking +with_hardenfile with_locfile enable_shared enable_static @@ -1613,7 +1614,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ntp 4.2.8p10 to adapt to many kinds of systems. +\`configure' configures ntp 4.2.8p11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1683,7 +1684,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ntp 4.2.8p10:";; + short | recursive ) echo "Configuration of ntp 4.2.8p11:";; esac cat <<\_ACEOF @@ -1699,6 +1700,7 @@ Optional Features and Packages: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --with-hardenfile=XXX os-specific or "/dev/null" --with-locfile=XXX os-specific or "legacy" --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] @@ -1921,7 +1923,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ntp configure 4.2.8p10 +ntp configure 4.2.8p11 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2630,7 +2632,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ntp $as_me 4.2.8p10, which was +It was created by ntp $as_me 4.2.8p11, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3631,7 +3633,7 @@ fi # Define the identity of the package. PACKAGE='ntp' - VERSION='4.2.8p10' + VERSION='4.2.8p11' cat >>confdefs.h <<_ACEOF @@ -6581,11 +6583,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu $as_echo_n "checking for compile/link hardening flags... " >&6; } -# Check whether --with-locfile was given. -if test "${with_locfile+set}" = set; then : - withval=$with_locfile; +# Check whether --with-hardenfile was given. +if test "${with_hardenfile+set}" = set; then : + withval=$with_hardenfile; else - with_locfile=no + with_hardenfile=no fi @@ -6593,12 +6595,12 @@ fi ( \ SENTINEL_DIR="$PWD" && \ cd $srcdir/sntp && \ - case "$with_locfile" in \ + case "$with_hardenfile" in \ yes|no|'') \ scripts/genHardFlags -d "$SENTINEL_DIR" \ ;; \ *) \ - scripts/genHardFlags -d "$SENTINEL_DIR" -f "$with_locfile" \ + scripts/genHardFlags -d "$SENTINEL_DIR" -f "$with_hardenfile" \ ;; \ esac \ ) > genHardFlags.i 2> genHardFlags.err @@ -15937,8 +15939,13 @@ $as_echo_n "checking if libevent $ntp_libevent_min_ver if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent then ntp_use_local_libevent=no - { $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5 -$as_echo "$as_me: Using the installed libevent" >&6;} + ntp_libevent_version="`$PKG_CONFIG --modversion libevent`" + case "$ntp_libevent_version" in + *.*) ;; + *) ntp_libevent_version='(unknown)' ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5 +$as_echo "yes, version $ntp_libevent_version" >&6; } CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads` CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent` # HMS: I hope the following is accurate. @@ -15966,8 +15973,6 @@ $as_echo "$as_me: Using the installed libevent" >&6;} LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads" esac LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } else ntp_use_local_libevent=yes # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS @@ -26468,6 +26473,36 @@ fi done + + +# We could do a cv check here, but is it worth it? + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifndef AF_UNSPEC + #include "Bletch: AF_UNSPEC is undefined!" + #endif + #if AF_UNSPEC != 0 + #include "Bletch: AF_UNSPEC != 0" + #endif + +int +main () +{ +{ $as_echo "$as_me:${as_lineno-$LINENO}: AF_UNSPEC is zero, as expected." >&5 +$as_echo "$as_me: AF_UNSPEC is zero, as expected." >&6;} + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : @@ -30114,8 +30149,13 @@ $as_echo_n "checking pkg-config for $pkg... " >&6; } VER_SUFFIX=o ntp_openssl=yes ntp_openssl_from_pkg_config=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`" + case "$ntp_openssl_version" in + *.*) ;; + *) ntp_openssl_version='(unknown)' ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5 +$as_echo "yes, version $ntp_openssl_version" >&6; } break fi @@ -33924,7 +33964,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ntp $as_me 4.2.8p10, which was +This file was extended by ntp $as_me 4.2.8p11, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33991,7 +34031,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ntp config.status 4.2.8p10 +ntp config.status 4.2.8p11 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: releng/10.3/contrib/ntp/configure.ac ============================================================================== --- releng/10.3/contrib/ntp/configure.ac Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/configure.ac Wed Mar 7 05:58:24 2018 (r330567) @@ -528,6 +528,8 @@ AC_CHECK_HEADERS([sys/timex.h], [], [], [ #endif ]) +NTP_AF_UNSPEC + AC_TYPE_SIGNAL AC_TYPE_OFF_T AC_STRUCT_TM dnl defines TM_IN_SYS_TIME used by refclock_parse.c Modified: releng/10.3/contrib/ntp/html/access.html ============================================================================== --- releng/10.3/contrib/ntp/html/access.html Wed Mar 7 05:53:35 2018 (r330566) +++ releng/10.3/contrib/ntp/html/access.html Wed Mar 7 05:58:24 2018 (r330567) @@ -19,7 +19,7 @@ color: #FF0000;

giffrom Pogo, Walt Kelly

The skunk watches for intruders and sprays.

Last update: - 11-Sep-2010 05:53 + 26-Jul-2017 20:10 UTC


Related Links

@@ -32,7 +32,7 @@ color: #FF0000;

The ACL is specified as a list of restrict commands in the following format:

restrict address [mask mask] [flag][...]

The address argument expressed in dotted-quad form is the address of a host or network. Alternatively, the address argument can be a valid host DNS name. The mask argument expressed in IPv4 or IPv6 numeric address form defaults to all mask bits on, meaning that the address is treated as the address of an individual host. A default entry (address 0.0.0.0, mask 0.0.0.0 for IPv4 and address :: mask :: for IPv6) is always the first entry in the list. restrict default, with no mask option, modifies both IPv4 and IPv6 default entries. restrict source configures a template restriction automatically added at runtime for each association, whether configured, ephemeral, or preemptable, and removed when the association is demobilized.

-

Some flags have the effect to deny service, some have the effect to enable service and some are conditioned by other flags. The flags. are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags that deny service are classed in two categories, those that restrict time service and those that restrict informational queries and attempts to do run-time reconfiguration of the server.

+

Some flags have the effect to deny service, some have the effect to enable service and some are conditioned by other flags. The flags are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags that deny service are classed in two categories, those that restrict time service and those that restrict informational queries and attempts to do run-time reconfiguration of the server.

An example may clarify how it works. Our campus has two class-B networks, 128.4 for the ECE and CIS departments and 128.175 for the rest of campus. Let's assume (not true!) that subnet 128.4.1 homes critical services like class rosters and spread sheets. A suitable ACL might look like this:

 restrict default nopeer					# deny new associations

Modified: releng/10.3/contrib/ntp/html/accopt.html
==============================================================================
--- releng/10.3/contrib/ntp/html/accopt.html	Wed Mar  7 05:53:35 2018	(r330566)
+++ releng/10.3/contrib/ntp/html/accopt.html	Wed Mar  7 05:58:24 2018	(r330567)
@@ -3,89 +3,185 @@
 
 
 
-Access Control Commands and Options
-
+Access Control Commands and Options 
 
 
 
 
 

Access Control Commands and Options

-giffrom Pogo, Walt Kelly +giffrom Pogo, +Walt Kelly

The skunk watches for intruders and sprays.

-

Last update: - 13-Nov-2014 03:00 - UTC

+

Last update: 7-Jan-2018 23:56 UTC


Related Links

- - + +

Commands and Options

-

Unless noted otherwise, further information about these ccommands is on the Access Control Support page.

+

Unless noted otherwise, further information about these ccommands is on +the Access Control Support page.

-
discard [ average avg ][ minimum min ] [ monitor prob ]
-
Set the parameters of the rate control facility which protects the server from client abuse. If the limited flag is present in the ACL, packets that violate these limits are discarded. If, in addition, the kod flag is present, a kiss-o'-death packet is returned. See the Rate Management page for further information. The options are: +
discard [ average avg ][ minimum min ] + [ monitor prob ]
+
Set the parameters of the rate control facility which protects the + server from client abuse. If the limited flag is present in the + ACL, packets that violate these limits are discarded. If, in addition, + the kod flag is present, a kiss-o'-death packet is + returned. See the Rate Management page for + further information. The options are:
average avg
-
Specify the minimum average interpacket spacing (minimum average headway - time) in log2 s with default 3.
+
Specify the minimum average interpacket spacing (minimum average + headway time) in log2 s with default 3.
minimum min
-
Specify the minimum interpacket spacing (guard time) in seconds with default 2.
+
Specify the minimum interpacket spacing (guard time) in seconds + with default 2.
monitor
-
Specify the probability of being recorded for packets that overflow the MRU list size limit set by mru maxmem or mru maxdepth. This is a performance optimization for servers with aggregate arrivals of 1000 packets per second or more.
+
Specify the probability of being recorded for packets that + overflow the MRU list size limit set by mru maxmem + or mru maxdepth. This is a performance optimization for + servers with aggregate arrivals of 1000 packets per second or + more.
-
restrict default [flag][...]
- restrict source [flag][...]
- restrict address [mask mask] [flag][...]
-
The address argument expressed in dotted-quad form is the address of a host or network. Alternatively, the address argument can be a valid host DNS name. The mask argument expressed in IPv4 or IPv6 numeric address form defaults to all mask bits on, meaning that the address is treated as the address of an individual host. A default entry (address 0.0.0.0, mask 0.0.0.0 for IPv4 and address :: mask :: for IPv6) is always the first entry in the list. restrict default, with no mask option, modifies both IPv4 and IPv6 default entries. restrict source configures a template restriction automatically added at runtime for each association, whether configured, ephemeral, or preemptible, and removed when the association is demobilized.
-
Some flags have the effect to deny service, some have the effect to enable service and some are conditioned by other flags. The flags. are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags that deny service are classed in two categories, those that restrict time service and those that restrict informational queries and attempts to do run-time reconfiguration of the server. One or more of the following flags may be specified:
+
restrict [-4 | -6] default [ippeerlimit num] + [flag][...]
restrict source [ippeerlimit num] + [flag][...]
restrict address [mask mask] + [ippeerlimit num] [flag][...]
+
The address argument expressed in IPv4 or IPv6 numeric + address form is the address of a host or network. Alternatively, + the address argument can be a valid host DNS + name. The mask argument expressed in IPv4 or IPv6 + numeric address form defaults to all mask bits on, meaning that + the address is treated as the address of an individual + host. A default entry (address 0.0.0.0, mask 0.0.0.0 for IPv4 and + address :: mask :: for IPv6) is always the first entry in the + list. restrict default, with no mask option, modifies both IPv4 + and IPv6 default entries. restrict source configures a template + restriction automatically added at runtime for each association, whether + configured, ephemeral, or preemptible, and removed when the association + is demobilized.
+
The optional ippeerlimit takes a numeric argument that + indicates how many incoming (at present) peer requests will be permitted + for each IP, regardless of whether or not the request comes from an + authenticated source. A value of -1 means "unlimited", which is the + current default. A value of 0 means "none". Ordinarily one would + expect at most 1 of these sessions to exist per IP, however if the + remote side is operating thru a proxy there would be one association for + each remote peer at that IP.
+
Some flags have the effect to deny service, some have the effect to + enable service and some are conditioned by other flags. The flags are + not orthogonal, in that more restrictive flags will often make less + restrictive ones redundant. The flags that deny service are classed in + two categories, those that restrict time service and those that restrict + informational queries and attempts to do run-time reconfiguration of the + server. One or more of the following flags may be specified:
flake
-
Discard received NTP packets with probability 0.1; that is, on average drop one packet in ten. This is for testing and amusement. The name comes from Bob Braden's flakeway, which once did a similar thing for early Internet testing.
+
Discard received NTP packets with probability 0.1; that is, on + average drop one packet in ten. This is for testing and + amusement. The name comes from Bob Braden's flakeway, which + once did a similar thing for early Internet testing.
ignore
-
Deny packets of all kinds, including ntpq and ntpdc queries.
+
Deny packets of all kinds, including ntpq + and ntpdc queries.
kod
-
Send a kiss-o'-death (KoD) packet if the limited flag is present and a packet violates the rate limits established by the discard command. KoD packets are themselves rate limited for each source address separately. If the kod flag is used in a restriction which does not have the limited flag, no KoD responses will result.
+
Send a kiss-o'-death (KoD) packet if the limited flag is + present and a packet violates the rate limits established by + the discard command. KoD packets are themselves rate + limited for each source address separately. If the kod flag + is used in a restriction which does not have the limited + flag, no KoD responses will result.
limited
-
Deny time service if the packet violates the rate limits established by the discard command. This does not apply to ntpq and ntpdc queries.
+
Deny time service if the packet violates the rate limits + established by the discard command. This does not apply + to ntpq and ntpdc queries.
lowpriotrap
-
Declare traps set by matching hosts to be low priority. The number of traps a server can maintain is limited (the current limit is 3). Traps are usually assigned on a first come, first served basis, with later trap requestors being denied service. This flag modifies the assignment algorithm by allowing low priority traps to be overridden by later requests for normal priority traps.
+
Declare traps set by matching hosts to be low priority. The number + of traps a server can maintain is limited (the current limit is + 3). Traps are usually assigned on a first come, first served basis, + with later trap requestors being denied service. This flag modifies + the assignment algorithm by allowing low priority traps to be + overridden by later requests for normal priority traps.
mssntp
-
Enable Microsoft Windows MS-SNTP authentication using Active Directory services. Note: Potential users should be aware that these services involve a TCP connection to another process that could potentially block, denying services to other users. Therefore, this flag should be used only for a dedicated server with no clients other than MS-SNTP.
+
Enable Microsoft Windows MS-SNTP authentication using Active + Directory services. Note: Potential users + should be aware that these services involve a TCP connection to + another process that could potentially block, denying services to + other users. Therefore, this flag should be used only for a + dedicated server with no clients other than MS-SNTP.
+
noepeer
+
Deny packets that would mobilize an ephemeral peering association, + even if authenticated.
nomodify
-
Deny ntpq and ntpdc queries which attempt to modify the state of the server (i.e., run time reconfiguration). Queries which return information are permitted.
+
Deny ntpq and ntpdc queries which attempt to + modify the state of the server (i.e., run time + reconfiguration). Queries which return information are + permitted.
noquery
-
Deny ntpq and ntpdc queries. Time service is not affected.
+
Deny ntpq and ntpdc queries. Time service is not + affected.
nopeer
-
Deny packets that might mobilize an association unless authenticated. This includes broadcast, symmetric-active and manycast server packets when a configured association does not exist. It also includes pool associations, so if you want to use servers from a pool directive and also want to use nopeer by default, you'll want a "restrict source ..." line as well that does not include the nopeer directive. Note that this flag does not apply to packets that do not attempt to mobilize an association.
+
Deny packets that might mobilize an association unless + authenticated. This includes broadcast, symmetric-active and + manycast server packets when a configured association does not + exist. It also includes pool associations, so if you want + to use servers from a pool directive and also want to + use nopeer by default, you'll want a "restrict source + ..." line as well that does not include + the nopeer directive. Note that this flag does not apply + to packets that do not attempt to mobilize an association.
noserve
-
Deny all packets except ntpq and ntpdc queries.
+
Deny all packets except ntpq and ntpdc + queries.
notrap
-
Decline to provide mode 6 control message trap service to matching hosts. The trap service is a subsystem of the ntpdc control message protocol which is intended for use by remote event logging programs.
+
Decline to provide mode 6 control message trap service to matching + hosts. The trap service is a subsystem of the ntpdc control + message protocol which is intended for use by remote event logging + programs.
notrust
-
Deny packets that are not cryptographically authenticated. Note carefully how this flag interacts with the auth option of the enable and disable commands. If auth is enabled, which is the default, authentication is required for all packets that might mobilize an association. If auth is disabled, but the notrust flag is not present, an association can be mobilized whether or not authenticated. If auth is disabled, but the notrust flag is present, authentication is required only for the specified address/mask range.
+
Deny packets that are not cryptographically authenticated. Note + carefully how this flag interacts with the auth option of + the enable and disable commands. If auth + is enabled, which is the default, authentication is required for all + packets that might mobilize an association. If auth is + disabled, but the notrust flag is not present, an + association can be mobilized whether or not + authenticated. If auth is disabled, but + the notrust flag is present, authentication is required + only for the specified address/mask range.
ntpport
-
This is actually a match algorithm modifier, rather than a restriction - flag. Its presence causes the restriction entry to be matched only if the - source port in the packet is the standard NTP UDP port (123). A restrict line - containing ntpport is considered more specific than one with the *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 7 06:01:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E3A2F2EFC0; Wed, 7 Mar 2018 06:01:45 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40A6A7F8A1; Wed, 7 Mar 2018 06:01:45 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B4831D7C0; Wed, 7 Mar 2018 06:01:45 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2761jOI090060; Wed, 7 Mar 2018 06:01:45 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2761ivn090051; Wed, 7 Mar 2018 06:01:44 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803070601.w2761ivn090051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 7 Mar 2018 06:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r330568 - in releng: 10.3/contrib/tzdata 10.4/contrib/tzdata 11.1/contrib/tzdata X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 10.3/contrib/tzdata 10.4/contrib/tzdata 11.1/contrib/tzdata X-SVN-Commit-Revision: 330568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 06:01:46 -0000 Author: gordon Date: Wed Mar 7 06:01:44 2018 New Revision: 330568 URL: https://svnweb.freebsd.org/changeset/base/330568 Log: Update timezone database information. [EN-18:01.tzdata] Approved by: so Security: FreeBSD-EN-18:01.tzdata Modified: releng/10.3/contrib/tzdata/Makefile releng/10.3/contrib/tzdata/NEWS releng/10.3/contrib/tzdata/README releng/10.3/contrib/tzdata/africa releng/10.3/contrib/tzdata/asia releng/10.3/contrib/tzdata/australasia releng/10.3/contrib/tzdata/backzone releng/10.3/contrib/tzdata/europe releng/10.3/contrib/tzdata/leap-seconds.list releng/10.3/contrib/tzdata/leapseconds releng/10.3/contrib/tzdata/northamerica releng/10.3/contrib/tzdata/southamerica releng/10.3/contrib/tzdata/theory.html releng/10.3/contrib/tzdata/version releng/10.3/contrib/tzdata/zishrink.awk releng/10.3/contrib/tzdata/zone.tab releng/10.3/contrib/tzdata/zone1970.tab releng/10.4/contrib/tzdata/Makefile releng/10.4/contrib/tzdata/NEWS releng/10.4/contrib/tzdata/README releng/10.4/contrib/tzdata/africa releng/10.4/contrib/tzdata/asia releng/10.4/contrib/tzdata/australasia releng/10.4/contrib/tzdata/backzone releng/10.4/contrib/tzdata/europe releng/10.4/contrib/tzdata/leap-seconds.list releng/10.4/contrib/tzdata/leapseconds releng/10.4/contrib/tzdata/northamerica releng/10.4/contrib/tzdata/southamerica releng/10.4/contrib/tzdata/theory.html releng/10.4/contrib/tzdata/version releng/10.4/contrib/tzdata/zishrink.awk releng/10.4/contrib/tzdata/zone.tab releng/10.4/contrib/tzdata/zone1970.tab releng/11.1/contrib/tzdata/Makefile releng/11.1/contrib/tzdata/NEWS releng/11.1/contrib/tzdata/README releng/11.1/contrib/tzdata/africa releng/11.1/contrib/tzdata/asia releng/11.1/contrib/tzdata/australasia releng/11.1/contrib/tzdata/backzone releng/11.1/contrib/tzdata/europe releng/11.1/contrib/tzdata/leap-seconds.list releng/11.1/contrib/tzdata/leapseconds releng/11.1/contrib/tzdata/northamerica releng/11.1/contrib/tzdata/southamerica releng/11.1/contrib/tzdata/theory.html releng/11.1/contrib/tzdata/version releng/11.1/contrib/tzdata/zishrink.awk releng/11.1/contrib/tzdata/zone.tab releng/11.1/contrib/tzdata/zone1970.tab Modified: releng/10.3/contrib/tzdata/Makefile ============================================================================== --- releng/10.3/contrib/tzdata/Makefile Wed Mar 7 05:58:24 2018 (r330567) +++ releng/10.3/contrib/tzdata/Makefile Wed Mar 7 06:01:44 2018 (r330568) @@ -42,37 +42,64 @@ POSIXRULES= America/New_York # Also see TZDEFRULESTRING below, which takes effect only # if the time zone files cannot be accessed. -# Everything gets put in subdirectories of. . . -TOPDIR= /usr/local +# Installation locations. +# +# The defaults are suitable for Debian, except that if REDO is +# posix_right or right_posix then files that Debian puts under +# /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right are instead +# put under /usr/share/zoneinfo-posix and /usr/share/zoneinfo-leaps, +# respectively. Problems with the Debian approach are discussed in +# the commentary for the right_posix rule (below). +# Destination directory, which can be used for staging. +# 'make DESTDIR=/stage install' installs under /stage (e.g., to +# /stage/etc/localtime instead of to /etc/localtime). Files under +# /stage are not intended to work as-is, but can be copied by hand to +# the root directory later. If DESTDIR is empty, 'make install' does +# not stage, but installs directly into production locations. +DESTDIR = + +# Everything is installed into subdirectories of TOPDIR, and used there. +# TOPDIR should be empty (meaning the root directory), +# or a directory name that does not end in "/". +# TOPDIR should be empty or an absolute name unless you're just testing. +TOPDIR = + +# The default local time zone is taken from the file TZDEFAULT. +TZDEFAULT = $(TOPDIR)/etc/localtime + +# The subdirectory containing installed program and data files, and +# likewise for installed files that can be shared among architectures. +# These should be relative file names. +USRDIR = usr +USRSHAREDIR = $(USRDIR)/share + # "Compiled" time zone information is placed in the "TZDIR" directory # (and subdirectories). -# Use an absolute path name for TZDIR unless you're just testing the software. # TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty. - TZDIR_BASENAME= zoneinfo -TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME) +TZDIR = $(TOPDIR)/$(USRSHAREDIR)/$(TZDIR_BASENAME) -# Types to try, as an alternative to time_t. int64_t should be first. -TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t +# The "tzselect" and (if you do "make INSTALL") "date" commands go in: +BINDIR = $(TOPDIR)/$(USRDIR)/bin -# The "tzselect", "zic", and "zdump" commands get installed in. . . +# The "zdump" command goes in: +ZDUMPDIR = $(BINDIR) -ETCDIR= $(TOPDIR)/etc +# The "zic" command goes in: +ZICDIR = $(TOPDIR)/$(USRDIR)/sbin -# If you "make INSTALL", the "date" command gets installed in. . . - -BINDIR= $(TOPDIR)/bin - # Manual pages go in subdirectories of. . . +MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man -MANDIR= $(TOPDIR)/man - # Library functions are put in an archive in LIBDIR. +LIBDIR = $(TOPDIR)/$(USRDIR)/lib -LIBDIR= $(TOPDIR)/lib +# Types to try, as an alternative to time_t. int64_t should be first. +TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t + # If you want only POSIX time, with time values interpreted as # seconds since the epoch (not counting leap seconds), use # REDO= posix_only @@ -105,11 +132,14 @@ REDO= posix_right TZDATA_TEXT= leapseconds tzdata.zi # For backward-compatibility links for old zone names, use +# BACKWARD= backward +# If you also want the link US/Pacific-New, even though it is confusing +# and is planned to be removed from the database eventually, use # BACKWARD= backward pacificnew # To omit these links, use # BACKWARD= -BACKWARD= backward pacificnew +BACKWARD= backward # If you want out-of-scope and often-wrong data from the file 'backzone', use # PACKRATDATA= backzone @@ -313,7 +343,7 @@ ZFLAGS= # How to use zic to install tz binary files. -ZIC_INSTALL= $(ZIC) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS) +ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) # The name of a Posix-compliant 'awk' on your system. AWK= awk @@ -341,8 +371,8 @@ SGML_CATALOG_FILES= \ VALIDATE = nsgmls VALIDATE_FLAGS = -s -B -wall -wno-unused-param VALIDATE_ENV = \ - SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \ - SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \ + SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \ + SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \ SP_CHARSET_FIXED=YES \ SP_ENCODING=UTF-8 @@ -396,7 +426,7 @@ GZIPFLAGS= -9n #MAKE= make cc= cc -CC= $(cc) -DTZDIR=\"$(TZDIR)\" +CC= $(cc) -DTZDIR='"$(TZDIR)"' AR= ar @@ -421,18 +451,19 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.t date.1.txt COMMON= calendars CONTRIBUTING LICENSE Makefile \ NEWS README theory.html version -WEB_PAGES= tz-art.htm tz-how-to.html tz-link.htm +WEB_PAGES= tz-art.html tz-how-to.html tz-link.html DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) PRIMARY_YDATA= africa antarctica asia australasia \ europe northamerica southamerica -YDATA= $(PRIMARY_YDATA) etcetera $(BACKWARD) +YDATA= $(PRIMARY_YDATA) etcetera NDATA= systemv factory -TDATA= $(YDATA) $(NDATA) +TDATA_TO_CHECK= $(YDATA) $(NDATA) backward pacificnew +TDATA= $(YDATA) $(NDATA) $(BACKWARD) ZONETABLES= zone1970.tab zone.tab TABDATA= iso3166.tab $(TZDATA_TEXT) $(ZONETABLES) LEAP_DEPS= leapseconds.awk leap-seconds.list -TZDATA_ZI_DEPS= zishrink.awk $(TDATA) $(PACKRATDATA) -DATA= $(YDATA) $(NDATA) backzone iso3166.tab leap-seconds.list \ +TZDATA_ZI_DEPS= zishrink.awk version $(TDATA) $(PACKRATDATA) +DATA= $(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \ leapseconds yearistype.sh $(ZONETABLES) AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.awk zishrink.awk MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl @@ -457,7 +488,7 @@ VERSION_DEPS= \ newctime.3 newstrftime.3 newtzset.3 northamerica \ pacificnew private.h \ southamerica strftime.c systemv theory.html \ - time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \ + time2posix.3 tz-art.html tz-how-to.html tz-link.html \ tzfile.5 tzfile.h tzselect.8 tzselect.ksh \ workman.sh yearistype.sh \ zdump.8 zdump.c zic.8 zic.c \ @@ -473,35 +504,41 @@ all: tzselect yearistype zic zdump libtz.a $(TABDATA) ALL: all date $(ENCHILADA) install: all $(DATA) $(REDO) $(MANS) - mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \ - $(DESTDIR)$(LIBDIR) \ - $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \ - $(DESTDIR)$(MANDIR)/man8 - $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) - cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/. - cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/. - cp libtz.a $(DESTDIR)$(LIBDIR)/. - $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a - cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/. - cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/. - cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/. + mkdir -p '$(DESTDIR)$(BINDIR)' \ + '$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \ + '$(DESTDIR)$(LIBDIR)' \ + '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ + '$(DESTDIR)$(MANDIR)/man8' + $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \ + -t '$(DESTDIR)$(TZDEFAULT)' + cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' + cp tzselect '$(DESTDIR)$(BINDIR)/.' + cp zdump '$(DESTDIR)$(ZDUMPDIR)/.' + cp zic '$(DESTDIR)$(ZICDIR)/.' + cp libtz.a '$(DESTDIR)$(LIBDIR)/.' + $(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a' + cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.' + cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.' + cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.' INSTALL: ALL install date.1 - mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 - cp date $(DESTDIR)$(BINDIR)/. - cp -f date.1 $(DESTDIR)$(MANDIR)/man1/. + mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' + cp date '$(DESTDIR)$(BINDIR)/.' + cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.' version: $(VERSION_DEPS) { (type git) >/dev/null 2>&1 && \ V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ --abbrev=7 --dirty` || \ - V=$(VERSION); } && \ + V='$(VERSION)'; } && \ printf '%s\n' "$$V" >$@.out mv $@.out $@ # This file can be tailored by setting BACKWARD, PACKRATDATA, etc. tzdata.zi: $(TZDATA_ZI_DEPS) - LC_ALL=C $(AWK) -f zishrink.awk $(TDATA) $(PACKRATDATA) >$@.out + version=`sed 1q version` && \ + LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \ + $(TDATA) $(PACKRATDATA) >$@.out mv $@.out $@ version.h: version @@ -529,12 +566,13 @@ leapseconds: $(LEAP_DEPS) # Arguments to pass to submakes of install_data. # They can be overridden by later submake arguments. INSTALLARGS = \ - BACKWARD=$(BACKWARD) \ - DESTDIR=$(DESTDIR) \ + BACKWARD='$(BACKWARD)' \ + DESTDIR='$(DESTDIR)' \ LEAPSECONDS='$(LEAPSECONDS)' \ PACKRATDATA='$(PACKRATDATA)' \ - TZDIR=$(TZDIR) \ - YEARISTYPE=$(YEARISTYPE) \ + TZDEFAULT='$(TZDEFAULT)' \ + TZDIR='$(TZDIR)' \ + YEARISTYPE='$(YEARISTYPE)' \ ZIC='$(ZIC)' # 'make install_data' installs one set of tz binary files. @@ -558,16 +596,16 @@ right_only: # You must replace all of $(TZDIR) to switch from not using leap seconds # to using them, or vice versa. right_posix: right_only - rm -fr $(DESTDIR)$(TZDIR)-leaps - ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \ - $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only - $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only + rm -fr '$(DESTDIR)$(TZDIR)-leaps' + ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \ + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only posix_right: posix_only - rm -fr $(DESTDIR)$(TZDIR)-posix - ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \ - $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only - $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only + rm -fr '$(DESTDIR)$(TZDIR)-posix' + ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \ + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only # This obsolescent rule is present for backwards compatibility with # tz releases 2014g through 2015g. It should go away eventually. @@ -633,7 +671,7 @@ check_character_set: $(ENCHILADA) $(MISC) $(SOURCES) $(WEB_PAGES) \ CONTRIBUTING LICENSE Makefile README \ version tzdata.zi && \ - ! grep -Env $(SAFE_SHARP_LINE) $(TDATA) backzone \ + ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \ leapseconds yearistype.sh zone.tab && \ ! grep -Env $(OK_LINE) $(ENCHILADA); \ } @@ -641,14 +679,16 @@ check_character_set: $(ENCHILADA) check_white_space: $(ENCHILADA) patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ ! grep -En "$$pat" $(ENCHILADA) - ! grep -n '[[:space:]]$$' $(ENCHILADA) + ! grep -n '[[:space:]]$$' \ + $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+ FILE_NAME_COMPONENT_TOO_LONG = \ $(PRECEDES_FILE_NAME)[^[:space:]]*[^/[:space:]]{15} -check_name_lengths: $(TDATA) backzone - ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' $(TDATA) backzone +check_name_lengths: $(TDATA_TO_CHECK) backzone + ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ + $(TDATA_TO_CHECK) backzone CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } @@ -662,8 +702,8 @@ check_sorted: backward backzone iso3166.tab zone.tab z $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ LC_ALL=C sort -cu -check_links: checklinks.awk $(TDATA) - $(AWK) -f checklinks.awk $(TDATA) +check_links: checklinks.awk $(TDATA_TO_CHECK) + $(AWK) -f checklinks.awk $(TDATA_TO_CHECK) $(AWK) -f checklinks.awk tzdata.zi check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES) @@ -764,12 +804,12 @@ set-timestamps.out: $(ENCHILADA) check_public: $(MAKE) maintainer-clean - $(MAKE) "CFLAGS=$(GCC_DEBUG_FLAGS)" ALL + $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL mkdir -p public.dir - for i in $(TDATA) tzdata.zi; do \ + for i in $(TDATA_TO_CHECK) tzdata.zi; do \ $(zic) -v -d public.dir $$i 2>&1 || exit; \ done - $(zic) -v -d public.dir $(TDATA) + $(zic) -v -d public.dir $(TDATA_TO_CHECK) rm -fr public.dir # Check that the code works under various alternative @@ -790,8 +830,11 @@ check_time_t_alternatives: REDO='$(REDO)' \ install && \ diff $$quiet_option -r \ - time_t.dir/int64_t/etc/zoneinfo \ - time_t.dir/$$type/etc/zoneinfo && \ + time_t.dir/int64_t/etc \ + time_t.dir/$$type/etc && \ + diff $$quiet_option -r \ + time_t.dir/int64_t/usr/share \ + time_t.dir/$$type/usr/share && \ case $$type in \ int32_t) range=-2147483648,2147483647;; \ uint32_t) range=0,4294967296;; \ @@ -800,9 +843,9 @@ check_time_t_alternatives: *) range=-10000000000,10000000000;; \ esac && \ echo checking $$type zones ... && \ - time_t.dir/int64_t/etc/zdump -V -t $$range $$zones \ + time_t.dir/int64_t/usr/bin/zdump -V -t $$range $$zones \ >time_t.dir/int64_t.out && \ - time_t.dir/$$type/etc/zdump -V -t $$range $$zones \ + time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \ >time_t.dir/$$type.out && \ diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \ || exit; \ Modified: releng/10.3/contrib/tzdata/NEWS ============================================================================== --- releng/10.3/contrib/tzdata/NEWS Wed Mar 7 05:58:24 2018 (r330567) +++ releng/10.3/contrib/tzdata/NEWS Wed Mar 7 06:01:44 2018 (r330568) @@ -1,5 +1,147 @@ News for the tz database +Release 2018c - 2018-01-22 23:00:44 -0800 + + Briefly: + Revert Irish changes that relied on negative DST offsets. + + Changes to tm_isdst + + Revert the 2018a change to Europe/Dublin. As before, this change + does not affect UT offsets or abbreviations; it affects only + whether timestamps are considered to be standard time or + daylight-saving time, as expressed in the tm_isdst flag of C's + struct tm type. This reversion is intended to be a temporary + workaround for problems discovered with downstream uses of + releases 2018a and 2018b, which implemented Irish time by using + negative DST offsets in the Eire rules of the 'europe' file. + Although negative DST offsets have been part of tzcode for many + years and are supported by many platforms, they were not + documented before 2018a and ICU and OpenJDK do not currently + support them. A mechanism to export data to platforms lacking + support for negative DST is planned to be developed before the + change is reapplied. (Problems reported by Deborah Goldsmith and + Stephen Colebourne.) + + Changes to past time stamps + + Japanese DST transitions (1948-1951) were Sundays at 00:00, not + Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.) + + Changes to build procedure + + The build procedure now works around mawk 1.3.3's lack of support + for character class expressions. (Problem reported by Ohyama.) + + +Release 2018b - 2018-01-17 23:24:48 -0800 + + Briefly: + Fix a packaging problem in tz2018a, which was missing 'pacificnew'. + + Changes to build procedure + + The distribution now contains the file 'pacificnew' again. + This file was inadvertantly omitted in the 2018a distribution. + (Problem reported by Matias Fonzo.) + + +Release 2018a - 2018-01-12 22:29:21 -0800 + + Briefly: + São Tomé and Príncipe switched from +00 to +01. + Brazil's DST will now start on November's first Sunday. + Ireland's standard time is now in the summer, not the winter. + Use Debian-style installation locations, instead of 4.3BSD-style. + New zic option -t. + + Changes to past and future time stamps + + São Tomé and Príncipe switched from +00 to +01 on 2018-01-01 at + 01:00. (Thanks to Steffen Thorsen and Michael Deckers.) + + Changes to future time stamps + + Starting in 2018 southern Brazil will begin DST on November's + first Sunday instead of October's third Sunday. (Thanks to + Steffen Thorsen.) + + Changes to past time stamps + + A discrepancy of 4 s in timestamps before 1931 in South Sudan has + been corrected. The 'backzone' and 'zone.tab' files did not agree + with the 'africa' and 'zone1970.tab' files. (Problem reported by + Michael Deckers.) + + The abbreviation invented for Bolivia Summer Time (1931-2) is now + BST instead of BOST, to be more consistent with the convention + used for Latvian Summer Time (1918-9) and for British Summer Time. + + Changes to tm_isdst + + Change Europe/Dublin so that it observes Irish Standard Time (UT + +01) in summer and GMT (as negative daylight-saving) in winter, + instead of observing standard time (GMT) in winter and Irish + Summer Time (UT +01) in summer. This change does not affect UT + offsets or abbreviations; it affects only whether timestamps are + considered to be standard time or daylight-saving time, as + expressed in the tm_isdst flag of C's struct tm type. + (Discrepancy noted by Derick Rethans.) + + Changes to build procedure + + The default installation locations have been changed to mostly + match Debian circa 2017, instead of being designed as an add-on to + 4.3BSD circa 1986. This affects the Makefile macros TOPDIR, + TZDIR, MANDIR, and LIBDIR. New Makefile macros TZDEFAULT, USRDIR, + USRSHAREDIR, BINDIR, ZDUMPDIR, and ZICDIR let installers tailor + locations more precisely. (This responds to suggestions from + Brian Inglis and from Steve Summit.) + + The default installation procedure no longer creates the + backward-compatibility link US/Pacific-New, which causes + confusion during user setup (e.g., see Debian bug 815200). + Use 'make BACKWARD="backward pacificnew"' to create the link + anyway, for now. Eventually we plan to remove the link entirely. + + tzdata.zi now contains a version-number comment. + (Suggested by Tom Lane.) + + The Makefile now quotes values like BACKWARD more carefully when + passing them to the shell. (Problem reported by Zefram.) + + Builders no longer need to specify -DHAVE_SNPRINTF on platforms + that have snprintf and use pre-C99 compilers. (Problem reported + by Jon Skeet.) + + Changes to code + + zic has a new option -t FILE that specifies the location of the + file that determines local time when TZ is unset. The default for + this location can be configured via the new TZDEFAULT makefile + macro, which defaults to /etc/localtime. + + Diagnostics and commentary now distinguish UT from UTC more + carefully; see theory.html for more information about UT vs UTC. + + zic has been ported to GCC 8's -Wstringop-truncation option. + (Problem reported by Martin Sebor.) + + Changes to documentation and commentary + + The zic man page now documents the longstanding behavior that + times and years can be out of the usual range, with negative times + counting backwards from midnight and with year 0 preceding year 1. + (Problem reported by Michael Deckers.) + + The theory.html file now mentions the POSIX limit of six chars + per abbreviation, and lists alphabetic abbreviations used. + + The files tz-art.htm and tz-link.htm have been renamed to + tz-art.html and tz-link.html, respectively, for consistency with + other file names and to simplify web server configuration. + + Release 2017c - 2017-10-20 14:49:34 -0700 Briefly: @@ -895,8 +1037,8 @@ Release 2015f - 2015-08-10 18:06:56 -0700 (Thanks to Jon Skeet and Arthur David Olson.) Constraints on simultaneity are now documented. - The two characters '%z' in a zone format now stand for the UTC - offset, e.g., '-07' for seven hours behind UTC and '+0530' for + The two characters '%z' in a zone format now stand for the UT + offset, e.g., '-07' for seven hours behind UT and '+0530' for five hours and thirty minutes ahead. This better supports time zone abbreviations conforming to POSIX.1-2001 and later. @@ -1019,13 +1161,13 @@ Release 2015c - 2015-04-11 08:55:55 -0700 The spring 1988 transition was 1988-10-09, not 1988-10-02. The fall 1990 transition was 1990-03-11, not 1990-03-18. - Assume no UTC offset change for Pacific/Easter on 1890-01-01, + Assume no UT offset change for Pacific/Easter on 1890-01-01, and omit all transitions on Pacific/Easter from 1942 through 1946 since we have no data suggesting that they existed. One more zone has been turned into a link, as it differed from an existing zone only for older time stamps. As usual, - this change affects UTC offsets in pre-1970 time stamps only. + this change affects UT offsets in pre-1970 time stamps only. The zone's old contents have been moved to the 'backzone' file. The affected zone is America/Montreal. @@ -1055,7 +1197,7 @@ Release 2015b - 2015-03-19 23:28:11 -0700 Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, - these changes affect UTC offsets in pre-1970 time stamps only. + these changes affect UT offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: America/Antigua, America/Cayman, Pacific/Midway, and Pacific/Saipan. @@ -1107,7 +1249,7 @@ Release 2015a - 2015-01-29 22:35:20 -0800 Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, - these changes affect UTC offsets in pre-1970 time stamps only. + these changes affect UT offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait, and Asia/Muscat. @@ -1154,7 +1296,7 @@ Release 2014j - 2014-11-10 17:37:11 -0800 Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, - these changes affect UTC offsets in pre-1970 time stamps only. + these changes affect UT offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Addis_Ababa, Africa/Asmara, Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, @@ -1244,7 +1386,7 @@ Release 2014h - 2014-09-25 18:59:03 -0700 Some more zones have been turned into links, when they differed from existing zones only for older timestamps. As usual, - these changes affect UTC offsets in pre-1970 timestamps only. + these changes affect UT offsets in pre-1970 timestamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Blantyre, Africa/Bujumbura, Africa/Gaborone, Africa/Harare, Africa/Kigali, Africa/Lubumbashi, @@ -1329,7 +1471,7 @@ Release 2014g - 2014-08-28 12:31:23 -0700 Some more zones have been turned into links, when they differed from existing zones only for older timestamps. As usual, - these changes affect UTC offsets in pre-1970 timestamps only. + these changes affect UT offsets in pre-1970 timestamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Bangui, Africa/Brazzaville, Africa/Douala, Africa/Kinshasa, Africa/Libreville, Africa/Luanda, @@ -1479,7 +1621,7 @@ Release 2014f - 2014-08-05 17:42:36 -0700 standard and daylight saving time the abbreviations are AEST and AEDT instead of the former EST for both; similarly, ACST/ACDT, ACWST/ACWDT, and AWST/AWDT are now used instead of the former CST, CWST, and WST. - This change does not affect UTC offsets, only time zone abbreviations. + This change does not affect UT offsets, only time zone abbreviations. (Thanks to Rich Tibbett and many others.) Asia/Novokuznetsk shifts from NOVT to KRAT (remaining on UT +07) @@ -1516,8 +1658,8 @@ Release 2014f - 2014-08-05 17:42:36 -0700 Treindl sent helpful translations of two papers by Guo Qingsheng.) Some zones have been turned into links, when they differed from existing - zones only for older UTC offsets where data entries were likely invented. - These changes affect UTC offsets in pre-1970 timestamps only. This is + zones only for older UT offsets where data entries were likely invented. + These changes affect UT offsets in pre-1970 timestamps only. This is similar to the change in release 2013e, except this time for western Africa. The affected zones are: Africa/Bamako, Africa/Banjul, Africa/Conakry, Africa/Dakar, Africa/Freetown, Africa/Lome, Modified: releng/10.3/contrib/tzdata/README ============================================================================== --- releng/10.3/contrib/tzdata/README Wed Mar 7 05:58:24 2018 (r330567) +++ releng/10.3/contrib/tzdata/README Wed Mar 7 06:01:44 2018 (r330568) @@ -11,14 +11,14 @@ changes made by political bodies to time zone boundari and daylight-saving rules. See or the -file tz-link.htm for how to acquire the code and data. Once acquired, +file tz-link.html for how to acquire the code and data. Once acquired, read the comments in the file 'Makefile' and make any changes needed to make things right for your system, especially if you are using some platform other than GNU/Linux. Then run the following commands, substituting your desired installation directory for "$HOME/tzdir": make TOPDIR=$HOME/tzdir install - $HOME/tzdir/etc/zdump -v America/Los_Angeles + $HOME/tzdir/usr/bin/zdump -v America/Los_Angeles Historical local time information has been included here to: Modified: releng/10.3/contrib/tzdata/africa ============================================================================== --- releng/10.3/contrib/tzdata/africa Wed Mar 7 05:58:24 2018 (r330567) +++ releng/10.3/contrib/tzdata/africa Wed Mar 7 06:01:44 2018 (r330568) @@ -158,7 +158,6 @@ Link Africa/Abidjan Africa/Freetown # Sierra Leone Link Africa/Abidjan Africa/Lome # Togo Link Africa/Abidjan Africa/Nouakchott # Mauritania Link Africa/Abidjan Africa/Ouagadougou # Burkina Faso -Link Africa/Abidjan Africa/Sao_Tome # São Tomé and Príncipe Link Africa/Abidjan Atlantic/St_Helena # St Helena # Djibouti @@ -425,7 +424,7 @@ Link Africa/Nairobi Indian/Mayotte # # The Nautical Almanac for the Year 1970, p 264, is the source for -0:44:30. # -# In 1972 Liberia was the last country to switch from a UTC offset +# In 1972 Liberia was the last country to switch from a UT offset # that was not a multiple of 15 or 20 minutes. The 1972 change was on # 1972-01-07, according to an entry dated 1972-01-04 on p 330 of: # Presidential Papers: First year of the administration of @@ -1037,6 +1036,19 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Den # Inaccessible, Nightingale: uninhabited # São Tomé and Príncipe + +# From Steffen Thorsen (2018-01-08): +# Multiple sources tell that São Tomé changed from UTC to UTC+1 as +# they entered the year 2018. +# From Michael Deckers (2018-01-08): +# the switch is from 01:00 to 02:00 ... [Decree No. 25/2017] +# http://www.mnec.gov.st/index.php/publicacoes/documentos/file/90-decreto-lei-n-25-2017 + +Zone Africa/Sao_Tome 0:26:56 - LMT 1884 + -0:36:45 - LMT 1912 # Lisbon Mean Time + 0:00 - GMT 2018 Jan 1 01:00 + 1:00 - WAT + # Senegal # See Africa/Abidjan. Modified: releng/10.3/contrib/tzdata/asia ============================================================================== --- releng/10.3/contrib/tzdata/asia Wed Mar 7 05:58:24 2018 (r330567) +++ releng/10.3/contrib/tzdata/asia Wed Mar 7 06:01:44 2018 (r330568) @@ -50,7 +50,7 @@ # 9:00 KST KDT Korea when at +09 # 9:30 ACST Australian Central Standard Time # Otherwise, these tables typically use numeric abbreviations like +03 -# and +0330 for integer hour and minute UTC offsets. Although earlier +# and +0330 for integer hour and minute UT offsets. Although earlier # editions invented alphabetic time zone abbreviations for every # offset, this did not reflect common practice. # @@ -647,17 +647,17 @@ Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 # time", in which abolished the adoption of Western Standard Time in # western islands (listed above), which means the whole Japan # territory, including later occupations, adopt Japan Central Time -# (UTC+9). The adoption began on Oct 1, 1937. The original text can +# (UT+9). The adoption began on Oct 1, 1937. The original text can # be found on Wikisource: # https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 # -# That is, the time zone of Taipei switched to UTC+9 on Oct 1, 1937. +# That is, the time zone of Taipei switched to UT+9 on Oct 1, 1937. # From Yu-Cheng Chuang (2014-07-02): -# I've found more evidence about when the time zone was switched from UTC+9 -# back to UTC+8 after WW2. I believe it was on Sep 21, 1945. In a document +# I've found more evidence about when the time zone was switched from UT+9 +# back to UT+8 after WW2. I believe it was on Sep 21, 1945. In a document # during Japanese era [1] in which the officer told the staff to change time -# zone back to Western Standard Time (UTC+8) on Sep 21. And in another +# zone back to Western Standard Time (UT+8) on Sep 21. And in another # history page of National Cheng Kung University [2], on Sep 21 there is a # note "from today, switch back to Western Standard Time". From these two # materials, I believe that the time zone change happened on Sep 21. And @@ -1464,17 +1464,17 @@ Zone Asia/Jerusalem 2:20:54 - LMT 1880 # of the Japanese wanted to scrap daylight-saving time, as opposed to 30% who # wanted to keep it.) -# From Paul Eggert (2006-03-22): -# Shanks & Pottenger write that DST in Japan during those years was as follows: +# From Takayuki Nikai (2018-01-19): +# The source of information is Japanese law. +# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00219480428029.htm +# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00719500331039.htm +# ... In summary, it is written as follows. From 24:00 on the first Saturday +# in May, until 0:00 on the day after the second Saturday in September. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Japan 1948 only - May Sun>=1 2:00 1:00 D -Rule Japan 1948 1951 - Sep Sat>=8 2:00 0 S -Rule Japan 1949 only - Apr Sun>=1 2:00 1:00 D -Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D -# but the only locations using it (for birth certificates, presumably, since -# their audience is astrologers) were US military bases. For now, assume -# that for most purposes daylight-saving time was observed; otherwise, what -# would have been the point of the 1951 poll? +Rule Japan 1948 only - May Sat>=1 24:00 1:00 D +Rule Japan 1948 1951 - Sep Sun>=9 0:00 0 S +Rule Japan 1949 only - Apr Sat>=1 24:00 1:00 D +Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D # From Hideyuki Suzuki (1998-11-09): # 'Tokyo' usually stands for the former location of Tokyo Astronomical @@ -1505,7 +1505,7 @@ Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D # # ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which # means the whole Japan territory, including later occupations, adopt Japan -# Central Time (UTC+9). The adoption began on Oct 1, 1937. +# Central Time (UT+9). The adoption began on Oct 1, 1937. # https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -2066,8 +2066,8 @@ Zone Asia/Kuching 7:21:20 - LMT 1926 Mar # Maldives # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Indian/Maldives 4:54:00 - LMT 1880 # Male - 4:54:00 - MMT 1960 # Male Mean Time +Zone Indian/Maldives 4:54:00 - LMT 1880 # Malé + 4:54:00 - MMT 1960 # Malé Mean Time 5:00 - +05 # Mongolia Modified: releng/10.3/contrib/tzdata/australasia ============================================================================== --- releng/10.3/contrib/tzdata/australasia Wed Mar 7 05:58:24 2018 (r330567) +++ releng/10.3/contrib/tzdata/australasia Wed Mar 7 06:01:44 2018 (r330568) @@ -683,8 +683,8 @@ Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Hon # From Steffen Thorsen (2012-07-25) # ... we double checked by calling hotels and offices based in Tokelau asking # about the time there, and they all told a time that agrees with UTC+13.... -# Shanks says UTC-10 from 1901 [but] ... there is a good chance the change -# actually was to UTC-11 back then. +# Shanks says UT-10 from 1901 [but] ... there is a good chance the change +# actually was to UT-11 back then. # # From Paul Eggert (2012-07-25) # A Google Books snippet of Appendix to the Journals of the House of @@ -1450,7 +1450,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # # From Paul Eggert (2006-03-22): # The Department of Internal Affairs (DIA) maintains a brief history, -# as does Carol Squires; see tz-link.htm for the full references. +# as does Carol Squires; see tz-link.html for the full references. # Use these sources in preference to Shanks & Pottenger. # # For Chatham, IATA SSIM (1991/1999) gives the NZ rules but with Modified: releng/10.3/contrib/tzdata/backzone ============================================================================== --- releng/10.3/contrib/tzdata/backzone Wed Mar 7 05:58:24 2018 (r330567) +++ releng/10.3/contrib/tzdata/backzone Wed Mar 7 06:01:44 2018 (r330568) @@ -145,11 +145,6 @@ Zone Africa/Gaborone 1:43:40 - LMT 1885 Zone Africa/Harare 2:04:12 - LMT 1903 Mar 2:00 - CAT -# South Sudan -Zone Africa/Juba 2:06:24 - LMT 1931 - 2:00 Sudan CA%sT 2000 Jan 15 12:00 - 3:00 - EAT - # Uganda Zone Africa/Kampala 2:09:40 - LMT 1928 Jul 3:00 - EAT 1930 @@ -241,11 +236,6 @@ Zone Africa/Ouagadougou -0:06:04 - LMT 1912 Zone Africa/Porto-Novo 0:10:28 - LMT 1912 Jan 1 0:00 - GMT 1934 Feb 26 1:00 - WAT - -# São Tomé and Príncipe -Zone Africa/Sao_Tome 0:26:56 - LMT 1884 - -0:36:32 - LMT 1912 # Lisbon Mean Time - 0:00 - GMT # Mali (northern) Zone Africa/Timbuktu -0:12:04 - LMT 1912 Modified: releng/10.3/contrib/tzdata/europe ============================================================================== --- releng/10.3/contrib/tzdata/europe Wed Mar 7 05:58:24 2018 (r330567) +++ releng/10.3/contrib/tzdata/europe Wed Mar 7 06:01:44 2018 (r330568) @@ -68,14 +68,15 @@ # 0:00 WET WEST WEMT Western Europe # 0:19:32.13 AMT* NST* Amsterdam, Netherlands Summer (1835-1937) # 1:00 BST British Standard (1968-1971) +# 1:00 IST GMT Irish Standard (1968-) with winter DST # 1:00 CET CEST CEMT Central Europe # 1:00:14 SET Swedish (1879-1899) # 1:36:34 RMT* LST* Riga, Latvian Summer (1880-1926)* # 2:00 EET EEST Eastern Europe # 3:00 MSK MSD MDST* Moscow -# From Peter Ilieve (1994-12-04), -# The original six [EU members]: Belgium, France, (West) Germany, Italy, +# From Peter Ilieve (1994-12-04), re EEC/EC/EU members: +# The original six: Belgium, France, (West) Germany, Italy, # Luxembourg, the Netherlands. # Plus, from 1 Jan 73: Denmark, Ireland, United Kingdom. # Plus, from 1 Jan 81: Greece. @@ -278,16 +279,31 @@ # The following claim by Shanks & Pottenger is possible though doubtful; # we'll ignore it for now. # * Dublin's 1971-10-31 switch was at 02:00, even though London's was 03:00. + +# From Paul Eggert (2017-12-04): # +# Dunsink Observatory (8 km NW of Dublin's center) was to Dublin as +# Greenwich was to London. For example: # -# Whitman says Dublin Mean Time was -0:25:21, which is more precise than -# Shanks & Pottenger. -# Perhaps this was Dunsink Observatory Time, as Dunsink Observatory -# (8 km NW of Dublin's center) seemingly was to Dublin as Greenwich was -# to London. For example: -# # "Timeball on the ballast office is down. Dunsink time." # -- James Joyce, Ulysses +# +# The abbreviation DMT stood for "Dublin Mean Time" or "Dunsink Mean Time"; +# this being Ireland, opinions differed. +# +# Whitman says Dublin/Dunsink Mean Time was UT-00:25:21, which agrees +# with measurements of recent visitors to the Meridian Room of Dunsink +# Observatory; see Malone D. Dunsink and timekeeping. 2016-01-24. +# . Malone +# writes that the Nautical Almanac listed UT-00:25:22 until 1896, when +# it moved to UT-00:25:21.1 (I confirmed that the 1893 edition used +# the former and the 1896 edition used the latter). Evidently the +# news of this change propagated slowly, as Milne 1899 still lists +# UT-00:25:22 and cites the International Telegraph Bureau. As it is +# not clear that there was any practical significance to the change +# from UT-00:25:22 to UT-00:25:21.1 in civil timekeeping, omit this +# transition for now and just use the latter value, omitting its +# fraction since our format cannot represent fractions. # "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time # was among various actions undertaken by the 'English' government that @@ -347,12 +363,28 @@ # regulations. I spoke this morning with the Secretary of the Department of # Justice (tel +353 1 678 9711) who confirmed to me that the correct name is # "Irish Summer Time", abbreviated to "IST". +# +# From Paul Eggert (2017-12-07): +# The 1996 anonymous contributor's goal was to determine the correct +# abbreviation for summer time in Dublin and so the contributor +# focused on the "IST", not on the "Irish Summer Time". Though the +# "IST" was correct, the "Irish Summer Time" appears to have been an +# error, as Ireland's Standard Time (Amendment) Act, 1971 states that +# standard time in Ireland remains at UT +01 and is observed in +# summer, and that Greenwich mean time is observed in winter. (Thanks +# to Derick Rethans for pointing out the error.) That is, when +# Ireland amended the 1968 act that established UT +01 as Irish +# Standard Time, it left standard time unchanged and established GMT +# as a negative daylight saving time in winter. So, in this database +# IST stands for Irish Summer Time for timestamps before 1968, and for +# Irish Standard Time after that. See: +# http://www.irishstatutebook.ie/eli/1971/act/17/enacted/en/print # Michael Deckers (2017-06-01) gave the following URLs for Ireland's # Summer Time Act, 1925 and Summer Time Orders, 1926 and 1947: -# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print.html -# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print.html -# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print.html +# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print +# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print +# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Summer Time Act, 1916 @@ -476,9 +508,23 @@ Link Europe/London Europe/Jersey Link Europe/London Europe/Guernsey Link Europe/London Europe/Isle_of_Man +# From Paul Eggert (2018-01-19): +# The following is like GB-Eire and EU, except with standard time in +# summer and negative daylight saving time in winter. +# Although currently commented out, this will need to become uncommented +# once the ICU/OpenJDK workaround is removed; see below. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +#Rule Eire 1971 only - Oct 31 2:00u -1:00 GMT +#Rule Eire 1972 1980 - Mar Sun>=16 2:00u 0 IST +#Rule Eire 1972 1980 - Oct Sun>=23 2:00u -1:00 GMT +#Rule Eire 1981 max - Mar lastSun 1:00u 0 IST +#Rule Eire 1981 1989 - Oct Sun>=23 1:00u -1:00 GMT +#Rule Eire 1990 1995 - Oct Sun>=22 1:00u -1:00 GMT +#Rule Eire 1996 max - Oct lastSun 1:00u -1:00 GMT + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 - -0:25:21 - DMT 1916 May 21 2:00s # Dublin MT + -0:25:21 - DMT 1916 May 21 2:00s -0:25:21 1:00 IST 1916 Oct 1 2:00s 0:00 GB-Eire %s 1921 Dec 6 # independence 0:00 GB-Eire GMT/IST 1940 Feb 25 2:00s @@ -487,16 +533,33 @@ Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 0:00 1:00 IST 1947 Nov 2 2:00s 0:00 - GMT 1948 Apr 18 2:00s 0:00 GB-Eire GMT/IST 1968 Oct 27 +# From Paul Eggert (2018-01-18): +# The next line should look like this: +# 1:00 Eire IST/GMT +# However, in January 2018 we discovered that the Eire rules cause +# problems with tests for ICU: +# https://mm.icann.org/pipermail/tz/2018-January/025825.html +# and with tests for OpenJDK: +# https://mm.icann.org/pipermail/tz/2018-January/025822.html +# To work around this problem, use a traditional approximation for +# time stamps after 1971-10-31 02:00 UTC, to give ICU and OpenJDK +# developers breathing room to fix bugs. This approximation has +# correct UTC offsets, but results in tm_isdst flags are the reverse +# of what they should be. This workaround is temporary and should be +# removed reasonably soon. 1:00 - IST 1971 Oct 31 2:00u 0:00 GB-Eire GMT/IST 1996 0:00 EU GMT/IST +# End of workaround for ICU and OpenJDK bugs. + ############################################################################### # Europe -# EU rules are for the European Union, previously known as the EC, EEC, -# Common Market, etc. +# The following rules are for the European Union and for its +# predecessor organization, the European Communities. +# For brevity they are called "EU rules" elsewhere in this file. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S @@ -929,7 +992,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850 # The page http://www.retsinfo.dk/_GETDOCI_/ACCN/A18930008330-REGL # confirms this, and states that the law was put forth 1893-03-29. # -# The EU treaty with effect from 1973: +# The EU [actually, EEC and Euratom] treaty with effect from 1973: # http://www.retsinfo.dk/_GETDOCI_/ACCN/A19722110030-REGL # # This provoked a new law from 1974 to make possible summer time changes @@ -985,9 +1048,10 @@ Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Tórs # East Greenland and Franz Josef Land, but we don't know their time zones. # My source for this is Wilhelm Dege's book mentioned under Svalbard. # -# From Paul Eggert (2006-03-22): -# Greenland joined the EU as part of Denmark, obtained home rule on 1979-05-01, -# and left the EU on 1985-02-01. It therefore should have been using EU +# From Paul Eggert (2017-12-10): +# Greenland joined the European Communities as part of Denmark, +# obtained home rule on 1979-05-01, and left the European Communities +# on 1985-02-01. It therefore should have been using EU # rules at least through 1984. Shanks & Pottenger say Scoresbysund and Godthåb # used C-Eur rules after 1980, but IATA SSIM (1991/1996) says they use EU # rules since at least 1991. Assume EU rules since 1980. @@ -1301,7 +1365,7 @@ Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01 # From Markus Kuhn (1998-09-29): # The German time zone web site by the Physikalisch-Technische # Bundesanstalt contains DST information back to 1916. -# [See tz-link.htm for the URL.] +# [See tz-link.html for the URL.] # From Jörg Schilling (2002-10-23): # In 1945, Berlin was switched to Moscow Summer time (GMT+4) by @@ -1398,7 +1462,7 @@ Zone Europe/Athens 1:34:52 - LMT 1895 Sep 14 1:00 Greece CE%sT 1944 Apr 4 2:00 Greece EE%sT 1981 # Shanks & Pottenger say it switched to C-Eur in 1981; - # go with EU instead, since Greece joined it on Jan 1. + # go with EU rules instead, since Greece joined Jan 1. 2:00 EU EE%sT # Hungary @@ -2097,7 +2161,7 @@ Zone Europe/Warsaw 1:24:00 - LMT 1880 # IATA SSIM (1991/1992) reports that the Azores were at -1:00. # IATA SSIM (1993-02) says +0:00; later issues (through 1996-09) say -1:00. # Guess that the Azores changed to EU rules in 1992 (since that's when Portugal -# harmonized with the EU), and that they stayed +0:00 that winter. +# harmonized with EU rules), and that they stayed +0:00 that winter. # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # DSH writes that despite Decree 1,469 (1915), the change to the clocks was not @@ -2772,9 +2836,9 @@ Zone Asia/Omsk 4:53:30 - LMT 1919 Nov 14 # # https://regnum.ru/news/society/1957270.html # has some historical data for Altai Krai: -# before 1957: west part on UTC+6, east on UTC+7 -# after 1957: UTC+7 -# since 1995: UTC+6 +# before 1957: west part on UT+6, east on UT+7 +# after 1957: UT+7 +# since 1995: UT+6 # http://barnaul.rusplt.ru/index/pochemu_altajskij_kraj_okazalsja_v_neprivychnom_chasovom_pojase-17648.html # confirms that and provides more details including 1995-05-28 transition date. @@ -3581,6 +3645,17 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See abo # From Paul Eggert (2016-09-07): # The change is permanent, so this is the new standard time in Turkey. # It takes effect today, which is not much notice. + +# From Kıvanç Yazan (2017-10-28): +# Turkey will go back to Daylight Saving Time starting 2018-10. +# http://www.resmigazete.gov.tr/eskiler/2017/10/20171028-5.pdf +# +# From Even Scharning (2017-11-08): *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 7 06:04:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10726F2F1B3; Wed, 7 Mar 2018 06:04:27 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFA837FBF0; Wed, 7 Mar 2018 06:04:26 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 907121D8F0; Wed, 7 Mar 2018 06:04:26 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2764Qpc093266; Wed, 7 Mar 2018 06:04:26 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2764Pr2093260; Wed, 7 Mar 2018 06:04:25 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803070604.w2764Pr2093260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 7 Mar 2018 06:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r330569 - in releng: 10.3/contrib/file 10.3/contrib/file/doc 10.3/contrib/file/magic 10.3/contrib/file/magic/Magdir 10.3/contrib/file/python 10.3/contrib/file/src 10.3/contrib/file/test... X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 10.3/contrib/file 10.3/contrib/file/doc 10.3/contrib/file/magic 10.3/contrib/file/magic/Magdir 10.3/contrib/file/python 10.3/contrib/file/src 10.3/contrib/file/tests 10.3/lib/libmagic 10.4/... X-SVN-Commit-Revision: 330569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 06:04:27 -0000 Author: gordon Date: Wed Mar 7 06:04:25 2018 New Revision: 330569 URL: https://svnweb.freebsd.org/changeset/base/330569 Log: Update file(1) to new version with security update. [EN-18:02.file] Approved by: so Security: FreeBSD-EN-18:02.file Security: CVE-2017-1000249 Added: releng/10.3/contrib/file/magic/Magdir/algol68 releng/10.3/contrib/file/magic/Magdir/apache releng/10.3/contrib/file/magic/Magdir/application releng/10.3/contrib/file/magic/Magdir/apt releng/10.3/contrib/file/magic/Magdir/ber releng/10.3/contrib/file/magic/Magdir/bhl releng/10.3/contrib/file/magic/Magdir/bioinformatics releng/10.3/contrib/file/magic/Magdir/coff releng/10.3/contrib/file/magic/Magdir/coverage releng/10.3/contrib/file/magic/Magdir/der releng/10.3/contrib/file/magic/Magdir/finger releng/10.3/contrib/file/magic/Magdir/flif releng/10.3/contrib/file/magic/Magdir/gconv releng/10.3/contrib/file/magic/Magdir/gpu releng/10.3/contrib/file/magic/Magdir/microfocus releng/10.3/contrib/file/magic/Magdir/pc88 releng/10.3/contrib/file/magic/Magdir/pc98 releng/10.3/contrib/file/magic/Magdir/polyml releng/10.3/contrib/file/magic/Magdir/psl releng/10.3/contrib/file/magic/Magdir/vacuum-cleaner releng/10.3/contrib/file/magic/Magdir/webassembly releng/10.3/contrib/file/magic/Magdir/x68000 releng/10.3/contrib/file/magic/Magdir/yara releng/10.3/contrib/file/src/der.c releng/10.3/contrib/file/src/der.h releng/10.3/contrib/file/src/dprintf.c releng/10.3/contrib/file/tests/hddrawcopytool.result releng/10.4/contrib/file/magic/Magdir/apache releng/10.4/contrib/file/magic/Magdir/bhl releng/10.4/contrib/file/magic/Magdir/gconv releng/10.4/contrib/file/magic/Magdir/gpu releng/10.4/contrib/file/magic/Magdir/webassembly releng/10.4/contrib/file/magic/Magdir/yara releng/10.4/contrib/file/tests/hddrawcopytool.result releng/11.1/contrib/file/magic/Magdir/apache releng/11.1/contrib/file/magic/Magdir/bhl releng/11.1/contrib/file/magic/Magdir/gconv releng/11.1/contrib/file/magic/Magdir/gpu releng/11.1/contrib/file/magic/Magdir/webassembly releng/11.1/contrib/file/magic/Magdir/yara releng/11.1/contrib/file/tests/hddrawcopytool.result Deleted: releng/10.3/contrib/file/python/README releng/10.3/contrib/file/src/magic.h Modified: releng/10.3/contrib/file/ChangeLog releng/10.3/contrib/file/README releng/10.3/contrib/file/TODO releng/10.3/contrib/file/aclocal.m4 releng/10.3/contrib/file/config.guess releng/10.3/contrib/file/config.h.in releng/10.3/contrib/file/config.sub releng/10.3/contrib/file/configure releng/10.3/contrib/file/configure.ac releng/10.3/contrib/file/doc/file.man releng/10.3/contrib/file/doc/libmagic.man releng/10.3/contrib/file/doc/magic.man releng/10.3/contrib/file/ltmain.sh releng/10.3/contrib/file/magic/Localstuff releng/10.3/contrib/file/magic/Magdir/adventure releng/10.3/contrib/file/magic/Magdir/amanda releng/10.3/contrib/file/magic/Magdir/amigaos releng/10.3/contrib/file/magic/Magdir/android releng/10.3/contrib/file/magic/Magdir/animation releng/10.3/contrib/file/magic/Magdir/apple releng/10.3/contrib/file/magic/Magdir/archive releng/10.3/contrib/file/magic/Magdir/att3b releng/10.3/contrib/file/magic/Magdir/audio releng/10.3/contrib/file/magic/Magdir/blackberry releng/10.3/contrib/file/magic/Magdir/blender releng/10.3/contrib/file/magic/Magdir/c-lang releng/10.3/contrib/file/magic/Magdir/cad releng/10.3/contrib/file/magic/Magdir/cafebabe releng/10.3/contrib/file/magic/Magdir/claris releng/10.3/contrib/file/magic/Magdir/clipper releng/10.3/contrib/file/magic/Magdir/commands releng/10.3/contrib/file/magic/Magdir/compress releng/10.3/contrib/file/magic/Magdir/console releng/10.3/contrib/file/magic/Magdir/cups releng/10.3/contrib/file/magic/Magdir/database releng/10.3/contrib/file/magic/Magdir/diff releng/10.3/contrib/file/magic/Magdir/dolby releng/10.3/contrib/file/magic/Magdir/dump releng/10.3/contrib/file/magic/Magdir/dyadic releng/10.3/contrib/file/magic/Magdir/editors releng/10.3/contrib/file/magic/Magdir/elf releng/10.3/contrib/file/magic/Magdir/filesystems releng/10.3/contrib/file/magic/Magdir/flash releng/10.3/contrib/file/magic/Magdir/fonts releng/10.3/contrib/file/magic/Magdir/fortran releng/10.3/contrib/file/magic/Magdir/fsav releng/10.3/contrib/file/magic/Magdir/games releng/10.3/contrib/file/magic/Magdir/gcc releng/10.3/contrib/file/magic/Magdir/geo releng/10.3/contrib/file/magic/Magdir/gnu releng/10.3/contrib/file/magic/Magdir/gpt releng/10.3/contrib/file/magic/Magdir/gringotts releng/10.3/contrib/file/magic/Magdir/hitachi-sh releng/10.3/contrib/file/magic/Magdir/ibm370 releng/10.3/contrib/file/magic/Magdir/ibm6000 releng/10.3/contrib/file/magic/Magdir/icc releng/10.3/contrib/file/magic/Magdir/images releng/10.3/contrib/file/magic/Magdir/intel releng/10.3/contrib/file/magic/Magdir/isz releng/10.3/contrib/file/magic/Magdir/java releng/10.3/contrib/file/magic/Magdir/jpeg releng/10.3/contrib/file/magic/Magdir/kerberos releng/10.3/contrib/file/magic/Magdir/kml releng/10.3/contrib/file/magic/Magdir/linux releng/10.3/contrib/file/magic/Magdir/lisp releng/10.3/contrib/file/magic/Magdir/m4 releng/10.3/contrib/file/magic/Magdir/mach releng/10.3/contrib/file/magic/Magdir/macintosh releng/10.3/contrib/file/magic/Magdir/make releng/10.3/contrib/file/magic/Magdir/maple releng/10.3/contrib/file/magic/Magdir/marc21 releng/10.3/contrib/file/magic/Magdir/mathematica releng/10.3/contrib/file/magic/Magdir/metastore releng/10.3/contrib/file/magic/Magdir/meteorological releng/10.3/contrib/file/magic/Magdir/mime releng/10.3/contrib/file/magic/Magdir/misctools releng/10.3/contrib/file/magic/Magdir/modem releng/10.3/contrib/file/magic/Magdir/mozilla releng/10.3/contrib/file/magic/Magdir/msdos releng/10.3/contrib/file/magic/Magdir/msvc releng/10.3/contrib/file/magic/Magdir/msx releng/10.3/contrib/file/magic/Magdir/mup releng/10.3/contrib/file/magic/Magdir/nasa releng/10.3/contrib/file/magic/Magdir/netbsd releng/10.3/contrib/file/magic/Magdir/netscape releng/10.3/contrib/file/magic/Magdir/nitpicker releng/10.3/contrib/file/magic/Magdir/os2 releng/10.3/contrib/file/magic/Magdir/os9 releng/10.3/contrib/file/magic/Magdir/pbf releng/10.3/contrib/file/magic/Magdir/pdf releng/10.3/contrib/file/magic/Magdir/pdp releng/10.3/contrib/file/magic/Magdir/perl releng/10.3/contrib/file/magic/Magdir/pgf releng/10.3/contrib/file/magic/Magdir/pgp releng/10.3/contrib/file/magic/Magdir/printer releng/10.3/contrib/file/magic/Magdir/project releng/10.3/contrib/file/magic/Magdir/psdbms releng/10.3/contrib/file/magic/Magdir/python releng/10.3/contrib/file/magic/Magdir/riff releng/10.3/contrib/file/magic/Magdir/ruby releng/10.3/contrib/file/magic/Magdir/sccs releng/10.3/contrib/file/magic/Magdir/scientific releng/10.3/contrib/file/magic/Magdir/sendmail releng/10.3/contrib/file/magic/Magdir/sequent releng/10.3/contrib/file/magic/Magdir/sgml releng/10.3/contrib/file/magic/Magdir/sharc releng/10.3/contrib/file/magic/Magdir/sinclair releng/10.3/contrib/file/magic/Magdir/sketch releng/10.3/contrib/file/magic/Magdir/sql releng/10.3/contrib/file/magic/Magdir/ssl releng/10.3/contrib/file/magic/Magdir/sysex releng/10.3/contrib/file/magic/Magdir/terminfo releng/10.3/contrib/file/magic/Magdir/vms releng/10.3/contrib/file/magic/Magdir/vmware releng/10.3/contrib/file/magic/Magdir/vorbis releng/10.3/contrib/file/magic/Magdir/windows releng/10.3/contrib/file/magic/Magdir/wordprocessors releng/10.3/contrib/file/magic/Magdir/xenix releng/10.3/contrib/file/magic/Magdir/xilinx releng/10.3/contrib/file/magic/Magdir/xwindows releng/10.3/contrib/file/magic/Makefile.am releng/10.3/contrib/file/magic/Makefile.in releng/10.3/contrib/file/python/magic.py releng/10.3/contrib/file/python/setup.py releng/10.3/contrib/file/src/Makefile.am releng/10.3/contrib/file/src/Makefile.in releng/10.3/contrib/file/src/apprentice.c releng/10.3/contrib/file/src/ascmagic.c releng/10.3/contrib/file/src/cdf.c releng/10.3/contrib/file/src/cdf.h releng/10.3/contrib/file/src/cdf_time.c releng/10.3/contrib/file/src/compress.c releng/10.3/contrib/file/src/file.c releng/10.3/contrib/file/src/file.h releng/10.3/contrib/file/src/file_opts.h releng/10.3/contrib/file/src/fmtcheck.c releng/10.3/contrib/file/src/fsmagic.c releng/10.3/contrib/file/src/funcs.c releng/10.3/contrib/file/src/is_tar.c releng/10.3/contrib/file/src/magic.c releng/10.3/contrib/file/src/magic.h.in releng/10.3/contrib/file/src/print.c releng/10.3/contrib/file/src/readcdf.c releng/10.3/contrib/file/src/readelf.c releng/10.3/contrib/file/src/readelf.h releng/10.3/contrib/file/src/softmagic.c releng/10.3/contrib/file/src/vasprintf.c releng/10.3/contrib/file/tests/Makefile.am releng/10.3/contrib/file/tests/Makefile.in releng/10.3/contrib/file/tests/test.c releng/10.3/lib/libmagic/Makefile releng/10.3/lib/libmagic/config.h releng/10.4/contrib/file/ChangeLog releng/10.4/contrib/file/aclocal.m4 releng/10.4/contrib/file/config.guess releng/10.4/contrib/file/config.sub releng/10.4/contrib/file/configure releng/10.4/contrib/file/configure.ac releng/10.4/contrib/file/doc/file.man releng/10.4/contrib/file/doc/libmagic.man releng/10.4/contrib/file/doc/magic.man releng/10.4/contrib/file/magic/Localstuff releng/10.4/contrib/file/magic/Magdir/adventure releng/10.4/contrib/file/magic/Magdir/amanda releng/10.4/contrib/file/magic/Magdir/amigaos releng/10.4/contrib/file/magic/Magdir/android releng/10.4/contrib/file/magic/Magdir/animation releng/10.4/contrib/file/magic/Magdir/apple releng/10.4/contrib/file/magic/Magdir/archive releng/10.4/contrib/file/magic/Magdir/att3b releng/10.4/contrib/file/magic/Magdir/audio releng/10.4/contrib/file/magic/Magdir/blackberry releng/10.4/contrib/file/magic/Magdir/blender releng/10.4/contrib/file/magic/Magdir/c-lang releng/10.4/contrib/file/magic/Magdir/cad releng/10.4/contrib/file/magic/Magdir/cafebabe releng/10.4/contrib/file/magic/Magdir/clipper releng/10.4/contrib/file/magic/Magdir/coff releng/10.4/contrib/file/magic/Magdir/commands releng/10.4/contrib/file/magic/Magdir/compress releng/10.4/contrib/file/magic/Magdir/console releng/10.4/contrib/file/magic/Magdir/cups releng/10.4/contrib/file/magic/Magdir/database releng/10.4/contrib/file/magic/Magdir/der releng/10.4/contrib/file/magic/Magdir/diff releng/10.4/contrib/file/magic/Magdir/dolby releng/10.4/contrib/file/magic/Magdir/dump releng/10.4/contrib/file/magic/Magdir/dyadic releng/10.4/contrib/file/magic/Magdir/editors releng/10.4/contrib/file/magic/Magdir/filesystems releng/10.4/contrib/file/magic/Magdir/flash releng/10.4/contrib/file/magic/Magdir/fonts releng/10.4/contrib/file/magic/Magdir/fsav releng/10.4/contrib/file/magic/Magdir/games releng/10.4/contrib/file/magic/Magdir/geo releng/10.4/contrib/file/magic/Magdir/gnu releng/10.4/contrib/file/magic/Magdir/gpt releng/10.4/contrib/file/magic/Magdir/gringotts releng/10.4/contrib/file/magic/Magdir/hitachi-sh releng/10.4/contrib/file/magic/Magdir/ibm370 releng/10.4/contrib/file/magic/Magdir/ibm6000 releng/10.4/contrib/file/magic/Magdir/icc releng/10.4/contrib/file/magic/Magdir/images releng/10.4/contrib/file/magic/Magdir/intel releng/10.4/contrib/file/magic/Magdir/isz releng/10.4/contrib/file/magic/Magdir/jpeg releng/10.4/contrib/file/magic/Magdir/kerberos releng/10.4/contrib/file/magic/Magdir/kml releng/10.4/contrib/file/magic/Magdir/linux releng/10.4/contrib/file/magic/Magdir/lisp releng/10.4/contrib/file/magic/Magdir/m4 releng/10.4/contrib/file/magic/Magdir/macintosh releng/10.4/contrib/file/magic/Magdir/make releng/10.4/contrib/file/magic/Magdir/maple releng/10.4/contrib/file/magic/Magdir/marc21 releng/10.4/contrib/file/magic/Magdir/mathematica releng/10.4/contrib/file/magic/Magdir/metastore releng/10.4/contrib/file/magic/Magdir/meteorological releng/10.4/contrib/file/magic/Magdir/microfocus releng/10.4/contrib/file/magic/Magdir/mime releng/10.4/contrib/file/magic/Magdir/misctools releng/10.4/contrib/file/magic/Magdir/modem releng/10.4/contrib/file/magic/Magdir/mozilla releng/10.4/contrib/file/magic/Magdir/msdos releng/10.4/contrib/file/magic/Magdir/msvc releng/10.4/contrib/file/magic/Magdir/msx releng/10.4/contrib/file/magic/Magdir/mup releng/10.4/contrib/file/magic/Magdir/nasa releng/10.4/contrib/file/magic/Magdir/netbsd releng/10.4/contrib/file/magic/Magdir/netscape releng/10.4/contrib/file/magic/Magdir/nitpicker releng/10.4/contrib/file/magic/Magdir/os2 releng/10.4/contrib/file/magic/Magdir/os9 releng/10.4/contrib/file/magic/Magdir/pbf releng/10.4/contrib/file/magic/Magdir/pc88 releng/10.4/contrib/file/magic/Magdir/pc98 releng/10.4/contrib/file/magic/Magdir/pdf releng/10.4/contrib/file/magic/Magdir/pdp releng/10.4/contrib/file/magic/Magdir/perl releng/10.4/contrib/file/magic/Magdir/pgf releng/10.4/contrib/file/magic/Magdir/pgp releng/10.4/contrib/file/magic/Magdir/printer releng/10.4/contrib/file/magic/Magdir/project releng/10.4/contrib/file/magic/Magdir/psdbms releng/10.4/contrib/file/magic/Magdir/python releng/10.4/contrib/file/magic/Magdir/riff releng/10.4/contrib/file/magic/Magdir/ruby releng/10.4/contrib/file/magic/Magdir/sccs releng/10.4/contrib/file/magic/Magdir/scientific releng/10.4/contrib/file/magic/Magdir/sendmail releng/10.4/contrib/file/magic/Magdir/sequent releng/10.4/contrib/file/magic/Magdir/sgml releng/10.4/contrib/file/magic/Magdir/sharc releng/10.4/contrib/file/magic/Magdir/sketch releng/10.4/contrib/file/magic/Magdir/sql releng/10.4/contrib/file/magic/Magdir/ssl releng/10.4/contrib/file/magic/Magdir/sysex releng/10.4/contrib/file/magic/Magdir/terminfo releng/10.4/contrib/file/magic/Magdir/vms releng/10.4/contrib/file/magic/Magdir/vmware releng/10.4/contrib/file/magic/Magdir/vorbis releng/10.4/contrib/file/magic/Magdir/windows releng/10.4/contrib/file/magic/Magdir/xenix releng/10.4/contrib/file/magic/Magdir/xilinx releng/10.4/contrib/file/magic/Magdir/xwindows releng/10.4/contrib/file/magic/Makefile.am releng/10.4/contrib/file/magic/Makefile.in releng/10.4/contrib/file/python/magic.py releng/10.4/contrib/file/src/apprentice.c releng/10.4/contrib/file/src/cdf.c releng/10.4/contrib/file/src/cdf.h releng/10.4/contrib/file/src/cdf_time.c releng/10.4/contrib/file/src/compress.c releng/10.4/contrib/file/src/der.c releng/10.4/contrib/file/src/file.h releng/10.4/contrib/file/src/fsmagic.c releng/10.4/contrib/file/src/funcs.c releng/10.4/contrib/file/src/is_tar.c releng/10.4/contrib/file/src/magic.c releng/10.4/contrib/file/src/magic.h.in releng/10.4/contrib/file/src/print.c releng/10.4/contrib/file/src/readcdf.c releng/10.4/contrib/file/src/readelf.c releng/10.4/contrib/file/src/readelf.h releng/10.4/contrib/file/src/softmagic.c releng/10.4/contrib/file/src/vasprintf.c releng/10.4/contrib/file/tests/Makefile.am releng/10.4/contrib/file/tests/Makefile.in releng/10.4/contrib/file/tests/test.c releng/10.4/lib/libmagic/config.h releng/11.1/contrib/file/ChangeLog releng/11.1/contrib/file/aclocal.m4 releng/11.1/contrib/file/config.guess releng/11.1/contrib/file/config.sub releng/11.1/contrib/file/configure releng/11.1/contrib/file/configure.ac releng/11.1/contrib/file/doc/file.man releng/11.1/contrib/file/doc/libmagic.man releng/11.1/contrib/file/doc/magic.man releng/11.1/contrib/file/magic/Localstuff releng/11.1/contrib/file/magic/Magdir/adventure releng/11.1/contrib/file/magic/Magdir/amanda releng/11.1/contrib/file/magic/Magdir/amigaos releng/11.1/contrib/file/magic/Magdir/android releng/11.1/contrib/file/magic/Magdir/animation releng/11.1/contrib/file/magic/Magdir/apple releng/11.1/contrib/file/magic/Magdir/archive releng/11.1/contrib/file/magic/Magdir/att3b releng/11.1/contrib/file/magic/Magdir/audio releng/11.1/contrib/file/magic/Magdir/blackberry releng/11.1/contrib/file/magic/Magdir/blender releng/11.1/contrib/file/magic/Magdir/c-lang releng/11.1/contrib/file/magic/Magdir/cad releng/11.1/contrib/file/magic/Magdir/cafebabe releng/11.1/contrib/file/magic/Magdir/clipper releng/11.1/contrib/file/magic/Magdir/coff releng/11.1/contrib/file/magic/Magdir/commands releng/11.1/contrib/file/magic/Magdir/compress releng/11.1/contrib/file/magic/Magdir/console releng/11.1/contrib/file/magic/Magdir/cups releng/11.1/contrib/file/magic/Magdir/database releng/11.1/contrib/file/magic/Magdir/der releng/11.1/contrib/file/magic/Magdir/diff releng/11.1/contrib/file/magic/Magdir/dolby releng/11.1/contrib/file/magic/Magdir/dump releng/11.1/contrib/file/magic/Magdir/dyadic releng/11.1/contrib/file/magic/Magdir/editors releng/11.1/contrib/file/magic/Magdir/filesystems releng/11.1/contrib/file/magic/Magdir/flash releng/11.1/contrib/file/magic/Magdir/fonts releng/11.1/contrib/file/magic/Magdir/fsav releng/11.1/contrib/file/magic/Magdir/games releng/11.1/contrib/file/magic/Magdir/geo releng/11.1/contrib/file/magic/Magdir/gnu releng/11.1/contrib/file/magic/Magdir/gpt releng/11.1/contrib/file/magic/Magdir/gringotts releng/11.1/contrib/file/magic/Magdir/hitachi-sh releng/11.1/contrib/file/magic/Magdir/ibm370 releng/11.1/contrib/file/magic/Magdir/ibm6000 releng/11.1/contrib/file/magic/Magdir/icc releng/11.1/contrib/file/magic/Magdir/images releng/11.1/contrib/file/magic/Magdir/intel releng/11.1/contrib/file/magic/Magdir/isz releng/11.1/contrib/file/magic/Magdir/jpeg releng/11.1/contrib/file/magic/Magdir/kerberos releng/11.1/contrib/file/magic/Magdir/kml releng/11.1/contrib/file/magic/Magdir/linux releng/11.1/contrib/file/magic/Magdir/lisp releng/11.1/contrib/file/magic/Magdir/m4 releng/11.1/contrib/file/magic/Magdir/macintosh releng/11.1/contrib/file/magic/Magdir/make releng/11.1/contrib/file/magic/Magdir/maple releng/11.1/contrib/file/magic/Magdir/marc21 releng/11.1/contrib/file/magic/Magdir/mathematica releng/11.1/contrib/file/magic/Magdir/metastore releng/11.1/contrib/file/magic/Magdir/meteorological releng/11.1/contrib/file/magic/Magdir/microfocus releng/11.1/contrib/file/magic/Magdir/mime releng/11.1/contrib/file/magic/Magdir/misctools releng/11.1/contrib/file/magic/Magdir/modem releng/11.1/contrib/file/magic/Magdir/mozilla releng/11.1/contrib/file/magic/Magdir/msdos releng/11.1/contrib/file/magic/Magdir/msvc releng/11.1/contrib/file/magic/Magdir/msx releng/11.1/contrib/file/magic/Magdir/mup releng/11.1/contrib/file/magic/Magdir/nasa releng/11.1/contrib/file/magic/Magdir/netbsd releng/11.1/contrib/file/magic/Magdir/netscape releng/11.1/contrib/file/magic/Magdir/nitpicker releng/11.1/contrib/file/magic/Magdir/os2 releng/11.1/contrib/file/magic/Magdir/os9 releng/11.1/contrib/file/magic/Magdir/pbf releng/11.1/contrib/file/magic/Magdir/pc88 releng/11.1/contrib/file/magic/Magdir/pc98 releng/11.1/contrib/file/magic/Magdir/pdf releng/11.1/contrib/file/magic/Magdir/pdp releng/11.1/contrib/file/magic/Magdir/perl releng/11.1/contrib/file/magic/Magdir/pgf releng/11.1/contrib/file/magic/Magdir/pgp releng/11.1/contrib/file/magic/Magdir/printer releng/11.1/contrib/file/magic/Magdir/project releng/11.1/contrib/file/magic/Magdir/psdbms releng/11.1/contrib/file/magic/Magdir/python releng/11.1/contrib/file/magic/Magdir/riff releng/11.1/contrib/file/magic/Magdir/ruby releng/11.1/contrib/file/magic/Magdir/sccs releng/11.1/contrib/file/magic/Magdir/scientific releng/11.1/contrib/file/magic/Magdir/sendmail releng/11.1/contrib/file/magic/Magdir/sequent releng/11.1/contrib/file/magic/Magdir/sgml releng/11.1/contrib/file/magic/Magdir/sharc releng/11.1/contrib/file/magic/Magdir/sketch releng/11.1/contrib/file/magic/Magdir/sql releng/11.1/contrib/file/magic/Magdir/ssl releng/11.1/contrib/file/magic/Magdir/sysex releng/11.1/contrib/file/magic/Magdir/terminfo releng/11.1/contrib/file/magic/Magdir/vms releng/11.1/contrib/file/magic/Magdir/vmware releng/11.1/contrib/file/magic/Magdir/vorbis releng/11.1/contrib/file/magic/Magdir/windows releng/11.1/contrib/file/magic/Magdir/xenix releng/11.1/contrib/file/magic/Magdir/xilinx releng/11.1/contrib/file/magic/Magdir/xwindows releng/11.1/contrib/file/magic/Makefile.am releng/11.1/contrib/file/magic/Makefile.in releng/11.1/contrib/file/python/magic.py releng/11.1/contrib/file/src/apprentice.c releng/11.1/contrib/file/src/cdf.c releng/11.1/contrib/file/src/cdf.h releng/11.1/contrib/file/src/cdf_time.c releng/11.1/contrib/file/src/compress.c releng/11.1/contrib/file/src/der.c releng/11.1/contrib/file/src/file.h releng/11.1/contrib/file/src/fsmagic.c releng/11.1/contrib/file/src/funcs.c releng/11.1/contrib/file/src/is_tar.c releng/11.1/contrib/file/src/magic.c releng/11.1/contrib/file/src/magic.h.in releng/11.1/contrib/file/src/print.c releng/11.1/contrib/file/src/readcdf.c releng/11.1/contrib/file/src/readelf.c releng/11.1/contrib/file/src/readelf.h releng/11.1/contrib/file/src/softmagic.c releng/11.1/contrib/file/src/vasprintf.c releng/11.1/contrib/file/tests/Makefile.am releng/11.1/contrib/file/tests/Makefile.in releng/11.1/contrib/file/tests/test.c releng/11.1/lib/libmagic/config.h Modified: releng/10.3/contrib/file/ChangeLog ============================================================================== --- releng/10.3/contrib/file/ChangeLog Wed Mar 7 06:01:44 2018 (r330568) +++ releng/10.3/contrib/file/ChangeLog Wed Mar 7 06:04:25 2018 (r330569) @@ -1,3 +1,157 @@ +2017-09-02 11:53 Christos Zoulas + + * release 5.32 + +2017-08-28 16:37 Christos Zoulas + + * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski) + +2017-08-27 03:55 Christos Zoulas + + * Fix always true condition (Thomas Jarosch) + +2017-05-24 17:30 Christos Zoulas + + * pickier parsing of numeric values in magic files. + +2017-05-23 17:55 Christos Zoulas + + * PR/615 add magic_getflags() + +2017-05-23 13:55 Christos Zoulas + + * release 5.31 + +2017-03-17 20:32 Christos Zoulas + + * remove trailing spaces from magic files + * refactor is_tar + * better bounds checks for cdf + +2017-02-10 12:24 Christos Zoulas + + * release 5.30 + +2017-02-07 23:27 Christos Zoulas + + * If we exceeded the offset in a search return no match + (Christoph Biedl) + * Be more lenient on corrupt CDF files (Christoph Biedl) + +2017-02-04 16:46 Christos Zoulas + + * pacify ubsan sign extension (oss-fuzz/524) + +2017-02-01 12:42 Christos Zoulas + + * off by one in cdf parsing (PR/593) + * report debugging sections in elf (PR/591) + +2016-11-06 10:52 Christos Zoulas + + * Allow @@@ in extensions + * Add missing overflow check in der magic (Jonas Wagner) + +2016-10-25 10:40 Christos Zoulas + + * release 5.29 + +2016-10-24 11:20 Christos Zoulas + + * der getlength overflow (Jonas Wagner) + * multiple magic file load failure (Christoph Biedl) + +2016-10-17 11:26 Christos Zoulas + + * CDF parsing improvements (Guy Helmer) + +2016-07-20 7:26 Christos Zoulas + + * Add support for signed indirect offsets + +2016-07-18 7:41 Christos Zoulas + + * cat /dev/null | file - should print empty (Christoph Biedl) + +2016-07-05 15:20 Christos Zoulas + + * Bump string size from 64 to 96. + +2016-06-13 20:20 Christos Zoulas + + * PR/556: Fix separators on annotations. + +2016-06-13 19:40 Christos Zoulas + + * release 5.28 + * fix leak on allocation failure + +2016-06-01 1:20 Christos Zoulas + + * PR/555: Avoid overflow for offset > nbytes + * PR/550: Segv on DER parsing: + - use the correct variable for length + - set offset to 0 on failure. + +2016-05-13 12:00 Christos Zoulas + + * release 5.27 + +2016-04-18 9:35 Christos Zoulas + + * Errors comparing DER entries or computing offsets + are just indications of malformed non-DER files. + Don't print them. + * Offset comparison was off-by-one. + * Fix compression code (Werner Fink) + * Put new bytes constant in the right file (not the generated one) + +2016-04-16 18:34 Christos Zoulas + + * release 5.26 + +2016-03-31 13:50 Christos Zoulas + + * make the number of bytes read from files configurable. + +2016-03-21 13:40 Christos Zoulas + + * Add bounds checks for DER code (discovered by Thomas Jarosch) + * Change indirect recursion limit to indirect use count and + bump from 15 to 50 to prevent abuse. + +2016-03-13 20:39 Christos Zoulas + + * Add -00 which prints filename\0description\0 + +2016-03-01 13:28 Christos Zoulas + + * Fix ID3 indirect parsing + +2016-01-19 10:18 Christos Zoulas + + * add DER parsing capability + +2015-11-13 10:35 Christos Zoulas + + * provide dprintf(3) for the OS's that don't have it. + +2015-11-11 16:25 Christos Zoulas + + * redo the compression code report decompression errors + +2015-11-10 23:25 Christos Zoulas + + * REG_STARTEND code is not working as expected, delete it. + +2015-11-09 16:05 Christos Zoulas + + * Add zlib support if we have it. + +2015-11-05 11:22 Christos Zoulas + + * PR/492: compression forking was broken with magic_buffer. + 2015-09-16 9:50 Christos Zoulas * release 5.25 @@ -287,7 +441,7 @@ ` 2013-11-06 14:40 Christos Zoulas - * fix erroneous non-zero exit code from non-existant file and message + * fix erroneous non-zero exit code from non-existent file and message 2013-10-29 14:25 Christos Zoulas Modified: releng/10.3/contrib/file/README ============================================================================== --- releng/10.3/contrib/file/README Wed Mar 7 06:01:44 2018 (r330568) +++ releng/10.3/contrib/file/README Wed Mar 7 06:04:25 2018 (r330569) @@ -1,6 +1,6 @@ ## README for file(1) Command ## - @(#) $File: README,v 1.49 2015/01/02 20:23:04 christos Exp $ + @(#) $File: README,v 1.50 2016/04/16 22:40:54 christos Exp $ Mailing List: file@mx.gw.com Mailing List archives: http://mx.gw.com/pipermail/file/ @@ -67,17 +67,41 @@ in magic(5) format please, to the maintainer, Christos COPYING - read this first. README - read this second (you are currently reading this file). INSTALL - read on how to install +src/localtime_r.c +src/magic.c +src/magic.h +src/mygetopt.h +src/newtest2.c +src/newtest3.c +src/pread.c +src/print.c +src/readcdf.c +src/readelf.c +src/readelf.h +src/regex.c +src/regex2.c +src/softmagic.c +src/strcasestr.c +src/strlcat.c +src/strlcpy.c +src/strndup.c +src/tar.h +src/teststrchr.c +src/vasprintf.c +src/x.c src/apprentice.c - parses /etc/magic to learn magic -src/asctime_r.c - replacement for OS's that don't have it. src/apptype.c - used for OS/2 specific application type magic -src/asprintf.c - replacement for OS's that don't have it. src/ascmagic.c - third & last set of tests, based on hardwired assumptions. src/asctime_r.c - replacement for OS's that don't have it. src/asprintf.c - replacement for OS's that don't have it. +src/asctime_r.c - replacement for OS's that don't have it. +src/asprintf.c - replacement for OS's that don't have it. src/cdf.[ch] - parser for Microsoft Compound Document Files src/cdf_time.c - time converter for CDF. src/compress.c - handles decompressing files to look inside. src/ctime_r.c - replacement for OS's that don't have it. +src/der.[ch] - parser for Distinguished Encoding Rules +src/dprintf.c - replacement for OS's that don't have it. src/elfclass.h - common code for elf 32/64. src/encoding.c - handles unicode encodings src/file.c - the main program @@ -88,10 +112,13 @@ src/fsmagic.c - first set of tests the program runs, b src/funcs.c - utilility functions src/getline.c - replacement for OS's that don't have it. src/getopt_long.c - replacement for OS's that don't have it. -src/is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore). -src/names.h - header file for ascmagic.c +src/gmtime_r.c - replacement for OS's that don't have it. +src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore). +src/localtime_r.c - replacement for OS's that don't have it. src/magic.h.in - source file for magic.h +src/mygetopt.h - replacement for OS's that don't have it. src/magic.c - the libmagic api +src/names.h - header file for ascmagic.c src/pread.c - replacement for OS's that don't have it. src/print.c - print results, errors, warnings. src/readcdf.c - CDF wrapper. Modified: releng/10.3/contrib/file/TODO ============================================================================== --- releng/10.3/contrib/file/TODO Wed Mar 7 06:01:44 2018 (r330568) +++ releng/10.3/contrib/file/TODO Wed Mar 7 06:04:25 2018 (r330569) @@ -6,7 +6,6 @@ file, not here. More speculative material can live her listed in the BUGS section of the man page had been fixed!) --- - It would be nice to simplify file considerably. For example, reimplement the apprentice and non-pattern magic methods in Python, and compile the magic patterns to a giant regex (or something similar; @@ -15,8 +14,23 @@ small amount of C is needed (because fast execution is required for soft magic, not the more detailed information given by hard-wired routines). In this regard, note that hplip, which is BSD-licensed, has a magic reimplementation in Python. - +--- Read the kerberos magic entry for more ideas. - +--- Write a string merger to make magic entry sizes dynamic. Strings will be converted to offsets from the string table. +--- +Programming language support, we can introduce the concept of a group +of rules where n rules need to match before the rule is positive. This +could require structural changes to the matching code :-( + +0 group 2 # require 2 matches +# rule 1 +>0 .... +... +# rule 2 +>0 .... +... + +christos + Modified: releng/10.3/contrib/file/aclocal.m4 ============================================================================== --- releng/10.3/contrib/file/aclocal.m4 Wed Mar 7 06:01:44 2018 (r330568) +++ releng/10.3/contrib/file/aclocal.m4 Wed Mar 7 06:04:25 2018 (r330569) @@ -21,7 +21,7 @@ If you have problems, you may need to regenerate the b To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2014 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. Modified: releng/10.3/contrib/file/config.guess ============================================================================== --- releng/10.3/contrib/file/config.guess Wed Mar 7 06:01:44 2018 (r330568) +++ releng/10.3/contrib/file/config.guess Wed Mar 7 06:04:25 2018 (r330569) @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,20 +20,18 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEAS UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -153,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -182,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -192,18 +224,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -216,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -232,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -302,7 +345,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -340,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -374,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -560,8 +603,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -598,13 +642,13 @@ EOF sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -643,11 +687,11 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -660,12 +704,12 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -770,14 +814,14 @@ EOF echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -801,10 +845,13 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -852,21 +899,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +926,60 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +998,69 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1073,7 +1136,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1201,6 +1264,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1219,6 +1285,9 @@ EOF SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1227,24 +1296,36 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1256,7 +1337,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1275,7 +1356,7 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1317,7 +1398,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1328,174 +1409,25 @@ EOF x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 7 06:13:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B4ACF2F882; Wed, 7 Mar 2018 06:13:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39A44801BE; Wed, 7 Mar 2018 06:13:48 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 344ED1DA7E; Wed, 7 Mar 2018 06:13:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w276Dm1K098108; Wed, 7 Mar 2018 06:13:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w276DlVX098098; Wed, 7 Mar 2018 06:13:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201803070613.w276DlVX098098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 7 Mar 2018 06:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330570 - in stable/11: contrib/less usr.bin/less X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/11: contrib/less usr.bin/less X-SVN-Commit-Revision: 330570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 06:13:48 -0000 Author: delphij Date: Wed Mar 7 06:13:47 2018 New Revision: 330570 URL: https://svnweb.freebsd.org/changeset/base/330570 Log: MFC r316339,317396,317829,326010,329554: less v530. Relnotes: yes Added: stable/11/contrib/less/fmt.uni - copied unchanged from r326010, head/contrib/less/fmt.uni Deleted: stable/11/contrib/less/mkhelp.c Modified: stable/11/contrib/less/LICENSE stable/11/contrib/less/NEWS stable/11/contrib/less/README stable/11/contrib/less/brac.c stable/11/contrib/less/ch.c stable/11/contrib/less/charset.c stable/11/contrib/less/charset.h stable/11/contrib/less/cmd.h stable/11/contrib/less/cmdbuf.c stable/11/contrib/less/command.c stable/11/contrib/less/compose.uni stable/11/contrib/less/cvt.c stable/11/contrib/less/decode.c stable/11/contrib/less/edit.c stable/11/contrib/less/filename.c stable/11/contrib/less/forwback.c stable/11/contrib/less/funcs.h stable/11/contrib/less/help.c stable/11/contrib/less/ifile.c stable/11/contrib/less/input.c stable/11/contrib/less/jump.c stable/11/contrib/less/less.h stable/11/contrib/less/less.hlp stable/11/contrib/less/less.nro stable/11/contrib/less/lessecho.c stable/11/contrib/less/lessecho.nro stable/11/contrib/less/lesskey.c stable/11/contrib/less/lesskey.h stable/11/contrib/less/lesskey.nro stable/11/contrib/less/lglob.h stable/11/contrib/less/line.c stable/11/contrib/less/linenum.c stable/11/contrib/less/lsystem.c stable/11/contrib/less/main.c stable/11/contrib/less/mark.c stable/11/contrib/less/mkutable stable/11/contrib/less/optfunc.c stable/11/contrib/less/option.c stable/11/contrib/less/option.h stable/11/contrib/less/opttbl.c stable/11/contrib/less/os.c stable/11/contrib/less/output.c stable/11/contrib/less/pattern.c stable/11/contrib/less/pattern.h stable/11/contrib/less/pckeys.h stable/11/contrib/less/position.c stable/11/contrib/less/position.h stable/11/contrib/less/prompt.c stable/11/contrib/less/screen.c stable/11/contrib/less/scrsize.c stable/11/contrib/less/search.c stable/11/contrib/less/signal.c stable/11/contrib/less/tags.c stable/11/contrib/less/ttyin.c stable/11/contrib/less/ubin.uni stable/11/contrib/less/version.c stable/11/contrib/less/wide.uni stable/11/usr.bin/less/defines.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/less/LICENSE ============================================================================== --- stable/11/contrib/less/LICENSE Wed Mar 7 06:04:25 2018 (r330569) +++ stable/11/contrib/less/LICENSE Wed Mar 7 06:13:47 2018 (r330570) @@ -2,7 +2,7 @@ ------------ Less -Copyright (C) 1984-2015 Mark Nudelman +Copyright (C) 1984-2016 Mark Nudelman Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/11/contrib/less/NEWS ============================================================================== --- stable/11/contrib/less/NEWS Wed Mar 7 06:04:25 2018 (r330569) +++ stable/11/contrib/less/NEWS Wed Mar 7 06:13:47 2018 (r330570) @@ -11,6 +11,82 @@ ====================================================================== + Major changes between "less" versions 487 and 530 + +* Don't output terminal init sequence if using -F and file fits on one screen. + +* When using -S, mark truncated lines with a special character. + The character can be changed or disabled via the new --rscroll option. + +* New command M marks the last line displayed on the screen. + +* New command ESC-m removes a line mark. + +* Status column (enabled via -J) now shows mark letters. + +* Status column shows search matches even if highlighting is disabled via -G. + +* A second ESC-u command will clear search match markers in the status column. + +* Do same ANSI escape code filtering for tag matching that we do for + searching, to help when viewing syntax-highlighted code. + +* Catch SIGTERM and clean up before exiting. + +* Fix bug initializing default charset on Windows. + +* Handle keypad ENTER key correctly if it sends something other than newline. + +* Fix buffering bug when using stdin with a LESSOPEN pipe. + +* On Windows, allow 'u' in -D option to enable underlining. + +* On Windows, use underline in sgr mode. + +* On Windows, convert UTF-8 to multibyte if console is not UTF-8. + +* Update Unicode tables to 2017-03-08. + +* Pass-thru Unicode formating chars (Cf type) instead of treating them + as binary chars. But treat them as binary if -U is set. + +* Fix erroneous binary file warning when UTF-8 file contains ANSI SGR sequences. + +* Fix bugs when using LESSOPEN and switching between stdin and other files. + +* Fix some bugs handling filenames containing shell metacharacters. + +* Fix some memory leaks. + +* Allow some debugging environment variables to be set in lesskey file. + +* Code improvements: + . Use ANSI prototypes in funcs.h declarations. + . Fix some const mismatches. + . Remove archaic "register" in variable declarations. + +====================================================================== + + Major changes between "less" versions 481 and 487 + +* New commands ESC-{ and ESC-} to shift to start/end of displayed lines. + +* Make search highlights work correctly when changing caselessness with -i. + +* New option -Da in Windows version to enable SGR mode. + +* Fix "nothing to search" error when top or bottom line on screen is empty. + +* Fix bug when terminal has no "cm" termcap entry. + +* Fix incorrect display when entering double-width chars in search string. + +* Fix bug in Unicode handling that missed some double width characters. + +* Update Unicode database to 9.0.0. + +====================================================================== + Major changes between "less" versions 458 and 481 * Don't overwrite history file; just append to it. Modified: stable/11/contrib/less/README ============================================================================== --- stable/11/contrib/less/README Wed Mar 7 06:04:25 2018 (r330569) +++ stable/11/contrib/less/README Wed Mar 7 06:13:47 2018 (r330570) @@ -7,9 +7,9 @@ ************************************************************************** ************************************************************************** - Less, version 481 + Less, version 530 - This is the distribution of less, version 481, released 31 Aug 2015. + This is the distribution of less, version 530, released 05 Dec 2017. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or @@ -23,6 +23,7 @@ Please report any problems to bug-less@gnu.org. See http://www.greenwoodsoftware.com/less for the latest info. + Source repository is at https://github.com/gwsw/less.git. ========================================================================= Modified: stable/11/contrib/less/brac.c ============================================================================== --- stable/11/contrib/less/brac.c Wed Mar 7 06:04:25 2018 (r330569) +++ stable/11/contrib/less/brac.c Wed Mar 7 06:13:47 2018 (r330570) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -25,13 +25,13 @@ */ public void match_brac(obrac, cbrac, forwdir, n) - register int obrac; - register int cbrac; + int obrac; + int cbrac; int forwdir; int n; { - register int c; - register int nest; + int c; + int nest; POSITION pos; int (*chget)(); Modified: stable/11/contrib/less/ch.c ============================================================================== --- stable/11/contrib/less/ch.c Wed Mar 7 06:04:25 2018 (r330569) +++ stable/11/contrib/less/ch.c Wed Mar 7 06:13:47 2018 (r330570) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -146,11 +146,11 @@ static int ch_addbuf(); int ch_get() { - register struct buf *bp; - register struct bufnode *bn; - register int n; - register int slept; - register int h; + struct buf *bp; + struct bufnode *bn; + int n; + int slept; + int h; POSITION pos; POSITION len; @@ -419,8 +419,8 @@ end_logfile() public void sync_logfile() { - register struct buf *bp; - register struct bufnode *bn; + struct buf *bp; + struct bufnode *bn; int warned = FALSE; BLOCKNUM block; BLOCKNUM nblocks; @@ -457,9 +457,9 @@ sync_logfile() buffered(block) BLOCKNUM block; { - register struct buf *bp; - register struct bufnode *bn; - register int h; + struct buf *bp; + struct bufnode *bn; + int h; h = BUFHASH(block); FOR_BUFS_IN_CHAIN(h, bn) @@ -477,7 +477,7 @@ buffered(block) */ public int ch_seek(pos) - register POSITION pos; + POSITION pos; { BLOCKNUM new_block; POSITION len; @@ -544,8 +544,8 @@ ch_end_seek() public int ch_end_buffer_seek() { - register struct buf *bp; - register struct bufnode *bn; + struct buf *bp; + struct bufnode *bn; POSITION buf_pos; POSITION end_pos; @@ -572,8 +572,8 @@ ch_end_buffer_seek() public int ch_beg_seek() { - register struct bufnode *bn; - register struct bufnode *firstbn; + struct bufnode *bn; + struct bufnode *firstbn; /* * Try a plain ch_seek first. @@ -632,7 +632,7 @@ ch_tell() public int ch_forw_get() { - register int c; + int c; if (thisfile == NULL) return (EOI); @@ -695,7 +695,7 @@ ch_setbufspace(bufspace) public void ch_flush() { - register struct bufnode *bn; + struct bufnode *bn; if (thisfile == NULL) return; @@ -762,8 +762,8 @@ ch_flush() static int ch_addbuf() { - register struct buf *bp; - register struct bufnode *bn; + struct buf *bp; + struct bufnode *bn; /* * Allocate and initialize a new buffer and link it @@ -787,7 +787,7 @@ ch_addbuf() static void init_hashtbl() { - register int h; + int h; for (h = 0; h < BUFHASH_SIZE; h++) { @@ -802,7 +802,7 @@ init_hashtbl() static void ch_delbufs() { - register struct bufnode *bn; + struct bufnode *bn; while (ch_bufhead != END_OF_CHAIN) { @@ -867,13 +867,12 @@ ch_init(f, flags) calloc(1, sizeof(struct filestate)); thisfile->buflist.next = thisfile->buflist.prev = END_OF_CHAIN; thisfile->nbufs = 0; - thisfile->flags = 0; + thisfile->flags = flags; thisfile->fpos = 0; thisfile->block = 0; thisfile->offset = 0; thisfile->file = -1; thisfile->fsize = NULL_POSITION; - ch_flags = flags; init_hashtbl(); /* * Try to seek; set CH_CANSEEK if it works. @@ -898,7 +897,7 @@ ch_close() if (thisfile == NULL) return; - if (ch_flags & (CH_CANSEEK|CH_POPENED|CH_HELPFILE)) + if ((ch_flags & (CH_CANSEEK|CH_POPENED|CH_HELPFILE)) && !(ch_flags & CH_KEEPOPEN)) { /* * We can seek or re-open, so we don't need to keep buffers. Modified: stable/11/contrib/less/charset.c ============================================================================== --- stable/11/contrib/less/charset.c Wed Mar 7 06:04:25 2018 (r330569) +++ stable/11/contrib/less/charset.c Wed Mar 7 06:13:47 2018 (r330570) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -22,6 +22,13 @@ #include "charset.h" +#if MSDOS_COMPILER==WIN32C +#define WIN32_LEAN_AND_MEAN +#include +#endif + +extern int bs_mode; + public int utf_mode = 0; /* @@ -64,6 +71,8 @@ struct cs_alias { char *oname; } cs_aliases[] = { { "UTF-8", "utf-8" }, + { "utf8", "utf-8" }, + { "UTF8", "utf-8" }, { "ANSI_X3.4-1968", "ascii" }, { "US-ASCII", "ascii" }, { "latin1", "iso8859" }, @@ -133,9 +142,9 @@ public int binattr = AT_STANDOUT; ichardef(s) char *s; { - register char *cp; - register int n; - register char v; + char *cp; + int n; + char v; n = 0; v = 0; @@ -188,11 +197,11 @@ ichardef(s) */ static int icharset(name, no_error) - register char *name; + char *name; int no_error; { - register struct charset *p; - register struct cs_alias *a; + struct charset *p; + struct cs_alias *a; if (name == NULL || *name == '\0') return (0); @@ -213,7 +222,13 @@ icharset(name, no_error) { ichardef(p->desc); if (p->p_flag != NULL) + { +#if MSDOS_COMPILER==WIN32C + *(p->p_flag) = 1 + (GetConsoleOutputCP() != CP_UTF8); +#else *(p->p_flag) = 1; +#endif + } return (1); } } @@ -232,7 +247,7 @@ icharset(name, no_error) static void ilocale() { - register int c; + int c; for (c = 0; c < (int) sizeof(chardef); c++) { @@ -249,16 +264,17 @@ ilocale() /* * Define the printing format for control (or binary utf) chars. */ - static void -setbinfmt(s, fmtvarptr, default_fmt) + public void +setfmt(s, fmtvarptr, attrptr, default_fmt) char *s; char **fmtvarptr; + int *attrptr; char *default_fmt; { if (s && utf_mode) { /* It would be too hard to account for width otherwise. */ - char *t = s; + char constant *t = s; while (*t) { if (*t < ' ' || *t > '~') @@ -280,15 +296,15 @@ setbinfmt(s, fmtvarptr, default_fmt) * Select the attributes if it starts with "*". */ attr: - if (*s == '*') + if (*s == '*' && s[1] != '\0') { switch (s[1]) { - case 'd': binattr = AT_BOLD; break; - case 'k': binattr = AT_BLINK; break; - case 's': binattr = AT_STANDOUT; break; - case 'u': binattr = AT_UNDERLINE; break; - default: binattr = AT_NORMAL; break; + case 'd': *attrptr = AT_BOLD; break; + case 'k': *attrptr = AT_BLINK; break; + case 's': *attrptr = AT_STANDOUT; break; + case 'u': *attrptr = AT_UNDERLINE; break; + default: *attrptr = AT_NORMAL; break; } s += 2; } @@ -303,7 +319,15 @@ set_charset() { char *s; +#if MSDOS_COMPILER==WIN32C /* + * If the Windows console is using UTF-8, we'll use it too. + */ + if (GetConsoleOutputCP() == CP_UTF8) + if (icharset("utf-8", 1)) + return; +#endif + /* * See if environment variable LESSCHARSET is defined. */ s = lgetenv("LESSCHARSET"); @@ -352,6 +376,7 @@ set_charset() * rather than from predefined charset entry. */ ilocale(); +#else #if MSDOS_COMPILER /* * Default to "dos". @@ -381,10 +406,10 @@ init_charset() set_charset(); s = lgetenv("LESSBINFMT"); - setbinfmt(s, &binfmt, "*s<%02X>"); + setfmt(s, &binfmt, &binattr, "*s<%02X>"); s = lgetenv("LESSUTFBINFMT"); - setbinfmt(s, &utfbinfmt, ""); + setfmt(s, &utfbinfmt, &binattr, ""); } /* @@ -484,7 +509,7 @@ prutfchar(ch) */ public int utf_len(ch) - char ch; + unsigned char ch; { if ((ch & 0x80) == 0) return 1; @@ -506,17 +531,18 @@ utf_len(ch) * Does the parameter point to the lead byte of a well-formed UTF-8 character? */ public int -is_utf8_well_formed(s, slen) - unsigned char *s; +is_utf8_well_formed(ss, slen) + char *ss; int slen; { int i; int len; + unsigned char *s = (unsigned char *) ss; if (IS_UTF8_INVALID(s[0])) return (0); - len = utf_len((char) s[0]); + len = utf_len(s[0]); if (len > slen) return (0); if (len == 1) @@ -540,40 +566,25 @@ is_utf8_well_formed(s, slen) } /* - * Return number of invalid UTF-8 sequences found in a buffer. + * Skip bytes until a UTF-8 lead byte (11xxxxxx) or ASCII byte (0xxxxxxx) is found. */ - public int -utf_bin_count(data, len) - unsigned char *data; - int len; + public void +utf_skip_to_lead(pp, limit) + char **pp; + char *limit; { - int bin_count = 0; - while (len > 0) - { - if (is_utf8_well_formed(data, len)) - { - int clen = utf_len(*data); - data += clen; - len -= clen; - } else - { - /* Skip to next lead byte. */ - bin_count++; - do { - ++data; - --len; - } while (len > 0 && !IS_UTF8_LEAD(*data)); - } - } - return (bin_count); + do { + ++(*pp); + } while (*pp < limit && !IS_UTF8_LEAD((*pp)[0] & 0377) && !IS_ASCII_OCTET((*pp)[0])); } + /* * Get the value of a UTF-8 character. */ public LWCHAR get_wchar(p) - char *p; + constant char *p; { switch (utf_len(p[0])) { @@ -677,7 +688,7 @@ put_wchar(pp, ch) step_char(pp, dir, limit) char **pp; signed int dir; - char *limit; + constant char *limit; { LWCHAR ch; int len; @@ -687,16 +698,16 @@ step_char(pp, dir, limit) { /* It's easy if chars are one byte. */ if (dir > 0) - ch = (LWCHAR) ((p < limit) ? *p++ : 0); + ch = (LWCHAR) (unsigned char) ((p < limit) ? *p++ : 0); else - ch = (LWCHAR) ((p > limit) ? *--p : 0); + ch = (LWCHAR) (unsigned char) ((p > limit) ? *--p : 0); } else if (dir > 0) { len = utf_len(*p); if (p + len > limit) { ch = 0; - p = limit; + p = (char *) limit; } else { ch = get_wchar(p); @@ -737,6 +748,10 @@ DECLARE_RANGE_TABLE_START(wide) #include "wide.uni" DECLARE_RANGE_TABLE_END(wide) +DECLARE_RANGE_TABLE_START(fmt) +#include "fmt.uni" +DECLARE_RANGE_TABLE_END(fmt) + /* comb_table is special pairs, not ranges. */ static struct wchar_range comb_table[] = { {0x0644,0x0622}, {0x0644,0x0623}, {0x0644,0x0625}, {0x0644,0x0627}, @@ -777,7 +792,8 @@ is_in_table(ch, table) is_composing_char(ch) LWCHAR ch; { - return is_in_table(ch, &compose_table); + return is_in_table(ch, &compose_table) || + (bs_mode != BS_CONTROL && is_in_table(ch, &fmt_table)); } /* @@ -787,7 +803,21 @@ is_composing_char(ch) is_ubin_char(ch) LWCHAR ch; { - return is_in_table(ch, &ubin_table); + int ubin = is_in_table(ch, &ubin_table) || + (bs_mode == BS_CONTROL && is_in_table(ch, &fmt_table)); +#if MSDOS_COMPILER==WIN32C + if (!ubin && utf_mode == 2 && ch < 0x10000) + { + /* + * Consider it binary if it can't be converted. + */ + BOOL used_default = TRUE; + WideCharToMultiByte(GetConsoleOutputCP(), WC_NO_BEST_FIT_CHARS, (LPCWSTR) &ch, 1, NULL, 0, NULL, &used_default); + if (used_default) + ubin = 1; + } +#endif + return ubin; } /* Modified: stable/11/contrib/less/charset.h ============================================================================== --- stable/11/contrib/less/charset.h Wed Mar 7 06:04:25 2018 (r330569) +++ stable/11/contrib/less/charset.h Wed Mar 7 06:13:47 2018 (r330570) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. Modified: stable/11/contrib/less/cmd.h ============================================================================== --- stable/11/contrib/less/cmd.h Wed Mar 7 06:04:25 2018 (r330569) +++ stable/11/contrib/less/cmd.h Wed Mar 7 06:13:47 2018 (r330570) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -8,127 +8,131 @@ */ -#define MAX_USERCMD 1000 -#define MAX_CMDLEN 16 +#define MAX_USERCMD 1000 +#define MAX_CMDLEN 16 -#define A_B_LINE 2 -#define A_B_SCREEN 3 -#define A_B_SCROLL 4 -#define A_B_SEARCH 5 -#define A_DIGIT 6 -#define A_DISP_OPTION 7 -#define A_DEBUG 8 -#define A_EXAMINE 9 -#define A_FIRSTCMD 10 -#define A_FREPAINT 11 -#define A_F_LINE 12 -#define A_F_SCREEN 13 -#define A_F_SCROLL 14 -#define A_F_SEARCH 15 -#define A_GOEND 16 -#define A_GOLINE 17 -#define A_GOMARK 18 -#define A_HELP 19 -#define A_NEXT_FILE 20 -#define A_PERCENT 21 -#define A_PREFIX 22 -#define A_PREV_FILE 23 -#define A_QUIT 24 -#define A_REPAINT 25 -#define A_SETMARK 26 -#define A_SHELL 27 -#define A_STAT 28 -#define A_FF_LINE 29 -#define A_BF_LINE 30 -#define A_VERSION 31 -#define A_VISUAL 32 -#define A_F_WINDOW 33 -#define A_B_WINDOW 34 -#define A_F_BRACKET 35 -#define A_B_BRACKET 36 -#define A_PIPE 37 -#define A_INDEX_FILE 38 -#define A_UNDO_SEARCH 39 -#define A_FF_SCREEN 40 -#define A_LSHIFT 41 -#define A_RSHIFT 42 -#define A_AGAIN_SEARCH 43 -#define A_T_AGAIN_SEARCH 44 -#define A_REVERSE_SEARCH 45 -#define A_T_REVERSE_SEARCH 46 -#define A_OPT_TOGGLE 47 -#define A_OPT_SET 48 -#define A_OPT_UNSET 49 -#define A_F_FOREVER 50 -#define A_GOPOS 51 -#define A_REMOVE_FILE 52 -#define A_NEXT_TAG 53 -#define A_PREV_TAG 54 -#define A_FILTER 55 -#define A_F_UNTIL_HILITE 56 -#define A_GOEND_BUF 57 +#define A_B_LINE 2 +#define A_B_SCREEN 3 +#define A_B_SCROLL 4 +#define A_B_SEARCH 5 +#define A_DIGIT 6 +#define A_DISP_OPTION 7 +#define A_DEBUG 8 +#define A_EXAMINE 9 +#define A_FIRSTCMD 10 +#define A_FREPAINT 11 +#define A_F_LINE 12 +#define A_F_SCREEN 13 +#define A_F_SCROLL 14 +#define A_F_SEARCH 15 +#define A_GOEND 16 +#define A_GOLINE 17 +#define A_GOMARK 18 +#define A_HELP 19 +#define A_NEXT_FILE 20 +#define A_PERCENT 21 +#define A_PREFIX 22 +#define A_PREV_FILE 23 +#define A_QUIT 24 +#define A_REPAINT 25 +#define A_SETMARK 26 +#define A_SHELL 27 +#define A_STAT 28 +#define A_FF_LINE 29 +#define A_BF_LINE 30 +#define A_VERSION 31 +#define A_VISUAL 32 +#define A_F_WINDOW 33 +#define A_B_WINDOW 34 +#define A_F_BRACKET 35 +#define A_B_BRACKET 36 +#define A_PIPE 37 +#define A_INDEX_FILE 38 +#define A_UNDO_SEARCH 39 +#define A_FF_SCREEN 40 +#define A_LSHIFT 41 +#define A_RSHIFT 42 +#define A_AGAIN_SEARCH 43 +#define A_T_AGAIN_SEARCH 44 +#define A_REVERSE_SEARCH 45 +#define A_T_REVERSE_SEARCH 46 +#define A_OPT_TOGGLE 47 +#define A_OPT_SET 48 +#define A_OPT_UNSET 49 +#define A_F_FOREVER 50 +#define A_GOPOS 51 +#define A_REMOVE_FILE 52 +#define A_NEXT_TAG 53 +#define A_PREV_TAG 54 +#define A_FILTER 55 +#define A_F_UNTIL_HILITE 56 +#define A_GOEND_BUF 57 +#define A_LLSHIFT 58 +#define A_RRSHIFT 59 +#define A_CLRMARK 62 +#define A_SETMARKBOT 63 -#define A_INVALID 100 -#define A_NOACTION 101 -#define A_UINVALID 102 -#define A_END_LIST 103 -#define A_SPECIAL_KEY 104 +#define A_INVALID 100 +#define A_NOACTION 101 +#define A_UINVALID 102 +#define A_END_LIST 103 +#define A_SPECIAL_KEY 104 -#define A_SKIP 127 +#define A_SKIP 127 -#define A_EXTRA 0200 +#define A_EXTRA 0200 /* Line editing characters */ -#define EC_BACKSPACE 1 -#define EC_LINEKILL 2 -#define EC_RIGHT 3 -#define EC_LEFT 4 -#define EC_W_LEFT 5 -#define EC_W_RIGHT 6 -#define EC_INSERT 7 -#define EC_DELETE 8 -#define EC_HOME 9 -#define EC_END 10 -#define EC_W_BACKSPACE 11 -#define EC_W_DELETE 12 -#define EC_UP 13 -#define EC_DOWN 14 -#define EC_EXPAND 15 -#define EC_F_COMPLETE 17 -#define EC_B_COMPLETE 18 -#define EC_LITERAL 19 -#define EC_ABORT 20 +#define EC_BACKSPACE 1 +#define EC_LINEKILL 2 +#define EC_RIGHT 3 +#define EC_LEFT 4 +#define EC_W_LEFT 5 +#define EC_W_RIGHT 6 +#define EC_INSERT 7 +#define EC_DELETE 8 +#define EC_HOME 9 +#define EC_END 10 +#define EC_W_BACKSPACE 11 +#define EC_W_DELETE 12 +#define EC_UP 13 +#define EC_DOWN 14 +#define EC_EXPAND 15 +#define EC_F_COMPLETE 17 +#define EC_B_COMPLETE 18 +#define EC_LITERAL 19 +#define EC_ABORT 20 -#define EC_NOACTION 101 -#define EC_UINVALID 102 +#define EC_NOACTION 101 +#define EC_UINVALID 102 /* Flags for editchar() */ -#define EC_PEEK 01 -#define EC_NOHISTORY 02 -#define EC_NOCOMPLETE 04 -#define EC_NORIGHTLEFT 010 +#define EC_PEEK 01 +#define EC_NOHISTORY 02 +#define EC_NOCOMPLETE 04 +#define EC_NORIGHTLEFT 010 /* Environment variable stuff */ -#define EV_OK 01 +#define EV_OK 01 /* Special keys (keys which output different strings on different terminals) */ -#define SK_SPECIAL_KEY CONTROL('K') -#define SK_RIGHT_ARROW 1 -#define SK_LEFT_ARROW 2 -#define SK_UP_ARROW 3 -#define SK_DOWN_ARROW 4 -#define SK_PAGE_UP 5 -#define SK_PAGE_DOWN 6 -#define SK_HOME 7 -#define SK_END 8 -#define SK_DELETE 9 -#define SK_INSERT 10 -#define SK_CTL_LEFT_ARROW 11 -#define SK_CTL_RIGHT_ARROW 12 -#define SK_CTL_DELETE 13 -#define SK_F1 14 -#define SK_BACKTAB 15 -#define SK_CTL_BACKSPACE 16 -#define SK_CONTROL_K 40 +#define SK_SPECIAL_KEY CONTROL('K') +#define SK_RIGHT_ARROW 1 +#define SK_LEFT_ARROW 2 +#define SK_UP_ARROW 3 +#define SK_DOWN_ARROW 4 +#define SK_PAGE_UP 5 +#define SK_PAGE_DOWN 6 +#define SK_HOME 7 +#define SK_END 8 +#define SK_DELETE 9 +#define SK_INSERT 10 +#define SK_CTL_LEFT_ARROW 11 +#define SK_CTL_RIGHT_ARROW 12 +#define SK_CTL_DELETE 13 +#define SK_F1 14 +#define SK_BACKTAB 15 +#define SK_CTL_BACKSPACE 16 +#define SK_CONTROL_K 40 Modified: stable/11/contrib/less/cmdbuf.c ============================================================================== --- stable/11/contrib/less/cmdbuf.c Wed Mar 7 06:04:25 2018 (r330569) +++ stable/11/contrib/less/cmdbuf.c Wed Mar 7 06:13:47 2018 (r330570) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -40,7 +40,7 @@ static int in_completion = 0; static char *tk_text; static char *tk_original; static char *tk_ipoint; -static char *tk_trial; +static char *tk_trial = NULL; static struct textlist tk_tlist; #endif @@ -76,25 +76,25 @@ struct mlist */ struct mlist mlist_search = { &mlist_search, &mlist_search, &mlist_search, NULL, 0 }; -public void * constant ml_search = (void *) &mlist_search; +public void *ml_search = (void *) &mlist_search; struct mlist mlist_examine = { &mlist_examine, &mlist_examine, &mlist_examine, NULL, 0 }; -public void * constant ml_examine = (void *) &mlist_examine; +public void *ml_examine = (void *) &mlist_examine; #if SHELL_ESCAPE || PIPEC struct mlist mlist_shell = { &mlist_shell, &mlist_shell, &mlist_shell, NULL, 0 }; -public void * constant ml_shell = (void *) &mlist_shell; +public void *ml_shell = (void *) &mlist_shell; #endif #else /* CMD_HISTORY */ /* If CMD_HISTORY is off, these are just flags. */ -public void * constant ml_search = (void *)1; -public void * constant ml_examine = (void *)2; +public void *ml_search = (void *)1; +public void *ml_examine = (void *)2; #if SHELL_ESCAPE || PIPEC -public void * constant ml_shell = (void *)3; +public void *ml_shell = (void *)3; #endif #endif /* CMD_HISTORY */ @@ -141,28 +141,26 @@ clear_cmd() */ public void cmd_putstr(s) - char *s; + constant char *s; { LWCHAR prev_ch = 0; LWCHAR ch; - char *endline = s + strlen(s); + constant char *endline = s + strlen(s); while (*s != '\0') { - char *ns = s; + char *ns = (char *) s; + int width; ch = step_char(&ns, +1, endline); while (s < ns) putchr(*s++); if (!utf_mode) - { - cmd_col++; - prompt_col++; - } else if (!is_composing_char(ch) && - !is_combining_char(prev_ch, ch)) - { - int width = is_wide_char(ch) ? 2 : 1; - cmd_col += width; - prompt_col += width; - } + width = 1; + else if (is_composing_char(ch) || is_combining_char(prev_ch, ch)) + width = 0; + else + width = is_wide_char(ch) ? 2 : 1; + cmd_col += width; + prompt_col += width; prev_ch = ch; } } @@ -187,6 +185,8 @@ len_cmdbuf() /* * Common part of cmd_step_right() and cmd_step_left(). + * {{ Returning pwidth and bswidth separately is a historical artifact + * since they're always the same. Maybe clean this up someday. }} */ static char * cmd_step_common(p, ch, len, pwidth, bswidth) @@ -197,58 +197,32 @@ cmd_step_common(p, ch, len, pwidth, bswidth) int *bswidth; { char *pr; + int width; if (len == 1) { pr = prchar((int) ch); - if (pwidth != NULL || bswidth != NULL) - { - int len = (int) strlen(pr); - if (pwidth != NULL) - *pwidth = len; - if (bswidth != NULL) - *bswidth = len; - } + width = (int) strlen(pr); } else { pr = prutfchar(ch); - if (pwidth != NULL || bswidth != NULL) + if (is_composing_char(ch)) + width = 0; + else if (is_ubin_char(ch)) + width = (int) strlen(pr); + else *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 7 06:39:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B1ADF30C1D; Wed, 7 Mar 2018 06:39:02 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3247E8108F; Wed, 7 Mar 2018 06:39:02 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E5061DDBD; Wed, 7 Mar 2018 06:39:02 +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 w276d2p8008070; Wed, 7 Mar 2018 06:39:02 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w276d14P008060; Wed, 7 Mar 2018 06:39:01 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201803070639.w276d14P008060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 7 Mar 2018 06:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330571 - in stable/10: contrib/less usr.bin/less X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/10: contrib/less usr.bin/less X-SVN-Commit-Revision: 330571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 06:39:03 -0000 Author: delphij Date: Wed Mar 7 06:39:00 2018 New Revision: 330571 URL: https://svnweb.freebsd.org/changeset/base/330571 Log: MFC r316339,317396,317829,326010,329554: less v530. Relnotes: yes Added: stable/10/contrib/less/fmt.uni - copied unchanged from r326010, head/contrib/less/fmt.uni Deleted: stable/10/contrib/less/mkhelp.c Modified: stable/10/contrib/less/LICENSE stable/10/contrib/less/NEWS stable/10/contrib/less/README stable/10/contrib/less/brac.c stable/10/contrib/less/ch.c stable/10/contrib/less/charset.c stable/10/contrib/less/charset.h stable/10/contrib/less/cmd.h stable/10/contrib/less/cmdbuf.c stable/10/contrib/less/command.c stable/10/contrib/less/compose.uni stable/10/contrib/less/cvt.c stable/10/contrib/less/decode.c stable/10/contrib/less/edit.c stable/10/contrib/less/filename.c stable/10/contrib/less/forwback.c stable/10/contrib/less/funcs.h stable/10/contrib/less/help.c stable/10/contrib/less/ifile.c stable/10/contrib/less/input.c stable/10/contrib/less/jump.c stable/10/contrib/less/less.h stable/10/contrib/less/less.hlp stable/10/contrib/less/less.nro stable/10/contrib/less/lessecho.c stable/10/contrib/less/lessecho.nro stable/10/contrib/less/lesskey.c stable/10/contrib/less/lesskey.h stable/10/contrib/less/lesskey.nro stable/10/contrib/less/lglob.h stable/10/contrib/less/line.c stable/10/contrib/less/linenum.c stable/10/contrib/less/lsystem.c stable/10/contrib/less/main.c stable/10/contrib/less/mark.c stable/10/contrib/less/mkutable stable/10/contrib/less/optfunc.c stable/10/contrib/less/option.c stable/10/contrib/less/option.h stable/10/contrib/less/opttbl.c stable/10/contrib/less/os.c stable/10/contrib/less/output.c stable/10/contrib/less/pattern.c stable/10/contrib/less/pattern.h stable/10/contrib/less/pckeys.h stable/10/contrib/less/position.c stable/10/contrib/less/position.h stable/10/contrib/less/prompt.c stable/10/contrib/less/screen.c stable/10/contrib/less/scrsize.c stable/10/contrib/less/search.c stable/10/contrib/less/signal.c stable/10/contrib/less/tags.c stable/10/contrib/less/ttyin.c stable/10/contrib/less/ubin.uni stable/10/contrib/less/version.c stable/10/contrib/less/wide.uni stable/10/usr.bin/less/defines.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/less/LICENSE ============================================================================== --- stable/10/contrib/less/LICENSE Wed Mar 7 06:13:47 2018 (r330570) +++ stable/10/contrib/less/LICENSE Wed Mar 7 06:39:00 2018 (r330571) @@ -2,7 +2,7 @@ ------------ Less -Copyright (C) 1984-2015 Mark Nudelman +Copyright (C) 1984-2016 Mark Nudelman Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/10/contrib/less/NEWS ============================================================================== --- stable/10/contrib/less/NEWS Wed Mar 7 06:13:47 2018 (r330570) +++ stable/10/contrib/less/NEWS Wed Mar 7 06:39:00 2018 (r330571) @@ -11,6 +11,82 @@ ====================================================================== + Major changes between "less" versions 487 and 530 + +* Don't output terminal init sequence if using -F and file fits on one screen. + +* When using -S, mark truncated lines with a special character. + The character can be changed or disabled via the new --rscroll option. + +* New command M marks the last line displayed on the screen. + +* New command ESC-m removes a line mark. + +* Status column (enabled via -J) now shows mark letters. + +* Status column shows search matches even if highlighting is disabled via -G. + +* A second ESC-u command will clear search match markers in the status column. + +* Do same ANSI escape code filtering for tag matching that we do for + searching, to help when viewing syntax-highlighted code. + +* Catch SIGTERM and clean up before exiting. + +* Fix bug initializing default charset on Windows. + +* Handle keypad ENTER key correctly if it sends something other than newline. + +* Fix buffering bug when using stdin with a LESSOPEN pipe. + +* On Windows, allow 'u' in -D option to enable underlining. + +* On Windows, use underline in sgr mode. + +* On Windows, convert UTF-8 to multibyte if console is not UTF-8. + +* Update Unicode tables to 2017-03-08. + +* Pass-thru Unicode formating chars (Cf type) instead of treating them + as binary chars. But treat them as binary if -U is set. + +* Fix erroneous binary file warning when UTF-8 file contains ANSI SGR sequences. + +* Fix bugs when using LESSOPEN and switching between stdin and other files. + +* Fix some bugs handling filenames containing shell metacharacters. + +* Fix some memory leaks. + +* Allow some debugging environment variables to be set in lesskey file. + +* Code improvements: + . Use ANSI prototypes in funcs.h declarations. + . Fix some const mismatches. + . Remove archaic "register" in variable declarations. + +====================================================================== + + Major changes between "less" versions 481 and 487 + +* New commands ESC-{ and ESC-} to shift to start/end of displayed lines. + +* Make search highlights work correctly when changing caselessness with -i. + +* New option -Da in Windows version to enable SGR mode. + +* Fix "nothing to search" error when top or bottom line on screen is empty. + +* Fix bug when terminal has no "cm" termcap entry. + +* Fix incorrect display when entering double-width chars in search string. + +* Fix bug in Unicode handling that missed some double width characters. + +* Update Unicode database to 9.0.0. + +====================================================================== + Major changes between "less" versions 458 and 481 * Don't overwrite history file; just append to it. Modified: stable/10/contrib/less/README ============================================================================== --- stable/10/contrib/less/README Wed Mar 7 06:13:47 2018 (r330570) +++ stable/10/contrib/less/README Wed Mar 7 06:39:00 2018 (r330571) @@ -7,9 +7,9 @@ ************************************************************************** ************************************************************************** - Less, version 481 + Less, version 530 - This is the distribution of less, version 481, released 31 Aug 2015. + This is the distribution of less, version 530, released 05 Dec 2017. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or @@ -23,6 +23,7 @@ Please report any problems to bug-less@gnu.org. See http://www.greenwoodsoftware.com/less for the latest info. + Source repository is at https://github.com/gwsw/less.git. ========================================================================= Modified: stable/10/contrib/less/brac.c ============================================================================== --- stable/10/contrib/less/brac.c Wed Mar 7 06:13:47 2018 (r330570) +++ stable/10/contrib/less/brac.c Wed Mar 7 06:39:00 2018 (r330571) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -25,13 +25,13 @@ */ public void match_brac(obrac, cbrac, forwdir, n) - register int obrac; - register int cbrac; + int obrac; + int cbrac; int forwdir; int n; { - register int c; - register int nest; + int c; + int nest; POSITION pos; int (*chget)(); Modified: stable/10/contrib/less/ch.c ============================================================================== --- stable/10/contrib/less/ch.c Wed Mar 7 06:13:47 2018 (r330570) +++ stable/10/contrib/less/ch.c Wed Mar 7 06:39:00 2018 (r330571) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -146,11 +146,11 @@ static int ch_addbuf(); int ch_get() { - register struct buf *bp; - register struct bufnode *bn; - register int n; - register int slept; - register int h; + struct buf *bp; + struct bufnode *bn; + int n; + int slept; + int h; POSITION pos; POSITION len; @@ -419,8 +419,8 @@ end_logfile() public void sync_logfile() { - register struct buf *bp; - register struct bufnode *bn; + struct buf *bp; + struct bufnode *bn; int warned = FALSE; BLOCKNUM block; BLOCKNUM nblocks; @@ -457,9 +457,9 @@ sync_logfile() buffered(block) BLOCKNUM block; { - register struct buf *bp; - register struct bufnode *bn; - register int h; + struct buf *bp; + struct bufnode *bn; + int h; h = BUFHASH(block); FOR_BUFS_IN_CHAIN(h, bn) @@ -477,7 +477,7 @@ buffered(block) */ public int ch_seek(pos) - register POSITION pos; + POSITION pos; { BLOCKNUM new_block; POSITION len; @@ -544,8 +544,8 @@ ch_end_seek() public int ch_end_buffer_seek() { - register struct buf *bp; - register struct bufnode *bn; + struct buf *bp; + struct bufnode *bn; POSITION buf_pos; POSITION end_pos; @@ -572,8 +572,8 @@ ch_end_buffer_seek() public int ch_beg_seek() { - register struct bufnode *bn; - register struct bufnode *firstbn; + struct bufnode *bn; + struct bufnode *firstbn; /* * Try a plain ch_seek first. @@ -632,7 +632,7 @@ ch_tell() public int ch_forw_get() { - register int c; + int c; if (thisfile == NULL) return (EOI); @@ -695,7 +695,7 @@ ch_setbufspace(bufspace) public void ch_flush() { - register struct bufnode *bn; + struct bufnode *bn; if (thisfile == NULL) return; @@ -762,8 +762,8 @@ ch_flush() static int ch_addbuf() { - register struct buf *bp; - register struct bufnode *bn; + struct buf *bp; + struct bufnode *bn; /* * Allocate and initialize a new buffer and link it @@ -787,7 +787,7 @@ ch_addbuf() static void init_hashtbl() { - register int h; + int h; for (h = 0; h < BUFHASH_SIZE; h++) { @@ -802,7 +802,7 @@ init_hashtbl() static void ch_delbufs() { - register struct bufnode *bn; + struct bufnode *bn; while (ch_bufhead != END_OF_CHAIN) { @@ -867,13 +867,12 @@ ch_init(f, flags) calloc(1, sizeof(struct filestate)); thisfile->buflist.next = thisfile->buflist.prev = END_OF_CHAIN; thisfile->nbufs = 0; - thisfile->flags = 0; + thisfile->flags = flags; thisfile->fpos = 0; thisfile->block = 0; thisfile->offset = 0; thisfile->file = -1; thisfile->fsize = NULL_POSITION; - ch_flags = flags; init_hashtbl(); /* * Try to seek; set CH_CANSEEK if it works. @@ -898,7 +897,7 @@ ch_close() if (thisfile == NULL) return; - if (ch_flags & (CH_CANSEEK|CH_POPENED|CH_HELPFILE)) + if ((ch_flags & (CH_CANSEEK|CH_POPENED|CH_HELPFILE)) && !(ch_flags & CH_KEEPOPEN)) { /* * We can seek or re-open, so we don't need to keep buffers. Modified: stable/10/contrib/less/charset.c ============================================================================== --- stable/10/contrib/less/charset.c Wed Mar 7 06:13:47 2018 (r330570) +++ stable/10/contrib/less/charset.c Wed Mar 7 06:39:00 2018 (r330571) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -22,6 +22,13 @@ #include "charset.h" +#if MSDOS_COMPILER==WIN32C +#define WIN32_LEAN_AND_MEAN +#include +#endif + +extern int bs_mode; + public int utf_mode = 0; /* @@ -64,6 +71,8 @@ struct cs_alias { char *oname; } cs_aliases[] = { { "UTF-8", "utf-8" }, + { "utf8", "utf-8" }, + { "UTF8", "utf-8" }, { "ANSI_X3.4-1968", "ascii" }, { "US-ASCII", "ascii" }, { "latin1", "iso8859" }, @@ -133,9 +142,9 @@ public int binattr = AT_STANDOUT; ichardef(s) char *s; { - register char *cp; - register int n; - register char v; + char *cp; + int n; + char v; n = 0; v = 0; @@ -188,11 +197,11 @@ ichardef(s) */ static int icharset(name, no_error) - register char *name; + char *name; int no_error; { - register struct charset *p; - register struct cs_alias *a; + struct charset *p; + struct cs_alias *a; if (name == NULL || *name == '\0') return (0); @@ -213,7 +222,13 @@ icharset(name, no_error) { ichardef(p->desc); if (p->p_flag != NULL) + { +#if MSDOS_COMPILER==WIN32C + *(p->p_flag) = 1 + (GetConsoleOutputCP() != CP_UTF8); +#else *(p->p_flag) = 1; +#endif + } return (1); } } @@ -232,7 +247,7 @@ icharset(name, no_error) static void ilocale() { - register int c; + int c; for (c = 0; c < (int) sizeof(chardef); c++) { @@ -249,16 +264,17 @@ ilocale() /* * Define the printing format for control (or binary utf) chars. */ - static void -setbinfmt(s, fmtvarptr, default_fmt) + public void +setfmt(s, fmtvarptr, attrptr, default_fmt) char *s; char **fmtvarptr; + int *attrptr; char *default_fmt; { if (s && utf_mode) { /* It would be too hard to account for width otherwise. */ - char *t = s; + char constant *t = s; while (*t) { if (*t < ' ' || *t > '~') @@ -280,15 +296,15 @@ setbinfmt(s, fmtvarptr, default_fmt) * Select the attributes if it starts with "*". */ attr: - if (*s == '*') + if (*s == '*' && s[1] != '\0') { switch (s[1]) { - case 'd': binattr = AT_BOLD; break; - case 'k': binattr = AT_BLINK; break; - case 's': binattr = AT_STANDOUT; break; - case 'u': binattr = AT_UNDERLINE; break; - default: binattr = AT_NORMAL; break; + case 'd': *attrptr = AT_BOLD; break; + case 'k': *attrptr = AT_BLINK; break; + case 's': *attrptr = AT_STANDOUT; break; + case 'u': *attrptr = AT_UNDERLINE; break; + default: *attrptr = AT_NORMAL; break; } s += 2; } @@ -303,7 +319,15 @@ set_charset() { char *s; +#if MSDOS_COMPILER==WIN32C /* + * If the Windows console is using UTF-8, we'll use it too. + */ + if (GetConsoleOutputCP() == CP_UTF8) + if (icharset("utf-8", 1)) + return; +#endif + /* * See if environment variable LESSCHARSET is defined. */ s = lgetenv("LESSCHARSET"); @@ -352,6 +376,7 @@ set_charset() * rather than from predefined charset entry. */ ilocale(); +#else #if MSDOS_COMPILER /* * Default to "dos". @@ -381,10 +406,10 @@ init_charset() set_charset(); s = lgetenv("LESSBINFMT"); - setbinfmt(s, &binfmt, "*s<%02X>"); + setfmt(s, &binfmt, &binattr, "*s<%02X>"); s = lgetenv("LESSUTFBINFMT"); - setbinfmt(s, &utfbinfmt, ""); + setfmt(s, &utfbinfmt, &binattr, ""); } /* @@ -484,7 +509,7 @@ prutfchar(ch) */ public int utf_len(ch) - char ch; + unsigned char ch; { if ((ch & 0x80) == 0) return 1; @@ -506,17 +531,18 @@ utf_len(ch) * Does the parameter point to the lead byte of a well-formed UTF-8 character? */ public int -is_utf8_well_formed(s, slen) - unsigned char *s; +is_utf8_well_formed(ss, slen) + char *ss; int slen; { int i; int len; + unsigned char *s = (unsigned char *) ss; if (IS_UTF8_INVALID(s[0])) return (0); - len = utf_len((char) s[0]); + len = utf_len(s[0]); if (len > slen) return (0); if (len == 1) @@ -540,40 +566,25 @@ is_utf8_well_formed(s, slen) } /* - * Return number of invalid UTF-8 sequences found in a buffer. + * Skip bytes until a UTF-8 lead byte (11xxxxxx) or ASCII byte (0xxxxxxx) is found. */ - public int -utf_bin_count(data, len) - unsigned char *data; - int len; + public void +utf_skip_to_lead(pp, limit) + char **pp; + char *limit; { - int bin_count = 0; - while (len > 0) - { - if (is_utf8_well_formed(data, len)) - { - int clen = utf_len(*data); - data += clen; - len -= clen; - } else - { - /* Skip to next lead byte. */ - bin_count++; - do { - ++data; - --len; - } while (len > 0 && !IS_UTF8_LEAD(*data)); - } - } - return (bin_count); + do { + ++(*pp); + } while (*pp < limit && !IS_UTF8_LEAD((*pp)[0] & 0377) && !IS_ASCII_OCTET((*pp)[0])); } + /* * Get the value of a UTF-8 character. */ public LWCHAR get_wchar(p) - char *p; + constant char *p; { switch (utf_len(p[0])) { @@ -677,7 +688,7 @@ put_wchar(pp, ch) step_char(pp, dir, limit) char **pp; signed int dir; - char *limit; + constant char *limit; { LWCHAR ch; int len; @@ -687,16 +698,16 @@ step_char(pp, dir, limit) { /* It's easy if chars are one byte. */ if (dir > 0) - ch = (LWCHAR) ((p < limit) ? *p++ : 0); + ch = (LWCHAR) (unsigned char) ((p < limit) ? *p++ : 0); else - ch = (LWCHAR) ((p > limit) ? *--p : 0); + ch = (LWCHAR) (unsigned char) ((p > limit) ? *--p : 0); } else if (dir > 0) { len = utf_len(*p); if (p + len > limit) { ch = 0; - p = limit; + p = (char *) limit; } else { ch = get_wchar(p); @@ -737,6 +748,10 @@ DECLARE_RANGE_TABLE_START(wide) #include "wide.uni" DECLARE_RANGE_TABLE_END(wide) +DECLARE_RANGE_TABLE_START(fmt) +#include "fmt.uni" +DECLARE_RANGE_TABLE_END(fmt) + /* comb_table is special pairs, not ranges. */ static struct wchar_range comb_table[] = { {0x0644,0x0622}, {0x0644,0x0623}, {0x0644,0x0625}, {0x0644,0x0627}, @@ -777,7 +792,8 @@ is_in_table(ch, table) is_composing_char(ch) LWCHAR ch; { - return is_in_table(ch, &compose_table); + return is_in_table(ch, &compose_table) || + (bs_mode != BS_CONTROL && is_in_table(ch, &fmt_table)); } /* @@ -787,7 +803,21 @@ is_composing_char(ch) is_ubin_char(ch) LWCHAR ch; { - return is_in_table(ch, &ubin_table); + int ubin = is_in_table(ch, &ubin_table) || + (bs_mode == BS_CONTROL && is_in_table(ch, &fmt_table)); +#if MSDOS_COMPILER==WIN32C + if (!ubin && utf_mode == 2 && ch < 0x10000) + { + /* + * Consider it binary if it can't be converted. + */ + BOOL used_default = TRUE; + WideCharToMultiByte(GetConsoleOutputCP(), WC_NO_BEST_FIT_CHARS, (LPCWSTR) &ch, 1, NULL, 0, NULL, &used_default); + if (used_default) + ubin = 1; + } +#endif + return ubin; } /* Modified: stable/10/contrib/less/charset.h ============================================================================== --- stable/10/contrib/less/charset.h Wed Mar 7 06:13:47 2018 (r330570) +++ stable/10/contrib/less/charset.h Wed Mar 7 06:39:00 2018 (r330571) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. Modified: stable/10/contrib/less/cmd.h ============================================================================== --- stable/10/contrib/less/cmd.h Wed Mar 7 06:13:47 2018 (r330570) +++ stable/10/contrib/less/cmd.h Wed Mar 7 06:39:00 2018 (r330571) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -8,127 +8,131 @@ */ -#define MAX_USERCMD 1000 -#define MAX_CMDLEN 16 +#define MAX_USERCMD 1000 +#define MAX_CMDLEN 16 -#define A_B_LINE 2 -#define A_B_SCREEN 3 -#define A_B_SCROLL 4 -#define A_B_SEARCH 5 -#define A_DIGIT 6 -#define A_DISP_OPTION 7 -#define A_DEBUG 8 -#define A_EXAMINE 9 -#define A_FIRSTCMD 10 -#define A_FREPAINT 11 -#define A_F_LINE 12 -#define A_F_SCREEN 13 -#define A_F_SCROLL 14 -#define A_F_SEARCH 15 -#define A_GOEND 16 -#define A_GOLINE 17 -#define A_GOMARK 18 -#define A_HELP 19 -#define A_NEXT_FILE 20 -#define A_PERCENT 21 -#define A_PREFIX 22 -#define A_PREV_FILE 23 -#define A_QUIT 24 -#define A_REPAINT 25 -#define A_SETMARK 26 -#define A_SHELL 27 -#define A_STAT 28 -#define A_FF_LINE 29 -#define A_BF_LINE 30 -#define A_VERSION 31 -#define A_VISUAL 32 -#define A_F_WINDOW 33 -#define A_B_WINDOW 34 -#define A_F_BRACKET 35 -#define A_B_BRACKET 36 -#define A_PIPE 37 -#define A_INDEX_FILE 38 -#define A_UNDO_SEARCH 39 -#define A_FF_SCREEN 40 -#define A_LSHIFT 41 -#define A_RSHIFT 42 -#define A_AGAIN_SEARCH 43 -#define A_T_AGAIN_SEARCH 44 -#define A_REVERSE_SEARCH 45 -#define A_T_REVERSE_SEARCH 46 -#define A_OPT_TOGGLE 47 -#define A_OPT_SET 48 -#define A_OPT_UNSET 49 -#define A_F_FOREVER 50 -#define A_GOPOS 51 -#define A_REMOVE_FILE 52 -#define A_NEXT_TAG 53 -#define A_PREV_TAG 54 -#define A_FILTER 55 -#define A_F_UNTIL_HILITE 56 -#define A_GOEND_BUF 57 +#define A_B_LINE 2 +#define A_B_SCREEN 3 +#define A_B_SCROLL 4 +#define A_B_SEARCH 5 +#define A_DIGIT 6 +#define A_DISP_OPTION 7 +#define A_DEBUG 8 +#define A_EXAMINE 9 +#define A_FIRSTCMD 10 +#define A_FREPAINT 11 +#define A_F_LINE 12 +#define A_F_SCREEN 13 +#define A_F_SCROLL 14 +#define A_F_SEARCH 15 +#define A_GOEND 16 +#define A_GOLINE 17 +#define A_GOMARK 18 +#define A_HELP 19 +#define A_NEXT_FILE 20 +#define A_PERCENT 21 +#define A_PREFIX 22 +#define A_PREV_FILE 23 +#define A_QUIT 24 +#define A_REPAINT 25 +#define A_SETMARK 26 +#define A_SHELL 27 +#define A_STAT 28 +#define A_FF_LINE 29 +#define A_BF_LINE 30 +#define A_VERSION 31 +#define A_VISUAL 32 +#define A_F_WINDOW 33 +#define A_B_WINDOW 34 +#define A_F_BRACKET 35 +#define A_B_BRACKET 36 +#define A_PIPE 37 +#define A_INDEX_FILE 38 +#define A_UNDO_SEARCH 39 +#define A_FF_SCREEN 40 +#define A_LSHIFT 41 +#define A_RSHIFT 42 +#define A_AGAIN_SEARCH 43 +#define A_T_AGAIN_SEARCH 44 +#define A_REVERSE_SEARCH 45 +#define A_T_REVERSE_SEARCH 46 +#define A_OPT_TOGGLE 47 +#define A_OPT_SET 48 +#define A_OPT_UNSET 49 +#define A_F_FOREVER 50 +#define A_GOPOS 51 +#define A_REMOVE_FILE 52 +#define A_NEXT_TAG 53 +#define A_PREV_TAG 54 +#define A_FILTER 55 +#define A_F_UNTIL_HILITE 56 +#define A_GOEND_BUF 57 +#define A_LLSHIFT 58 +#define A_RRSHIFT 59 +#define A_CLRMARK 62 +#define A_SETMARKBOT 63 -#define A_INVALID 100 -#define A_NOACTION 101 -#define A_UINVALID 102 -#define A_END_LIST 103 -#define A_SPECIAL_KEY 104 +#define A_INVALID 100 +#define A_NOACTION 101 +#define A_UINVALID 102 +#define A_END_LIST 103 +#define A_SPECIAL_KEY 104 -#define A_SKIP 127 +#define A_SKIP 127 -#define A_EXTRA 0200 +#define A_EXTRA 0200 /* Line editing characters */ -#define EC_BACKSPACE 1 -#define EC_LINEKILL 2 -#define EC_RIGHT 3 -#define EC_LEFT 4 -#define EC_W_LEFT 5 -#define EC_W_RIGHT 6 -#define EC_INSERT 7 -#define EC_DELETE 8 -#define EC_HOME 9 -#define EC_END 10 -#define EC_W_BACKSPACE 11 -#define EC_W_DELETE 12 -#define EC_UP 13 -#define EC_DOWN 14 -#define EC_EXPAND 15 -#define EC_F_COMPLETE 17 -#define EC_B_COMPLETE 18 -#define EC_LITERAL 19 -#define EC_ABORT 20 +#define EC_BACKSPACE 1 +#define EC_LINEKILL 2 +#define EC_RIGHT 3 +#define EC_LEFT 4 +#define EC_W_LEFT 5 +#define EC_W_RIGHT 6 +#define EC_INSERT 7 +#define EC_DELETE 8 +#define EC_HOME 9 +#define EC_END 10 +#define EC_W_BACKSPACE 11 +#define EC_W_DELETE 12 +#define EC_UP 13 +#define EC_DOWN 14 +#define EC_EXPAND 15 +#define EC_F_COMPLETE 17 +#define EC_B_COMPLETE 18 +#define EC_LITERAL 19 +#define EC_ABORT 20 -#define EC_NOACTION 101 -#define EC_UINVALID 102 +#define EC_NOACTION 101 +#define EC_UINVALID 102 /* Flags for editchar() */ -#define EC_PEEK 01 -#define EC_NOHISTORY 02 -#define EC_NOCOMPLETE 04 -#define EC_NORIGHTLEFT 010 +#define EC_PEEK 01 +#define EC_NOHISTORY 02 +#define EC_NOCOMPLETE 04 +#define EC_NORIGHTLEFT 010 /* Environment variable stuff */ -#define EV_OK 01 +#define EV_OK 01 /* Special keys (keys which output different strings on different terminals) */ -#define SK_SPECIAL_KEY CONTROL('K') -#define SK_RIGHT_ARROW 1 -#define SK_LEFT_ARROW 2 -#define SK_UP_ARROW 3 -#define SK_DOWN_ARROW 4 -#define SK_PAGE_UP 5 -#define SK_PAGE_DOWN 6 -#define SK_HOME 7 -#define SK_END 8 -#define SK_DELETE 9 -#define SK_INSERT 10 -#define SK_CTL_LEFT_ARROW 11 -#define SK_CTL_RIGHT_ARROW 12 -#define SK_CTL_DELETE 13 -#define SK_F1 14 -#define SK_BACKTAB 15 -#define SK_CTL_BACKSPACE 16 -#define SK_CONTROL_K 40 +#define SK_SPECIAL_KEY CONTROL('K') +#define SK_RIGHT_ARROW 1 +#define SK_LEFT_ARROW 2 +#define SK_UP_ARROW 3 +#define SK_DOWN_ARROW 4 +#define SK_PAGE_UP 5 +#define SK_PAGE_DOWN 6 +#define SK_HOME 7 +#define SK_END 8 +#define SK_DELETE 9 +#define SK_INSERT 10 +#define SK_CTL_LEFT_ARROW 11 +#define SK_CTL_RIGHT_ARROW 12 +#define SK_CTL_DELETE 13 +#define SK_F1 14 +#define SK_BACKTAB 15 +#define SK_CTL_BACKSPACE 16 +#define SK_CONTROL_K 40 Modified: stable/10/contrib/less/cmdbuf.c ============================================================================== --- stable/10/contrib/less/cmdbuf.c Wed Mar 7 06:13:47 2018 (r330570) +++ stable/10/contrib/less/cmdbuf.c Wed Mar 7 06:39:00 2018 (r330571) @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2015 Mark Nudelman + * Copyright (C) 1984-2017 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -40,7 +40,7 @@ static int in_completion = 0; static char *tk_text; static char *tk_original; static char *tk_ipoint; -static char *tk_trial; +static char *tk_trial = NULL; static struct textlist tk_tlist; #endif @@ -76,25 +76,25 @@ struct mlist */ struct mlist mlist_search = { &mlist_search, &mlist_search, &mlist_search, NULL, 0 }; -public void * constant ml_search = (void *) &mlist_search; +public void *ml_search = (void *) &mlist_search; struct mlist mlist_examine = { &mlist_examine, &mlist_examine, &mlist_examine, NULL, 0 }; -public void * constant ml_examine = (void *) &mlist_examine; +public void *ml_examine = (void *) &mlist_examine; #if SHELL_ESCAPE || PIPEC struct mlist mlist_shell = { &mlist_shell, &mlist_shell, &mlist_shell, NULL, 0 }; -public void * constant ml_shell = (void *) &mlist_shell; +public void *ml_shell = (void *) &mlist_shell; #endif #else /* CMD_HISTORY */ /* If CMD_HISTORY is off, these are just flags. */ -public void * constant ml_search = (void *)1; -public void * constant ml_examine = (void *)2; +public void *ml_search = (void *)1; +public void *ml_examine = (void *)2; #if SHELL_ESCAPE || PIPEC -public void * constant ml_shell = (void *)3; +public void *ml_shell = (void *)3; #endif #endif /* CMD_HISTORY */ @@ -141,28 +141,26 @@ clear_cmd() */ public void cmd_putstr(s) - char *s; + constant char *s; { LWCHAR prev_ch = 0; LWCHAR ch; - char *endline = s + strlen(s); + constant char *endline = s + strlen(s); while (*s != '\0') { - char *ns = s; + char *ns = (char *) s; + int width; ch = step_char(&ns, +1, endline); while (s < ns) putchr(*s++); if (!utf_mode) - { - cmd_col++; - prompt_col++; - } else if (!is_composing_char(ch) && - !is_combining_char(prev_ch, ch)) - { - int width = is_wide_char(ch) ? 2 : 1; - cmd_col += width; - prompt_col += width; - } + width = 1; + else if (is_composing_char(ch) || is_combining_char(prev_ch, ch)) + width = 0; + else + width = is_wide_char(ch) ? 2 : 1; + cmd_col += width; + prompt_col += width; prev_ch = ch; } } @@ -187,6 +185,8 @@ len_cmdbuf() /* * Common part of cmd_step_right() and cmd_step_left(). + * {{ Returning pwidth and bswidth separately is a historical artifact + * since they're always the same. Maybe clean this up someday. }} */ static char * cmd_step_common(p, ch, len, pwidth, bswidth) @@ -197,58 +197,32 @@ cmd_step_common(p, ch, len, pwidth, bswidth) int *bswidth; { char *pr; + int width; if (len == 1) { pr = prchar((int) ch); - if (pwidth != NULL || bswidth != NULL) - { - int len = (int) strlen(pr); - if (pwidth != NULL) - *pwidth = len; - if (bswidth != NULL) - *bswidth = len; - } + width = (int) strlen(pr); } else { pr = prutfchar(ch); - if (pwidth != NULL || bswidth != NULL) + if (is_composing_char(ch)) + width = 0; + else if (is_ubin_char(ch)) + width = (int) strlen(pr); + else *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 7 09:31:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1392F3ECC8; Wed, 7 Mar 2018 09:31:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5444868F05; Wed, 7 Mar 2018 09:31:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F5261F9FC; Wed, 7 Mar 2018 09:31:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w279VRVW094521; Wed, 7 Mar 2018 09:31:27 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w279VRiM094520; Wed, 7 Mar 2018 09:31:27 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803070931.w279VRiM094520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 7 Mar 2018 09:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330572 - head/lib/libc/rpc X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/lib/libc/rpc X-SVN-Commit-Revision: 330572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 09:31:27 -0000 Author: eadler Date: Wed Mar 7 09:31:27 2018 New Revision: 330572 URL: https://svnweb.freebsd.org/changeset/base/330572 Log: des_crypt.3: Fix typo. Obtained from: DragonflyBSD (a78d083cf561cf325e8f1a151251b8901159e2ce) MFC After: 3 days Modified: head/lib/libc/rpc/des_crypt.3 Modified: head/lib/libc/rpc/des_crypt.3 ============================================================================== --- head/lib/libc/rpc/des_crypt.3 Wed Mar 7 06:39:00 2018 (r330571) +++ head/lib/libc/rpc/des_crypt.3 Wed Mar 7 09:31:27 2018 (r330572) @@ -108,7 +108,7 @@ vector upon return. No error. .It Bq Er DESERR_NOHWDEVICE Encryption succeeded, but done in software instead of the requested hardware. -.It Bq Er DESERR_HWERR +.It Bq Er DESERR_HWERROR An error occurred in the hardware or driver. .It Bq Er DESERR_BADPARAM Bad argument to routine. From owner-svn-src-all@freebsd.org Wed Mar 7 09:40:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB1E8F3FA12; Wed, 7 Mar 2018 09:40:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E8706974C; Wed, 7 Mar 2018 09:40:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 797B11FA57; Wed, 7 Mar 2018 09:40:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w279ef8W098365; Wed, 7 Mar 2018 09:40:41 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w279efea098364; Wed, 7 Mar 2018 09:40:41 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803070940.w279efea098364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 7 Mar 2018 09:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330573 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 330573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 09:40:42 -0000 Author: eadler Date: Wed Mar 7 09:40:41 2018 New Revision: 330573 URL: https://svnweb.freebsd.org/changeset/base/330573 Log: psm.4: remove useless information Obtained from: DragonflyBSD (f49f67c528ec63f5524da5c11e060a0e67866242) MFC After: 1 week Modified: head/share/man/man4/psm.4 Modified: head/share/man/man4/psm.4 ============================================================================== --- head/share/man/man4/psm.4 Wed Mar 7 09:31:27 2018 (r330572) +++ head/share/man/man4/psm.4 Wed Mar 7 09:40:41 2018 (r330573) @@ -868,11 +868,6 @@ unless the X server is accessing the mouse via .Xr moused 8 . Clicking any button without moving the mouse may also work. .Sh BUGS -The ioctl command -.Dv MOUSEIOCREAD -has been removed. -It was never functional anyway. -.Pp Enabling the extended support for Synaptics touchpads has been reported to cause problems with responsivity on some (newer) models of Synaptics hardware, particularly those with guest devices. From owner-svn-src-all@freebsd.org Wed Mar 7 09:58:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C18A1F40DAB; Wed, 7 Mar 2018 09:58:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 77ADC6A1A5; Wed, 7 Mar 2018 09:58:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64FDC1FD6C; Wed, 7 Mar 2018 09:58:36 +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 w279waLS008234; Wed, 7 Mar 2018 09:58:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w279waNW008233; Wed, 7 Mar 2018 09:58:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201803070958.w279waNW008233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 7 Mar 2018 09:58:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330574 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 330574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 09:58:36 -0000 Author: andrew Date: Wed Mar 7 09:58:36 2018 New Revision: 330574 URL: https://svnweb.freebsd.org/changeset/base/330574 Log: Restrict the arm64 DMAP region to the 1G blocks where we have at least one physical page. This is in preparation for limiting it further as this is needed on some hardware, however testing has shown issues with further restricting the DMAP and ACPI. Sponsored by: DARPA, AFRL Sponsored by: Cavium (Hardware) Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Mar 7 09:40:41 2018 (r330573) +++ head/sys/arm64/arm64/pmap.c Wed Mar 7 09:58:36 2018 (r330574) @@ -570,21 +570,32 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t mi vm_offset_t va; vm_paddr_t pa; u_int l1_slot; + int i; - pa = dmap_phys_base = min_pa & ~L1_OFFSET; - va = DMAP_MIN_ADDRESS; - for (; va < DMAP_MAX_ADDRESS && pa < max_pa; - pa += L1_SIZE, va += L1_SIZE, l1_slot++) { - l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); + dmap_phys_base = min_pa & ~L1_OFFSET; + dmap_phys_max = 0; + dmap_max_addr = 0; - pmap_load_store(&pagetable_dmap[l1_slot], - (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN | - ATTR_IDX(CACHED_MEMORY) | L1_BLOCK); - } + for (i = 0; i < (physmap_idx * 2); i += 2) { + pa = physmap[i] & ~L1_OFFSET; + va = pa - dmap_phys_base + DMAP_MIN_ADDRESS; - /* Set the upper limit of the DMAP region */ - dmap_phys_max = pa; - dmap_max_addr = va; + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; + pa += L1_SIZE, va += L1_SIZE) { + l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); + /* We already have an entry */ + if (pagetable_dmap[l1_slot] != 0) + continue; + pmap_load_store(&pagetable_dmap[l1_slot], + (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN | + ATTR_IDX(CACHED_MEMORY) | L1_BLOCK); + } + + if (pa > dmap_phys_max) { + dmap_phys_max = pa; + dmap_max_addr = va; + } + } cpu_tlb_flushID(); } From owner-svn-src-all@freebsd.org Wed Mar 7 10:47:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71E9BF44693; Wed, 7 Mar 2018 10:47:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0718C6C038; Wed, 7 Mar 2018 10:47:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01C4420562; Wed, 7 Mar 2018 10:47:28 +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 w27AlRBI032949; Wed, 7 Mar 2018 10:47:27 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27AlRiY032946; Wed, 7 Mar 2018 10:47:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201803071047.w27AlRiY032946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 7 Mar 2018 10:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330575 - in head/sys: conf dev/acpica dev/pci X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: conf dev/acpica dev/pci X-SVN-Commit-Revision: 330575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 10:47:28 -0000 Author: andrew Date: Wed Mar 7 10:47:27 2018 New Revision: 330575 URL: https://svnweb.freebsd.org/changeset/base/330575 Log: Add an acpi attachment to the pci_host_generic driver and have the ACPI bus provide it with its needed memory resources. This allows us to use PCIe on the ThunderX2 and, with a previous version of the patch, on the SoftIron 3000 with ACPI. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Sponsored by: DARPA, AFRL Sponsored by: Cavium (Hardware) Differential Revision: https://reviews.freebsd.org/D8767 Added: head/sys/dev/pci/pci_host_generic_acpi.c (contents, props changed) Modified: head/sys/conf/files.arm64 head/sys/dev/acpica/acpi.c Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Mar 7 09:58:36 2018 (r330574) +++ head/sys/conf/files.arm64 Wed Mar 7 10:47:27 2018 (r330575) @@ -171,6 +171,8 @@ crypto/blowfish/bf_enc.c optional crypto | ipsec | ips crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb dev/acpica/acpi_bus_if.m optional acpi dev/acpica/acpi_if.m optional acpi +dev/acpica/acpi_pci_link.c optional acpi pci +dev/acpica/acpi_pcib.c optional acpi pci dev/ahci/ahci_generic.c optional ahci dev/axgbe/if_axgbe.c optional axgbe dev/axgbe/xgbe-desc.c optional axgbe @@ -191,6 +193,7 @@ dev/neta/if_mvneta.c optional neta mdio mii dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofwpci.c optional fdt pci dev/pci/pci_host_generic.c optional pci +dev/pci/pci_host_generic_acpi.c optional pci acpi dev/pci/pci_host_generic_fdt.c optional pci fdt dev/psci/psci.c optional psci dev/psci/psci_arm64.S optional psci Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Wed Mar 7 09:58:36 2018 (r330574) +++ head/sys/dev/acpica/acpi.c Wed Mar 7 10:47:27 2018 (r330575) @@ -1883,6 +1883,29 @@ acpi_enable_pcie(void) alloc++; } } +#elif defined(__aarch64__) +static void +acpi_enable_pcie(device_t child, int segment) +{ + ACPI_TABLE_HEADER *hdr; + ACPI_MCFG_ALLOCATION *alloc, *end; + ACPI_STATUS status; + + status = AcpiGetTable(ACPI_SIG_MCFG, 1, &hdr); + if (ACPI_FAILURE(status)) + return; + + end = (ACPI_MCFG_ALLOCATION *)((char *)hdr + hdr->Length); + alloc = (ACPI_MCFG_ALLOCATION *)((ACPI_TABLE_MCFG *)hdr + 1); + while (alloc < end) { + if (alloc->PciSegment == segment) { + bus_set_resource(child, SYS_RES_MEMORY, 0, + alloc->Address, 0x10000000); + return; + } + alloc++; + } +} #endif /* @@ -1974,6 +1997,9 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, voi { ACPI_DEVICE_INFO *devinfo; struct acpi_device *ad; +#ifdef __aarch64__ + int segment; +#endif struct acpi_prw_data prw; ACPI_OBJECT_TYPE type; ACPI_HANDLE h; @@ -2076,6 +2102,13 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, voi ad->ad_cls_class = strtoul(devinfo->ClassCode.String, NULL, 16); } +#ifdef __aarch64__ + if ((devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0) { + if (ACPI_SUCCESS(acpi_GetInteger(handle, "_SEG", &segment))) { + acpi_enable_pcie(child, segment); + } + } +#endif AcpiOsFree(devinfo); } break; Added: head/sys/dev/pci/pci_host_generic_acpi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pci/pci_host_generic_acpi.c Wed Mar 7 10:47:27 2018 (r330575) @@ -0,0 +1,329 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* Generic ECAM PCIe driver */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "pcib_if.h" + +int pci_host_generic_acpi_attach(device_t); + +/* Assembling ECAM Configuration Address */ +#define PCIE_BUS_SHIFT 20 +#define PCIE_SLOT_SHIFT 15 +#define PCIE_FUNC_SHIFT 12 +#define PCIE_BUS_MASK 0xFF +#define PCIE_SLOT_MASK 0x1F +#define PCIE_FUNC_MASK 0x07 +#define PCIE_REG_MASK 0xFFF + +#define PCIE_ADDR_OFFSET(bus, slot, func, reg) \ + ((((bus) & PCIE_BUS_MASK) << PCIE_BUS_SHIFT) | \ + (((slot) & PCIE_SLOT_MASK) << PCIE_SLOT_SHIFT) | \ + (((func) & PCIE_FUNC_MASK) << PCIE_FUNC_SHIFT) | \ + ((reg) & PCIE_REG_MASK)) + +#define PCI_IO_WINDOW_OFFSET 0x1000 + +#define SPACE_CODE_SHIFT 24 +#define SPACE_CODE_MASK 0x3 +#define SPACE_CODE_IO_SPACE 0x1 +#define PROPS_CELL_SIZE 1 +#define PCI_ADDR_CELL_SIZE 2 + +struct generic_pcie_acpi_softc { + struct generic_pcie_core_softc base; + ACPI_BUFFER ap_prt; /* interrupt routing table */ +}; + +/* Forward prototypes */ + +static int generic_pcie_acpi_probe(device_t dev); +static uint32_t generic_pcie_read_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, int bytes); +static void generic_pcie_write_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, uint32_t val, int bytes); +static int generic_pcie_release_resource(device_t dev, device_t child, + int type, int rid, struct resource *res); + +static int +generic_pcie_acpi_probe(device_t dev) +{ + ACPI_DEVICE_INFO *devinfo; + ACPI_HANDLE h; + int root; + + if (acpi_disabled("pcib") || (h = acpi_get_handle(dev)) == NULL || + ACPI_FAILURE(AcpiGetObjectInfo(h, &devinfo))) + return (ENXIO); + root = (devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0; + AcpiOsFree(devinfo); + if (!root) + return (ENXIO); + + device_set_desc(dev, "Generic PCI host controller"); + return (BUS_PROBE_GENERIC); +} + +int +pci_host_generic_acpi_attach(device_t dev) +{ + struct generic_pcie_acpi_softc *sc; + ACPI_HANDLE handle; + int error; + + sc = device_get_softc(dev); + + handle = acpi_get_handle(dev); + if (ACPI_FAILURE(acpi_GetInteger(handle, "_CCA", &sc->base.coherent))) + sc->base.coherent = 0; + if (bootverbose) + device_printf(dev, "Bus is%s cache-coherent\n", + sc->base.coherent ? "" : " not"); + + acpi_pcib_fetch_prt(dev, &sc->ap_prt); + + error = pci_host_generic_core_attach(dev); + if (error != 0) + return (error); + + device_add_child(dev, "pci", -1); + return (bus_generic_attach(dev)); +} + +static int +generic_pcie_acpi_route_interrupt(device_t bus, device_t dev, int pin) +{ + struct generic_pcie_acpi_softc *sc; + + sc = device_get_softc(bus); + + return (acpi_pcib_route_interrupt(bus, dev, pin, &sc->ap_prt)); +} + +static struct rman * +generic_pcie_acpi_rman(struct generic_pcie_acpi_softc *sc, int type) +{ + + switch (type) { + case SYS_RES_IOPORT: + return (&sc->base.io_rman); + case SYS_RES_MEMORY: + return (&sc->base.mem_rman); + default: + break; + } + + return (NULL); +} + +static struct resource * +pci_host_generic_acpi_alloc_resource(device_t dev, device_t child, int type, + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct generic_pcie_acpi_softc *sc; + + if (type == PCI_RES_BUS) { + sc = device_get_softc(dev); + return (pci_domain_alloc_bus(sc->base.ecam, child, rid, start, + end, count, flags)); + } +#endif + + return (bus_generic_alloc_resource(dev, child, type, rid, start, end, + count, flags)); +} + +static int +generic_pcie_acpi_activate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ + struct generic_pcie_acpi_softc *sc; + int res; + + sc = device_get_softc(dev); + + if ((res = rman_activate_resource(r)) != 0) + return (res); + + res = BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, type, rid,r); + return (res); +} + +static int +generic_pcie_acpi_deactivate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ + int res; + + if ((res = rman_deactivate_resource(r)) != 0) + return (res); + + res = BUS_DEACTIVATE_RESOURCE(device_get_parent(dev), child, type, + rid, r); + return (res); +} + +static int +generic_pcie_acpi_alloc_msi(device_t pci, device_t child, int count, + int maxcount, int *irqs) +{ + +#if defined(INTRNG) + return (intr_alloc_msi(pci, child, 1, count, maxcount, irqs)); +#else + return (ENXIO); +#endif +} + +static int +generic_pcie_acpi_release_msi(device_t pci, device_t child, int count, + int *irqs) +{ + +#if defined(INTRNG) + return (intr_release_msi(pci, child, 1, count, irqs)); +#else + return (ENXIO); +#endif +} + +static int +generic_pcie_acpi_map_msi(device_t pci, device_t child, int irq, uint64_t *addr, + uint32_t *data) +{ + +#if defined(INTRNG) + return (intr_map_msi(pci, child, 1, irq, addr, data)); +#else + return (ENXIO); +#endif +} + +static int +generic_pcie_acpi_alloc_msix(device_t pci, device_t child, int *irq) +{ + +#if defined(INTRNG) + return (intr_alloc_msix(pci, child, 1, irq)); +#else + return (ENXIO); +#endif +} + +static int +generic_pcie_acpi_release_msix(device_t pci, device_t child, int irq) +{ + +#if defined(INTRNG) + return (intr_release_msix(pci, child, 1, irq)); +#else + return (ENXIO); +#endif +} + +static int +generic_pcie_acpi_get_id(device_t pci, device_t child, enum pci_id_type type, + uintptr_t *id) +{ + struct generic_pcie_acpi_softc *sc; + int err; + + /* Use the PCI RID to find the MSI ID */ + if (type == PCI_ID_MSI) { + sc = device_get_softc(pci); + type = PCI_ID_RID; + err = pcib_get_id(pci, child, type, id); + if (err != 0) + return (err); + *id |= sc->base.ecam << 16; + return (0); + } + + return (pcib_get_id(pci, child, type, id)); +} + +static device_method_t generic_pcie_acpi_methods[] = { + DEVMETHOD(device_probe, generic_pcie_acpi_probe), + DEVMETHOD(device_attach, pci_host_generic_acpi_attach), + DEVMETHOD(bus_alloc_resource, pci_host_generic_acpi_alloc_resource), + DEVMETHOD(bus_activate_resource, generic_pcie_acpi_activate_resource), + DEVMETHOD(bus_deactivate_resource, generic_pcie_acpi_deactivate_resource), + + /* pcib interface */ + DEVMETHOD(pcib_route_interrupt, generic_pcie_acpi_route_interrupt), + DEVMETHOD(pcib_alloc_msi, generic_pcie_acpi_alloc_msi), + DEVMETHOD(pcib_release_msi, generic_pcie_acpi_release_msi), + DEVMETHOD(pcib_alloc_msix, generic_pcie_acpi_alloc_msix), + DEVMETHOD(pcib_release_msix, generic_pcie_acpi_release_msix), + DEVMETHOD(pcib_map_msi, generic_pcie_acpi_map_msi), + DEVMETHOD(pcib_get_id, generic_pcie_acpi_get_id), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(pcib, generic_pcie_acpi_driver, generic_pcie_acpi_methods, + sizeof(struct generic_pcie_acpi_softc), generic_pcie_core_driver); + +static devclass_t generic_pcie_acpi_devclass; + +DRIVER_MODULE(pcib, acpi, generic_pcie_acpi_driver, generic_pcie_acpi_devclass, + 0, 0); From owner-svn-src-all@freebsd.org Wed Mar 7 10:54:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5578BF44EC1; Wed, 7 Mar 2018 10:54:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 078D46C585; Wed, 7 Mar 2018 10:54:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02509206FC; Wed, 7 Mar 2018 10:54:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27AsAwt037784; Wed, 7 Mar 2018 10:54:10 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27AsAPs037775; Wed, 7 Mar 2018 10:54:10 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803071054.w27AsAPs037775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 7 Mar 2018 10:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330576 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 X-SVN-Commit-Revision: 330576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 10:54:11 -0000 Author: eadler Date: Wed Mar 7 10:54:10 2018 New Revision: 330576 URL: https://svnweb.freebsd.org/changeset/base/330576 Log: Revert MFC of r330463 r330462 r330454 r330452 r330451: These commits have KPI/KBI considerations (or are a result of those that do). I did not properly take into account these concerns when merging to a kbi-stable branch. Requested by: jhb Pointyhat to: eadler Modified: stable/11/sys/dev/iwm/if_iwm.c stable/11/sys/dev/otus/if_otus.c stable/11/sys/dev/usb/wlan/if_rsu.c stable/11/sys/net80211/ieee80211_freebsd.h stable/11/sys/net80211/ieee80211_ht.c stable/11/sys/net80211/ieee80211_input.c stable/11/sys/net80211/ieee80211_output.c stable/11/sys/net80211/ieee80211_proto.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Wed Mar 7 10:47:27 2018 (r330575) +++ stable/11/sys/dev/iwm/if_iwm.c Wed Mar 7 10:54:10 2018 (r330576) @@ -3260,13 +3260,8 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf * } /* rssi is in 1/2db units */ - rxs.c_rssi = rssi * 2; - rxs.c_nf = sc->sc_noise; - if (ieee80211_add_rx_params(m, &rxs) == 0) { - if (ni) - ieee80211_free_node(ni); - goto fail; - } + rxs.rssi = rssi * 2; + rxs.nf = sc->sc_noise; if (ieee80211_radiotap_active_vap(vap)) { struct iwm_rx_radiotap_header *tap = &sc->sc_rxtap; @@ -3303,18 +3298,17 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf * IWM_UNLOCK(sc); if (ni != NULL) { IWM_DPRINTF(sc, IWM_DEBUG_RECV, "input m %p\n", m); - ieee80211_input_mimo(ni, m); + ieee80211_input_mimo(ni, m, &rxs); ieee80211_free_node(ni); } else { IWM_DPRINTF(sc, IWM_DEBUG_RECV, "inputall m %p\n", m); - ieee80211_input_mimo_all(ic, m); + ieee80211_input_mimo_all(ic, m, &rxs); } IWM_LOCK(sc); return TRUE; -fail: - counter_u64_add(ic->ic_ierrors, 1); +fail: counter_u64_add(ic->ic_ierrors, 1); return FALSE; } Modified: stable/11/sys/dev/otus/if_otus.c ============================================================================== --- stable/11/sys/dev/otus/if_otus.c Wed Mar 7 10:47:27 2018 (r330575) +++ stable/11/sys/dev/otus/if_otus.c Wed Mar 7 10:54:10 2018 (r330576) @@ -1710,13 +1710,10 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, in /* Add RSSI/NF to this mbuf */ bzero(&rxs, sizeof(rxs)); rxs.r_flags = IEEE80211_R_NF | IEEE80211_R_RSSI; - rxs.c_nf = sc->sc_nf[0]; /* XXX chain 0 != combined rssi/nf */ - rxs.c_rssi = tail->rssi; + rxs.nf = sc->sc_nf[0]; /* XXX chain 0 != combined rssi/nf */ + rxs.rssi = tail->rssi; /* XXX TODO: add MIMO RSSI/NF as well */ - if (ieee80211_add_rx_params(m, &rxs) == 0) { - counter_u64_add(ic->ic_ierrors, 1); - return; - } + ieee80211_add_rx_params(m, &rxs); /* XXX make a method */ STAILQ_INSERT_TAIL(&rxq->mq_head, m, m_stailqpkt); @@ -1829,10 +1826,10 @@ tr_setup: if (ni != NULL) { if (ni->ni_flags & IEEE80211_NODE_HT) m->m_flags |= M_AMPDU; - (void)ieee80211_input_mimo(ni, m); + (void)ieee80211_input_mimo(ni, m, NULL); ieee80211_free_node(ni); } else - (void)ieee80211_input_mimo_all(ic, m); + (void)ieee80211_input_mimo_all(ic, m, NULL); } #ifdef IEEE80211_SUPPORT_SUPERG ieee80211_ff_age_all(ic, 100); Modified: stable/11/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsu.c Wed Mar 7 10:47:27 2018 (r330575) +++ stable/11/sys/dev/usb/wlan/if_rsu.c Wed Mar 7 10:54:10 2018 (r330576) @@ -1546,14 +1546,12 @@ rsu_event_survey(struct rsu_softc *sc, uint8_t *buf, i rxs.c_ieee = le32toh(bss->config.dsconfig); rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); /* This is a number from 0..100; so let's just divide it down a bit */ - rxs.c_rssi = le32toh(bss->rssi) / 2; - rxs.c_nf = -96; - if (ieee80211_add_rx_params(m, &rxs) == 0) - return; + rxs.rssi = le32toh(bss->rssi) / 2; + rxs.nf = -96; /* XXX avoid a LOR */ RSU_UNLOCK(sc); - ieee80211_input_mimo_all(ic, m); + ieee80211_input_mimo_all(ic, m, &rxs); RSU_LOCK(sc); } Modified: stable/11/sys/net80211/ieee80211_freebsd.h ============================================================================== --- stable/11/sys/net80211/ieee80211_freebsd.h Wed Mar 7 10:47:27 2018 (r330575) +++ stable/11/sys/net80211/ieee80211_freebsd.h Wed Mar 7 10:54:10 2018 (r330576) @@ -620,82 +620,33 @@ int ieee80211_add_xmit_params(struct mbuf *m, int ieee80211_get_xmit_params(struct mbuf *m, struct ieee80211_bpf_params *); -/* - * Note: this is fine for 3x3 (and 4x4) 11n HT40; - * but getting EVM information for VHT80, VHT160 - * will involve more than 6 EVM pilots. - */ -#define IEEE80211_MAX_CHAINS 4 +#define IEEE80211_MAX_CHAINS 3 #define IEEE80211_MAX_EVM_PILOTS 6 -#define IEEE80211_R_NF 0x00000001 /* global NF value valid */ -#define IEEE80211_R_RSSI 0x00000002 /* global RSSI value valid */ -#define IEEE80211_R_C_CHAIN 0x00000004 /* RX chain count valid */ -#define IEEE80211_R_C_NF 0x00000008 /* per-chain NF value valid */ -#define IEEE80211_R_C_RSSI 0x00000010 /* per-chain RSSI value valid */ -#define IEEE80211_R_C_EVM 0x00000020 /* per-chain EVM valid */ -#define IEEE80211_R_C_HT40 0x00000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */ -#define IEEE80211_R_FREQ 0x00000080 /* Freq value populated, MHz */ -#define IEEE80211_R_IEEE 0x00000100 /* IEEE value populated */ -#define IEEE80211_R_BAND 0x00000200 /* Frequency band populated */ -#define IEEE80211_R_TSF32 0x00004000 /* 32 bit TSF */ -#define IEEE80211_R_TSF64 0x00008000 /* 64 bit TSF */ -#define IEEE80211_R_TSF_START 0x00010000 /* TSF is sampled at start of frame */ -#define IEEE80211_R_TSF_END 0x00020000 /* TSF is sampled at end of frame */ +#define IEEE80211_R_NF 0x0000001 /* global NF value valid */ +#define IEEE80211_R_RSSI 0x0000002 /* global RSSI value valid */ +#define IEEE80211_R_C_CHAIN 0x0000004 /* RX chain count valid */ +#define IEEE80211_R_C_NF 0x0000008 /* per-chain NF value valid */ +#define IEEE80211_R_C_RSSI 0x0000010 /* per-chain RSSI value valid */ +#define IEEE80211_R_C_EVM 0x0000020 /* per-chain EVM valid */ +#define IEEE80211_R_C_HT40 0x0000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */ +#define IEEE80211_R_FREQ 0x0000080 /* Freq value populated, MHz */ +#define IEEE80211_R_IEEE 0x0000100 /* IEEE value populated */ +#define IEEE80211_R_BAND 0x0000200 /* Frequency band populated */ -/* RX packet flags - describe the kind of frame */ -#define IEEE80211_RX_F_STBC 0x00000001 -#define IEEE80211_RX_F_LDPC 0x00000002 -#define IEEE80211_RX_F_AMSDU 0x00000004 /* This is the start of an decap AMSDU list */ -#define IEEE80211_RX_F_AMSDU_MORE 0x00000008 /* This is another decap AMSDU frame in the batch */ -#define IEEE80211_RX_F_AMPDU 0x00000010 /* This is the start of an decap AMPDU list */ -#define IEEE80211_RX_F_AMPDU_MORE 0x00000020 /* This is another decap AMPDU frame in the batch */ - -/* Channel width */ -#define IEEE80211_RX_FW_20MHZ 1 -#define IEEE80211_RX_FW_40MHZ 2 -#define IEEE80211_RX_FW_80MHZ 3 - -/* PHY type */ -#define IEEE80211_RX_FP_11B 1 -#define IEEE80211_RX_FP_11G 2 -#define IEEE80211_RX_FP_11A 3 -#define IEEE80211_RX_FP_11NA 4 -#define IEEE80211_RX_FP_11NG 5 - struct ieee80211_rx_stats { uint32_t r_flags; /* IEEE80211_R_* flags */ - uint32_t c_pktflags; /* IEEE80211_RX_F_* flags */ - - uint64_t c_rx_tsf; /* 32 or 64 bit TSF */ - - /* All DWORD aligned */ - int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */ - int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ - int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ - int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ - - /* 32 bits */ - uint8_t c_nf; /* global NF */ - uint8_t c_rssi; /* global RSSI */ uint8_t c_chain; /* number of RX chains involved */ - uint8_t c_rate; /* legacy + 11n rate code */ - - /* 32 bits */ - uint16_t c_freq; /* Frequency, MHz */ - uint8_t c_ieee; /* Channel */ - uint8_t c_width; /* channel width, FW flags above */ - - /* Force alignment to DWORD */ - union { - uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; - /* per-chain, per-pilot EVM values */ - uint32_t __aln[8]; - } evm; - - /* 32 bits */ - uint8_t c_phytype; /* PHY type, FW flags above */ - uint8_t c_pad2[3]; + int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */ + int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ + int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ + int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ + uint8_t nf; /* global NF */ + uint8_t rssi; /* global RSSI */ + uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; + /* per-chain, per-pilot EVM values */ + uint16_t c_freq; + uint8_t c_ieee; }; struct ieee80211_rx_params { Modified: stable/11/sys/net80211/ieee80211_ht.c ============================================================================== --- stable/11/sys/net80211/ieee80211_ht.c Wed Mar 7 10:47:27 2018 (r330575) +++ stable/11/sys/net80211/ieee80211_ht.c Wed Mar 7 10:54:10 2018 (r330576) @@ -586,7 +586,7 @@ ieee80211_ampdu_rx_start_ext(struct ieee80211_node *ni rap->rxa_flags |= IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_XCHGPEND; IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, - "%s: tid=%d, start=%d, wnd=%d, flags=0x%08x", + "%s: tid=%d, start=%d, wnd=%d, flags=0x%08x\n", __func__, tid, seq, Modified: stable/11/sys/net80211/ieee80211_input.c ============================================================================== --- stable/11/sys/net80211/ieee80211_input.c Wed Mar 7 10:47:27 2018 (r330575) +++ stable/11/sys/net80211/ieee80211_input.c Wed Mar 7 10:54:10 2018 (r330576) @@ -83,20 +83,24 @@ ieee80211_process_mimo(struct ieee80211_node *ni, stru } int -ieee80211_input_mimo(struct ieee80211_node *ni, struct mbuf *m) +ieee80211_input_mimo(struct ieee80211_node *ni, struct mbuf *m, + struct ieee80211_rx_stats *rx) { struct ieee80211_rx_stats rxs; - /* try to read stats from mbuf */ - bzero(&rxs, sizeof(rxs)); - if (ieee80211_get_rx_params(m, &rxs) != 0) - return (-1); + if (rx) { + memcpy(&rxs, rx, sizeof(*rx)); + } else { + /* try to read from mbuf */ + bzero(&rxs, sizeof(rxs)); + ieee80211_get_rx_params(m, &rxs); + } /* XXX should assert IEEE80211_R_NF and IEEE80211_R_RSSI are set */ ieee80211_process_mimo(ni, &rxs); //return ieee80211_input(ni, m, rx->rssi, rx->nf); - return ni->ni_vap->iv_input(ni, m, &rxs, rxs.c_rssi, rxs.c_nf); + return ni->ni_vap->iv_input(ni, m, &rxs, rxs.rssi, rxs.nf); } int @@ -105,23 +109,29 @@ ieee80211_input_all(struct ieee80211com *ic, struct mb struct ieee80211_rx_stats rx; rx.r_flags = IEEE80211_R_NF | IEEE80211_R_RSSI; - rx.c_nf = nf; - rx.c_rssi = rssi; - - if (!ieee80211_add_rx_params(m, &rx)) - return (-1); - - return ieee80211_input_mimo_all(ic, m); + rx.nf = nf; + rx.rssi = rssi; + return ieee80211_input_mimo_all(ic, m, &rx); } int -ieee80211_input_mimo_all(struct ieee80211com *ic, struct mbuf *m) +ieee80211_input_mimo_all(struct ieee80211com *ic, struct mbuf *m, + struct ieee80211_rx_stats *rx) { + struct ieee80211_rx_stats rxs; struct ieee80211vap *vap; int type = -1; m->m_flags |= M_BCAST; /* NB: mark for bpf tap'ing */ + if (rx) { + memcpy(&rxs, rx, sizeof(*rx)); + } else { + /* try to read from mbuf */ + bzero(&rxs, sizeof(rxs)); + ieee80211_get_rx_params(m, &rxs); + } + /* XXX locking */ TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { struct ieee80211_node *ni; @@ -142,7 +152,6 @@ ieee80211_input_mimo_all(struct ieee80211com *ic, stru /* * Packet contents are changed by ieee80211_decap * so do a deep copy of the packet. - * NB: tags are copied too. */ mcopy = m_dup(m, M_NOWAIT); if (mcopy == NULL) { @@ -154,7 +163,7 @@ ieee80211_input_mimo_all(struct ieee80211com *ic, stru m = NULL; } ni = ieee80211_ref_node(vap->iv_bss); - type = ieee80211_input_mimo(ni, mcopy); + type = ieee80211_input_mimo(ni, mcopy, &rxs); ieee80211_free_node(ni); } if (m != NULL) /* no vaps, reclaim mbuf */ Modified: stable/11/sys/net80211/ieee80211_output.c ============================================================================== --- stable/11/sys/net80211/ieee80211_output.c Wed Mar 7 10:47:27 2018 (r330575) +++ stable/11/sys/net80211/ieee80211_output.c Wed Mar 7 10:54:10 2018 (r330576) @@ -2074,7 +2074,6 @@ ieee80211_send_probereq(struct ieee80211_node *ni, { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; - struct ieee80211_node *bss; const struct ieee80211_txparam *tp; struct ieee80211_bpf_params params; const struct ieee80211_rateset *rs; @@ -2082,13 +2081,10 @@ ieee80211_send_probereq(struct ieee80211_node *ni, uint8_t *frm; int ret; - bss = ieee80211_ref_node(vap->iv_bss); - if (vap->iv_state == IEEE80211_S_CAC) { IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT, ni, "block %s frame in CAC state", "probe request"); vap->iv_stats.is_tx_badstate++; - ieee80211_free_node(bss); return EIO; /* XXX */ } @@ -2110,7 +2106,6 @@ ieee80211_send_probereq(struct ieee80211_node *ni, * [tlv] supported rates * [tlv] RSN (optional) * [tlv] extended supported rates - * [tlv] HT cap (optional) * [tlv] WPA (optional) * [tlv] user-specified ie's */ @@ -2118,8 +2113,6 @@ ieee80211_send_probereq(struct ieee80211_node *ni, ic->ic_headroom + sizeof(struct ieee80211_frame), 2 + IEEE80211_NWID_LEN + 2 + IEEE80211_RATE_SIZE - + sizeof(struct ieee80211_ie_htcap) - + sizeof(struct ieee80211_ie_htinfo) + sizeof(struct ieee80211_ie_wpa) + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE) + sizeof(struct ieee80211_ie_wpa) @@ -2129,7 +2122,6 @@ ieee80211_send_probereq(struct ieee80211_node *ni, if (m == NULL) { vap->iv_stats.is_tx_nobuf++; ieee80211_free_node(ni); - ieee80211_free_node(bss); return ENOMEM; } @@ -2138,27 +2130,6 @@ ieee80211_send_probereq(struct ieee80211_node *ni, frm = ieee80211_add_rates(frm, rs); frm = ieee80211_add_rsn(frm, vap); frm = ieee80211_add_xrates(frm, rs); - - /* - * Note: we can't use bss; we don't have one yet. - * - * So, we should announce our capabilities - * in this channel mode (2g/5g), not the - * channel details itself. - */ - if ((vap->iv_opmode == IEEE80211_M_IBSS) && - (vap->iv_flags_ht & IEEE80211_FHT_HT)) { - struct ieee80211_channel *c; - - /* - * Get the HT channel that we should try upgrading to. - * If we can do 40MHz then this'll upgrade it appropriately. - */ - c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan, - vap->iv_flags_ht); - frm = ieee80211_add_htcap_ch(frm, vap, c); - } - frm = ieee80211_add_wpa(frm, vap); if (vap->iv_appie_probereq != NULL) frm = add_appie(frm, vap->iv_appie_probereq); @@ -2170,7 +2141,6 @@ ieee80211_send_probereq(struct ieee80211_node *ni, if (m == NULL) { /* NB: cannot happen */ ieee80211_free_node(ni); - ieee80211_free_node(bss); return ENOMEM; } @@ -2187,11 +2157,8 @@ ieee80211_send_probereq(struct ieee80211_node *ni, IEEE80211_NODE_STAT(ni, tx_mgmt); IEEE80211_DPRINTF(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_DUMPPKTS, - "send probe req on channel %u bssid %s sa %6D da %6D ssid \"%.*s\"\n", - ieee80211_chan2ieee(ic, ic->ic_curchan), - ether_sprintf(bssid), - sa, ":", - da, ":", + "send probe req on channel %u bssid %s ssid \"%.*s\"\n", + ieee80211_chan2ieee(ic, ic->ic_curchan), ether_sprintf(bssid), ssidlen, ssid); memset(¶ms, 0, sizeof(params)); @@ -2206,7 +2173,6 @@ ieee80211_send_probereq(struct ieee80211_node *ni, params.ibp_power = ni->ni_txpower; ret = ieee80211_raw_output(vap, ni, m, ¶ms); IEEE80211_TX_UNLOCK(ic); - ieee80211_free_node(bss); return (ret); } Modified: stable/11/sys/net80211/ieee80211_proto.h ============================================================================== --- stable/11/sys/net80211/ieee80211_proto.h Wed Mar 7 10:47:27 2018 (r330575) +++ stable/11/sys/net80211/ieee80211_proto.h Wed Mar 7 10:54:10 2018 (r330576) @@ -83,8 +83,10 @@ void ieee80211_syncflag_ext(struct ieee80211vap *, int ((ni)->ni_vap->iv_input(ni, m, NULL, rssi, nf)) int ieee80211_input_all(struct ieee80211com *, struct mbuf *, int, int); -int ieee80211_input_mimo(struct ieee80211_node *, struct mbuf *); -int ieee80211_input_mimo_all(struct ieee80211com *, struct mbuf *); +int ieee80211_input_mimo(struct ieee80211_node *, struct mbuf *, + struct ieee80211_rx_stats *); +int ieee80211_input_mimo_all(struct ieee80211com *, struct mbuf *, + struct ieee80211_rx_stats *); struct ieee80211_bpf_params; int ieee80211_mgmt_output(struct ieee80211_node *, struct mbuf *, int, From owner-svn-src-all@freebsd.org Wed Mar 7 11:03:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B126F458C2; Wed, 7 Mar 2018 11:03:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF5086CB86; Wed, 7 Mar 2018 11:03:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D527120890; Wed, 7 Mar 2018 11:03:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27B31KE042787; Wed, 7 Mar 2018 11:03:01 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27B31Rh042786; Wed, 7 Mar 2018 11:03:01 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803071103.w27B31Rh042786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 7 Mar 2018 11:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330577 - stable/11/contrib/ldns-host X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/contrib/ldns-host X-SVN-Commit-Revision: 330577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 11:03:02 -0000 Author: eadler Date: Wed Mar 7 11:03:01 2018 New Revision: 330577 URL: https://svnweb.freebsd.org/changeset/base/330577 Log: MFC r302779,r302807: merge upstream hg 06347b1f76fe (fix IXFR) Initialize first_serial to 0 in dozonetransfer(..) to fix -Wuninitialized warning PR: 209177 Modified: stable/11/contrib/ldns-host/ldns-host.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ldns-host/ldns-host.c ============================================================================== --- stable/11/contrib/ldns-host/ldns-host.c Wed Mar 7 10:54:10 2018 (r330576) +++ stable/11/contrib/ldns-host/ldns-host.c Wed Mar 7 11:03:01 2018 (r330577) @@ -156,6 +156,19 @@ memerr: return LDNS_STATUS_MEM_ERR; } +static uint32_t +ldns_rr_soa_get_serial(const ldns_rr *rr) +{ + const ldns_rdf *rdf; + + if (ldns_rr_get_type(rr) != LDNS_RR_TYPE_SOA) return 0; + if (ldns_rr_rd_count(rr) != 7) return 0; + rdf = ldns_rr_rdf(rr, 2); + if (ldns_rdf_get_type(rdf) != LDNS_RDF_TYPE_INT32) return 0; + if (ldns_rdf_size(rdf) != 4) return 0; + return ldns_rdf2native_int32(rdf); +} + static ldns_status ldns_tcp_start(ldns_resolver *res, ldns_pkt *qpkt, int nameserver) { /* This routine is based on ldns_axfr_start, with the major @@ -873,18 +886,16 @@ dozonetransfer(ldns_resolver *res, ldns_rdf *domain, b ldns_rdf *dname; ldns_rr_type rrtype; ldns_rr_list *rrl; - int i, nsoa = 0; + ldns_rr *rr; + size_t i, nsoa = 0; + uint32_t first_serial = 0; rrtype = o_rrtype; o_rrtype = (o_mode == M_AXFR) ? LDNS_RR_TYPE_AXFR : LDNS_RR_TYPE_IXFR; dname = search(res, domain, &pkt, absolute, false); for (;;) { - rrl = ldns_pkt_answer(pkt); - for (i = ldns_rr_list_rr_count(rrl) - 1; i >= 0; i--) { - if (ldns_rr_get_type(ldns_rr_list_rr(rrl, i)) == LDNS_RR_TYPE_SOA) - nsoa++; - } + rrl = ldns_rr_list_clone(ldns_pkt_answer(pkt)); ldns_pkt_filter_answer(pkt, rrtype); report(res, dname != NULL ? dname : domain, pkt); if ((dname == NULL) || @@ -893,9 +904,29 @@ dozonetransfer(ldns_resolver *res, ldns_rdf *domain, b ldns_tcp_close(res); return false; } - if (nsoa >= 2) { - ldns_tcp_close(res); - return true; + for (i = 0; i < ldns_rr_list_rr_count(rrl); i++) { + rr = ldns_rr_list_rr(rrl, i); + if (nsoa == 0) { + if (ldns_rr_get_type(rr) != LDNS_RR_TYPE_SOA) { + printf("; Transfer failed. " + "Didn't start with SOA answer.\n"); + ldns_tcp_close(res); + return false; + } + first_serial = ldns_rr_soa_get_serial(rr); + if ((o_mode == M_IXFR) && (first_serial <= o_ixfr_serial)) { + ldns_tcp_close(res); + return true; + } + } + if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_SOA) { + nsoa = nsoa < 2 ? nsoa + 1 : 1; + if ((nsoa == 2) && + (ldns_rr_soa_get_serial(rr) == first_serial)) { + ldns_tcp_close(res); + return true; + } + } } if (ldns_tcp_read(&nextpkt, res) != LDNS_STATUS_OK) { printf("; Transfer failed.\n"); @@ -904,6 +935,7 @@ dozonetransfer(ldns_resolver *res, ldns_rdf *domain, b ldns_pkt_set_answerfrom(nextpkt, ldns_rdf_clone(ldns_pkt_answerfrom(pkt))); ldns_pkt_free(pkt); + ldns_rr_list_free(rrl); pkt = nextpkt; } } From owner-svn-src-all@freebsd.org Wed Mar 7 11:09:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4E63F45E3F; Wed, 7 Mar 2018 11:09:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8269F6CE61; Wed, 7 Mar 2018 11:09:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 795A720894; Wed, 7 Mar 2018 11:09:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27B97bv043032; Wed, 7 Mar 2018 11:09:07 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27B97Is043031; Wed, 7 Mar 2018 11:09:07 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803071109.w27B97Is043031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 7 Mar 2018 11:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330578 - stable/11/sys/netinet/libalias X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/netinet/libalias X-SVN-Commit-Revision: 330578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 11:09:08 -0000 Author: eadler Date: Wed Mar 7 11:09:07 2018 New Revision: 330578 URL: https://svnweb.freebsd.org/changeset/base/330578 Log: MFC r327206: Fix CID 1008428. Modified: stable/11/sys/netinet/libalias/alias_sctp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/libalias/alias_sctp.c ============================================================================== --- stable/11/sys/netinet/libalias/alias_sctp.c Wed Mar 7 11:03:01 2018 (r330577) +++ stable/11/sys/netinet/libalias/alias_sctp.c Wed Mar 7 11:09:07 2018 (r330578) @@ -420,9 +420,9 @@ int sysctl_chg_loglevel(SYSCTL_HANDLER_ARGS) error = sysctl_handle_int(oidp, &level, 0, req); if (error) return (error); - sysctl_log_level = (level > SN_LOG_DEBUG_MAX)?(SN_LOG_DEBUG_MAX):(level); - sysctl_log_level = (level < SN_LOG_LOW)?(SN_LOG_LOW):(level); - + level = (level > SN_LOG_DEBUG_MAX)?(SN_LOG_DEBUG_MAX):(level); + level = (level < SN_LOG_LOW)?(SN_LOG_LOW):(level); + sysctl_log_level = level; return (0); } From owner-svn-src-all@freebsd.org Wed Mar 7 12:56:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5040DF27E62; Wed, 7 Mar 2018 12:56:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1A2871707; Wed, 7 Mar 2018 12:56:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E84A121A0F; Wed, 7 Mar 2018 12:56:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27Cu4l1097690; Wed, 7 Mar 2018 12:56:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27Cu4iq097687; Wed, 7 Mar 2018 12:56:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071256.w27Cu4iq097687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 12:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330579 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 12:56:05 -0000 Author: hselasky Date: Wed Mar 7 12:56:04 2018 New Revision: 330579 URL: https://svnweb.freebsd.org/changeset/base/330579 Log: Fix for use-after-free when using delayed work structures in ibcore. It is not enough to cancel delayed work structures before freeing. Always cancel delayed work synchronously before freeing! MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cm.c head/sys/ofed/drivers/infiniband/core/ib_mad.c head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Mar 7 11:09:07 2018 (r330578) +++ head/sys/ofed/drivers/infiniband/core/ib_cm.c Wed Mar 7 12:56:04 2018 (r330579) @@ -4132,6 +4132,7 @@ static void __exit ib_cm_cleanup(void) destroy_workqueue(cm.wq); list_for_each_entry_safe(timewait_info, tmp, &cm.timewait_list, list) { + cancel_delayed_work_sync(&timewait_info->work.work); list_del(&timewait_info->list); kfree(timewait_info); } Modified: head/sys/ofed/drivers/infiniband/core/ib_mad.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_mad.c Wed Mar 7 11:09:07 2018 (r330578) +++ head/sys/ofed/drivers/infiniband/core/ib_mad.c Wed Mar 7 12:56:04 2018 (r330579) @@ -572,7 +572,7 @@ static void unregister_mad_agent(struct ib_mad_agent_p */ cancel_mads(mad_agent_priv); port_priv = mad_agent_priv->qp_info->port_priv; - cancel_delayed_work(&mad_agent_priv->timed_work); + cancel_delayed_work_sync(&mad_agent_priv->timed_work); spin_lock_irqsave(&port_priv->reg_lock, flags); remove_mad_reg_req(mad_agent_priv); Modified: head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c Wed Mar 7 11:09:07 2018 (r330578) +++ head/sys/ofed/drivers/infiniband/core/ib_mad_rmpp.c Wed Mar 7 12:56:04 2018 (r330579) @@ -103,8 +103,8 @@ void ib_cancel_rmpp_recvs(struct ib_mad_agent_private spin_unlock_irqrestore(&agent->lock, flags); list_for_each_entry(rmpp_recv, &agent->rmpp_list, list) { - cancel_delayed_work(&rmpp_recv->timeout_work); - cancel_delayed_work(&rmpp_recv->cleanup_work); + cancel_delayed_work_sync(&rmpp_recv->timeout_work); + cancel_delayed_work_sync(&rmpp_recv->cleanup_work); } flush_workqueue(agent->qp_info->port_priv->wq); From owner-svn-src-all@freebsd.org Wed Mar 7 12:58:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3496EF2932E; Wed, 7 Mar 2018 12:58:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D2D7071984; Wed, 7 Mar 2018 12:58:51 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCB4F21A15; Wed, 7 Mar 2018 12:58:51 +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 w27CwpAE097816; Wed, 7 Mar 2018 12:58:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27Cwpp3097815; Wed, 7 Mar 2018 12:58:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071258.w27Cwpp3097815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 12:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330580 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 12:58:52 -0000 Author: hselasky Date: Wed Mar 7 12:58:51 2018 New Revision: 330580 URL: https://svnweb.freebsd.org/changeset/base/330580 Log: Make sure the IPv6 scope ID gets properly masked in ibcore. When exchanging CM messages the IPv6 scope ID should be ignored for link local addresses when doing comparisons. Make sure the scope ID is always set to zero for link local addresses. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Mar 7 12:56:04 2018 (r330579) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Mar 7 12:58:51 2018 (r330580) @@ -1116,6 +1116,17 @@ static void cma_save_ip4_info(struct sockaddr_in *src_ } } +static void cma_ip6_clear_scope_id(struct in6_addr *addr) +{ + /* make sure link local scope ID gets zeroed */ + if (IN6_IS_SCOPE_LINKLOCAL(addr) || + IN6_IS_ADDR_MC_INTFACELOCAL(addr)) { + /* use byte-access to be alignment safe */ + addr->s6_addr[2] = 0; + addr->s6_addr[3] = 0; + } +} + static void cma_save_ip6_info(struct sockaddr_in6 *src_addr, struct sockaddr_in6 *dst_addr, struct cma_hdr *hdr, @@ -1128,6 +1139,7 @@ static void cma_save_ip6_info(struct sockaddr_in6 *src .sin6_addr = hdr->dst_addr.ip6, .sin6_port = local_port, }; + cma_ip6_clear_scope_id(&src_addr->sin6_addr); } if (dst_addr) { @@ -1137,6 +1149,7 @@ static void cma_save_ip6_info(struct sockaddr_in6 *src .sin6_addr = hdr->src_addr.ip6, .sin6_port = hdr->port, }; + cma_ip6_clear_scope_id(&dst_addr->sin6_addr); } } @@ -1395,6 +1408,7 @@ static bool cma_match_private_data(struct rdma_id_priv ip6_addr = ((struct sockaddr_in6 *)addr)->sin6_addr; if (cma_get_ip_ver(hdr) != 6) return false; + cma_ip6_clear_scope_id(&ip6_addr); if (!cma_any_addr(addr) && memcmp(&hdr->dst_addr.ip6, &ip6_addr, sizeof(ip6_addr))) return false; @@ -3242,6 +3256,8 @@ static int cma_format_hdr(void *hdr, struct rdma_id_pr cma_hdr->src_addr.ip6 = src6->sin6_addr; cma_hdr->dst_addr.ip6 = dst6->sin6_addr; cma_hdr->port = src6->sin6_port; + cma_ip6_clear_scope_id(&cma_hdr->src_addr.ip6); + cma_ip6_clear_scope_id(&cma_hdr->dst_addr.ip6); } return 0; } From owner-svn-src-all@freebsd.org Wed Mar 7 13:01:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF644F2964E; Wed, 7 Mar 2018 13:01:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D5CD71CE8; Wed, 7 Mar 2018 13:01:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7834921A41; Wed, 7 Mar 2018 13:01:00 +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 w27D10L5099466; Wed, 7 Mar 2018 13:01:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27D10Ta099465; Wed, 7 Mar 2018 13:01:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071301.w27D10Ta099465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 13:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330581 - head/sys/ofed/include/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/include/rdma X-SVN-Commit-Revision: 330581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:01:01 -0000 Author: hselasky Date: Wed Mar 7 13:01:00 2018 New Revision: 330581 URL: https://svnweb.freebsd.org/changeset/base/330581 Log: Add IB_SPEED_HDR definition in ibcore. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/rdma/ib_verbs.h Modified: head/sys/ofed/include/rdma/ib_verbs.h ============================================================================== --- head/sys/ofed/include/rdma/ib_verbs.h Wed Mar 7 12:58:51 2018 (r330580) +++ head/sys/ofed/include/rdma/ib_verbs.h Wed Mar 7 13:01:00 2018 (r330581) @@ -420,7 +420,8 @@ enum ib_port_speed { IB_SPEED_QDR = 4, IB_SPEED_FDR10 = 8, IB_SPEED_FDR = 16, - IB_SPEED_EDR = 32 + IB_SPEED_EDR = 32, + IB_SPEED_HDR = 64 }; /** From owner-svn-src-all@freebsd.org Wed Mar 7 13:16:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE384F2AC7F; Wed, 7 Mar 2018 13:16:04 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CE3972797; Wed, 7 Mar 2018 13:16:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9749821D48; Wed, 7 Mar 2018 13:16:04 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27DG4IF007500; Wed, 7 Mar 2018 13:16:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DG4YU007495; Wed, 7 Mar 2018 13:16:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201803071316.w27DG4YU007495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 7 Mar 2018 13:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330582 - in head/sys: arm64/arm64 arm64/include dev/pci X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm64/arm64 arm64/include dev/pci X-SVN-Commit-Revision: 330582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:16:05 -0000 Author: andrew Date: Wed Mar 7 13:16:03 2018 New Revision: 330582 URL: https://svnweb.freebsd.org/changeset/base/330582 Log: Create macros for the ACPI interrupt cross references. This is considered a band aid until a better solution to find the correct interrupt controller can be found. While here fix one place in the GICv3 ITS driver where the offset wasn't correctly applied. Sponsored by: DARPA, AFRL Sponsored by: Cavium (Hardware) Modified: head/sys/arm64/arm64/gic_v3_acpi.c head/sys/arm64/arm64/gicv3_its.c head/sys/arm64/arm64/nexus.c head/sys/arm64/include/intr.h head/sys/dev/pci/pci_host_generic_acpi.c Modified: head/sys/arm64/arm64/gic_v3_acpi.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_acpi.c Wed Mar 7 13:01:00 2018 (r330581) +++ head/sys/arm64/arm64/gic_v3_acpi.c Wed Mar 7 13:16:03 2018 (r330582) @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#include "opt_acpi.h" + #include __FBSDID("$FreeBSD$"); @@ -260,14 +262,14 @@ gic_v3_acpi_attach(device_t dev) if (err != 0) goto error; - sc->gic_pic = intr_pic_register(dev, 0); + sc->gic_pic = intr_pic_register(dev, ACPI_INTR_XREF); if (sc->gic_pic == NULL) { device_printf(dev, "could not register PIC\n"); err = ENXIO; goto error; } - if (intr_pic_claim_root(dev, 0, arm_gic_v3_intr, sc, + if (intr_pic_claim_root(dev, ACPI_INTR_XREF, arm_gic_v3_intr, sc, GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { err = ENXIO; goto error; Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Wed Mar 7 13:01:00 2018 (r330581) +++ head/sys/arm64/arm64/gicv3_its.c Wed Mar 7 13:16:03 2018 (r330582) @@ -1734,12 +1734,13 @@ gicv3_its_acpi_attach(device_t dev) if (err != 0) return (err); - sc->sc_pic = intr_pic_register(dev, device_get_unit(dev) + 1); + sc->sc_pic = intr_pic_register(dev, + device_get_unit(dev) + ACPI_MSI_XREF); intr_pic_add_handler(device_get_parent(dev), sc->sc_pic, gicv3_its_intr, sc, GIC_FIRST_LPI, LPI_NIRQS); /* Register this device to handle MSI interrupts */ - intr_msi_register(dev, 1); + intr_msi_register(dev, device_get_unit(dev) + ACPI_MSI_XREF); return (0); } Modified: head/sys/arm64/arm64/nexus.c ============================================================================== --- head/sys/arm64/arm64/nexus.c Wed Mar 7 13:01:00 2018 (r330581) +++ head/sys/arm64/arm64/nexus.c Wed Mar 7 13:16:03 2018 (r330582) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "acpi_bus_if.h" +#include "pcib_if.h" #endif extern struct bus_space memmap_bus; @@ -524,7 +525,8 @@ nexus_acpi_map_intr(device_t dev, device_t child, u_in * controllers for the largest base value that is no larger than * the IRQ value. */ - irq = intr_map_irq(NULL, 0, (struct intr_map_data *)acpi_data); + irq = intr_map_irq(NULL, ACPI_INTR_XREF, + (struct intr_map_data *)acpi_data); return (irq); } #endif Modified: head/sys/arm64/include/intr.h ============================================================================== --- head/sys/arm64/include/intr.h Wed Mar 7 13:01:00 2018 (r330581) +++ head/sys/arm64/include/intr.h Wed Mar 7 13:16:03 2018 (r330582) @@ -48,4 +48,9 @@ arm_irq_memory_barrier(uintptr_t irq) void intr_ipi_dispatch(u_int, struct trapframe *); #endif +#ifdef DEV_ACPI +#define ACPI_INTR_XREF 1 +#define ACPI_MSI_XREF 2 +#endif + #endif /* _MACHINE_INTR_H */ Modified: head/sys/dev/pci/pci_host_generic_acpi.c ============================================================================== --- head/sys/dev/pci/pci_host_generic_acpi.c Wed Mar 7 13:01:00 2018 (r330581) +++ head/sys/dev/pci/pci_host_generic_acpi.c Wed Mar 7 13:16:03 2018 (r330582) @@ -228,7 +228,8 @@ generic_pcie_acpi_alloc_msi(device_t pci, device_t chi { #if defined(INTRNG) - return (intr_alloc_msi(pci, child, 1, count, maxcount, irqs)); + return (intr_alloc_msi(pci, child, ACPI_MSI_XREF, count, maxcount, + irqs)); #else return (ENXIO); #endif @@ -240,7 +241,7 @@ generic_pcie_acpi_release_msi(device_t pci, device_t c { #if defined(INTRNG) - return (intr_release_msi(pci, child, 1, count, irqs)); + return (intr_release_msi(pci, child, ACPI_MSI_XREF, count, irqs)); #else return (ENXIO); #endif @@ -252,7 +253,7 @@ generic_pcie_acpi_map_msi(device_t pci, device_t child { #if defined(INTRNG) - return (intr_map_msi(pci, child, 1, irq, addr, data)); + return (intr_map_msi(pci, child, ACPI_MSI_XREF, irq, addr, data)); #else return (ENXIO); #endif @@ -263,7 +264,7 @@ generic_pcie_acpi_alloc_msix(device_t pci, device_t ch { #if defined(INTRNG) - return (intr_alloc_msix(pci, child, 1, irq)); + return (intr_alloc_msix(pci, child, ACPI_MSI_XREF, irq)); #else return (ENXIO); #endif @@ -274,7 +275,7 @@ generic_pcie_acpi_release_msix(device_t pci, device_t { #if defined(INTRNG) - return (intr_release_msix(pci, child, 1, irq)); + return (intr_release_msix(pci, child, ACPI_MSI_XREF, irq)); #else return (ENXIO); #endif From owner-svn-src-all@freebsd.org Wed Mar 7 13:25:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72013F2B850; Wed, 7 Mar 2018 13:25:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27E5B72DFA; Wed, 7 Mar 2018 13:25:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 228DC21ED8; Wed, 7 Mar 2018 13:25:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27DPfWG012668; Wed, 7 Mar 2018 13:25:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DPfR8012667; Wed, 7 Mar 2018 13:25:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071325.w27DPfR8012667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 13:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330583 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:25:41 -0000 Author: hselasky Date: Wed Mar 7 13:25:40 2018 New Revision: 330583 URL: https://svnweb.freebsd.org/changeset/base/330583 Log: Embed the IPv6 scope ID before calling rtalloc1() in ibcore. Else rtalloc1() will resolve to the loopback interface. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Mar 7 13:16:03 2018 (r330582) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Mar 7 13:25:40 2018 (r330583) @@ -424,6 +424,13 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, */ dst_tmp.sin6_len = sizeof(dst_tmp); + /* + * Make sure the scope ID gets embedded, else rtalloc1() will + * resolve to the loopback interface. + */ + dst_tmp.sin6_scope_id = addr->bound_dev_if; + sa6_embedscope(&dst_tmp, 0); + /* Step 1 - lookup destination route if any */ switch (type) { case 0: From owner-svn-src-all@freebsd.org Wed Mar 7 13:28:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A665F2BB1F; Wed, 7 Mar 2018 13:28:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC81E72FFB; Wed, 7 Mar 2018 13:28:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D74E721EDB; Wed, 7 Mar 2018 13:28:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27DSCpx012789; Wed, 7 Mar 2018 13:28:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DSC0P012788; Wed, 7 Mar 2018 13:28:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071328.w27DSC0P012788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 13:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330584 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:28:13 -0000 Author: hselasky Date: Wed Mar 7 13:28:12 2018 New Revision: 330584 URL: https://svnweb.freebsd.org/changeset/base/330584 Log: Recover IPv6 scope ID for multicast link-local addresses as well as unicast link-local addresses. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Mar 7 13:25:40 2018 (r330583) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Mar 7 13:28:12 2018 (r330584) @@ -2785,7 +2785,8 @@ static int cma_bind_addr(struct rdma_cm_id *id, struct struct sockaddr_in6 *src_addr6 = (struct sockaddr_in6 *) src_addr; struct sockaddr_in6 *dst_addr6 = (struct sockaddr_in6 *) dst_addr; src_addr6->sin6_scope_id = dst_addr6->sin6_scope_id; - if (IN6_IS_SCOPE_LINKLOCAL(&dst_addr6->sin6_addr)) + if (IN6_IS_SCOPE_LINKLOCAL(&dst_addr6->sin6_addr) || + IN6_IS_ADDR_MC_INTFACELOCAL(&dst_addr6->sin6_addr)) id->route.addr.dev_addr.bound_dev_if = dst_addr6->sin6_scope_id; } else if (dst_addr->sa_family == AF_IB) { ((struct sockaddr_ib *) src_addr)->sib_pkey = @@ -3119,13 +3120,13 @@ static int cma_check_linklocal(struct rdma_dev_addr *d sin6 = *(struct sockaddr_in6 *)addr; - if (!(IN6_IS_SCOPE_LINKLOCAL(&sin6.sin6_addr))) - return 0; - - if (sa6_recoverscope(&sin6) || sin6.sin6_scope_id == 0) - return -EINVAL; - - dev_addr->bound_dev_if = sin6.sin6_scope_id; + if (IN6_IS_SCOPE_LINKLOCAL(&sin6.sin6_addr) || + IN6_IS_ADDR_MC_INTFACELOCAL(&sin6.sin6_addr)) { + /* check if IPv6 scope ID is set */ + if (sa6_recoverscope(&sin6) || sin6.sin6_scope_id == 0) + return -EINVAL; + dev_addr->bound_dev_if = sin6.sin6_scope_id; + } #endif return 0; } From owner-svn-src-all@freebsd.org Wed Mar 7 13:30:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88FBEF2BE86; Wed, 7 Mar 2018 13:30:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E57A73222; Wed, 7 Mar 2018 13:30:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3938321FD8; Wed, 7 Mar 2018 13:30:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27DUdHF012936; Wed, 7 Mar 2018 13:30:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DUdPY012935; Wed, 7 Mar 2018 13:30:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071330.w27DUdPY012935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 13:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330585 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:30:39 -0000 Author: hselasky Date: Wed Mar 7 13:30:38 2018 New Revision: 330585 URL: https://svnweb.freebsd.org/changeset/base/330585 Log: Define values instead of using hardcoding. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Mar 7 13:28:12 2018 (r330584) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Wed Mar 7 13:30:38 2018 (r330585) @@ -248,6 +248,11 @@ static int addr4_resolve(struct sockaddr_in *src_in, u8 *edst, struct ifnet **ifpp) { + enum { + ADDR_VALID = 0, + ADDR_SRC_ANY = 1, + ADDR_DST_ANY = 2, + }; struct sockaddr_in dst_tmp = *dst_in; in_port_t src_port; struct sockaddr *saddr; @@ -262,11 +267,11 @@ static int addr4_resolve(struct sockaddr_in *src_in, /* set default TTL limit */ addr->hoplimit = V_ip_defttl; - type = 0; + type = ADDR_VALID; if (src_in->sin_addr.s_addr == INADDR_ANY) - type |= 1; + type |= ADDR_SRC_ANY; if (dst_tmp.sin_addr.s_addr == INADDR_ANY) - type |= 2; + type |= ADDR_DST_ANY; /* * Make sure the socket address length field @@ -276,8 +281,8 @@ static int addr4_resolve(struct sockaddr_in *src_in, /* Step 1 - lookup destination route if any */ switch (type) { - case 0: - case 1: + case ADDR_VALID: + case ADDR_SRC_ANY: /* regular destination route lookup */ rte = rtalloc1((struct sockaddr *)&dst_tmp, 1, 0); if (rte == NULL) { @@ -297,7 +302,7 @@ static int addr4_resolve(struct sockaddr_in *src_in, /* Step 2 - find outgoing network interface */ switch (type) { - case 0: + case ADDR_VALID: /* check for loopback device */ if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { ifp = rte->rt_ifp; @@ -316,7 +321,7 @@ static int addr4_resolve(struct sockaddr_in *src_in, goto error_put_ifp; } break; - case 1: + case ADDR_SRC_ANY: /* check for loopback device */ if (rte->rt_ifp->if_flags & IFF_LOOPBACK) saddr = (struct sockaddr *)&dst_tmp; @@ -398,6 +403,11 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, u8 *edst, struct ifnet **ifpp) { + enum { + ADDR_VALID = 0, + ADDR_SRC_ANY = 1, + ADDR_DST_ANY = 2, + }; struct sockaddr_in6 dst_tmp = *dst_in; in_port_t src_port; struct sockaddr *saddr; @@ -412,11 +422,11 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, /* set default TTL limit */ addr->hoplimit = V_ip_defttl; - type = 0; + type = ADDR_VALID; if (ipv6_addr_any(&src_in->sin6_addr)) - type |= 1; + type |= ADDR_SRC_ANY; if (ipv6_addr_any(&dst_tmp.sin6_addr)) - type |= 2; + type |= ADDR_DST_ANY; /* * Make sure the socket address length field @@ -433,7 +443,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, /* Step 1 - lookup destination route if any */ switch (type) { - case 0: + case ADDR_VALID: /* sanity check for IPv4 addresses */ if (ipv6_addr_v4mapped(&src_in->sin6_addr) != ipv6_addr_v4mapped(&dst_tmp.sin6_addr)) { @@ -441,7 +451,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, goto done; } /* FALLTHROUGH */ - case 1: + case ADDR_SRC_ANY: /* regular destination route lookup */ rte = rtalloc1((struct sockaddr *)&dst_tmp, 1, 0); if (rte == NULL) { @@ -461,7 +471,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, /* Step 2 - find outgoing network interface */ switch (type) { - case 0: + case ADDR_VALID: /* check for loopback device */ if (rte->rt_ifp->if_flags & IFF_LOOPBACK) { ifp = rte->rt_ifp; @@ -480,7 +490,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, goto error_put_ifp; } break; - case 1: + case ADDR_SRC_ANY: /* check for loopback device */ if (rte->rt_ifp->if_flags & IFF_LOOPBACK) saddr = (struct sockaddr *)&dst_tmp; From owner-svn-src-all@freebsd.org Wed Mar 7 13:32:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD63EF2C463; Wed, 7 Mar 2018 13:32:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 929E173717; Wed, 7 Mar 2018 13:32:52 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D9B922068; Wed, 7 Mar 2018 13:32:52 +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 w27DWqTv017581; Wed, 7 Mar 2018 13:32:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DWqjR017580; Wed, 7 Mar 2018 13:32:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071332.w27DWqjR017580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 13:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330586 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 330586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:32:53 -0000 Author: hselasky Date: Wed Mar 7 13:32:52 2018 New Revision: 330586 URL: https://svnweb.freebsd.org/changeset/base/330586 Log: Make sure VNET is set when calling sa6_recoverscope() in ibcore. Else panic will occur when VIMAGE is enabled. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Mar 7 13:30:38 2018 (r330585) +++ head/sys/ofed/drivers/infiniband/core/ib_cma.c Wed Mar 7 13:32:52 2018 (r330586) @@ -3122,8 +3122,14 @@ static int cma_check_linklocal(struct rdma_dev_addr *d if (IN6_IS_SCOPE_LINKLOCAL(&sin6.sin6_addr) || IN6_IS_ADDR_MC_INTFACELOCAL(&sin6.sin6_addr)) { - /* check if IPv6 scope ID is set */ - if (sa6_recoverscope(&sin6) || sin6.sin6_scope_id == 0) + bool failure; + + CURVNET_SET_QUIET(dev_addr->net); + failure = sa6_recoverscope(&sin6) || sin6.sin6_scope_id == 0; + CURVNET_RESTORE(); + + /* check if IPv6 scope ID is not set */ + if (failure) return -EINVAL; dev_addr->bound_dev_if = sin6.sin6_scope_id; } From owner-svn-src-all@freebsd.org Wed Mar 7 13:37:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ECEAF2CC1C; Wed, 7 Mar 2018 13:37:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB2EE73AAC; Wed, 7 Mar 2018 13:37:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5FED2206F; Wed, 7 Mar 2018 13:37:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27DbPFT017822; Wed, 7 Mar 2018 13:37:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DbPHn017821; Wed, 7 Mar 2018 13:37:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803071337.w27DbPHn017821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 7 Mar 2018 13:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330587 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 330587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:37:26 -0000 Author: avg Date: Wed Mar 7 13:37:25 2018 New Revision: 330587 URL: https://svnweb.freebsd.org/changeset/base/330587 Log: MFC r330338: db_nextframe/amd64: catch up with r328083 to recognize fast_syscall_common Modified: stable/11/sys/amd64/amd64/db_trace.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/db_trace.c ============================================================================== --- stable/11/sys/amd64/amd64/db_trace.c Wed Mar 7 13:32:52 2018 (r330586) +++ stable/11/sys/amd64/amd64/db_trace.c Wed Mar 7 13:37:25 2018 (r330587) @@ -212,7 +212,9 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s strcmp(name, "Xcpususpend") == 0 || strcmp(name, "Xrendezvous") == 0) frame_type = INTERRUPT; - else if (strcmp(name, "Xfast_syscall") == 0) + else if (strcmp(name, "Xfast_syscall") == 0 || + strcmp(name, "Xfast_syscall_pti") == 0 || + strcmp(name, "fast_syscall_common") == 0) frame_type = SYSCALL; #ifdef COMPAT_FREEBSD32 else if (strcmp(name, "Xint0x80_syscall") == 0) From owner-svn-src-all@freebsd.org Wed Mar 7 13:39:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE301F2CED1; Wed, 7 Mar 2018 13:39:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6082073C45; Wed, 7 Mar 2018 13:39:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D5BD22070; Wed, 7 Mar 2018 13:39:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27DdBVW017947; Wed, 7 Mar 2018 13:39:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DdBfP017946; Wed, 7 Mar 2018 13:39:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803071339.w27DdBfP017946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 7 Mar 2018 13:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330588 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:39:12 -0000 Author: avg Date: Wed Mar 7 13:39:10 2018 New Revision: 330588 URL: https://svnweb.freebsd.org/changeset/base/330588 Log: MFC r329714: MFV r329713: 8731 ASSERT3U(nui64s, <=, UINT16_MAX) fails for large blocks Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c Wed Mar 7 13:37:25 2018 (r330587) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c Wed Mar 7 13:39:10 2018 (r330588) @@ -360,8 +360,8 @@ zfs_ereport_start(nvlist_t **ereport_out, nvlist_t **d typedef struct zfs_ecksum_info { /* histograms of set and cleared bits by bit number in a 64-bit word */ - uint16_t zei_histogram_set[sizeof (uint64_t) * NBBY]; - uint16_t zei_histogram_cleared[sizeof (uint64_t) * NBBY]; + uint32_t zei_histogram_set[sizeof (uint64_t) * NBBY]; + uint32_t zei_histogram_cleared[sizeof (uint64_t) * NBBY]; /* inline arrays of bits set and cleared. */ uint64_t zei_bits_set[ZFM_MAX_INLINE]; @@ -386,7 +386,7 @@ typedef struct zfs_ecksum_info { } zfs_ecksum_info_t; static void -update_histogram(uint64_t value_arg, uint16_t *hist, uint32_t *count) +update_histogram(uint64_t value_arg, uint32_t *hist, uint32_t *count) { size_t i; size_t bits = 0; @@ -552,7 +552,7 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *in if (badbuf == NULL || goodbuf == NULL) return (eip); - ASSERT3U(nui64s, <=, UINT16_MAX); + ASSERT3U(nui64s, <=, UINT32_MAX); ASSERT3U(size, ==, nui64s * sizeof (uint64_t)); ASSERT3U(size, <=, SPA_MAXBLOCKSIZE); ASSERT3U(size, <=, UINT32_MAX); @@ -654,10 +654,10 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *in } else { fm_payload_set(ereport, FM_EREPORT_PAYLOAD_ZFS_BAD_SET_HISTOGRAM, - DATA_TYPE_UINT16_ARRAY, + DATA_TYPE_UINT32_ARRAY, NBBY * sizeof (uint64_t), eip->zei_histogram_set, FM_EREPORT_PAYLOAD_ZFS_BAD_CLEARED_HISTOGRAM, - DATA_TYPE_UINT16_ARRAY, + DATA_TYPE_UINT32_ARRAY, NBBY * sizeof (uint64_t), eip->zei_histogram_cleared, NULL); } From owner-svn-src-all@freebsd.org Wed Mar 7 13:40:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B5A2F2D059; Wed, 7 Mar 2018 13:40:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F01C973DC2; Wed, 7 Mar 2018 13:40:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E995122076; Wed, 7 Mar 2018 13:40:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27DeFjA018079; Wed, 7 Mar 2018 13:40:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DeFZ8018078; Wed, 7 Mar 2018 13:40:15 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803071340.w27DeFZ8018078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 7 Mar 2018 13:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330589 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:40:16 -0000 Author: avg Date: Wed Mar 7 13:40:15 2018 New Revision: 330589 URL: https://svnweb.freebsd.org/changeset/base/330589 Log: MFC r329714: MFV r329713: 8731 ASSERT3U(nui64s, <=, UINT16_MAX) fails for large blocks Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c Wed Mar 7 13:39:10 2018 (r330588) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c Wed Mar 7 13:40:15 2018 (r330589) @@ -360,8 +360,8 @@ zfs_ereport_start(nvlist_t **ereport_out, nvlist_t **d typedef struct zfs_ecksum_info { /* histograms of set and cleared bits by bit number in a 64-bit word */ - uint16_t zei_histogram_set[sizeof (uint64_t) * NBBY]; - uint16_t zei_histogram_cleared[sizeof (uint64_t) * NBBY]; + uint32_t zei_histogram_set[sizeof (uint64_t) * NBBY]; + uint32_t zei_histogram_cleared[sizeof (uint64_t) * NBBY]; /* inline arrays of bits set and cleared. */ uint64_t zei_bits_set[ZFM_MAX_INLINE]; @@ -386,7 +386,7 @@ typedef struct zfs_ecksum_info { } zfs_ecksum_info_t; static void -update_histogram(uint64_t value_arg, uint16_t *hist, uint32_t *count) +update_histogram(uint64_t value_arg, uint32_t *hist, uint32_t *count) { size_t i; size_t bits = 0; @@ -552,7 +552,7 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *in if (badbuf == NULL || goodbuf == NULL) return (eip); - ASSERT3U(nui64s, <=, UINT16_MAX); + ASSERT3U(nui64s, <=, UINT32_MAX); ASSERT3U(size, ==, nui64s * sizeof (uint64_t)); ASSERT3U(size, <=, SPA_MAXBLOCKSIZE); ASSERT3U(size, <=, UINT32_MAX); @@ -654,10 +654,10 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *in } else { fm_payload_set(ereport, FM_EREPORT_PAYLOAD_ZFS_BAD_SET_HISTOGRAM, - DATA_TYPE_UINT16_ARRAY, + DATA_TYPE_UINT32_ARRAY, NBBY * sizeof (uint64_t), eip->zei_histogram_set, FM_EREPORT_PAYLOAD_ZFS_BAD_CLEARED_HISTOGRAM, - DATA_TYPE_UINT16_ARRAY, + DATA_TYPE_UINT32_ARRAY, NBBY * sizeof (uint64_t), eip->zei_histogram_cleared, NULL); } From owner-svn-src-all@freebsd.org Wed Mar 7 13:45:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E522EF2D70B; Wed, 7 Mar 2018 13:45:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8EC3A74287; Wed, 7 Mar 2018 13:45:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F0CA22210; Wed, 7 Mar 2018 13:45:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27DjUKJ022688; Wed, 7 Mar 2018 13:45:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DjUh7022685; Wed, 7 Mar 2018 13:45:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803071345.w27DjUh7022685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 7 Mar 2018 13:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330590 - in stable/11: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:45:31 -0000 Author: avg Date: Wed Mar 7 13:45:29 2018 New Revision: 330590 URL: https://svnweb.freebsd.org/changeset/base/330590 Log: MFC r329719: MFV r329718: 8520 7198 lzc_rollback_to should support rolling back to origin Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Mar 7 13:40:15 2018 (r330589) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Mar 7 13:45:29 2018 (r330590) @@ -4051,17 +4051,31 @@ zfs_rollback(zfs_handle_t *zhp, zfs_handle_t *snap, bo * a new snapshot is created before this request is processed. */ err = lzc_rollback_to(zhp->zfs_name, snap->zfs_name); - if (err == EXDEV) { - zfs_error_aux(zhp->zfs_hdl, dgettext(TEXT_DOMAIN, - "'%s' is not the latest snapshot"), snap->zfs_name); - (void) zfs_error_fmt(zhp->zfs_hdl, EZFS_BUSY, + if (err != 0) { + char errbuf[1024]; + + (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot rollback '%s'"), zhp->zfs_name); - return (err); - } else if (err != 0) { - (void) zfs_standard_error_fmt(zhp->zfs_hdl, errno, - dgettext(TEXT_DOMAIN, "cannot rollback '%s'"), - zhp->zfs_name); + switch (err) { + case EEXIST: + zfs_error_aux(zhp->zfs_hdl, dgettext(TEXT_DOMAIN, + "there is a snapshot or bookmark more recent " + "than '%s'"), snap->zfs_name); + (void) zfs_error(zhp->zfs_hdl, EZFS_EXISTS, errbuf); + break; + case ESRCH: + zfs_error_aux(zhp->zfs_hdl, dgettext(TEXT_DOMAIN, + "'%s' is not found among snapshots of '%s'"), + snap->zfs_name, zhp->zfs_name); + (void) zfs_error(zhp->zfs_hdl, EZFS_NOENT, errbuf); + break; + case EINVAL: + (void) zfs_error(zhp->zfs_hdl, EZFS_BADTYPE, errbuf); + break; + default: + (void) zfs_standard_error(zhp->zfs_hdl, err, errbuf); + } return (err); } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Mar 7 13:40:15 2018 (r330589) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Mar 7 13:45:29 2018 (r330590) @@ -2553,7 +2553,7 @@ dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) /* must have a most recent snapshot */ if (dsl_dataset_phys(ds)->ds_prev_snap_txg < TXG_INITIAL) { dsl_dataset_rele(ds, FTAG); - return (SET_ERROR(EINVAL)); + return (SET_ERROR(ESRCH)); } /* @@ -2573,11 +2573,46 @@ dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) * the latest snapshot is it. */ if (ddra->ddra_tosnap != NULL) { - char namebuf[ZFS_MAX_DATASET_NAME_LEN]; + dsl_dataset_t *snapds; - dsl_dataset_name(ds->ds_prev, namebuf); - if (strcmp(namebuf, ddra->ddra_tosnap) != 0) - return (SET_ERROR(EXDEV)); + /* Check if the target snapshot exists at all. */ + error = dsl_dataset_hold(dp, ddra->ddra_tosnap, FTAG, &snapds); + if (error != 0) { + /* + * ESRCH is used to signal that the target snapshot does + * not exist, while ENOENT is used to report that + * the rolled back dataset does not exist. + * ESRCH is also used to cover other cases where the + * target snapshot is not related to the dataset being + * rolled back such as being in a different pool. + */ + if (error == ENOENT || error == EXDEV) + error = SET_ERROR(ESRCH); + dsl_dataset_rele(ds, FTAG); + return (error); + } + ASSERT(snapds->ds_is_snapshot); + + /* Check if the snapshot is the latest snapshot indeed. */ + if (snapds != ds->ds_prev) { + /* + * Distinguish between the case where the only problem + * is intervening snapshots (EEXIST) vs the snapshot + * not being a valid target for rollback (ESRCH). + */ + if (snapds->ds_dir == ds->ds_dir || + (dsl_dir_is_clone(ds->ds_dir) && + dsl_dir_phys(ds->ds_dir)->dd_origin_obj == + snapds->ds_object)) { + error = SET_ERROR(EEXIST); + } else { + error = SET_ERROR(ESRCH); + } + dsl_dataset_rele(snapds, FTAG); + dsl_dataset_rele(ds, FTAG); + return (error); + } + dsl_dataset_rele(snapds, FTAG); } /* must not have any bookmarks after the most recent snapshot */ @@ -2586,8 +2621,10 @@ dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) nvlist_t *bookmarks = fnvlist_alloc(); error = dsl_get_bookmarks_impl(ds, proprequest, bookmarks); fnvlist_free(proprequest); - if (error != 0) + if (error != 0) { + dsl_dataset_rele(ds, FTAG); return (error); + } for (nvpair_t *pair = nvlist_next_nvpair(bookmarks, NULL); pair != NULL; pair = nvlist_next_nvpair(bookmarks, pair)) { nvlist_t *valuenv = Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 7 13:40:15 2018 (r330589) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 7 13:45:29 2018 (r330590) @@ -3851,11 +3851,14 @@ zfs_ioc_rollback(const char *fsname, nvlist_t *innvl, (void) nvlist_lookup_string(innvl, "target", &target); if (target != NULL) { - int fslen = strlen(fsname); + const char *cp = strchr(target, '@'); - if (strncmp(fsname, target, fslen) != 0) - return (SET_ERROR(EINVAL)); - if (target[fslen] != '@') + /* + * The snap name must contain an @, and the part after it must + * contain only valid characters. + */ + if (cp == NULL || + zfs_component_namecheck(cp + 1, NULL, NULL) != 0) return (SET_ERROR(EINVAL)); } From owner-svn-src-all@freebsd.org Wed Mar 7 13:47:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C67FF2D8B8; Wed, 7 Mar 2018 13:47:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B5E8743FE; Wed, 7 Mar 2018 13:47:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 115D922212; Wed, 7 Mar 2018 13:47:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27Dl1Ua022790; Wed, 7 Mar 2018 13:47:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27Dl17t022789; Wed, 7 Mar 2018 13:47:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803071347.w27Dl17t022789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 7 Mar 2018 13:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330591 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Commit-Revision: 330591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:47:02 -0000 Author: avg Date: Wed Mar 7 13:47:01 2018 New Revision: 330591 URL: https://svnweb.freebsd.org/changeset/base/330591 Log: 8984 fix for 6764 breaks ACL inheritance illumos/illumos-gate@e9bacc6d1a71ea3f7082038b2868de8c4dd98bdc https://github.com/illumos/illumos-gate/commit/e9bacc6d1a71ea3f7082038b2868de8c4dd98bdc https://www.illumos.org/issues/8984 Consider a directory configured as: drwx-ws---+ 2 henson cpp 3 Jan 23 12:35 dropbox/ user:henson:rwxpdDaARWcC--:f-i----:allow owner@:--------------:f-i----:allow group@:--------------:f-i----:allow everyone@:--------------:f-i----:allow owner@:rwxpdDaARWcC--:-di----:allow group:cpp:-wx-----------:-------:allow owner@:rwxpdDaARWcC--:-------:allow A new file created in this directory ends up looking like: rw-r--r-+ 1 astudent cpp 0 Jan 23 12:39 testfile user:henson:rw-pdDaARWcC--:------I:allow owner@:--------------:------I:allow group@:--------------:------I:allow everyone@:--------------:------I:allow owner@:rw-p--aARWcCos:-------:allow group@:r-----a-R-c--s:-------:allow everyone@:r-----a-R-c--s:-------:allow with extraneous group@ and everyone@ entries allowing read access that shouldn't exist. Per Albert Lee on the zfs mailing list: "aclinherit=passthrough/passthrough-x should still ignore the requested mode when an inheritable ACE for owner@ group@, or everyone@ is present in the parent directory. It appears there was an oversight in my fix for https://www.illumos.org/issues/6764 which made calling zfs_acl_chmod from zfs_acl_inherit unconditional. I think the parent ACL check for aclinherit=passthrough needs to be reintroduced in zfs_acl_inherit." We have a large number of faculty who use dropbox directories like the example to have students submit projects. All of these directories are now allowing Reviewed by: Sam Zaydel Reviewed by: Paul B. Henson Reviewed by: Prakash Surya Approved by: Matthew Ahrens Author: Dominik Hassler Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_acl.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_acl.c Wed Mar 7 13:45:29 2018 (r330590) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_acl.c Wed Mar 7 13:47:01 2018 (r330591) @@ -1494,7 +1494,7 @@ zfs_ace_can_use(vtype_t vtype, uint16_t acep_flags) */ static zfs_acl_t * zfs_acl_inherit(zfsvfs_t *zfsvfs, vtype_t vtype, zfs_acl_t *paclp, - uint64_t mode) + uint64_t mode, boolean_t *need_chmod) { void *pacep = NULL; void *acep; @@ -1508,7 +1508,10 @@ zfs_acl_inherit(zfsvfs_t *zfsvfs, vtype_t vtype, zfs_a size_t data1sz, data2sz; uint_t aclinherit; boolean_t isdir = (vtype == VDIR); + boolean_t isreg = (vtype == VREG); + *need_chmod = B_TRUE; + aclp = zfs_acl_alloc(paclp->z_version); aclinherit = zfsvfs->z_acl_inherit; if (aclinherit == ZFS_ACL_DISCARD || vtype == VLNK) @@ -1531,6 +1534,17 @@ zfs_acl_inherit(zfsvfs_t *zfsvfs, vtype_t vtype, zfs_a continue; /* + * If owner@, group@, or everyone@ inheritable + * then zfs_acl_chmod() isn't needed. + */ + if ((aclinherit == ZFS_ACL_PASSTHROUGH || + aclinherit == ZFS_ACL_PASSTHROUGH_X) && + ((iflags & (ACE_OWNER|ACE_EVERYONE)) || + ((iflags & OWNING_GROUP) == OWNING_GROUP)) && + (isreg || (isdir && (iflags & ACE_DIRECTORY_INHERIT_ACE)))) + *need_chmod = B_FALSE; + + /* * Strip inherited execute permission from file if * not in mode */ @@ -1617,6 +1631,7 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *va zfsvfs_t *zfsvfs = dzp->z_zfsvfs; zfs_acl_t *paclp; gid_t gid; + boolean_t need_chmod = B_TRUE; boolean_t trim = B_FALSE; boolean_t inherited = B_FALSE; @@ -1706,7 +1721,7 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *va VERIFY(0 == zfs_acl_node_read(dzp, B_TRUE, &paclp, B_FALSE)); acl_ids->z_aclp = zfs_acl_inherit(zfsvfs, - vap->va_type, paclp, acl_ids->z_mode); + vap->va_type, paclp, acl_ids->z_mode, &need_chmod); inherited = B_TRUE; } else { acl_ids->z_aclp = @@ -1716,15 +1731,18 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *va mutex_exit(&dzp->z_lock); mutex_exit(&dzp->z_acl_lock); - if (vap->va_type == VDIR) - acl_ids->z_aclp->z_hints |= ZFS_ACL_AUTO_INHERIT; + if (need_chmod) { + if (vap->va_type == VDIR) + acl_ids->z_aclp->z_hints |= + ZFS_ACL_AUTO_INHERIT; - if (zfsvfs->z_acl_mode == ZFS_ACL_GROUPMASK && - zfsvfs->z_acl_inherit != ZFS_ACL_PASSTHROUGH && - zfsvfs->z_acl_inherit != ZFS_ACL_PASSTHROUGH_X) - trim = B_TRUE; - zfs_acl_chmod(vap->va_type, acl_ids->z_mode, B_FALSE, trim, - acl_ids->z_aclp); + if (zfsvfs->z_acl_mode == ZFS_ACL_GROUPMASK && + zfsvfs->z_acl_inherit != ZFS_ACL_PASSTHROUGH && + zfsvfs->z_acl_inherit != ZFS_ACL_PASSTHROUGH_X) + trim = B_TRUE; + zfs_acl_chmod(vap->va_type, acl_ids->z_mode, B_FALSE, + trim, acl_ids->z_aclp); + } } if (inherited || vsecp) { From owner-svn-src-all@freebsd.org Wed Mar 7 13:49:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82ED9F2DCC6; Wed, 7 Mar 2018 13:49:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3422074604; Wed, 7 Mar 2018 13:49:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DE9922215; Wed, 7 Mar 2018 13:49:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27DnRg0022930; Wed, 7 Mar 2018 13:49:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DnRfY022929; Wed, 7 Mar 2018 13:49:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803071349.w27DnRfY022929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 7 Mar 2018 13:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330592 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:49:27 -0000 Author: avg Date: Wed Mar 7 13:49:26 2018 New Revision: 330592 URL: https://svnweb.freebsd.org/changeset/base/330592 Log: MFV r330591: 8984 fix for 6764 breaks ACL inheritance illumos/illumos-gate@e9bacc6d1a71ea3f7082038b2868de8c4dd98bdc https://github.com/illumos/illumos-gate/commit/e9bacc6d1a71ea3f7082038b2868de8c4dd98bdc https://www.illumos.org/issues/8984 Consider a directory configured as: drwx-ws---+ 2 henson cpp 3 Jan 23 12:35 dropbox/ user:henson:rwxpdDaARWcC--:f-i----:allow owner@:--------------:f-i----:allow group@:--------------:f-i----:allow everyone@:--------------:f-i----:allow owner@:rwxpdDaARWcC--:-di----:allow group:cpp:-wx-----------:-------:allow owner@:rwxpdDaARWcC--:-------:allow A new file created in this directory ends up looking like: rw-r--r-+ 1 astudent cpp 0 Jan 23 12:39 testfile user:henson:rw-pdDaARWcC--:------I:allow owner@:--------------:------I:allow group@:--------------:------I:allow everyone@:--------------:------I:allow owner@:rw-p--aARWcCos:-------:allow group@:r-----a-R-c--s:-------:allow everyone@:r-----a-R-c--s:-------:allow with extraneous group@ and everyone@ entries allowing read access that shouldn't exist. Per Albert Lee on the zfs mailing list: "aclinherit=passthrough/passthrough-x should still ignore the requested mode when an inheritable ACE for owner@ group@, or everyone@ is present in the parent directory. It appears there was an oversight in my fix for https://www.illumos.org/issues/6764 which made calling zfs_acl_chmod from zfs_acl_inherit unconditional. I think the parent ACL check for aclinherit=passthrough needs to be reintroduced in zfs_acl_inherit." We have a large number of faculty who use dropbox directories like the example to have students submit projects. All of these directories are now allowing Reviewed by: Sam Zaydel Reviewed by: Paul B. Henson Reviewed by: Prakash Surya Approved by: Matthew Ahrens Author: Dominik Hassler PR: 216886 MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Wed Mar 7 13:47:01 2018 (r330591) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Wed Mar 7 13:49:26 2018 (r330592) @@ -1476,7 +1476,7 @@ zfs_ace_can_use(vtype_t vtype, uint16_t acep_flags) */ static zfs_acl_t * zfs_acl_inherit(zfsvfs_t *zfsvfs, vtype_t vtype, zfs_acl_t *paclp, - uint64_t mode) + uint64_t mode, boolean_t *need_chmod) { void *pacep = NULL; void *acep; @@ -1490,7 +1490,10 @@ zfs_acl_inherit(zfsvfs_t *zfsvfs, vtype_t vtype, zfs_a size_t data1sz, data2sz; uint_t aclinherit; boolean_t isdir = (vtype == VDIR); + boolean_t isreg = (vtype == VREG); + *need_chmod = B_TRUE; + aclp = zfs_acl_alloc(paclp->z_version); aclinherit = zfsvfs->z_acl_inherit; if (aclinherit == ZFS_ACL_DISCARD || vtype == VLNK) @@ -1513,6 +1516,17 @@ zfs_acl_inherit(zfsvfs_t *zfsvfs, vtype_t vtype, zfs_a continue; /* + * If owner@, group@, or everyone@ inheritable + * then zfs_acl_chmod() isn't needed. + */ + if ((aclinherit == ZFS_ACL_PASSTHROUGH || + aclinherit == ZFS_ACL_PASSTHROUGH_X) && + ((iflags & (ACE_OWNER|ACE_EVERYONE)) || + ((iflags & OWNING_GROUP) == OWNING_GROUP)) && + (isreg || (isdir && (iflags & ACE_DIRECTORY_INHERIT_ACE)))) + *need_chmod = B_FALSE; + + /* * Strip inherited execute permission from file if * not in mode */ @@ -1599,6 +1613,7 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *va zfsvfs_t *zfsvfs = dzp->z_zfsvfs; zfs_acl_t *paclp; gid_t gid; + boolean_t need_chmod = B_TRUE; boolean_t trim = B_FALSE; boolean_t inherited = B_FALSE; @@ -1694,7 +1709,7 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *va !(dzp->z_pflags & ZFS_XATTR)) { VERIFY(0 == zfs_acl_node_read(dzp, &paclp, B_FALSE)); acl_ids->z_aclp = zfs_acl_inherit(zfsvfs, - vap->va_type, paclp, acl_ids->z_mode); + vap->va_type, paclp, acl_ids->z_mode, &need_chmod); inherited = B_TRUE; } else { acl_ids->z_aclp = @@ -1703,15 +1718,18 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *va } mutex_exit(&dzp->z_acl_lock); - if (vap->va_type == VDIR) - acl_ids->z_aclp->z_hints |= ZFS_ACL_AUTO_INHERIT; + if (need_chmod) { + if (vap->va_type == VDIR) + acl_ids->z_aclp->z_hints |= + ZFS_ACL_AUTO_INHERIT; - if (zfsvfs->z_acl_mode == ZFS_ACL_GROUPMASK && - zfsvfs->z_acl_inherit != ZFS_ACL_PASSTHROUGH && - zfsvfs->z_acl_inherit != ZFS_ACL_PASSTHROUGH_X) - trim = B_TRUE; - zfs_acl_chmod(vap->va_type, acl_ids->z_mode, B_FALSE, trim, - acl_ids->z_aclp); + if (zfsvfs->z_acl_mode == ZFS_ACL_GROUPMASK && + zfsvfs->z_acl_inherit != ZFS_ACL_PASSTHROUGH && + zfsvfs->z_acl_inherit != ZFS_ACL_PASSTHROUGH_X) + trim = B_TRUE; + zfs_acl_chmod(vap->va_type, acl_ids->z_mode, B_FALSE, + trim, acl_ids->z_aclp); + } } if (inherited || vsecp) { From owner-svn-src-all@freebsd.org Wed Mar 7 13:54:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9253F2E551; Wed, 7 Mar 2018 13:54:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95A7874BCB; Wed, 7 Mar 2018 13:54:44 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C9102239F; Wed, 7 Mar 2018 13:54:44 +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 w27Dsi1P027618; Wed, 7 Mar 2018 13:54:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27Dsi3o027617; Wed, 7 Mar 2018 13:54:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201803071354.w27Dsi3o027617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 7 Mar 2018 13:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330593 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 330593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:54:45 -0000 Author: andrew Date: Wed Mar 7 13:54:44 2018 New Revision: 330593 URL: https://svnweb.freebsd.org/changeset/base/330593 Log: Bump MAXCPUS on arm64. We are starting to see hardware with more than 96 cores so increase it to the same as amd64. Sponsored by: DARPA, AFRL Sponsored by: Cavium (Hardware) Modified: head/sys/arm64/include/param.h Modified: head/sys/arm64/include/param.h ============================================================================== --- head/sys/arm64/include/param.h Wed Mar 7 13:49:26 2018 (r330592) +++ head/sys/arm64/include/param.h Wed Mar 7 13:54:44 2018 (r330593) @@ -56,7 +56,7 @@ #if defined(SMP) || defined(KLD_MODULE) #ifndef MAXCPU -#define MAXCPU 96 +#define MAXCPU 256 #endif #else #define MAXCPU 1 From owner-svn-src-all@freebsd.org Wed Mar 7 13:57:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4244EF2E8BA; Wed, 7 Mar 2018 13:57:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E53D474DFF; Wed, 7 Mar 2018 13:57:32 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5F58223A2; Wed, 7 Mar 2018 13:57:32 +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 w27DvWVx027780; Wed, 7 Mar 2018 13:57:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DvWAq027779; Wed, 7 Mar 2018 13:57:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071357.w27DvWAq027779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 13:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330594 - head/sys/dev/mlx4/mlx4_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx4/mlx4_ib X-SVN-Commit-Revision: 330594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:57:33 -0000 Author: hselasky Date: Wed Mar 7 13:57:32 2018 New Revision: 330594 URL: https://svnweb.freebsd.org/changeset/base/330594 Log: Disable unsupported disassociate ucontext functionality in mlx4ib(4). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Mar 7 13:54:44 2018 (r330593) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Mar 7 13:57:32 2018 (r330594) @@ -1135,68 +1135,6 @@ static const struct vm_operations_struct mlx4_ib_vm_op .close = mlx4_ib_vma_close }; -static void mlx4_ib_disassociate_ucontext(struct ib_ucontext *ibcontext) -{ - int i; - int ret = 0; - struct vm_area_struct *vma; - struct mlx4_ib_ucontext *context = to_mucontext(ibcontext); - struct task_struct *owning_process = NULL; - struct mm_struct *owning_mm = NULL; - - owning_process = get_pid_task(ibcontext->tgid, PIDTYPE_PID); - if (!owning_process) - return; - - owning_mm = get_task_mm(owning_process); - if (!owning_mm) { - pr_info("no mm, disassociate ucontext is pending task termination\n"); - while (1) { - /* make sure that task is dead before returning, it may - * prevent a rare case of module down in parallel to a - * call to mlx4_ib_vma_close. - */ - put_task_struct(owning_process); - msleep(1); - owning_process = get_pid_task(ibcontext->tgid, - PIDTYPE_PID); - if (!owning_process /* || - owning_process->state == TASK_DEAD */) { - pr_info("disassociate ucontext done, task was terminated\n"); - /* in case task was dead need to release the task struct */ - if (owning_process) - put_task_struct(owning_process); - return; - } - } - } - - /* need to protect from a race on closing the vma as part of - * mlx4_ib_vma_close(). - */ - down_read(&owning_mm->mmap_sem); - for (i = 0; i < HW_BAR_COUNT; i++) { - vma = context->hw_bar_info[i].vma; - if (!vma) - continue; - - ret = zap_vma_ptes(context->hw_bar_info[i].vma, - context->hw_bar_info[i].vma->vm_start, - PAGE_SIZE); - if (ret) { - pr_err("Error: zap_vma_ptes failed for index=%d, ret=%d\n", i, ret); - BUG_ON(1); - } - - /* context going to be destroyed, should not access ops any more */ - context->hw_bar_info[i].vma->vm_ops = NULL; - } - - up_read(&owning_mm->mmap_sem); - mmput(owning_mm); - put_task_struct(owning_process); -} - static void mlx4_ib_set_vma_data(struct vm_area_struct *vma, struct mlx4_ib_vma_private_data *vma_private_data) { @@ -2694,7 +2632,6 @@ static void *mlx4_ib_add(struct mlx4_dev *dev) ibdev->ib_dev.process_mad = mlx4_ib_process_mad; ibdev->ib_dev.get_port_immutable = mlx4_port_immutable; ibdev->ib_dev.get_dev_fw_str = get_fw_ver_str; - ibdev->ib_dev.disassociate_ucontext = mlx4_ib_disassociate_ucontext; if (!mlx4_is_slave(ibdev->dev)) { ibdev->ib_dev.alloc_fmr = mlx4_ib_fmr_alloc; From owner-svn-src-all@freebsd.org Wed Mar 7 13:58:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E89EFF2EAE9; Wed, 7 Mar 2018 13:58:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A1A974FA6; Wed, 7 Mar 2018 13:58: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FF0F223A4; Wed, 7 Mar 2018 13:58: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 w27DwwUd027864; Wed, 7 Mar 2018 13:58:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27Dwwmp027863; Wed, 7 Mar 2018 13:58:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071358.w27Dwwmp027863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 13:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330595 - head/sys/dev/mlx4/mlx4_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx4/mlx4_ib X-SVN-Commit-Revision: 330595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:58:59 -0000 Author: hselasky Date: Wed Mar 7 13:58:58 2018 New Revision: 330595 URL: https://svnweb.freebsd.org/changeset/base/330595 Log: The mlx4ib(4) should not be loaded before the ibcore is initialized. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Mar 7 13:57:32 2018 (r330594) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Mar 7 13:58:58 2018 (r330595) @@ -3317,7 +3317,7 @@ static void __exit mlx4_ib_cleanup(void) destroy_workqueue(wq); } -module_init_order(mlx4_ib_init, SI_ORDER_MIDDLE); +module_init_order(mlx4_ib_init, SI_ORDER_THIRD); module_exit(mlx4_ib_cleanup); static int From owner-svn-src-all@freebsd.org Wed Mar 7 13:59:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B3AEF2EBB4; Wed, 7 Mar 2018 13:59:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5107975103; Wed, 7 Mar 2018 13:59:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C05B223A5; Wed, 7 Mar 2018 13:59:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27Dxlo7027940; Wed, 7 Mar 2018 13:59:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27DxlU9027939; Wed, 7 Mar 2018 13:59:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071359.w27DxlU9027939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 13:59:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330596 - head/sys/dev/mlx4/mlx4_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx4/mlx4_ib X-SVN-Commit-Revision: 330596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 13:59:47 -0000 Author: hselasky Date: Wed Mar 7 13:59:46 2018 New Revision: 330596 URL: https://svnweb.freebsd.org/changeset/base/330596 Log: Bump version information in mlx4ib(4). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Mar 7 13:58:58 2018 (r330595) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Wed Mar 7 13:59:46 2018 (r330596) @@ -63,8 +63,10 @@ #include "wc.h" #define DRV_NAME MLX4_IB_DRV_NAME -#define DRV_VERSION "3.4.1-BETA" -#define DRV_RELDATE "October 2017" +#ifndef DRV_VERSION +#define DRV_VERSION "3.4.1" +#endif +#define DRV_RELDATE "February 2018" #define MLX4_IB_FLOW_MAX_PRIO 0xFFF #define MLX4_IB_FLOW_QPN_MASK 0xFFFFFF From owner-svn-src-all@freebsd.org Wed Mar 7 14:03:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E3B8F2F2AB; Wed, 7 Mar 2018 14:03:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E013F7575F; Wed, 7 Mar 2018 14:03:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C08D722530; Wed, 7 Mar 2018 14:03:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27E3VKU033081; Wed, 7 Mar 2018 14:03:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27E3Ve1033080; Wed, 7 Mar 2018 14:03:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071403.w27E3Ve1033080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 14:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330597 - head/sys/dev/mlx5/mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 330597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 14:03:32 -0000 Author: hselasky Date: Wed Mar 7 14:03:31 2018 New Revision: 330597 URL: https://svnweb.freebsd.org/changeset/base/330597 Log: Disable unsupported disassociate ucontext functionality in mlx5ib(4). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Mar 7 13:59:46 2018 (r330596) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Mar 7 14:03:31 2018 (r330597) @@ -1241,62 +1241,6 @@ static int mlx5_ib_set_vma_data(struct vm_area_struct return 0; } -static void mlx5_ib_disassociate_ucontext(struct ib_ucontext *ibcontext) -{ - int ret; - struct vm_area_struct *vma; - struct mlx5_ib_vma_private_data *vma_private, *n; - struct mlx5_ib_ucontext *context = to_mucontext(ibcontext); - struct task_struct *owning_process = NULL; - struct mm_struct *owning_mm = NULL; - - owning_process = get_pid_task(ibcontext->tgid, PIDTYPE_PID); - if (!owning_process) - return; - - owning_mm = get_task_mm(owning_process); - if (!owning_mm) { - pr_info("no mm, disassociate ucontext is pending task termination\n"); - while (1) { - put_task_struct(owning_process); - usleep_range(1000, 2000); - owning_process = get_pid_task(ibcontext->tgid, - PIDTYPE_PID); - if (!owning_process /* || - owning_process->state == TASK_DEAD */) { - pr_info("disassociate ucontext done, task was terminated\n"); - /* in case task was dead need to release the - * task struct. - */ - if (owning_process) - put_task_struct(owning_process); - return; - } - } - } - - /* need to protect from a race on closing the vma as part of - * mlx5_ib_vma_close. - */ - down_read(&owning_mm->mmap_sem); - list_for_each_entry_safe(vma_private, n, &context->vma_private_list, - list) { - vma = vma_private->vma; - ret = zap_vma_ptes(vma, vma->vm_start, - PAGE_SIZE); - WARN_ONCE(ret, "%s: zap_vma_ptes failed", __func__); - /* context going to be destroyed, should - * not access ops any more. - */ - vma->vm_ops = NULL; - list_del(&vma_private->list); - kfree(vma_private); - } - up_read(&owning_mm->mmap_sem); - mmput(owning_mm); - put_task_struct(owning_process); -} - static inline char *mmap_cmd2str(enum mlx5_ib_mmap_cmd cmd) { switch (cmd) { @@ -3055,8 +2999,6 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) dev->ib_dev.get_vf_stats = mlx5_ib_get_vf_stats; dev->ib_dev.set_vf_guid = mlx5_ib_set_vf_guid; } - - dev->ib_dev.disassociate_ucontext = mlx5_ib_disassociate_ucontext; mlx5_ib_internal_fill_odp_caps(dev); From owner-svn-src-all@freebsd.org Wed Mar 7 14:29:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97C9CF312DB; Wed, 7 Mar 2018 14:29:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4704F76A7C; Wed, 7 Mar 2018 14:29:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27A832287F; Wed, 7 Mar 2018 14:29:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27ETVpo043106; Wed, 7 Mar 2018 14:29:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27ETV2Z043105; Wed, 7 Mar 2018 14:29:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071429.w27ETV2Z043105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 14:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330598 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 330598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 14:29:31 -0000 Author: hselasky Date: Wed Mar 7 14:29:30 2018 New Revision: 330598 URL: https://svnweb.freebsd.org/changeset/base/330598 Log: Use a macro in mlx5_command_str() instead of copying OP name. linux commit 42ca502e179d0654ef441333a9d0f35c948734f3 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Mar 7 14:03:31 2018 (r330597) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Mar 7 14:29:30 2018 (r330598) @@ -296,403 +296,141 @@ static void dump_buf(void *buf, int size, int data_onl const char *mlx5_command_str(int command) { - switch (command) { - case MLX5_CMD_OP_QUERY_HCA_CAP: - return "QUERY_HCA_CAP"; + #define MLX5_COMMAND_STR_CASE(__cmd) case MLX5_CMD_OP_ ## __cmd: return #__cmd - case MLX5_CMD_OP_SET_HCA_CAP: - return "SET_HCA_CAP"; - - case MLX5_CMD_OP_QUERY_ADAPTER: - return "QUERY_ADAPTER"; - - case MLX5_CMD_OP_INIT_HCA: - return "INIT_HCA"; - - case MLX5_CMD_OP_TEARDOWN_HCA: - return "TEARDOWN_HCA"; - - case MLX5_CMD_OP_ENABLE_HCA: - return "MLX5_CMD_OP_ENABLE_HCA"; - - case MLX5_CMD_OP_DISABLE_HCA: - return "MLX5_CMD_OP_DISABLE_HCA"; - - case MLX5_CMD_OP_QUERY_PAGES: - return "QUERY_PAGES"; - - case MLX5_CMD_OP_MANAGE_PAGES: - return "MANAGE_PAGES"; - - case MLX5_CMD_OP_QUERY_ISSI: - return "QUERY_ISSI"; - - case MLX5_CMD_OP_SET_ISSI: - return "SET_ISSI"; - - case MLX5_CMD_OP_CREATE_MKEY: - return "CREATE_MKEY"; - - case MLX5_CMD_OP_QUERY_MKEY: - return "QUERY_MKEY"; - - case MLX5_CMD_OP_DESTROY_MKEY: - return "DESTROY_MKEY"; - - case MLX5_CMD_OP_QUERY_SPECIAL_CONTEXTS: - return "QUERY_SPECIAL_CONTEXTS"; - - case MLX5_CMD_OP_PAGE_FAULT_RESUME: - return "PAGE_FAULT_RESUME"; - - case MLX5_CMD_OP_CREATE_EQ: - return "CREATE_EQ"; - - case MLX5_CMD_OP_DESTROY_EQ: - return "DESTROY_EQ"; - - case MLX5_CMD_OP_QUERY_EQ: - return "QUERY_EQ"; - - case MLX5_CMD_OP_GEN_EQE: - return "GEN_EQE"; - - case MLX5_CMD_OP_CREATE_CQ: - return "CREATE_CQ"; - - case MLX5_CMD_OP_DESTROY_CQ: - return "DESTROY_CQ"; - - case MLX5_CMD_OP_QUERY_CQ: - return "QUERY_CQ"; - - case MLX5_CMD_OP_MODIFY_CQ: - return "MODIFY_CQ"; - - case MLX5_CMD_OP_CREATE_QP: - return "CREATE_QP"; - - case MLX5_CMD_OP_DESTROY_QP: - return "DESTROY_QP"; - - case MLX5_CMD_OP_RST2INIT_QP: - return "RST2INIT_QP"; - - case MLX5_CMD_OP_INIT2RTR_QP: - return "INIT2RTR_QP"; - - case MLX5_CMD_OP_RTR2RTS_QP: - return "RTR2RTS_QP"; - - case MLX5_CMD_OP_RTS2RTS_QP: - return "RTS2RTS_QP"; - - case MLX5_CMD_OP_SQERR2RTS_QP: - return "SQERR2RTS_QP"; - - case MLX5_CMD_OP_2ERR_QP: - return "2ERR_QP"; - - case MLX5_CMD_OP_2RST_QP: - return "2RST_QP"; - - case MLX5_CMD_OP_QUERY_QP: - return "QUERY_QP"; - - case MLX5_CMD_OP_SQD_RTS_QP: - return "SQD_RTS_QP"; - - case MLX5_CMD_OP_MAD_IFC: - return "MAD_IFC"; - - case MLX5_CMD_OP_INIT2INIT_QP: - return "INIT2INIT_QP"; - - case MLX5_CMD_OP_CREATE_PSV: - return "CREATE_PSV"; - - case MLX5_CMD_OP_DESTROY_PSV: - return "DESTROY_PSV"; - - case MLX5_CMD_OP_CREATE_SRQ: - return "CREATE_SRQ"; - - case MLX5_CMD_OP_DESTROY_SRQ: - return "DESTROY_SRQ"; - - case MLX5_CMD_OP_QUERY_SRQ: - return "QUERY_SRQ"; - - case MLX5_CMD_OP_ARM_RQ: - return "ARM_RQ"; - - case MLX5_CMD_OP_CREATE_XRC_SRQ: - return "CREATE_XRC_SRQ"; - - case MLX5_CMD_OP_DESTROY_XRC_SRQ: - return "DESTROY_XRC_SRQ"; - - case MLX5_CMD_OP_QUERY_XRC_SRQ: - return "QUERY_XRC_SRQ"; - - case MLX5_CMD_OP_ARM_XRC_SRQ: - return "ARM_XRC_SRQ"; - - case MLX5_CMD_OP_CREATE_DCT: - return "CREATE_DCT"; - - case MLX5_CMD_OP_SET_DC_CNAK_TRACE: - return "SET_DC_CNAK_TRACE"; - - case MLX5_CMD_OP_DESTROY_DCT: - return "DESTROY_DCT"; - - case MLX5_CMD_OP_DRAIN_DCT: - return "DRAIN_DCT"; - - case MLX5_CMD_OP_QUERY_DCT: - return "QUERY_DCT"; - - case MLX5_CMD_OP_ARM_DCT_FOR_KEY_VIOLATION: - return "ARM_DCT_FOR_KEY_VIOLATION"; - - case MLX5_CMD_OP_QUERY_VPORT_STATE: - return "QUERY_VPORT_STATE"; - - case MLX5_CMD_OP_MODIFY_VPORT_STATE: - return "MODIFY_VPORT_STATE"; - - case MLX5_CMD_OP_QUERY_ESW_VPORT_CONTEXT: - return "QUERY_ESW_VPORT_CONTEXT"; - - case MLX5_CMD_OP_MODIFY_ESW_VPORT_CONTEXT: - return "MODIFY_ESW_VPORT_CONTEXT"; - - case MLX5_CMD_OP_QUERY_NIC_VPORT_CONTEXT: - return "QUERY_NIC_VPORT_CONTEXT"; - - case MLX5_CMD_OP_MODIFY_NIC_VPORT_CONTEXT: - return "MODIFY_NIC_VPORT_CONTEXT"; - - case MLX5_CMD_OP_QUERY_ROCE_ADDRESS: - return "QUERY_ROCE_ADDRESS"; - - case MLX5_CMD_OP_SET_ROCE_ADDRESS: - return "SET_ROCE_ADDRESS"; - - case MLX5_CMD_OP_QUERY_HCA_VPORT_CONTEXT: - return "QUERY_HCA_VPORT_CONTEXT"; - - case MLX5_CMD_OP_MODIFY_HCA_VPORT_CONTEXT: - return "MODIFY_HCA_VPORT_CONTEXT"; - - case MLX5_CMD_OP_QUERY_HCA_VPORT_GID: - return "QUERY_HCA_VPORT_GID"; - - case MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY: - return "QUERY_HCA_VPORT_PKEY"; - - case MLX5_CMD_OP_QUERY_VPORT_COUNTER: - return "QUERY_VPORT_COUNTER"; - - case MLX5_CMD_OP_SET_WOL_ROL: - return "SET_WOL_ROL"; - - case MLX5_CMD_OP_QUERY_WOL_ROL: - return "QUERY_WOL_ROL"; - - case MLX5_CMD_OP_ALLOC_Q_COUNTER: - return "ALLOC_Q_COUNTER"; - - case MLX5_CMD_OP_DEALLOC_Q_COUNTER: - return "DEALLOC_Q_COUNTER"; - - case MLX5_CMD_OP_QUERY_Q_COUNTER: - return "QUERY_Q_COUNTER"; - - case MLX5_CMD_OP_ALLOC_PD: - return "ALLOC_PD"; - - case MLX5_CMD_OP_DEALLOC_PD: - return "DEALLOC_PD"; - - case MLX5_CMD_OP_ALLOC_UAR: - return "ALLOC_UAR"; - - case MLX5_CMD_OP_DEALLOC_UAR: - return "DEALLOC_UAR"; - - case MLX5_CMD_OP_CONFIG_INT_MODERATION: - return "CONFIG_INT_MODERATION"; - - case MLX5_CMD_OP_ATTACH_TO_MCG: - return "ATTACH_TO_MCG"; - - case MLX5_CMD_OP_DETACH_FROM_MCG: - return "DETACH_FROM_MCG"; - - case MLX5_CMD_OP_GET_DROPPED_PACKET_LOG: - return "GET_DROPPED_PACKET_LOG"; - - case MLX5_CMD_OP_QUERY_MAD_DEMUX: - return "QUERY_MAD_DEMUX"; - - case MLX5_CMD_OP_SET_MAD_DEMUX: - return "SET_MAD_DEMUX"; - - case MLX5_CMD_OP_NOP: - return "NOP"; - - case MLX5_CMD_OP_ALLOC_XRCD: - return "ALLOC_XRCD"; - - case MLX5_CMD_OP_DEALLOC_XRCD: - return "DEALLOC_XRCD"; - - case MLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN: - return "ALLOC_TRANSPORT_DOMAIN"; - - case MLX5_CMD_OP_DEALLOC_TRANSPORT_DOMAIN: - return "DEALLOC_TRANSPORT_DOMAIN"; - - case MLX5_CMD_OP_QUERY_CONG_STATUS: - return "QUERY_CONG_STATUS"; - - case MLX5_CMD_OP_MODIFY_CONG_STATUS: - return "MODIFY_CONG_STATUS"; - - case MLX5_CMD_OP_QUERY_CONG_PARAMS: - return "QUERY_CONG_PARAMS"; - - case MLX5_CMD_OP_MODIFY_CONG_PARAMS: - return "MODIFY_CONG_PARAMS"; - - case MLX5_CMD_OP_QUERY_CONG_STATISTICS: - return "QUERY_CONG_STATISTICS"; - - case MLX5_CMD_OP_ADD_VXLAN_UDP_DPORT: - return "ADD_VXLAN_UDP_DPORT"; - - case MLX5_CMD_OP_DELETE_VXLAN_UDP_DPORT: - return "DELETE_VXLAN_UDP_DPORT"; - - case MLX5_CMD_OP_SET_L2_TABLE_ENTRY: - return "SET_L2_TABLE_ENTRY"; - - case MLX5_CMD_OP_QUERY_L2_TABLE_ENTRY: - return "QUERY_L2_TABLE_ENTRY"; - - case MLX5_CMD_OP_DELETE_L2_TABLE_ENTRY: - return "DELETE_L2_TABLE_ENTRY"; - - case MLX5_CMD_OP_CREATE_RMP: - return "CREATE_RMP"; - - case MLX5_CMD_OP_MODIFY_RMP: - return "MODIFY_RMP"; - - case MLX5_CMD_OP_DESTROY_RMP: - return "DESTROY_RMP"; - - case MLX5_CMD_OP_QUERY_RMP: - return "QUERY_RMP"; - - case MLX5_CMD_OP_CREATE_RQT: - return "CREATE_RQT"; - - case MLX5_CMD_OP_MODIFY_RQT: - return "MODIFY_RQT"; - - case MLX5_CMD_OP_DESTROY_RQT: - return "DESTROY_RQT"; - - case MLX5_CMD_OP_QUERY_RQT: - return "QUERY_RQT"; - - case MLX5_CMD_OP_ACCESS_REG: - return "MLX5_CMD_OP_ACCESS_REG"; - - case MLX5_CMD_OP_CREATE_SQ: - return "CREATE_SQ"; - - case MLX5_CMD_OP_MODIFY_SQ: - return "MODIFY_SQ"; - - case MLX5_CMD_OP_DESTROY_SQ: - return "DESTROY_SQ"; - - case MLX5_CMD_OP_QUERY_SQ: - return "QUERY_SQ"; - - case MLX5_CMD_OP_CREATE_RQ: - return "CREATE_RQ"; - - case MLX5_CMD_OP_MODIFY_RQ: - return "MODIFY_RQ"; - - case MLX5_CMD_OP_DESTROY_RQ: - return "DESTROY_RQ"; - - case MLX5_CMD_OP_QUERY_RQ: - return "QUERY_RQ"; - - case MLX5_CMD_OP_CREATE_TIR: - return "CREATE_TIR"; - - case MLX5_CMD_OP_MODIFY_TIR: - return "MODIFY_TIR"; - - case MLX5_CMD_OP_DESTROY_TIR: - return "DESTROY_TIR"; - - case MLX5_CMD_OP_QUERY_TIR: - return "QUERY_TIR"; - - case MLX5_CMD_OP_CREATE_TIS: - return "CREATE_TIS"; - - case MLX5_CMD_OP_MODIFY_TIS: - return "MODIFY_TIS"; - - case MLX5_CMD_OP_DESTROY_TIS: - return "DESTROY_TIS"; - - case MLX5_CMD_OP_QUERY_TIS: - return "QUERY_TIS"; - - case MLX5_CMD_OP_CREATE_FLOW_TABLE: - return "CREATE_FLOW_TABLE"; - - case MLX5_CMD_OP_DESTROY_FLOW_TABLE: - return "DESTROY_FLOW_TABLE"; - - case MLX5_CMD_OP_QUERY_FLOW_TABLE: - return "QUERY_FLOW_TABLE"; - - case MLX5_CMD_OP_CREATE_FLOW_GROUP: - return "CREATE_FLOW_GROUP"; - - case MLX5_CMD_OP_DESTROY_FLOW_GROUP: - return "DESTROY_FLOW_GROUP"; - - case MLX5_CMD_OP_QUERY_FLOW_GROUP: - return "QUERY_FLOW_GROUP"; - - case MLX5_CMD_OP_SET_FLOW_TABLE_ENTRY: - return "SET_FLOW_TABLE_ENTRY"; - - case MLX5_CMD_OP_QUERY_FLOW_TABLE_ENTRY: - return "QUERY_FLOW_TABLE_ENTRY"; - - case MLX5_CMD_OP_DELETE_FLOW_TABLE_ENTRY: - return "DELETE_FLOW_TABLE_ENTRY"; - - case MLX5_CMD_OP_SET_DIAGNOSTICS: - return "MLX5_CMD_OP_SET_DIAGNOSTICS"; - - case MLX5_CMD_OP_QUERY_DIAGNOSTICS: - return "MLX5_CMD_OP_QUERY_DIAGNOSTICS"; - + switch (command) { + MLX5_COMMAND_STR_CASE(QUERY_HCA_CAP); + MLX5_COMMAND_STR_CASE(SET_HCA_CAP); + MLX5_COMMAND_STR_CASE(QUERY_ADAPTER); + MLX5_COMMAND_STR_CASE(INIT_HCA); + MLX5_COMMAND_STR_CASE(TEARDOWN_HCA); + MLX5_COMMAND_STR_CASE(ENABLE_HCA); + MLX5_COMMAND_STR_CASE(DISABLE_HCA); + MLX5_COMMAND_STR_CASE(QUERY_PAGES); + MLX5_COMMAND_STR_CASE(MANAGE_PAGES); + MLX5_COMMAND_STR_CASE(QUERY_ISSI); + MLX5_COMMAND_STR_CASE(SET_ISSI); + MLX5_COMMAND_STR_CASE(CREATE_MKEY); + MLX5_COMMAND_STR_CASE(QUERY_MKEY); + MLX5_COMMAND_STR_CASE(DESTROY_MKEY); + MLX5_COMMAND_STR_CASE(QUERY_SPECIAL_CONTEXTS); + MLX5_COMMAND_STR_CASE(PAGE_FAULT_RESUME); + MLX5_COMMAND_STR_CASE(CREATE_EQ); + MLX5_COMMAND_STR_CASE(DESTROY_EQ); + MLX5_COMMAND_STR_CASE(QUERY_EQ); + MLX5_COMMAND_STR_CASE(GEN_EQE); + MLX5_COMMAND_STR_CASE(CREATE_CQ); + MLX5_COMMAND_STR_CASE(DESTROY_CQ); + MLX5_COMMAND_STR_CASE(QUERY_CQ); + MLX5_COMMAND_STR_CASE(MODIFY_CQ); + MLX5_COMMAND_STR_CASE(CREATE_QP); + MLX5_COMMAND_STR_CASE(DESTROY_QP); + MLX5_COMMAND_STR_CASE(RST2INIT_QP); + MLX5_COMMAND_STR_CASE(INIT2RTR_QP); + MLX5_COMMAND_STR_CASE(RTR2RTS_QP); + MLX5_COMMAND_STR_CASE(RTS2RTS_QP); + MLX5_COMMAND_STR_CASE(SQERR2RTS_QP); + MLX5_COMMAND_STR_CASE(2ERR_QP); + MLX5_COMMAND_STR_CASE(2RST_QP); + MLX5_COMMAND_STR_CASE(QUERY_QP); + MLX5_COMMAND_STR_CASE(SQD_RTS_QP); + MLX5_COMMAND_STR_CASE(MAD_IFC); + MLX5_COMMAND_STR_CASE(INIT2INIT_QP); + MLX5_COMMAND_STR_CASE(CREATE_PSV); + MLX5_COMMAND_STR_CASE(DESTROY_PSV); + MLX5_COMMAND_STR_CASE(CREATE_SRQ); + MLX5_COMMAND_STR_CASE(DESTROY_SRQ); + MLX5_COMMAND_STR_CASE(QUERY_SRQ); + MLX5_COMMAND_STR_CASE(ARM_RQ); + MLX5_COMMAND_STR_CASE(CREATE_XRC_SRQ); + MLX5_COMMAND_STR_CASE(DESTROY_XRC_SRQ); + MLX5_COMMAND_STR_CASE(QUERY_XRC_SRQ); + MLX5_COMMAND_STR_CASE(ARM_XRC_SRQ); + MLX5_COMMAND_STR_CASE(CREATE_DCT); + MLX5_COMMAND_STR_CASE(SET_DC_CNAK_TRACE); + MLX5_COMMAND_STR_CASE(DESTROY_DCT); + MLX5_COMMAND_STR_CASE(DRAIN_DCT); + MLX5_COMMAND_STR_CASE(QUERY_DCT); + MLX5_COMMAND_STR_CASE(ARM_DCT_FOR_KEY_VIOLATION); + MLX5_COMMAND_STR_CASE(QUERY_VPORT_STATE); + MLX5_COMMAND_STR_CASE(MODIFY_VPORT_STATE); + MLX5_COMMAND_STR_CASE(QUERY_ESW_VPORT_CONTEXT); + MLX5_COMMAND_STR_CASE(MODIFY_ESW_VPORT_CONTEXT); + MLX5_COMMAND_STR_CASE(QUERY_NIC_VPORT_CONTEXT); + MLX5_COMMAND_STR_CASE(MODIFY_NIC_VPORT_CONTEXT); + MLX5_COMMAND_STR_CASE(QUERY_ROCE_ADDRESS); + MLX5_COMMAND_STR_CASE(SET_ROCE_ADDRESS); + MLX5_COMMAND_STR_CASE(QUERY_HCA_VPORT_CONTEXT); + MLX5_COMMAND_STR_CASE(MODIFY_HCA_VPORT_CONTEXT); + MLX5_COMMAND_STR_CASE(QUERY_HCA_VPORT_GID); + MLX5_COMMAND_STR_CASE(QUERY_HCA_VPORT_PKEY); + MLX5_COMMAND_STR_CASE(QUERY_VPORT_COUNTER); + MLX5_COMMAND_STR_CASE(SET_WOL_ROL); + MLX5_COMMAND_STR_CASE(QUERY_WOL_ROL); + MLX5_COMMAND_STR_CASE(ALLOC_Q_COUNTER); + MLX5_COMMAND_STR_CASE(DEALLOC_Q_COUNTER); + MLX5_COMMAND_STR_CASE(QUERY_Q_COUNTER); + MLX5_COMMAND_STR_CASE(ALLOC_PD); + MLX5_COMMAND_STR_CASE(DEALLOC_PD); + MLX5_COMMAND_STR_CASE(ALLOC_UAR); + MLX5_COMMAND_STR_CASE(DEALLOC_UAR); + MLX5_COMMAND_STR_CASE(CONFIG_INT_MODERATION); + MLX5_COMMAND_STR_CASE(ATTACH_TO_MCG); + MLX5_COMMAND_STR_CASE(DETACH_FROM_MCG); + MLX5_COMMAND_STR_CASE(GET_DROPPED_PACKET_LOG); + MLX5_COMMAND_STR_CASE(QUERY_MAD_DEMUX); + MLX5_COMMAND_STR_CASE(SET_MAD_DEMUX); + MLX5_COMMAND_STR_CASE(NOP); + MLX5_COMMAND_STR_CASE(ALLOC_XRCD); + MLX5_COMMAND_STR_CASE(DEALLOC_XRCD); + MLX5_COMMAND_STR_CASE(ALLOC_TRANSPORT_DOMAIN); + MLX5_COMMAND_STR_CASE(DEALLOC_TRANSPORT_DOMAIN); + MLX5_COMMAND_STR_CASE(QUERY_CONG_STATUS); + MLX5_COMMAND_STR_CASE(MODIFY_CONG_STATUS); + MLX5_COMMAND_STR_CASE(QUERY_CONG_PARAMS); + MLX5_COMMAND_STR_CASE(MODIFY_CONG_PARAMS); + MLX5_COMMAND_STR_CASE(QUERY_CONG_STATISTICS); + MLX5_COMMAND_STR_CASE(ADD_VXLAN_UDP_DPORT); + MLX5_COMMAND_STR_CASE(DELETE_VXLAN_UDP_DPORT); + MLX5_COMMAND_STR_CASE(SET_L2_TABLE_ENTRY); + MLX5_COMMAND_STR_CASE(QUERY_L2_TABLE_ENTRY); + MLX5_COMMAND_STR_CASE(DELETE_L2_TABLE_ENTRY); + MLX5_COMMAND_STR_CASE(CREATE_RMP); + MLX5_COMMAND_STR_CASE(MODIFY_RMP); + MLX5_COMMAND_STR_CASE(DESTROY_RMP); + MLX5_COMMAND_STR_CASE(QUERY_RMP); + MLX5_COMMAND_STR_CASE(CREATE_RQT); + MLX5_COMMAND_STR_CASE(MODIFY_RQT); + MLX5_COMMAND_STR_CASE(DESTROY_RQT); + MLX5_COMMAND_STR_CASE(QUERY_RQT); + MLX5_COMMAND_STR_CASE(ACCESS_REG); + MLX5_COMMAND_STR_CASE(CREATE_SQ); + MLX5_COMMAND_STR_CASE(MODIFY_SQ); + MLX5_COMMAND_STR_CASE(DESTROY_SQ); + MLX5_COMMAND_STR_CASE(QUERY_SQ); + MLX5_COMMAND_STR_CASE(CREATE_RQ); + MLX5_COMMAND_STR_CASE(MODIFY_RQ); + MLX5_COMMAND_STR_CASE(DESTROY_RQ); + MLX5_COMMAND_STR_CASE(QUERY_RQ); + MLX5_COMMAND_STR_CASE(CREATE_TIR); + MLX5_COMMAND_STR_CASE(MODIFY_TIR); + MLX5_COMMAND_STR_CASE(DESTROY_TIR); + MLX5_COMMAND_STR_CASE(QUERY_TIR); + MLX5_COMMAND_STR_CASE(CREATE_TIS); + MLX5_COMMAND_STR_CASE(MODIFY_TIS); + MLX5_COMMAND_STR_CASE(DESTROY_TIS); + MLX5_COMMAND_STR_CASE(QUERY_TIS); + MLX5_COMMAND_STR_CASE(CREATE_FLOW_TABLE); + MLX5_COMMAND_STR_CASE(DESTROY_FLOW_TABLE); + MLX5_COMMAND_STR_CASE(QUERY_FLOW_TABLE); + MLX5_COMMAND_STR_CASE(CREATE_FLOW_GROUP); + MLX5_COMMAND_STR_CASE(DESTROY_FLOW_GROUP); + MLX5_COMMAND_STR_CASE(QUERY_FLOW_GROUP); + MLX5_COMMAND_STR_CASE(SET_FLOW_TABLE_ENTRY); + MLX5_COMMAND_STR_CASE(QUERY_FLOW_TABLE_ENTRY); + MLX5_COMMAND_STR_CASE(DELETE_FLOW_TABLE_ENTRY); + MLX5_COMMAND_STR_CASE(SET_DIAGNOSTICS); + MLX5_COMMAND_STR_CASE(QUERY_DIAGNOSTICS); default: return "unknown command opcode"; } } From owner-svn-src-all@freebsd.org Wed Mar 7 14:35:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5010F31AA4; Wed, 7 Mar 2018 14:35:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63B7D770CA; Wed, 7 Mar 2018 14:35:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A63F22A08; Wed, 7 Mar 2018 14:35:28 +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 w27EZSj5048069; Wed, 7 Mar 2018 14:35:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27EZSvr048068; Wed, 7 Mar 2018 14:35:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071435.w27EZSvr048068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 14:35:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330599 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 330599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 14:35:29 -0000 Author: hselasky Date: Wed Mar 7 14:35:28 2018 New Revision: 330599 URL: https://svnweb.freebsd.org/changeset/base/330599 Log: Fix potential deadlock in command mode change in mlx5core. Call command completion handler in case of timeout when working in interrupts mode. Avoid flushing the commands workqueue after acquiring the semaphores to prevent a potential deadlock. linux commit commit 9cba4ebcf374c3772f6eb61f2d065294b2451b49 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Mar 7 14:29:30 2018 (r330598) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Mar 7 14:35:28 2018 (r330599) @@ -735,11 +735,6 @@ static void cmd_work_handler(struct work_struct *work) struct semaphore *sem; sem = ent->page_queue ? &cmd->pages_sem : &cmd->sem; - if (cmd->moving_to_polling) { - mlx5_core_warn(dev, "not expecting command execution, ignoring...\n"); - return; - } - down(sem); if (alloc_ent(ent) < 0) { @@ -826,13 +821,13 @@ static int wait_func(struct mlx5_core_dev *dev, struct if (cmd->mode == CMD_MODE_POLLING) { wait_for_completion(&ent->done); err = ent->ret; - } else { - if (!wait_for_completion_timeout(&ent->done, timeout)) - err = -ETIMEDOUT; - else - err = 0; - } + } else if (!wait_for_completion_timeout(&ent->done, timeout)) { + ent->ret = -ETIMEDOUT; + mlx5_cmd_comp_handler(dev, 1UL << ent->idx); + } + err = ent->ret; + if (err == -ETIMEDOUT) { mlx5_core_warn(dev, "%s(0x%x) timeout. Will cause a leak of a command resource\n", mlx5_command_str(msg_to_opcode(ent->in)), @@ -881,27 +876,28 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, goto out_free; } - if (!callback) { - err = wait_func(dev, ent); - if (err == -ETIMEDOUT) - goto out; + if (callback) + goto out; - ds = ent->ts2 - ent->ts1; - op = be16_to_cpu(((struct mlx5_inbox_hdr *)in->first.data)->opcode); - if (op < ARRAY_SIZE(cmd->stats)) { - stats = &cmd->stats[op]; - spin_lock_irq(&stats->lock); - stats->sum += ds; - ++stats->n; - spin_unlock_irq(&stats->lock); - } - mlx5_core_dbg_mask(dev, 1 << MLX5_CMD_TIME, - "fw exec time for %s is %lld nsec\n", - mlx5_command_str(op), (long long)ds); - *status = ent->status; - free_cmd(ent); - } + err = wait_func(dev, ent); + if (err == -ETIMEDOUT) + goto out; + ds = ent->ts2 - ent->ts1; + op = be16_to_cpu(((struct mlx5_inbox_hdr *)in->first.data)->opcode); + if (op < ARRAY_SIZE(cmd->stats)) { + stats = &cmd->stats[op]; + spin_lock_irq(&stats->lock); + stats->sum += ds; + ++stats->n; + spin_unlock_irq(&stats->lock); + } + mlx5_core_dbg_mask(dev, 1 << MLX5_CMD_TIME, + "fw exec time for %s is %lld nsec\n", + mlx5_command_str(op), (long long)ds); + *status = ent->status; + free_cmd(ent); + return err; out_free: @@ -1017,7 +1013,7 @@ static void clean_debug_files(struct mlx5_core_dev *de } -void mlx5_cmd_use_events(struct mlx5_core_dev *dev) +static void mlx5_cmd_change_mod(struct mlx5_core_dev *dev, int mode) { struct mlx5_cmd *cmd = &dev->cmd; int i; @@ -1026,26 +1022,21 @@ void mlx5_cmd_use_events(struct mlx5_core_dev *dev) down(&cmd->sem); down(&cmd->pages_sem); + cmd->mode = mode; - flush_workqueue(cmd->wq); - - cmd->mode = CMD_MODE_EVENTS; - up(&cmd->pages_sem); for (i = 0; i < cmd->max_reg_cmds; i++) up(&cmd->sem); } -void mlx5_cmd_use_polling(struct mlx5_core_dev *dev) +void mlx5_cmd_use_events(struct mlx5_core_dev *dev) { - struct mlx5_cmd *cmd = &dev->cmd; + mlx5_cmd_change_mod(dev, CMD_MODE_EVENTS); +} - synchronize_irq(dev->priv.eq_table.pages_eq.irqn); - flush_workqueue(dev->priv.pg_wq); - cmd->moving_to_polling = 1; - flush_workqueue(cmd->wq); - cmd->mode = CMD_MODE_POLLING; - cmd->moving_to_polling = 0; +void mlx5_cmd_use_polling(struct mlx5_core_dev *dev) +{ + mlx5_cmd_change_mod(dev, CMD_MODE_POLLING); } static void free_msg(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *msg) From owner-svn-src-all@freebsd.org Wed Mar 7 14:41:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01EF1F323F0; Wed, 7 Mar 2018 14:41:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A964677571; Wed, 7 Mar 2018 14:41:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A291A22A79; Wed, 7 Mar 2018 14:41:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27EfTA5049943; Wed, 7 Mar 2018 14:41:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27EfTIm049941; Wed, 7 Mar 2018 14:41:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071441.w27EfTIm049941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 14:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330600 - in head/sys/dev/mlx5: . mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 330600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 14:41:30 -0000 Author: hselasky Date: Wed Mar 7 14:41:29 2018 New Revision: 330600 URL: https://svnweb.freebsd.org/changeset/base/330600 Log: Add timeout handle to commands with callback in mlx5core. The current implementation does not handle timeout in case of command with callback request, and this can lead to deadlock if the command doesn't get firmware response. Add delayed callback timeout work before posting the command to firmware. In case of real firmware command completion we will cancel the delayed work. In case of firmware command timeout the callback timeout handler will be called and it will simulate firmware completion with timeout error. linux commit 65ee67084589c1783a74b4a4a5db38d7264ec8b5 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Wed Mar 7 14:35:28 2018 (r330599) +++ head/sys/dev/mlx5/driver.h Wed Mar 7 14:41:29 2018 (r330600) @@ -727,6 +727,7 @@ struct mlx5_cmd_work_ent { void *uout; int uout_size; mlx5_cmd_cbk_t callback; + struct delayed_work cb_timeout_work; void *context; int idx; struct completion done; Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Mar 7 14:35:28 2018 (r330599) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Wed Mar 7 14:41:29 2018 (r330600) @@ -246,6 +246,7 @@ static void poll_timeout(struct mlx5_cmd_work_ent *ent static void free_cmd(struct mlx5_cmd_work_ent *ent) { + cancel_delayed_work_sync(&ent->cb_timeout_work); kfree(ent); } @@ -499,6 +500,30 @@ static void dump_command(struct mlx5_core_dev *dev, pr_debug("\n"); } +static u16 msg_to_opcode(struct mlx5_cmd_msg *in) +{ + struct mlx5_inbox_hdr *hdr = (struct mlx5_inbox_hdr *)(in->first.data); + + return be16_to_cpu(hdr->opcode); +} + +static void cb_timeout_handler(struct work_struct *work) +{ + struct delayed_work *dwork = container_of(work, struct delayed_work, + work); + struct mlx5_cmd_work_ent *ent = container_of(dwork, + struct mlx5_cmd_work_ent, + cb_timeout_work); + struct mlx5_core_dev *dev = container_of(ent->cmd, struct mlx5_core_dev, + cmd); + + ent->ret = -ETIMEDOUT; + mlx5_core_warn(dev, "%s(0x%x) timeout. Will cause a leak of a command resource\n", + mlx5_command_str(msg_to_opcode(ent->in)), + msg_to_opcode(ent->in)); + mlx5_cmd_comp_handler(dev, 1UL << ent->idx); +} + static int set_internal_err_outbox(struct mlx5_core_dev *dev, u16 opcode, struct mlx5_outbox_hdr *hdr) { @@ -731,6 +756,7 @@ static void cmd_work_handler(struct work_struct *work) struct mlx5_cmd_work_ent *ent = container_of(work, struct mlx5_cmd_work_ent, work); struct mlx5_cmd *cmd = ent->cmd; struct mlx5_core_dev *dev = container_of(cmd, struct mlx5_core_dev, cmd); + unsigned long cb_timeout = msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC); struct mlx5_cmd_layout *lay; struct semaphore *sem; @@ -761,6 +787,9 @@ static void cmd_work_handler(struct work_struct *work) dump_command(dev, ent, 1); ent->ts1 = ktime_get_ns(); ent->busy = 0; + if (ent->callback) + schedule_delayed_work(&ent->cb_timeout_work, cb_timeout); + /* ring doorbell after the descriptor is valid */ mlx5_core_dbg(dev, "writing 0x%x to command doorbell\n", 1 << ent->idx); /* make sure data is written to RAM */ @@ -805,13 +834,6 @@ static const char *deliv_status_to_str(u8 status) } } -static u16 msg_to_opcode(struct mlx5_cmd_msg *in) -{ - struct mlx5_inbox_hdr *hdr = (struct mlx5_inbox_hdr *)(in->first.data); - - return be16_to_cpu(hdr->opcode); -} - static int wait_func(struct mlx5_core_dev *dev, struct mlx5_cmd_work_ent *ent) { int timeout = msecs_to_jiffies(MLX5_CMD_TIMEOUT_MSEC); @@ -867,6 +889,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, if (!callback) init_completion(&ent->done); + INIT_DELAYED_WORK(&ent->cb_timeout_work, cb_timeout_handler); INIT_WORK(&ent->work, cmd_work_handler); if (page_queue) { cmd_work_handler(&ent->work); @@ -1065,6 +1088,8 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, i = ffs(vector) - 1; vector &= ~(1U << i); ent = cmd->ent_arr[i]; + if (ent->callback) + cancel_delayed_work(&ent->cb_timeout_work); ent->ts2 = ktime_get_ns(); memcpy(ent->out->first.data, ent->lay->out, sizeof(ent->lay->out)); From owner-svn-src-all@freebsd.org Wed Mar 7 14:44:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 311ABF32A63; Wed, 7 Mar 2018 14:44:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D934577B19; Wed, 7 Mar 2018 14:44:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D42EF22BD1; Wed, 7 Mar 2018 14:44:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27EiWHL053245; Wed, 7 Mar 2018 14:44:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27EiWBV053244; Wed, 7 Mar 2018 14:44:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803071444.w27EiWBV053244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 7 Mar 2018 14:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330601 - head/sys/i386/ibcs2 X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sys/i386/ibcs2 X-SVN-Commit-Revision: 330601 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 14:44:33 -0000 Author: eadler Date: Wed Mar 7 14:44:32 2018 New Revision: 330601 URL: https://svnweb.freebsd.org/changeset/base/330601 Log: sys: Fix a few potential infoleaks in cloudabi While there is no immediate leak, if the structure changes underneath us, there might be in the future. Submitted by: Domagoj Stolfa MFC After: 1 month Sponsored by: DARPA/AFRL Modified: head/sys/i386/ibcs2/ibcs2_ipc.c Modified: head/sys/i386/ibcs2/ibcs2_ipc.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_ipc.c Wed Mar 7 14:41:29 2018 (r330600) +++ head/sys/i386/ibcs2/ibcs2_ipc.c Wed Mar 7 14:44:32 2018 (r330601) @@ -135,6 +135,8 @@ ibcs2_msgctl(struct thread *td, void *v) struct msqid_ds bs; int error; + memset(&is, 0, sizeof(is)); + switch (uap->cmd) { case IBCS2_IPC_STAT: error = kern_msgctl(td, uap->msqid, IPC_STAT, &bs); @@ -317,6 +319,8 @@ ibcs2_semctl(struct thread *td, void *v) union semun semun; register_t rval; int error; + + memset(&is, 0, sizeof(is)); switch(uap->cmd) { case IBCS2_IPC_STAT: From owner-svn-src-all@freebsd.org Wed Mar 7 14:47:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E619F32ED7; Wed, 7 Mar 2018 14:47:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E92FA77DD5; Wed, 7 Mar 2018 14:47:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E445322BD4; Wed, 7 Mar 2018 14:47:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27Elhlv053394; Wed, 7 Mar 2018 14:47:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27Elh7C053393; Wed, 7 Mar 2018 14:47:43 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803071447.w27Elh7C053393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 7 Mar 2018 14:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330602 - head/sys/compat/cloudabi X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sys/compat/cloudabi X-SVN-Commit-Revision: 330602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 14:47:44 -0000 Author: eadler Date: Wed Mar 7 14:47:43 2018 New Revision: 330602 URL: https://svnweb.freebsd.org/changeset/base/330602 Log: sys/cloudabi: Avoid relying on GNU specific extensions An empty initializer list is not technically valid C grammar. MFC After: 1 week Modified: head/sys/compat/cloudabi/cloudabi_fd.c Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Wed Mar 7 14:44:32 2018 (r330601) +++ head/sys/compat/cloudabi/cloudabi_fd.c Wed Mar 7 14:47:43 2018 (r330602) @@ -382,7 +382,7 @@ int cloudabi_sys_fd_stat_get(struct thread *td, struct cloudabi_sys_fd_stat_get_args *uap) { - cloudabi_fdstat_t fsb = {}; + cloudabi_fdstat_t fsb = {0}; struct file *fp; cap_rights_t rights; struct filecaps fcaps; From owner-svn-src-all@freebsd.org Wed Mar 7 14:49:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8649FF331B1; Wed, 7 Mar 2018 14:49:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4AB7805F; Wed, 7 Mar 2018 14:49:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3748F22BD6; Wed, 7 Mar 2018 14:49:28 +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 w27EnS5O053492; Wed, 7 Mar 2018 14:49:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27EnSO9053491; Wed, 7 Mar 2018 14:49:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071449.w27EnSO9053491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 14:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330603 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 330603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 14:49:28 -0000 Author: hselasky Date: Wed Mar 7 14:49:27 2018 New Revision: 330603 URL: https://svnweb.freebsd.org/changeset/base/330603 Log: Make sure default VNET is set when adding a new interface in mlx5core. Adding an interface might be done outside the device_attach() routine and will then cause a panic, due to the VNET not being set. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Mar 7 14:47:43 2018 (r330602) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Wed Mar 7 14:49:27 2018 (r330603) @@ -956,7 +956,9 @@ static void mlx5_add_device(struct mlx5_interface *int dev_ctx = kmalloc(sizeof(*dev_ctx), GFP_KERNEL); dev_ctx->intf = intf; + CURVNET_SET_QUIET(vnet0); dev_ctx->context = intf->add(dev); + CURVNET_RESTORE(); if (dev_ctx->context) { spin_lock_irq(&priv->ctx_lock); From owner-svn-src-all@freebsd.org Wed Mar 7 14:51:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9075DF335CE; Wed, 7 Mar 2018 14:51:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4582178473; Wed, 7 Mar 2018 14:51:51 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 405BB22D46; Wed, 7 Mar 2018 14:51:51 +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 w27Epp3k057973; Wed, 7 Mar 2018 14:51:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27Epoui057968; Wed, 7 Mar 2018 14:51:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071451.w27Epoui057968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 14:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330604 - in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 330604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 14:51:51 -0000 Author: hselasky Date: Wed Mar 7 14:51:50 2018 New Revision: 330604 URL: https://svnweb.freebsd.org/changeset/base/330604 Log: Add log message for unsupported QSFPs in mlx5core. Submitted by: Matthew Finlay MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/device.h head/sys/dev/mlx5/mlx5_core/mlx5_eq.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/device.h ============================================================================== --- head/sys/dev/mlx5/device.h Wed Mar 7 14:49:27 2018 (r330603) +++ head/sys/dev/mlx5/device.h Wed Mar 7 14:51:50 2018 (r330604) @@ -501,9 +501,10 @@ struct mlx5_eqe_vport_change { #define PORT_MODULE_EVENT_ERROR_TYPE_MASK 0xF enum { - MLX5_MODULE_STATUS_PLUGGED = 0x1, - MLX5_MODULE_STATUS_UNPLUGGED = 0x2, - MLX5_MODULE_STATUS_ERROR = 0x3, + MLX5_MODULE_STATUS_PLUGGED_ENABLED = 0x1, + MLX5_MODULE_STATUS_UNPLUGGED = 0x2, + MLX5_MODULE_STATUS_ERROR = 0x3, + MLX5_MODULE_STATUS_PLUGGED_DISABLED = 0x4, }; enum { @@ -512,7 +513,7 @@ enum { MLX5_MODULE_EVENT_ERROR_BUS_STUCK = 0x2, MLX5_MODULE_EVENT_ERROR_NO_EEPROM_RETRY_TIMEOUT = 0x3, MLX5_MODULE_EVENT_ERROR_ENFORCE_PART_NUMBER_LIST = 0x4, - MLX5_MODULE_EVENT_ERROR_UNKNOWN_IDENTIFIER = 0x5, + MLX5_MODULE_EVENT_ERROR_UNSUPPORTED_CABLE = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, }; Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Mar 7 14:49:27 2018 (r330603) +++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Mar 7 14:51:50 2018 (r330604) @@ -618,8 +618,8 @@ static const char *mlx5_port_module_event_error_type_t return "No EEPROM/retry timeout"; case MLX5_MODULE_EVENT_ERROR_ENFORCE_PART_NUMBER_LIST: return "Enforce part number list"; - case MLX5_MODULE_EVENT_ERROR_UNKNOWN_IDENTIFIER: - return "Unknown identifier"; + case MLX5_MODULE_EVENT_ERROR_UNSUPPORTED_CABLE: + return "Unsupported Cable"; case MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE: return "High Temperature"; case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: @@ -655,8 +655,8 @@ static void mlx5_port_module_event(struct mlx5_core_de PORT_MODULE_EVENT_ERROR_TYPE_MASK; switch (module_status) { - case MLX5_MODULE_STATUS_PLUGGED: - device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: plugged\n", module_num); + case MLX5_MODULE_STATUS_PLUGGED_ENABLED: + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: plugged and enabled\n", module_num); break; case MLX5_MODULE_STATUS_UNPLUGGED: @@ -665,6 +665,10 @@ static void mlx5_port_module_event(struct mlx5_core_de case MLX5_MODULE_STATUS_ERROR: device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: error, %s\n", module_num, mlx5_port_module_event_error_type_to_string(error_type)); + break; + + case MLX5_MODULE_STATUS_PLUGGED_DISABLED: + device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, status: plugged but disabled\n", module_num); break; default: Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Mar 7 14:49:27 2018 (r330603) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Mar 7 14:51:50 2018 (r330604) @@ -2639,6 +2639,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t int error = 0; int mask = 0; int size_read = 0; + int module_status; int module_num; int max_mtu; uint8_t read_addr; @@ -2838,8 +2839,9 @@ out: goto err_i2c; } /* Check if module is present before doing an access */ - if (mlx5_query_module_status(priv->mdev, module_num) != - MLX5_MODULE_STATUS_PLUGGED) { + module_status = mlx5_query_module_status(priv->mdev, module_num); + if (module_status != MLX5_MODULE_STATUS_PLUGGED_ENABLED && + module_status != MLX5_MODULE_STATUS_PLUGGED_DISABLED) { error = EINVAL; goto err_i2c; } From owner-svn-src-all@freebsd.org Wed Mar 7 15:02:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08727F34576; Wed, 7 Mar 2018 15:02:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B219778FEE; Wed, 7 Mar 2018 15:02:14 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD09322F0D; Wed, 7 Mar 2018 15:02:14 +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 w27F2EgY063639; Wed, 7 Mar 2018 15:02:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27F2ERU063637; Wed, 7 Mar 2018 15:02:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201803071502.w27F2ERU063637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 7 Mar 2018 15:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330605 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/doc/share/xml 11/release/doc/share/xml X-SVN-Commit-Revision: 330605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:02:15 -0000 Author: gjb Date: Wed Mar 7 15:02:13 2018 New Revision: 330605 URL: https://svnweb.freebsd.org/changeset/base/330605 Log: Document EN-18:01, EN-18:02, SA-18:01, SA-18:02. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml ============================================================================== --- stable/11/release/doc/share/xml/errata.xml Wed Mar 7 14:51:50 2018 (r330604) +++ stable/11/release/doc/share/xml/errata.xml Wed Mar 7 15:02:13 2018 (r330605) @@ -41,6 +41,21 @@ Timezone database information update + + + FreeBSD-EN-18:01.tzdata + 07 March 2018 + Timezone database information + update + + + + FreeBSD-EN-18:02.file + 07 March 2018 + Stack-based buffer overflow + Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Wed Mar 7 14:51:50 2018 (r330604) +++ stable/11/release/doc/share/xml/security.xml Wed Mar 7 15:02:13 2018 (r330605) @@ -60,6 +60,21 @@ 09 December 2017 Multiple vulnerabilities + + + FreeBSD-SA-18:01.ipsec + 07 March 2018 + Fix IPSEC validation and + use-after-free + + + + FreeBSD-SA-18:02.ntp + 07 March 2018 + Multiple vulnerabilities + From owner-svn-src-all@freebsd.org Wed Mar 7 15:02:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2F98F34571; Wed, 7 Mar 2018 15:02:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64FDA78FEC; Wed, 7 Mar 2018 15:02:14 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FDD722F0C; Wed, 7 Mar 2018 15:02:14 +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 w27F2EOg063632; Wed, 7 Mar 2018 15:02:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27F2E96063630; Wed, 7 Mar 2018 15:02:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201803071502.w27F2E96063630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 7 Mar 2018 15:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330605 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release/doc/share/xml 11/release/doc/share/xml X-SVN-Commit-Revision: 330605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:02:14 -0000 Author: gjb Date: Wed Mar 7 15:02:13 2018 New Revision: 330605 URL: https://svnweb.freebsd.org/changeset/base/330605 Log: Document EN-18:01, EN-18:02, SA-18:01, SA-18:02. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/errata.xml ============================================================================== --- stable/10/release/doc/share/xml/errata.xml Wed Mar 7 14:51:50 2018 (r330604) +++ stable/10/release/doc/share/xml/errata.xml Wed Mar 7 15:02:13 2018 (r330605) @@ -25,6 +25,21 @@ Timezone database information update + + + FreeBSD-EN-18:01.tzdata + 07 March 2018 + Timezone database information + update + + + + FreeBSD-EN-18:02.file + 07 March 2018 + Stack-based buffer overflow + Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Wed Mar 7 14:51:50 2018 (r330604) +++ stable/10/release/doc/share/xml/security.xml Wed Mar 7 15:02:13 2018 (r330605) @@ -68,6 +68,21 @@ 09 December 2017 Multiple vulnerabilities + + + FreeBSD-SA-18:01.ipsec + 07 March 2018 + Fix IPSEC validation and + use-after-free + + + + FreeBSD-SA-18:02.ntp + 07 March 2018 + Multiple vulnerabilities + From owner-svn-src-all@freebsd.org Wed Mar 7 15:03:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1232BF3477D; Wed, 7 Mar 2018 15:03:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCBFD792C2; Wed, 7 Mar 2018 15:03:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B783B22F2C; Wed, 7 Mar 2018 15:03:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27F3CNw063731; Wed, 7 Mar 2018 15:03:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27F3Cbs063724; Wed, 7 Mar 2018 15:03:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071503.w27F3Cbs063724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 15:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330606 - in head/sys/dev/mlx5: . mlx5_core mlx5_en mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core mlx5_en mlx5_ib X-SVN-Commit-Revision: 330606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:03:13 -0000 Author: hselasky Date: Wed Mar 7 15:03:11 2018 New Revision: 330606 URL: https://svnweb.freebsd.org/changeset/base/330606 Log: Implement missing query for current port rate in mlx5ib(4). - Factor out port speed definitions into new port.h header file, similarly as done in Linux upstream. - Correct two existing port speed definitions in mlx5en according to Linux upstream. MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/dev/mlx5/port.h (contents, props changed) Modified: head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_eq.c head/sys/dev/mlx5/mlx5_core/mlx5_port.c head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Wed Mar 7 15:02:13 2018 (r330605) +++ head/sys/dev/mlx5/driver.h Wed Mar 7 15:03:11 2018 (r330606) @@ -928,41 +928,7 @@ int mlx5_core_access_reg(struct mlx5_core_dev *dev, vo u16 reg_num, int arg, int write); void mlx5_toggle_port_link(struct mlx5_core_dev *dev); -int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps); -int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys, - int ptys_size, int proto_mask); -int mlx5_query_port_proto_cap(struct mlx5_core_dev *dev, - u32 *proto_cap, int proto_mask); -int mlx5_query_port_autoneg(struct mlx5_core_dev *dev, int proto_mask, - u8 *an_disable_cap, u8 *an_disable_status); -int mlx5_set_port_autoneg(struct mlx5_core_dev *dev, bool disable, - u32 eth_proto_admin, int proto_mask); -int mlx5_query_port_proto_admin(struct mlx5_core_dev *dev, - u32 *proto_admin, int proto_mask); -int mlx5_set_port_proto(struct mlx5_core_dev *dev, u32 proto_admin, - int proto_mask); -int mlx5_set_port_status(struct mlx5_core_dev *dev, - enum mlx5_port_status status); -int mlx5_query_port_status(struct mlx5_core_dev *dev, u8 *status); -int mlx5_query_port_admin_status(struct mlx5_core_dev *dev, - enum mlx5_port_status *status); -int mlx5_set_port_pause(struct mlx5_core_dev *dev, u32 port, - u32 rx_pause, u32 tx_pause); -int mlx5_query_port_pause(struct mlx5_core_dev *dev, u32 port, - u32 *rx_pause, u32 *tx_pause); -int mlx5_set_port_pfc(struct mlx5_core_dev *dev, u8 pfc_en_tx, u8 pfc_en_rx); -int mlx5_query_port_pfc(struct mlx5_core_dev *dev, u8 *pfc_en_tx, u8 *pfc_en_rx); -int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu); -int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu); -int mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, int *oper_mtu); - -unsigned int mlx5_query_module_status(struct mlx5_core_dev *dev, int module_num); -int mlx5_query_module_num(struct mlx5_core_dev *dev, int *module_num); -int mlx5_query_eeprom(struct mlx5_core_dev *dev, int i2c_addr, int page_num, - int device_addr, int size, int module_num, u32 *data, - int *size_read); - int mlx5_debug_eq_add(struct mlx5_core_dev *dev, struct mlx5_eq *eq); void mlx5_debug_eq_remove(struct mlx5_core_dev *dev, struct mlx5_eq *eq); int mlx5_core_eq_query(struct mlx5_core_dev *dev, struct mlx5_eq *eq, @@ -1067,8 +1033,4 @@ static inline int mlx5_core_is_pf(struct mlx5_core_dev return !(dev->priv.pci_dev_data & MLX5_PCI_DEV_IS_VF); } -#define MLX5_EEPROM_MAX_BYTES 32 -#define MLX5_EEPROM_IDENTIFIER_BYTE_MASK 0x000000ff -#define MLX5_EEPROM_REVISION_ID_BYTE_MASK 0x0000ff00 -#define MLX5_EEPROM_PAGE_3_VALID_BIT_MASK 0x00040000 #endif /* MLX5_DRIVER_H */ Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Mar 7 15:02:13 2018 (r330605) +++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Wed Mar 7 15:03:11 2018 (r330606) @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include "mlx5_core.h" Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Mar 7 15:02:13 2018 (r330605) +++ head/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Mar 7 15:03:11 2018 (r330606) @@ -26,7 +26,7 @@ */ #include -#include +#include #include "mlx5_core.h" int mlx5_core_access_reg(struct mlx5_core_dev *dev, void *data_in, @@ -110,13 +110,13 @@ int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 p EXPORT_SYMBOL_GPL(mlx5_set_port_caps); int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys, - int ptys_size, int proto_mask) + int ptys_size, int proto_mask, u8 local_port) { u32 in[MLX5_ST_SZ_DW(ptys_reg)]; int err; memset(in, 0, sizeof(in)); - MLX5_SET(ptys_reg, in, local_port, 1); + MLX5_SET(ptys_reg, in, local_port, local_port); MLX5_SET(ptys_reg, in, proto_mask, proto_mask); err = mlx5_core_access_reg(dev, in, sizeof(in), ptys, @@ -132,7 +132,7 @@ int mlx5_query_port_proto_cap(struct mlx5_core_dev *de u32 out[MLX5_ST_SZ_DW(ptys_reg)]; int err; - err = mlx5_query_port_ptys(dev, out, sizeof(out), proto_mask); + err = mlx5_query_port_ptys(dev, out, sizeof(out), proto_mask, 1); if (err) return err; @@ -151,7 +151,7 @@ int mlx5_query_port_autoneg(struct mlx5_core_dev *dev, u32 out[MLX5_ST_SZ_DW(ptys_reg)]; int err; - err = mlx5_query_port_ptys(dev, out, sizeof(out), proto_mask); + err = mlx5_query_port_ptys(dev, out, sizeof(out), proto_mask, 1); if (err) return err; @@ -198,7 +198,7 @@ int mlx5_query_port_proto_admin(struct mlx5_core_dev * u32 out[MLX5_ST_SZ_DW(ptys_reg)]; int err; - err = mlx5_query_port_ptys(dev, out, sizeof(out), proto_mask); + err = mlx5_query_port_ptys(dev, out, sizeof(out), proto_mask, 1); if (err) return err; @@ -210,6 +210,23 @@ int mlx5_query_port_proto_admin(struct mlx5_core_dev * return 0; } EXPORT_SYMBOL_GPL(mlx5_query_port_proto_admin); + +int mlx5_query_port_eth_proto_oper(struct mlx5_core_dev *dev, + u32 *proto_oper, u8 local_port) +{ + u32 out[MLX5_ST_SZ_DW(ptys_reg)]; + int err; + + err = mlx5_query_port_ptys(dev, out, sizeof(out), MLX5_PTYS_EN, + local_port); + if (err) + return err; + + *proto_oper = MLX5_GET(ptys_reg, out, eth_proto_oper); + + return 0; +} +EXPORT_SYMBOL(mlx5_query_port_eth_proto_oper); int mlx5_set_port_proto(struct mlx5_core_dev *dev, u32 proto_admin, int proto_mask) Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Wed Mar 7 15:02:13 2018 (r330605) +++ head/sys/dev/mlx5/mlx5_en/en.h Wed Mar 7 15:03:11 2018 (r330606) @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -747,37 +748,6 @@ struct mlx5e_eeprom { u32 *data; }; -enum mlx5e_link_mode { - MLX5E_1000BASE_CX_SGMII = 0, - MLX5E_1000BASE_KX = 1, - MLX5E_10GBASE_CX4 = 2, - MLX5E_10GBASE_KX4 = 3, - MLX5E_10GBASE_KR = 4, - MLX5E_20GBASE_KR2 = 5, - MLX5E_40GBASE_CR4 = 6, - MLX5E_40GBASE_KR4 = 7, - MLX5E_56GBASE_R4 = 8, - MLX5E_10GBASE_CR = 12, - MLX5E_10GBASE_SR = 13, - MLX5E_10GBASE_LR = 14, - MLX5E_40GBASE_SR4 = 15, - MLX5E_40GBASE_LR4 = 16, - MLX5E_100GBASE_CR4 = 20, - MLX5E_100GBASE_SR4 = 21, - MLX5E_100GBASE_KR4 = 22, - MLX5E_100GBASE_LR4 = 23, - MLX5E_100BASE_TX = 24, - MLX5E_100BASE_T = 25, - MLX5E_10GBASE_T = 26, - MLX5E_25GBASE_CR = 27, - MLX5E_25GBASE_KR = 28, - MLX5E_25GBASE_SR = 29, - MLX5E_50GBASE_CR2 = 30, - MLX5E_50GBASE_KR2 = 31, - MLX5E_LINK_MODES_NUMBER, -}; - -#define MLX5E_PROT_MASK(link_mode) (1 << (link_mode)) #define MLX5E_FLD_MAX(typ, fld) ((1ULL << __mlx5_bit_sz(typ, fld)) - 1ULL) int mlx5e_xmit(struct ifnet *, struct mbuf *); Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Mar 7 15:02:13 2018 (r330605) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Mar 7 15:03:11 2018 (r330606) @@ -90,8 +90,8 @@ static const struct { .subtype = IFM_10G_SR, .baudrate = IF_Gbps(10ULL), }, - [MLX5E_10GBASE_LR] = { - .subtype = IFM_10G_LR, + [MLX5E_10GBASE_ER] = { + .subtype = IFM_10G_ER, .baudrate = IF_Gbps(10ULL), }, [MLX5E_40GBASE_SR4] = { @@ -122,9 +122,9 @@ static const struct { .subtype = IFM_100_TX, .baudrate = IF_Mbps(100ULL), }, - [MLX5E_100BASE_T] = { - .subtype = IFM_100_T, - .baudrate = IF_Mbps(100ULL), + [MLX5E_1000BASE_T] = { + .subtype = IFM_1000_T, + .baudrate = IF_Mbps(1000ULL), }, [MLX5E_10GBASE_T] = { .subtype = IFM_10G_T, @@ -178,7 +178,7 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) return; } - error = mlx5_query_port_ptys(mdev, out, sizeof(out), MLX5_PTYS_EN); + error = mlx5_query_port_ptys(mdev, out, sizeof(out), MLX5_PTYS_EN, 1); if (error) { priv->media_active_last = IFM_ETHER; priv->ifp->if_baudrate = 1; Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Mar 7 15:02:13 2018 (r330605) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Mar 7 15:03:11 2018 (r330606) @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -164,6 +165,64 @@ static struct net_device *mlx5_ib_get_netdev(struct ib return ndev; } +static int translate_eth_proto_oper(u32 eth_proto_oper, u8 *active_speed, + u8 *active_width) +{ + switch (eth_proto_oper) { + case MLX5E_PROT_MASK(MLX5E_1000BASE_CX_SGMII): + case MLX5E_PROT_MASK(MLX5E_1000BASE_KX): + case MLX5E_PROT_MASK(MLX5E_100BASE_TX): + case MLX5E_PROT_MASK(MLX5E_1000BASE_T): + *active_width = IB_WIDTH_1X; + *active_speed = IB_SPEED_SDR; + break; + case MLX5E_PROT_MASK(MLX5E_10GBASE_T): + case MLX5E_PROT_MASK(MLX5E_10GBASE_CX4): + case MLX5E_PROT_MASK(MLX5E_10GBASE_KX4): + case MLX5E_PROT_MASK(MLX5E_10GBASE_KR): + case MLX5E_PROT_MASK(MLX5E_10GBASE_CR): + case MLX5E_PROT_MASK(MLX5E_10GBASE_SR): + case MLX5E_PROT_MASK(MLX5E_10GBASE_ER): + *active_width = IB_WIDTH_1X; + *active_speed = IB_SPEED_QDR; + break; + case MLX5E_PROT_MASK(MLX5E_25GBASE_CR): + case MLX5E_PROT_MASK(MLX5E_25GBASE_KR): + case MLX5E_PROT_MASK(MLX5E_25GBASE_SR): + *active_width = IB_WIDTH_1X; + *active_speed = IB_SPEED_EDR; + break; + case MLX5E_PROT_MASK(MLX5E_40GBASE_CR4): + case MLX5E_PROT_MASK(MLX5E_40GBASE_KR4): + case MLX5E_PROT_MASK(MLX5E_40GBASE_SR4): + case MLX5E_PROT_MASK(MLX5E_40GBASE_LR4): + *active_width = IB_WIDTH_4X; + *active_speed = IB_SPEED_QDR; + break; + case MLX5E_PROT_MASK(MLX5E_50GBASE_CR2): + case MLX5E_PROT_MASK(MLX5E_50GBASE_KR2): + case MLX5E_PROT_MASK(MLX5E_50GBASE_SR2): + *active_width = IB_WIDTH_1X; + *active_speed = IB_SPEED_HDR; + break; + case MLX5E_PROT_MASK(MLX5E_56GBASE_R4): + *active_width = IB_WIDTH_4X; + *active_speed = IB_SPEED_FDR; + break; + case MLX5E_PROT_MASK(MLX5E_100GBASE_CR4): + case MLX5E_PROT_MASK(MLX5E_100GBASE_SR4): + case MLX5E_PROT_MASK(MLX5E_100GBASE_KR4): + case MLX5E_PROT_MASK(MLX5E_100GBASE_LR4): + *active_width = IB_WIDTH_4X; + *active_speed = IB_SPEED_EDR; + break; + default: + return -EINVAL; + } + + return 0; +} + static int mlx5_query_port_roce(struct ib_device *device, u8 port_num, struct ib_port_attr *props) { @@ -171,9 +230,21 @@ static int mlx5_query_port_roce(struct ib_device *devi struct net_device *ndev; enum ib_mtu ndev_ib_mtu; u16 qkey_viol_cntr; + u32 eth_prot_oper; + int err; memset(props, 0, sizeof(*props)); + /* Possible bad flows are checked before filling out props so in case + * of an error it will still be zeroed out. + */ + err = mlx5_query_port_eth_proto_oper(dev->mdev, ð_prot_oper, port_num); + if (err) + return err; + + translate_eth_proto_oper(eth_prot_oper, &props->active_speed, + &props->active_width); + props->port_cap_flags |= IB_PORT_CM_SUP; props->port_cap_flags |= IB_PORT_IP_BASED_GIDS; @@ -202,10 +273,6 @@ static int mlx5_query_port_roce(struct ib_device *devi dev_put(ndev); props->active_mtu = min(props->max_mtu, ndev_ib_mtu); - - props->active_width = IB_WIDTH_4X; /* TODO */ - props->active_speed = IB_SPEED_QDR; /* TODO */ - return 0; } Added: head/sys/dev/mlx5/port.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx5/port.h Wed Mar 7 15:03:11 2018 (r330606) @@ -0,0 +1,147 @@ +/*- + * Copyright (c) 2016, Mellanox Technologies, Ltd. 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 AUTHOR AND CONTRIBUTORS `AS IS' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __MLX5_PORT_H__ +#define __MLX5_PORT_H__ + +#include + +enum mlx5_beacon_duration { + MLX5_BEACON_DURATION_OFF = 0x0, + MLX5_BEACON_DURATION_INF = 0xffff, +}; + +enum mlx5_module_id { + MLX5_MODULE_ID_SFP = 0x3, + MLX5_MODULE_ID_QSFP = 0xC, + MLX5_MODULE_ID_QSFP_PLUS = 0xD, + MLX5_MODULE_ID_QSFP28 = 0x11, +}; + +enum mlx5_an_status { + MLX5_AN_UNAVAILABLE = 0, + MLX5_AN_COMPLETE = 1, + MLX5_AN_FAILED = 2, + MLX5_AN_LINK_UP = 3, + MLX5_AN_LINK_DOWN = 4, +}; + +#define MLX5_EEPROM_MAX_BYTES 32 +#define MLX5_EEPROM_IDENTIFIER_BYTE_MASK 0x000000ff +#define MLX5_EEPROM_REVISION_ID_BYTE_MASK 0x0000ff00 +#define MLX5_EEPROM_PAGE_3_VALID_BIT_MASK 0x00040000 +#define MLX5_I2C_ADDR_LOW 0x50 +#define MLX5_I2C_ADDR_HIGH 0x51 +#define MLX5_EEPROM_PAGE_LENGTH 256 + +enum mlx5e_link_mode { + MLX5E_1000BASE_CX_SGMII = 0, + MLX5E_1000BASE_KX = 1, + MLX5E_10GBASE_CX4 = 2, + MLX5E_10GBASE_KX4 = 3, + MLX5E_10GBASE_KR = 4, + MLX5E_20GBASE_KR2 = 5, + MLX5E_40GBASE_CR4 = 6, + MLX5E_40GBASE_KR4 = 7, + MLX5E_56GBASE_R4 = 8, + MLX5E_10GBASE_CR = 12, + MLX5E_10GBASE_SR = 13, + MLX5E_10GBASE_ER = 14, + MLX5E_40GBASE_SR4 = 15, + MLX5E_40GBASE_LR4 = 16, + MLX5E_50GBASE_SR2 = 18, + MLX5E_100GBASE_CR4 = 20, + MLX5E_100GBASE_SR4 = 21, + MLX5E_100GBASE_KR4 = 22, + MLX5E_100GBASE_LR4 = 23, + MLX5E_100BASE_TX = 24, + MLX5E_1000BASE_T = 25, + MLX5E_10GBASE_T = 26, + MLX5E_25GBASE_CR = 27, + MLX5E_25GBASE_KR = 28, + MLX5E_25GBASE_SR = 29, + MLX5E_50GBASE_CR2 = 30, + MLX5E_50GBASE_KR2 = 31, + MLX5E_LINK_MODES_NUMBER, +}; + +enum mlx5e_connector_type { + MLX5E_PORT_UNKNOWN = 0, + MLX5E_PORT_NONE = 1, + MLX5E_PORT_TP = 2, + MLX5E_PORT_AUI = 3, + MLX5E_PORT_BNC = 4, + MLX5E_PORT_MII = 5, + MLX5E_PORT_FIBRE = 6, + MLX5E_PORT_DA = 7, + MLX5E_PORT_OTHER = 8, + MLX5E_CONNECTOR_TYPE_NUMBER, +}; + +#define MLX5E_PROT_MASK(link_mode) (1 << (link_mode)) + +#define PORT_MODULE_EVENT_MODULE_STATUS_MASK 0xF +#define PORT_MODULE_EVENT_ERROR_TYPE_MASK 0xF + +int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps); +int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys, + int ptys_size, int proto_mask, u8 local_port); +int mlx5_query_port_proto_cap(struct mlx5_core_dev *dev, + u32 *proto_cap, int proto_mask); +int mlx5_query_port_autoneg(struct mlx5_core_dev *dev, int proto_mask, + u8 *an_disable_cap, u8 *an_disable_status); +int mlx5_set_port_autoneg(struct mlx5_core_dev *dev, bool disable, + u32 eth_proto_admin, int proto_mask); +int mlx5_query_port_proto_admin(struct mlx5_core_dev *dev, + u32 *proto_admin, int proto_mask); +int mlx5_query_port_eth_proto_oper(struct mlx5_core_dev *dev, + u32 *proto_oper, u8 local_port); +int mlx5_set_port_proto(struct mlx5_core_dev *dev, u32 proto_admin, + int proto_mask); +int mlx5_set_port_status(struct mlx5_core_dev *dev, + enum mlx5_port_status status); +int mlx5_query_port_status(struct mlx5_core_dev *dev, u8 *status); +int mlx5_query_port_admin_status(struct mlx5_core_dev *dev, + enum mlx5_port_status *status); +int mlx5_set_port_pause(struct mlx5_core_dev *dev, u32 port, + u32 rx_pause, u32 tx_pause); +int mlx5_query_port_pause(struct mlx5_core_dev *dev, u32 port, + u32 *rx_pause, u32 *tx_pause); +int mlx5_set_port_pfc(struct mlx5_core_dev *dev, u8 pfc_en_tx, u8 pfc_en_rx); +int mlx5_query_port_pfc(struct mlx5_core_dev *dev, u8 *pfc_en_tx, u8 *pfc_en_rx); + +int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu); +int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu); +int mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, int *oper_mtu); + +unsigned int mlx5_query_module_status(struct mlx5_core_dev *dev, int module_num); +int mlx5_query_module_num(struct mlx5_core_dev *dev, int *module_num); +int mlx5_query_eeprom(struct mlx5_core_dev *dev, int i2c_addr, int page_num, + int device_addr, int size, int module_num, u32 *data, + int *size_read); + +#endif /* __MLX5_PORT_H__ */ From owner-svn-src-all@freebsd.org Wed Mar 7 15:17:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CD8DF36012; Wed, 7 Mar 2018 15:17:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4BAC7A2A5; Wed, 7 Mar 2018 15:17:37 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF9CD230D2; Wed, 7 Mar 2018 15:17:37 +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 w27FHb2h069595; Wed, 7 Mar 2018 15:17:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27FHbPw069590; Wed, 7 Mar 2018 15:17:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071517.w27FHbPw069590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 15:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330607 - in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 330607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:17:38 -0000 Author: hselasky Date: Wed Mar 7 15:17:36 2018 New Revision: 330607 URL: https://svnweb.freebsd.org/changeset/base/330607 Log: Implement rate limit per traffic class in mlx5core. Add support for rate limiting traffic class via sysctl. Submitted by: Slava Shwartsman MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c head/sys/dev/mlx5/mlx5_ifc.h head/sys/dev/mlx5/port.h Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Mar 7 15:03:11 2018 (r330606) +++ head/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Mar 7 15:17:36 2018 (r330607) @@ -860,6 +860,89 @@ int mlx5_query_port_cong_params(struct mlx5_core_dev * out, out_size); } +static int mlx5_query_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *out, + int outlen) +{ + u32 in[MLX5_ST_SZ_DW(qtct_reg)]; + + if (!MLX5_CAP_GEN(mdev, ets)) + return -ENOTSUPP; + + memset(in, 0, sizeof(in)); + return mlx5_core_access_reg(mdev, in, sizeof(in), out, outlen, + MLX5_REG_QETCR, 0, 0); +} + +int mlx5_max_tc(struct mlx5_core_dev *mdev) +{ + u8 num_tc = MLX5_CAP_GEN(mdev, max_tc) ? : 8; + + return num_tc - 1; +} +EXPORT_SYMBOL_GPL(mlx5_max_tc); + +static int mlx5_set_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *in, + int inlen) +{ + u32 out[MLX5_ST_SZ_DW(qtct_reg)]; + + if (!MLX5_CAP_GEN(mdev, ets)) + return -ENOTSUPP; + + return mlx5_core_access_reg(mdev, in, inlen, out, sizeof(out), + MLX5_REG_QETCR, 0, 1); +} + +int mlx5_query_port_tc_rate_limit(struct mlx5_core_dev *mdev, + u8 *max_bw_value, + u8 *max_bw_units) +{ + u32 out[MLX5_ST_SZ_DW(qetc_reg)]; + void *ets_tcn_conf; + int err; + int i; + + err = mlx5_query_port_qetcr_reg(mdev, out, sizeof(out)); + if (err) + return err; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + ets_tcn_conf = MLX5_ADDR_OF(qetc_reg, out, tc_configuration[i]); + + max_bw_value[i] = MLX5_GET(ets_tcn_config_reg, ets_tcn_conf, + max_bw_value); + max_bw_units[i] = MLX5_GET(ets_tcn_config_reg, ets_tcn_conf, + max_bw_units); + } + + return 0; +} +EXPORT_SYMBOL_GPL(mlx5_query_port_tc_rate_limit); + +int mlx5_modify_port_tc_rate_limit(struct mlx5_core_dev *mdev, + const u8 *max_bw_value, + const u8 *max_bw_units) +{ + u32 in[MLX5_ST_SZ_DW(qetc_reg)] = {}; + void *ets_tcn_conf; + int i; + + MLX5_SET(qetc_reg, in, port_number, 1); + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + ets_tcn_conf = MLX5_ADDR_OF(qetc_reg, in, tc_configuration[i]); + + MLX5_SET(ets_tcn_config_reg, ets_tcn_conf, r, 1); + MLX5_SET(ets_tcn_config_reg, ets_tcn_conf, max_bw_units, + max_bw_units[i]); + MLX5_SET(ets_tcn_config_reg, ets_tcn_conf, max_bw_value, + max_bw_value[i]); + } + + return mlx5_set_port_qetcr_reg(mdev, in, sizeof(in)); +} +EXPORT_SYMBOL_GPL(mlx5_modify_port_tc_rate_limit); + int mlx5_modify_port_cong_params(struct mlx5_core_dev *mdev, void *in, int in_size) { Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Wed Mar 7 15:03:11 2018 (r330606) +++ head/sys/dev/mlx5/mlx5_en/en.h Wed Mar 7 15:17:36 2018 (r330607) @@ -70,6 +70,8 @@ #include #include +#define IEEE_8021QAZ_MAX_TCS 8 + #define MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE 0x7 #define MLX5E_PARAMS_DEFAULT_LOG_SQ_SIZE 0xa #define MLX5E_PARAMS_MAXIMUM_LOG_SQ_SIZE 0xe @@ -114,6 +116,9 @@ (MLX5E_MAX_TX_HEADER - sizeof(struct mlx5e_tx_wqe) + \ sizeof(((struct mlx5e_tx_wqe *)0)->eth.inline_hdr_start)) /* bytes */ +#define MLX5E_100MB (100000) +#define MLX5E_1GB (1000000) + MALLOC_DECLARE(M_MLX5EN); struct mlx5_core_dev; @@ -417,11 +422,13 @@ struct mlx5e_params { m(+1, u64 mc_local_lb, "mc_local_lb", "0: Local multicast loopback enabled 1: Disabled") \ m(+1, u64 uc_local_lb, "uc_local_lb", "0: Local unicast loopback enabled 1: Disabled") + #define MLX5E_PARAMS_NUM (0 MLX5E_PARAMS(MLX5E_STATS_COUNT)) struct mlx5e_params_ethtool { u64 arg [0]; MLX5E_PARAMS(MLX5E_STATS_VAR) + u64 max_bw_value[IEEE_8021QAZ_MAX_TCS]; }; /* EEPROM Standards for plug in modules */ @@ -629,6 +636,12 @@ enum { MLX5E_STATE_OPENED, }; +enum { + MLX5_BW_NO_LIMIT = 0, + MLX5_100_MBPS_UNIT = 3, + MLX5_GBPS_UNIT = 4, +}; + struct mlx5e_vlan_db { unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)]; struct mlx5_flow_rule *active_vlans_ft_rule[VLAN_N_VID]; @@ -747,6 +760,19 @@ struct mlx5e_eeprom { int page_valid; u32 *data; }; + +/* + * This structure contains rate limit extension to the IEEE 802.1Qaz ETS + * managed object. + * Values are 64 bits long and specified in Kbps to enable usage over both + * slow and very fast networks. + * + * @tc_maxrate: maximal tc tx bandwidth indexed by traffic class + */ +struct ieee_maxrate { + __u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS]; +}; + #define MLX5E_FLD_MAX(typ, fld) ((1ULL << __mlx5_bit_sz(typ, fld)) - 1ULL) Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Mar 7 15:03:11 2018 (r330606) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Mar 7 15:17:36 2018 (r330607) @@ -84,6 +84,97 @@ mlx5e_ethtool_sync_tx_completion_fact(struct mlx5e_pri priv->params_ethtool.tx_completion_fact = max; } +static int +mlx5e_getmaxrate(struct mlx5e_priv *priv) +{ + struct mlx5_core_dev *mdev = priv->mdev; + u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS]; + u8 max_bw_value[IEEE_8021QAZ_MAX_TCS]; + int err; + int i; + + PRIV_LOCK(priv); + err = -mlx5_query_port_tc_rate_limit(mdev, max_bw_value, max_bw_unit); + if (err) + goto done; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + switch (max_bw_unit[i]) { + case MLX5_100_MBPS_UNIT: + priv->params_ethtool.max_bw_value[i] = max_bw_value[i] * MLX5E_100MB; + break; + case MLX5_GBPS_UNIT: + priv->params_ethtool.max_bw_value[i] = max_bw_value[i] * MLX5E_1GB; + break; + case MLX5_BW_NO_LIMIT: + priv->params_ethtool.max_bw_value[i] = 0; + break; + default: + priv->params_ethtool.max_bw_value[i] = -1; + WARN_ONCE(true, "non-supported BW unit"); + break; + } + } +done: + PRIV_UNLOCK(priv); + return (err); +} + +static int +mlx5e_tc_maxrate_handler(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv = arg1; + int prio_index = arg2; + struct mlx5_core_dev *mdev = priv->mdev; + u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS]; + u8 max_bw_value[IEEE_8021QAZ_MAX_TCS]; + int i, err; + u64 bw_val; + u64 result = priv->params_ethtool.max_bw_value[prio_index]; + const u64 upper_limit_mbps = 255 * MLX5E_100MB; + const u64 upper_limit_gbps = 255 * MLX5E_1GB; + + PRIV_LOCK(priv); + err = sysctl_handle_64(oidp, &result, 0, req); + if (err || !req->newptr || + result == priv->params_ethtool.max_bw_value[prio_index]) + goto done; + + if (result % MLX5E_100MB) { + err = ERANGE; + goto done; + } + + memset(max_bw_value, 0, sizeof(max_bw_value)); + memset(max_bw_unit, 0, sizeof(max_bw_unit)); + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + bw_val = (i == prio_index) ? result : priv->params_ethtool.max_bw_value[i]; + + if (!bw_val) { + max_bw_unit[i] = MLX5_BW_NO_LIMIT; + } else if (bw_val > upper_limit_gbps) { + result = 0; + max_bw_unit[i] = MLX5_BW_NO_LIMIT; + } else if (bw_val <= upper_limit_mbps) { + max_bw_value[i] = howmany(bw_val, MLX5E_100MB); + max_bw_unit[i] = MLX5_100_MBPS_UNIT; + } else { + max_bw_value[i] = howmany(bw_val, MLX5E_1GB); + max_bw_unit[i] = MLX5_GBPS_UNIT; + } + } + + err = -mlx5_modify_port_tc_rate_limit(mdev, max_bw_value, max_bw_unit); + if (err) + goto done; + + priv->params_ethtool.max_bw_value[prio_index] = result; +done: + PRIV_UNLOCK(priv); + return (err); +} + #define MLX5_PARAM_OFFSET(n) \ __offsetof(struct mlx5e_priv, params_ethtool.n) @@ -734,9 +825,11 @@ mlx5e_create_diagnostics(struct mlx5e_priv *priv) void mlx5e_create_ethtool(struct mlx5e_priv *priv) { - struct sysctl_oid *node; + struct mlx5_core_dev *mdev = priv->mdev; + struct sysctl_oid *node, *qos_node; const char *pnameunit; unsigned x; + int i; /* set some defaults */ priv->params_ethtool.tx_queue_size_max = 1 << MLX5E_PARAMS_MAXIMUM_LOG_SQ_SIZE; @@ -830,4 +923,25 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) /* Diagnostics support */ mlx5e_create_diagnostics(priv); + + /* create qos node */ + qos_node = SYSCTL_ADD_NODE(&priv->sysctl_ctx, + SYSCTL_CHILDREN(node), OID_AUTO, + "qos", CTLFLAG_RW, NULL, "Quality Of Service configuration"); + if (node == NULL) + return; + + /* Prioriry rate limit support */ + if (mlx5e_getmaxrate(priv)) + return; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + char name[32]; + snprintf(name, sizeof(name), "tc_%d_max_rate", i); + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), + OID_AUTO, name, CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, + priv, i, mlx5e_tc_maxrate_handler, "QU", + "Max rate for priority, specified in kilobits, where kilo=1000, \ + max_rate must be divisible by 100000"); + } } Modified: head/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ifc.h Wed Mar 7 15:03:11 2018 (r330606) +++ head/sys/dev/mlx5/mlx5_ifc.h Wed Mar 7 15:17:36 2018 (r330607) @@ -9096,6 +9096,15 @@ struct mlx5_ifc_ets_global_config_reg_bits { u8 max_bw_value[0x8]; }; +struct mlx5_ifc_qetc_reg_bits { + u8 reserved_at_0[0x8]; + u8 port_number[0x8]; + u8 reserved_at_10[0x30]; + + struct mlx5_ifc_ets_tcn_config_reg_bits tc_configuration[0x8]; + struct mlx5_ifc_ets_global_config_reg_bits global_configuration; +}; + struct mlx5_ifc_nodnic_mac_filters_bits { struct mlx5_ifc_mac_address_layout_bits mac_filter0; Modified: head/sys/dev/mlx5/port.h ============================================================================== --- head/sys/dev/mlx5/port.h Wed Mar 7 15:03:11 2018 (r330606) +++ head/sys/dev/mlx5/port.h Wed Mar 7 15:17:36 2018 (r330607) @@ -144,4 +144,11 @@ int mlx5_query_eeprom(struct mlx5_core_dev *dev, int i int device_addr, int size, int module_num, u32 *data, int *size_read); +int mlx5_max_tc(struct mlx5_core_dev *mdev); +int mlx5_query_port_tc_rate_limit(struct mlx5_core_dev *mdev, + u8 *max_bw_value, + u8 *max_bw_units); +int mlx5_modify_port_tc_rate_limit(struct mlx5_core_dev *mdev, + const u8 *max_bw_value, + const u8 *max_bw_units); #endif /* __MLX5_PORT_H__ */ From owner-svn-src-all@freebsd.org Wed Mar 7 15:23:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5A1BF36B5C; Wed, 7 Mar 2018 15:23:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BB5B7AAD1; Wed, 7 Mar 2018 15:23:08 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DB9423290; Wed, 7 Mar 2018 15:23:08 +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 w27FN8u7074329; Wed, 7 Mar 2018 15:23:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27FN7ii074325; Wed, 7 Mar 2018 15:23:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803071523.w27FN7ii074325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 7 Mar 2018 15:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330608 - in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 330608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:23:09 -0000 Author: hselasky Date: Wed Mar 7 15:23:07 2018 New Revision: 330608 URL: https://svnweb.freebsd.org/changeset/base/330608 Log: Implement priority to traffic class mapping in mlx5core. Add support for mapping priority to traffic class via sysctl Submitted by: Slava Shwartsman MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c head/sys/dev/mlx5/port.h Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Mar 7 15:17:36 2018 (r330607) +++ head/sys/dev/mlx5/mlx5_core/mlx5_port.c Wed Mar 7 15:23:07 2018 (r330608) @@ -943,6 +943,48 @@ int mlx5_modify_port_tc_rate_limit(struct mlx5_core_de } EXPORT_SYMBOL_GPL(mlx5_modify_port_tc_rate_limit); +int mlx5_query_port_prio_tc(struct mlx5_core_dev *mdev, + u8 prio, u8 *tc) +{ + u32 in[MLX5_ST_SZ_DW(qtct_reg)]; + u32 out[MLX5_ST_SZ_DW(qtct_reg)]; + int err; + + memset(in, 0, sizeof(in)); + memset(out, 0, sizeof(out)); + + MLX5_SET(qtct_reg, in, port_number, 1); + MLX5_SET(qtct_reg, in, prio, prio); + + err = mlx5_core_access_reg(mdev, in, sizeof(in), out, + sizeof(out), MLX5_REG_QTCT, 0, 0); + if (!err) + *tc = MLX5_GET(qtct_reg, out, tclass); + + return err; +} +EXPORT_SYMBOL_GPL(mlx5_query_port_prio_tc); + +int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, int prio_index, + const u8 prio_tc) +{ + u32 in[MLX5_ST_SZ_DW(qtct_reg)] = {}; + u32 out[MLX5_ST_SZ_DW(qtct_reg)]; + int err; + + if (prio_tc > mlx5_max_tc(mdev)) + return -EINVAL; + + MLX5_SET(qtct_reg, in, prio, prio_index); + MLX5_SET(qtct_reg, in, tclass, prio_tc); + + err = mlx5_core_access_reg(mdev, in, sizeof(in), out, + sizeof(out), MLX5_REG_QTCT, 0, 1); + + return (err); +} +EXPORT_SYMBOL_GPL(mlx5_set_port_prio_tc); + int mlx5_modify_port_cong_params(struct mlx5_core_dev *mdev, void *in, int in_size) { Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Wed Mar 7 15:17:36 2018 (r330607) +++ head/sys/dev/mlx5/mlx5_en/en.h Wed Mar 7 15:23:07 2018 (r330608) @@ -429,6 +429,7 @@ struct mlx5e_params_ethtool { u64 arg [0]; MLX5E_PARAMS(MLX5E_STATS_VAR) u64 max_bw_value[IEEE_8021QAZ_MAX_TCS]; + u8 prio_tc[IEEE_8021QAZ_MAX_TCS]; }; /* EEPROM Standards for plug in modules */ Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Mar 7 15:17:36 2018 (r330607) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed Mar 7 15:23:07 2018 (r330608) @@ -175,6 +175,60 @@ done: return (err); } +static int +mlx5e_get_prio_tc(struct mlx5e_priv *priv) +{ + struct mlx5_core_dev *mdev = priv->mdev; + int err = 0; + int i; + + PRIV_LOCK(priv); + if (!MLX5_CAP_GEN(priv->mdev, ets)) { + PRIV_UNLOCK(priv); + return (EOPNOTSUPP); + } + + for (i = 0; i <= mlx5_max_tc(priv->mdev); i++) { + err = -mlx5_query_port_prio_tc(mdev, i, &(priv->params_ethtool.prio_tc[i])); + if (err) + break; + } + + PRIV_UNLOCK(priv); + return (err); +} + +static int +mlx5e_prio_to_tc_handler(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv = arg1; + int prio_index = arg2; + struct mlx5_core_dev *mdev = priv->mdev; + int err; + uint8_t result = priv->params_ethtool.prio_tc[prio_index]; + + PRIV_LOCK(priv); + err = sysctl_handle_8(oidp, &result, 0, req); + if (err || !req->newptr || + result == priv->params_ethtool.prio_tc[prio_index]) + goto done; + + if (result > mlx5_max_tc(mdev)) { + err = ERANGE; + goto done; + } + + err = -mlx5_set_port_prio_tc(mdev, prio_index, result); + if (err) + goto done; + + priv->params_ethtool.prio_tc[prio_index] = result; + +done: + PRIV_UNLOCK(priv); + return (err); +} + #define MLX5_PARAM_OFFSET(n) \ __offsetof(struct mlx5e_priv, params_ethtool.n) @@ -943,5 +997,17 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) priv, i, mlx5e_tc_maxrate_handler, "QU", "Max rate for priority, specified in kilobits, where kilo=1000, \ max_rate must be divisible by 100000"); + } + + if (mlx5e_get_prio_tc(priv)) + return; + + for (i = 0; i <= mlx5_max_tc(mdev); i++) { + char name[32]; + snprintf(name, sizeof(name), "prio_%d_to_tc", i); + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(qos_node), + OID_AUTO, name, CTLTYPE_U8 | CTLFLAG_RW | CTLFLAG_MPSAFE, + priv, i, mlx5e_prio_to_tc_handler, "CU", + "Set priority to traffic class"); } } Modified: head/sys/dev/mlx5/port.h ============================================================================== --- head/sys/dev/mlx5/port.h Wed Mar 7 15:17:36 2018 (r330607) +++ head/sys/dev/mlx5/port.h Wed Mar 7 15:23:07 2018 (r330608) @@ -151,4 +151,8 @@ int mlx5_query_port_tc_rate_limit(struct mlx5_core_dev int mlx5_modify_port_tc_rate_limit(struct mlx5_core_dev *mdev, const u8 *max_bw_value, const u8 *max_bw_units); +int mlx5_query_port_prio_tc(struct mlx5_core_dev *mdev, + u8 prio, u8 *tc); +int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, int prio_index, + const u8 prio_tc); #endif /* __MLX5_PORT_H__ */ From owner-svn-src-all@freebsd.org Wed Mar 7 15:29:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AD4EF372FC for ; Wed, 7 Mar 2018 15:29:27 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yb0-x236.google.com (mail-yb0-x236.google.com [IPv6:2607:f8b0:4002:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 955AD7AF83 for ; Wed, 7 Mar 2018 15:29:26 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yb0-x236.google.com with SMTP id p186-v6so853839ybg.7 for ; Wed, 07 Mar 2018 07:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fVmYmQopW/0esbsXUtVDHF6aiS0YkGthp3JQR0Vcm6E=; b=LIwOU//EoKmsrzlJNf8QTF/MGSiq+YgUYXOdtPtmMC5g382wPADdGeOw8PVq1fTqRD A7EMC/c5RlEjweOWWtor925sI6lDHU0rzdD+Y5dezQ7P3t/zPMdt26fXQSt4uU0WZhcQ xcTjKQiz355Kb3xL3CG8zyCy72pXIRVVcZNH9VixW0sm4fca/tUY+1UkQlyyI44AXCI8 7e06VRwkhYDJ2Bn9LSEtDx/Yhgj+Rk4DBQaBR6dJ4bjDnCOG4l/9Pozeap6mH/W0MaWY vwd7wBUbUat0vAvml6Wt7s8hQBcBTHGfOmbuDp5wr1dycIbDCty29EkLjB7NfnwRXfN2 4zqQ== 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=fVmYmQopW/0esbsXUtVDHF6aiS0YkGthp3JQR0Vcm6E=; b=DZopJQdUFAF0TXn+iDNNz5BW/nBxJ0VIwvkmngr8khe1KVTvw/tajuPQPsy5cyeVVV GYOnwMV2wMQw1A/6lIzsdPCesre8q32/5lquiT9vucfp03nX2jExYdBKltiXXZMN2yUd QFKcBfRPyfR50wbnX3F7DwnuyQrnX4aKkAlSoosVU5cAoEP1cek9KixT7zwSif7nviEw 639W3evd6GIcWkwG+AJ26KyPlnkZWWFIhOB9ohGNdojulEF4Oaq20WVFn22zbIQsKmzi 22PMTVNodxSUJMjWKv+Ln4K7ZaAAZ3OO7XiXi1NUcJz/Kmpz7QVWKi6NBfMxKsnqeCI5 nFCg== X-Gm-Message-State: AElRT7F8P73tthVhJtG7ORcD8RygkqdZ/T3uysEMOV8NififENWqNb1U GOnvT32Ucx86qm/VBjKCpUC8qjlBOhKDcdkTHdrs9Q== X-Google-Smtp-Source: AG47ELvVXXzjfnSgYrov7xR4kWyneYWOxXG4i9Oj+UC76EldqfN7DEnmPiXqMvgErELxeag8SE2X+Y4R+7qPdpzcSWU= X-Received: by 2002:a25:880f:: with SMTP id c15-v6mr13864035ybl.348.1520436565910; Wed, 07 Mar 2018 07:29:25 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:5f41:0:0:0:0:0 with HTTP; Wed, 7 Mar 2018 07:29:25 -0800 (PST) In-Reply-To: <201803071444.w27EiWBV053244@repo.freebsd.org> References: <201803071444.w27EiWBV053244@repo.freebsd.org> From: Oliver Pinter Date: Wed, 7 Mar 2018 16:29:25 +0100 Message-ID: Subject: Re: svn commit: r330601 - head/sys/i386/ibcs2 To: Eitan Adler Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:29:27 -0000 Wrong commit message. IBCS isn't cloudabi. On Wednesday, March 7, 2018, Eitan Adler wrote: > Author: eadler > Date: Wed Mar 7 14:44:32 2018 > New Revision: 330601 > URL: https://svnweb.freebsd.org/changeset/base/330601 > > Log: > sys: Fix a few potential infoleaks in cloudabi > > While there is no immediate leak, if the structure changes underneath > us, there might be in the future. > > Submitted by: Domagoj Stolfa > MFC After: 1 month > Sponsored by: DARPA/AFRL > > Modified: > head/sys/i386/ibcs2/ibcs2_ipc.c > > Modified: head/sys/i386/ibcs2/ibcs2_ipc.c > ============================================================ > ================== > --- head/sys/i386/ibcs2/ibcs2_ipc.c Wed Mar 7 14:41:29 2018 > (r330600) > +++ head/sys/i386/ibcs2/ibcs2_ipc.c Wed Mar 7 14:44:32 2018 > (r330601) > @@ -135,6 +135,8 @@ ibcs2_msgctl(struct thread *td, void *v) > struct msqid_ds bs; > int error; > > + memset(&is, 0, sizeof(is)); > + > switch (uap->cmd) { > case IBCS2_IPC_STAT: > error = kern_msgctl(td, uap->msqid, IPC_STAT, &bs); > @@ -317,6 +319,8 @@ ibcs2_semctl(struct thread *td, void *v) > union semun semun; > register_t rval; > int error; > + > + memset(&is, 0, sizeof(is)); > > switch(uap->cmd) { > case IBCS2_IPC_STAT: > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Wed Mar 7 15:38:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D197CF37F2C for ; Wed, 7 Mar 2018 15:38:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6228D7B6E3 for ; Wed, 7 Mar 2018 15:38:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x233.google.com with SMTP id n136so1259276itg.5 for ; Wed, 07 Mar 2018 07:38:02 -0800 (PST) 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=k/QE485AcSSYnJ0GzUzSKXYy8E+VdmtLuXrwbxXEPhs=; b=Jfr5texUrPBh6yf2+2BTz+kaLD95SMLlFfv3Sb+0lhZri61OVO0ivl/S5q/o1wLoQG /OaDHzR7jFf4fzpOBbCJ6eUE5afcNKjuv9bFSnpuVQ3vYrmVTCAgagK0f5DpyNF9nLeQ fx97TdUwjoZO4CyrM7NfY+6b8KUPqDJGd7zE8EIsvfe/bh7DKQGv2N7euINq0HKi8V+f pjoBycddV9rvy8g2CI7MTFcqtdri3WN2zZ4LybCgKOsDqZdCGIufX0WOpc/eFj6wU9Qu +OiR2pksbRbZQ8B8mGFI6zj6kCbclBuWHgOonDndCa5wFz71IagsG9Esbg9EfC6rIfad QJDw== 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=k/QE485AcSSYnJ0GzUzSKXYy8E+VdmtLuXrwbxXEPhs=; b=CaB7Lp4flnLEqLYr35WrrbHaPU7jbeySinUhq79ts8O0pud33SB4C5LXflYd0CcW7M nh9tmrLKdshQDFlUfEtQHi9IQ80T4Ew5ekCaa9sz4nGWHtD2cDvgCDPhp+AvKmZ2cjV6 WBtxqz2Mdl5a5BT/lH/I0f6hLnqjFlhM56c5cbXtp1JBBj4Fi5MSBVz18QO//BixWWpa NRiiZAUCpWZQMaem959fwOgZ7+BxzxWZNLRyHbx6cI4Y10t4p9NnibLgpeqB6H5fXqM1 bOG0xj/m+hT+LH4F5wYf7D5caAOQUzdfprQoXHvO5/JO23pQFym0nl5pnQgRslhz1yJv 7psQ== X-Gm-Message-State: AElRT7FDuqwkb1plb/nO3RUBzThD4o163kiFoRYY2U2JgK+CxPcLHebi 0uDwcuWaP7CLFYztRNQVRa0UG2zT417snVAtSxkySQ== X-Google-Smtp-Source: AG47ELtxkvnhPcrZdwdCSDJU0eLDKLA2t3ffFTjoL85ajy1kgELHuVtAu8k6G+rKBhd8TKZ/aw3mr5cntzMTxoB90NA= X-Received: by 10.36.16.147 with SMTP id 141mr23909825ity.73.1520437081601; Wed, 07 Mar 2018 07:38:01 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Wed, 7 Mar 2018 07:38:00 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201803071444.w27EiWBV053244@repo.freebsd.org> From: Warner Losh Date: Wed, 7 Mar 2018 08:38:00 -0700 X-Google-Sender-Auth: PkYEb97KJ8My_-ug5KNeQpzLMuQ Message-ID: Subject: Re: svn commit: r330601 - head/sys/i386/ibcs2 To: Oliver Pinter Cc: Eitan Adler , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:38:03 -0000 The message is right if you s/cloudabi/ibcs/ though. Warner On Wed, Mar 7, 2018 at 8:29 AM, Oliver Pinter wrote: > Wrong commit message. IBCS isn't cloudabi. > > On Wednesday, March 7, 2018, Eitan Adler wrote: > >> Author: eadler >> Date: Wed Mar 7 14:44:32 2018 >> New Revision: 330601 >> URL: https://svnweb.freebsd.org/changeset/base/330601 >> >> Log: >> sys: Fix a few potential infoleaks in cloudabi >> >> While there is no immediate leak, if the structure changes underneath >> us, there might be in the future. >> >> Submitted by: Domagoj Stolfa >> MFC After: 1 month >> Sponsored by: DARPA/AFRL >> >> Modified: >> head/sys/i386/ibcs2/ibcs2_ipc.c >> >> Modified: head/sys/i386/ibcs2/ibcs2_ipc.c >> ============================================================ >> ================== >> --- head/sys/i386/ibcs2/ibcs2_ipc.c Wed Mar 7 14:41:29 2018 >> (r330600) >> +++ head/sys/i386/ibcs2/ibcs2_ipc.c Wed Mar 7 14:44:32 2018 >> (r330601) >> @@ -135,6 +135,8 @@ ibcs2_msgctl(struct thread *td, void *v) >> struct msqid_ds bs; >> int error; >> >> + memset(&is, 0, sizeof(is)); >> + >> switch (uap->cmd) { >> case IBCS2_IPC_STAT: >> error = kern_msgctl(td, uap->msqid, IPC_STAT, &bs); >> @@ -317,6 +319,8 @@ ibcs2_semctl(struct thread *td, void *v) >> union semun semun; >> register_t rval; >> int error; >> + >> + memset(&is, 0, sizeof(is)); >> >> switch(uap->cmd) { >> case IBCS2_IPC_STAT: >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >> > From owner-svn-src-all@freebsd.org Wed Mar 7 15:44:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 621D9F38B29; Wed, 7 Mar 2018 15:44:38 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA88D7BD60; Wed, 7 Mar 2018 15:44:37 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x236.google.com with SMTP id 30so3503086iog.2; Wed, 07 Mar 2018 07:44:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=35JU3Efgmew9okbmhZpYfrugadmaCLTDmPkNm5R+bPM=; b=I922KV8Y/9TOwVfU+btmN8CjNpSSyNqCTYVm+wxvwNBR93q8SJrVcHTWYTlMIfkQJ+ SSsLCyOS3uBGfrfMl/3lP7Xp7NhTSCj7QQM7tBpvXtDYoRCG+xvWPenQK6cPVw2tX+yZ T7r0Ptuk8Qe+UfpNvZgOV4uj7dVzIPQcSs9XhkJwPCj8cMdLv4qCii0BDLnwWc1IOKhF yu1MXcrg4XoIb/OVnFNgtucwBRUz+mOo96aaEDcF/iqG8DxBIkISfRqbC7O8fGXBo4c/ UYBqTO2Aj8v8o8imRhzaBadEb0L0PW2DPVD1lEf5WXbw+i3Qta9ToQAEfZRvVhgYedfx jH+w== 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=35JU3Efgmew9okbmhZpYfrugadmaCLTDmPkNm5R+bPM=; b=DaqFEnX4nO3M2BDWifGs1A173WAQRqsiVOkD3iqJv55FnghQfK1bZ3FqQOp5ZOcyjD eEJvH5nFx/NjA8mVncZIlVtEUxy/3mCzCR0VZ2EKIFGNY2tXIlyqQ58sEDpdkiHbXWNp adSayWOR250O4QFajTErhTvwN5cRpOa8B5eUXHZLsKqRDl0xiaN4jYzBuQi2JCj7TBLn 2jGUMrzUhBnuv88NlC93TYCrDIHzFUD+RXSqkmbXLxzJTQxixA50i1ReTgwGRzen35Jr 6m6vc9PBgTJeJzltE190onm38NCpCjbnIf0h0sYeGmL8wHuLI5UWXfjMy4/rTQaVHDb3 SkzQ== X-Gm-Message-State: AElRT7FYjXf1QzjhPFHEtMY9cBE5aM8aMbm+M1GvrbPy5Re9u9XQfzWz +8jCeZcJu69bakaLmZTNeWgO4j2vCSQO/lS00SXCC1Jo X-Google-Smtp-Source: AG47ELuH7omvMn1iNF2sB1vhozjcYPWqhUqy1fwIVUC6tIBxZCtrlwt3Ath1dVHH3BBtQAb60EoBzG4JS4ylawoH6Oo= X-Received: by 10.107.134.95 with SMTP id i92mr26300209iod.210.1520437476924; Wed, 07 Mar 2018 07:44:36 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.163.13 with HTTP; Wed, 7 Mar 2018 07:44:14 -0800 (PST) In-Reply-To: <201803071447.w27Elh7C053393@repo.freebsd.org> References: <201803071447.w27Elh7C053393@repo.freebsd.org> From: Ed Maste Date: Wed, 7 Mar 2018 10:44:14 -0500 X-Google-Sender-Auth: UukLoBVTnKXvJp4Sj2uEwIUC3Z0 Message-ID: Subject: Re: svn commit: r330602 - head/sys/compat/cloudabi To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:44:38 -0000 On 7 March 2018 at 09:47, Eitan Adler wrote: > Author: eadler > Date: Wed Mar 7 14:47:43 2018 > New Revision: 330602 > URL: https://svnweb.freebsd.org/changeset/base/330602 > > Log: > sys/cloudabi: Avoid relying on GNU specific extensions > > An empty initializer list is not technically valid C grammar. > > MFC After: 1 week > > - cloudabi_fdstat_t fsb = {}; > + cloudabi_fdstat_t fsb = {0}; In practice it appears initializing via { 0 } also zeros any padding in the struct, but I do not believe it's required by the C standard. Perhaps a language lawyer can weigh in? Commenting on this commit just because it's highlighted by this change; I do not believe there's a difference between the GNU extension { } and { 0 } here. From owner-svn-src-all@freebsd.org Wed Mar 7 15:54:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D4BDF39BDF; Wed, 7 Mar 2018 15:54:07 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot0-x236.google.com (mail-ot0-x236.google.com [IPv6:2607:f8b0:4003:c0f::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 28E387C66B; Wed, 7 Mar 2018 15:54:07 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot0-x236.google.com with SMTP id h8so2476306oti.6; Wed, 07 Mar 2018 07:54:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4jrs60oonPnDZrNkK8Kjm+B8VI639MC1L7nMylZbQz4=; b=u6NvRcLm0irgAT+WJ+4l8D3ydW5qfT9zniftaMs1PB9hGbqcXvdYh9/4Wnic3/D3yt EVA78uBIDkwn5gQJmYOcrYLdcP5M6Lbr81FGjSm+avc3WMnGVO4wpCgUqacCksx6Kvq4 34MULY/0jHL/T19JLZxFdL8gv1PYPcFCJGjYS1hl1PlWni+IGSS2NNO+thN3it///QPN Wl0p3d5YrcxXZhzWaiyq4aJFLuKhZu4DgIvDlIf+6mYpZR/bnBDXoVT/ULIrtdN94rOD otukIhEwwJbYXnWHl5ZF79DK7awZIK4O6JcYo8PBN3Vxo4GkHfgJB/Ryc5tLBiS8+KGh dyYQ== 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=4jrs60oonPnDZrNkK8Kjm+B8VI639MC1L7nMylZbQz4=; b=NM1/E9A3/ifCaLeDmNgKVrpbpRvIkQl7rL0PhSZhPDv+Utt+UACK9msk+T+ADj46Tf /36m/gNoT3LS+tpq8SwO/069O8ZZ/YPLgTGcjEYopcr4Qm8bv2WmBlwTgznTiSgUFG0p cfWxS5It9vKgbJA/Fd+aLnR5V/PIeG0sUR/bvSJu7ufNO7OtXIUYvAqzI6iN5jiuc0sU q8WfHOJSDNdQVchpW8PnZbqUZ35q9ppI8r6BBVDXOtDxq7M/lKYnLpG0C2U60nir6H2Y g49TjbJ/BGfPrtX314He1LW+1+OXDihC9lIt6oXCBc1C42DN7BigmP0HSQaM8+qd+Pxg Yhcw== X-Gm-Message-State: AElRT7E1XCJH8kZxy2uRxz8bxJ+38dq/tAnQoQlZf5nbGqhCVAWBd1iK 56M9n7X/VfrzvQJO0kS5tW7V9zjYl3a4SzS9des= X-Google-Smtp-Source: AG47ELsMOF35VhC+vmlmRkXPxx8YSkRbiuqfSZoQ/C7Kh7/mgqYOCsPpDgpni4r4I3qe813SqjIfrArapBACi7LVF0w= X-Received: by 10.157.62.30 with SMTP id a30mr16139974otd.128.1520438046317; Wed, 07 Mar 2018 07:54:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.96.212 with HTTP; Wed, 7 Mar 2018 07:54:05 -0800 (PST) In-Reply-To: References: <201803071447.w27Elh7C053393@repo.freebsd.org> From: Benjamin Kaduk Date: Wed, 7 Mar 2018 09:54:05 -0600 Message-ID: Subject: Re: svn commit: r330602 - head/sys/compat/cloudabi To: Ed Maste Cc: Eitan Adler , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:54:08 -0000 On Wed, Mar 7, 2018 at 9:44 AM, Ed Maste wrote: > On 7 March 2018 at 09:47, Eitan Adler wrote: > > Author: eadler > > Date: Wed Mar 7 14:47:43 2018 > > New Revision: 330602 > > URL: https://svnweb.freebsd.org/changeset/base/330602 > > > > Log: > > sys/cloudabi: Avoid relying on GNU specific extensions > > > > An empty initializer list is not technically valid C grammar. > > > > MFC After: 1 week > > > > - cloudabi_fdstat_t fsb = {}; > > + cloudabi_fdstat_t fsb = {0}; > > In practice it appears initializing via { 0 } also zeros any padding > in the struct, but I do not believe it's required by the C standard. > Perhaps a language lawyer can weigh in? > > Commenting on this commit just because it's highlighted by this > change; I do not believe there's a difference between the GNU > extension { } and { 0 } here. > > The C spec says that if an incomplete initializer is given, then all other fields of the structure are initialized to zero. The state of padding is unspecified, whether a complete or incomplete initializer is given. The "issue" being "fixed" here is that the formal C grammar does not admit a totally empty initializer, so at least one element of the initializer needs to be given in order to satisfy the grammar. This is pretty silly, and the extension to allow a totally empty initializer a quite natural one to make. -Ben From owner-svn-src-all@freebsd.org Wed Mar 7 15:56:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 718AAF39ED2 for ; Wed, 7 Mar 2018 15:56:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 025A57C853 for ; Wed, 7 Mar 2018 15:56:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x233.google.com with SMTP id e30so3559495ioc.3 for ; Wed, 07 Mar 2018 07:56:02 -0800 (PST) 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=Rccl7TcY8UI8/MKr29R0/iAkZ3LjYHJVySExvYqtCCs=; b=0tc7kMsHN9GD1ErBiB9CUz3lWrPOJmyWdRonOgafAeCTc/t7AAOop2i1MjuWRY/BtB 3trpVTUApEo/mEcD7QzXAbaf5d3Ljb5DGCnlvav7wAP4sq0rJPfDjTUM5BtwS2pPGizz H7ASLUhcmwG4++W3WIiN9lpHnxsxhwXNnrqLL9wd4C8c1SRB3vpI88Fhq+8/Ve47IWH2 V93Y3rgUf3fVQGqC/fvTeo/bidSyzNYJ1CTuKJeeL+qmzxE1xGdl6X+i+NBy/9cZS2bE wlaYZlNPDFL8faIjMwh6nGskCsBaExOxQNGT7DpYYfxoA+AtqORwH5N7gnOjf4crNRiF sPIA== 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=Rccl7TcY8UI8/MKr29R0/iAkZ3LjYHJVySExvYqtCCs=; b=Kzc2Vmzojkqi4MOnJZ0+xC6WlPXNiTTUQRp2G+YM46f8hJHUEDrl11ZTa2nHVlOy1x FJ06JrkDf+ezBvw/eGGP82+WSmEHHKMAbfjopD648R1U/nl3DqNXmHfZ8NfeX9bZUGoM ymiV69yhlcVfBNLytCgYty7FLQiF9G+3NYj04eU1weLB0bpHy1g5YoFj1YH8CbcriAZ7 5frMYO2jfBiqeO7rB/lYNcj1R+uhNSMBbs3w3QSK+eDAKkhZWVwNrm1XzgAX0IXreWS9 xeQJyYH2G8IR2LQyLYy6fHLE3EXttvFDkD/VCmXz3NL7XCYf5P+Bcnv5hErv8Ak5vTRJ KIZw== X-Gm-Message-State: AElRT7Fa0CbzV+GTpfV+G9JyicXMJHdWw9ErclDFG12PPOQdFqzbMs6T mML43oEaKZI0rlDTLXM5+nbAPs69ilcpIJlrPwqMkA== X-Google-Smtp-Source: AG47ELtFRkGBx9/4MmMF2cTPrSV2Zsy4wes2iKIIS0KuLlFypQuV9Ob7/wOv3C2I1wnH8VuNUlzXlHb3aTKc8RmHMXU= X-Received: by 10.107.180.83 with SMTP id d80mr26215419iof.168.1520438162230; Wed, 07 Mar 2018 07:56:02 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Wed, 7 Mar 2018 07:56:01 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201803071447.w27Elh7C053393@repo.freebsd.org> From: Warner Losh Date: Wed, 7 Mar 2018 08:56:01 -0700 X-Google-Sender-Auth: 0bY77ALy3BXRKLwdFOLzz6Fy6jU Message-ID: Subject: Re: svn commit: r330602 - head/sys/compat/cloudabi To: Ed Maste Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 15:56:03 -0000 On Wed, Mar 7, 2018 at 8:44 AM, Ed Maste wrote: > On 7 March 2018 at 09:47, Eitan Adler wrote: > > Author: eadler > > Date: Wed Mar 7 14:47:43 2018 > > New Revision: 330602 > > URL: https://svnweb.freebsd.org/changeset/base/330602 > > > > Log: > > sys/cloudabi: Avoid relying on GNU specific extensions > > > > An empty initializer list is not technically valid C grammar. > > > > MFC After: 1 week > > > > - cloudabi_fdstat_t fsb = {}; > > + cloudabi_fdstat_t fsb = {0}; > > In practice it appears initializing via { 0 } also zeros any padding > in the struct, but I do not believe it's required by the C standard. > Perhaps a language lawyer can weigh in? > All the standard says are that all named are initialized to 0 (which has the usual meaning for the integer 0 for pointers) unless otherwise stated: 6.7.8 para 9: "Except where explicitly stated otherwise, for the purposes of this subclause unnamed members of objects of structure and union type do not participate in initialization. Unnamed members of structure objects have indeterminate value even after initialization." 6.7.8 para 21: "If there are fewer initializers in a brace-enclosed list than there are elements or members of an aggregate, or fewer characters in a string literal used to initialize an array of known size than there are elements in the array, the remainder of the aggregate shall be initialized implicitly the same as objects that have static storage duration." The aggregate here, I believe refers to the elements, not the padded structure, and the padding is definitely an unnamed part of the structure, which makes it unspecified. However 6.7.8 is quite long and detailed, and I'm not 100% sure I have totally grokked all its subtle implications. Commenting on this commit just because it's highlighted by this > change; I do not believe there's a difference between the GNU > extension { } and { 0 } here. > I believe that's correct as well. Warner From owner-svn-src-all@freebsd.org Wed Mar 7 16:55:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 453EDF3F174; Wed, 7 Mar 2018 16:55:16 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECE49806EF; Wed, 7 Mar 2018 16:55:15 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7EFB2476E; Wed, 7 Mar 2018 16:55:15 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27GtFju020441; Wed, 7 Mar 2018 16:55:15 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27GtFQJ020440; Wed, 7 Mar 2018 16:55:15 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803071655.w27GtFQJ020440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 7 Mar 2018 16:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330609 - stable/10/sys/netipsec X-SVN-Group: stable-10 X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: stable/10/sys/netipsec X-SVN-Commit-Revision: 330609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 16:55:16 -0000 Author: gordon Date: Wed Mar 7 16:55:15 2018 New Revision: 330609 URL: https://svnweb.freebsd.org/changeset/base/330609 Log: Fixup the AH patch to properly compile. Modified: stable/10/sys/netipsec/xform_ah.c Modified: stable/10/sys/netipsec/xform_ah.c ============================================================================== --- stable/10/sys/netipsec/xform_ah.c Wed Mar 7 15:23:07 2018 (r330608) +++ stable/10/sys/netipsec/xform_ah.c Wed Mar 7 16:55:15 2018 (r330609) @@ -603,11 +603,11 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski DPRINTF(("%s: bad mbuf length %u (expecting %lu)" " for packet in SA %s/%08lx\n", __func__, m->m_pkthdr.len, (u_long) (skip + authsize + rplen), - ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), + ipsec_address(&sav->sah->saidx.dst), (u_long) ntohl(sav->spi))); AHSTAT_INC(ahs_badauthl); - error = EACCES; - goto bad; + m_freem(m); + return EACCES; } AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl); From owner-svn-src-all@freebsd.org Wed Mar 7 17:08:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F084F4097F; Wed, 7 Mar 2018 17:08:09 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CF258130A; Wed, 7 Mar 2018 17:08:09 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2657E24927; Wed, 7 Mar 2018 17:08:09 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27H898k025859; Wed, 7 Mar 2018 17:08:09 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27H87YU025844; Wed, 7 Mar 2018 17:08:07 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201803071708.w27H87YU025844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 7 Mar 2018 17:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330610 - in head/sys: dev/vt/hw/ofwfb powerpc/aim powerpc/include powerpc/ofw powerpc/powerpc powerpc/ps3 X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: in head/sys: dev/vt/hw/ofwfb powerpc/aim powerpc/include powerpc/ofw powerpc/powerpc powerpc/ps3 X-SVN-Commit-Revision: 330610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 17:08:09 -0000 Author: nwhitehorn Date: Wed Mar 7 17:08:07 2018 New Revision: 330610 URL: https://svnweb.freebsd.org/changeset/base/330610 Log: Move the powerpc64 direct map base address from zero to high memory. This accomplishes a few things: - Makes NULL an invalid address in the kernel, which is useful for catching bugs. - Lays groundwork for radix-tree translation on POWER9, which requires the direct map be at high memory. - Similarly lays groundwork for a direct map on 64-bit Book-E. The new base address is chosen as the base of the fourth radix quadrant (the minimum kernel address in this translation mode) and because all supported CPUs ignore at least the first two bits of addresses in real mode, allowing direct-map addresses to be used in real-mode handlers. This is required by Linux and is part of the architecture standard starting in POWER ISA 3, so can be relied upon. Reviewed by: jhibbits, Breno Leitao Differential Revision: D14499 Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c head/sys/powerpc/aim/aim_machdep.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/moea64_native.c head/sys/powerpc/aim/slb.c head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/include/sr.h head/sys/powerpc/include/vmparam.h head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/ofw/ofw_real.c head/sys/powerpc/powerpc/bus_machdep.c head/sys/powerpc/powerpc/genassym.c head/sys/powerpc/powerpc/mem.c head/sys/powerpc/powerpc/uma_machdep.c head/sys/powerpc/ps3/platform_ps3.c Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Wed Mar 7 17:08:07 2018 (r330610) @@ -489,7 +489,7 @@ ofwfb_init(struct vt_device *vd) #if defined(__powerpc__) OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase, NULL); - sc->fb.fb_pbase = sc->fb.fb_vbase; /* 1:1 mapped */ + sc->fb.fb_pbase = sc->fb.fb_vbase & ~DMAP_BASE_ADDRESS; #ifdef __powerpc64__ /* Real mode under a hypervisor probably doesn't cover FB */ if (!(mfmsr() & (PSL_HV | PSL_DR))) Modified: head/sys/powerpc/aim/aim_machdep.c ============================================================================== --- head/sys/powerpc/aim/aim_machdep.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/aim/aim_machdep.c Wed Mar 7 17:08:07 2018 (r330610) @@ -455,11 +455,33 @@ va_to_vsid(pmap_t pm, vm_offset_t va) #endif +/* + * These functions need to provide addresses that both (a) work in real mode + * (or whatever mode/circumstances the kernel is in in early boot (now)) and + * (b) can still, in principle, work once the kernel is going. Because these + * rely on existing mappings/real mode, unmap is a no-op. + */ vm_offset_t pmap_early_io_map(vm_paddr_t pa, vm_size_t size) { + KASSERT(!pmap_bootstrapped, ("Not available after PMAP started!")); - return (pa); + /* + * If we have the MMU up in early boot, assume it is 1:1. Otherwise, + * try to get the address in a memory region compatible with the + * direct map for efficiency later. + */ + if (mfmsr() & PSL_DR) + return (pa); + else + return (DMAP_BASE_ADDRESS + pa); +} + +void +pmap_early_io_unmap(vm_offset_t va, vm_size_t size) +{ + + KASSERT(!pmap_bootstrapped, ("Not available after PMAP started!")); } /* From p3-53 of the MPC7450 RISC Microprocessor Family Reference Manual */ Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Mar 7 17:08:07 2018 (r330610) @@ -551,7 +551,8 @@ moea64_add_ofw_mappings(mmu_t mmup, phandle_t mmu, siz /* If this address is direct-mapped, skip remapping */ if (hw_direct_map && translations[i].om_va == PHYS_TO_DMAP(pa_base) && - moea64_calc_wimg(pa_base + off, VM_MEMATTR_DEFAULT) == LPTE_M) + moea64_calc_wimg(pa_base + off, VM_MEMATTR_DEFAULT) + == LPTE_M) continue; PMAP_LOCK(kernel_pmap); @@ -664,25 +665,26 @@ moea64_setup_direct_map(mmu_t mmup, vm_offset_t kernel } } PMAP_UNLOCK(kernel_pmap); - } else { - size = moea64_bpvo_pool_size*sizeof(struct pvo_entry); - off = (vm_offset_t)(moea64_bpvo_pool); - for (pa = off; pa < off + size; pa += PAGE_SIZE) - moea64_kenter(mmup, pa, pa); + } - /* - * Map certain important things, like ourselves. - * - * NOTE: We do not map the exception vector space. That code is - * used only in real mode, and leaving it unmapped allows us to - * catch NULL pointer deferences, instead of making NULL a valid - * address. - */ + /* + * Make sure the kernel and BPVO pool stay mapped on systems either + * without a direct map or on which the kernel is not already executing + * out of the direct-mapped region. + */ + if (!hw_direct_map || kernelstart < DMAP_BASE_ADDRESS) { for (pa = kernelstart & ~PAGE_MASK; pa < kernelend; - pa += PAGE_SIZE) + pa += PAGE_SIZE) moea64_kenter(mmup, pa, pa); } + + if (!hw_direct_map) { + size = moea64_bpvo_pool_size*sizeof(struct pvo_entry); + off = (vm_offset_t)(moea64_bpvo_pool); + for (pa = off; pa < off + size; pa += PAGE_SIZE) + moea64_kenter(mmup, pa, pa); + } ENABLE_TRANS(msr); /* @@ -826,6 +828,11 @@ moea64_mid_bootstrap(mmu_t mmup, vm_offset_t kernelsta moea64_bpvo_pool_size*sizeof(struct pvo_entry), 0); moea64_bpvo_pool_index = 0; + /* Place at address usable through the direct map */ + if (hw_direct_map) + moea64_bpvo_pool = (struct pvo_entry *) + PHYS_TO_DMAP((uintptr_t)moea64_bpvo_pool); + /* * Make sure kernel vsid is allocated as well as VSID 0. */ @@ -898,12 +905,11 @@ moea64_late_bootstrap(mmu_t mmup, vm_offset_t kernelst Maxmem = max(Maxmem, powerpc_btop(phys_avail[i + 1])); /* - * Initialize MMU and remap early physical mappings + * Initialize MMU. */ MMU_CPU_BOOTSTRAP(mmup,0); mtmsr(mfmsr() | PSL_DR | PSL_IR); pmap_bootstrapped++; - bs_remap_earlyboot(); /* * Set the start and end of kva. @@ -920,6 +926,11 @@ moea64_late_bootstrap(mmu_t mmup, vm_offset_t kernelst #endif /* + * Remap any early IO mappings (console framebuffer, etc.) + */ + bs_remap_earlyboot(); + + /* * Figure out how far we can extend virtual_end into segment 16 * without running into existing mappings. Segment 16 is guaranteed * to contain neither RAM nor devices (at least on Apple hardware), @@ -1826,10 +1837,11 @@ moea64_kextract(mmu_t mmu, vm_offset_t va) /* * Shortcut the direct-mapped case when applicable. We never put - * anything but 1:1 mappings below VM_MIN_KERNEL_ADDRESS. + * anything but 1:1 (or 62-bit aliased) mappings below + * VM_MIN_KERNEL_ADDRESS. */ if (va < VM_MIN_KERNEL_ADDRESS) - return (va); + return (va & ~DMAP_BASE_ADDRESS); PMAP_LOCK(kernel_pmap); pvo = moea64_pvo_find_va(kernel_pmap, va); @@ -2565,12 +2577,15 @@ moea64_pvo_remove_from_page(mmu_t mmu, struct pvo_entr * Update vm about page writeability/executability if managed */ PV_LOCKASSERT(pvo->pvo_pte.pa & LPTE_RPGN); - pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.pa & LPTE_RPGN); + if (pvo->pvo_vaddr & PVO_MANAGED) { + pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.pa & LPTE_RPGN); - if ((pvo->pvo_vaddr & PVO_MANAGED) && pg != NULL) { - LIST_REMOVE(pvo, pvo_vlink); - if (LIST_EMPTY(vm_page_to_pvoh(pg))) - vm_page_aflag_clear(pg, PGA_WRITEABLE | PGA_EXECUTABLE); + if (pg != NULL) { + LIST_REMOVE(pvo, pvo_vlink); + if (LIST_EMPTY(vm_page_to_pvoh(pg))) + vm_page_aflag_clear(pg, + PGA_WRITEABLE | PGA_EXECUTABLE); + } } moea64_pvo_entries--; @@ -2677,8 +2692,12 @@ moea64_dev_direct_mapped(mmu_t mmu, vm_paddr_t pa, vm_ vm_offset_t ppa; int error = 0; + if (hw_direct_map && mem_valid(pa, size) == 0) + return (0); + PMAP_LOCK(kernel_pmap); - key.pvo_vaddr = ppa = pa & ~ADDR_POFF; + ppa = pa & ~ADDR_POFF; + key.pvo_vaddr = DMAP_BASE_ADDRESS + ppa; for (pvo = RB_FIND(pvo_tree, &kernel_pmap->pmap_pvo, &key); ppa < pa + size; ppa += PAGE_SIZE, pvo = RB_NEXT(pvo_tree, &kernel_pmap->pmap_pvo, pvo)) { Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/aim/moea64_native.c Wed Mar 7 17:08:07 2018 (r330610) @@ -401,7 +401,7 @@ moea64_cpu_bootstrap_native(mmu_t mmup, int ap) */ __asm __volatile ("ptesync; mtsdr1 %0; isync" - :: "r"((uintptr_t)moea64_pteg_table + :: "r"(((uintptr_t)moea64_pteg_table & ~DMAP_BASE_ADDRESS) | (uintptr_t)(flsl(moea64_pteg_mask >> 11)))); tlbia(); } @@ -434,6 +434,9 @@ moea64_bootstrap_native(mmu_t mmup, vm_offset_t kernel */ moea64_pteg_table = (struct lpte *)moea64_bootstrap_alloc(size, size); + if (hw_direct_map) + moea64_pteg_table = + (struct lpte *)PHYS_TO_DMAP((vm_offset_t)moea64_pteg_table); DISABLE_TRANS(msr); bzero(__DEVOLATILE(void *, moea64_pteg_table), moea64_pteg_count * sizeof(struct lpteg)); Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/aim/slb.c Wed Mar 7 17:08:07 2018 (r330610) @@ -207,13 +207,16 @@ kernel_va_to_slbv(vm_offset_t va) /* Set kernel VSID to deterministic value */ slbv = (KERNEL_VSID((uintptr_t)va >> ADDR_SR_SHFT)) << SLBV_VSID_SHIFT; - /* Figure out if this is a large-page mapping */ - if (hw_direct_map && va < VM_MIN_KERNEL_ADDRESS) { + /* + * Figure out if this is a large-page mapping. + */ + if (hw_direct_map && va > DMAP_BASE_ADDRESS && va < DMAP_MAX_ADDRESS) { /* * XXX: If we have set up a direct map, assumes * all physical memory is mapped with large pages. */ - if (mem_valid(va, 0) == 0) + + if (mem_valid(DMAP_TO_PHYS(va), 0) == 0) slbv |= SLBV_L; } Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/aim/trap_subr64.S Wed Mar 7 17:08:07 2018 (r330610) @@ -43,7 +43,9 @@ #define GET_CPUINFO(r) \ mfsprg0 r #define GET_TOCBASE(r) \ - li r,TRAP_TOCBASE; /* Magic address for TOC */ \ + lis r,DMAP_BASE_ADDRESS@highesta; /* To real-mode alias/dmap */ \ + sldi r,r,32; \ + ori r,r,TRAP_TOCBASE; /* Magic address for TOC */ \ ld r,0(r) /* Modified: head/sys/powerpc/include/sr.h ============================================================================== --- head/sys/powerpc/include/sr.h Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/include/sr.h Wed Mar 7 17:08:07 2018 (r330610) @@ -53,7 +53,7 @@ #define KERNEL2_SEGMENT (0xfffff0 + KERNEL2_SR) #define EMPTY_SEGMENT 0xfffff0 #ifdef __powerpc64__ -#define USER_ADDR 0xcffffffff0000000UL +#define USER_ADDR 0xeffffffff0000000UL #else #define USER_ADDR ((uintptr_t)USER_SR << ADDR_SR_SHFT) #endif Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/include/vmparam.h Wed Mar 7 17:08:07 2018 (r330610) @@ -83,11 +83,7 @@ #if !defined(LOCORE) #ifdef __powerpc64__ #define VM_MIN_ADDRESS (0x0000000000000000UL) -#ifdef AIM -#define VM_MAXUSER_ADDRESS (0xfffffffffffff000UL) -#else -#define VM_MAXUSER_ADDRESS (0x7ffffffffffff000UL) -#endif +#define VM_MAXUSER_ADDRESS (0x3ffffffffffff000UL) #define VM_MAX_ADDRESS (0xffffffffffffffffUL) #else #define VM_MIN_ADDRESS ((vm_offset_t)0) @@ -99,7 +95,7 @@ #ifdef BOOKE #define VM_MIN_ADDRESS 0 #ifdef __powerpc64__ -#define VM_MAXUSER_ADDRESS 0x7ffffffffffff000 +#define VM_MAXUSER_ADDRESS 0x3ffffffffffff000 #else #define VM_MAXUSER_ADDRESS 0x7ffff000 #endif @@ -110,8 +106,13 @@ #define FREEBSD32_USRSTACK FREEBSD32_SHAREDPAGE #ifdef __powerpc64__ +#ifdef AIM +#define VM_MIN_KERNEL_ADDRESS 0xe000000000000000UL +#define VM_MAX_KERNEL_ADDRESS 0xe0000001c7ffffffUL +#else #define VM_MIN_KERNEL_ADDRESS 0xc000000000000000UL #define VM_MAX_KERNEL_ADDRESS 0xc0000001c7ffffffUL +#endif #define VM_MAX_SAFE_KERNEL_ADDRESS VM_MAX_KERNEL_ADDRESS #endif @@ -243,14 +244,17 @@ struct pmap_physseg { /* * We (usually) have a direct map of all physical memory, so provide - * a macro to use to get the kernel VA address for a given PA. Returns - * 0 if the direct map is unavailable. The location of the direct map - * may not be 1:1 in future, so use of the macro is recommended. + * a macro to use to get the kernel VA address for a given PA. Check the + * value of PMAP_HAS_PMAP before using. */ +#ifndef LOCORE #ifdef __powerpc64__ -#define DMAP_BASE_ADDRESS 0x0000000000000000UL +#define DMAP_BASE_ADDRESS 0xc000000000000000UL +#define DMAP_MAX_ADDRESS 0xcfffffffffffffffUL #else #define DMAP_BASE_ADDRESS 0x00000000UL +#define DMAP_MAX_ADDRESS 0xbfffffffUL +#endif #endif #define PMAP_HAS_DMAP (hw_direct_map) Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/ofw/ofw_machdep.c Wed Mar 7 17:08:07 2018 (r330610) @@ -84,20 +84,21 @@ static int openfirmware(void *args); __inline void ofw_save_trap_vec(char *save_trap_vec) { - if (!ofw_real_mode) + if (!ofw_real_mode || !hw_direct_map) return; - bcopy((void *)EXC_RST, save_trap_vec, EXC_LAST - EXC_RST); + bcopy((void *)PHYS_TO_DMAP(EXC_RST), save_trap_vec, EXC_LAST - EXC_RST); } static __inline void ofw_restore_trap_vec(char *restore_trap_vec) { - if (!ofw_real_mode) + if (!ofw_real_mode || !hw_direct_map) return; - bcopy(restore_trap_vec, (void *)EXC_RST, EXC_LAST - EXC_RST); - __syncicache(EXC_RSVD, EXC_LAST - EXC_RSVD); + bcopy(restore_trap_vec, (void *)PHYS_TO_DMAP(EXC_RST), + EXC_LAST - EXC_RST); + __syncicache((void *)PHYS_TO_DMAP(EXC_RSVD), EXC_LAST - EXC_RSVD); } /* @@ -381,12 +382,6 @@ OF_initial_setup(void *fdt_ptr, void *junk, int (*open #endif fdt = fdt_ptr; - - #ifdef FDT_DTB_STATIC - /* Check for a statically included blob */ - if (fdt == NULL) - fdt = &fdt_static_dtb; - #endif } boolean_t @@ -414,13 +409,57 @@ OF_bootstrap() } else #endif if (fdt != NULL) { - status = OF_install(OFW_FDT, 0); +#ifdef AIM + bus_space_tag_t fdt_bt; + vm_offset_t tmp_fdt_ptr; + vm_size_t fdt_size; + uintptr_t fdt_va; +#endif + status = OF_install(OFW_FDT, 0); if (status != TRUE) return status; +#ifdef AIM /* AIM-only for now -- Book-E does this remapping in early init */ + /* Get the FDT size for mapping if we can */ + tmp_fdt_ptr = pmap_early_io_map((vm_paddr_t)fdt, PAGE_SIZE); + if (fdt_check_header((void *)tmp_fdt_ptr) != 0) { + pmap_early_io_unmap(tmp_fdt_ptr, PAGE_SIZE); + return FALSE; + } + fdt_size = fdt_totalsize((void *)tmp_fdt_ptr); + pmap_early_io_unmap(tmp_fdt_ptr, PAGE_SIZE); + + /* + * Map this for real. Use bus_space_map() to take advantage + * of its auto-remapping function once the kernel is loaded. + * This is a dirty hack, but what we have. + */ +#ifdef _LITTLE_ENDIAN + fdt_bt = &bs_le_tag; +#else + fdt_bt = &bs_be_tag; +#endif + bus_space_map(fdt_bt, (vm_paddr_t)fdt, fdt_size, 0, &fdt_va); + + err = OF_init((void *)fdt_va); +#else err = OF_init(fdt); +#endif } + + #ifdef FDT_DTB_STATIC + /* + * Check for a statically included blob already in the kernel and + * needing no mapping. + */ + else { + status = OF_install(OFW_FDT, 0); + if (status != TRUE) + return status; + err = OF_init(&fdt_static_dtb); + } + #endif if (err != 0) { OF_install(NULL, 0); Modified: head/sys/powerpc/ofw/ofw_real.c ============================================================================== --- head/sys/powerpc/ofw/ofw_real.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/ofw/ofw_real.c Wed Mar 7 17:08:07 2018 (r330610) @@ -223,7 +223,7 @@ ofw_real_bounce_alloc(void *junk) * we have a 32-bit virtual address to give OF. */ - if (!ofw_real_mode && !hw_direct_map) + if (!ofw_real_mode && (!hw_direct_map || DMAP_BASE_ADDRESS != 0)) pmap_kenter(of_bounce_phys, of_bounce_phys); mtx_unlock(&of_bounce_mtx); @@ -244,7 +244,7 @@ ofw_real_map(const void *buf, size_t len) * can use right now is memory mapped by firmware. */ if (!pmap_bootstrapped) - return (cell_t)(uintptr_t)buf; + return (cell_t)((uintptr_t)buf & ~DMAP_BASE_ADDRESS); /* * XXX: It is possible for us to get called before the VM has @@ -253,7 +253,8 @@ ofw_real_map(const void *buf, size_t len) * Copy into the emergency buffer, and reset at the end. */ of_bounce_virt = emergency_buffer; - of_bounce_phys = (vm_offset_t)of_bounce_virt; + of_bounce_phys = (vm_offset_t)of_bounce_virt & + ~DMAP_BASE_ADDRESS; of_bounce_size = sizeof(emergency_buffer); } @@ -261,7 +262,8 @@ ofw_real_map(const void *buf, size_t len) * Make sure the bounce page offset satisfies any reasonable * alignment constraint. */ - of_bounce_offset += sizeof(register_t) - (of_bounce_offset % sizeof(register_t)); + of_bounce_offset += sizeof(register_t) - + (of_bounce_offset % sizeof(register_t)); if (of_bounce_offset + len > of_bounce_size) { panic("Oversize Open Firmware call!"); Modified: head/sys/powerpc/powerpc/bus_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/bus_machdep.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/powerpc/bus_machdep.c Wed Mar 7 17:08:07 2018 (r330610) @@ -115,7 +115,9 @@ bs_remap_earlyboot(void) for (i = 0; i < earlyboot_map_idx; i++) { spa = earlyboot_mappings[i].addr; - if (spa == earlyboot_mappings[i].virt && + + if (hw_direct_map && + PHYS_TO_DMAP(spa) == earlyboot_mappings[i].virt && pmap_dev_direct_mapped(spa, earlyboot_mappings[i].size) == 0) continue; Modified: head/sys/powerpc/powerpc/genassym.c ============================================================================== --- head/sys/powerpc/powerpc/genassym.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/powerpc/genassym.c Wed Mar 7 17:08:07 2018 (r330610) @@ -222,6 +222,7 @@ ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); ASSYM(SF_UC, offsetof(struct sigframe, sf_uc)); ASSYM(KERNBASE, KERNBASE); +ASSYM(DMAP_BASE_ADDRESS, DMAP_BASE_ADDRESS); ASSYM(MAXCOMLEN, MAXCOMLEN); #ifdef __powerpc64__ Modified: head/sys/powerpc/powerpc/mem.c ============================================================================== --- head/sys/powerpc/powerpc/mem.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/powerpc/mem.c Wed Mar 7 17:08:07 2018 (r330610) @@ -125,8 +125,9 @@ kmem_direct_mapped: v = uio->uio_offset; break; } - if (!pmap_dev_direct_mapped(v, cnt)) { - error = uiomove((void *)v, cnt, uio); + if (hw_direct_map && !pmap_dev_direct_mapped(v, cnt)) { + error = uiomove((void *)PHYS_TO_DMAP(v), cnt, + uio); } else { m.phys_addr = trunc_page(v); marr = &m; Modified: head/sys/powerpc/powerpc/uma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/uma_machdep.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/powerpc/uma_machdep.c Wed Mar 7 17:08:07 2018 (r330610) @@ -94,7 +94,12 @@ uma_small_free(void *mem, vm_size_t size, u_int8_t fla pmap_remove(kernel_pmap,(vm_offset_t)mem, (vm_offset_t)mem + PAGE_SIZE); - m = PHYS_TO_VM_PAGE((vm_offset_t)mem); + if (hw_direct_map) + m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)mem)); + else + m = PHYS_TO_VM_PAGE((vm_offset_t)mem); + KASSERT(m != NULL, + ("Freeing UMA block at %p with no associated page", mem)); vm_page_unwire_noq(m); vm_page_free(m); atomic_subtract_int(&hw_uma_mdpages, 1); Modified: head/sys/powerpc/ps3/platform_ps3.c ============================================================================== --- head/sys/powerpc/ps3/platform_ps3.c Wed Mar 7 16:55:15 2018 (r330609) +++ head/sys/powerpc/ps3/platform_ps3.c Wed Mar 7 17:08:07 2018 (r330610) @@ -128,9 +128,6 @@ ps3_attach(platform_t plat) pmap_mmu_install("mmu_ps3", BUS_PROBE_SPECIFIC); cpu_idle_hook = ps3_cpu_idle; - /* Set a breakpoint to make NULL an invalid address */ - lv1_set_dabr(0x7 /* read and write, MMU on */, 2 /* kernel accesses */); - /* Record our PIR at boot for later */ ps3_boot_pir = mfspr(SPR_PIR); @@ -227,7 +224,8 @@ static int ps3_smp_start_cpu(platform_t plat, struct pcpu *pc) { /* kernel is spinning on 0x40 == -1 right now */ - volatile uint32_t *secondary_spin_sem = (uint32_t *)PHYS_TO_DMAP(0x40); + volatile uint32_t *secondary_spin_sem = + (uint32_t *)PHYS_TO_DMAP((uintptr_t)0x40); int remote_pir = pc->pc_hwref; int timeout; From owner-svn-src-all@freebsd.org Wed Mar 7 17:09:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E55BDF40BF3; Wed, 7 Mar 2018 17:09:43 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com [209.85.223.180]) (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 863A181561; Wed, 7 Mar 2018 17:09:43 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f180.google.com with SMTP id 30so3825569iog.2; Wed, 07 Mar 2018 09:09:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=jGeJ6Rfn5vWL4F/FV6ZBmMjlwsC5F7SMTtfUPmCWMnU=; b=QYsEdpphvM2QwJG5J7dmHXODrUein8nRDH0satVg5AaVFIKBZUj8twT5rIUCtUA3Rq OJ+M5PsWpgXsBm5N0DjFtZ8I0jf/OOITlf9E1UfTlFH934udp/jMuqptNRlzpuUIeE8y hxHGNXPQrJrj/VlPW8YhTEwQ03nwSfaPSHYZjC6dWx6hVVULU8b1wQZjsH8yHk2EKZrS IiPAWaCmorsPGBgN+Jl7uWT69Fnen9Sy59IN3earbAF7Z4B9RpVqJDNLbZhN5UoTGRh5 xk8v74qDsSSAV2c2jh/C7W9hvoDQM+dYvOWTvxI/LLC82s+tEmqIU2td1g0hiHhQZxhy S66A== X-Gm-Message-State: APf1xPA3Ykn1HCqiNr0fXtrL8682j/jKE1WBKknoFncLdCUqSQki7s9A fAmvEyXC1sp9dMO47bArbpbpvZoV X-Google-Smtp-Source: AG47ELsJ181zZ/+vstEbC4rQrlUKXMvOwCinKl72wlndJPbx02ASZwHQM8xPs7w+bjWVGllBfa96lg== X-Received: by 10.107.164.132 with SMTP id d4mr24668859ioj.287.1520442577445; Wed, 07 Mar 2018 09:09:37 -0800 (PST) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com. [209.85.223.175]) by smtp.gmail.com with ESMTPSA id z73sm12644771ioi.76.2018.03.07.09.09.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Mar 2018 09:09:37 -0800 (PST) Received: by mail-io0-f175.google.com with SMTP id e7so3839539ioj.1; Wed, 07 Mar 2018 09:09:37 -0800 (PST) X-Received: by 10.107.161.79 with SMTP id k76mr27112063ioe.19.1520442577166; Wed, 07 Mar 2018 09:09:37 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.30.149 with HTTP; Wed, 7 Mar 2018 09:09:36 -0800 (PST) In-Reply-To: <201803071523.w27FN7ii074325@repo.freebsd.org> References: <201803071523.w27FN7ii074325@repo.freebsd.org> From: Conrad Meyer Date: Wed, 7 Mar 2018 09:09:36 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r330608 - in head/sys/dev/mlx5: . mlx5_core mlx5_en To: Hans Petter Selasky Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 17:09:44 -0000 On Wed, Mar 7, 2018 at 7:23 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Mar 7 15:23:07 2018 > New Revision: 330608 > URL: https://svnweb.freebsd.org/changeset/base/330608 > > Log: > Implement priority to traffic class mapping in mlx5core. > > Add support for mapping priority to traffic class via sysctl > > Submitted by: Slava Shwartsman Didn't we just give this guy a commit bit? You can get him committing his own changes :-). Best, Conrad From owner-svn-src-all@freebsd.org Wed Mar 7 17:16:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 392FDF41AB9; Wed, 7 Mar 2018 17:16:42 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF83281ED3; Wed, 7 Mar 2018 17:16:41 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA5C024ADE; Wed, 7 Mar 2018 17:16:41 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27HGfr1030617; Wed, 7 Mar 2018 17:16:41 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27HGfUZ030615; Wed, 7 Mar 2018 17:16:41 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803071716.w27HGfUZ030615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 7 Mar 2018 17:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r330611 - in releng: 10.3/sys/netipsec 10.4/sys/netipsec X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 10.3/sys/netipsec 10.4/sys/netipsec X-SVN-Commit-Revision: 330611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 17:16:42 -0000 Author: gordon Date: Wed Mar 7 17:16:41 2018 New Revision: 330611 URL: https://svnweb.freebsd.org/changeset/base/330611 Log: Correct patch for ipsec vulnerability. Approved by: so Security: FreeBSD-SA-18:01.netipsec Modified: releng/10.3/sys/netipsec/xform_ah.c releng/10.4/sys/netipsec/xform_ah.c Modified: releng/10.3/sys/netipsec/xform_ah.c ============================================================================== --- releng/10.3/sys/netipsec/xform_ah.c Wed Mar 7 17:08:07 2018 (r330610) +++ releng/10.3/sys/netipsec/xform_ah.c Wed Mar 7 17:16:41 2018 (r330611) @@ -619,11 +619,11 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski DPRINTF(("%s: bad mbuf length %u (expecting %lu)" " for packet in SA %s/%08lx\n", __func__, m->m_pkthdr.len, (u_long) (skip + authsize + rplen), - ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), + ipsec_address(&sav->sah->saidx.dst), (u_long) ntohl(sav->spi))); AHSTAT_INC(ahs_badauthl); - error = EACCES; - goto bad; + m_freem(m); + return EACCES; } AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl); Modified: releng/10.4/sys/netipsec/xform_ah.c ============================================================================== --- releng/10.4/sys/netipsec/xform_ah.c Wed Mar 7 17:08:07 2018 (r330610) +++ releng/10.4/sys/netipsec/xform_ah.c Wed Mar 7 17:16:41 2018 (r330611) @@ -619,11 +619,11 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski DPRINTF(("%s: bad mbuf length %u (expecting %lu)" " for packet in SA %s/%08lx\n", __func__, m->m_pkthdr.len, (u_long) (skip + authsize + rplen), - ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), + ipsec_address(&sav->sah->saidx.dst), (u_long) ntohl(sav->spi))); AHSTAT_INC(ahs_badauthl); - error = EACCES; - goto bad; + m_freem(m); + return EACCES; } AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl); From owner-svn-src-all@freebsd.org Wed Mar 7 17:17:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B71BF41C21; Wed, 7 Mar 2018 17:17:21 +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 E8478820BA; Wed, 7 Mar 2018 17:17:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 2D66110AFAD; Wed, 7 Mar 2018 12:17:14 -0500 (EST) From: John Baldwin To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330575 - in head/sys: conf dev/acpica dev/pci Date: Wed, 07 Mar 2018 09:01:20 -0800 Message-ID: <2340744.aoyHCQxNFB@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201803071047.w27AlRiY032946@repo.freebsd.org> References: <201803071047.w27AlRiY032946@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 07 Mar 2018 12:17:14 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 17:17:21 -0000 On Wednesday, March 07, 2018 10:47:27 AM Andrew Turner wrote: > Author: andrew > Date: Wed Mar 7 10:47:27 2018 > New Revision: 330575 > URL: https://svnweb.freebsd.org/changeset/base/330575 > > Log: > Add an acpi attachment to the pci_host_generic driver and have the ACPI > bus provide it with its needed memory resources. > > This allows us to use PCIe on the ThunderX2 and, with a previous version > of the patch, on the SoftIron 3000 with ACPI. > > Obtained from: ABT Systems Ltd > Sponsored by: The FreeBSD Foundation > Sponsored by: DARPA, AFRL > Sponsored by: Cavium (Hardware) > Differential Revision: https://reviews.freebsd.org/D8767 > > Added: > head/sys/dev/pci/pci_host_generic_acpi.c (contents, props changed) > Modified: > head/sys/conf/files.arm64 > head/sys/dev/acpica/acpi.c > > Modified: head/sys/conf/files.arm64 > ============================================================================== > --- head/sys/conf/files.arm64 Wed Mar 7 09:58:36 2018 (r330574) > +++ head/sys/conf/files.arm64 Wed Mar 7 10:47:27 2018 (r330575) > @@ -171,6 +171,8 @@ crypto/blowfish/bf_enc.c optional crypto | ipsec | ips > crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb > dev/acpica/acpi_bus_if.m optional acpi > dev/acpica/acpi_if.m optional acpi > +dev/acpica/acpi_pci_link.c optional acpi pci > +dev/acpica/acpi_pcib.c optional acpi pci > dev/ahci/ahci_generic.c optional ahci > dev/axgbe/if_axgbe.c optional axgbe > dev/axgbe/xgbe-desc.c optional axgbe > @@ -191,6 +193,7 @@ dev/neta/if_mvneta.c optional neta mdio mii > dev/ofw/ofw_cpu.c optional fdt > dev/ofw/ofwpci.c optional fdt pci > dev/pci/pci_host_generic.c optional pci > +dev/pci/pci_host_generic_acpi.c optional pci acpi > dev/pci/pci_host_generic_fdt.c optional pci fdt > dev/psci/psci.c optional psci > dev/psci/psci_arm64.S optional psci > > Modified: head/sys/dev/acpica/acpi.c > ============================================================================== > --- head/sys/dev/acpica/acpi.c Wed Mar 7 09:58:36 2018 (r330574) > +++ head/sys/dev/acpica/acpi.c Wed Mar 7 10:47:27 2018 (r330575) > @@ -1883,6 +1883,29 @@ acpi_enable_pcie(void) > alloc++; > } > } > +#elif defined(__aarch64__) > +static void > +acpi_enable_pcie(device_t child, int segment) > +{ > + ACPI_TABLE_HEADER *hdr; > + ACPI_MCFG_ALLOCATION *alloc, *end; > + ACPI_STATUS status; > + > + status = AcpiGetTable(ACPI_SIG_MCFG, 1, &hdr); > + if (ACPI_FAILURE(status)) > + return; > + > + end = (ACPI_MCFG_ALLOCATION *)((char *)hdr + hdr->Length); > + alloc = (ACPI_MCFG_ALLOCATION *)((ACPI_TABLE_MCFG *)hdr + 1); > + while (alloc < end) { > + if (alloc->PciSegment == segment) { > + bus_set_resource(child, SYS_RES_MEMORY, 0, > + alloc->Address, 0x10000000); > + return; > + } > + alloc++; > + } > +} > #endif > > /* > @@ -1974,6 +1997,9 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, voi > { > ACPI_DEVICE_INFO *devinfo; > struct acpi_device *ad; > +#ifdef __aarch64__ > + int segment; > +#endif > struct acpi_prw_data prw; > ACPI_OBJECT_TYPE type; > ACPI_HANDLE h; > @@ -2076,6 +2102,13 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, voi > ad->ad_cls_class = strtoul(devinfo->ClassCode.String, > NULL, 16); > } > +#ifdef __aarch64__ > + if ((devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0) { > + if (ACPI_SUCCESS(acpi_GetInteger(handle, "_SEG", &segment))) { > + acpi_enable_pcie(child, segment); > + } > + } > +#endif > AcpiOsFree(devinfo); > } > break; This logic probably belongs in the attach routine of the pcib driver rather than in MD #ifdef's in acpi.c. I still think we should be using acpi_pcib_acpi.c on arm64. IIRC all that is required is using a layer of indirection for PCI config access (using the existing pcib_if.m methods in the parent of acpi0 would work for this). -- John Baldwin From owner-svn-src-all@freebsd.org Wed Mar 7 17:18:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8231F41FC9; Wed, 7 Mar 2018 17:18:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B7EC823A2; Wed, 7 Mar 2018 17:18:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 865E624AE1; Wed, 7 Mar 2018 17:18:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27HIkla030722; Wed, 7 Mar 2018 17:18:46 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27HIkLe030721; Wed, 7 Mar 2018 17:18:46 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803071718.w27HIkLe030721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 7 Mar 2018 17:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330612 - head/stand/ficl X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/ficl X-SVN-Commit-Revision: 330612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 17:18:47 -0000 Author: kevans Date: Wed Mar 7 17:18:46 2018 New Revision: 330612 URL: https://svnweb.freebsd.org/changeset/base/330612 Log: stand/ficl: Fix testmain testmain is a userland application intended to be built with standard headers and whatnot, which we broke. Fix it by having the testmain build clobber cflags, reducing it to just the set of defines/includes it needs to build. Discussed with: imp MFC after: 3 days Modified: head/stand/ficl/Makefile Modified: head/stand/ficl/Makefile ============================================================================== --- head/stand/ficl/Makefile Wed Mar 7 17:16:41 2018 (r330611) +++ head/stand/ficl/Makefile Wed Mar 7 17:18:46 2018 (r330612) @@ -13,7 +13,8 @@ SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES+= softcore.c testmain testmain.o .ifmake testmain -CFLAGS+= -DTESTMAIN -D_TESTMAIN +CFLAGS= -DTESTMAIN -D_TESTMAIN +CFLAGS+= -I${FICLSRC} -I${FICLSRC}/${FICL_CPUARCH} -I${LDRSRC} SRCS+= testmain.c PROG= testmain .include From owner-svn-src-all@freebsd.org Wed Mar 7 17:33:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB781F43356; Wed, 7 Mar 2018 17:33:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E3188322C; Wed, 7 Mar 2018 17:33:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 987A924E1D; Wed, 7 Mar 2018 17:33:41 +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 w27HXfNK040588; Wed, 7 Mar 2018 17:33:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27HXf4A040587; Wed, 7 Mar 2018 17:33:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803071733.w27HXf4A040587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 7 Mar 2018 17:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330613 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 330613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 17:33:42 -0000 Author: emaste Date: Wed Mar 7 17:33:41 2018 New Revision: 330613 URL: https://svnweb.freebsd.org/changeset/base/330613 Log: Disable LLD_BOOTSTRAP under WITHOUT_CROSS_COMPILER LLD is a cross toolchain component. It shouldn't be built when requesting a build without building a cross compiler. (CROSS_COMPILER is somewhat unfortunately named; in any case, lld should be treated as GNU binutils here.) Submitted by: Dan McGregor MFC after: 1 week Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Mar 7 17:18:46 2018 (r330612) +++ head/share/mk/src.opts.mk Wed Mar 7 17:33:41 2018 (r330613) @@ -437,6 +437,7 @@ MK_BINUTILS_BOOTSTRAP:= no MK_CLANG_BOOTSTRAP:= no MK_ELFTOOLCHAIN_BOOTSTRAP:= no MK_GCC_BOOTSTRAP:= no +MK_LLD_BOOTSTRAP:= no .endif .if ${MK_TOOLCHAIN} == "no" From owner-svn-src-all@freebsd.org Wed Mar 7 17:37:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25D54F437B8; Wed, 7 Mar 2018 17:37:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA11783511; Wed, 7 Mar 2018 17:37:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4DDC24E24; Wed, 7 Mar 2018 17:37:36 +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 w27Hbait040766; Wed, 7 Mar 2018 17:37:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27HbaXM040765; Wed, 7 Mar 2018 17:37:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803071737.w27HbaXM040765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 7 Mar 2018 17:37:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330614 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 330614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 17:37:37 -0000 Author: emaste Date: Wed Mar 7 17:37:36 2018 New Revision: 330614 URL: https://svnweb.freebsd.org/changeset/base/330614 Log: Regen src.conf.5 after r330613 CROSS_TOOLCHAIN change Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Mar 7 17:33:41 2018 (r330613) +++ head/share/man/man5/src.conf.5 Wed Mar 7 17:37:36 2018 (r330614) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd March 1, 2018 +.Dd March 7, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -397,6 +397,8 @@ When set, it enforces these options: .Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP .It .Va WITHOUT_GCC_BOOTSTRAP +.It +.Va WITHOUT_LLD_BOOTSTRAP .El .It Va WITHOUT_CRYPT Set to not build any crypto code. From owner-svn-src-all@freebsd.org Wed Mar 7 18:03:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 160BAF45922; Wed, 7 Mar 2018 18:03:23 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC3B684A26; Wed, 7 Mar 2018 18:03:22 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7088252EB; Wed, 7 Mar 2018 18:03:22 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27I3Mvs055652; Wed, 7 Mar 2018 18:03:22 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27I3MSU055650; Wed, 7 Mar 2018 18:03:22 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201803071803.w27I3MSU055650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Wed, 7 Mar 2018 18:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330615 - in head/sys/amd64: include vmm/intel X-SVN-Group: head X-SVN-Commit-Author: tychon X-SVN-Commit-Paths: in head/sys/amd64: include vmm/intel X-SVN-Commit-Revision: 330615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:03:23 -0000 Author: tychon Date: Wed Mar 7 18:03:22 2018 New Revision: 330615 URL: https://svnweb.freebsd.org/changeset/base/330615 Log: Fix a lock recursion introduced in r327065. Reported by: kmacy Reviewed by: grehan, jhb Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D14548 Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Wed Mar 7 17:37:36 2018 (r330614) +++ head/sys/amd64/include/vmm.h Wed Mar 7 18:03:22 2018 (r330615) @@ -636,6 +636,7 @@ struct vm_exit { } spinup_ap; struct { uint64_t rflags; + uint64_t intr_status; } hlt; struct { int vector; Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Wed Mar 7 17:37:36 2018 (r330614) +++ head/sys/amd64/vmm/intel/vmx.c Wed Mar 7 18:03:22 2018 (r330615) @@ -2282,6 +2282,11 @@ vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_ vmm_stat_incr(vmx->vm, vcpu, VMEXIT_HLT, 1); vmexit->exitcode = VM_EXITCODE_HLT; vmexit->u.hlt.rflags = vmcs_read(VMCS_GUEST_RFLAGS); + if (virtual_interrupt_delivery) + vmexit->u.hlt.intr_status = + vmcs_read(VMCS_GUEST_INTR_STATUS); + else + vmexit->u.hlt.intr_status = 0; break; case EXIT_REASON_MTF: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_MTRAP, 1); @@ -3267,12 +3272,13 @@ vmx_pending_intr(struct vlapic *vlapic, int *vecptr) * interrupt by reevaluating virtual interrupts * following Section 29.2.1 in the Intel SDM Volume 3. */ - uint64_t val; + struct vm_exit *vmexit; uint8_t rvi, ppr; - vmx_getreg(vlapic_vtx->vmx, vlapic->vcpuid, - VMCS_IDENT(VMCS_GUEST_INTR_STATUS), &val); - rvi = val & APIC_TPR_INT; + vmexit = vm_exitinfo(vlapic->vm, vlapic->vcpuid); + KASSERT(vmexit->exitcode == VM_EXITCODE_HLT, + ("vmx_pending_intr: exitcode not 'HLT'")); + rvi = vmexit->u.hlt.intr_status & APIC_TPR_INT; lapic = vlapic->apic_page; ppr = lapic->ppr & APIC_TPR_INT; if (rvi > ppr) { From owner-svn-src-all@freebsd.org Wed Mar 7 18:20:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B9B1F46EDF for ; Wed, 7 Mar 2018 18:20:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic311-36.consmr.mail.gq1.yahoo.com (sonic311-36.consmr.mail.gq1.yahoo.com [98.137.65.217]) (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 D666785A2B for ; Wed, 7 Mar 2018 18:20:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1520446813; bh=H2fpxJYxR8Y7gk7hMU0VtNiZW9ietHk0qKIgMrpv5A4=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=P7/1nrl/OYhB4I3yo1MnwuTM7bMFQ1a55KlDl7s7JKIwHNxQWc4BwYlvJZRwx+VBNgrnM2okfYP84C4XbiGaYME5tjmDQd+ZdfwgETyc57t6R0CGg5EV4/iyRog8cHIL5o17cyPsVGSi7/A0x4XNPWSKjq67MN5ZOqJYNFxX7guesF1dfzerMe97Qm5NFo8Rn2uq2zXhaz7zL8/5b73dTVaPv++HIABhXKMwnWH1yWKzUH9hDjK3343ZO+ztxeAtGI6mjObbqO74dbpJ/EdD0CGKVjVat3F009I/dJr53CtgRD7BqF/QGqlhNy2R3K68G0BCWCqcGYIB3BpfI06/lg== X-YMail-OSG: 5N5TbQkVM1ktYN5bwcaBWdrVm0jzAL2SsnRTolUISD3b1LGcaKqHpXM4YYLWXwV .o7ZhC6kCxMoire1n349jkmCd_l7hX89fmO6DVEevuhjUkOoeE7Map9gcMALbod757vbDTDYbd9b fgGBEb1.ZKCMEg1gMsN3PI8frNNvdSjLUXV9VVXiEwsY_aE1pa46SPHfegbgxMe_7VigcKXdjpjx .kjAIG7mbimphWjFTK7W7AxnfkotK_gA84nh3AoqJESgAqVlEMLxdwh5s.JfDNmyljwL5QuAUDZj dFG1sNf1_p3q2B4uKOvwhQf9Dq6p.qL_OHc3mZFTZ3vSsZLAI8LHMaaNbL1l5j1vG0LoV.QDlUZb YziuMWShZrjhmsARzohKZ5DNigdCsqr28yHs7tg9t9gfCrXgWxBqKmqpGeJ2eqkoItMYno04Bo_h 7g.pwak66eHAvvQLhMz_L9RDsMvggGE5uQ6UHS_aMDwZUXKcu19DwJOMlDDMFDL9r2aalvBY4WER 1K0e07KwTgtQ- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Wed, 7 Mar 2018 18:20:13 +0000 Received: from smtp103.rhel.mail.gq1.yahoo.com (EHLO [192.168.0.5]) ([68.180.227.11]) by smtp407.mail.gq1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 3fe462febc7181c785a57f1c1e7e35dd; Wed, 07 Mar 2018 18:20:13 +0000 (UTC) Subject: Re: svn commit: r330601 - head/sys/i386/ibcs2 To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803071444.w27EiWBV053244@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: Date: Wed, 7 Mar 2018 13:20:14 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803071444.w27EiWBV053244@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:20:20 -0000 FWIW ... ibcs2 is candidate for future removal. We tried to get some vendor interest in it but we failed and given this is very i386-specific it is probably not worth spending huge efforts on it. cloudabi seems to be, for all purposes, a better conceptual replacement. Pedro. On 07/03/2018 09:44, Eitan Adler wrote: > Author: eadler > Date: Wed Mar 7 14:44:32 2018 > New Revision: 330601 > URL: https://svnweb.freebsd.org/changeset/base/330601 > > Log: > sys: Fix a few potential infoleaks in cloudabi > > While there is no immediate leak, if the structure changes underneath > us, there might be in the future. > > Submitted by: Domagoj Stolfa > MFC After: 1 month > Sponsored by: DARPA/AFRL > > Modified: > head/sys/i386/ibcs2/ibcs2_ipc.c > > Modified: head/sys/i386/ibcs2/ibcs2_ipc.c > ============================================================================== > --- head/sys/i386/ibcs2/ibcs2_ipc.c Wed Mar 7 14:41:29 2018 (r330600) > +++ head/sys/i386/ibcs2/ibcs2_ipc.c Wed Mar 7 14:44:32 2018 (r330601) > @@ -135,6 +135,8 @@ ibcs2_msgctl(struct thread *td, void *v) > struct msqid_ds bs; > int error; > > + memset(&is, 0, sizeof(is)); > + > switch (uap->cmd) { > case IBCS2_IPC_STAT: > error = kern_msgctl(td, uap->msqid, IPC_STAT, &bs); > @@ -317,6 +319,8 @@ ibcs2_semctl(struct thread *td, void *v) > union semun semun; > register_t rval; > int error; > + > + memset(&is, 0, sizeof(is)); > > switch(uap->cmd) { > case IBCS2_IPC_STAT: > From owner-svn-src-all@freebsd.org Wed Mar 7 18:25:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2438F475D2; Wed, 7 Mar 2018 18:25:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 900DE85FAB; Wed, 7 Mar 2018 18:25:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8ACDA25622; Wed, 7 Mar 2018 18:25:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27IPR13065736; Wed, 7 Mar 2018 18:25:27 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27IPRov065734; Wed, 7 Mar 2018 18:25:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803071825.w27IPRov065734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 7 Mar 2018 18:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330616 - in head/stand: liblua lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/stand: liblua lua X-SVN-Commit-Revision: 330616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:25:28 -0000 Author: kevans Date: Wed Mar 7 18:25:27 2018 New Revision: 330616 URL: https://svnweb.freebsd.org/changeset/base/330616 Log: lualoader: Expose loader.parse and add cli_execute_unparsed This will be used for scenarios where the command to execute is coming in via the environment (from, for example, loader.conf(5)) and is thus not necessarily trusted. cli_execute_unparsed will immediately be used for handling module_{before,after,error} as well as menu_timeout_command. We still want to offer these variables the ability to execute Lua-intercepted loader commands, but we don't want them to be able to execute arbitrary Lua. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D14580 Modified: head/stand/liblua/lutils.c head/stand/lua/cli.lua Modified: head/stand/liblua/lutils.c ============================================================================== --- head/stand/liblua/lutils.c Wed Mar 7 18:03:22 2018 (r330615) +++ head/stand/liblua/lutils.c Wed Mar 7 18:25:27 2018 (r330616) @@ -97,6 +97,24 @@ lua_interpret(lua_State *L) } static int +lua_parse(lua_State *L) +{ + int argc, nargc; + char **argv; + + if (parse(&argc, &argv, luaL_checkstring(L, 1)) == 0) { + for (nargc = 0; nargc < argc; ++nargc) { + lua_pushstring(L, argv[nargc]); + } + free(argv); + return nargc; + } + + lua_pushnil(L); + return 1; +} + +static int lua_getchar(lua_State *L) { @@ -325,6 +343,7 @@ static const struct luaL_Reg loaderlib[] = { REG_SIMPLE(delay), REG_SIMPLE(command), REG_SIMPLE(interpret), + REG_SIMPLE(parse), REG_SIMPLE(getenv), REG_SIMPLE(perform), /* Also registered as the global 'printc' */ Modified: head/stand/lua/cli.lua ============================================================================== --- head/stand/lua/cli.lua Wed Mar 7 18:03:22 2018 (r330615) +++ head/stand/lua/cli.lua Wed Mar 7 18:25:27 2018 (r330616) @@ -94,6 +94,10 @@ function cli_execute(...) end +function cli.execute_unparsed(str) + cli_execute(loader.parse(str)) +end + -- Module exports function cli.boot(...) From owner-svn-src-all@freebsd.org Wed Mar 7 18:28:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7855CF479BB; Wed, 7 Mar 2018 18:28:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BC8E861FE; Wed, 7 Mar 2018 18:28:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26B512562B; Wed, 7 Mar 2018 18:28:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27ISgEj065877; Wed, 7 Mar 2018 18:28:42 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27ISgb8065876; Wed, 7 Mar 2018 18:28:42 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803071828.w27ISgb8065876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 7 Mar 2018 18:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330617 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:28:42 -0000 Author: kevans Date: Wed Mar 7 18:28:41 2018 New Revision: 330617 URL: https://svnweb.freebsd.org/changeset/base/330617 Log: lualoader: Fix name, cli.execute_unparsed -> cli_execute_unparsed Modified: head/stand/lua/cli.lua Modified: head/stand/lua/cli.lua ============================================================================== --- head/stand/lua/cli.lua Wed Mar 7 18:25:27 2018 (r330616) +++ head/stand/lua/cli.lua Wed Mar 7 18:28:41 2018 (r330617) @@ -94,7 +94,7 @@ function cli_execute(...) end -function cli.execute_unparsed(str) +function cli_execute_unparsed(str) cli_execute(loader.parse(str)) end From owner-svn-src-all@freebsd.org Wed Mar 7 18:31:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D2D0F47D14; Wed, 7 Mar 2018 18:31:02 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC8A086416; Wed, 7 Mar 2018 18:31:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B76D125651; Wed, 7 Mar 2018 18:31:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27IV1ws066716; Wed, 7 Mar 2018 18:31:01 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27IV1L2066715; Wed, 7 Mar 2018 18:31:01 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803071831.w27IV1L2066715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 7 Mar 2018 18:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330618 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:31:02 -0000 Author: kevans Date: Wed Mar 7 18:31:01 2018 New Revision: 330618 URL: https://svnweb.freebsd.org/changeset/base/330618 Log: lualoader: Use cli_execute_unparsed instead of loader.interpret loader.interpret should not be used for executing loader commands from an untrusted source (e.g. environment vars) as it will allow execution of arbitrary Lua. Replace it with a call to the recently introduced cli_execute_unparsed, which parses it out as a loader command and then dispatches it as a loader command. This effectively filters out arbitrary Lua. Modified: head/stand/lua/menu.lua Modified: head/stand/lua/menu.lua ============================================================================== --- head/stand/lua/menu.lua Wed Mar 7 18:28:41 2018 (r330617) +++ head/stand/lua/menu.lua Wed Mar 7 18:31:01 2018 (r330618) @@ -450,7 +450,7 @@ function menu.autoboot() until time <= 0 local cmd = loader.getenv("menu_timeout_command") or "boot" - loader.interpret(cmd) + cli_execute_unparsed(cmd) end return menu From owner-svn-src-all@freebsd.org Wed Mar 7 18:31:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADC0DF47E28; Wed, 7 Mar 2018 18:31:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56109865A7; Wed, 7 Mar 2018 18:31:31 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50E9D2567B; Wed, 7 Mar 2018 18:31:31 +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 w27IVVkT066772; Wed, 7 Mar 2018 18:31:31 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27IVVwA066771; Wed, 7 Mar 2018 18:31:31 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803071831.w27IVVwA066771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 7 Mar 2018 18:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330619 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 330619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:31:32 -0000 Author: cem Date: Wed Mar 7 18:31:31 2018 New Revision: 330619 URL: https://svnweb.freebsd.org/changeset/base/330619 Log: fpu_kern.9: Document fpu_kern_enter API change in r329878 While here, clean up some of the language. Reported by: delphij Sponsored by: Dell EMC Isilon Modified: head/share/man/man9/fpu_kern.9 Modified: head/share/man/man9/fpu_kern.9 ============================================================================== --- head/share/man/man9/fpu_kern.9 Wed Mar 7 18:31:01 2018 (r330618) +++ head/share/man/man9/fpu_kern.9 Wed Mar 7 18:31:31 2018 (r330619) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2016 +.Dd March 7, 2018 .Dt FPU_KERN 9 .Os .Sh NAME @@ -34,7 +34,7 @@ .Fn fpu_kern_alloc_ctx "u_int flags" .Ft void .Fn fpu_kern_free_ctx "struct fpu_kern_ctx *ctx" -.Ft int +.Ft void .Fn fpu_kern_enter "struct thread *td" "struct fpu_kern_ctx *ctx" "u_int flags" .Ft int .Fn fpu_kern_leave "struct thread *td" "struct fpu_kern_ctx *ctx" @@ -139,19 +139,15 @@ after the function returns, as well as after each cont On i386 and amd64 this will be the .Nm Device Not Available exception (see Intel Software Developer Manual for the reference). -Currently, no errors are defined which can be returned by -.Fn fpu_kern_enter -to the caller. .Pp The .Fn fpu_kern_leave function ends the region started by .Fn fpu_kern_enter . -The uses of FPU in the kernel after the call to -.Fn fpu_kern_leave -are erroneous until the next call to +It is erroneous to use the FPU in the kernel before .Fn fpu_kern_enter -is performed. +or after +.Fn fpu_kern_leave . The function takes the .Fa td thread argument, which currently must be @@ -161,9 +157,9 @@ and the context pointer, previously passed to .Fn fpu_kern_enter . After the function returns, the context may be freed or reused -by other invocation of +by another invocation of .Fn fpu_kern_enter . -There are no errors defined for the function, it always returns 0. +The function always returns 0. .Pp The .Fn fpu_kern_thread @@ -210,3 +206,9 @@ facitily and this manual page were written by .An Konstantin Belousov Aq Mt kib@FreeBSD.org . The arm64 support was added by .An Andrew Turner Aq Mt andrew@FreeBSD.org . +.Sh BUGS +.Fn fpu_kern_leave +should probably have type +.Ft void +(like +.Fn fpu_kern_enter ) . From owner-svn-src-all@freebsd.org Wed Mar 7 18:37:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07DA5F4860A; Wed, 7 Mar 2018 18:37:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA3CD86C71; Wed, 7 Mar 2018 18:37:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5121257DF; Wed, 7 Mar 2018 18:37:04 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27Ib4Sb070863; Wed, 7 Mar 2018 18:37:04 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27Ib40v070862; Wed, 7 Mar 2018 18:37:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803071837.w27Ib40v070862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 7 Mar 2018 18:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330620 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:37:05 -0000 Author: kevans Date: Wed Mar 7 18:37:04 2018 New Revision: 330620 URL: https://svnweb.freebsd.org/changeset/base/330620 Log: lualoader: Use cli_execute_unparsed for commands passed in via loader.conf This applies to: - exec - [module]_before - [module]_error - [module]_after Before this commit, these used loader.perform to execute them as a pure, unsalted loader command. This means that they were not able to take advantage of any Lua-salted loader commands, like boot and autoboot, or pure Lua loader commands (functions attached to the 'cli' module). They now have access to the full arsenal, just shy of being able to execute arbitrary Lua. Modified: head/stand/lua/config.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Wed Mar 7 18:31:31 2018 (r330619) +++ head/stand/lua/config.lua Wed Mar 7 18:37:04 2018 (r330620) @@ -109,7 +109,7 @@ local pattern_table = { { str = "^%s*exec%s*=%s*\"([%w%s%p]-)\"%s*(.*)", process = function(k, _) - if loader.perform(k) ~= 0 then + if cli_execute_unparsed(k) ~= 0 then print(MSG_FAILEXEC:format(k)) end end, @@ -290,25 +290,25 @@ function config.loadmod(mod, silent) str = str .. k end if v.before ~= nil then - pstatus = loader.perform(v.before) == 0 + pstatus = cli_execute_unparsed(v.before) == 0 if not pstatus and not silent then print(MSG_FAILEXBEF:format(v.before, k)) end status = status and pstatus end - if loader.perform(str) ~= 0 then + if cli_execute_unparsed(str) ~= 0 then if not silent then print(MSG_FAILEXMOD:format(str)) end if v.error ~= nil then - loader.perform(v.error) + cli_execute_unparsed(v.error) end status = false end if v.after ~= nil then - pstatus = loader.perform(v.after) == 0 + pstatus = cli_execute_unparsed(v.after) == 0 if not pstatus and not silent then print(MSG_FAILEXAF:format(v.after, k)) end From owner-svn-src-all@freebsd.org Wed Mar 7 18:41:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA953F48CD5; Wed, 7 Mar 2018 18:41:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EC5387129; Wed, 7 Mar 2018 18:41:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69D4425829; Wed, 7 Mar 2018 18:41:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27IfGi5071065; Wed, 7 Mar 2018 18:41:16 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27IfGY3071064; Wed, 7 Mar 2018 18:41:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803071841.w27IfGY3071064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 7 Mar 2018 18:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330621 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 330621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:41:17 -0000 Author: kevans Date: Wed Mar 7 18:41:16 2018 New Revision: 330621 URL: https://svnweb.freebsd.org/changeset/base/330621 Log: lua-lint: Whitelist cli_execute_unparsed as a global Modified: head/tools/boot/lua-lint.sh Modified: head/tools/boot/lua-lint.sh ============================================================================== --- head/tools/boot/lua-lint.sh Wed Mar 7 18:37:04 2018 (r330620) +++ head/tools/boot/lua-lint.sh Wed Mar 7 18:41:16 2018 (r330621) @@ -16,4 +16,5 @@ LUACHECK=$(which luacheck) cd $(make -V SRCTOP)/stand ${LUACHECK} . --globals loader --globals lfs --globals io.getchar \ - --globals io.ischar --globals printc --globals cli_execute --std lua53 + --globals io.ischar --globals printc --globals cli_execute \ + --globals cli_execute_unparsed --std lua53 From owner-svn-src-all@freebsd.org Wed Mar 7 18:45:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C54E0F49227; Wed, 7 Mar 2018 18:45:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 786DD875EC; Wed, 7 Mar 2018 18:45:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 733C625983; Wed, 7 Mar 2018 18:45:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27IjOFB076222; Wed, 7 Mar 2018 18:45:24 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27IjO3X076221; Wed, 7 Mar 2018 18:45:24 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803071845.w27IjO3X076221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 7 Mar 2018 18:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330622 - head/stand/defaults X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/defaults X-SVN-Commit-Revision: 330622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:45:24 -0000 Author: kevans Date: Wed Mar 7 18:45:24 2018 New Revision: 330622 URL: https://svnweb.freebsd.org/changeset/base/330622 Log: loader.conf(5): Document some other settings These tend to have less coverage in other places and they don't have defaults as of yet, so mention them here: - fdt_overlays - kernels_autodetect (lualoader only) Modified: head/stand/defaults/loader.conf.5 Modified: head/stand/defaults/loader.conf.5 ============================================================================== --- head/stand/defaults/loader.conf.5 Wed Mar 7 18:41:16 2018 (r330621) +++ head/stand/defaults/loader.conf.5 Wed Mar 7 18:45:24 2018 (r330622) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd January 6, 2016 +.Dd March 7, 2018 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -277,6 +277,23 @@ See the entropy entries in .Pq Dq /boot/entropy The name of the very early boot-time entropy cache file. +.El +.Sh OTHER SETTINGS +Other settings that may be used in +.Nm +that have no default value: +.Bl -tag -width bootfile -offset indent +.It Va fdt_overlays +Specifies a comma-delimited list of FDT overlays to apply. +.Pa /boot/overlays +is created by default for overlays to be placed in. +.It Va kernels_autodetect +If set to +.Dq YES , +attempt to auto-detect kernels installed in +.Pa /boot . +This is an option specific to the Lua-based loader. +It is not available in the default Forth-based loader. .El .Sh FILES .Bl -tag -width /boot/defaults/loader.conf -compact From owner-svn-src-all@freebsd.org Wed Mar 7 18:46:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A88E6F49426 for ; Wed, 7 Mar 2018 18:46:52 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 683B08781A for ; Wed, 7 Mar 2018 18:46:51 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f47.google.com with SMTP id q69-v6so4706961lfi.10 for ; Wed, 07 Mar 2018 10:46:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=JyhCtU6+xMTUFvJd7i46jdRq6cQYkSahuppEIfUNYB0=; b=XQsYOGro2mDcK6SqNzwIj21JcWggb4aa3+KERpKNORkQUetcs9uiSUlYfAHGry46lP vPMkFvvzqbjDGcPlEVTOnUCtMiAjhR1Lo/+VfPq9bH4c9wtMdovg9XTVGNza+CPAa3cJ NAvg0jXXDTSYmQB9Avcza6tSq56QMTmB9fnotZElZMpR4SyXfdazDfQcXjVH0S7fJhV4 mRoXQtZ+mcq9MpjcZyiXBu+JGQ+dSl3K2DJRoByhG21Dg7FRCSuT8HFQw1kPdMRQT0Mt /qoV/wPvP4UairAqaTKD5v7rf+Gve9hxy+acvz3zU/GNSTlEvDEBPFnlyzrCd1tzNvY+ wUIg== X-Gm-Message-State: AElRT7FPO7SJgI+uREzwCGlNatENCXM+MlVeGcmFjIx5wpd+Cj8vOCvi HvQ/FQOfzluEYh86PbaA1eGf/Yv+ X-Google-Smtp-Source: AG47ELtVIrl/X2z0aoLF6oAY8Q8SSt26f5Q+bHJ2RpaTBRBu7yVYApNlK5ehAzt3PzH9FNDCWqY3zg== X-Received: by 10.25.78.79 with SMTP id c76mr15812172lfb.98.1520448403499; Wed, 07 Mar 2018 10:46:43 -0800 (PST) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com. [209.85.215.48]) by smtp.gmail.com with ESMTPSA id h11sm3772155lfd.88.2018.03.07.10.46.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Mar 2018 10:46:43 -0800 (PST) Received: by mail-lf0-f48.google.com with SMTP id v9-v6so4709931lfa.11 for ; Wed, 07 Mar 2018 10:46:43 -0800 (PST) X-Received: by 10.46.87.72 with SMTP id r8mt18615811ljd.93.1520448403138; Wed, 07 Mar 2018 10:46:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.54.1 with HTTP; Wed, 7 Mar 2018 10:46:22 -0800 (PST) In-Reply-To: <201803071845.w27IjO3X076221@repo.freebsd.org> References: <201803071845.w27IjO3X076221@repo.freebsd.org> From: Kyle Evans Date: Wed, 7 Mar 2018 12:46:22 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r330622 - head/stand/defaults Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 18:46:52 -0000 On Wed, Mar 7, 2018 at 12:45 PM, Kyle Evans wrote: > Author: kevans > Date: Wed Mar 7 18:45:24 2018 > New Revision: 330622 > URL: https://svnweb.freebsd.org/changeset/base/330622 > > Log: > loader.conf(5): Document some other settings > > These tend to have less coverage in other places and they don't have > defaults as of yet, so mention them here: > - fdt_overlays > - kernels_autodetect (lualoader only) > Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D14522 Whoops. =) From owner-svn-src-all@freebsd.org Wed Mar 7 20:01:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B48B1F2B4AE; Wed, 7 Mar 2018 20:01:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A1066B1BC; Wed, 7 Mar 2018 20:01:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 5A87810A87D; Wed, 7 Mar 2018 15:01:25 -0500 (EST) From: John Baldwin To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 Date: Wed, 07 Mar 2018 09:37:16 -0800 Message-ID: <8377086.JrIgVVMXMv@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <201803050754.w257swAE001435@repo.freebsd.org> <6465173.s2nWvWCLOs@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 07 Mar 2018 15:01:25 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 20:01:26 -0000 On Tuesday, March 06, 2018 06:46:37 PM Eitan Adler wrote: > On 6 March 2018 at 08:26, John Baldwin wrote: > > On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: > >> On 5 March 2018 at 10:08, John Baldwin wrote: > >> > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: > >> >> Author: eadler > >> >> Date: Mon Mar 5 07:54:57 2018 > >> >> New Revision: 330451 > >> >> URL: https://svnweb.freebsd.org/changeset/base/330451 > >> >> > >> >> Log: > >> >> MFC r306837: > >> >> > >> >> [net80211] extend the ieee80211_rx_stats struct to include more information. > >> > > >> > Have you thought about the KBI implications of this change and some of the > >> > other changes you've merged? > >> > >> I do have a copy of the modules from 11.1 and have loaded them at > >> various points in time after merging. That said, I am not perfect. > >> Unfortunately, my -STABLE box did not have fully functioning drivers > >> before these changes so its difficult to test anything beyond "loads > >> and does not panic.". I havn't done so today yet, but that will happen > >> soon. > >> > >> Ensuring these things work through code inspection is certainly > >> possible and I've skipped over several changes as a result. > > > > Loading a module doesn't alone doesn't actually test for breakage. > > I'm aware. In this case I should likely just revert this change since > its a pretty blatant break. I suspect many of these changes for iwm, etc. are all intertwined so I'm not sure if you can leave out individual ones. > > Batching > > up changes into a single diff is also helpful since if an API changes back > > and forth in HEAD multiple times, collapsing them means that for stable you > > may only need a single compat shim rather than several. > > Understood. My intention in doing them one-by-one was to make it > easier to bisect if something goes wrong. For stable I think we also want to balance this with: 1) Not putting stable in a known-broken state. If there are followup fixes either for compile or runtime performances, those followup fixes should always be included in the commit that merges the original change. 2) Preserving ABI. The desire to avoid putting stable into known-broken state means that MFCs should include the ABI shims along with the original change. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Mar 7 20:42:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2E75F2EC6B; Wed, 7 Mar 2018 20:42:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 7786B6D3A2; Wed, 7 Mar 2018 20:42:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.101] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 4364C1A3927; Thu, 8 Mar 2018 07:42:37 +1100 (AEDT) Date: Thu, 8 Mar 2018 07:42:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Benjamin Kaduk cc: Ed Maste , Eitan Adler , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r330602 - head/sys/compat/cloudabi In-Reply-To: Message-ID: <20180308070722.R1227@besplex.bde.org> References: <201803071447.w27Elh7C053393@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=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=gcnCtRpcewpaml6cjn8A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 20:42:46 -0000 On Wed, 7 Mar 2018, Benjamin Kaduk wrote: > On Wed, Mar 7, 2018 at 9:44 AM, Ed Maste wrote: > >> On 7 March 2018 at 09:47, Eitan Adler wrote: >>> ... >>> Log: >>> sys/cloudabi: Avoid relying on GNU specific extensions >>> >>> An empty initializer list is not technically valid C grammar. >>> >>> MFC After: 1 week >>> >>> - cloudabi_fdstat_t fsb = {}; >>> + cloudabi_fdstat_t fsb = {0}; >> >> In practice it appears initializing via { 0 } also zeros any padding >> in the struct, but I do not believe it's required by the C standard. >> Perhaps a language lawyer can weigh in? >> >> Commenting on this commit just because it's highlighted by this >> change; I do not believe there's a difference between the GNU >> extension { } and { 0 } here. It is also a style bug to initialize variables in declarations. It is interesting that this style bug gives other bugs that are more serious than when the style rule was new: - locking is often needed before complicated initializations. It would be an even larger style bug to write the lock acquisition in initializers, and C doesn't have finalizers so it is impossible to obfuscate the lock release by writing it in finalizers - this problem of initializing padding. Auto initializers also used to be good for pessimizations. Use them instead of static initializers for constant values. This asks the compiler to initialize them on every entry to the function. It was a typical implementation to keep the values in an unnamed static object and copy this to the stack at runtime. Now compilers are more likely to optimize away the copying, so the pessimization doesn't work so well. Copying from a static object tends to give zero padding, but optimizated variants should only give zero padding if that is optimal. > The C spec says that if an incomplete initializer is given, then all other > fields > of the structure are initialized to zero. The state of padding is > unspecified, > whether a complete or incomplete initializer is given. This seems to apply to static objects too. So initializing dynamic objects by copying them from static objects is insecure even if you copy using memcpy() (copying using struct assignment might skip the padding so shouldn't be used). A malicious compiler could initialize the padding with security-related info. non-malicious compiler might initialize the padding with stack garbage that happens to be security-related. Bruce From owner-svn-src-all@freebsd.org Wed Mar 7 20:50:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32F87F2F5B8; Wed, 7 Mar 2018 20:50:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFE756D8C8; Wed, 7 Mar 2018 20:50:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B986126D22; Wed, 7 Mar 2018 20:50:29 +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 w27KoT9v036263; Wed, 7 Mar 2018 20:50:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27KoT7j036256; Wed, 7 Mar 2018 20:50:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803072050.w27KoT7j036256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 7 Mar 2018 20:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330623 - in stable/11: sys/amd64/include sys/amd64/vmm/amd sys/amd64/vmm/intel usr.sbin/bhyvectl X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/11: sys/amd64/include sys/amd64/vmm/amd sys/amd64/vmm/intel usr.sbin/bhyvectl X-SVN-Commit-Revision: 330623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 20:50:30 -0000 Author: jhb Date: Wed Mar 7 20:50:28 2018 New Revision: 330623 URL: https://svnweb.freebsd.org/changeset/base/330623 Log: MFC 328102: Save and restore guest debug registers. Currently most of the debug registers are not saved and restored during VM transitions allowing guest and host debug register values to leak into the opposite context. One result is that hardware watchpoints do not work reliably within a guest under VT-x. Due to differences in SVM and VT-x, slightly different approaches are used. For VT-x: - Enable debug register save/restore for VM entry/exit in the VMCS for DR7 and MSR_DEBUGCTL. - Explicitly save DR0-3,6 of the guest. - Explicitly save DR0-3,6-7, MSR_DEBUGCTL, and the trap flag from %rflags for the host. Note that because DR6 is "software" managed and not stored in the VMCS a kernel debugger which single steps through VM entry could corrupt the guest DR6 (since a single step trap taken after loading the guest DR6 could alter the DR6 register). To avoid this, explicitly disable single-stepping via the trace flag before loading the guest DR6. A determined debugger could still defeat this by setting a breakpoint after the guest DR6 was loaded and then single-stepping. For SVM: - Enable debug register caching in the VMCB for DR6/DR7. - Explicitly save DR0-3 of the guest. - Explicitly save DR0-3,6-7, and MSR_DEBUGCTL for the host. Since SVM saves the guest DR6 in the VMCB, the race with single-stepping described for VT-x does not exist. For both platforms, expose all of the guest DRx values via --get-drX and --set-drX flags to bhyvectl. Modified: stable/11/sys/amd64/include/vmm.h stable/11/sys/amd64/vmm/amd/svm.c stable/11/sys/amd64/vmm/amd/svm.h stable/11/sys/amd64/vmm/amd/vmcb.c stable/11/sys/amd64/vmm/intel/vmx.c stable/11/sys/amd64/vmm/intel/vmx.h stable/11/usr.sbin/bhyvectl/bhyvectl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/include/vmm.h ============================================================================== --- stable/11/sys/amd64/include/vmm.h Wed Mar 7 18:45:24 2018 (r330622) +++ stable/11/sys/amd64/include/vmm.h Wed Mar 7 20:50:28 2018 (r330623) @@ -83,6 +83,11 @@ enum vm_reg_name { VM_REG_GUEST_PDPTE2, VM_REG_GUEST_PDPTE3, VM_REG_GUEST_INTR_SHADOW, + VM_REG_GUEST_DR0, + VM_REG_GUEST_DR1, + VM_REG_GUEST_DR2, + VM_REG_GUEST_DR3, + VM_REG_GUEST_DR6, VM_REG_LAST }; Modified: stable/11/sys/amd64/vmm/amd/svm.c ============================================================================== --- stable/11/sys/amd64/vmm/amd/svm.c Wed Mar 7 18:45:24 2018 (r330622) +++ stable/11/sys/amd64/vmm/amd/svm.c Wed Mar 7 20:50:28 2018 (r330623) @@ -87,6 +87,7 @@ SYSCTL_NODE(_hw_vmm, OID_AUTO, svm, CTLFLAG_RW, NULL, VMCB_CACHE_TPR | \ VMCB_CACHE_CR2 | \ VMCB_CACHE_CR | \ + VMCB_CACHE_DR | \ VMCB_CACHE_DT | \ VMCB_CACHE_SEG | \ VMCB_CACHE_NP) @@ -504,6 +505,10 @@ vmcb_init(struct svm_softc *sc, int vcpu, uint64_t iop PAT_VALUE(5, PAT_WRITE_THROUGH) | PAT_VALUE(6, PAT_UNCACHED) | PAT_VALUE(7, PAT_UNCACHEABLE); + + /* Set up DR6/7 to power-on state */ + state->dr6 = 0xffff0ff0; + state->dr7 = 0x400; } /* @@ -1861,6 +1866,60 @@ enable_gintr(void) __asm __volatile("stgi"); } +static __inline void +svm_dr_enter_guest(struct svm_regctx *gctx) +{ + + /* Save host control debug registers. */ + gctx->host_dr7 = rdr7(); + gctx->host_debugctl = rdmsr(MSR_DEBUGCTLMSR); + + /* + * Disable debugging in DR7 and DEBUGCTL to avoid triggering + * exceptions in the host based on the guest DRx values. The + * guest DR6, DR7, and DEBUGCTL are saved/restored in the + * VMCB. + */ + load_dr7(0); + wrmsr(MSR_DEBUGCTLMSR, 0); + + /* Save host debug registers. */ + gctx->host_dr0 = rdr0(); + gctx->host_dr1 = rdr1(); + gctx->host_dr2 = rdr2(); + gctx->host_dr3 = rdr3(); + gctx->host_dr6 = rdr6(); + + /* Restore guest debug registers. */ + load_dr0(gctx->sctx_dr0); + load_dr1(gctx->sctx_dr1); + load_dr2(gctx->sctx_dr2); + load_dr3(gctx->sctx_dr3); +} + +static __inline void +svm_dr_leave_guest(struct svm_regctx *gctx) +{ + + /* Save guest debug registers. */ + gctx->sctx_dr0 = rdr0(); + gctx->sctx_dr1 = rdr1(); + gctx->sctx_dr2 = rdr2(); + gctx->sctx_dr3 = rdr3(); + + /* + * Restore host debug registers. Restore DR7 and DEBUGCTL + * last. + */ + load_dr0(gctx->host_dr0); + load_dr1(gctx->host_dr1); + load_dr2(gctx->host_dr2); + load_dr3(gctx->host_dr3); + load_dr6(gctx->host_dr6); + wrmsr(MSR_DEBUGCTLMSR, gctx->host_debugctl); + load_dr7(gctx->host_dr7); +} + /* * Start vcpu with specified RIP. */ @@ -1973,7 +2032,9 @@ svm_vmrun(void *arg, int vcpu, register_t rip, pmap_t /* Launch Virtual Machine. */ VCPU_CTR1(vm, vcpu, "Resume execution at %#lx", state->rip); + svm_dr_enter_guest(gctx); svm_launch(vmcb_pa, gctx, &__pcpu[curcpu]); + svm_dr_leave_guest(gctx); CPU_CLR_ATOMIC(curcpu, &pmap->pm_active); @@ -2042,6 +2103,14 @@ swctx_regptr(struct svm_regctx *regctx, int reg) return (®ctx->sctx_r14); case VM_REG_GUEST_R15: return (®ctx->sctx_r15); + case VM_REG_GUEST_DR0: + return (®ctx->sctx_dr0); + case VM_REG_GUEST_DR1: + return (®ctx->sctx_dr1); + case VM_REG_GUEST_DR2: + return (®ctx->sctx_dr2); + case VM_REG_GUEST_DR3: + return (®ctx->sctx_dr3); default: return (NULL); } Modified: stable/11/sys/amd64/vmm/amd/svm.h ============================================================================== --- stable/11/sys/amd64/vmm/amd/svm.h Wed Mar 7 18:45:24 2018 (r330622) +++ stable/11/sys/amd64/vmm/amd/svm.h Wed Mar 7 20:50:28 2018 (r330623) @@ -49,6 +49,18 @@ struct svm_regctx { register_t sctx_r13; register_t sctx_r14; register_t sctx_r15; + register_t sctx_dr0; + register_t sctx_dr1; + register_t sctx_dr2; + register_t sctx_dr3; + + register_t host_dr0; + register_t host_dr1; + register_t host_dr2; + register_t host_dr3; + register_t host_dr6; + register_t host_dr7; + uint64_t host_debugctl; }; void svm_launch(uint64_t pa, struct svm_regctx *gctx, struct pcpu *pcpu); Modified: stable/11/sys/amd64/vmm/amd/vmcb.c ============================================================================== --- stable/11/sys/amd64/vmm/amd/vmcb.c Wed Mar 7 18:45:24 2018 (r330622) +++ stable/11/sys/amd64/vmm/amd/vmcb.c Wed Mar 7 20:50:28 2018 (r330623) @@ -187,6 +187,10 @@ vmcb_read(struct svm_softc *sc, int vcpu, int ident, u *retval = state->cr4; break; + case VM_REG_GUEST_DR6: + *retval = state->dr6; + break; + case VM_REG_GUEST_DR7: *retval = state->dr7; break; @@ -278,8 +282,14 @@ vmcb_write(struct svm_softc *sc, int vcpu, int ident, svm_set_dirty(sc, vcpu, VMCB_CACHE_CR); break; + case VM_REG_GUEST_DR6: + state->dr6 = val; + svm_set_dirty(sc, vcpu, VMCB_CACHE_DR); + break; + case VM_REG_GUEST_DR7: state->dr7 = val; + svm_set_dirty(sc, vcpu, VMCB_CACHE_DR); break; case VM_REG_GUEST_EFER: Modified: stable/11/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/11/sys/amd64/vmm/intel/vmx.c Wed Mar 7 18:45:24 2018 (r330622) +++ stable/11/sys/amd64/vmm/intel/vmx.c Wed Mar 7 20:50:28 2018 (r330623) @@ -96,18 +96,20 @@ __FBSDID("$FreeBSD$"); #define PROCBASED_CTLS2_ZERO_SETTING 0 #define VM_EXIT_CTLS_ONE_SETTING \ - (VM_EXIT_HOST_LMA | \ + (VM_EXIT_SAVE_DEBUG_CONTROLS | \ + VM_EXIT_HOST_LMA | \ VM_EXIT_SAVE_EFER | \ VM_EXIT_LOAD_EFER | \ VM_EXIT_ACKNOWLEDGE_INTERRUPT) -#define VM_EXIT_CTLS_ZERO_SETTING VM_EXIT_SAVE_DEBUG_CONTROLS +#define VM_EXIT_CTLS_ZERO_SETTING 0 -#define VM_ENTRY_CTLS_ONE_SETTING (VM_ENTRY_LOAD_EFER) +#define VM_ENTRY_CTLS_ONE_SETTING \ + (VM_ENTRY_LOAD_DEBUG_CONTROLS | \ + VM_ENTRY_LOAD_EFER) #define VM_ENTRY_CTLS_ZERO_SETTING \ - (VM_ENTRY_LOAD_DEBUG_CONTROLS | \ - VM_ENTRY_INTO_SMM | \ + (VM_ENTRY_INTO_SMM | \ VM_ENTRY_DEACTIVATE_DUAL_MONITOR) #define HANDLED 1 @@ -914,6 +916,9 @@ vmx_vminit(struct vm *vm, pmap_t pmap) exc_bitmap = 1 << IDT_MC; error += vmwrite(VMCS_EXCEPTION_BITMAP, exc_bitmap); + vmx->ctx[i].guest_dr6 = 0xffff0ff0; + error += vmwrite(VMCS_GUEST_DR7, 0x400); + if (virtual_interrupt_delivery) { error += vmwrite(VMCS_APIC_ACCESS, APIC_ACCESS_ADDRESS); error += vmwrite(VMCS_VIRTUAL_APIC, @@ -2570,6 +2575,73 @@ vmx_exit_handle_nmi(struct vmx *vmx, int vcpuid, struc } } +static __inline void +vmx_dr_enter_guest(struct vmxctx *vmxctx) +{ + register_t rflags; + + /* Save host control debug registers. */ + vmxctx->host_dr7 = rdr7(); + vmxctx->host_debugctl = rdmsr(MSR_DEBUGCTLMSR); + + /* + * Disable debugging in DR7 and DEBUGCTL to avoid triggering + * exceptions in the host based on the guest DRx values. The + * guest DR7 and DEBUGCTL are saved/restored in the VMCS. + */ + load_dr7(0); + wrmsr(MSR_DEBUGCTLMSR, 0); + + /* + * Disable single stepping the kernel to avoid corrupting the + * guest DR6. A debugger might still be able to corrupt the + * guest DR6 by setting a breakpoint after this point and then + * single stepping. + */ + rflags = read_rflags(); + vmxctx->host_tf = rflags & PSL_T; + write_rflags(rflags & ~PSL_T); + + /* Save host debug registers. */ + vmxctx->host_dr0 = rdr0(); + vmxctx->host_dr1 = rdr1(); + vmxctx->host_dr2 = rdr2(); + vmxctx->host_dr3 = rdr3(); + vmxctx->host_dr6 = rdr6(); + + /* Restore guest debug registers. */ + load_dr0(vmxctx->guest_dr0); + load_dr1(vmxctx->guest_dr1); + load_dr2(vmxctx->guest_dr2); + load_dr3(vmxctx->guest_dr3); + load_dr6(vmxctx->guest_dr6); +} + +static __inline void +vmx_dr_leave_guest(struct vmxctx *vmxctx) +{ + + /* Save guest debug registers. */ + vmxctx->guest_dr0 = rdr0(); + vmxctx->guest_dr1 = rdr1(); + vmxctx->guest_dr2 = rdr2(); + vmxctx->guest_dr3 = rdr3(); + vmxctx->guest_dr6 = rdr6(); + + /* + * Restore host debug registers. Restore DR7, DEBUGCTL, and + * PSL_T last. + */ + load_dr0(vmxctx->host_dr0); + load_dr1(vmxctx->host_dr1); + load_dr2(vmxctx->host_dr2); + load_dr3(vmxctx->host_dr3); + load_dr6(vmxctx->host_dr6); + wrmsr(MSR_DEBUGCTLMSR, vmxctx->host_debugctl); + load_dr7(vmxctx->host_dr7); + write_rflags(read_rflags() | vmxctx->host_tf); +} + static int vmx_run(void *arg, int vcpu, register_t rip, pmap_t pmap, struct vm_eventinfo *evinfo) @@ -2668,7 +2740,9 @@ vmx_run(void *arg, int vcpu, register_t rip, pmap_t pm } vmx_run_trace(vmx, vcpu); + vmx_dr_enter_guest(vmxctx); rc = vmx_enter_guest(vmxctx, vmx, launched); + vmx_dr_leave_guest(vmxctx); /* Collect some information for VM exit processing */ vmexit->rip = rip = vmcs_guest_rip(); @@ -2768,6 +2842,16 @@ vmxctx_regptr(struct vmxctx *vmxctx, int reg) return (&vmxctx->guest_r15); case VM_REG_GUEST_CR2: return (&vmxctx->guest_cr2); + case VM_REG_GUEST_DR0: + return (&vmxctx->guest_dr0); + case VM_REG_GUEST_DR1: + return (&vmxctx->guest_dr1); + case VM_REG_GUEST_DR2: + return (&vmxctx->guest_dr2); + case VM_REG_GUEST_DR3: + return (&vmxctx->guest_dr3); + case VM_REG_GUEST_DR6: + return (&vmxctx->guest_dr6); default: break; } Modified: stable/11/sys/amd64/vmm/intel/vmx.h ============================================================================== --- stable/11/sys/amd64/vmm/intel/vmx.h Wed Mar 7 18:45:24 2018 (r330622) +++ stable/11/sys/amd64/vmm/intel/vmx.h Wed Mar 7 20:50:28 2018 (r330623) @@ -50,6 +50,11 @@ struct vmxctx { register_t guest_r14; register_t guest_r15; register_t guest_cr2; + register_t guest_dr0; + register_t guest_dr1; + register_t guest_dr2; + register_t guest_dr3; + register_t guest_dr6; register_t host_r15; /* Host state */ register_t host_r14; @@ -58,9 +63,14 @@ struct vmxctx { register_t host_rbp; register_t host_rsp; register_t host_rbx; - /* - * XXX todo debug registers and fpu state - */ + register_t host_dr0; + register_t host_dr1; + register_t host_dr2; + register_t host_dr3; + register_t host_dr6; + register_t host_dr7; + uint64_t host_debugctl; + int host_tf; int inst_fail_status; Modified: stable/11/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- stable/11/usr.sbin/bhyvectl/bhyvectl.c Wed Mar 7 18:45:24 2018 (r330622) +++ stable/11/usr.sbin/bhyvectl/bhyvectl.c Wed Mar 7 20:50:28 2018 (r330623) @@ -113,6 +113,16 @@ usage(bool cpu_intel) " [--get-cr3]\n" " [--set-cr4=]\n" " [--get-cr4]\n" + " [--set-dr0=]\n" + " [--get-dr0]\n" + " [--set-dr1=]\n" + " [--get-dr1]\n" + " [--set-dr2=]\n" + " [--get-dr2]\n" + " [--set-dr3=]\n" + " [--get-dr3]\n" + " [--set-dr6=]\n" + " [--get-dr6]\n" " [--set-dr7=]\n" " [--get-dr7]\n" " [--set-rsp=]\n" @@ -246,6 +256,11 @@ static int get_active_cpus, get_suspended_cpus; static uint64_t memsize; static int set_cr0, get_cr0, set_cr3, get_cr3, set_cr4, get_cr4; static int set_efer, get_efer; +static int set_dr0, get_dr0; +static int set_dr1, get_dr1; +static int set_dr2, get_dr2; +static int set_dr3, get_dr3; +static int set_dr6, get_dr6; static int set_dr7, get_dr7; static int set_rsp, get_rsp, set_rip, get_rip, set_rflags, get_rflags; static int set_rax, get_rax; @@ -538,6 +553,11 @@ enum { SET_CR0, SET_CR3, SET_CR4, + SET_DR0, + SET_DR1, + SET_DR2, + SET_DR3, + SET_DR6, SET_DR7, SET_RSP, SET_RIP, @@ -642,7 +662,8 @@ cpu_vendor_intel(void) static int get_all_registers(struct vmctx *ctx, int vcpu) { - uint64_t cr0, cr3, cr4, dr7, rsp, rip, rflags, efer; + uint64_t cr0, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; + uint64_t rsp, rip, rflags, efer; uint64_t rax, rbx, rcx, rdx, rsi, rdi, rbp; uint64_t r8, r9, r10, r11, r12, r13, r14, r15; int error = 0; @@ -671,6 +692,36 @@ get_all_registers(struct vmctx *ctx, int vcpu) printf("cr4[%d]\t\t0x%016lx\n", vcpu, cr4); } + if (!error && (get_dr0 || get_all)) { + error = vm_get_register(ctx, vcpu, VM_REG_GUEST_DR0, &dr0); + if (error == 0) + printf("dr0[%d]\t\t0x%016lx\n", vcpu, dr0); + } + + if (!error && (get_dr1 || get_all)) { + error = vm_get_register(ctx, vcpu, VM_REG_GUEST_DR1, &dr1); + if (error == 0) + printf("dr1[%d]\t\t0x%016lx\n", vcpu, dr1); + } + + if (!error && (get_dr2 || get_all)) { + error = vm_get_register(ctx, vcpu, VM_REG_GUEST_DR2, &dr2); + if (error == 0) + printf("dr2[%d]\t\t0x%016lx\n", vcpu, dr2); + } + + if (!error && (get_dr3 || get_all)) { + error = vm_get_register(ctx, vcpu, VM_REG_GUEST_DR3, &dr3); + if (error == 0) + printf("dr3[%d]\t\t0x%016lx\n", vcpu, dr3); + } + + if (!error && (get_dr6 || get_all)) { + error = vm_get_register(ctx, vcpu, VM_REG_GUEST_DR6, &dr6); + if (error == 0) + printf("dr6[%d]\t\t0x%016lx\n", vcpu, dr6); + } + if (!error && (get_dr7 || get_all)) { error = vm_get_register(ctx, vcpu, VM_REG_GUEST_DR7, &dr7); if (error == 0) @@ -1273,6 +1324,11 @@ setup_options(bool cpu_intel) { "set-cr0", REQ_ARG, 0, SET_CR0 }, { "set-cr3", REQ_ARG, 0, SET_CR3 }, { "set-cr4", REQ_ARG, 0, SET_CR4 }, + { "set-dr0", REQ_ARG, 0, SET_DR0 }, + { "set-dr1", REQ_ARG, 0, SET_DR1 }, + { "set-dr2", REQ_ARG, 0, SET_DR2 }, + { "set-dr3", REQ_ARG, 0, SET_DR3 }, + { "set-dr6", REQ_ARG, 0, SET_DR6 }, { "set-dr7", REQ_ARG, 0, SET_DR7 }, { "set-rsp", REQ_ARG, 0, SET_RSP }, { "set-rip", REQ_ARG, 0, SET_RIP }, @@ -1330,6 +1386,11 @@ setup_options(bool cpu_intel) { "get-cr0", NO_ARG, &get_cr0, 1 }, { "get-cr3", NO_ARG, &get_cr3, 1 }, { "get-cr4", NO_ARG, &get_cr4, 1 }, + { "get-dr0", NO_ARG, &get_dr0, 1 }, + { "get-dr1", NO_ARG, &get_dr1, 1 }, + { "get-dr2", NO_ARG, &get_dr2, 1 }, + { "get-dr3", NO_ARG, &get_dr3, 1 }, + { "get-dr6", NO_ARG, &get_dr6, 1 }, { "get-dr7", NO_ARG, &get_dr7, 1 }, { "get-rsp", NO_ARG, &get_rsp, 1 }, { "get-rip", NO_ARG, &get_rip, 1 }, @@ -1607,7 +1668,8 @@ main(int argc, char *argv[]) int error, ch, vcpu, ptenum; vm_paddr_t gpa_pmap; struct vm_exit vmexit; - uint64_t rax, cr0, cr3, cr4, dr7, rsp, rip, rflags, efer, pat; + uint64_t rax, cr0, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; + uint64_t rsp, rip, rflags, efer, pat; uint64_t eptp, bm, addr, u64, pteval[4], *pte, info[2]; struct vmctx *ctx; cpuset_t cpus; @@ -1654,6 +1716,26 @@ main(int argc, char *argv[]) cr4 = strtoul(optarg, NULL, 0); set_cr4 = 1; break; + case SET_DR0: + dr0 = strtoul(optarg, NULL, 0); + set_dr0 = 1; + break; + case SET_DR1: + dr1 = strtoul(optarg, NULL, 0); + set_dr1 = 1; + break; + case SET_DR2: + dr2 = strtoul(optarg, NULL, 0); + set_dr2 = 1; + break; + case SET_DR3: + dr3 = strtoul(optarg, NULL, 0); + set_dr3 = 1; + break; + case SET_DR6: + dr6 = strtoul(optarg, NULL, 0); + set_dr6 = 1; + break; case SET_DR7: dr7 = strtoul(optarg, NULL, 0); set_dr7 = 1; @@ -1794,6 +1876,21 @@ main(int argc, char *argv[]) if (!error && set_cr4) error = vm_set_register(ctx, vcpu, VM_REG_GUEST_CR4, cr4); + + if (!error && set_dr0) + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_DR0, dr0); + + if (!error && set_dr1) + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_DR1, dr1); + + if (!error && set_dr2) + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_DR2, dr2); + + if (!error && set_dr3) + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_DR3, dr3); + + if (!error && set_dr6) + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_DR6, dr6); if (!error && set_dr7) error = vm_set_register(ctx, vcpu, VM_REG_GUEST_DR7, dr7); From owner-svn-src-all@freebsd.org Wed Mar 7 20:55:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08513F2FCE5; Wed, 7 Mar 2018 20:55:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 972EC6DED0; Wed, 7 Mar 2018 20:55:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 055AD2602E8; Wed, 7 Mar 2018 21:55:39 +0100 (CET) Subject: Re: svn commit: r330608 - in head/sys/dev/mlx5: . mlx5_core mlx5_en To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803071523.w27FN7ii074325@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <710f24f5-a62b-b6d2-f176-dc59f43d5faf@selasky.org> Date: Wed, 7 Mar 2018 21:55:36 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 20:55:48 -0000 On 03/07/18 18:09, Conrad Meyer wrote: > On Wed, Mar 7, 2018 at 7:23 AM, Hans Petter Selasky > wrote: >> Author: hselasky >> Date: Wed Mar 7 15:23:07 2018 >> New Revision: 330608 >> URL: https://svnweb.freebsd.org/changeset/base/330608 >> >> Log: >> Implement priority to traffic class mapping in mlx5core. >> >> Add support for mapping priority to traffic class via sysctl >> >> Submitted by: Slava Shwartsman > > Didn't we just give this guy a commit bit? You can get him committing > his own changes :-). Next time there is a stand-alone patch, which doesn't have too many dependencies in the code I'll let him push it. Right now the upstreaming is a bit complicated - many patches in the queue which can only go in one order. --HPS From owner-svn-src-all@freebsd.org Wed Mar 7 21:20:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 479E9F31B9B; Wed, 7 Mar 2018 21:20:03 +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 C678C6F76C; Wed, 7 Mar 2018 21:20:02 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 0A9295A9F12; Wed, 7 Mar 2018 21:19:56 +0000 (UTC) Date: Wed, 7 Mar 2018 21:19:55 +0000 From: Brooks Davis To: Pedro Giffuni Cc: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330601 - head/sys/i386/ibcs2 Message-ID: <20180307211955.GA63140@spindle.one-eyed-alien.net> References: <201803071444.w27EiWBV053244@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 21:20:03 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 07, 2018 at 01:20:14PM -0500, Pedro Giffuni wrote: > FWIW ... >=20 > ibcs2 is candidate for future removal. It is probably time again to see if actual users exist. ibcs2 has wasted a few hours of my time over the last few months so keeping it does have a non-zero cost. > We tried to get some vendor interest in it but we failed and given this= =20 > is very i386-specific it is probably not worth spending huge efforts on i= t. >=20 > cloudabi seems to be, for all purposes, a better conceptual replacement. This comment doesn't make much sense. iBCS is the Intel Binary Compatibility Standard, an obsolete ABI for i386 Unixes such as Xenix, SCO, and UnixWare. Cloudabi is, in a sense, taking Capsicum to its logical extreme and totally unrelated. -- Brooks --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJaoFd7AAoJEKzQXbSebgfAxBMH/j3s3MtNnRR4mJBGdy8VlrYv mR4kZ9ThLTzteCW0aRKJn2mOK3gZZemZbZ3B7q0Va2Srn+qDN1Gw3TUjm6wsqSdq WoeqGJnK/D35YbekgBYAUnv4fIoxXj+nw/19Nm0QMN0GdwJvUCE0hE8nK7R4EiOo 07AFggPmGU/3aLNeftRPsgy9pGPmASAVZV00YIh3vOtjV3rKItUhYFqJMcitQ/m8 fLn0XdBu3m45oA99tzH1PIB8XUH6HXNaXLH4MYDGE0uHk9dRaug3GspUKomOo/OI MQ/BUOED9EdCjios9eI7c5U1P6LwNZ2NlecNI3Wb8GxT4LZRziqmvoNw8SF84oM= =CPeF -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- From owner-svn-src-all@freebsd.org Wed Mar 7 21:40:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42269F339AE; Wed, 7 Mar 2018 21:40:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0DD670FD6; Wed, 7 Mar 2018 21:40:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id h21so7562641wmd.1; Wed, 07 Mar 2018 13:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JI7LV8teKIsP+WxAwI4EuDHC3XWyiG7OLVPSORhSopo=; b=HgIw7CreUKYAgWfjfs5BtYMN2ef0KXpglWg8kRk93qc/386JRytWXd+R+uNeFu0IMt aZIaMxZGF996ewEZbHM0E3s9iTjb6hocwX73hsgiZ++ZcxkvlIZNfuZJgoZJF+Eh6lH0 ujgcjSPEFgqIFAtWjKWVgAS1ru9L5IInlC/rTtUyq/0vowyFzN7Owl88wol3FutsQCwq IUsMsJgzEKvJZZFHZ0HHWNrbnp0ebWOxXmIGWtTexTWHcdbVBAUNaoY+Q7HRn6cLWC6s XsnF4W9rOTj4MtgwCPpA9mEoOTNEj5b/Bkrct2ra5OjhDTU0mpdilnVlhs0SZBCg2qAP 2YIg== 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=JI7LV8teKIsP+WxAwI4EuDHC3XWyiG7OLVPSORhSopo=; b=K3GZF7V64gXb0LJYgA6bItRlg4Kv4D6bKWNa+cSFYZlqCHFUa1e1l3pX0oq2XllIeu BN24iMMTn+y8tuu+ajFfDLuH4pB2BSCUqDGzsydOVO1eEJT0cYPuxYb51nhTW2DFjaDT k8s/9a+rK4rxM4LrY91zf49vRpPnTKdQKOIsrY/X8rWSE0MQyTKRqczgzCeP2nKvOCvC 1ScmfZ8qWceAdHmplsJ1JxPTcqcRYZxruvk/+AVofqc86/GCO8kgoWb5W/xeGhGrXAte jjLfDPiMuMD7zvcv5pNcnUrmh3ZBk6gXGBjb1IsZ/+M1p8bidro6THd5rWIJhcPhkyEi gaOw== X-Gm-Message-State: AElRT7F4PcezXPQDr0s80X88VoSzIcVqRHEz2ouVnooVvpcTgocsgvrA zvh/AH89gm6S2bCjFqsUF/AwwZm0kM2MkjOm6o9DdQ== X-Google-Smtp-Source: AG47ELseiUJktJ8b6d0VJn6FSONjLC6/Y4Njy2wQ+PomP6S7l0mMsWxC5teKojVXLswIGNTuj8qEgkTsG+SjB//OiGs= X-Received: by 10.28.229.17 with SMTP id c17mr14820027wmh.1.1520458850162; Wed, 07 Mar 2018 13:40:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.84.14 with HTTP; Wed, 7 Mar 2018 13:40:48 -0800 (PST) In-Reply-To: <8377086.JrIgVVMXMv@ralph.baldwin.cx> References: <201803050754.w257swAE001435@repo.freebsd.org> <6465173.s2nWvWCLOs@ralph.baldwin.cx> <8377086.JrIgVVMXMv@ralph.baldwin.cx> From: Adrian Chadd Date: Wed, 7 Mar 2018 13:40:48 -0800 Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: John Baldwin Cc: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 21:40:53 -0000 (*whispers* you have to upgrade everything all at ooooooonnnce.) -adrian From owner-svn-src-all@freebsd.org Wed Mar 7 22:04:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0C80F35F3E; Wed, 7 Mar 2018 22:04:28 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60E23725F9; Wed, 7 Mar 2018 22:04:28 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5BCA9279F3; Wed, 7 Mar 2018 22:04:28 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27M4SFB077096; Wed, 7 Mar 2018 22:04:28 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27M4SoL077095; Wed, 7 Mar 2018 22:04:28 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201803072204.w27M4SoL077095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Wed, 7 Mar 2018 22:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330624 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 330624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 22:04:28 -0000 Author: jeff Date: Wed Mar 7 22:04:27 2018 New Revision: 330624 URL: https://svnweb.freebsd.org/changeset/base/330624 Log: Don't assert that the domain free lock is held until we're certain that there is a valid reservation. This can trip erroneously when memory falls within a domain but doesn't have the reservation initialized because it does not meet size or alignment requirements. Reported by: pho, mjg Sponsored by: Netflix, Dell/EMC Isilon Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Wed Mar 7 20:50:28 2018 (r330623) +++ head/sys/vm/vm_reserv.c Wed Mar 7 22:04:27 2018 (r330624) @@ -1044,9 +1044,9 @@ vm_reserv_free_page(vm_page_t m) vm_reserv_t rv; rv = vm_reserv_from_page(m); - vm_domain_free_assert_locked(VM_DOMAIN(rv->domain)); if (rv->object == NULL) return (FALSE); + vm_domain_free_assert_locked(VM_DOMAIN(rv->domain)); vm_reserv_depopulate(rv, m - rv->pages); return (TRUE); } @@ -1093,9 +1093,9 @@ vm_reserv_is_page_free(vm_page_t m) vm_reserv_t rv; rv = vm_reserv_from_page(m); - vm_domain_free_assert_locked(VM_DOMAIN(rv->domain)); if (rv->object == NULL) return (false); + vm_domain_free_assert_locked(VM_DOMAIN(rv->domain)); return (popmap_is_clear(rv->popmap, m - rv->pages)); } From owner-svn-src-all@freebsd.org Wed Mar 7 22:05:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F2D7F36097; Wed, 7 Mar 2018 22:05:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00DC87275C; Wed, 7 Mar 2018 22:05:24 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFEE8279F6; Wed, 7 Mar 2018 22:05:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27M5NWs077176; Wed, 7 Mar 2018 22:05:23 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27M5Nx9077175; Wed, 7 Mar 2018 22:05:23 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803072205.w27M5Nx9077175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 7 Mar 2018 22:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330625 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 22:05:24 -0000 Author: kevans Date: Wed Mar 7 22:05:23 2018 New Revision: 330625 URL: https://svnweb.freebsd.org/changeset/base/330625 Log: lualoader: Return status in cli_execute_unparsed properly cli_execute was changed to return the status, cascade that to cli_execute_unparsed. This fixes a lot of false "Failed to execute" errors following r330620; no failures actually occurred, but [module]_error would've then promptly executed (and also "failed") Modified: head/stand/lua/cli.lua Modified: head/stand/lua/cli.lua ============================================================================== --- head/stand/lua/cli.lua Wed Mar 7 22:04:27 2018 (r330624) +++ head/stand/lua/cli.lua Wed Mar 7 22:05:23 2018 (r330625) @@ -95,7 +95,7 @@ function cli_execute(...) end function cli_execute_unparsed(str) - cli_execute(loader.parse(str)) + return cli_execute(loader.parse(str)) end -- Module exports From owner-svn-src-all@freebsd.org Wed Mar 7 22:17:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7AFAF36F24; Wed, 7 Mar 2018 22:17:42 +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 45018730E5; Wed, 7 Mar 2018 22:17:42 +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 w27MHVMa009372 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 8 Mar 2018 00:17:34 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w27MHVMa009372 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w27MHVeR009371; Thu, 8 Mar 2018 00:17:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 8 Mar 2018 00:17:31 +0200 From: Konstantin Belousov To: Brooks Davis Cc: Pedro Giffuni , Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330601 - head/sys/i386/ibcs2 Message-ID: <20180307221731.GH76926@kib.kiev.ua> References: <201803071444.w27EiWBV053244@repo.freebsd.org> <20180307211955.GA63140@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180307211955.GA63140@spindle.one-eyed-alien.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 22:17:42 -0000 On Wed, Mar 07, 2018 at 09:19:55PM +0000, Brooks Davis wrote: > On Wed, Mar 07, 2018 at 01:20:14PM -0500, Pedro Giffuni wrote: > > FWIW ... > > > > ibcs2 is candidate for future removal. > > It is probably time again to see if actual users exist. ibcs2 has wasted > a few hours of my time over the last few months so keeping it does have > a non-zero cost. There are users of it, I periodically (say two or three times per year) get a report of something appearing broken in it. Note that iBCS2 is disconnected from the build in HEAD in probably in stable/11. It seems that removing it from svn might be a reasonable change after all. > > > We tried to get some vendor interest in it but we failed and given this It was not a 'vendor interest'. It was an unability to get the confirmation that some patch which was written using information from the SCO headers, does not violate the license. > > is very i386-specific it is probably not worth spending huge efforts on it. > > > > cloudabi seems to be, for all purposes, a better conceptual replacement. > > This comment doesn't make much sense. iBCS is the Intel Binary > Compatibility Standard, an obsolete ABI for i386 Unixes such as Xenix, > SCO, and UnixWare. Cloudabi is, in a sense, taking Capsicum to its > logical extreme and totally unrelated. > > -- Brooks From owner-svn-src-all@freebsd.org Wed Mar 7 22:54:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82600F39D54 for ; Wed, 7 Mar 2018 22:54:21 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22b.google.com (mail-yb0-x22b.google.com [IPv6:2607:f8b0:4002:c09::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 A35A8747D7 for ; Wed, 7 Mar 2018 22:54:20 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22b.google.com with SMTP id e3-v6so1382654ybk.1 for ; Wed, 07 Mar 2018 14:54:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=TSC5i61gO55t7/zY0wfcOQe+yuYKAzaUQyM3I0MTyZQ=; b=DIPTD3a4X1IbrlReBN1+VS6TMSXhOiuAcg4ddtVSkKOWweytADllVqwR80bTjIGSl5 fnxtlUw70kMmd0fGkVC02HBvIdQbu6SC6PZCzlgp2xuxNkBPBg11RVxTZ2P+pdPTmodf BhLvf4mV+xpfarVUIHw+Df2biX2fWBfvxXAwI= 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=TSC5i61gO55t7/zY0wfcOQe+yuYKAzaUQyM3I0MTyZQ=; b=Gq8k8kdIMZtibq8Zbz9ESrHCWv26Aqorb9XGyunv77rsYl2oC2/45AymwzykYpQ/40 zqFdmZSKxybDClu6hFfkRpAj8uf1r9fFtAarWkW3okiNO9hgDYHmm9GHYSLmtsRLh2vR iTqmLaHKgyqMhBftABBqYT7F6tOCpL4MVJENBOdi/Aa76mfFm3SwpTxyLBBqXOkLnNPL B+4cPm3HsG2vIVkR5Ddip/owXe2UW4rjs2YxvRFP4nHDENP2ytUHPcF4xGC8vMFBCkuK cib0xiWPR3mzX82uv9iFlhdG6VuFnbBONSLoUH4YI+dJS032Lb/tBcf7PkW4IRyQeCwQ Q4NA== X-Gm-Message-State: APf1xPCAlqaRLrIPzhB2S4HvISfpKnsZMAtYMcJU/8RTh+OwG7f8zKUp jn6rVqJgtwrC9rcL/cfzhyWics2b83GmErf6sUy3UQ== X-Google-Smtp-Source: AG47ELsjttXVBOFSoHcfY8ZkNnvxluffLRortGjj12xWZR7Ud+cmrDPPxkVaSvfWa/XmzUqeV82+N/5ap6cYyxD18gM= X-Received: by 2002:a25:e5c7:: with SMTP id c190-v6mr15394895ybh.338.1520463259894; Wed, 07 Mar 2018 14:54:19 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Wed, 7 Mar 2018 14:53:49 -0800 (PST) In-Reply-To: <8377086.JrIgVVMXMv@ralph.baldwin.cx> References: <201803050754.w257swAE001435@repo.freebsd.org> <6465173.s2nWvWCLOs@ralph.baldwin.cx> <8377086.JrIgVVMXMv@ralph.baldwin.cx> From: Eitan Adler Date: Wed, 7 Mar 2018 14:53:49 -0800 X-Google-Sender-Auth: QjtyHAfa52OuR3dgYd85NjRfyXc Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 22:54:21 -0000 On 7 March 2018 at 09:37, John Baldwin wrote: > On Tuesday, March 06, 2018 06:46:37 PM Eitan Adler wrote: >> On 6 March 2018 at 08:26, John Baldwin wrote: >> > On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: >> >> On 5 March 2018 at 10:08, John Baldwin wrote: >> >> > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: >> >> >> Author: eadler >> >> >> Date: Mon Mar 5 07:54:57 2018 >> >> >> New Revision: 330451 >> >> >> URL: https://svnweb.freebsd.org/changeset/base/330451 >> >> >> >> >> >> Log: >> >> >> MFC r306837: >> >> >> >> >> >> [net80211] extend the ieee80211_rx_stats struct to include more information. >> >> > >> >> > Have you thought about the KBI implications of this change and some of the >> >> > other changes you've merged? >> >> >> >> I do have a copy of the modules from 11.1 and have loaded them at >> >> various points in time after merging. That said, I am not perfect. >> >> Unfortunately, my -STABLE box did not have fully functioning drivers >> >> before these changes so its difficult to test anything beyond "loads >> >> and does not panic.". I havn't done so today yet, but that will happen >> >> soon. >> >> >> >> Ensuring these things work through code inspection is certainly >> >> possible and I've skipped over several changes as a result. >> > >> > Loading a module doesn't alone doesn't actually test for breakage. >> >> I'm aware. In this case I should likely just revert this change since >> its a pretty blatant break. > > I suspect many of these changes for iwm, etc. are all intertwined so I'm not > sure if you can leave out individual ones. Possibly. I do have iwm working on my laptop though. I also know of one open PR assigned to me w.r.t. a model I don't own. I'll be addressing it some time this week. >> > Batching >> > up changes into a single diff is also helpful since if an API changes back >> > and forth in HEAD multiple times, collapsing them means that for stable you >> > may only need a single compat shim rather than several. >> >> Understood. My intention in doing them one-by-one was to make it >> easier to bisect if something goes wrong. > > For stable I think we also want to balance this with: > > 1) Not putting stable in a known-broken state. If there are followup fixes > either for compile or runtime performances, those followup fixes should > always be included in the commit that merges the original change. To the extent possible I tried to do this. > 2) Preserving ABI. The desire to avoid putting stable into known-broken > state means that MFCs should include the ABI shims along with the original > change. This part I missed very clearly. I'll be sure to be more careful in the future. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Wed Mar 7 23:18:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B6DBF3BA1C; Wed, 7 Mar 2018 23:18:58 +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 10DA4754B5; Wed, 7 Mar 2018 23:18:56 +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 w27NIrk4056502; Wed, 7 Mar 2018 15:18:53 -0800 (PST) (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 w27NIrI6056501; Wed, 7 Mar 2018 15:18:53 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803072318.w27NIrI6056501@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: To: Eitan Adler Date: Wed, 7 Mar 2018 15:18:53 -0800 (PST) CC: John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 23:18:58 -0000 > On 7 March 2018 at 09:37, John Baldwin wrote: > > On Tuesday, March 06, 2018 06:46:37 PM Eitan Adler wrote: > >> On 6 March 2018 at 08:26, John Baldwin wrote: > >> > On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: > >> >> On 5 March 2018 at 10:08, John Baldwin wrote: > >> >> > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: > >> >> >> Author: eadler > >> >> >> Date: Mon Mar 5 07:54:57 2018 > >> >> >> New Revision: 330451 > >> >> >> URL: https://svnweb.freebsd.org/changeset/base/330451 > >> >> >> > >> >> >> Log: > >> >> >> MFC r306837: > >> >> >> > >> >> >> [net80211] extend the ieee80211_rx_stats struct to include more information. > >> >> > > >> >> > Have you thought about the KBI implications of this change and some of the > >> >> > other changes you've merged? > >> >> > >> >> I do have a copy of the modules from 11.1 and have loaded them at > >> >> various points in time after merging. That said, I am not perfect. > >> >> Unfortunately, my -STABLE box did not have fully functioning drivers > >> >> before these changes so its difficult to test anything beyond "loads > >> >> and does not panic.". I havn't done so today yet, but that will happen > >> >> soon. > >> >> > >> >> Ensuring these things work through code inspection is certainly > >> >> possible and I've skipped over several changes as a result. > >> > > >> > Loading a module doesn't alone doesn't actually test for breakage. > >> > >> I'm aware. In this case I should likely just revert this change since > >> its a pretty blatant break. > > > > I suspect many of these changes for iwm, etc. are all intertwined so I'm not > > sure if you can leave out individual ones. > > Possibly. I do have iwm working on my laptop though. I also know of > one open PR assigned to me w.r.t. a model I don't own. I'll be > addressing it some time this week. I believe I also have a tester of stable/11 iwm patches avaliable, he has an 8265? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Mar 8 01:03:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6F20F439CB; Thu, 8 Mar 2018 01:03:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A2A679C62; Thu, 8 Mar 2018 01:03:27 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64C7D17D2; Thu, 8 Mar 2018 01:03:27 +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 w2813RKR069159; Thu, 8 Mar 2018 01:03:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2813RRe069158; Thu, 8 Mar 2018 01:03:27 GMT (envelope-from np@FreeBSD.org) Message-Id: <201803080103.w2813RRe069158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 8 Mar 2018 01:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330626 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 330626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 01:03:27 -0000 Author: np Date: Thu Mar 8 01:03:26 2018 New Revision: 330626 URL: https://svnweb.freebsd.org/changeset/base/330626 Log: MFC r322659 (by glebius): Fix cut and paste typo that prevented T5 firmware to be compiled in. Modified: stable/11/sys/conf/files Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Wed Mar 7 22:05:23 2018 (r330625) +++ stable/11/sys/conf/files Thu Mar 8 01:03:26 2018 (r330626) @@ -1378,7 +1378,7 @@ t4fw.fw optional cxgbe \ no-obj no-implicit-rule \ clean "t4fw.fw" t5fw_cfg.c optional cxgbe \ - compile-with "${AWK} -f $S/tools/fw_stub.awk t5fw_cfg.fw:t5fw_cfg t5fw_cfg_uwire.fw:t5fw_cfg_uwire t4fw.fw:t4fw -mt5fw_cfg -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk t5fw_cfg.fw:t5fw_cfg t5fw_cfg_uwire.fw:t5fw_cfg_uwire t5fw.fw:t5fw -mt5fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "t5fw_cfg.c" t5fw_cfg.fwo optional cxgbe \ From owner-svn-src-all@freebsd.org Thu Mar 8 01:19:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CEB6F454FF; Thu, 8 Mar 2018 01:19:14 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (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 1C0487AADA; Thu, 8 Mar 2018 01:19:14 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-wr0-x22d.google.com with SMTP id w77so4042258wrc.6; Wed, 07 Mar 2018 17:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e2VxRTZwW8cnqJOt2KIslCg6KuC9JOemYnvwfXkfPBY=; b=pGkYXZ+F+pII5zSwvDafnXQHjR9xOb23g5BIeVXyVaMAfd78FDS+WNvzal0ssfRLuP L7GSivrH5i2xREieXnp7po4DmDNdDt1EokJtpIwf3HteBl+JWh8lykKHR7yG6hL1wlJ1 /hxe5b9IOM6uOpG/xIMfzsAGBTpOqNpvRomsrrmHeKE/FsLK9UCfx3UqwjheZbxJXsGm 3zlyOYX/UIRS0swnthY8sNzbxD5JhjPViuMDviUJi+k4xJgy9wFQU/7Xh5V5Bd4jjLn5 TBcBKMunc0P6NWjutgxW9ZYYTtjACx6Gsk5w73MBg+eEx6sHziIOSJBAIeetD2qUcR1w Ta0Q== 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=e2VxRTZwW8cnqJOt2KIslCg6KuC9JOemYnvwfXkfPBY=; b=RGvYyDVhaQKSEiVQBd7pteqmqvviZueKKfErzzvlBzNZ5+95+7fw97I/JQf86GySts ZZvpj73wFBV2HBIJHmsxvQTfSFPtlF4xn+rKiv/e19K6hxq157D/cRpqETQKDeRpgD5S KnJE/LVFkzBE4Ytx+SiSo6QeCnOWICExFNikOtXIhbwetowrvG5FSK8tyD91jvA2hKLI 6km4hM47gj2OmpTUYZExXLpD5+U50XPATl9A4voGeFd51mDHmC6kmEkRpPaxuigb+fIv wXuiYlU8BMCamII/ru6Wjxtcoq1KEu0g0C/pL0WxjDf+fOkKpOlOBx4e3xdIFp23X4G3 V2bw== X-Gm-Message-State: APf1xPCiyzaWEgRLAjlybKcgUiSKC40h5JL7v8gc9B7imDGbek1EBJTK W7bGqM8T+4IGGm41MCnacEAkcch47aumE5r2pVMDZA== X-Google-Smtp-Source: AG47ELtpyfEoOPnQBH88X5EnTyArArJPEKOlivsqNlTwKFRIOpDp0XnmiwGllTYTNaqLzFCEiQezZgf8tNZQbhNQY1c= X-Received: by 10.223.160.147 with SMTP id m19mr22335868wrm.32.1520471952416; Wed, 07 Mar 2018 17:19:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.192.2 with HTTP; Wed, 7 Mar 2018 17:19:12 -0800 (PST) In-Reply-To: References: <201803061428.w26EScwJ020926@repo.freebsd.org> From: Jonathan Looney Date: Wed, 7 Mar 2018 20:19:12 -0500 Message-ID: Subject: Re: svn commit: r330539 - in head/sys: amd64/amd64 amd64/include arm/include conf gdb i386/include mips/include powerpc/include sparc64/include To: Oliver Pinter Cc: "Jonathan T. Looney" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 01:19:14 -0000 On Tue, Mar 6, 2018 at 6:31 PM, Oliver Pinter wrote: > X-MFC-with: > > commit 27ac811b7acd31b1bdbf959fe49a957cdeabf780 > Author: bde > Date: Fri Mar 24 17:34:55 2017 +0000 > ACK. Thanks! Jonathan From owner-svn-src-all@freebsd.org Thu Mar 8 01:23:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 136B7F45DA2; Thu, 8 Mar 2018 01:23:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 82E5B7B1C2; Thu, 8 Mar 2018 01:23:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.101] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 31FE4D4408C; Thu, 8 Mar 2018 12:23:17 +1100 (AEDT) Date: Thu, 8 Mar 2018 12:23:16 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: Ian Lepore , Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330436 - head/bin/chflags In-Reply-To: <20180305140228.P935@besplex.bde.org> Message-ID: <20180308120343.E2426@besplex.bde.org> References: <201803050156.w251u7Y8020941@repo.freebsd.org> <1520215860.38056.3.camel@freebsd.org> <20180305140228.P935@besplex.bde.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=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=4gYfcDbAvbXn5vcoyysA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 01:23:27 -0000 On Mon, 5 Mar 2018, Bruce Evans wrote: > On Sun, 4 Mar 2018, Ian Lepore wrote: > >> On Mon, 2018-03-05 at 01:56 +0000, Bryan Drewery wrote: >>> >>> Log: >>> \xa0 chflags: Add -x option to not traverse mount points. >> >> Yay! \xa0One day later than I needed it, but still, yay! > > I recently noticed that find(1) needs an option to not look at mount > points at all, and further options to classify mount points so that > you can prune them. > > After reading the above and investigating further, I noticed that -x > is broken in most FreeBSD utilities, since POSIX requires not looking > at mount points at all for the few utilities that support -x. E.g., > for du in 2001 draft 7 POSIX: > ... This seems to be easy to fix by by skipping in callers of fts_read(). Fix for an old version of du: XX Index: du.c XX =================================================================== XX RCS file: /home/ncvs/src/usr.bin/du/du.c,v XX retrieving revision 1.34 XX diff -u -2 -r1.34 du.c XX --- du.c 2 Jun 2004 07:09:34 -0000 1.34 XX +++ du.c 8 Mar 2018 00:57:12 -0000 XX @@ -86,9 +86,11 @@ XX int listall; XX int depth; XX - int Hflag, Lflag, Pflag, aflag, sflag, dflag, cflag, hflag, ch, notused, rval; XX + int Hflag, Lflag, Pflag, aflag, sflag, dflag, cflag, hflag; XX + int xflag, ch, notused, rval; XX char **save; XX static char dot[] = "."; XX XX Hflag = Lflag = Pflag = aflag = sflag = dflag = cflag = hflag = 0; XX + xflag = 0; XX XX save = argv; XX @@ -148,4 +150,5 @@ XX break; XX case 'x': XX + xflag = 1; XX ftsoptions |= FTS_XDEV; XX break; XX @@ -219,4 +222,7 @@ XX break; XX case FTS_DP: XX + if (xflag && p->fts_statp->st_dev != XX + p->fts_parent->fts_statp->st_dev) XX + break; XX if (ignorep(p)) XX break; This patch won't apply cleanly in -current because -current has large changes in all areas touched by the patch (mainly to undo formatting away from KNF). Bruce From owner-svn-src-all@freebsd.org Thu Mar 8 02:58:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF7E0F4DFA4 for ; Thu, 8 Mar 2018 02:58:09 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic313-26.consmr.mail.ne1.yahoo.com (sonic313-26.consmr.mail.ne1.yahoo.com [66.163.185.49]) (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 70EFF7F94D for ; Thu, 8 Mar 2018 02:58:05 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1520477879; bh=rn+WcNPS3bLf5i9IkqccU+LBOyjEMLSlW8VUoLxHLZY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=f5d0lpVzajlCMMIyLlV964I4DHBVRgRYt+Ud5OtMnJR2gCeO3oT6Xx3QBZ6pNkn9ghgS0MVnyPAVRLfKmAKyMFQc/svyA1NvevagJrWFLI83+nDsYaM68qlbPeSoO0Txm67I/zW7SMdYQ4oLQHyvr9K8vUxEYqq/kVXln5IosHttHm1IbXecPDM2Q9QtBmSKhxpy6IXXRSF+rYj2OxgmEaZ0LtArsH9zaIGyr0QTXsVycTBj6ckAz6AoiRX4Msl0eR2JtBzWrUR5Bwx4Rs9eThBpiz/QxXxl+ZulJouVelmrsiq9C+AlN1xlpSI289uZrtYPpsZ1JINjwQ7D7cs0UQ== X-YMail-OSG: g7E7L60VM1mfzY1948sMqFm5LUZfoGG8bfoNpxtqNBnYxMbbLwMVmweawUF3EOJ fHGIEQmXJjK6htdxiVUNX8Ie.P0j7zYLmArxh43VuDXdI3IZQ1ujF2jyjx4YPl8lwg2mHcqRfWzn ObG0FGFlPWrzZzXrF68IV4kVJW3dg4Y90_NCBIF9V1DE8puJujX603wxwxuSF.GqY1ypdmfEfcGs a04YxphbEJjdxF9Ku6MrhNqpQEhF3uxrBgGhl2gmKsFGScJ_Iw9eqnmz0_cTztZofXaHGs28OArT 6SFagXrKB3.dvhhoHZJ2mBjVFcYrL9yvaBrkaa2is6GSFLjkQlv9jBIyztcWlBrRVBxJSVbtF9Ng 3w2XDP8EwcInrDSvYBdbnfvC.oMwlKPo6hcP1RI1.BzLPWOOs3HCg5g9m3TzMeuHoh9n0l19P3Al sX.0ZBFvfe6j0vobJASNZtOpMyrxB1Z3Brgn973lqSLDX0vjvQFRuRTI.xZrK8494h7qz3w90b1o 2SL7MUeXQY7s- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Thu, 8 Mar 2018 02:57:59 +0000 Received: from smtp232.mail.ne1.yahoo.com (EHLO [192.168.0.5]) ([10.218.253.209]) by smtp415.mail.ne1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 8ac47896d75b8b22d21110794859aedd; Thu, 08 Mar 2018 02:47:50 +0000 (UTC) Subject: Re: svn commit: r330601 - head/sys/i386/ibcs2 To: Brooks Davis Cc: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803071444.w27EiWBV053244@repo.freebsd.org> <20180307211955.GA63140@spindle.one-eyed-alien.net> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <93cd021e-d652-4f57-df3b-268b3bdce0c2@FreeBSD.org> Date: Wed, 7 Mar 2018 21:47:48 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180307211955.GA63140@spindle.one-eyed-alien.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 02:58:10 -0000 On 07/03/2018 16:19, Brooks Davis wrote: > On Wed, Mar 07, 2018 at 01:20:14PM -0500, Pedro Giffuni wrote: >> FWIW ... >> >> ibcs2 is candidate for future removal. > It is probably time again to see if actual users exist. ibcs2 has wasted > a few hours of my time over the last few months so keeping it does have > a non-zero cost. FWIW, I used it long ago on FreeBSD with Unesco's ISIS database software but the software is not developed anymore. >> We tried to get some vendor interest in it but we failed and given this >> is very i386-specific it is probably not worth spending huge efforts on it. >> >> cloudabi seems to be, for all purposes, a better conceptual replacement. > This comment doesn't make much sense. iBCS is the Intel Binary > Compatibility Standard, an obsolete ABI for i386 Unixes such as Xenix, > SCO, and UnixWare. Cloudabi is, in a sense, taking Capsicum to its > logical extreme and totally unrelated. It is also a binary format (ELF-based) that can run on several platforms including Linux and FreeBSD. It clearly targets the cloud market, which makes more sense nowadays than the i386 use space which were common in the early 90s. Pedro. From owner-svn-src-all@freebsd.org Thu Mar 8 03:19:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA19DF2A161; Thu, 8 Mar 2018 03:19:04 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D51480B60; Thu, 8 Mar 2018 03:19:04 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 727D32F5C; Thu, 8 Mar 2018 03:19:04 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w283J4Is035031; Thu, 8 Mar 2018 03:19:04 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w283J4cZ035030; Thu, 8 Mar 2018 03:19:04 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803080319.w283J4cZ035030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 8 Mar 2018 03:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330627 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 330627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 03:19:05 -0000 Author: asomers Date: Thu Mar 8 03:19:04 2018 New Revision: 330627 URL: https://svnweb.freebsd.org/changeset/base/330627 Log: g_bio(9): fix a documentation oversight from r163870 MFC after: 3 weeks Modified: head/share/man/man9/g_bio.9 Modified: head/share/man/man9/g_bio.9 ============================================================================== --- head/share/man/man9/g_bio.9 Thu Mar 8 01:03:26 2018 (r330626) +++ head/share/man/man9/g_bio.9 Thu Mar 8 03:19:04 2018 (r330627) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 2016 +.Dd Mar 7, 2018 .Dt G_BIO 9 .Os .Sh NAME @@ -59,7 +59,7 @@ most important fields are described below: .Bl -tag -width ".Va bio_attribute" .It Va bio_cmd I/O request command. -There are four I/O requests available in GEOM: +There are five I/O requests available in GEOM: .Bl -tag -width ".Dv BIO_GETATTR" .It Dv BIO_READ A read request. From owner-svn-src-all@freebsd.org Thu Mar 8 05:28:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7976F3460C; Thu, 8 Mar 2018 05:28:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6980B860DE; Thu, 8 Mar 2018 05:28:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B4D048CB; Thu, 8 Mar 2018 05:28:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w285ShRt000444; Thu, 8 Mar 2018 05:28:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w285Shr4000443; Thu, 8 Mar 2018 05:28:43 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080528.w285Shr4000443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 05:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330628 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 330628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 05:28:44 -0000 Author: eadler Date: Thu Mar 8 05:28:43 2018 New Revision: 330628 URL: https://svnweb.freebsd.org/changeset/base/330628 Log: calendars: update Judaic calendar to 2018+ This was generated by ∴hebcal --years 10 -r 2018 | awk -F '[/\t]' '{print $3 "/" $1 "/" $2 "*\t" $4}' MFC After: 1 week Modified: head/usr.bin/calendar/calendars/calendar.judaic Modified: head/usr.bin/calendar/calendars/calendar.judaic ============================================================================== --- head/usr.bin/calendar/calendars/calendar.judaic Thu Mar 8 03:19:04 2018 (r330627) +++ head/usr.bin/calendar/calendars/calendar.judaic Thu Mar 8 05:28:43 2018 (r330628) @@ -1,694 +1,824 @@ /* - * Judaic Calendar. Maintained by Josef Grosch . + * Judaic Calendar. * * $FreeBSD$ * */ -/* - * $Id: calendar.judaic,v 1.45 2007/01/01 22:24:53 jgrosch Exp $ - */ - #ifndef _calendar_judaic_ #define _calendar_judaic_ /* * The calendar below has been obtained from the port deskutils/hebcal - * for the year of 2010 to 2015 and for the city of New York. + * for the year of 2018 to 2027 and for the city of New York. */ -2010/Jan/16* Rosh Chodesh Sh'vat -2010/Jan/30* Tu B'Shvat -2010/Feb/13* Shabbat Shekalim -2010/Feb/14* Rosh Chodesh Adar -2010/Feb/15* Rosh Chodesh Adar -2010/Feb/25* Ta'anit Esther -2010/Feb/27* Shabbat Zachor -2010/Feb/28* Purim -2010/Mar/1* Shushan Purim -2010/Mar/6* Shabbat Parah -2010/Mar/13* Shabbat HaChodesh -2010/Mar/16* Rosh Chodesh Nisan -2010/Mar/27* Shabbat HaGadol -2010/Mar/29* Ta'anit Bechorot -2010/Mar/29* Erev Pesach -2010/Mar/30* Pesach I -2010/Mar/31* Pesach II -2010/Apr/1* Pesach III (CH''M) -2010/Apr/2* Pesach IV (CH''M) -2010/Apr/3* Pesach V (CH''M) -2010/Apr/4* Pesach VI (CH''M) -2010/Apr/5* Pesach VII -2010/Apr/6* Pesach VIII -2010/Apr/11* Yom HaShoah -2010/Apr/14* Rosh Chodesh Iyyar -2010/Apr/15* Rosh Chodesh Iyyar -2010/Apr/19* Yom HaZikaron -2010/Apr/20* Yom HaAtzma'ut -2010/May/2* Lag B'Omer -2010/May/Dec* Yom Yerushalayim -2010/May/14* Rosh Chodesh Sivan -2010/May/18* Erev Shavuot -2010/May/19* Shavuot I -2010/May/20* Shavuot II -2010/Jun/Dec* Rosh Chodesh Tamuz -2010/Jun/13* Rosh Chodesh Tamuz -2010/Jun/29* Tzom Tammuz -2010/Jul/Dec* Rosh Chodesh Av -2010/Jul/17* Shabbat Hazon -2010/Jul/20* Tish'a B'Av -2010/Jul/24* Shabbat Nachamu -2010/Aug/Oct* Rosh Chodesh Elul -2010/Aug/11* Rosh Chodesh Elul -2010/Sep/8* Erev Rosh Hashana -2010/Sep/9* Rosh Hashana 5771 -2010/Sep/Oct* Rosh Hashana II -2010/Sep/11* Shabbat Shuva -2010/Sep/Dec* Tzom Gedaliah -2010/Sep/17* Erev Yom Kippur -2010/Sep/18* Yom Kippur -2010/Sep/22* Erev Sukkot -2010/Sep/23* Sukkot I -2010/Sep/24* Sukkot II -2010/Sep/25* Sukkot III (CH''M) -2010/Sep/26* Sukkot IV (CH''M) -2010/Sep/27* Sukkot V (CH''M) -2010/Sep/28* Sukkot VI (CH''M) -2010/Sep/29* Sukkot VII (Hoshana Raba) -2010/Sep/30* Shmini Atzeret -2010/Oct/1* Simchat Torah -2010/Oct/8* Rosh Chodesh Cheshvan -2010/Oct/9* Rosh Chodesh Cheshvan -2010/Nov/7* Rosh Chodesh Kislev -2010/Nov/8* Rosh Chodesh Kislev -2010/Dec/1* Chanukah: 1 Candle -2010/Dec/2* Chanukah: 2 Candles -2010/Dec/3* Chanukah: 3 Candles -2010/Dec/4* Chanukah: 4 Candles -2010/Dec/5* Chanukah: 5 Candles -2010/Dec/6* Chanukah: 6 Candles -2010/Dec/7* Rosh Chodesh Tevet -2010/Dec/7* Chanukah: 7 Candles -2010/Dec/8* Rosh Chodesh Tevet -2010/Dec/8* Chanukah: 8 Candles -2010/Dec/9* Chanukah: 8th Day -2010/Dec/16* Asara B'Tevet -2011/1/6* Rosh Chodesh Sh'vat -2011/1/20* Tu B'Shvat -2011/2/4* Rosh Chodesh Adar I -2011/2/5* Rosh Chodesh Adar I -2011/2/18* Purim Katan -2011/3/5* Shabbat Shekalim -2011/3/6* Rosh Chodesh Adar II -2011/3/7* Rosh Chodesh Adar II -2011/3/17* Ta'anit Esther -2011/3/19* Shabbat Zachor -2011/3/20* Purim -2011/3/21* Shushan Purim -2011/3/26* Shabbat Parah -2011/4/2* Shabbat HaChodesh -2011/4/5* Rosh Chodesh Nisan -2011/4/16* Shabbat HaGadol -2011/4/18* Ta'anit Bechorot -2011/4/18* Erev Pesach -2011/4/19* Pesach I -2011/4/20* Pesach II -2011/4/21* Pesach III (CH''M) -2011/4/22* Pesach IV (CH''M) -2011/4/23* Pesach V (CH''M) -2011/4/24* Pesach VI (CH''M) -2011/4/25* Pesach VII -2011/4/26* Pesach VIII -2011/5/1* Yom HaShoah -2011/5/4* Rosh Chodesh Iyyar -2011/5/5* Rosh Chodesh Iyyar -2011/5/9* Yom HaZikaron -2011/5/10* Yom HaAtzma'ut -2011/5/22* Lag B'Omer -2011/6/1* Yom Yerushalayim -2011/6/3* Rosh Chodesh Sivan -2011/6/7* Erev Shavuot -2011/6/8* Shavuot I -2011/6/9* Shavuot II -2011/7/2* Rosh Chodesh Tamuz -2011/7/3* Rosh Chodesh Tamuz -2011/7/19* Tzom Tammuz -2011/8/1* Rosh Chodesh Av -2011/8/6* Shabbat Hazon -2011/8/9* Tish'a B'Av -2011/8/13* Shabbat Nachamu -2011/8/30* Rosh Chodesh Elul -2011/8/31* Rosh Chodesh Elul -2011/9/28* Erev Rosh Hashana -2011/9/29* Rosh Hashana 5772 -2011/9/30* Rosh Hashana II -2011/10/1* Shabbat Shuva -2011/10/2* Tzom Gedaliah -2011/10/7* Erev Yom Kippur -2011/10/8* Yom Kippur -2011/10/12* Erev Sukkot -2011/10/13* Sukkot I -2011/10/14* Sukkot II -2011/10/15* Sukkot III (CH''M) -2011/10/16* Sukkot IV (CH''M) -2011/10/17* Sukkot V (CH''M) -2011/10/18* Sukkot VI (CH''M) -2011/10/19* Sukkot VII (Hoshana Raba) -2011/10/20* Shmini Atzeret -2011/10/21* Simchat Torah -2011/10/28* Rosh Chodesh Cheshvan -2011/10/29* Rosh Chodesh Cheshvan -2011/11/27* Rosh Chodesh Kislev -2011/12/20* Chanukah: 1 Candle -2011/12/21* Chanukah: 2 Candles -2011/12/22* Chanukah: 3 Candles -2011/12/23* Chanukah: 4 Candles -2011/12/24* Chanukah: 5 Candles -2011/12/25* Chanukah: 6 Candles -2011/12/26* Rosh Chodesh Tevet -2011/12/26* Chanukah: 7 Candles -2011/12/27* Rosh Chodesh Tevet -2011/12/27* Chanukah: 8 Candles -2011/12/28* Chanukah: 8th Day -2012/1/5* Asara B'Tevet -2012/1/25* Rosh Chodesh Sh'vat -2012/2/8* Tu B'Shvat -2012/2/18* Shabbat Shekalim -2012/2/23* Rosh Chodesh Adar -2012/2/24* Rosh Chodesh Adar -2012/3/3* Shabbat Zachor -2012/3/7* Ta'anit Esther -2012/3/8* Purim -2012/3/9* Shushan Purim -2012/3/17* Shabbat Parah -2012/3/24* Rosh Chodesh Nisan -2012/3/24* Shabbat HaChodesh -2012/3/31* Shabbat HaGadol -2012/4/5* Ta'anit Bechorot -2012/4/6* Erev Pesach -2012/4/7* Pesach I -2012/4/8* Pesach II -2012/4/9* Pesach III (CH''M) -2012/4/10* Pesach IV (CH''M) -2012/4/11* Pesach V (CH''M) -2012/4/12* Pesach VI (CH''M) -2012/4/13* Pesach VII -2012/4/14* Pesach VIII -2012/4/19* Yom HaShoah -2012/4/22* Rosh Chodesh Iyyar -2012/4/23* Rosh Chodesh Iyyar -2012/4/25* Yom HaZikaron -2012/4/26* Yom HaAtzma'ut -2012/5/10* Lag B'Omer -2012/5/20* Yom Yerushalayim -2012/5/22* Rosh Chodesh Sivan -2012/5/26* Erev Shavuot -2012/5/27* Shavuot I -2012/5/28* Shavuot II -2012/6/20* Rosh Chodesh Tamuz -2012/6/21* Rosh Chodesh Tamuz -2012/7/8* Tzom Tammuz -2012/7/20* Rosh Chodesh Av -2012/7/28* Shabbat Hazon -2012/7/29* Tish'a B'Av -2012/8/4* Shabbat Nachamu -2012/8/18* Rosh Chodesh Elul -2012/8/19* Rosh Chodesh Elul -2012/9/16* Erev Rosh Hashana -2012/9/17* Rosh Hashana 5773 -2012/9/18* Rosh Hashana II -2012/9/19* Tzom Gedaliah -2012/9/22* Shabbat Shuva -2012/9/25* Erev Yom Kippur -2012/9/26* Yom Kippur -2012/9/30* Erev Sukkot -2012/10/1* Sukkot I -2012/10/2* Sukkot II -2012/10/3* Sukkot III (CH''M) -2012/10/4* Sukkot IV (CH''M) -2012/10/5* Sukkot V (CH''M) -2012/10/6* Sukkot VI (CH''M) -2012/10/7* Sukkot VII (Hoshana Raba) -2012/10/8* Shmini Atzeret -2012/10/9* Simchat Torah -2012/10/16* Rosh Chodesh Cheshvan -2012/10/17* Rosh Chodesh Cheshvan -2012/11/15* Rosh Chodesh Kislev -2012/12/8* Chanukah: 1 Candle -2012/12/9* Chanukah: 2 Candles -2012/12/10* Chanukah: 3 Candles -2012/12/11* Chanukah: 4 Candles -2012/12/12* Chanukah: 5 Candles -2012/12/13* Chanukah: 6 Candles -2012/12/14* Rosh Chodesh Tevet -2012/12/14* Chanukah: 7 Candles -2012/12/15* Chanukah: 8 Candles -2012/12/16* Chanukah: 8th Day -2012/12/23* Asara B'Tevet -2013/1/12* Rosh Chodesh Sh'vat -2013/1/26* Tu B'Shvat -2013/2/9* Shabbat Shekalim -2013/2/10* Rosh Chodesh Adar -2013/2/11* Rosh Chodesh Adar -2013/2/21* Ta'anit Esther -2013/2/23* Shabbat Zachor -2013/2/24* Purim -2013/2/25* Shushan Purim -2013/3/2* Shabbat Parah -2013/3/9* Shabbat HaChodesh -2013/3/12* Rosh Chodesh Nisan -2013/3/23* Shabbat HaGadol -2013/3/25* Ta'anit Bechorot -2013/3/25* Erev Pesach -2013/3/26* Pesach I -2013/3/27* Pesach II -2013/3/28* Pesach III (CH''M) -2013/3/29* Pesach IV (CH''M) -2013/3/30* Pesach V (CH''M) -2013/3/31* Pesach VI (CH''M) -2013/4/1* Pesach VII -2013/4/2* Pesach VIII -2013/4/7* Yom HaShoah -2013/4/10* Rosh Chodesh Iyyar -2013/4/11* Rosh Chodesh Iyyar -2013/4/15* Yom HaZikaron -2013/4/16* Yom HaAtzma'ut -2013/4/28* Lag B'Omer -2013/5/8* Yom Yerushalayim -2013/5/10* Rosh Chodesh Sivan -2013/5/14* Erev Shavuot -2013/5/15* Shavuot I -2013/5/16* Shavuot II -2013/6/8* Rosh Chodesh Tamuz -2013/6/9* Rosh Chodesh Tamuz -2013/6/25* Tzom Tammuz -2013/7/8* Rosh Chodesh Av -2013/7/13* Shabbat Hazon -2013/7/16* Tish'a B'Av -2013/7/20* Shabbat Nachamu -2013/8/6* Rosh Chodesh Elul -2013/8/7* Rosh Chodesh Elul -2013/9/4* Erev Rosh Hashana -2013/9/5* Rosh Hashana 5774 -2013/9/6* Rosh Hashana II -2013/9/7* Shabbat Shuva -2013/9/8* Tzom Gedaliah -2013/9/13* Erev Yom Kippur -2013/9/14* Yom Kippur -2013/9/18* Erev Sukkot -2013/9/19* Sukkot I -2013/9/20* Sukkot II -2013/9/21* Sukkot III (CH''M) -2013/9/22* Sukkot IV (CH''M) -2013/9/23* Sukkot V (CH''M) -2013/9/24* Sukkot VI (CH''M) -2013/9/25* Sukkot VII (Hoshana Raba) -2013/9/26* Shmini Atzeret -2013/9/27* Simchat Torah -2013/10/4* Rosh Chodesh Cheshvan -2013/10/5* Rosh Chodesh Cheshvan -2013/11/3* Rosh Chodesh Kislev -2013/11/4* Rosh Chodesh Kislev -2013/11/27* Chanukah: 1 Candle -2013/11/28* Chanukah: 2 Candles -2013/11/29* Chanukah: 3 Candles -2013/11/30* Chanukah: 4 Candles -2013/12/1* Chanukah: 5 Candles -2013/12/2* Chanukah: 6 Candles -2013/12/3* Rosh Chodesh Tevet -2013/12/3* Chanukah: 7 Candles -2013/12/4* Rosh Chodesh Tevet -2013/12/4* Chanukah: 8 Candles -2013/12/5* Chanukah: 8th Day -2013/12/12* Asara B'Tevet -2014/1/2* Rosh Chodesh Sh'vat -2014/1/16* Tu B'Shvat -2014/1/31* Rosh Chodesh Adar I -2014/2/1* Rosh Chodesh Adar I -2014/2/14* Purim Katan -2014/3/1* Shabbat Shekalim -2014/3/2* Rosh Chodesh Adar II -2014/3/3* Rosh Chodesh Adar II -2014/3/13* Ta'anit Esther -2014/3/15* Shabbat Zachor -2014/3/16* Purim -2014/3/17* Shushan Purim -2014/3/22* Shabbat Parah -2014/3/29* Shabbat HaChodesh -2014/4/1* Rosh Chodesh Nisan -2014/4/12* Shabbat HaGadol -2014/4/14* Ta'anit Bechorot -2014/4/14* Erev Pesach -2014/4/15* Pesach I -2014/4/16* Pesach II -2014/4/17* Pesach III (CH''M) -2014/4/18* Pesach IV (CH''M) -2014/4/19* Pesach V (CH''M) -2014/4/20* Pesach VI (CH''M) -2014/4/21* Pesach VII -2014/4/22* Pesach VIII -2014/4/27* Yom HaShoah -2014/4/30* Rosh Chodesh Iyyar -2014/5/1* Rosh Chodesh Iyyar -2014/5/5* Yom HaZikaron -2014/5/6* Yom HaAtzma'ut -2014/5/18* Lag B'Omer -2014/5/28* Yom Yerushalayim -2014/5/30* Rosh Chodesh Sivan -2014/6/3* Erev Shavuot -2014/6/4* Shavuot I -2014/6/5* Shavuot II -2014/6/28* Rosh Chodesh Tamuz -2014/6/29* Rosh Chodesh Tamuz -2014/7/15* Tzom Tammuz -2014/7/28* Rosh Chodesh Av -2014/8/2* Shabbat Hazon -2014/8/5* Tish'a B'Av -2014/8/9* Shabbat Nachamu -2014/8/26* Rosh Chodesh Elul -2014/8/27* Rosh Chodesh Elul -2014/9/24* Erev Rosh Hashana -2014/9/25* Rosh Hashana 5775 -2014/9/26* Rosh Hashana II -2014/9/27* Shabbat Shuva -2014/9/28* Tzom Gedaliah -2014/10/3* Erev Yom Kippur -2014/10/4* Yom Kippur -2014/10/8* Erev Sukkot -2014/10/9* Sukkot I -2014/10/10* Sukkot II -2014/10/11* Sukkot III (CH''M) -2014/10/12* Sukkot IV (CH''M) -2014/10/13* Sukkot V (CH''M) -2014/10/14* Sukkot VI (CH''M) -2014/10/15* Sukkot VII (Hoshana Raba) -2014/10/16* Shmini Atzeret -2014/10/17* Simchat Torah -2014/10/24* Rosh Chodesh Cheshvan -2014/10/25* Rosh Chodesh Cheshvan -2014/11/23* Rosh Chodesh Kislev -2014/12/16* Chanukah: 1 Candle -2014/12/17* Chanukah: 2 Candles -2014/12/18* Chanukah: 3 Candles -2014/12/19* Chanukah: 4 Candles -2014/12/20* Chanukah: 5 Candles -2014/12/21* Chanukah: 6 Candles -2014/12/22* Rosh Chodesh Tevet -2014/12/22* Chanukah: 7 Candles -2014/12/23* Rosh Chodesh Tevet -2014/12/23* Chanukah: 8 Candles -2014/12/24* Chanukah: 8th Day -2015/1/1* Asara B'Tevet -2015/1/21* Rosh Chodesh Sh'vat -2015/2/4* Tu B'Shvat -2015/2/14* Shabbat Shekalim -2015/2/19* Rosh Chodesh Adar -2015/2/20* Rosh Chodesh Adar -2015/2/28* Shabbat Zachor -2015/3/4* Ta'anit Esther -2015/3/5* Purim -2015/3/6* Shushan Purim -2015/3/14* Shabbat Parah -2015/3/21* Rosh Chodesh Nisan -2015/3/21* Shabbat HaChodesh -2015/3/28* Shabbat HaGadol -2015/4/2* Ta'anit Bechorot -2015/4/3* Erev Pesach -2015/4/4* Pesach I -2015/4/5* Pesach II -2015/4/6* Pesach III (CH''M) -2015/4/7* Pesach IV (CH''M) -2015/4/8* Pesach V (CH''M) -2015/4/9* Pesach VI (CH''M) -2015/4/10* Pesach VII -2015/4/11* Pesach VIII -2015/4/16* Yom HaShoah -2015/4/19* Rosh Chodesh Iyyar -2015/4/20* Rosh Chodesh Iyyar -2015/4/22* Yom HaZikaron -2015/4/23* Yom HaAtzma'ut -2015/5/7* Lag B'Omer -2015/5/17* Yom Yerushalayim -2015/5/19* Rosh Chodesh Sivan -2015/5/23* Erev Shavuot -2015/5/24* Shavuot I -2015/5/25* Shavuot II -2015/6/17* Rosh Chodesh Tamuz -2015/6/18* Rosh Chodesh Tamuz -2015/7/5* Tzom Tammuz -2015/7/17* Rosh Chodesh Av -2015/7/25* Shabbat Hazon -2015/7/26* Tish'a B'Av -2015/8/1* Shabbat Nachamu -2015/8/15* Rosh Chodesh Elul -2015/8/16* Rosh Chodesh Elul -2015/9/13* Erev Rosh Hashana -2015/9/14* Rosh Hashana 5776 -2015/9/15* Rosh Hashana II -2015/9/16* Tzom Gedaliah -2015/9/19* Shabbat Shuva -2015/9/22* Erev Yom Kippur -2015/9/23* Yom Kippur -2015/9/27* Erev Sukkot -2015/9/28* Sukkot I -2015/9/29* Sukkot II -2015/9/30* Sukkot III (CH''M) -2015/10/1* Sukkot IV (CH''M) -2015/10/2* Sukkot V (CH''M) -2015/10/3* Sukkot VI (CH''M) -2015/10/4* Sukkot VII (Hoshana Raba) -2015/10/5* Shmini Atzeret -2015/10/6* Simchat Torah -2015/10/13* Rosh Chodesh Cheshvan -2015/10/14* Rosh Chodesh Cheshvan -2015/11/12* Rosh Chodesh Kislev -2015/11/13* Rosh Chodesh Kislev -2015/12/6* Chanukah: 1 Candle -2015/12/7* Chanukah: 2 Candles -2015/12/8* Chanukah: 3 Candles -2015/12/9* Chanukah: 4 Candles -2015/12/10* Chanukah: 5 Candles -2015/12/11* Chanukah: 6 Candles -2015/12/12* Rosh Chodesh Tevet -2015/12/12* Chanukah: 7 Candles -2015/12/13* Rosh Chodesh Tevet -2015/12/13* Chanukah: 8 Candles -2015/12/14* Chanukah: 8th Day -2015/12/22* Asara B'Tevet -/* - * The calendar data below was for 2007, so it is commented out. - */ +2018/1/17* Rosh Chodesh Sh'vat +2018/1/31* Tu BiShvat +2018/2/10* Shabbat Shekalim +2018/2/15* Rosh Chodesh Adar +2018/2/16* Rosh Chodesh Adar +2018/2/24* Shabbat Zachor +2018/2/28* Ta'anit Esther +2018/2/28* Erev Purim +2018/3/1* Purim +2018/3/2* Shushan Purim +2018/3/10* Shabbat Parah +2018/3/17* Rosh Chodesh Nisan +2018/3/17* Shabbat HaChodesh +2018/3/24* Shabbat HaGadol +2018/3/30* Ta'anit Bechorot +2018/3/30* Erev Pesach +2018/3/31* Pesach I +2018/4/1* Pesach II +2018/4/2* Pesach III (CH''M) +2018/4/3* Pesach IV (CH''M) +2018/4/4* Pesach V (CH''M) +2018/4/5* Pesach VI (CH''M) +2018/4/6* Pesach VII +2018/4/7* Pesach VIII +2018/4/12* Yom HaShoah +2018/4/15* Rosh Chodesh Iyyar +2018/4/16* Rosh Chodesh Iyyar +2018/4/18* Yom HaZikaron +2018/4/19* Yom HaAtzma'ut +2018/4/29* Pesach Sheni +2018/5/3* Lag BaOmer +2018/5/13* Yom Yerushalayim +2018/5/15* Rosh Chodesh Sivan +2018/5/19* Erev Shavuot +2018/5/20* Shavuot I +2018/5/21* Shavuot II +2018/6/13* Rosh Chodesh Tamuz +2018/6/14* Rosh Chodesh Tamuz +2018/7/1* Tzom Tammuz +2018/7/13* Rosh Chodesh Av +2018/7/21* Shabbat Chazon +2018/7/21* Erev Tish'a B'Av +2018/7/22* Tish'a B'Av +2018/7/27* Tu B'Av +2018/7/28* Shabbat Nachamu +2018/8/11* Rosh Chodesh Elul +2018/8/12* Rosh Chodesh Elul +2018/9/1* Leil Selichot +2018/9/9* Erev Rosh Hashana +2018/9/10* Rosh Hashana 5779 +2018/9/11* Rosh Hashana II +2018/9/12* Tzom Gedaliah +2018/9/15* Shabbat Shuva +2018/9/18* Erev Yom Kippur +2018/9/19* Yom Kippur +2018/9/23* Erev Sukkot +2018/9/24* Sukkot I +2018/9/25* Sukkot II +2018/9/26* Sukkot III (CH''M) +2018/9/27* Sukkot IV (CH''M) +2018/9/28* Sukkot V (CH''M) +2018/9/29* Sukkot VI (CH''M) +2018/9/30* Sukkot VII (Hoshana Raba) +2018/10/1* Shmini Atzeret +2018/10/2* Simchat Torah +2018/10/9* Rosh Chodesh Cheshvan +2018/10/10* Rosh Chodesh Cheshvan +2018/10/16* Yom HaAliyah +2018/11/7* Sigd +2018/11/8* Rosh Chodesh Kislev +2018/11/9* Rosh Chodesh Kislev +2018/12/2* Chanukah: 1 Candle +2018/12/3* Chanukah: 2 Candles +2018/12/4* Chanukah: 3 Candles +2018/12/5* Chanukah: 4 Candles +2018/12/6* Chanukah: 5 Candles +2018/12/7* Chanukah: 6 Candles +2018/12/8* Rosh Chodesh Tevet +2018/12/8* Chanukah: 7 Candles +2018/12/9* Rosh Chodesh Tevet +2018/12/9* Chanukah: 8 Candles +2018/12/10* Chanukah: 8th Day +2018/12/18* Asara B'Tevet +2019/1/7* Rosh Chodesh Sh'vat +2019/1/21* Tu BiShvat +2019/2/5* Rosh Chodesh Adar I +2019/2/6* Rosh Chodesh Adar I +2019/2/19* Purim Katan +2019/3/2* Shabbat Shekalim +2019/3/7* Rosh Chodesh Adar II +2019/3/8* Rosh Chodesh Adar II +2019/3/16* Shabbat Zachor +2019/3/20* Ta'anit Esther +2019/3/20* Erev Purim +2019/3/21* Purim +2019/3/22* Shushan Purim +2019/3/30* Shabbat Parah +2019/4/6* Rosh Chodesh Nisan +2019/4/6* Shabbat HaChodesh +2019/4/13* Shabbat HaGadol +2019/4/19* Ta'anit Bechorot +2019/4/19* Erev Pesach +2019/4/20* Pesach I +2019/4/21* Pesach II +2019/4/22* Pesach III (CH''M) +2019/4/23* Pesach IV (CH''M) +2019/4/24* Pesach V (CH''M) +2019/4/25* Pesach VI (CH''M) +2019/4/26* Pesach VII +2019/4/27* Pesach VIII +2019/5/2* Yom HaShoah +2019/5/5* Rosh Chodesh Iyyar +2019/5/6* Rosh Chodesh Iyyar +2019/5/8* Yom HaZikaron +2019/5/9* Yom HaAtzma'ut +2019/5/19* Pesach Sheni +2019/5/23* Lag BaOmer +2019/6/2* Yom Yerushalayim +2019/6/4* Rosh Chodesh Sivan +2019/6/8* Erev Shavuot +2019/6/9* Shavuot I +2019/6/10* Shavuot II +2019/7/3* Rosh Chodesh Tamuz +2019/7/4* Rosh Chodesh Tamuz +2019/7/21* Tzom Tammuz +2019/8/2* Rosh Chodesh Av +2019/8/10* Shabbat Chazon +2019/8/10* Erev Tish'a B'Av +2019/8/11* Tish'a B'Av +2019/8/16* Tu B'Av +2019/8/17* Shabbat Nachamu +2019/8/31* Rosh Chodesh Elul +2019/9/1* Rosh Chodesh Elul +2019/9/21* Leil Selichot +2019/9/29* Erev Rosh Hashana +2019/9/30* Rosh Hashana 5780 +2019/10/1* Rosh Hashana II +2019/10/2* Tzom Gedaliah +2019/10/5* Shabbat Shuva +2019/10/8* Erev Yom Kippur +2019/10/9* Yom Kippur +2019/10/13* Erev Sukkot +2019/10/14* Sukkot I +2019/10/15* Sukkot II +2019/10/16* Sukkot III (CH''M) +2019/10/17* Sukkot IV (CH''M) +2019/10/18* Sukkot V (CH''M) +2019/10/19* Sukkot VI (CH''M) +2019/10/20* Sukkot VII (Hoshana Raba) +2019/10/21* Shmini Atzeret +2019/10/22* Simchat Torah +2019/10/29* Rosh Chodesh Cheshvan +2019/10/30* Rosh Chodesh Cheshvan +2019/11/5* Yom HaAliyah +2019/11/27* Sigd +2019/11/28* Rosh Chodesh Kislev +2019/11/29* Rosh Chodesh Kislev +2019/12/22* Chanukah: 1 Candle +2019/12/23* Chanukah: 2 Candles +2019/12/24* Chanukah: 3 Candles +2019/12/25* Chanukah: 4 Candles +2019/12/26* Chanukah: 5 Candles +2019/12/27* Chanukah: 6 Candles +2019/12/28* Rosh Chodesh Tevet +2019/12/28* Chanukah: 7 Candles +2019/12/29* Rosh Chodesh Tevet +2019/12/29* Chanukah: 8 Candles +2019/12/30* Chanukah: 8th Day +2020/1/7* Asara B'Tevet +2020/1/27* Rosh Chodesh Sh'vat +2020/2/10* Tu BiShvat +2020/2/22* Shabbat Shekalim +2020/2/25* Rosh Chodesh Adar +2020/2/26* Rosh Chodesh Adar +2020/3/7* Shabbat Zachor +2020/3/9* Ta'anit Esther +2020/3/9* Erev Purim +2020/3/10* Purim +2020/3/11* Shushan Purim +2020/3/14* Shabbat Parah +2020/3/21* Shabbat HaChodesh +2020/3/26* Rosh Chodesh Nisan +2020/4/4* Shabbat HaGadol +2020/4/8* Ta'anit Bechorot +2020/4/8* Erev Pesach +2020/4/9* Pesach I +2020/4/10* Pesach II +2020/4/11* Pesach III (CH''M) +2020/4/12* Pesach IV (CH''M) +2020/4/13* Pesach V (CH''M) +2020/4/14* Pesach VI (CH''M) +2020/4/15* Pesach VII +2020/4/16* Pesach VIII +2020/4/21* Yom HaShoah +2020/4/24* Rosh Chodesh Iyyar +2020/4/25* Rosh Chodesh Iyyar +2020/4/28* Yom HaZikaron +2020/4/29* Yom HaAtzma'ut +2020/5/8* Pesach Sheni +2020/5/12* Lag BaOmer +2020/5/22* Yom Yerushalayim +2020/5/24* Rosh Chodesh Sivan +2020/5/28* Erev Shavuot +2020/5/29* Shavuot I +2020/5/30* Shavuot II +2020/6/22* Rosh Chodesh Tamuz +2020/6/23* Rosh Chodesh Tamuz +2020/7/9* Tzom Tammuz +2020/7/22* Rosh Chodesh Av +2020/7/25* Shabbat Chazon +2020/7/29* Erev Tish'a B'Av +2020/7/30* Tish'a B'Av +2020/8/1* Shabbat Nachamu +2020/8/5* Tu B'Av +2020/8/20* Rosh Chodesh Elul +2020/8/21* Rosh Chodesh Elul +2020/9/12* Leil Selichot +2020/9/18* Erev Rosh Hashana +2020/9/19* Rosh Hashana 5781 +2020/9/20* Rosh Hashana II +2020/9/21* Tzom Gedaliah +2020/9/26* Shabbat Shuva +2020/9/27* Erev Yom Kippur +2020/9/28* Yom Kippur +2020/10/2* Erev Sukkot +2020/10/3* Sukkot I +2020/10/4* Sukkot II +2020/10/5* Sukkot III (CH''M) +2020/10/6* Sukkot IV (CH''M) +2020/10/7* Sukkot V (CH''M) +2020/10/8* Sukkot VI (CH''M) +2020/10/9* Sukkot VII (Hoshana Raba) +2020/10/10* Shmini Atzeret +2020/10/11* Simchat Torah +2020/10/18* Rosh Chodesh Cheshvan +2020/10/19* Rosh Chodesh Cheshvan +2020/10/25* Yom HaAliyah +2020/11/16* Sigd +2020/11/17* Rosh Chodesh Kislev +2020/12/10* Chanukah: 1 Candle +2020/12/11* Chanukah: 2 Candles +2020/12/12* Chanukah: 3 Candles +2020/12/13* Chanukah: 4 Candles +2020/12/14* Chanukah: 5 Candles +2020/12/15* Chanukah: 6 Candles +2020/12/16* Rosh Chodesh Tevet +2020/12/16* Chanukah: 7 Candles +2020/12/17* Chanukah: 8 Candles +2020/12/18* Chanukah: 8th Day +2020/12/25* Asara B'Tevet +2021/1/14* Rosh Chodesh Sh'vat +2021/1/28* Tu BiShvat +2021/2/12* Rosh Chodesh Adar +2021/2/13* Rosh Chodesh Adar +2021/2/13* Shabbat Shekalim +2021/2/20* Shabbat Zachor +2021/2/25* Ta'anit Esther +2021/2/25* Erev Purim +2021/2/26* Purim +2021/2/28* Shushan Purim +2021/3/6* Shabbat Parah +2021/3/13* Shabbat HaChodesh +2021/3/14* Rosh Chodesh Nisan +2021/3/25* Ta'anit Bechorot +2021/3/27* Shabbat HaGadol +2021/3/27* Erev Pesach +2021/3/28* Pesach I +2021/3/29* Pesach II +2021/3/30* Pesach III (CH''M) +2021/3/31* Pesach IV (CH''M) +2021/4/1* Pesach V (CH''M) +2021/4/2* Pesach VI (CH''M) +2021/4/3* Pesach VII +2021/4/4* Pesach VIII +2021/4/8* Yom HaShoah +2021/4/12* Rosh Chodesh Iyyar +2021/4/13* Rosh Chodesh Iyyar +2021/4/14* Yom HaZikaron +2021/4/15* Yom HaAtzma'ut +2021/4/26* Pesach Sheni +2021/4/30* Lag BaOmer +2021/5/10* Yom Yerushalayim +2021/5/12* Rosh Chodesh Sivan +2021/5/16* Erev Shavuot +2021/5/17* Shavuot I +2021/5/18* Shavuot II +2021/6/10* Rosh Chodesh Tamuz +2021/6/11* Rosh Chodesh Tamuz +2021/6/27* Tzom Tammuz +2021/7/10* Rosh Chodesh Av +2021/7/17* Shabbat Chazon +2021/7/17* Erev Tish'a B'Av +2021/7/18* Tish'a B'Av +2021/7/24* Shabbat Nachamu +2021/7/24* Tu B'Av +2021/8/8* Rosh Chodesh Elul +2021/8/9* Rosh Chodesh Elul +2021/8/28* Leil Selichot +2021/9/6* Erev Rosh Hashana +2021/9/7* Rosh Hashana 5782 +2021/9/8* Rosh Hashana II +2021/9/9* Tzom Gedaliah +2021/9/11* Shabbat Shuva +2021/9/15* Erev Yom Kippur +2021/9/16* Yom Kippur +2021/9/20* Erev Sukkot +2021/9/21* Sukkot I +2021/9/22* Sukkot II +2021/9/23* Sukkot III (CH''M) +2021/9/24* Sukkot IV (CH''M) +2021/9/25* Sukkot V (CH''M) +2021/9/26* Sukkot VI (CH''M) +2021/9/27* Sukkot VII (Hoshana Raba) +2021/9/28* Shmini Atzeret +2021/9/29* Simchat Torah +2021/10/6* Rosh Chodesh Cheshvan +2021/10/7* Rosh Chodesh Cheshvan +2021/10/13* Yom HaAliyah +2021/11/4* Sigd +2021/11/5* Rosh Chodesh Kislev +2021/11/28* Chanukah: 1 Candle +2021/11/29* Chanukah: 2 Candles +2021/11/30* Chanukah: 3 Candles +2021/12/1* Chanukah: 4 Candles +2021/12/2* Chanukah: 5 Candles +2021/12/3* Chanukah: 6 Candles +2021/12/4* Rosh Chodesh Tevet +2021/12/4* Chanukah: 7 Candles +2021/12/5* Rosh Chodesh Tevet +2021/12/5* Chanukah: 8 Candles +2021/12/6* Chanukah: 8th Day +2021/12/14* Asara B'Tevet +2022/1/3* Rosh Chodesh Sh'vat +2022/1/17* Tu BiShvat +2022/2/1* Rosh Chodesh Adar I +2022/2/2* Rosh Chodesh Adar I +2022/2/15* Purim Katan +2022/2/26* Shabbat Shekalim +2022/3/3* Rosh Chodesh Adar II +2022/3/4* Rosh Chodesh Adar II +2022/3/12* Shabbat Zachor +2022/3/16* Ta'anit Esther +2022/3/16* Erev Purim +2022/3/17* Purim +2022/3/18* Shushan Purim +2022/3/26* Shabbat Parah +2022/4/2* Rosh Chodesh Nisan +2022/4/2* Shabbat HaChodesh +2022/4/9* Shabbat HaGadol +2022/4/15* Ta'anit Bechorot +2022/4/15* Erev Pesach +2022/4/16* Pesach I +2022/4/17* Pesach II +2022/4/18* Pesach III (CH''M) +2022/4/19* Pesach IV (CH''M) +2022/4/20* Pesach V (CH''M) +2022/4/21* Pesach VI (CH''M) +2022/4/22* Pesach VII +2022/4/23* Pesach VIII +2022/4/28* Yom HaShoah +2022/5/1* Rosh Chodesh Iyyar +2022/5/2* Rosh Chodesh Iyyar +2022/5/4* Yom HaZikaron +2022/5/5* Yom HaAtzma'ut +2022/5/15* Pesach Sheni +2022/5/19* Lag BaOmer +2022/5/29* Yom Yerushalayim +2022/5/31* Rosh Chodesh Sivan +2022/6/4* Erev Shavuot +2022/6/5* Shavuot I +2022/6/6* Shavuot II +2022/6/29* Rosh Chodesh Tamuz +2022/6/30* Rosh Chodesh Tamuz +2022/7/17* Tzom Tammuz +2022/7/29* Rosh Chodesh Av +2022/8/6* Shabbat Chazon +2022/8/6* Erev Tish'a B'Av +2022/8/7* Tish'a B'Av +2022/8/12* Tu B'Av +2022/8/13* Shabbat Nachamu +2022/8/27* Rosh Chodesh Elul +2022/8/28* Rosh Chodesh Elul +2022/9/17* Leil Selichot +2022/9/25* Erev Rosh Hashana +2022/9/26* Rosh Hashana 5783 +2022/9/27* Rosh Hashana II +2022/9/28* Tzom Gedaliah +2022/10/1* Shabbat Shuva +2022/10/4* Erev Yom Kippur +2022/10/5* Yom Kippur +2022/10/9* Erev Sukkot +2022/10/10* Sukkot I +2022/10/11* Sukkot II +2022/10/12* Sukkot III (CH''M) +2022/10/13* Sukkot IV (CH''M) +2022/10/14* Sukkot V (CH''M) +2022/10/15* Sukkot VI (CH''M) +2022/10/16* Sukkot VII (Hoshana Raba) +2022/10/17* Shmini Atzeret +2022/10/18* Simchat Torah +2022/10/25* Rosh Chodesh Cheshvan +2022/10/26* Rosh Chodesh Cheshvan +2022/11/1* Yom HaAliyah +2022/11/23* Sigd +2022/11/24* Rosh Chodesh Kislev +2022/11/25* Rosh Chodesh Kislev +2022/12/18* Chanukah: 1 Candle +2022/12/19* Chanukah: 2 Candles +2022/12/20* Chanukah: 3 Candles +2022/12/21* Chanukah: 4 Candles +2022/12/22* Chanukah: 5 Candles +2022/12/23* Chanukah: 6 Candles +2022/12/24* Rosh Chodesh Tevet +2022/12/24* Chanukah: 7 Candles +2022/12/25* Rosh Chodesh Tevet +2022/12/25* Chanukah: 8 Candles +2022/12/26* Chanukah: 8th Day +2023/1/3* Asara B'Tevet +2023/1/23* Rosh Chodesh Sh'vat +2023/2/6* Tu BiShvat +2023/2/18* Shabbat Shekalim +2023/2/21* Rosh Chodesh Adar +2023/2/22* Rosh Chodesh Adar +2023/3/4* Shabbat Zachor +2023/3/6* Ta'anit Esther +2023/3/6* Erev Purim +2023/3/7* Purim +2023/3/8* Shushan Purim +2023/3/11* Shabbat Parah +2023/3/18* Shabbat HaChodesh +2023/3/23* Rosh Chodesh Nisan +2023/4/1* Shabbat HaGadol +2023/4/5* Ta'anit Bechorot +2023/4/5* Erev Pesach +2023/4/6* Pesach I +2023/4/7* Pesach II +2023/4/8* Pesach III (CH''M) +2023/4/9* Pesach IV (CH''M) +2023/4/10* Pesach V (CH''M) +2023/4/11* Pesach VI (CH''M) +2023/4/12* Pesach VII +2023/4/13* Pesach VIII +2023/4/18* Yom HaShoah +2023/4/21* Rosh Chodesh Iyyar +2023/4/22* Rosh Chodesh Iyyar +2023/4/25* Yom HaZikaron +2023/4/26* Yom HaAtzma'ut +2023/5/5* Pesach Sheni +2023/5/9* Lag BaOmer +2023/5/19* Yom Yerushalayim +2023/5/21* Rosh Chodesh Sivan +2023/5/25* Erev Shavuot +2023/5/26* Shavuot I +2023/5/27* Shavuot II +2023/6/19* Rosh Chodesh Tamuz +2023/6/20* Rosh Chodesh Tamuz +2023/7/6* Tzom Tammuz +2023/7/19* Rosh Chodesh Av +2023/7/22* Shabbat Chazon +2023/7/26* Erev Tish'a B'Av +2023/7/27* Tish'a B'Av +2023/7/29* Shabbat Nachamu +2023/8/2* Tu B'Av +2023/8/17* Rosh Chodesh Elul +2023/8/18* Rosh Chodesh Elul +2023/9/9* Leil Selichot +2023/9/15* Erev Rosh Hashana +2023/9/16* Rosh Hashana 5784 +2023/9/17* Rosh Hashana II +2023/9/18* Tzom Gedaliah +2023/9/23* Shabbat Shuva +2023/9/24* Erev Yom Kippur +2023/9/25* Yom Kippur +2023/9/29* Erev Sukkot +2023/9/30* Sukkot I +2023/10/1* Sukkot II +2023/10/2* Sukkot III (CH''M) +2023/10/3* Sukkot IV (CH''M) +2023/10/4* Sukkot V (CH''M) +2023/10/5* Sukkot VI (CH''M) +2023/10/6* Sukkot VII (Hoshana Raba) +2023/10/7* Shmini Atzeret +2023/10/8* Simchat Torah +2023/10/15* Rosh Chodesh Cheshvan +2023/10/16* Rosh Chodesh Cheshvan +2023/10/22* Yom HaAliyah +2023/11/13* Sigd +2023/11/14* Rosh Chodesh Kislev +2023/12/7* Chanukah: 1 Candle +2023/12/8* Chanukah: 2 Candles +2023/12/9* Chanukah: 3 Candles +2023/12/10* Chanukah: 4 Candles +2023/12/11* Chanukah: 5 Candles +2023/12/12* Chanukah: 6 Candles +2023/12/13* Rosh Chodesh Tevet +2023/12/13* Chanukah: 7 Candles +2023/12/14* Chanukah: 8 Candles +2023/12/15* Chanukah: 8th Day +2023/12/22* Asara B'Tevet +2024/1/11* Rosh Chodesh Sh'vat +2024/1/25* Tu BiShvat +2024/2/9* Rosh Chodesh Adar I +2024/2/10* Rosh Chodesh Adar I +2024/2/23* Purim Katan +2024/3/9* Shabbat Shekalim +2024/3/10* Rosh Chodesh Adar II +2024/3/11* Rosh Chodesh Adar II +2024/3/21* Ta'anit Esther +2024/3/23* Shabbat Zachor +2024/3/23* Erev Purim +2024/3/24* Purim +2024/3/25* Shushan Purim +2024/3/30* Shabbat Parah +2024/4/6* Shabbat HaChodesh *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Mar 8 05:40:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E188BF354F9; Thu, 8 Mar 2018 05:40:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 85485868B1; Thu, 8 Mar 2018 05:40:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 777754A60; Thu, 8 Mar 2018 05:40:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w285eDGB005500; Thu, 8 Mar 2018 05:40:13 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w285eD06005498; Thu, 8 Mar 2018 05:40:13 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080540.w285eD06005498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 05:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330629 - stable/11/sbin/growfs X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/growfs X-SVN-Commit-Revision: 330629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 05:40:14 -0000 Author: eadler Date: Thu Mar 8 05:40:13 2018 New Revision: 330629 URL: https://svnweb.freebsd.org/changeset/base/330629 Log: MFC r326820: Tone down the description for the growfs "-y" flag. Modified: stable/11/sbin/growfs/growfs.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/growfs/growfs.8 ============================================================================== --- stable/11/sbin/growfs/growfs.8 Thu Mar 8 05:28:43 2018 (r330628) +++ stable/11/sbin/growfs/growfs.8 Thu Mar 8 05:40:13 2018 (r330629) @@ -37,7 +37,7 @@ .\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ .\" $FreeBSD$ .\" -.Dd May 10, 2016 +.Dd December 13, 2017 .Dt GROWFS 8 .Os .Sh NAME @@ -68,16 +68,10 @@ The following options are available: Causes the new file system parameters to be printed out without actually enlarging the file system. .It Fl y -.Dq Expert mode . -Usually +Causes .Nm -will ask you if you took a backup of your data before and will do some tests -whether -.Ar special -is currently mounted or whether there are any active snapshots on the file -system specified. -This will be suppressed. -So use this option with great care! +to assume yes +as the answer to all operator questions. .It Fl s Ar size Determines the .Ar size From owner-svn-src-all@freebsd.org Thu Mar 8 05:41:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94FB8F357BC; Thu, 8 Mar 2018 05:41:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4172986BF7; Thu, 8 Mar 2018 05:41:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C3B54BB6; Thu, 8 Mar 2018 05:41:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w285fsc3007200; Thu, 8 Mar 2018 05:41:54 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w285fsDh007199; Thu, 8 Mar 2018 05:41:54 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080541.w285fsDh007199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 05:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330630 - stable/11/contrib/top X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/contrib/top X-SVN-Commit-Revision: 330630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 05:41:54 -0000 Author: eadler Date: Thu Mar 8 05:41:53 2018 New Revision: 330630 URL: https://svnweb.freebsd.org/changeset/base/330630 Log: MFC r318587: Add -w to usage string. Modified: stable/11/contrib/top/top.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/top/top.c ============================================================================== --- stable/11/contrib/top/top.c Thu Mar 8 05:40:13 2018 (r330629) +++ stable/11/contrib/top/top.c Thu Mar 8 05:41:53 2018 (r330630) @@ -535,7 +535,7 @@ char *argv[]; default: fprintf(stderr, "Top version %s\n" -"Usage: %s [-abCHIijnPqStuvz] [-d count] [-m io | cpu] [-o field] [-s time]\n" +"Usage: %s [-abCHIijnPqStuvwz] [-d count] [-m io | cpu] [-o field] [-s time]\n" " [-J jail] [-U username] [number]\n", version_string(), myname); exit(1); From owner-svn-src-all@freebsd.org Thu Mar 8 06:17:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE364F36DE9; Thu, 8 Mar 2018 06:17:08 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D98487B6C; Thu, 8 Mar 2018 06:17:08 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53E4050BC; Thu, 8 Mar 2018 06:17:08 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w286H8aY025240; Thu, 8 Mar 2018 06:17:08 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w286H7AF025236; Thu, 8 Mar 2018 06:17:07 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803080617.w286H7AF025236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Thu, 8 Mar 2018 06:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r330631 - in releng: 10.3 10.3/sys/conf 10.4 10.4/sys/conf X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 10.3 10.3/sys/conf 10.4 10.4/sys/conf X-SVN-Commit-Revision: 330631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 06:17:08 -0000 Author: gordon Date: Thu Mar 8 06:17:07 2018 New Revision: 330631 URL: https://svnweb.freebsd.org/changeset/base/330631 Log: Bump newvers and document the updated patch for SA-18:01.ipsec Approved by: so Security: FreeBSD-SA-18:01.ipsec Security: CVE-2018-6916 Modified: releng/10.3/UPDATING releng/10.3/sys/conf/newvers.sh releng/10.4/UPDATING releng/10.4/sys/conf/newvers.sh Modified: releng/10.3/UPDATING ============================================================================== --- releng/10.3/UPDATING Thu Mar 8 05:41:53 2018 (r330630) +++ releng/10.3/UPDATING Thu Mar 8 06:17:07 2018 (r330631) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITHOUT_CLANG to b stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20180308 p28 FreeBSD-SA-18:01.ipsec [revised] + + Fix ipsec validation and use-after-free. + 20180307 p27 FreeBSD-SA-18:01.ipsec FreeBSD-SA-18:02.ntp FreeBSD-EN-18:01.tzdata Modified: releng/10.3/sys/conf/newvers.sh ============================================================================== --- releng/10.3/sys/conf/newvers.sh Thu Mar 8 05:41:53 2018 (r330630) +++ releng/10.3/sys/conf/newvers.sh Thu Mar 8 06:17:07 2018 (r330631) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="RELEASE-p27" +BRANCH="RELEASE-p28" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.4/UPDATING ============================================================================== --- releng/10.4/UPDATING Thu Mar 8 05:41:53 2018 (r330630) +++ releng/10.4/UPDATING Thu Mar 8 06:17:07 2018 (r330631) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITHOUT_CLANG to b stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20180307 p7 FreeBSD-SA-18:01.ipsec [revised] + + Fix ipsec validation and use-after-free. + 20180307 p6 FreeBSD-SA-18:01.ipsec FreeBSD-SA-18:02.ntp FreeBSD-EN-18:01.tzdata Modified: releng/10.4/sys/conf/newvers.sh ============================================================================== --- releng/10.4/sys/conf/newvers.sh Thu Mar 8 05:41:53 2018 (r330630) +++ releng/10.4/sys/conf/newvers.sh Thu Mar 8 06:17:07 2018 (r330631) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.4" -BRANCH="RELEASE-p6" +BRANCH="RELEASE-p7" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Thu Mar 8 06:51:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F170EF3951B; Thu, 8 Mar 2018 06:51:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9551669706; Thu, 8 Mar 2018 06:51:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7623A55D1; Thu, 8 Mar 2018 06:51:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w286pHTi041599; Thu, 8 Mar 2018 06:51:17 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w286pHLa041598; Thu, 8 Mar 2018 06:51:17 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080651.w286pHLa041598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 06:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330632 - stable/11/include X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/include X-SVN-Commit-Revision: 330632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 06:51:18 -0000 Author: eadler Date: Thu Mar 8 06:51:17 2018 New Revision: 330632 URL: https://svnweb.freebsd.org/changeset/base/330632 Log: MFC r326283: netconfig.h: sync with upstream. Bring some comments and the license. Add SPDX License ID tag while here. Modified: stable/11/include/netconfig.h Directory Properties: stable/11/ (props changed) Modified: stable/11/include/netconfig.h ============================================================================== --- stable/11/include/netconfig.h Thu Mar 8 06:17:07 2018 (r330631) +++ stable/11/include/netconfig.h Thu Mar 8 06:51:17 2018 (r330632) @@ -1,6 +1,36 @@ -/* $NetBSD: netconfig.h,v 1.1 2000/06/02 22:57:54 fvdl Exp $ */ +/* $NetBSD: netconfig.h,v 1.6 2008/04/28 20:22:54 martin Exp $ */ /* $FreeBSD$ */ +/*- + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * + * Copyright (c) 2004 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Frank van der Linden. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ #ifndef _NETCONFIG_H_ #define _NETCONFIG_H_ @@ -30,10 +60,10 @@ typedef struct { /* * nc_semantics values */ -#define NC_TPI_CLTS 1 -#define NC_TPI_COTS 2 -#define NC_TPI_COTS_ORD 3 -#define NC_TPI_RAW 4 +#define NC_TPI_CLTS 1 /* Connectionless transport */ +#define NC_TPI_COTS 2 /* Connection oriented transport */ +#define NC_TPI_COTS_ORD 3 /* Connection oriented, ordered transport */ +#define NC_TPI_RAW 4 /* Raw connection */ /* * nc_flag values From owner-svn-src-all@freebsd.org Thu Mar 8 06:54:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A34AF39869; Thu, 8 Mar 2018 06:54:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D798E69AFF; Thu, 8 Mar 2018 06:54:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D26095722; Thu, 8 Mar 2018 06:54:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w286sXBQ044849; Thu, 8 Mar 2018 06:54:33 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w286sXTc044846; Thu, 8 Mar 2018 06:54:33 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080654.w286sXTc044846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 06:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330633 - stable/11/usr.bin/indent X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/indent X-SVN-Commit-Revision: 330633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 06:54:34 -0000 Author: eadler Date: Thu Mar 8 06:54:33 2018 New Revision: 330633 URL: https://svnweb.freebsd.org/changeset/base/330633 Log: MFC r309220: indent(1): Properly handle the wide string literal and wide char constant L. indent(1) treated the "L" in "L'a'" as if it were an identifier and forced a space character after it, breaking valid code. PR: 143090 Modified: stable/11/usr.bin/indent/indent.c stable/11/usr.bin/indent/indent_codes.h stable/11/usr.bin/indent/lexi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/indent/indent.c ============================================================================== --- stable/11/usr.bin/indent/indent.c Thu Mar 8 06:51:17 2018 (r330632) +++ stable/11/usr.bin/indent/indent.c Thu Mar 8 06:54:33 2018 (r330633) @@ -1017,6 +1017,16 @@ check_type: ps.want_blank = true; break; + case strpfx: + if (ps.want_blank) + *e_code++ = ' '; + for (t_ptr = token; *t_ptr; ++t_ptr) { + CHECK_SIZE_CODE; + *e_code++ = *t_ptr; + } + ps.want_blank = false; + break; + case period: /* treat a period kind of like a binary * operation */ *e_code++ = '.'; /* move the period into line */ Modified: stable/11/usr.bin/indent/indent_codes.h ============================================================================== --- stable/11/usr.bin/indent/indent_codes.h Thu Mar 8 06:51:17 2018 (r330632) +++ stable/11/usr.bin/indent/indent_codes.h Thu Mar 8 06:54:33 2018 (r330633) @@ -68,3 +68,4 @@ #define ifhead 30 #define elsehead 31 #define period 32 +#define strpfx 33 Modified: stable/11/usr.bin/indent/lexi.c ============================================================================== --- stable/11/usr.bin/indent/lexi.c Thu Mar 8 06:51:17 2018 (r330632) +++ stable/11/usr.bin/indent/lexi.c Thu Mar 8 06:54:33 2018 (r330633) @@ -228,6 +228,11 @@ lexi(void) fill_buffer(); } *e_token++ = '\0'; + + if (s_token[0] == 'L' && s_token[1] == '\0' && + (*buf_ptr == '"' || *buf_ptr == '\'')) + return (strpfx); + while (*buf_ptr == ' ' || *buf_ptr == '\t') { /* get rid of blanks */ if (++buf_ptr >= buf_end) fill_buffer(); From owner-svn-src-all@freebsd.org Thu Mar 8 07:05:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98530F3A2BA; Thu, 8 Mar 2018 07:05:20 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AB356A1E3; Thu, 8 Mar 2018 07:05:20 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 457DB58BA; Thu, 8 Mar 2018 07:05:20 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2875Ku2050179; Thu, 8 Mar 2018 07:05:20 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2875KcX050178; Thu, 8 Mar 2018 07:05:20 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080705.w2875KcX050178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 07:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330634 - stable/11/usr.bin/indent/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/indent/tests X-SVN-Commit-Revision: 330634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 07:05:20 -0000 Author: eadler Date: Thu Mar 8 07:05:19 2018 New Revision: 330634 URL: https://svnweb.freebsd.org/changeset/base/330634 Log: MFC r313544: indent(1): add regression test cases These examples show expected behavior of indent(1). They are meant to be used together with a regression test mechanism, either Kyua, a Makefile or perhaps something else. The mechanism should in essence do this: indent -P${test}.pro < ${test}.0 > ${test}.0.run and compare ${test}.0.stdout to ${test}.0.run. If the files differ or the exit status isn't 0, the test failed. * ${test}.pro is an indent(1) profile: a list of options passed through a file. The program doesn't complain if the file doesn't exist. * ${test}.0 is a C source file which acts as input for indent(1). It doesn't have to have any particular formatting, since it's the output that matters. * ${test}.0.stdout contains expected output. It doesn't have to be formatted in Kernel Normal Form as the point of the tests is to check for regressions in the program and not to check that it always produces KNF. Added: stable/11/usr.bin/indent/tests/ - copied from r313544, head/usr.bin/indent/tests/ Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Thu Mar 8 07:15:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E65D6F3B091; Thu, 8 Mar 2018 07:15:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94ED76A98B; Thu, 8 Mar 2018 07:15:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FCE45A6C; Thu, 8 Mar 2018 07:15:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w287FEPE054922; Thu, 8 Mar 2018 07:15:14 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w287FEYu054921; Thu, 8 Mar 2018 07:15:14 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080715.w287FEYu054921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 07:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330635 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 330635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 07:15:15 -0000 Author: eadler Date: Thu Mar 8 07:15:14 2018 New Revision: 330635 URL: https://svnweb.freebsd.org/changeset/base/330635 Log: Chase rename of rwho script in r290252 The script and associated variable was changed in r290252. Now just chase it. MFC With: r290252 Reported by: Aaron LI Modified: head/share/man/man5/periodic.conf.5 Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Thu Mar 8 07:05:19 2018 (r330634) +++ head/share/man/man5/periodic.conf.5 Thu Mar 8 07:15:14 2018 (r330635) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 31, 2017 +.Dd March 7, 2018 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -433,7 +433,7 @@ if you want to run without the .Fl n option (to do DNS lookups). -.It Va daily_status_rwho_enable +.It Va daily_status_uptime_enable .Pq Vt bool Set to .Dq Li YES From owner-svn-src-all@freebsd.org Thu Mar 8 07:16:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E91CF3B389; Thu, 8 Mar 2018 07:16:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23BF06AB9A; Thu, 8 Mar 2018 07:16:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A7555A6D; Thu, 8 Mar 2018 07:16:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w287GrCM055014; Thu, 8 Mar 2018 07:16:53 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w287GrN6055013; Thu, 8 Mar 2018 07:16:53 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080716.w287GrN6055013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 07:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330636 - stable/11/sbin/fsdb X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/fsdb X-SVN-Commit-Revision: 330636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 07:16:54 -0000 Author: eadler Date: Thu Mar 8 07:16:53 2018 New Revision: 330636 URL: https://svnweb.freebsd.org/changeset/base/330636 Log: MFC r303539: Use nitems() from sys/param.h. Modified: stable/11/sbin/fsdb/fsdb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/fsdb/fsdb.c ============================================================================== --- stable/11/sbin/fsdb/fsdb.c Thu Mar 8 07:15:14 2018 (r330635) +++ stable/11/sbin/fsdb/fsdb.c Thu Mar 8 07:16:53 2018 (r330636) @@ -900,7 +900,7 @@ CMDFUNCSTART(newtype) return 1; type = DIP(curinode, di_mode) & IFMT; for (tp = typenamemap; - tp < &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)]; + tp < &typenamemap[nitems(typenamemap)]; tp++) { if (!strcmp(argv[1], tp->typename)) { printf("setting type to %s\n", tp->typename); @@ -908,7 +908,7 @@ CMDFUNCSTART(newtype) break; } } - if (tp == &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)]) { + if (tp == &typenamemap[nitems(typenamemap)]) { warnx("type `%s' not known", argv[1]); warnx("try one of `file', `dir', `socket', `fifo'"); return 1; From owner-svn-src-all@freebsd.org Thu Mar 8 07:17:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 164D8F3B45C; Thu, 8 Mar 2018 07:17:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDC9B6ACE6; Thu, 8 Mar 2018 07:17:20 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8B0F5A6E; Thu, 8 Mar 2018 07:17:20 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w287HKh3055081; Thu, 8 Mar 2018 07:17:20 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w287HKkm055080; Thu, 8 Mar 2018 07:17:20 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080717.w287HKkm055080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 07:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330637 - stable/11/usr.bin/at X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/at X-SVN-Commit-Revision: 330637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 07:17:21 -0000 Author: eadler Date: Thu Mar 8 07:17:20 2018 New Revision: 330637 URL: https://svnweb.freebsd.org/changeset/base/330637 Log: MFC r303540: Use nitems() from sys/param.h Sponsored by: gandi.net (BSD Day Taiwan) Modified: stable/11/usr.bin/at/at.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/at/at.c ============================================================================== --- stable/11/usr.bin/at/at.c Thu Mar 8 07:16:53 2018 (r330636) +++ stable/11/usr.bin/at/at.c Thu Mar 8 07:17:20 2018 (r330637) @@ -359,7 +359,7 @@ writefile(time_t runtimer, char queue) else { size_t i; - for (i=0; i Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CD80F3DACB; Thu, 8 Mar 2018 07:50:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEA616BEFE; Thu, 8 Mar 2018 07:50:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7F185F25; Thu, 8 Mar 2018 07:50:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w287oBsN070321; Thu, 8 Mar 2018 07:50:11 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w287oB6s070319; Thu, 8 Mar 2018 07:50:11 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080750.w287oB6s070319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 07:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330638 - in stable/11/bin/cat: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/bin/cat: . tests X-SVN-Commit-Revision: 330638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 07:50:12 -0000 Author: eadler Date: Thu Mar 8 07:50:11 2018 New Revision: 330638 URL: https://svnweb.freebsd.org/changeset/base/330638 Log: MFC r323865: Ammend bin/cat/cat.c so the output is the same aside from blank lines being numbered or unnumbered, depending on whether cat was invoked with -ne or -be. At present, when cat is invoked with -be, there is an aditional difference that the '$' on blank lines is placed on the far left of the output. Discussed in bug 210607. While here, revert the workaround from r304035 which skipped the unit test for this issue previously. PR: 210607 Modified: stable/11/bin/cat/cat.c stable/11/bin/cat/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/cat/cat.c ============================================================================== --- stable/11/bin/cat/cat.c Thu Mar 8 07:17:20 2018 (r330637) +++ stable/11/bin/cat/cat.c Thu Mar 8 07:50:11 2018 (r330638) @@ -226,10 +226,16 @@ cook_cat(FILE *fp) } else gobble = 0; } - if (nflag && (!bflag || ch != '\n')) { - (void)fprintf(stdout, "%6d\t", ++line); - if (ferror(stdout)) - break; + if (nflag) { + if (!bflag || ch != '\n') { + (void)fprintf(stdout, "%6d\t", ++line); + if (ferror(stdout)) + break; + } else if (eflag) { + (void)fprintf(stdout, "%6s\t", ""); + if (ferror(stdout)) + break; + } } } if (ch == '\n') { Modified: stable/11/bin/cat/tests/Makefile ============================================================================== --- stable/11/bin/cat/tests/Makefile Thu Mar 8 07:17:20 2018 (r330637) +++ stable/11/bin/cat/tests/Makefile Thu Mar 8 07:50:11 2018 (r330638) @@ -17,10 +17,4 @@ ${PACKAGE}FILES+= d_vt_output.out .include -d_align.out: ${TESTSRC}/d_align.out - sed -E -e 's,^[[:space:]]{7}\$$$$,\$$,' < ${.ALLSRC} > ${.TARGET}.tmp - mv ${.TARGET}.tmp ${.TARGET} - -CLEANFILES+= d_align.out d_align.out.tmp - .include From owner-svn-src-all@freebsd.org Thu Mar 8 07:52:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F6B1F3DF09; Thu, 8 Mar 2018 07:52:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA4516C3F3; Thu, 8 Mar 2018 07:52:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B540C60C3; Thu, 8 Mar 2018 07:52:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w287qWpi074923; Thu, 8 Mar 2018 07:52:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w287qWpZ074918; Thu, 8 Mar 2018 07:52:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080752.w287qWpZ074918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 07:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330639 - in stable/11/bin: cat date kenv setfacl sh X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/bin: cat date kenv setfacl sh X-SVN-Commit-Revision: 330639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 07:52:33 -0000 Author: eadler Date: Thu Mar 8 07:52:32 2018 New Revision: 330639 URL: https://svnweb.freebsd.org/changeset/base/330639 Log: MFC r326651: Fix mandoc -Tlint warnings in bin/ Many style-level issues are still reported. Modified: stable/11/bin/cat/cat.1 stable/11/bin/date/date.1 stable/11/bin/kenv/kenv.1 stable/11/bin/setfacl/setfacl.1 stable/11/bin/sh/sh.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/cat/cat.1 ============================================================================== --- stable/11/bin/cat/cat.1 Thu Mar 8 07:50:11 2018 (r330638) +++ stable/11/bin/cat/cat.1 Thu Mar 8 07:52:32 2018 (r330639) @@ -195,8 +195,8 @@ utility appeared in .At v1 . .An Dennis Ritchie designed and wrote the first man page. -It appears to have been -.Xr cat 1 . +It appears to have been for +.Nm . .Sh BUGS Because of the shell language mechanism used to perform output redirection, the command Modified: stable/11/bin/date/date.1 ============================================================================== --- stable/11/bin/date/date.1 Thu Mar 8 07:50:11 2018 (r330638) +++ stable/11/bin/date/date.1 Thu Mar 8 07:52:32 2018 (r330639) @@ -131,7 +131,8 @@ The option suppresses this behavior and causes the time to be set only on the current machine. .It Fl R -Use RFC 2822 date and time output format. This is equivalent to use +Use RFC 2822 date and time output format. +This is equivalent to using .Dq Li %a, %d %b %Y \&%T %z as .Ar output_fmt Modified: stable/11/bin/kenv/kenv.1 ============================================================================== --- stable/11/bin/kenv/kenv.1 Thu Mar 8 07:50:11 2018 (r330638) +++ stable/11/bin/kenv/kenv.1 Thu Mar 8 07:52:32 2018 (r330639) @@ -91,11 +91,17 @@ The file can contain lines of the form .Pp .Dl name = "value" # this is a comment .Pp -where whitespace around name and '=', and -everything after a '#' character, are ignored. Almost any printable -character except '=' is acceptable as part of a name. Quotes -are optional and necessary only if the value contains -whitespace. +where whitespace around +.Sq name +and +.Sq = , +and everything after a +.Sq # +character, are ignored. +Almost any printable character except +.Sq = +is acceptable as part of a name. +Quotes are optional and necessary only if the value contains whitespace. .Sh SEE ALSO .Xr kenv 2 , .Xr config 5 , Modified: stable/11/bin/setfacl/setfacl.1 ============================================================================== --- stable/11/bin/setfacl/setfacl.1 Thu Mar 8 07:50:11 2018 (r330638) +++ stable/11/bin/setfacl/setfacl.1 Thu Mar 8 07:52:32 2018 (r330639) @@ -114,7 +114,8 @@ is the input is taken from stdin. .It Fl n Do not recalculate the permissions associated with the ACL -mask entry. This option is not applicable to NFSv4 ACLs. +mask entry. +This option is not applicable to NFSv4 ACLs. .It Fl x Ar entries | position If .Ar entries @@ -291,7 +292,8 @@ specifying the access granted to the owner of the file .Dq Li group@ specifying the access granted to the file owning group; .Dq Li everyone@ -specifying everyone. Note that +specifying everyone. +Note that .Dq Li everyone@ is not the same as traditional Unix .Dq Li other @@ -301,8 +303,8 @@ literally, everyone, including file owner and owning g The ACL qualifier field describes the user or group associated with the ACL entry. It may consist of one of the following: uid or -user name, or gid or group name. In entries whose tag type is -one of +user name, or gid or group name. +In entries whose tag type is one of .Dq Li owner@ , .Dq Li group@ , or Modified: stable/11/bin/sh/sh.1 ============================================================================== --- stable/11/bin/sh/sh.1 Thu Mar 8 07:50:11 2018 (r330638) +++ stable/11/bin/sh/sh.1 Thu Mar 8 07:52:32 2018 (r330639) @@ -1033,7 +1033,7 @@ The syntax of the command is: .Bd -unfilled -offset indent -compact .Ic case Ar word Ic in -.Ar pattern Ns ) Ar list Li ;; +.Ar pattern ) Ar list Li ;; .Ar ... .Ic esac .Ed From owner-svn-src-all@freebsd.org Thu Mar 8 07:55:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B5C3F3E183; Thu, 8 Mar 2018 07:55:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0469F6C59F; Thu, 8 Mar 2018 07:55:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F140760C6; Thu, 8 Mar 2018 07:55:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w287t3i0075084; Thu, 8 Mar 2018 07:55:03 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w287t3g5075083; Thu, 8 Mar 2018 07:55:03 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080755.w287t3g5075083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 07:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330640 - stable/11/bin/cat X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/bin/cat X-SVN-Commit-Revision: 330640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 07:55:04 -0000 Author: eadler Date: Thu Mar 8 07:55:03 2018 New Revision: 330640 URL: https://svnweb.freebsd.org/changeset/base/330640 Log: MFC r327672: stddef.h is not used by cat.c, remove the include. Modified: stable/11/bin/cat/cat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/cat/cat.c ============================================================================== --- stable/11/bin/cat/cat.c Thu Mar 8 07:52:32 2018 (r330639) +++ stable/11/bin/cat/cat.c Thu Mar 8 07:55:03 2018 (r330640) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@freebsd.org Thu Mar 8 07:57:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2879F3E43F; Thu, 8 Mar 2018 07:57:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D8E96C77B; Thu, 8 Mar 2018 07:57:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4868560DE; Thu, 8 Mar 2018 07:57:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w287vR0L075213; Thu, 8 Mar 2018 07:57:27 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w287vQlL075210; Thu, 8 Mar 2018 07:57:26 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080757.w287vQlL075210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 07:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330641 - stable/11/sys/dev/vt X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/vt X-SVN-Commit-Revision: 330641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 07:57:28 -0000 Author: eadler Date: Thu Mar 8 07:57:26 2018 New Revision: 330641 URL: https://svnweb.freebsd.org/changeset/base/330641 Log: MFC r326599: Implement "vidcontrol -h " for vt(4) PR: 210415 Modified: stable/11/sys/dev/vt/vt.h stable/11/sys/dev/vt/vt_buf.c stable/11/sys/dev/vt/vt_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/vt.h ============================================================================== --- stable/11/sys/dev/vt/vt.h Thu Mar 8 07:55:03 2018 (r330640) +++ stable/11/sys/dev/vt/vt.h Thu Mar 8 07:57:26 2018 (r330641) @@ -194,8 +194,8 @@ struct vt_buf { #define VBF_SCROLL 0x8 /* scroll locked mode. */ #define VBF_HISTORY_FULL 0x10 /* All rows filled. */ unsigned int vb_history_size; - int vb_roffset; /* (b) History rows offset. */ - int vb_curroffset; /* (b) Saved rows offset. */ + unsigned int vb_roffset; /* (b) History rows offset. */ + unsigned int vb_curroffset; /* (b) Saved rows offset. */ term_pos_t vb_cursor; /* (u) Cursor position. */ term_pos_t vb_mark_start; /* (b) Copy region start. */ term_pos_t vb_mark_end; /* (b) Copy region end. */ @@ -221,7 +221,7 @@ void vtbuf_cursor_position(struct vt_buf *, const term void vtbuf_scroll_mode(struct vt_buf *vb, int yes); void vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area); void vtbuf_undirty(struct vt_buf *, term_rect_t *); -void vtbuf_sethistory_size(struct vt_buf *, int); +void vtbuf_sethistory_size(struct vt_buf *, unsigned int); int vtbuf_iscursor(const struct vt_buf *vb, int row, int col); void vtbuf_cursor_visibility(struct vt_buf *, int); #ifndef SC_NO_CUTPASTE Modified: stable/11/sys/dev/vt/vt_buf.c ============================================================================== --- stable/11/sys/dev/vt/vt_buf.c Thu Mar 8 07:55:03 2018 (r330640) +++ stable/11/sys/dev/vt/vt_buf.c Thu Mar 8 07:57:26 2018 (r330641) @@ -132,11 +132,10 @@ vthistory_addlines(struct vt_buf *vb, int offset) #endif vb->vb_curroffset += offset; - if (vb->vb_curroffset < 0) - vb->vb_curroffset = 0; - if (vb->vb_curroffset + vb->vb_scr_size.tp_row >= vb->vb_history_size) + if (vb->vb_curroffset + vb->vb_scr_size.tp_row >= vb->vb_history_size) { vb->vb_flags |= VBF_HISTORY_FULL; - vb->vb_curroffset %= vb->vb_history_size; + vb->vb_curroffset %= vb->vb_history_size; + } if ((vb->vb_flags & VBF_SCROLL) == 0) { vb->vb_roffset = vb->vb_curroffset; } @@ -458,7 +457,7 @@ vtbuf_init(struct vt_buf *vb, const term_pos_t *p) } void -vtbuf_sethistory_size(struct vt_buf *vb, int size) +vtbuf_sethistory_size(struct vt_buf *vb, unsigned int size) { term_pos_t p; @@ -472,9 +471,9 @@ void vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, unsigned int history_size) { term_char_t *old, *new, **rows, **oldrows, **copyrows, *row, *oldrow; - int bufsize, rowssize, w, h, c, r, history_was_full; - unsigned int old_history_size; - term_rect_t rect; + unsigned int w, h, c, r, old_history_size; + size_t bufsize, rowssize; + int history_full; history_size = MAX(history_size, p->tp_row); @@ -493,7 +492,8 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns w = vb->vb_scr_size.tp_col; h = vb->vb_scr_size.tp_row; old_history_size = vb->vb_history_size; - history_was_full = vb->vb_flags & VBF_HISTORY_FULL; + history_full = vb->vb_flags & VBF_HISTORY_FULL || + vb->vb_curroffset + h >= history_size; vb->vb_history_size = history_size; vb->vb_buffer = new; @@ -502,20 +502,16 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns vb->vb_scr_size = *p; vtbuf_init_rows(vb); - /* Copy history and fill extra space if needed. */ + /* + * Copy rows to the new buffer. The first row in the history + * is back to index 0, ie. the new buffer doesn't cycle. + */ if (history_size > old_history_size) { - /* - * Copy rows to the new buffer. The first row in the history - * is back to index 0, ie. the new buffer doesn't cycle. - * - * The rest of the new buffer is initialized with blank - * content. - */ for (r = 0; r < old_history_size; r ++) { row = rows[r]; /* Compute the corresponding row in the old buffer. */ - if (history_was_full) + if (history_full) /* * The buffer is full, the "top" row is * the one just after the viewable area @@ -549,18 +545,29 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns } /* Fill remaining rows. */ - rect.tr_begin.tp_col = 0; - rect.tr_begin.tp_row = old_history_size; - rect.tr_end.tp_col = p->tp_col; - rect.tr_end.tp_row = p->tp_row; - vtbuf_fill(vb, &rect, VTBUF_SPACE_CHAR(TERMINAL_NORM_ATTR)); + for (r = old_history_size; r < history_size; r++) { + row = rows[r]; + for (c = MIN(p->tp_col, w); c < p->tp_col; c++) { + row[c] = VTBUF_SPACE_CHAR(TERMINAL_NORM_ATTR); + } + } vb->vb_flags &= ~VBF_HISTORY_FULL; - } else { + /* - * Copy rows to the new buffer. The first row in the history - * is back to index 0, ie. the new buffer doesn't cycle. + * If the screen is already filled (there are non-visible lines + * above the current viewable area), adjust curroffset to the + * new viewable area. * + * If the old buffer was full, set curroffset to the + * th most recent line of history in the new, non-cycled + * buffer. Otherwise, it didn't cycle, so the old curroffset + * is the same in the new buffer. + */ + if (history_full) + vb->vb_curroffset = old_history_size - h; + } else { + /* * (old_history_size - history_size) lines of history are * dropped. */ @@ -573,15 +580,13 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns * See the equivalent if{} block above for an * explanation. */ - if (history_was_full) + if (history_full) oldrow = copyrows[ (vb->vb_curroffset + h + r + (old_history_size - history_size)) % old_history_size]; else - oldrow = copyrows[ - (r + (old_history_size - history_size)) % - old_history_size]; + oldrow = copyrows[r]; memmove(row, oldrow, MIN(p->tp_col, w) * sizeof(term_char_t)); @@ -596,23 +601,13 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns } } - if (!history_was_full && - (vb->vb_curroffset + h) >= history_size) + if (history_full) { + vb->vb_curroffset = history_size - h; vb->vb_flags |= VBF_HISTORY_FULL; + } } - /* - * If the screen is already filled (there are non-visible lines - * above the current viewable area), adjust curroffset to the - * new viewable area. - */ - if (!history_was_full && vb->vb_curroffset > 0) { - vb->vb_curroffset = vb->vb_curroffset + h - p->tp_row; - if (vb->vb_curroffset < 0) - vb->vb_curroffset += vb->vb_history_size; - vb->vb_curroffset %= vb->vb_history_size; - vb->vb_roffset = vb->vb_curroffset; - } + vb->vb_roffset = vb->vb_curroffset; /* Adjust cursor position. */ if (vb->vb_cursor.tp_col > p->tp_col - 1) @@ -626,7 +621,6 @@ vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, uns /* Move cursor to the last line on the screen. */ vb->vb_cursor.tp_row = p->tp_row - 1; - vtbuf_make_undirty(vb); VTBUF_UNLOCK(vb); /* Deallocate old buffer. */ Modified: stable/11/sys/dev/vt/vt_core.c ============================================================================== --- stable/11/sys/dev/vt/vt_core.c Thu Mar 8 07:55:03 2018 (r330640) +++ stable/11/sys/dev/vt/vt_core.c Thu Mar 8 07:57:26 2018 (r330641) @@ -2207,6 +2207,13 @@ skip_thunk: case CONS_BLANKTIME: /* XXX */ return (0); + case CONS_HISTORY: + if (*(int *)data < 0) + return EINVAL; + if (*(int *)data != vd->vd_curwindow->vw_buf.vb_history_size) + vtbuf_sethistory_size(&vd->vd_curwindow->vw_buf, + *(int *)data); + return 0; case CONS_GET: /* XXX */ *(int *)data = M_CG640x480; From owner-svn-src-all@freebsd.org Thu Mar 8 07:59:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B66FFF3E606 for ; Thu, 8 Mar 2018 07:59:07 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x234.google.com (mail-yw0-x234.google.com [IPv6:2607:f8b0:4002:c05::234]) (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 460D46C94E for ; Thu, 8 Mar 2018 07:59:07 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x234.google.com with SMTP id p70so1676568ywg.10 for ; Wed, 07 Mar 2018 23:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dkcmZAtCBA3ndAgUn+Qj6AgA/XBgsakI8tLHdybuhG4=; b=t3DHf22QrsIqH1KtBN9mkN26M/9GAjbUoGwklCXC9priSD+By2ZcB05VPPyv2wPGou e26lB7iq8MdFGBF8FHMBMfshAc3UFY6MGvartWYs+EOiOPp1f7gHX3ppyb9AEravmKeQ oO/54stktbeCGgcQnDqz4lO/XYWuHSjBqcXVQ= 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=dkcmZAtCBA3ndAgUn+Qj6AgA/XBgsakI8tLHdybuhG4=; b=tng8S63xc9M74air+o/V4IY44LWCIHTAs91jm9jPdb/meQT8pi+AIDkAfeAaQ04XFo SNuJb4C8Azwk07B3PQY6y8LQuqqV2KJEJRmB+pYliVutPHxv324+33/GFYZMLF6TViLL mL1h2myO77W5QKAUbJTNGtch1VvChlLXNjCVoeUMouMwRDuKW+1vZRqoKe6Iu9fHMF0A RrF5Znn4yqvoa8O/Cjm0slhlcch3VTdpUSRhOAiNcmMbuXxN/Xrcuxud2y/iBBaAT8e2 bt2vfIlYCmNQdwQTmcpMp9fLlOBB4aBv/dVPizcAoyLeFYK07S92e7WvBRvknc63N9RN CJZg== X-Gm-Message-State: AElRT7Ef5HiaO5vuDSfCM0d+zdVhkxRnh8T4d/iroBfRgWBC+vLogDX+ YOKnyt6JCaZU69cBmqj/ZeZhr6hqTlL5r25+WiQjIw== X-Google-Smtp-Source: AG47ELtFrvKGxiSeudTic+9i0xpUdovGL5m7WVv3nTB61u+qBfMbV3wflkVVtoW/4YVJVli6Sx2BYhY6f1mp4WY9pS4= X-Received: by 10.13.214.214 with SMTP id y205mr15874050ywd.37.1520495946697; Wed, 07 Mar 2018 23:59:06 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Wed, 7 Mar 2018 23:58:36 -0800 (PST) In-Reply-To: <201703181113.v2IBDs2T090790@repo.freebsd.org> References: <201703181113.v2IBDs2T090790@repo.freebsd.org> From: Eitan Adler Date: Wed, 7 Mar 2018 23:58:36 -0800 Message-ID: Subject: Re: svn commit: r315480 - in head/sys: dev/syscons dev/vt kern teken To: Bruce Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 07:59:07 -0000 On 18 March 2017 at 04:13, Bruce Evans wrote: > Author: bde > Date: Sat Mar 18 11:13:54 2017 > New Revision: 315480 > URL: https://svnweb.freebsd.org/changeset/base/315480 > > Log: > Fix bright colors for syscons, and make them work for the first time > for vt. Restore syscons' rendering of background (bg) brightness as > foreground (fg) blinking and vice versa, and add rendering of blinking > as background brightness to vt. Is this one safe to MFC ? -- Eitan Adler From owner-svn-src-all@freebsd.org Thu Mar 8 08:02:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FD95F3EEB5; Thu, 8 Mar 2018 08:02:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00FC56CEA0; Thu, 8 Mar 2018 08:02:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F00C36269; Thu, 8 Mar 2018 08:02:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2882phB080012; Thu, 8 Mar 2018 08:02:51 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2882poC080010; Thu, 8 Mar 2018 08:02:51 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080802.w2882poC080010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 08:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330642 - stable/11/sys/dev/vt X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/vt X-SVN-Commit-Revision: 330642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 08:02:52 -0000 Author: eadler Date: Thu Mar 8 08:02:51 2018 New Revision: 330642 URL: https://svnweb.freebsd.org/changeset/base/330642 Log: MFC r316796: Attempt to clear logos more thoroughly. PR: 202288 Modified: stable/11/sys/dev/vt/vt_cpulogos.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/vt_cpulogos.c ============================================================================== --- stable/11/sys/dev/vt/vt_cpulogos.c Thu Mar 8 07:57:26 2018 (r330641) +++ stable/11/sys/dev/vt/vt_cpulogos.c Thu Mar 8 08:02:51 2018 (r330642) @@ -153,6 +153,7 @@ vt_fini_logos(void *dummy __unused) struct winsize wsz; term_pos_t size; unsigned int i; + int row; if (!vt_draw_logo_cpus) return; @@ -170,7 +171,7 @@ vt_fini_logos(void *dummy __unused) vt_draw_logo_cpus = 0; VT_UNLOCK(vd); - for (i = 0; i < VT_MAXWINDOWS; i++) { + for (i = row = 0; i < VT_MAXWINDOWS; i++) { vw = vd->vd_windows[i]; if (vw == NULL) continue; @@ -193,11 +194,16 @@ vt_fini_logos(void *dummy __unused) vt_compute_drawable_area(vw); if (vd->vd_curwindow == vw) { + row = vw->vw_draw_area.tr_begin.tp_row; vd->vd_flags |= VDF_INVALID; vt_resume_flush_timer(vd, 0); } VT_UNLOCK(vd); } + + if (row > 0 && vd->vd_driver->vd_drawrect != NULL) + vd->vd_driver->vd_drawrect(vd, 0, 0, vd->vd_width, row - 1, + 1, TC_BLACK); } static void From owner-svn-src-all@freebsd.org Thu Mar 8 08:04:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D5E3F3F0EF; Thu, 8 Mar 2018 08:04:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4E6B6D034; Thu, 8 Mar 2018 08:04:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA0AB626E; Thu, 8 Mar 2018 08:04:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2884W14080120; Thu, 8 Mar 2018 08:04:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2884Wgc080119; Thu, 8 Mar 2018 08:04:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803080804.w2884Wgc080119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 8 Mar 2018 08:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330643 - stable/11/usr.bin/banner X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/banner X-SVN-Commit-Revision: 330643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 08:04:33 -0000 Author: eadler Date: Thu Mar 8 08:04:32 2018 New Revision: 330643 URL: https://svnweb.freebsd.org/changeset/base/330643 Log: MFC r316797: banner(6): Squash a harmless coverity warning The destination buffer is sized as the sum of program argument lengths, so it has plenty of room for *argv. Appease Coverity by using strlcpy instead of strcpy. Similar to a nearby cleanup performed in r316500. No functional change. Modified: stable/11/usr.bin/banner/banner.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/banner/banner.c ============================================================================== --- stable/11/usr.bin/banner/banner.c Thu Mar 8 08:02:51 2018 (r330642) +++ stable/11/usr.bin/banner/banner.c Thu Mar 8 08:04:32 2018 (r330643) @@ -1062,7 +1062,7 @@ main(int argc, char *argv[]) j += strlen(argv[i]) + 1; if ((message = malloc((size_t)j)) == NULL) err(1, "malloc"); - strcpy(message, *argv); + strlcpy(message, *argv, j); while (*++argv) { strlcat(message, " ", j); strlcat(message, *argv, j); From owner-svn-src-all@freebsd.org Thu Mar 8 09:47:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D23FF468F7; Thu, 8 Mar 2018 09:47:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1073E713EE; Thu, 8 Mar 2018 09:47:11 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 070A17255; Thu, 8 Mar 2018 09:47:11 +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 w289lAVd031160; Thu, 8 Mar 2018 09:47:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w289lArk031151; Thu, 8 Mar 2018 09:47:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803080947.w289lArk031151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 09:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330644 - in head/sys/dev/mlx5: . mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 330644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 09:47:12 -0000 Author: hselasky Date: Thu Mar 8 09:47:09 2018 New Revision: 330644 URL: https://svnweb.freebsd.org/changeset/base/330644 Log: Updates for PCI and health monitor recovery in mlx5core. This patch accumulates the following Linux commits: mlx5_health.c - 78ccb25861d76a8fc5c678d762180e6918834200 mlx5_core: Fix wrong name in struct - 171bb2c560f45c0427ca3776a4c8f4e26e559400 mlx5_core: Update health syndromes - 0144a95e2ad53a40c62148f44fb0c1f9d2a0d1e9 mlx5_core: Use accessor functions to read from device memory - ac6ea6e81a80172612e0c9ef93720f371b198918 mlx5_core: Use private health thread for each device - fd76ee4da55abb21babfc69310d321b9cb9a32e0 mlx5_core: Fix internal error detection conditions - 2241007b3d783cbdbaa78c30bdb1994278b6f9b9 mlx5: Clear health sick bit when starting health poll - 712bfef60912d91033cb25739f7444d5b8d8c59f mlx5: Fix version printout in case of health issue - 89d44f0a6c732db23b219be708e2fe1e03ee4842 mlx5_core: Add pci error handlers to mlx5_core driver mlx5_cmd.c - be87544de8df2b1eb34bcb5e32691287d96f9ec4 mlx5_core: Fix async commands return code - a31208b1e11df334d443ec8cace7636150bb8ce2 mlx5_core: New init and exit flow for mlx5_core - 020446e01eebc9dbe7eda038e570ab9c7ab13586 mlx5_core: Prepare cmd interface to system errors handling - 89d44f0a6c732db23b219be708e2fe1e03ee4842 mlx5_core: Add pci error handlers to mlx5_core driver - 0d834442cc247c7b3f3bd6019512ae03e96dd99a mlx5: Fix teardown errors that happen in pci error handler mlx5_main.c - 5fc7197d3a256d9c5de3134870304b24892a4908 mlx5: Add pci shutdown callback Submitted by: Matthew Finlay MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/device.h head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c head/sys/dev/mlx5/mlx5_core/mlx5_core.h head/sys/dev/mlx5/mlx5_core/mlx5_cq.c head/sys/dev/mlx5/mlx5_core/mlx5_eq.c head/sys/dev/mlx5/mlx5_core/mlx5_health.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c head/sys/dev/mlx5/mlx5_core/mlx5_mr.c head/sys/dev/mlx5/mlx5_core/mlx5_qp.c head/sys/dev/mlx5/mlx5_core/mlx5_srq.c Modified: head/sys/dev/mlx5/device.h ============================================================================== --- head/sys/dev/mlx5/device.h Thu Mar 8 08:04:32 2018 (r330643) +++ head/sys/dev/mlx5/device.h Thu Mar 8 09:47:09 2018 (r330644) @@ -417,7 +417,7 @@ struct mlx5_health_buffer { __be32 rsvd2; u8 irisc_index; u8 synd; - __be16 ext_sync; + __be16 ext_synd; }; struct mlx5_init_seg { Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Thu Mar 8 08:04:32 2018 (r330643) +++ head/sys/dev/mlx5/driver.h Thu Mar 8 09:47:09 2018 (r330644) @@ -479,9 +479,11 @@ struct mlx5_core_health { struct mlx5_health_buffer __iomem *health; __be32 __iomem *health_counter; struct timer_list timer; - struct list_head list; u32 prev; int miss_counter; + bool sick; + struct workqueue_struct *wq; + struct work_struct work; }; #define MLX5_CQ_LINEAR_ARRAY_SIZE 1024 @@ -583,6 +585,17 @@ enum mlx5_device_state { MLX5_DEVICE_STATE_INTERNAL_ERROR, }; +enum mlx5_interface_state { + MLX5_INTERFACE_STATE_DOWN = BIT(0), + MLX5_INTERFACE_STATE_UP = BIT(1), + MLX5_INTERFACE_STATE_SHUTDOWN = BIT(2), +}; + +enum mlx5_pci_status { + MLX5_PCI_STATUS_DISABLED, + MLX5_PCI_STATUS_ENABLED, +}; + struct mlx5_special_contexts { int resd_lkey; }; @@ -590,6 +603,9 @@ struct mlx5_special_contexts { struct mlx5_flow_root_namespace; struct mlx5_core_dev { struct pci_dev *pdev; + /* sync pci state */ + struct mutex pci_status_mutex; + enum mlx5_pci_status pci_status; char board_id[MLX5_BOARD_ID_LEN]; struct mlx5_cmd cmd; struct mlx5_port_caps port_caps[MLX5_MAX_PORTS]; @@ -598,6 +614,9 @@ struct mlx5_core_dev { phys_addr_t iseg_base; struct mlx5_init_seg __iomem *iseg; enum mlx5_device_state state; + /* sync interface state */ + struct mutex intf_state_mutex; + unsigned long intf_state; void (*event) (struct mlx5_core_dev *dev, enum mlx5_dev_event event, unsigned long param); @@ -849,8 +868,8 @@ int mlx5_alloc_uuars(struct mlx5_core_dev *dev, struct int mlx5_free_uuars(struct mlx5_core_dev *dev, struct mlx5_uuar_info *uuari); int mlx5_alloc_map_uar(struct mlx5_core_dev *mdev, struct mlx5_uar *uar); void mlx5_unmap_free_uar(struct mlx5_core_dev *mdev, struct mlx5_uar *uar); -void mlx5_health_cleanup(void); -void __init mlx5_health_init(void); +void mlx5_health_cleanup(struct mlx5_core_dev *dev); +int mlx5_health_init(struct mlx5_core_dev *dev); void mlx5_start_health_poll(struct mlx5_core_dev *dev); void mlx5_stop_health_poll(struct mlx5_core_dev *dev); @@ -908,7 +927,6 @@ void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn void mlx5_srq_event(struct mlx5_core_dev *dev, u32 srqn, int event_type); struct mlx5_core_srq *mlx5_core_get_srq(struct mlx5_core_dev *dev, u32 srqn); void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u32 vector); -void mlx5_trigger_cmd_completions(struct mlx5_core_dev *dev); void mlx5_cq_event(struct mlx5_core_dev *dev, u32 cqn, int event_type); int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx, int nent, u64 mask, const char *name, struct mlx5_uar *uar); @@ -1026,6 +1044,10 @@ struct mlx5_profile { enum { MLX5_PCI_DEV_IS_VF = 1 << 0, +}; + +enum { + MLX5_TRIGGERED_CMD_COMP = (u64)1 << 32, }; static inline int mlx5_core_is_pf(struct mlx5_core_dev *dev) Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Thu Mar 8 08:04:32 2018 (r330643) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Thu Mar 8 09:47:09 2018 (r330644) @@ -295,6 +295,158 @@ static void dump_buf(void *buf, int size, int data_onl pr_debug("\n"); } +enum { + MLX5_DRIVER_STATUS_ABORTED = 0xfe, + MLX5_DRIVER_SYND = 0xbadd00de, +}; + +static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op, + u32 *synd, u8 *status) +{ + *synd = 0; + *status = 0; + + switch (op) { + case MLX5_CMD_OP_TEARDOWN_HCA: + case MLX5_CMD_OP_DISABLE_HCA: + case MLX5_CMD_OP_MANAGE_PAGES: + case MLX5_CMD_OP_DESTROY_MKEY: + case MLX5_CMD_OP_DESTROY_EQ: + case MLX5_CMD_OP_DESTROY_CQ: + case MLX5_CMD_OP_DESTROY_QP: + case MLX5_CMD_OP_DESTROY_PSV: + case MLX5_CMD_OP_DESTROY_SRQ: + case MLX5_CMD_OP_DESTROY_XRC_SRQ: + case MLX5_CMD_OP_DESTROY_DCT: + case MLX5_CMD_OP_DEALLOC_Q_COUNTER: + case MLX5_CMD_OP_DEALLOC_PD: + case MLX5_CMD_OP_DEALLOC_UAR: + case MLX5_CMD_OP_DETACH_FROM_MCG: + case MLX5_CMD_OP_DEALLOC_XRCD: + case MLX5_CMD_OP_DEALLOC_TRANSPORT_DOMAIN: + case MLX5_CMD_OP_DELETE_VXLAN_UDP_DPORT: + case MLX5_CMD_OP_DELETE_L2_TABLE_ENTRY: + case MLX5_CMD_OP_DESTROY_TIR: + case MLX5_CMD_OP_DESTROY_SQ: + case MLX5_CMD_OP_DESTROY_RQ: + case MLX5_CMD_OP_DESTROY_RMP: + case MLX5_CMD_OP_DESTROY_TIS: + case MLX5_CMD_OP_DESTROY_RQT: + case MLX5_CMD_OP_DESTROY_FLOW_TABLE: + case MLX5_CMD_OP_DESTROY_FLOW_GROUP: + case MLX5_CMD_OP_DELETE_FLOW_TABLE_ENTRY: + case MLX5_CMD_OP_2ERR_QP: + case MLX5_CMD_OP_2RST_QP: + case MLX5_CMD_OP_MODIFY_NIC_VPORT_CONTEXT: + case MLX5_CMD_OP_MODIFY_FLOW_TABLE: + case MLX5_CMD_OP_SET_FLOW_TABLE_ENTRY: + case MLX5_CMD_OP_SET_FLOW_TABLE_ROOT: + return MLX5_CMD_STAT_OK; + + case MLX5_CMD_OP_QUERY_HCA_CAP: + case MLX5_CMD_OP_QUERY_ADAPTER: + case MLX5_CMD_OP_INIT_HCA: + case MLX5_CMD_OP_ENABLE_HCA: + case MLX5_CMD_OP_QUERY_PAGES: + case MLX5_CMD_OP_SET_HCA_CAP: + case MLX5_CMD_OP_QUERY_ISSI: + case MLX5_CMD_OP_SET_ISSI: + case MLX5_CMD_OP_CREATE_MKEY: + case MLX5_CMD_OP_QUERY_MKEY: + case MLX5_CMD_OP_QUERY_SPECIAL_CONTEXTS: + case MLX5_CMD_OP_PAGE_FAULT_RESUME: + case MLX5_CMD_OP_CREATE_EQ: + case MLX5_CMD_OP_QUERY_EQ: + case MLX5_CMD_OP_GEN_EQE: + case MLX5_CMD_OP_CREATE_CQ: + case MLX5_CMD_OP_QUERY_CQ: + case MLX5_CMD_OP_MODIFY_CQ: + case MLX5_CMD_OP_CREATE_QP: + case MLX5_CMD_OP_RST2INIT_QP: + case MLX5_CMD_OP_INIT2RTR_QP: + case MLX5_CMD_OP_RTR2RTS_QP: + case MLX5_CMD_OP_RTS2RTS_QP: + case MLX5_CMD_OP_SQERR2RTS_QP: + case MLX5_CMD_OP_QUERY_QP: + case MLX5_CMD_OP_SQD_RTS_QP: + case MLX5_CMD_OP_INIT2INIT_QP: + case MLX5_CMD_OP_CREATE_PSV: + case MLX5_CMD_OP_CREATE_SRQ: + case MLX5_CMD_OP_QUERY_SRQ: + case MLX5_CMD_OP_ARM_RQ: + case MLX5_CMD_OP_CREATE_XRC_SRQ: + case MLX5_CMD_OP_QUERY_XRC_SRQ: + case MLX5_CMD_OP_ARM_XRC_SRQ: + case MLX5_CMD_OP_CREATE_DCT: + case MLX5_CMD_OP_DRAIN_DCT: + case MLX5_CMD_OP_QUERY_DCT: + case MLX5_CMD_OP_ARM_DCT_FOR_KEY_VIOLATION: + case MLX5_CMD_OP_QUERY_VPORT_STATE: + case MLX5_CMD_OP_MODIFY_VPORT_STATE: + case MLX5_CMD_OP_QUERY_ESW_VPORT_CONTEXT: + case MLX5_CMD_OP_MODIFY_ESW_VPORT_CONTEXT: + case MLX5_CMD_OP_QUERY_NIC_VPORT_CONTEXT: + case MLX5_CMD_OP_QUERY_ROCE_ADDRESS: + case MLX5_CMD_OP_SET_ROCE_ADDRESS: + case MLX5_CMD_OP_QUERY_HCA_VPORT_CONTEXT: + case MLX5_CMD_OP_MODIFY_HCA_VPORT_CONTEXT: + case MLX5_CMD_OP_QUERY_HCA_VPORT_GID: + case MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY: + case MLX5_CMD_OP_QUERY_VPORT_COUNTER: + case MLX5_CMD_OP_ALLOC_Q_COUNTER: + case MLX5_CMD_OP_QUERY_Q_COUNTER: + case MLX5_CMD_OP_ALLOC_PD: + case MLX5_CMD_OP_ALLOC_UAR: + case MLX5_CMD_OP_CONFIG_INT_MODERATION: + case MLX5_CMD_OP_ACCESS_REG: + case MLX5_CMD_OP_ATTACH_TO_MCG: + case MLX5_CMD_OP_GET_DROPPED_PACKET_LOG: + case MLX5_CMD_OP_MAD_IFC: + case MLX5_CMD_OP_QUERY_MAD_DEMUX: + case MLX5_CMD_OP_SET_MAD_DEMUX: + case MLX5_CMD_OP_NOP: + case MLX5_CMD_OP_ALLOC_XRCD: + case MLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN: + case MLX5_CMD_OP_QUERY_CONG_STATUS: + case MLX5_CMD_OP_MODIFY_CONG_STATUS: + case MLX5_CMD_OP_QUERY_CONG_PARAMS: + case MLX5_CMD_OP_MODIFY_CONG_PARAMS: + case MLX5_CMD_OP_QUERY_CONG_STATISTICS: + case MLX5_CMD_OP_ADD_VXLAN_UDP_DPORT: + case MLX5_CMD_OP_SET_L2_TABLE_ENTRY: + case MLX5_CMD_OP_QUERY_L2_TABLE_ENTRY: + case MLX5_CMD_OP_CREATE_TIR: + case MLX5_CMD_OP_MODIFY_TIR: + case MLX5_CMD_OP_QUERY_TIR: + case MLX5_CMD_OP_CREATE_SQ: + case MLX5_CMD_OP_MODIFY_SQ: + case MLX5_CMD_OP_QUERY_SQ: + case MLX5_CMD_OP_CREATE_RQ: + case MLX5_CMD_OP_MODIFY_RQ: + case MLX5_CMD_OP_QUERY_RQ: + case MLX5_CMD_OP_CREATE_RMP: + case MLX5_CMD_OP_MODIFY_RMP: + case MLX5_CMD_OP_QUERY_RMP: + case MLX5_CMD_OP_CREATE_TIS: + case MLX5_CMD_OP_MODIFY_TIS: + case MLX5_CMD_OP_QUERY_TIS: + case MLX5_CMD_OP_CREATE_RQT: + case MLX5_CMD_OP_MODIFY_RQT: + case MLX5_CMD_OP_QUERY_RQT: + case MLX5_CMD_OP_CREATE_FLOW_TABLE: + case MLX5_CMD_OP_QUERY_FLOW_TABLE: + case MLX5_CMD_OP_CREATE_FLOW_GROUP: + case MLX5_CMD_OP_QUERY_FLOW_GROUP: + case MLX5_CMD_OP_QUERY_FLOW_TABLE_ENTRY: + *status = MLX5_DRIVER_STATUS_ABORTED; + *synd = MLX5_DRIVER_SYND; + return -EIO; + default: + mlx5_core_err(dev, "Unknown FW command (%d)\n", op); + return -EINVAL; + } +} + const char *mlx5_command_str(int command) { #define MLX5_COMMAND_STR_CASE(__cmd) case MLX5_CMD_OP_ ## __cmd: return #__cmd @@ -743,6 +895,7 @@ static void complete_command(struct mlx5_cmd_work_ent mlx5_free_cmd_msg(dev, ent->out); free_msg(dev, ent->in); + err = err ? err : ent->status; free_cmd(ent); callback(err, context); } else { @@ -861,6 +1014,16 @@ static int wait_func(struct mlx5_core_dev *dev, struct return err; } +static __be32 *get_synd_ptr(struct mlx5_outbox_hdr *out) +{ + return &out->syndrome; +} + +static u8 *get_status_ptr(struct mlx5_outbox_hdr *out) +{ + return &out->status; +} + /* Notes: * 1. Callback functions may not sleep * 2. page queue commands do not support asynchrous completion @@ -1102,6 +1265,10 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, else ent->ret = 0; ent->status = ent->lay->status_own >> 1; + if (vector & MLX5_TRIGGERED_CMD_COMP) + ent->status = MLX5_DRIVER_STATUS_ABORTED; + else + ent->status = ent->lay->status_own >> 1; mlx5_core_dbg(dev, "FW command ret 0x%x, status %s(0x%x)\n", @@ -1115,33 +1282,6 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, } EXPORT_SYMBOL(mlx5_cmd_comp_handler); -void mlx5_trigger_cmd_completions(struct mlx5_core_dev *dev) -{ - unsigned long vector; - int i = 0; - unsigned long flags; - synchronize_irq(dev->priv.eq_table.cmd_eq.irqn); - spin_lock_irqsave(&dev->cmd.alloc_lock, flags); - vector = ~dev->cmd.bitmask & ((1ul << (1 << dev->cmd.log_sz)) - 1); - spin_unlock_irqrestore(&dev->cmd.alloc_lock, flags); - - if (!vector) - return; - - for (i = 0; i < (1 << dev->cmd.log_sz); i++) { - struct mlx5_cmd_work_ent *ent = dev->cmd.ent_arr[i]; - - if (!test_bit(i, &vector)) - continue; - - while (ent->busy) - usleep_range(1000, 1100); - free_ent(&dev->cmd, i); - complete_command(ent); - } -} -EXPORT_SYMBOL(mlx5_trigger_cmd_completions); - static int status_to_err(u8 status) { return status ? -1 : 0; /* TBD more meaningful codes */ @@ -1175,6 +1315,11 @@ static struct mlx5_cmd_msg *alloc_msg(struct mlx5_core return msg; } +static u16 opcode_from_in(struct mlx5_inbox_hdr *in) +{ + return be16_to_cpu(in->opcode); +} + static int is_manage_pages(struct mlx5_inbox_hdr *in) { return be16_to_cpu(in->opcode) == MLX5_CMD_OP_MANAGE_PAGES; @@ -1191,7 +1336,16 @@ static int cmd_exec_helper(struct mlx5_core_dev *dev, const gfp_t gfp = GFP_KERNEL; int err; u8 status = 0; + u32 drv_synd; + if (pci_channel_offline(dev->pdev) || + dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) { + err = mlx5_internal_err_ret_value(dev, opcode_from_in(in), &drv_synd, &status); + *get_synd_ptr(out) = cpu_to_be32(drv_synd); + *get_status_ptr(out) = status; + return err; + } + pages_queue = is_manage_pages(in); inb = alloc_msg(dev, in_size, gfp); @@ -1377,6 +1531,7 @@ int mlx5_cmd_init(struct mlx5_core_dev *dev) int err; int i; + memset(cmd, 0, sizeof(*cmd)); cmd_if_rev = cmdif_rev_get(dev); if (cmd_if_rev != CMD_IF_REV) { device_printf((&dev->pdev->dev)->bsddev, "ERR: ""Driver cmdif rev(%d) differs from firmware's(%d)\n", CMD_IF_REV, cmd_if_rev); Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 08:04:32 2018 (r330643) +++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 09:47:09 2018 (r330644) @@ -70,6 +70,10 @@ int mlx5_query_hca_caps(struct mlx5_core_dev *dev); int mlx5_query_board_id(struct mlx5_core_dev *dev); int mlx5_cmd_init_hca(struct mlx5_core_dev *dev); int mlx5_cmd_teardown_hca(struct mlx5_core_dev *dev); +void mlx5_core_event(struct mlx5_core_dev *dev, enum mlx5_dev_event event, + unsigned long param); +void mlx5_enter_error_state(struct mlx5_core_dev *dev); +void mlx5_disable_device(struct mlx5_core_dev *dev); void mlx5e_init(void); void mlx5e_cleanup(void); Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cq.c Thu Mar 8 08:04:32 2018 (r330643) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cq.c Thu Mar 8 09:47:09 2018 (r330644) @@ -294,6 +294,7 @@ int mlx5_init_cq_table(struct mlx5_core_dev *dev) int err; int x; + memset(table, 0, sizeof(*table)); spin_lock_init(&table->lock); for (x = 0; x != MLX5_CQ_LINEAR_ARRAY_SIZE; x++) spin_lock_init(&table->linear_array[x].lock); Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Mar 8 08:04:32 2018 (r330643) +++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Mar 8 09:47:09 2018 (r330644) @@ -398,6 +398,7 @@ int mlx5_create_map_eq(struct mlx5_core_dev *dev, stru int inlen; eq->nent = roundup_pow_of_two(nent + MLX5_NUM_SPARE_EQE); + eq->cons_index = 0; err = mlx5_buf_alloc(dev, eq->nent * MLX5_EQE_SIZE, 2 * PAGE_SIZE, &eq->buf); if (err) Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_health.c Thu Mar 8 08:04:32 2018 (r330643) +++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c Thu Mar 8 09:47:09 2018 (r330644) @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include "mlx5_core.h" @@ -36,31 +37,113 @@ #define MLX5_HEALTH_POLL_INTERVAL (2 * HZ) #define MAX_MISSES 3 -static DEFINE_SPINLOCK(health_lock); -static LIST_HEAD(health_list); -static struct work_struct health_work; +enum { + MLX5_NIC_IFC_FULL = 0, + MLX5_NIC_IFC_DISABLED = 1, + MLX5_NIC_IFC_NO_DRAM_NIC = 2 +}; +static u8 get_nic_interface(struct mlx5_core_dev *dev) +{ + return (ioread32be(&dev->iseg->cmdq_addr_l_sz) >> 8) & 3; +} + +static void mlx5_trigger_cmd_completions(struct mlx5_core_dev *dev) +{ + unsigned long flags; + u64 vector; + + /* wait for pending handlers to complete */ + synchronize_irq(dev->priv.msix_arr[MLX5_EQ_VEC_CMD].vector); + spin_lock_irqsave(&dev->cmd.alloc_lock, flags); + vector = ~dev->cmd.bitmask & ((1ul << (1 << dev->cmd.log_sz)) - 1); + if (!vector) + goto no_trig; + + vector |= MLX5_TRIGGERED_CMD_COMP; + spin_unlock_irqrestore(&dev->cmd.alloc_lock, flags); + + mlx5_core_dbg(dev, "vector 0x%lx\n", vector); + mlx5_cmd_comp_handler(dev, vector); + return; + +no_trig: + spin_unlock_irqrestore(&dev->cmd.alloc_lock, flags); +} + +static int in_fatal(struct mlx5_core_dev *dev) +{ + struct mlx5_core_health *health = &dev->priv.health; + struct mlx5_health_buffer __iomem *h = health->health; + + if (get_nic_interface(dev) == MLX5_NIC_IFC_DISABLED) + return 1; + + if (ioread32be(&h->fw_ver) == 0xffffffff) + return 1; + + return 0; +} + +void mlx5_enter_error_state(struct mlx5_core_dev *dev) +{ + if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) + return; + + mlx5_core_err(dev, "start\n"); + if (pci_channel_offline(dev->pdev) || in_fatal(dev)) + dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR; + + mlx5_core_event(dev, MLX5_DEV_EVENT_SYS_ERROR, 0); + mlx5_core_err(dev, "end\n"); +} + +static void mlx5_handle_bad_state(struct mlx5_core_dev *dev) +{ + u8 nic_interface = get_nic_interface(dev); + + switch (nic_interface) { + case MLX5_NIC_IFC_FULL: + mlx5_core_warn(dev, "Expected to see disabled NIC but it is full driver\n"); + break; + + case MLX5_NIC_IFC_DISABLED: + mlx5_core_warn(dev, "starting teardown\n"); + break; + + case MLX5_NIC_IFC_NO_DRAM_NIC: + mlx5_core_warn(dev, "Expected to see disabled NIC but it is no dram nic\n"); + break; + default: + mlx5_core_warn(dev, "Expected to see disabled NIC but it is has invalid value %d\n", + nic_interface); + } + + mlx5_disable_device(dev); +} + static void health_care(struct work_struct *work) { - struct mlx5_core_health *health, *n; + struct mlx5_core_health *health; struct mlx5_core_dev *dev; struct mlx5_priv *priv; - LIST_HEAD(tlist); - spin_lock_irq(&health_lock); - list_splice_init(&health_list, &tlist); + health = container_of(work, struct mlx5_core_health, work); + priv = container_of(health, struct mlx5_priv, health); + dev = container_of(priv, struct mlx5_core_dev, priv); + mlx5_core_warn(dev, "handling bad device here\n"); + mlx5_handle_bad_state(dev); +} - spin_unlock_irq(&health_lock); +static int get_next_poll_jiffies(void) +{ + unsigned long next; - list_for_each_entry_safe(health, n, &tlist, list) { - priv = container_of(health, struct mlx5_priv, health); - dev = container_of(priv, struct mlx5_core_dev, priv); - mlx5_core_warn(dev, "handling bad device here\n"); - /* nothing yet */ - spin_lock_irq(&health_lock); - list_del_init(&health->list); - spin_unlock_irq(&health_lock); - } + get_random_bytes(&next, sizeof(next)); + next %= HZ; + next += jiffies + MLX5_HEALTH_POLL_INTERVAL; + + return next; } static const char *hsynd_str(u8 synd) @@ -70,6 +153,8 @@ static const char *hsynd_str(u8 synd) return "firmware internal error"; case MLX5_HEALTH_SYNDR_IRISC_ERR: return "irisc not responding"; + case MLX5_HEALTH_SYNDR_HW_UNRECOVERABLE_ERR: + return "unrecoverable hardware error"; case MLX5_HEALTH_SYNDR_CRC_ERR: return "firmware CRC error"; case MLX5_HEALTH_SYNDR_FETCH_PCI_ERR: @@ -80,51 +165,59 @@ static const char *hsynd_str(u8 synd) return "async EQ buffer overrun"; case MLX5_HEALTH_SYNDR_EQ_ERR: return "EQ error"; + case MLX5_HEALTH_SYNDR_EQ_INV: + return "Invalid EQ referenced"; case MLX5_HEALTH_SYNDR_FFSER_ERR: return "FFSER error"; + case MLX5_HEALTH_SYNDR_HIGH_TEMP: + return "High temprature"; default: return "unrecognized error"; } } -static u16 read_be16(__be16 __iomem *p) -{ - return swab16(readl((__force u16 __iomem *) p)); -} - -static u32 read_be32(__be32 __iomem *p) -{ - return swab32(readl((__force u32 __iomem *) p)); -} - static void print_health_info(struct mlx5_core_dev *dev) { struct mlx5_core_health *health = &dev->priv.health; struct mlx5_health_buffer __iomem *h = health->health; + char fw_str[18]; + u32 fw; int i; + /* If the syndrom is 0, the device is OK and no need to print buffer */ + if (!ioread8(&h->synd)) + return; + for (i = 0; i < ARRAY_SIZE(h->assert_var); i++) - printf("mlx5_core: INFO: ""assert_var[%d] 0x%08x\n", i, read_be32(h->assert_var + i)); + printf("mlx5_core: INFO: ""assert_var[%d] 0x%08x\n", i, ioread32be(h->assert_var + i)); - printf("mlx5_core: INFO: ""assert_exit_ptr 0x%08x\n", read_be32(&h->assert_exit_ptr)); - printf("mlx5_core: INFO: ""assert_callra 0x%08x\n", read_be32(&h->assert_callra)); - printf("mlx5_core: INFO: ""fw_ver 0x%08x\n", read_be32(&h->fw_ver)); - printf("mlx5_core: INFO: ""hw_id 0x%08x\n", read_be32(&h->hw_id)); - printf("mlx5_core: INFO: ""irisc_index %d\n", readb(&h->irisc_index)); - printf("mlx5_core: INFO: ""synd 0x%x: %s\n", readb(&h->synd), hsynd_str(readb(&h->synd))); - printf("mlx5_core: INFO: ""ext_sync 0x%04x\n", read_be16(&h->ext_sync)); + printf("mlx5_core: INFO: ""assert_exit_ptr 0x%08x\n", ioread32be(&h->assert_exit_ptr)); + printf("mlx5_core: INFO: ""assert_callra 0x%08x\n", ioread32be(&h->assert_callra)); + snprintf(fw_str, sizeof(fw_str), "%d.%d.%d", fw_rev_maj(dev), fw_rev_min(dev), fw_rev_sub(dev)); + printf("mlx5_core: INFO: ""fw_ver %s\n", fw_str); + printf("mlx5_core: INFO: ""hw_id 0x%08x\n", ioread32be(&h->hw_id)); + printf("mlx5_core: INFO: ""irisc_index %d\n", ioread8(&h->irisc_index)); + printf("mlx5_core: INFO: ""synd 0x%x: %s\n", ioread8(&h->synd), hsynd_str(ioread8(&h->synd))); + printf("mlx5_core: INFO: ""ext_synd 0x%04x\n", ioread16be(&h->ext_synd)); + fw = ioread32be(&h->fw_ver); + printf("mlx5_core: INFO: ""raw fw_ver 0x%08x\n", fw); } static void poll_health(unsigned long data) { struct mlx5_core_dev *dev = (struct mlx5_core_dev *)data; struct mlx5_core_health *health = &dev->priv.health; - int next; u32 count; if (dev->state != MLX5_DEVICE_STATE_UP) return; + if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) { + mlx5_trigger_cmd_completions(dev); + mod_timer(&health->timer, get_next_poll_jiffies()); + return; + } + count = ioread32be(health->health_counter); if (count == health->prev) ++health->miss_counter; @@ -133,28 +226,25 @@ static void poll_health(unsigned long data) health->prev = count; if (health->miss_counter == MAX_MISSES) { - mlx5_core_err(dev, "device's health compromised\n"); + mlx5_core_err(dev, "device's health compromised - reached miss count\n"); print_health_info(dev); - spin_lock_irq(&health_lock); - list_add_tail(&health->list, &health_list); - spin_unlock_irq(&health_lock); - - if (!queue_work(mlx5_core_wq, &health_work)) - mlx5_core_warn(dev, "failed to queue health work\n"); } else { - get_random_bytes(&next, sizeof(next)); - next %= HZ; - next += jiffies + MLX5_HEALTH_POLL_INTERVAL; - mod_timer(&health->timer, next); + mod_timer(&health->timer, get_next_poll_jiffies()); } + + if (in_fatal(dev) && !health->sick) { + health->sick = true; + print_health_info(dev); + queue_work(health->wq, &health->work); + } } void mlx5_start_health_poll(struct mlx5_core_dev *dev) { struct mlx5_core_health *health = &dev->priv.health; - INIT_LIST_HEAD(&health->list); init_timer(&health->timer); + health->sick = 0; health->health = &dev->iseg->health; health->health_counter = &dev->iseg->health_counter; @@ -168,19 +258,35 @@ void mlx5_stop_health_poll(struct mlx5_core_dev *dev) struct mlx5_core_health *health = &dev->priv.health; del_timer_sync(&health->timer); - - spin_lock_irq(&health_lock); - if (!list_empty(&health->list)) - list_del_init(&health->list); - spin_unlock_irq(&health_lock); } -void mlx5_health_cleanup(void) +void mlx5_health_cleanup(struct mlx5_core_dev *dev) { + struct mlx5_core_health *health = &dev->priv.health; + + destroy_workqueue(health->wq); } -void __init mlx5_health_init(void) +#define HEALTH_NAME "mlx5_health" +int mlx5_health_init(struct mlx5_core_dev *dev) { + struct mlx5_core_health *health; + char *name; + int len; - INIT_WORK(&health_work, health_care); + health = &dev->priv.health; + len = strlen(HEALTH_NAME) + strlen(dev_name(&dev->pdev->dev)); + name = kmalloc(len + 1, GFP_KERNEL); + if (!name) + return -ENOMEM; + + snprintf(name, len, "%s:%s", HEALTH_NAME, dev_name(&dev->pdev->dev)); + health->wq = create_singlethread_workqueue(name); + kfree(name); + if (!health->wq) + return -ENOMEM; + + INIT_WORK(&health->work, health_care); + + return 0; } Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu Mar 8 08:04:32 2018 (r330643) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu Mar 8 09:47:09 2018 (r330644) @@ -63,7 +63,6 @@ MODULE_PARM_DESC(prof_sel, "profile selector. Valid ra #define NUMA_NO_NODE -1 -struct workqueue_struct *mlx5_core_wq; static LIST_HEAD(intf_list); static LIST_HEAD(dev_list); static DEFINE_MUTEX(intf_mutex); @@ -186,6 +185,34 @@ static int set_dma_caps(struct pci_dev *pdev) return err; } +static int mlx5_pci_enable_device(struct mlx5_core_dev *dev) +{ + struct pci_dev *pdev = dev->pdev; + int err = 0; + + mutex_lock(&dev->pci_status_mutex); + if (dev->pci_status == MLX5_PCI_STATUS_DISABLED) { + err = pci_enable_device(pdev); + if (!err) + dev->pci_status = MLX5_PCI_STATUS_ENABLED; + } + mutex_unlock(&dev->pci_status_mutex); + + return err; +} + +static void mlx5_pci_disable_device(struct mlx5_core_dev *dev) +{ + struct pci_dev *pdev = dev->pdev; + + mutex_lock(&dev->pci_status_mutex); + if (dev->pci_status == MLX5_PCI_STATUS_ENABLED) { + pci_disable_device(pdev); + dev->pci_status = MLX5_PCI_STATUS_DISABLED; + } + mutex_unlock(&dev->pci_status_mutex); +} + static int request_bar(struct pci_dev *pdev) { int err = 0; @@ -680,12 +707,128 @@ static int wait_fw_init(struct mlx5_core_dev *dev, u32 return err; } -static int mlx5_dev_init(struct mlx5_core_dev *dev, struct pci_dev *pdev) +static void mlx5_add_device(struct mlx5_interface *intf, struct mlx5_priv *priv) { + struct mlx5_device_context *dev_ctx; + struct mlx5_core_dev *dev = container_of(priv, struct mlx5_core_dev, priv); + + dev_ctx = kzalloc(sizeof(*dev_ctx), GFP_KERNEL); + if (!dev_ctx) + return; + + dev_ctx->intf = intf; + CURVNET_SET_QUIET(vnet0); + dev_ctx->context = intf->add(dev); + CURVNET_RESTORE(); + + if (dev_ctx->context) { + spin_lock_irq(&priv->ctx_lock); + list_add_tail(&dev_ctx->list, &priv->ctx_list); + spin_unlock_irq(&priv->ctx_lock); + } else { + kfree(dev_ctx); + } +} + +static void mlx5_remove_device(struct mlx5_interface *intf, struct mlx5_priv *priv) +{ + struct mlx5_device_context *dev_ctx; + struct mlx5_core_dev *dev = container_of(priv, struct mlx5_core_dev, priv); + + list_for_each_entry(dev_ctx, &priv->ctx_list, list) + if (dev_ctx->intf == intf) { + spin_lock_irq(&priv->ctx_lock); + list_del(&dev_ctx->list); + spin_unlock_irq(&priv->ctx_lock); + + intf->remove(dev, dev_ctx->context); + kfree(dev_ctx); + return; + } +} + +static int mlx5_register_device(struct mlx5_core_dev *dev) +{ struct mlx5_priv *priv = &dev->priv; - int err; + struct mlx5_interface *intf; - dev->pdev = pdev; + mutex_lock(&intf_mutex); + list_add_tail(&priv->dev_list, &dev_list); + list_for_each_entry(intf, &intf_list, list) + mlx5_add_device(intf, priv); + mutex_unlock(&intf_mutex); + + return 0; +} + +static void mlx5_unregister_device(struct mlx5_core_dev *dev) +{ + struct mlx5_priv *priv = &dev->priv; + struct mlx5_interface *intf; + + mutex_lock(&intf_mutex); + list_for_each_entry(intf, &intf_list, list) + mlx5_remove_device(intf, priv); + list_del(&priv->dev_list); + mutex_unlock(&intf_mutex); +} + +int mlx5_register_interface(struct mlx5_interface *intf) +{ + struct mlx5_priv *priv; + + if (!intf->add || !intf->remove) + return -EINVAL; + + mutex_lock(&intf_mutex); + list_add_tail(&intf->list, &intf_list); + list_for_each_entry(priv, &dev_list, dev_list) + mlx5_add_device(intf, priv); + mutex_unlock(&intf_mutex); + + return 0; +} +EXPORT_SYMBOL(mlx5_register_interface); + +void mlx5_unregister_interface(struct mlx5_interface *intf) +{ + struct mlx5_priv *priv; + + mutex_lock(&intf_mutex); + list_for_each_entry(priv, &dev_list, dev_list) + mlx5_remove_device(intf, priv); + list_del(&intf->list); + mutex_unlock(&intf_mutex); +} +EXPORT_SYMBOL(mlx5_unregister_interface); + +void *mlx5_get_protocol_dev(struct mlx5_core_dev *mdev, int protocol) +{ + struct mlx5_priv *priv = &mdev->priv; + struct mlx5_device_context *dev_ctx; + unsigned long flags; + void *result = NULL; + + spin_lock_irqsave(&priv->ctx_lock, flags); + + list_for_each_entry(dev_ctx, &mdev->priv.ctx_list, list) + if ((dev_ctx->intf->protocol == protocol) && + dev_ctx->intf->get_dev) { + result = dev_ctx->intf->get_dev(dev_ctx->context); + break; + } + + spin_unlock_irqrestore(&priv->ctx_lock, flags); + + return result; +} +EXPORT_SYMBOL(mlx5_get_protocol_dev); + +static int mlx5_pci_init(struct mlx5_core_dev *dev, struct mlx5_priv *priv) +{ + struct pci_dev *pdev = dev->pdev; + int err = 0; + pci_set_drvdata(dev->pdev, dev); strncpy(priv->name, dev_name(&pdev->dev), MLX5_MAX_NAME_LEN); priv->name[MLX5_MAX_NAME_LEN - 1] = 0; @@ -696,7 +839,7 @@ static int mlx5_dev_init(struct mlx5_core_dev *dev, st priv->numa_node = NUMA_NO_NODE; - err = pci_enable_device(pdev); + err = mlx5_pci_enable_device(dev); if (err) { device_printf((&pdev->dev)->bsddev, "ERR: ""Cannot enable PCI device, aborting\n"); goto err_dbg; @@ -723,6 +866,38 @@ static int mlx5_dev_init(struct mlx5_core_dev *dev, st device_printf((&pdev->dev)->bsddev, "ERR: ""Failed mapping initialization segment, aborting\n"); goto err_clr_master; } + + return 0; + +err_clr_master: + pci_clear_master(dev->pdev); + release_bar(dev->pdev); +err_disable: + mlx5_pci_disable_device(dev); +err_dbg: + return err; +} + +static void mlx5_pci_close(struct mlx5_core_dev *dev, struct mlx5_priv *priv) +{ + iounmap(dev->iseg); + pci_clear_master(dev->pdev); + release_bar(dev->pdev); + mlx5_pci_disable_device(dev); +} + +static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv) +{ + struct pci_dev *pdev = dev->pdev; + int err; + + mutex_lock(&dev->intf_state_mutex); + if (test_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state)) { + dev_warn(&dev->pdev->dev, "%s: interface is up, NOP\n", + __func__); + goto out; + } + device_printf((&pdev->dev)->bsddev, "INFO: ""firmware version: %d.%d.%d\n", fw_rev_maj(dev), fw_rev_min(dev), fw_rev_sub(dev)); /* @@ -734,7 +909,7 @@ static int mlx5_dev_init(struct mlx5_core_dev *dev, st err = mlx5_cmd_init(dev); if (err) { device_printf((&pdev->dev)->bsddev, "ERR: ""Failed initializing command interface, aborting\n"); - goto err_unmap; + goto out_err; } err = wait_fw_init(dev, FW_INIT_TIMEOUT_MILI); @@ -859,8 +1034,21 @@ static int mlx5_dev_init(struct mlx5_core_dev *dev, st goto err_init_tables; } + err = mlx5_register_device(dev); + if (err) { + dev_err(&pdev->dev, "mlx5_register_device failed %d\n", err); + goto err_reg_dev; + } + + clear_bit(MLX5_INTERFACE_STATE_DOWN, &dev->intf_state); + set_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state); + +out: + mutex_unlock(&dev->intf_state_mutex); return 0; +err_reg_dev: + mlx5_cleanup_fs(dev); err_init_tables: mlx5_cleanup_mr_table(dev); mlx5_cleanup_srq_table(dev); @@ -884,7 +1072,7 @@ err_stop_poll: mlx5_stop_health_poll(dev); if (mlx5_cmd_teardown_hca(dev)) { device_printf((&dev->pdev->dev)->bsddev, "ERR: ""tear_down_hca failed, skip cleanup\n"); - return err; + goto out_err; } reclaim_boot_pages: @@ -898,28 +1086,29 @@ err_disable_hca: err_pagealloc_cleanup: mlx5_pagealloc_cleanup(dev); + err_cmd_cleanup: mlx5_cmd_cleanup(dev); -err_unmap: - iounmap(dev->iseg); - -err_clr_master: - pci_clear_master(dev->pdev); - release_bar(dev->pdev); - -err_disable: - pci_disable_device(dev->pdev); - -err_dbg: +out_err: dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR; + mutex_unlock(&dev->intf_state_mutex); + return err; } -static void mlx5_dev_cleanup(struct mlx5_core_dev *dev) +static int mlx5_unload_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Mar 8 09:51:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EBF2F46E7E; Thu, 8 Mar 2018 09:51:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8275718B7; Thu, 8 Mar 2018 09:51:33 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C305C7399; Thu, 8 Mar 2018 09:51:33 +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 w289pXOw032836; Thu, 8 Mar 2018 09:51:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w289pXdD032835; Thu, 8 Mar 2018 09:51:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803080951.w289pXdD032835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 09:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330645 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 330645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 09:51:34 -0000 Author: hselasky Date: Thu Mar 8 09:51:33 2018 New Revision: 330645 URL: https://svnweb.freebsd.org/changeset/base/330645 Log: Avoid calling sleeping function from the health poll thread in mlx5core. linux commit c1d4d2e92ad670168a17a57dfa182a5a5baa72d4 Submitted by: Matthew Finlay MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_health.c Thu Mar 8 09:47:09 2018 (r330644) +++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c Thu Mar 8 09:51:33 2018 (r330645) @@ -87,15 +87,23 @@ static int in_fatal(struct mlx5_core_dev *dev) void mlx5_enter_error_state(struct mlx5_core_dev *dev) { - if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) + mutex_lock(&dev->intf_state_mutex); + if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) { + goto unlock; return; + } mlx5_core_err(dev, "start\n"); - if (pci_channel_offline(dev->pdev) || in_fatal(dev)) + if (pci_channel_offline(dev->pdev) || in_fatal(dev)) { dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR; + mlx5_trigger_cmd_completions(dev); + } mlx5_core_event(dev, MLX5_DEV_EVENT_SYS_ERROR, 0); mlx5_core_err(dev, "end\n"); + +unlock: + mutex_unlock(&dev->intf_state_mutex); } static void mlx5_handle_bad_state(struct mlx5_core_dev *dev) @@ -213,7 +221,6 @@ static void poll_health(unsigned long data) return; if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) { - mlx5_trigger_cmd_completions(dev); mod_timer(&health->timer, get_next_poll_jiffies()); return; } From owner-svn-src-all@freebsd.org Thu Mar 8 09:58:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47564F47761; Thu, 8 Mar 2018 09:58:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7B0371E1C; Thu, 8 Mar 2018 09:58:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE3AC73E0; Thu, 8 Mar 2018 09:58:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w289wf5k036190; Thu, 8 Mar 2018 09:58:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w289wfeR036187; Thu, 8 Mar 2018 09:58:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803080958.w289wfeR036187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 09:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330646 - in head/sys/dev/mlx5: . mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 330646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 09:58:42 -0000 Author: hselasky Date: Thu Mar 8 09:58:41 2018 New Revision: 330646 URL: https://svnweb.freebsd.org/changeset/base/330646 Log: Fix race between PCI error handlers and health work in mlx5core. linux commit 05ac2c0b7438ea08c5d54b48797acf9b22cb2f6f Submitted by: Matthew Finlay MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_health.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Thu Mar 8 09:51:33 2018 (r330645) +++ head/sys/dev/mlx5/driver.h Thu Mar 8 09:58:41 2018 (r330646) @@ -482,7 +482,10 @@ struct mlx5_core_health { u32 prev; int miss_counter; bool sick; + /* wq spinlock to synchronize draining */ + spinlock_t wq_lock; struct workqueue_struct *wq; + unsigned long flags; struct work_struct work; }; @@ -872,6 +875,7 @@ void mlx5_health_cleanup(struct mlx5_core_dev *dev); int mlx5_health_init(struct mlx5_core_dev *dev); void mlx5_start_health_poll(struct mlx5_core_dev *dev); void mlx5_stop_health_poll(struct mlx5_core_dev *dev); +void mlx5_drain_health_wq(struct mlx5_core_dev *dev); #define mlx5_buf_alloc_node(dev, size, direct, buf, node) \ mlx5_buf_alloc(dev, size, direct, buf) Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_health.c Thu Mar 8 09:51:33 2018 (r330645) +++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c Thu Mar 8 09:58:41 2018 (r330646) @@ -43,6 +43,10 @@ enum { MLX5_NIC_IFC_NO_DRAM_NIC = 2 }; +enum { + MLX5_DROP_NEW_HEALTH_WORK, +}; + static u8 get_nic_interface(struct mlx5_core_dev *dev) { return (ioread32be(&dev->iseg->cmdq_addr_l_sz) >> 8) & 3; @@ -242,7 +246,13 @@ static void poll_health(unsigned long data) if (in_fatal(dev) && !health->sick) { health->sick = true; print_health_info(dev); - queue_work(health->wq, &health->work); + spin_lock(&health->wq_lock); + if (!test_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags)) + queue_work(health->wq, &health->work); + else + dev_err(&dev->pdev->dev, + "new health works are not permitted at this stage\n"); + spin_unlock(&health->wq_lock); } } @@ -252,6 +262,7 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev) init_timer(&health->timer); health->sick = 0; + clear_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags); health->health = &dev->iseg->health; health->health_counter = &dev->iseg->health_counter; @@ -267,6 +278,16 @@ void mlx5_stop_health_poll(struct mlx5_core_dev *dev) del_timer_sync(&health->timer); } +void mlx5_drain_health_wq(struct mlx5_core_dev *dev) +{ + struct mlx5_core_health *health = &dev->priv.health; + + spin_lock(&health->wq_lock); + set_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags); + spin_unlock(&health->wq_lock); + cancel_work_sync(&health->work); +} + void mlx5_health_cleanup(struct mlx5_core_dev *dev) { struct mlx5_core_health *health = &dev->priv.health; @@ -293,6 +314,7 @@ int mlx5_health_init(struct mlx5_core_dev *dev) if (!health->wq) return -ENOMEM; + spin_lock_init(&health->wq_lock); INIT_WORK(&health->work, health_care); return 0; Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu Mar 8 09:51:33 2018 (r330645) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu Mar 8 09:58:41 2018 (r330646) @@ -1243,7 +1243,12 @@ static pci_ers_result_t mlx5_pci_err_detected(struct p dev_info(&pdev->dev, "%s was called\n", __func__); mlx5_enter_error_state(dev); mlx5_unload_one(dev, priv); - mlx5_pci_disable_device(dev); + if (state) { + pci_save_state(pdev->dev.bsddev); + mlx5_drain_health_wq(dev); + mlx5_pci_disable_device(dev); + } + return state == pci_channel_io_perm_failure ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_NEED_RESET; } From owner-svn-src-all@freebsd.org Thu Mar 8 10:43:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39768F4AF8C; Thu, 8 Mar 2018 10:43:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE8E273CDF; Thu, 8 Mar 2018 10:43:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D90117BFF; Thu, 8 Mar 2018 10:43:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28Ahg1V060910; Thu, 8 Mar 2018 10:43:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28Ahg6E060905; Thu, 8 Mar 2018 10:43:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081043.w28Ahg6E060905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 10:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330647 - in head/sys/dev/mlx5: . mlx5_core mlx5_en mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core mlx5_en mlx5_ib X-SVN-Commit-Revision: 330647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 10:43:43 -0000 Author: hselasky Date: Thu Mar 8 10:43:42 2018 New Revision: 330647 URL: https://svnweb.freebsd.org/changeset/base/330647 Log: Use the autogenerated interface file for all commands in mlx5core. This patch accumulates the following Linux commits: - 90b3e38d048f09b22fb50bcd460cea65fd00b2d7 mlx5_core: Modify CQ moderation parameters - 09a7d9eca1a6cf5eb4f9abfdf8914db9dbd96f08 mlx5_core: QP/XRCD commands via mlx5 ifc - 1a412fb1caa2c1b77719ccb5ed8b0c3c2bc65da7 mlx5_core: Modify QP commands via mlx5 ifc - ec22eb53106be1472ba6573dc900943f52f8fd1e mlx5_core: MKey/PSV commands via mlx5 ifc - 73b626c182dff06867ceba996a819e8372c9b2ce mlx5_core: EQ commands via mlx5 ifc - 20ed51c643b6296789a48adc3bc2cc875a1612cf mlx5_core: Access register and MAD IFC commands via mlx5 ifc - a533ed5e179cd15512d40282617909d3482a771c mlx5_core: Pages management commands via mlx5 ifc - b8a4ddb2e8f44f872fb93bbda2d541b27079fd2b mlx5_core: Add MLX5_ARRAY_SET64 to fix BUILD_BUG_ON - af1ba291c5e498973cc325c501dd8da80b234571 mlx5_core: Refactor internal SRQ API - b06e7de8a9d8d1d540ec122bbdf2face2a211634 mlx5_core: Refactor device capability function - c4f287c4a6ac489c18afc4acc4353141a8c53070 mlx5_core: Unify and improve command interface Submitted by: Matthew Finlay MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/cq.h head/sys/dev/mlx5/device.h head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c head/sys/dev/mlx5/mlx5_core/mlx5_core.h head/sys/dev/mlx5/mlx5_core/mlx5_cq.c head/sys/dev/mlx5/mlx5_core/mlx5_eq.c head/sys/dev/mlx5/mlx5_core/mlx5_fs_cmd.c head/sys/dev/mlx5/mlx5_core/mlx5_fw.c head/sys/dev/mlx5/mlx5_core/mlx5_mad.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c head/sys/dev/mlx5/mlx5_core/mlx5_mcg.c head/sys/dev/mlx5/mlx5_core/mlx5_mr.c head/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c head/sys/dev/mlx5/mlx5_core/mlx5_pd.c head/sys/dev/mlx5/mlx5_core/mlx5_port.c head/sys/dev/mlx5/mlx5_core/mlx5_qp.c head/sys/dev/mlx5/mlx5_core/mlx5_srq.c head/sys/dev/mlx5/mlx5_core/mlx5_transobj.c head/sys/dev/mlx5/mlx5_core/mlx5_uar.c head/sys/dev/mlx5/mlx5_core/mlx5_vport.c head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c head/sys/dev/mlx5/mlx5_ifc.h head/sys/dev/mlx5/qp.h head/sys/dev/mlx5/srq.h Modified: head/sys/dev/mlx5/cq.h ============================================================================== --- head/sys/dev/mlx5/cq.h Thu Mar 8 09:58:41 2018 (r330646) +++ head/sys/dev/mlx5/cq.h Thu Mar 8 10:43:42 2018 (r330647) @@ -157,12 +157,12 @@ static inline void mlx5_cq_arm(struct mlx5_core_cq *cq int mlx5_init_cq_table(struct mlx5_core_dev *dev); void mlx5_cleanup_cq_table(struct mlx5_core_dev *dev); int mlx5_core_create_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, - struct mlx5_create_cq_mbox_in *in, int inlen); + u32 *in, int inlen); int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); int mlx5_core_query_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, - struct mlx5_query_cq_mbox_out *out); + u32 *out, int outlen); int mlx5_core_modify_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, - struct mlx5_modify_cq_mbox_in *in, int in_sz); + u32 *in, int inlen); int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, u16 cq_period, u16 cq_max_count); Modified: head/sys/dev/mlx5/device.h ============================================================================== --- head/sys/dev/mlx5/device.h Thu Mar 8 09:58:41 2018 (r330646) +++ head/sys/dev/mlx5/device.h Thu Mar 8 10:43:42 2018 (r330647) @@ -92,12 +92,21 @@ __mlx5_mask(typ, fld)) ___t; \ }) -#define MLX5_SET64(typ, p, fld, v) do { \ +#define __MLX5_SET64(typ, p, fld, v) do { \ BUILD_BUG_ON(__mlx5_bit_sz(typ, fld) != 64); \ - BUILD_BUG_ON(__mlx5_bit_off(typ, fld) % 64); \ *((__be64 *)(p) + __mlx5_64_off(typ, fld)) = cpu_to_be64(v); \ } while (0) +#define MLX5_SET64(typ, p, fld, v) do { \ + BUILD_BUG_ON(__mlx5_bit_off(typ, fld) % 64); \ + __MLX5_SET64(typ, p, fld, v); \ +} while (0) + +#define MLX5_ARRAY_SET64(typ, p, fld, idx, v) do { \ + BUILD_BUG_ON(__mlx5_bit_off(typ, fld) % 64); \ + __MLX5_SET64(typ, p, fld[idx], v); \ +} while (0) + #define MLX5_GET64(typ, p, fld) be64_to_cpu(*((__be64 *)(p) + __mlx5_64_off(typ, fld))) #define MLX5_GET64_BE(typ, p, fld) (*((__be64 *)(p) +\ @@ -366,30 +375,6 @@ enum { MLX5_MAX_SGE_RD = (512 - 16 - 16) / 16 }; -struct mlx5_inbox_hdr { - __be16 opcode; - u8 rsvd[4]; - __be16 opmod; -}; - -struct mlx5_outbox_hdr { - u8 status; - u8 rsvd[3]; - __be32 syndrome; -}; - -struct mlx5_cmd_set_dc_cnak_mbox_in { - struct mlx5_inbox_hdr hdr; - u8 enable; - u8 reserved[47]; - __be64 pa; -}; - -struct mlx5_cmd_set_dc_cnak_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; -}; - struct mlx5_cmd_layout { u8 type; u8 rsvd0[3]; @@ -405,7 +390,6 @@ struct mlx5_cmd_layout { u8 status_own; }; - struct mlx5_health_buffer { __be32 assert_var[5]; __be32 rsvd0[3]; @@ -736,211 +720,6 @@ struct mlx5_cqe128 { struct mlx5_cqe64 cqe64; }; -struct mlx5_srq_ctx { - u8 state_log_sz; - u8 rsvd0[3]; - __be32 flags_xrcd; - __be32 pgoff_cqn; - u8 rsvd1[4]; - u8 log_pg_sz; - u8 rsvd2[7]; - __be32 pd; - __be16 lwm; - __be16 wqe_cnt; - u8 rsvd3[8]; - __be64 db_record; -}; - -struct mlx5_create_srq_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 input_srqn; - u8 rsvd0[4]; - struct mlx5_srq_ctx ctx; - u8 rsvd1[208]; - __be64 pas[0]; -}; - -struct mlx5_create_srq_mbox_out { - struct mlx5_outbox_hdr hdr; - __be32 srqn; - u8 rsvd[4]; -}; - -struct mlx5_destroy_srq_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 srqn; - u8 rsvd[4]; -}; - -struct mlx5_destroy_srq_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; -}; - -struct mlx5_query_srq_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 srqn; - u8 rsvd0[4]; -}; - -struct mlx5_query_srq_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd0[8]; - struct mlx5_srq_ctx ctx; - u8 rsvd1[32]; - __be64 pas[0]; -}; - -struct mlx5_arm_srq_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 srqn; - __be16 rsvd; - __be16 lwm; -}; - -struct mlx5_arm_srq_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; -}; - -struct mlx5_cq_context { - u8 status; - u8 cqe_sz_flags; - u8 st; - u8 rsvd3; - u8 rsvd4[6]; - __be16 page_offset; - __be32 log_sz_usr_page; - __be16 cq_period; - __be16 cq_max_count; - __be16 rsvd20; - __be16 c_eqn; - u8 log_pg_sz; - u8 rsvd25[7]; - __be32 last_notified_index; - __be32 solicit_producer_index; - __be32 consumer_counter; - __be32 producer_counter; - u8 rsvd48[8]; - __be64 db_record_addr; -}; - -struct mlx5_create_cq_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 input_cqn; - u8 rsvdx[4]; - struct mlx5_cq_context ctx; - u8 rsvd6[192]; - __be64 pas[0]; -}; - -struct mlx5_create_cq_mbox_out { - struct mlx5_outbox_hdr hdr; - __be32 cqn; - u8 rsvd0[4]; -}; - -struct mlx5_destroy_cq_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 cqn; - u8 rsvd0[4]; -}; - -struct mlx5_destroy_cq_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd0[8]; -}; - -struct mlx5_query_cq_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 cqn; - u8 rsvd0[4]; -}; - -struct mlx5_query_cq_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd0[8]; - struct mlx5_cq_context ctx; - u8 rsvd6[16]; - __be64 pas[0]; -}; - -struct mlx5_modify_cq_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 cqn; - __be32 field_select; - struct mlx5_cq_context ctx; - u8 rsvd[192]; - __be64 pas[0]; -}; - -struct mlx5_modify_cq_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; -}; - -struct mlx5_eq_context { - u8 status; - u8 ec_oi; - u8 st; - u8 rsvd2[7]; - __be16 page_pffset; - __be32 log_sz_usr_page; - u8 rsvd3[7]; - u8 intr; - u8 log_page_size; - u8 rsvd4[15]; - __be32 consumer_counter; - __be32 produser_counter; - u8 rsvd5[16]; -}; - -struct mlx5_create_eq_mbox_in { - struct mlx5_inbox_hdr hdr; - u8 rsvd0[3]; - u8 input_eqn; - u8 rsvd1[4]; - struct mlx5_eq_context ctx; - u8 rsvd2[8]; - __be64 events_mask; - u8 rsvd3[176]; - __be64 pas[0]; -}; - -struct mlx5_create_eq_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd0[3]; - u8 eq_number; - u8 rsvd1[4]; -}; - -struct mlx5_map_eq_mbox_in { - struct mlx5_inbox_hdr hdr; - __be64 mask; - u8 mu; - u8 rsvd0[2]; - u8 eqn; - u8 rsvd1[24]; -}; - -struct mlx5_map_eq_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; -}; - -struct mlx5_query_eq_mbox_in { - struct mlx5_inbox_hdr hdr; - u8 rsvd0[3]; - u8 eqn; - u8 rsvd1[4]; -}; - -struct mlx5_query_eq_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; - struct mlx5_eq_context ctx; -}; - enum { MLX5_MKEY_STATUS_FREE = 1 << 6, }; @@ -967,121 +746,10 @@ struct mlx5_mkey_seg { u8 rsvd4[4]; }; -struct mlx5_query_special_ctxs_mbox_in { - struct mlx5_inbox_hdr hdr; - u8 rsvd[8]; -}; - -struct mlx5_query_special_ctxs_mbox_out { - struct mlx5_outbox_hdr hdr; - __be32 dump_fill_mkey; - __be32 reserved_lkey; -}; - -struct mlx5_create_mkey_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 input_mkey_index; - __be32 flags; - struct mlx5_mkey_seg seg; - u8 rsvd1[16]; - __be32 xlat_oct_act_size; - __be32 rsvd2; - u8 rsvd3[168]; - __be64 pas[0]; -}; - -struct mlx5_create_mkey_mbox_out { - struct mlx5_outbox_hdr hdr; - __be32 mkey; - u8 rsvd[4]; -}; - -struct mlx5_query_mkey_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 mkey; -}; - -struct mlx5_query_mkey_mbox_out { - struct mlx5_outbox_hdr hdr; - __be64 pas[0]; -}; - -struct mlx5_modify_mkey_mbox_in { - struct mlx5_inbox_hdr hdr; - __be32 mkey; - __be64 pas[0]; -}; - -struct mlx5_modify_mkey_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; -}; - -struct mlx5_dump_mkey_mbox_in { - struct mlx5_inbox_hdr hdr; -}; - -struct mlx5_dump_mkey_mbox_out { - struct mlx5_outbox_hdr hdr; - __be32 mkey; -}; - -struct mlx5_mad_ifc_mbox_in { - struct mlx5_inbox_hdr hdr; - __be16 remote_lid; - u8 rsvd0; - u8 port; - u8 rsvd1[4]; - u8 data[256]; -}; - -struct mlx5_mad_ifc_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; - u8 data[256]; -}; - -struct mlx5_access_reg_mbox_in { - struct mlx5_inbox_hdr hdr; - u8 rsvd0[2]; - __be16 register_id; - __be32 arg; - __be32 data[0]; -}; - -struct mlx5_access_reg_mbox_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; - __be32 data[0]; -}; - #define MLX5_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) enum { MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO = 1 << 0 -}; - -struct mlx5_allocate_psv_in { - struct mlx5_inbox_hdr hdr; - __be32 npsv_pd; - __be32 rsvd_psv0; -}; - -struct mlx5_allocate_psv_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; - __be32 psv_idx[4]; -}; - -struct mlx5_destroy_psv_in { - struct mlx5_inbox_hdr hdr; - __be32 psv_number; - u8 rsvd[4]; -}; - -struct mlx5_destroy_psv_out { - struct mlx5_outbox_hdr hdr; - u8 rsvd[8]; }; static inline int mlx5_host_is_le(void) Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Thu Mar 8 09:58:41 2018 (r330646) +++ head/sys/dev/mlx5/driver.h Thu Mar 8 10:43:42 2018 (r330647) @@ -41,6 +41,7 @@ #include #include +#include #define MLX5_QCOUNTER_SETS_NETDEV 64 #define MLX5_MAX_NUMBER_OF_VFS 128 @@ -856,10 +857,8 @@ int mlx5_cmd_init(struct mlx5_core_dev *dev); void mlx5_cmd_cleanup(struct mlx5_core_dev *dev); void mlx5_cmd_use_events(struct mlx5_core_dev *dev); void mlx5_cmd_use_polling(struct mlx5_core_dev *dev); -int mlx5_cmd_status_to_err(struct mlx5_outbox_hdr *hdr); -int mlx5_cmd_status_to_err_v2(void *ptr); -int mlx5_core_get_caps(struct mlx5_core_dev *dev, enum mlx5_cap_type cap_type, - enum mlx5_cap_mode cap_mode); +void mlx5_cmd_mbox_status(void *out, u8 *status, u32 *syndrome); +int mlx5_core_get_caps(struct mlx5_core_dev *dev, enum mlx5_cap_type cap_type); int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out, int out_size); int mlx5_cmd_exec_cb(struct mlx5_core_dev *dev, void *in, int in_size, @@ -883,23 +882,26 @@ int mlx5_buf_alloc(struct mlx5_core_dev *dev, int size struct mlx5_buf *buf); void mlx5_buf_free(struct mlx5_core_dev *dev, struct mlx5_buf *buf); int mlx5_core_create_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, - struct mlx5_create_srq_mbox_in *in, int inlen, - int is_xrc); + struct mlx5_srq_attr *in); int mlx5_core_destroy_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq); int mlx5_core_query_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, - struct mlx5_query_srq_mbox_out *out); + struct mlx5_srq_attr *out); int mlx5_core_query_vendor_id(struct mlx5_core_dev *mdev, u32 *vendor_id); int mlx5_core_arm_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, u16 lwm, int is_srq); void mlx5_init_mr_table(struct mlx5_core_dev *dev); void mlx5_cleanup_mr_table(struct mlx5_core_dev *dev); -int mlx5_core_create_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr, - struct mlx5_create_mkey_mbox_in *in, int inlen, - mlx5_cmd_cbk_t callback, void *context, - struct mlx5_create_mkey_mbox_out *out); -int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr); -int mlx5_core_query_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr, - struct mlx5_query_mkey_mbox_out *out, int outlen); +int mlx5_core_create_mkey_cb(struct mlx5_core_dev *dev, + struct mlx5_core_mr *mkey, + u32 *in, int inlen, + u32 *out, int outlen, + mlx5_cmd_cbk_t callback, void *context); +int mlx5_core_create_mkey(struct mlx5_core_dev *dev, + struct mlx5_core_mr *mr, + u32 *in, int inlen); +int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mkey); +int mlx5_core_query_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mkey, + u32 *out, int outlen); int mlx5_core_dump_fill_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr, u32 *mkey); int mlx5_core_alloc_pd(struct mlx5_core_dev *dev, u32 *pdn); @@ -954,7 +956,7 @@ void mlx5_toggle_port_link(struct mlx5_core_dev *dev); int mlx5_debug_eq_add(struct mlx5_core_dev *dev, struct mlx5_eq *eq); void mlx5_debug_eq_remove(struct mlx5_core_dev *dev, struct mlx5_eq *eq); int mlx5_core_eq_query(struct mlx5_core_dev *dev, struct mlx5_eq *eq, - struct mlx5_query_eq_mbox_out *out, int outlen); + u32 *out, int outlen); int mlx5_eq_debugfs_init(struct mlx5_core_dev *dev); void mlx5_eq_debugfs_cleanup(struct mlx5_core_dev *dev); int mlx5_cq_debugfs_init(struct mlx5_core_dev *dev); Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Thu Mar 8 09:58:41 2018 (r330646) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Thu Mar 8 10:43:42 2018 (r330647) @@ -75,6 +75,26 @@ enum { MLX5_CMD_DELIVERY_STAT_CMD_DESCR_ERR = 0x10, }; +struct mlx5_ifc_mbox_out_bits { + u8 status[0x8]; + u8 reserved_at_8[0x18]; + + u8 syndrome[0x20]; + + u8 reserved_at_40[0x40]; +}; + +struct mlx5_ifc_mbox_in_bits { + u8 opcode[0x10]; + u8 reserved_at_10[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 reserved_at_40[0x40]; +}; + + static struct mlx5_cmd_work_ent *alloc_cmd(struct mlx5_cmd *cmd, struct mlx5_cmd_msg *in, int uin_size, @@ -588,11 +608,105 @@ const char *mlx5_command_str(int command) } } +static const char *cmd_status_str(u8 status) +{ + switch (status) { + case MLX5_CMD_STAT_OK: + return "OK"; + case MLX5_CMD_STAT_INT_ERR: + return "internal error"; + case MLX5_CMD_STAT_BAD_OP_ERR: + return "bad operation"; + case MLX5_CMD_STAT_BAD_PARAM_ERR: + return "bad parameter"; + case MLX5_CMD_STAT_BAD_SYS_STATE_ERR: + return "bad system state"; + case MLX5_CMD_STAT_BAD_RES_ERR: + return "bad resource"; + case MLX5_CMD_STAT_RES_BUSY: + return "resource busy"; + case MLX5_CMD_STAT_LIM_ERR: + return "limits exceeded"; + case MLX5_CMD_STAT_BAD_RES_STATE_ERR: + return "bad resource state"; + case MLX5_CMD_STAT_IX_ERR: + return "bad index"; + case MLX5_CMD_STAT_NO_RES_ERR: + return "no resources"; + case MLX5_CMD_STAT_BAD_INP_LEN_ERR: + return "bad input length"; + case MLX5_CMD_STAT_BAD_OUTP_LEN_ERR: + return "bad output length"; + case MLX5_CMD_STAT_BAD_QP_STATE_ERR: + return "bad QP state"; + case MLX5_CMD_STAT_BAD_PKT_ERR: + return "bad packet (discarded)"; + case MLX5_CMD_STAT_BAD_SIZE_OUTS_CQES_ERR: + return "bad size too many outstanding CQEs"; + default: + return "unknown status"; + } +} + +static int cmd_status_to_err_helper(u8 status) +{ + switch (status) { + case MLX5_CMD_STAT_OK: return 0; + case MLX5_CMD_STAT_INT_ERR: return -EIO; + case MLX5_CMD_STAT_BAD_OP_ERR: return -EINVAL; + case MLX5_CMD_STAT_BAD_PARAM_ERR: return -EINVAL; + case MLX5_CMD_STAT_BAD_SYS_STATE_ERR: return -EIO; + case MLX5_CMD_STAT_BAD_RES_ERR: return -EINVAL; + case MLX5_CMD_STAT_RES_BUSY: return -EBUSY; + case MLX5_CMD_STAT_LIM_ERR: return -ENOMEM; + case MLX5_CMD_STAT_BAD_RES_STATE_ERR: return -EINVAL; + case MLX5_CMD_STAT_IX_ERR: return -EINVAL; + case MLX5_CMD_STAT_NO_RES_ERR: return -EAGAIN; + case MLX5_CMD_STAT_BAD_INP_LEN_ERR: return -EIO; + case MLX5_CMD_STAT_BAD_OUTP_LEN_ERR: return -EIO; + case MLX5_CMD_STAT_BAD_QP_STATE_ERR: return -EINVAL; + case MLX5_CMD_STAT_BAD_PKT_ERR: return -EINVAL; + case MLX5_CMD_STAT_BAD_SIZE_OUTS_CQES_ERR: return -EINVAL; + default: return -EIO; + } +} + +void mlx5_cmd_mbox_status(void *out, u8 *status, u32 *syndrome) +{ + *status = MLX5_GET(mbox_out, out, status); + *syndrome = MLX5_GET(mbox_out, out, syndrome); +} + +static int mlx5_cmd_check(struct mlx5_core_dev *dev, void *in, void *out) +{ + u32 syndrome; + u8 status; + u16 opcode; + u16 op_mod; + + mlx5_cmd_mbox_status(out, &status, &syndrome); + if (!status) + return 0; + + opcode = MLX5_GET(mbox_in, in, opcode); + op_mod = MLX5_GET(mbox_in, in, op_mod); + + mlx5_core_err(dev, + "%s(0x%x) op_mod(0x%x) failed, status %s(0x%x), syndrome (0x%x)\n", + mlx5_command_str(opcode), + opcode, op_mod, + cmd_status_str(status), + status, + syndrome); + + return cmd_status_to_err_helper(status); +} + static void dump_command(struct mlx5_core_dev *dev, struct mlx5_cmd_work_ent *ent, int input) { - u16 op = be16_to_cpu(((struct mlx5_inbox_hdr *)(ent->lay->in))->opcode); struct mlx5_cmd_msg *msg = input ? ent->in : ent->out; + u16 op = MLX5_GET(mbox_in, ent->lay->in, opcode); size_t i; int data_only; int offset = 0; @@ -654,9 +768,7 @@ static void dump_command(struct mlx5_core_dev *dev, static u16 msg_to_opcode(struct mlx5_cmd_msg *in) { - struct mlx5_inbox_hdr *hdr = (struct mlx5_inbox_hdr *)(in->first.data); - - return be16_to_cpu(hdr->opcode); + return MLX5_GET(mbox_in, in->first.data, opcode); } static void cb_timeout_handler(struct work_struct *work) @@ -676,173 +788,6 @@ static void cb_timeout_handler(struct work_struct *wor mlx5_cmd_comp_handler(dev, 1UL << ent->idx); } -static int set_internal_err_outbox(struct mlx5_core_dev *dev, u16 opcode, - struct mlx5_outbox_hdr *hdr) -{ - hdr->status = 0; - hdr->syndrome = 0; - - switch (opcode) { - case MLX5_CMD_OP_TEARDOWN_HCA: - case MLX5_CMD_OP_DISABLE_HCA: - case MLX5_CMD_OP_MANAGE_PAGES: - case MLX5_CMD_OP_DESTROY_MKEY: - case MLX5_CMD_OP_DESTROY_EQ: - case MLX5_CMD_OP_DESTROY_CQ: - case MLX5_CMD_OP_DESTROY_QP: - case MLX5_CMD_OP_DESTROY_PSV: - case MLX5_CMD_OP_DESTROY_SRQ: - case MLX5_CMD_OP_DESTROY_XRC_SRQ: - case MLX5_CMD_OP_DESTROY_DCT: - case MLX5_CMD_OP_DEALLOC_Q_COUNTER: - case MLX5_CMD_OP_DEALLOC_PD: - case MLX5_CMD_OP_DEALLOC_UAR: - case MLX5_CMD_OP_DETACH_FROM_MCG: - case MLX5_CMD_OP_DEALLOC_XRCD: - case MLX5_CMD_OP_DEALLOC_TRANSPORT_DOMAIN: - case MLX5_CMD_OP_DELETE_VXLAN_UDP_DPORT: - case MLX5_CMD_OP_DELETE_L2_TABLE_ENTRY: - case MLX5_CMD_OP_DESTROY_LAG: - case MLX5_CMD_OP_DESTROY_VPORT_LAG: - case MLX5_CMD_OP_DESTROY_TIR: - case MLX5_CMD_OP_DESTROY_SQ: - case MLX5_CMD_OP_DESTROY_RQ: - case MLX5_CMD_OP_DESTROY_RMP: - case MLX5_CMD_OP_DESTROY_TIS: - case MLX5_CMD_OP_DESTROY_RQT: - case MLX5_CMD_OP_DESTROY_FLOW_TABLE: - case MLX5_CMD_OP_DESTROY_FLOW_GROUP: - case MLX5_CMD_OP_DELETE_FLOW_TABLE_ENTRY: - case MLX5_CMD_OP_DEALLOC_FLOW_COUNTER: - case MLX5_CMD_OP_2ERR_QP: - case MLX5_CMD_OP_2RST_QP: - case MLX5_CMD_OP_MODIFY_NIC_VPORT_CONTEXT: - case MLX5_CMD_OP_MODIFY_FLOW_TABLE: - case MLX5_CMD_OP_SET_FLOW_TABLE_ENTRY: - case MLX5_CMD_OP_SET_FLOW_TABLE_ROOT: - case MLX5_CMD_OP_DEALLOC_ENCAP_HEADER: - case MLX5_CMD_OP_DESTROY_SCHEDULING_ELEMENT: - case MLX5_CMD_OP_DESTROY_QOS_PARA_VPORT: - case MLX5_CMD_OP_MODIFY_VPORT_STATE: - case MLX5_CMD_OP_MODIFY_SQ: - case MLX5_CMD_OP_MODIFY_RQ: - case MLX5_CMD_OP_MODIFY_TIS: - case MLX5_CMD_OP_MODIFY_LAG: - case MLX5_CMD_OP_MODIFY_TIR: - case MLX5_CMD_OP_MODIFY_RMP: - case MLX5_CMD_OP_MODIFY_RQT: - case MLX5_CMD_OP_MODIFY_SCHEDULING_ELEMENT: - case MLX5_CMD_OP_MODIFY_CONG_PARAMS: - case MLX5_CMD_OP_MODIFY_CONG_STATUS: - case MLX5_CMD_OP_MODIFY_CQ: - case MLX5_CMD_OP_MODIFY_ESW_VPORT_CONTEXT: - case MLX5_CMD_OP_MODIFY_HCA_VPORT_CONTEXT: - case MLX5_CMD_OP_MODIFY_OTHER_HCA_CAP: - case MLX5_CMD_OP_ACCESS_REG: - case MLX5_CMD_OP_DRAIN_DCT: - return 0; - - case MLX5_CMD_OP_ADD_VXLAN_UDP_DPORT: - case MLX5_CMD_OP_ALLOC_ENCAP_HEADER: - case MLX5_CMD_OP_ALLOC_FLOW_COUNTER: - case MLX5_CMD_OP_ALLOC_PD: - case MLX5_CMD_OP_ALLOC_Q_COUNTER: - case MLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN: - case MLX5_CMD_OP_ALLOC_UAR: - case MLX5_CMD_OP_ALLOC_XRCD: - case MLX5_CMD_OP_ARM_DCT_FOR_KEY_VIOLATION: - case MLX5_CMD_OP_ARM_RQ: - case MLX5_CMD_OP_ARM_XRC_SRQ: - case MLX5_CMD_OP_ATTACH_TO_MCG: - case MLX5_CMD_OP_CONFIG_INT_MODERATION: - case MLX5_CMD_OP_CREATE_CQ: - case MLX5_CMD_OP_CREATE_DCT: - case MLX5_CMD_OP_CREATE_EQ: - case MLX5_CMD_OP_CREATE_FLOW_GROUP: - case MLX5_CMD_OP_CREATE_FLOW_TABLE: - case MLX5_CMD_OP_CREATE_LAG: - case MLX5_CMD_OP_CREATE_MKEY: - case MLX5_CMD_OP_CREATE_PSV: - case MLX5_CMD_OP_CREATE_QOS_PARA_VPORT: - case MLX5_CMD_OP_CREATE_QP: - case MLX5_CMD_OP_CREATE_RMP: - case MLX5_CMD_OP_CREATE_RQ: - case MLX5_CMD_OP_CREATE_RQT: - case MLX5_CMD_OP_CREATE_SCHEDULING_ELEMENT: - case MLX5_CMD_OP_CREATE_SQ: - case MLX5_CMD_OP_CREATE_SRQ: - case MLX5_CMD_OP_CREATE_TIR: - case MLX5_CMD_OP_CREATE_TIS: - case MLX5_CMD_OP_CREATE_VPORT_LAG: - case MLX5_CMD_OP_CREATE_XRC_SRQ: - case MLX5_CMD_OP_ENABLE_HCA: - case MLX5_CMD_OP_GEN_EQE: - case MLX5_CMD_OP_GET_DROPPED_PACKET_LOG: - case MLX5_CMD_OP_INIT2INIT_QP: - case MLX5_CMD_OP_INIT2RTR_QP: - case MLX5_CMD_OP_INIT_HCA: - case MLX5_CMD_OP_MAD_IFC: - case MLX5_CMD_OP_NOP: - case MLX5_CMD_OP_PAGE_FAULT_RESUME: - case MLX5_CMD_OP_QUERY_ADAPTER: - case MLX5_CMD_OP_QUERY_CONG_PARAMS: - case MLX5_CMD_OP_QUERY_CONG_STATISTICS: - case MLX5_CMD_OP_QUERY_CONG_STATUS: - case MLX5_CMD_OP_QUERY_CQ: - case MLX5_CMD_OP_QUERY_DCT: - case MLX5_CMD_OP_QUERY_EQ: - case MLX5_CMD_OP_QUERY_ESW_VPORT_CONTEXT: - case MLX5_CMD_OP_QUERY_FLOW_COUNTER: - case MLX5_CMD_OP_QUERY_FLOW_GROUP: - case MLX5_CMD_OP_QUERY_FLOW_TABLE: - case MLX5_CMD_OP_QUERY_FLOW_TABLE_ENTRY: - case MLX5_CMD_OP_QUERY_HCA_CAP: - case MLX5_CMD_OP_QUERY_HCA_VPORT_CONTEXT: - case MLX5_CMD_OP_QUERY_HCA_VPORT_GID: - case MLX5_CMD_OP_QUERY_HCA_VPORT_PKEY: - case MLX5_CMD_OP_QUERY_ISSI: - case MLX5_CMD_OP_QUERY_L2_TABLE_ENTRY: - case MLX5_CMD_OP_QUERY_LAG: - case MLX5_CMD_OP_QUERY_MAD_DEMUX: - case MLX5_CMD_OP_QUERY_MKEY: - case MLX5_CMD_OP_QUERY_NIC_VPORT_CONTEXT: - case MLX5_CMD_OP_QUERY_OTHER_HCA_CAP: - case MLX5_CMD_OP_QUERY_PAGES: - case MLX5_CMD_OP_QUERY_QP: - case MLX5_CMD_OP_QUERY_Q_COUNTER: - case MLX5_CMD_OP_QUERY_RMP: - case MLX5_CMD_OP_QUERY_ROCE_ADDRESS: - case MLX5_CMD_OP_QUERY_RQ: - case MLX5_CMD_OP_QUERY_RQT: - case MLX5_CMD_OP_QUERY_SCHEDULING_ELEMENT: - case MLX5_CMD_OP_QUERY_SPECIAL_CONTEXTS: - case MLX5_CMD_OP_QUERY_SQ: - case MLX5_CMD_OP_QUERY_SRQ: - case MLX5_CMD_OP_QUERY_TIR: - case MLX5_CMD_OP_QUERY_TIS: - case MLX5_CMD_OP_QUERY_VPORT_COUNTER: - case MLX5_CMD_OP_QUERY_VPORT_STATE: - case MLX5_CMD_OP_QUERY_XRC_SRQ: - case MLX5_CMD_OP_RST2INIT_QP: - case MLX5_CMD_OP_RTR2RTS_QP: - case MLX5_CMD_OP_RTS2RTS_QP: - case MLX5_CMD_OP_SET_DC_CNAK_TRACE: - case MLX5_CMD_OP_SET_HCA_CAP: - case MLX5_CMD_OP_SET_ISSI: - case MLX5_CMD_OP_SET_L2_TABLE_ENTRY: - case MLX5_CMD_OP_SET_MAD_DEMUX: - case MLX5_CMD_OP_SET_ROCE_ADDRESS: - case MLX5_CMD_OP_SQD_RTS_QP: - case MLX5_CMD_OP_SQERR2RTS_QP: - hdr->status = MLX5_CMD_STAT_INT_ERR; - hdr->syndrome = 0xFFFFFFFF; - return -ECANCELED; - default: - mlx5_core_err(dev, "Unknown FW command (%d)\n", opcode); - return -EINVAL; - } -} - static void complete_command(struct mlx5_cmd_work_ent *ent) { struct mlx5_cmd *cmd = ent->cmd; @@ -863,15 +808,12 @@ static void complete_command(struct mlx5_cmd_work_ent sem = &cmd->sem; if (dev->state != MLX5_DEVICE_STATE_UP) { - struct mlx5_outbox_hdr *out_hdr = - (struct mlx5_outbox_hdr *)ent->out; - struct mlx5_inbox_hdr *in_hdr = - (struct mlx5_inbox_hdr *)(ent->in->first.data); - u16 opcode = be16_to_cpu(in_hdr->opcode); + u8 status = 0; + u32 drv_synd; - ent->ret = set_internal_err_outbox(dev, - opcode, - out_hdr); + ent->ret = mlx5_internal_err_ret_value(dev, msg_to_opcode(ent->in), &drv_synd, &status); + MLX5_SET(mbox_out, ent->out, status, status); + MLX5_SET(mbox_out, ent->out, syndrome, drv_synd); } if (ent->callback) { @@ -887,10 +829,14 @@ static void complete_command(struct mlx5_cmd_work_ent callback = ent->callback; context = ent->context; err = ent->ret; - if (!err) + if (!err) { err = mlx5_copy_from_msg(ent->uout, ent->out, ent->uout_size); + err = err ? err : mlx5_cmd_check(dev, + ent->in->first.data, + ent->uout); + } mlx5_free_cmd_msg(dev, ent->out); free_msg(dev, ent->in); @@ -1014,16 +960,6 @@ static int wait_func(struct mlx5_core_dev *dev, struct return err; } -static __be32 *get_synd_ptr(struct mlx5_outbox_hdr *out) -{ - return &out->syndrome; -} - -static u8 *get_status_ptr(struct mlx5_outbox_hdr *out) -{ - return &out->status; -} - /* Notes: * 1. Callback functions may not sleep * 2. page queue commands do not support asynchrous completion @@ -1070,7 +1006,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, goto out; ds = ent->ts2 - ent->ts1; - op = be16_to_cpu(((struct mlx5_inbox_hdr *)in->first.data)->opcode); + op = MLX5_GET(mbox_in, in->first.data, opcode); if (op < ARRAY_SIZE(cmd->stats)) { stats = &cmd->stats[op]; spin_lock_irq(&stats->lock); @@ -1315,16 +1251,11 @@ static struct mlx5_cmd_msg *alloc_msg(struct mlx5_core return msg; } -static u16 opcode_from_in(struct mlx5_inbox_hdr *in) +static int is_manage_pages(void *in) { - return be16_to_cpu(in->opcode); + return MLX5_GET(mbox_in, in, opcode) == MLX5_CMD_OP_MANAGE_PAGES; } -static int is_manage_pages(struct mlx5_inbox_hdr *in) -{ - return be16_to_cpu(in->opcode) == MLX5_CMD_OP_MANAGE_PAGES; -} - static int cmd_exec_helper(struct mlx5_core_dev *dev, void *in, int in_size, void *out, int out_size, @@ -1340,9 +1271,10 @@ static int cmd_exec_helper(struct mlx5_core_dev *dev, if (pci_channel_offline(dev->pdev) || dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) { - err = mlx5_internal_err_ret_value(dev, opcode_from_in(in), &drv_synd, &status); - *get_synd_ptr(out) = cpu_to_be32(drv_synd); - *get_status_ptr(out) = status; + u16 opcode = MLX5_GET(mbox_in, in, opcode); + err = mlx5_internal_err_ret_value(dev, opcode, &drv_synd, &status); + MLX5_SET(mbox_out, out, status, status); + MLX5_SET(mbox_out, out, syndrome, drv_synd); return err; } @@ -1396,7 +1328,10 @@ out_in: int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out, int out_size) { - return cmd_exec_helper(dev, in, in_size, out, out_size, NULL, NULL); + int err; + + err = cmd_exec_helper(dev, in, in_size, out, out_size, NULL, NULL); + return err ? : mlx5_cmd_check(dev, in, out); } EXPORT_SYMBOL(mlx5_cmd_exec); @@ -1631,94 +1566,3 @@ void mlx5_cmd_cleanup(struct mlx5_core_dev *dev) free_cmd_page(dev, cmd); } EXPORT_SYMBOL(mlx5_cmd_cleanup); - -static const char *cmd_status_str(u8 status) -{ - switch (status) { - case MLX5_CMD_STAT_OK: - return "OK"; - case MLX5_CMD_STAT_INT_ERR: - return "internal error"; - case MLX5_CMD_STAT_BAD_OP_ERR: - return "bad operation"; - case MLX5_CMD_STAT_BAD_PARAM_ERR: - return "bad parameter"; - case MLX5_CMD_STAT_BAD_SYS_STATE_ERR: - return "bad system state"; - case MLX5_CMD_STAT_BAD_RES_ERR: - return "bad resource"; - case MLX5_CMD_STAT_RES_BUSY: - return "resource busy"; - case MLX5_CMD_STAT_LIM_ERR: - return "limits exceeded"; - case MLX5_CMD_STAT_BAD_RES_STATE_ERR: - return "bad resource state"; - case MLX5_CMD_STAT_IX_ERR: - return "bad index"; - case MLX5_CMD_STAT_NO_RES_ERR: - return "no resources"; - case MLX5_CMD_STAT_BAD_INP_LEN_ERR: - return "bad input length"; - case MLX5_CMD_STAT_BAD_OUTP_LEN_ERR: - return "bad output length"; - case MLX5_CMD_STAT_BAD_QP_STATE_ERR: - return "bad QP state"; - case MLX5_CMD_STAT_BAD_PKT_ERR: - return "bad packet (discarded)"; - case MLX5_CMD_STAT_BAD_SIZE_OUTS_CQES_ERR: - return "bad size too many outstanding CQEs"; - default: - return "unknown status"; - } -} - -static int cmd_status_to_err_helper(u8 status) -{ - switch (status) { - case MLX5_CMD_STAT_OK: return 0; - case MLX5_CMD_STAT_INT_ERR: return -EIO; - case MLX5_CMD_STAT_BAD_OP_ERR: return -EINVAL; - case MLX5_CMD_STAT_BAD_PARAM_ERR: return -EINVAL; - case MLX5_CMD_STAT_BAD_SYS_STATE_ERR: return -EIO; - case MLX5_CMD_STAT_BAD_RES_ERR: return -EINVAL; - case MLX5_CMD_STAT_RES_BUSY: return -EBUSY; - case MLX5_CMD_STAT_LIM_ERR: return -ENOMEM; - case MLX5_CMD_STAT_BAD_RES_STATE_ERR: return -EINVAL; - case MLX5_CMD_STAT_IX_ERR: return -EINVAL; - case MLX5_CMD_STAT_NO_RES_ERR: return -EAGAIN; - case MLX5_CMD_STAT_BAD_INP_LEN_ERR: return -EIO; - case MLX5_CMD_STAT_BAD_OUTP_LEN_ERR: return -EIO; - case MLX5_CMD_STAT_BAD_QP_STATE_ERR: return -EINVAL; - case MLX5_CMD_STAT_BAD_PKT_ERR: return -EINVAL; - case MLX5_CMD_STAT_BAD_SIZE_OUTS_CQES_ERR: return -EINVAL; - default: return -EIO; - } -} - -/* this will be available till all the commands use set/get macros */ -int mlx5_cmd_status_to_err(struct mlx5_outbox_hdr *hdr) -{ - if (!hdr->status) - return 0; - - printf("mlx5_core: WARN: ""command failed, status %s(0x%x), syndrome 0x%x\n", cmd_status_str(hdr->status), hdr->status, be32_to_cpu(hdr->syndrome)); - - return cmd_status_to_err_helper(hdr->status); -} - -int mlx5_cmd_status_to_err_v2(void *ptr) -{ - u32 syndrome; - u8 status; - - status = be32_to_cpu(*(__be32 *)ptr) >> 24; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Mar 8 11:23:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A830F4D8EE; Thu, 8 Mar 2018 11:23:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D75875427; Thu, 8 Mar 2018 11:23:15 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A6511024E; Thu, 8 Mar 2018 11:23:15 +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 w28BNFw9080567; Thu, 8 Mar 2018 11:23:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28BNE6M080559; Thu, 8 Mar 2018 11:23:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081123.w28BNE6M080559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 11:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330648 - in head/sys: conf dev/mlx5 dev/mlx5/mlx5_core dev/mlx5/mlx5_ib modules/mlx5ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: conf dev/mlx5 dev/mlx5/mlx5_core dev/mlx5/mlx5_ib modules/mlx5ib X-SVN-Commit-Revision: 330648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 11:23:15 -0000 Author: hselasky Date: Thu Mar 8 11:23:14 2018 New Revision: 330648 URL: https://svnweb.freebsd.org/changeset/base/330648 Log: Add support for explicit congestion notification, ECN, to mlx5ib(4). ECN configuration and statistics is available through a set of sysctl(8) nodes under sys.class.infiniband.mlx5_X.cong . The ECN configuration nodes can also be used as loader tunables. MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/dev/mlx5/cmd.h (contents, props changed) head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c head/sys/dev/mlx5/mlx5_ifc.h head/sys/modules/mlx5ib/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Mar 8 10:43:42 2018 (r330647) +++ head/sys/conf/files Thu Mar 8 11:23:14 2018 (r330648) @@ -4692,6 +4692,8 @@ dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci in dev/mlx5/mlx5_ib/mlx5_ib_ah.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" +dev/mlx5/mlx5_ib/mlx5_ib_cong.c optional mlx5ib pci ofed \ + compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_cq.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c optional mlx5ib pci ofed \ Added: head/sys/dev/mlx5/cmd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx5/cmd.h Thu Mar 8 11:23:14 2018 (r330648) @@ -0,0 +1,60 @@ +/*- + * Copyright (c) 2013-2017, Mellanox Technologies, Ltd. 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 AUTHOR AND CONTRIBUTORS `AS IS' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef MLX5_CMD_H +#define MLX5_CMD_H + +#include + +struct manage_pages_layout { + u64 ptr; + u32 reserved; + u16 num_entries; + u16 func_id; +}; + + +struct mlx5_cmd_alloc_uar_imm_out { + u32 rsvd[3]; + u32 uarn; +}; + +struct mlx5_core_dev; +int mlx5_cmd_query_cong_counter(struct mlx5_core_dev *dev, + bool reset, void *out, int out_size); +int mlx5_cmd_query_cong_params(struct mlx5_core_dev *dev, int cong_point, + void *out, int out_size); +int mlx5_cmd_modify_cong_params(struct mlx5_core_dev *mdev, + void *in, int in_size); +struct mlx5_core_dev; +int mlx5_cmd_query_cong_counter(struct mlx5_core_dev *dev, + bool reset, void *out, int out_size); +int mlx5_cmd_query_cong_params(struct mlx5_core_dev *dev, int cong_point, + void *out, int out_size); +int mlx5_cmd_modify_cong_params(struct mlx5_core_dev *mdev, + void *in, int in_size); +#endif /* MLX5_CMD_H */ Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Thu Mar 8 10:43:42 2018 (r330647) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Thu Mar 8 11:23:14 2018 (r330648) @@ -36,6 +36,7 @@ #include #include #include +#include #include "mlx5_core.h" @@ -1566,3 +1567,37 @@ void mlx5_cmd_cleanup(struct mlx5_core_dev *dev) free_cmd_page(dev, cmd); } EXPORT_SYMBOL(mlx5_cmd_cleanup); + +int mlx5_cmd_query_cong_counter(struct mlx5_core_dev *dev, + bool reset, void *out, int out_size) +{ + u32 in[MLX5_ST_SZ_DW(query_cong_statistics_in)] = { }; + + MLX5_SET(query_cong_statistics_in, in, opcode, + MLX5_CMD_OP_QUERY_CONG_STATISTICS); + MLX5_SET(query_cong_statistics_in, in, clear, reset); + return mlx5_cmd_exec(dev, in, sizeof(in), out, out_size); +} +EXPORT_SYMBOL(mlx5_cmd_query_cong_counter); + +int mlx5_cmd_query_cong_params(struct mlx5_core_dev *dev, int cong_point, + void *out, int out_size) +{ + u32 in[MLX5_ST_SZ_DW(query_cong_params_in)] = { }; + + MLX5_SET(query_cong_params_in, in, opcode, + MLX5_CMD_OP_QUERY_CONG_PARAMS); + MLX5_SET(query_cong_params_in, in, cong_protocol, cong_point); + + return mlx5_cmd_exec(dev, in, sizeof(in), out, out_size); +} +EXPORT_SYMBOL(mlx5_cmd_query_cong_params); + +int mlx5_cmd_modify_cong_params(struct mlx5_core_dev *dev, + void *in, int in_size) +{ + u32 out[MLX5_ST_SZ_DW(modify_cong_params_out)] = { }; + + return mlx5_cmd_exec(dev, in, in_size, out, sizeof(out)); +} +EXPORT_SYMBOL(mlx5_cmd_modify_cong_params); Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Thu Mar 8 10:43:42 2018 (r330647) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib.h Thu Mar 8 11:23:14 2018 (r330648) @@ -605,6 +605,56 @@ struct mlx5_roce { atomic_t next_port; }; +#define MLX5_IB_STATS_COUNT(a,b,c,d) a +#define MLX5_IB_STATS_VAR(a,b,c,d) b; +#define MLX5_IB_STATS_DESC(a,b,c,d) c, d, + +#define MLX5_IB_CONG_PARAMS(m) \ + /* ECN RP */ \ + m(+1, u64 rp_clamp_tgt_rate, "rp_clamp_tgt_rate", "If set, whenever a CNP is processed, the target rate is updated to be the current rate") \ + m(+1, u64 rp_clamp_tgt_rate_ati, "rp_clamp_tgt_rate_ati", "If set, when receiving a CNP, the target rate should be updated if the transission rate was increased due to the timer, and not only due to the byte counter") \ + m(+1, u64 rp_time_reset, "rp_time_reset", "Time in microseconds between rate increases if no CNPs are received") \ + m(+1, u64 rp_byte_reset, "rp_byte_reset", "Transmitted data in bytes between rate increases if no CNP's are received. A value of zero means disabled.") \ + m(+1, u64 rp_threshold, "rp_threshold", "The number of times rpByteStage or rpTimeStage can count before the RP rate control state machine advances states") \ + m(+1, u64 rp_ai_rate, "rp_ai_rate", "The rate, in Mbits per second, used to increase rpTargetRate in the active increase state") \ + m(+1, u64 rp_hai_rate, "rp_hai_rate", "The rate, in Mbits per second, used to increase rpTargetRate in the hyper increase state") \ + m(+1, u64 rp_min_dec_fac, "rp_min_dec_fac", "The minimum factor by which the current transmit rate can be changed when processing a CNP. Value is given as a percentage, [1 .. 100]") \ + m(+1, u64 rp_min_rate, "rp_min_rate", "The minimum value, in Mbps per second, for rate to limit") \ + m(+1, u64 rp_rate_to_set_on_first_cnp, "rp_rate_to_set_on_first_cnp", "The rate that is set for the flow when a rate limiter is allocated to it upon first CNP received, in Mbps. A value of zero means use full port speed") \ + m(+1, u64 rp_dce_tcp_g, "rp_dce_tcp_g", "Used to update the congestion estimator, alpha, once every dce_tcp_rtt once every dce_tcp_rtt microseconds") \ + m(+1, u64 rp_dce_tcp_rtt, "rp_dce_tcp_rtt", "The time between updates of the aolpha value, in microseconds") \ + m(+1, u64 rp_rate_reduce_monitor_period, "rp_rate_reduce_monitor_period", "The minimum time between two consecutive rate reductions for a single flow") \ + m(+1, u64 rp_initial_alpha_value, "rp_initial_alpha_value", "The initial value of alpha to use when receiving the first CNP for a flow") \ + m(+1, u64 rp_gd, "rp_gd", "If a CNP is received, the flow rate is reduced at the beginning of the next rate_reduce_monitor_period interval") \ + /* ECN NP */ \ + m(+1, u64 np_cnp_dscp, "np_cnp_dscp", "The DiffServ Code Point of the generated CNP for this port") \ + m(+1, u64 np_cnp_prio_mode, "np_cnp_prio_mode", "The 802.1p priority value of the generated CNP for this port") \ + m(+1, u64 np_cnp_prio, "np_cnp_prio", "The 802.1p priority value of the generated CNP for this port") + +#define MLX5_IB_CONG_PARAMS_NUM (0 MLX5_IB_CONG_PARAMS(MLX5_IB_STATS_COUNT)) + +#define MLX5_IB_CONG_STATS(m) \ + m(+1, u64 syndrome, "syndrome", "Syndrome number") \ + m(+1, u64 rp_cur_flows, "rp_cur_flows", "Number of flows limited") \ + m(+1, u64 sum_flows, "sum_flows", "Sum of the number of flows limited over time") \ + m(+1, u64 rp_cnp_ignored, "rp_cnp_ignored", "Number of CNPs and CNMs ignored") \ + m(+1, u64 rp_cnp_handled, "rp_cnp_handled", "Number of CNPs and CNMs successfully handled") \ + m(+1, u64 time_stamp, "time_stamp", "Time stamp in microseconds") \ + m(+1, u64 accumulators_period, "accumulators_period", "The value of X variable for accumulating counters") \ + m(+1, u64 np_ecn_marked_roce_packets, "np_ecn_marked_roce_packets", "Number of ECN marked packets seen") \ + m(+1, u64 np_cnp_sent, "np_cnp_sent", "Number of CNPs sent") + +#define MLX5_IB_CONG_STATS_NUM (0 MLX5_IB_CONG_STATS(MLX5_IB_STATS_COUNT)) + +struct mlx5_ib_congestion { + struct sysctl_ctx_list ctx; + struct sx lock; + struct delayed_work dwork; + u64 arg [0]; + MLX5_IB_CONG_PARAMS(MLX5_IB_STATS_VAR) + MLX5_IB_CONG_STATS(MLX5_IB_STATS_VAR) +}; + struct mlx5_ib_dev { struct ib_device ib_dev; struct mlx5_core_dev *mdev; @@ -638,6 +688,7 @@ struct mlx5_ib_dev { struct list_head qp_list; /* Array with num_ports elements */ struct mlx5_ib_port *port; + struct mlx5_ib_congestion congestion; }; static inline struct mlx5_ib_cq *to_mibcq(struct mlx5_core_cq *mcq) @@ -991,4 +1042,8 @@ static inline int get_srq_user_index(struct mlx5_ib_uc return verify_assign_uidx(cqe_version, ucmd->uidx, user_index); } + +void mlx5_ib_cleanup_congestion(struct mlx5_ib_dev *); +int mlx5_ib_init_congestion(struct mlx5_ib_dev *); + #endif /* MLX5_IB_H */ Added: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cong.c Thu Mar 8 11:23:14 2018 (r330648) @@ -0,0 +1,460 @@ +/*- + * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. 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 AUTHOR AND CONTRIBUTORS `AS IS' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include "mlx5_ib.h" + +#include + +static const char *mlx5_ib_cong_params_desc[] = { + MLX5_IB_CONG_PARAMS(MLX5_IB_STATS_DESC) +}; + +static const char *mlx5_ib_cong_stats_desc[] = { + MLX5_IB_CONG_STATS(MLX5_IB_STATS_DESC) +}; + +#define MLX5_IB_INDEX(field) (__offsetof(struct mlx5_ib_congestion, field) / sizeof(u64)) +#define MLX5_IB_FLD_MAX(type, field) ((1ULL << __mlx5_bit_sz(type, field)) - 1ULL) +#define MLX5_IB_SET_CLIPPED(type, ptr, field, var) do { \ + /* rangecheck */ \ + if ((var) > MLX5_IB_FLD_MAX(type, field)) \ + (var) = MLX5_IB_FLD_MAX(type, field); \ + /* set value */ \ + MLX5_SET(type, ptr, field, var); \ +} while (0) + +#define CONG_LOCK(dev) sx_xlock(&(dev)->congestion.lock) +#define CONG_UNLOCK(dev) sx_xunlock(&(dev)->congestion.lock) +#define CONG_LOCKED(dev) sx_xlocked(&(dev)->congestion.lock) + +#define MLX5_IB_RP_CLAMP_TGT_RATE_ATTR BIT(1) +#define MLX5_IB_RP_CLAMP_TGT_RATE_ATI_ATTR BIT(2) +#define MLX5_IB_RP_TIME_RESET_ATTR BIT(3) +#define MLX5_IB_RP_BYTE_RESET_ATTR BIT(4) +#define MLX5_IB_RP_THRESHOLD_ATTR BIT(5) +#define MLX5_IB_RP_AI_RATE_ATTR BIT(7) +#define MLX5_IB_RP_HAI_RATE_ATTR BIT(8) +#define MLX5_IB_RP_MIN_DEC_FAC_ATTR BIT(9) +#define MLX5_IB_RP_MIN_RATE_ATTR BIT(10) +#define MLX5_IB_RP_RATE_TO_SET_ON_FIRST_CNP_ATTR BIT(11) +#define MLX5_IB_RP_DCE_TCP_G_ATTR BIT(12) +#define MLX5_IB_RP_DCE_TCP_RTT_ATTR BIT(13) +#define MLX5_IB_RP_RATE_REDUCE_MONITOR_PERIOD_ATTR BIT(14) +#define MLX5_IB_RP_INITIAL_ALPHA_VALUE_ATTR BIT(15) +#define MLX5_IB_RP_GD_ATTR BIT(16) + +#define MLX5_IB_NP_CNP_DSCP_ATTR BIT(3) +#define MLX5_IB_NP_CNP_PRIO_MODE_ATTR BIT(4) + +enum mlx5_ib_cong_node_type { + MLX5_IB_RROCE_ECN_RP = 1, + MLX5_IB_RROCE_ECN_NP = 2, +}; + +static enum mlx5_ib_cong_node_type +mlx5_ib_param_to_node(u32 index) +{ + + if (index >= MLX5_IB_INDEX(rp_clamp_tgt_rate) && + index <= MLX5_IB_INDEX(rp_gd)) + return MLX5_IB_RROCE_ECN_RP; + else + return MLX5_IB_RROCE_ECN_NP; +} + +static u64 +mlx5_get_cc_param_val(void *field, u32 index) +{ + + switch (index) { + case MLX5_IB_INDEX(rp_clamp_tgt_rate): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + clamp_tgt_rate); + case MLX5_IB_INDEX(rp_clamp_tgt_rate_ati): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + clamp_tgt_rate_after_time_inc); + case MLX5_IB_INDEX(rp_time_reset): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rpg_time_reset); + case MLX5_IB_INDEX(rp_byte_reset): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rpg_byte_reset); + case MLX5_IB_INDEX(rp_threshold): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rpg_threshold); + case MLX5_IB_INDEX(rp_ai_rate): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rpg_ai_rate); + case MLX5_IB_INDEX(rp_hai_rate): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rpg_hai_rate); + case MLX5_IB_INDEX(rp_min_dec_fac): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rpg_min_dec_fac); + case MLX5_IB_INDEX(rp_min_rate): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rpg_min_rate); + case MLX5_IB_INDEX(rp_rate_to_set_on_first_cnp): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rate_to_set_on_first_cnp); + case MLX5_IB_INDEX(rp_dce_tcp_g): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + dce_tcp_g); + case MLX5_IB_INDEX(rp_dce_tcp_rtt): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + dce_tcp_rtt); + case MLX5_IB_INDEX(rp_rate_reduce_monitor_period): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rate_reduce_monitor_period); + case MLX5_IB_INDEX(rp_initial_alpha_value): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + initial_alpha_value); + case MLX5_IB_INDEX(rp_gd): + return MLX5_GET(cong_control_r_roce_ecn_rp, field, + rpg_gd); + case MLX5_IB_INDEX(np_cnp_dscp): + return MLX5_GET(cong_control_r_roce_ecn_np, field, + cnp_dscp); + case MLX5_IB_INDEX(np_cnp_prio_mode): + return MLX5_GET(cong_control_r_roce_ecn_np, field, + cnp_prio_mode); + case MLX5_IB_INDEX(np_cnp_prio): + return MLX5_GET(cong_control_r_roce_ecn_np, field, + cnp_802p_prio); + default: + return 0; + } +} + +static void +mlx5_ib_set_cc_param_mask_val(void *field, u32 index, + u64 var, u32 *attr_mask) +{ + + switch (index) { + case MLX5_IB_INDEX(rp_clamp_tgt_rate): + *attr_mask |= MLX5_IB_RP_CLAMP_TGT_RATE_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + clamp_tgt_rate, var); + break; + case MLX5_IB_INDEX(rp_clamp_tgt_rate_ati): + *attr_mask |= MLX5_IB_RP_CLAMP_TGT_RATE_ATI_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + clamp_tgt_rate_after_time_inc, var); + break; + case MLX5_IB_INDEX(rp_time_reset): + *attr_mask |= MLX5_IB_RP_TIME_RESET_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rpg_time_reset, var); + break; + case MLX5_IB_INDEX(rp_byte_reset): + *attr_mask |= MLX5_IB_RP_BYTE_RESET_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rpg_byte_reset, var); + break; + case MLX5_IB_INDEX(rp_threshold): + *attr_mask |= MLX5_IB_RP_THRESHOLD_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rpg_threshold, var); + break; + case MLX5_IB_INDEX(rp_ai_rate): + *attr_mask |= MLX5_IB_RP_AI_RATE_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rpg_ai_rate, var); + break; + case MLX5_IB_INDEX(rp_hai_rate): + *attr_mask |= MLX5_IB_RP_HAI_RATE_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rpg_hai_rate, var); + break; + case MLX5_IB_INDEX(rp_min_dec_fac): + *attr_mask |= MLX5_IB_RP_MIN_DEC_FAC_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rpg_min_dec_fac, var); + break; + case MLX5_IB_INDEX(rp_min_rate): + *attr_mask |= MLX5_IB_RP_MIN_RATE_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rpg_min_rate, var); + break; + case MLX5_IB_INDEX(rp_rate_to_set_on_first_cnp): + *attr_mask |= MLX5_IB_RP_RATE_TO_SET_ON_FIRST_CNP_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rate_to_set_on_first_cnp, var); + break; + case MLX5_IB_INDEX(rp_dce_tcp_g): + *attr_mask |= MLX5_IB_RP_DCE_TCP_G_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + dce_tcp_g, var); + break; + case MLX5_IB_INDEX(rp_dce_tcp_rtt): + *attr_mask |= MLX5_IB_RP_DCE_TCP_RTT_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + dce_tcp_rtt, var); + break; + case MLX5_IB_INDEX(rp_rate_reduce_monitor_period): + *attr_mask |= MLX5_IB_RP_RATE_REDUCE_MONITOR_PERIOD_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rate_reduce_monitor_period, var); + break; + case MLX5_IB_INDEX(rp_initial_alpha_value): + *attr_mask |= MLX5_IB_RP_INITIAL_ALPHA_VALUE_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + initial_alpha_value, var); + break; + case MLX5_IB_INDEX(rp_gd): + *attr_mask |= MLX5_IB_RP_GD_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_rp, field, + rpg_gd, var); + break; + case MLX5_IB_INDEX(np_cnp_dscp): + *attr_mask |= MLX5_IB_NP_CNP_DSCP_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_np, field, cnp_dscp, var); + break; + case MLX5_IB_INDEX(np_cnp_prio_mode): + *attr_mask |= MLX5_IB_NP_CNP_PRIO_MODE_ATTR; + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_np, field, cnp_prio_mode, var); + break; + case MLX5_IB_INDEX(np_cnp_prio): + *attr_mask |= MLX5_IB_NP_CNP_PRIO_MODE_ATTR; + MLX5_SET(cong_control_r_roce_ecn_np, field, cnp_prio_mode, 0); + MLX5_IB_SET_CLIPPED(cong_control_r_roce_ecn_np, field, cnp_802p_prio, var); + break; + default: + break; + } +} + +static int +mlx5_ib_get_all_cc_params(struct mlx5_ib_dev *dev) +{ + int outlen = MLX5_ST_SZ_BYTES(query_cong_params_out); + enum mlx5_ib_cong_node_type node = 0; + void *out; + void *field; + u32 x; + int err = 0; + + out = kzalloc(outlen, GFP_KERNEL); + if (!out) + return -ENOMEM; + + /* get the current values */ + for (x = 0; x != MLX5_IB_CONG_PARAMS_NUM; x++) { + if (node != mlx5_ib_param_to_node(x)) { + node = mlx5_ib_param_to_node(x); + + err = mlx5_cmd_query_cong_params(dev->mdev, node, out, outlen); + if (err) + break; + } + field = MLX5_ADDR_OF(query_cong_params_out, out, congestion_parameters); + dev->congestion.arg[x] = mlx5_get_cc_param_val(field, x); + } + kfree(out); + return err; +} + +static int +mlx5_ib_set_cc_params(struct mlx5_ib_dev *dev, u32 index, u64 var) +{ + int inlen = MLX5_ST_SZ_BYTES(modify_cong_params_in); + enum mlx5_ib_cong_node_type node; + u32 attr_mask = 0; + void *field; + void *in; + int err; + + in = kzalloc(inlen, GFP_KERNEL); + if (!in) + return -ENOMEM; + + MLX5_SET(modify_cong_params_in, in, opcode, + MLX5_CMD_OP_MODIFY_CONG_PARAMS); + + node = mlx5_ib_param_to_node(index); + MLX5_SET(modify_cong_params_in, in, cong_protocol, node); + + field = MLX5_ADDR_OF(modify_cong_params_in, in, congestion_parameters); + mlx5_ib_set_cc_param_mask_val(field, index, var, &attr_mask); + + field = MLX5_ADDR_OF(modify_cong_params_in, in, field_select); + MLX5_SET(field_select_r_roce_rp, field, field_select_r_roce_rp, + attr_mask); + + err = mlx5_cmd_modify_cong_params(dev->mdev, in, inlen); + kfree(in); + + return err; +} + +static int +mlx5_ib_cong_params_handler(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_ib_dev *dev = arg1; + u64 value; + int error; + + CONG_LOCK(dev); + value = dev->congestion.arg[arg2]; + if (req != NULL) { + error = sysctl_handle_64(oidp, &value, 0, req); + if (error || req->newptr == NULL || + value == dev->congestion.arg[arg2]) + goto done; + + /* assign new value */ + dev->congestion.arg[arg2] = value; + } else { + error = 0; + } + if (!MLX5_CAP_GEN(dev->mdev, cc_modify_allowed)) + error = EPERM; + else { + error = -mlx5_ib_set_cc_params(dev, MLX5_IB_INDEX(arg[arg2]), + dev->congestion.arg[arg2]); + } +done: + CONG_UNLOCK(dev); + + return (error); +} + +#define MLX5_GET_UNALIGNED_64(t,p,f) \ + (((u64)MLX5_GET(t,p,f##_high) << 32) | MLX5_GET(t,p,f##_low)) + +static void +mlx5_ib_read_cong_stats(struct work_struct *work) +{ + struct mlx5_ib_dev *dev = + container_of(work, struct mlx5_ib_dev, congestion.dwork.work); + const int outlen = MLX5_ST_SZ_BYTES(query_cong_statistics_out); + void *out; + + out = kzalloc(outlen, GFP_KERNEL); + if (!out) + goto done; + + CONG_LOCK(dev); + if (mlx5_cmd_query_cong_counter(dev->mdev, 0, out, outlen)) + memset(out, 0, outlen); + + dev->congestion.syndrome = + MLX5_GET(query_cong_statistics_out, out, syndrome); + dev->congestion.rp_cur_flows = + MLX5_GET(query_cong_statistics_out, out, rp_cur_flows); + dev->congestion.sum_flows = + MLX5_GET(query_cong_statistics_out, out, sum_flows); + dev->congestion.rp_cnp_ignored = + MLX5_GET_UNALIGNED_64(query_cong_statistics_out, out, rp_cnp_ignored); + dev->congestion.rp_cnp_handled = + MLX5_GET_UNALIGNED_64(query_cong_statistics_out, out, rp_cnp_handled); + dev->congestion.time_stamp = + MLX5_GET_UNALIGNED_64(query_cong_statistics_out, out, time_stamp); + dev->congestion.accumulators_period = + MLX5_GET(query_cong_statistics_out, out, accumulators_period); + dev->congestion.np_ecn_marked_roce_packets = + MLX5_GET_UNALIGNED_64(query_cong_statistics_out, out, np_ecn_marked_roce_packets); + dev->congestion.np_cnp_sent = + MLX5_GET_UNALIGNED_64(query_cong_statistics_out, out, np_cnp_sent); + + CONG_UNLOCK(dev); + kfree(out); + +done: + schedule_delayed_work(&dev->congestion.dwork, hz); +} + +void +mlx5_ib_cleanup_congestion(struct mlx5_ib_dev *dev) +{ + + cancel_delayed_work_sync(&dev->congestion.dwork); + sysctl_ctx_free(&dev->congestion.ctx); + sx_destroy(&dev->congestion.lock); +} + +int +mlx5_ib_init_congestion(struct mlx5_ib_dev *dev) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid *parent; + struct sysctl_oid *node; + int err; + u32 x; + + ctx = &dev->congestion.ctx; + sysctl_ctx_init(ctx); + sx_init(&dev->congestion.lock, "mlx5ibcong"); + INIT_DELAYED_WORK(&dev->congestion.dwork, mlx5_ib_read_cong_stats); + + if (!MLX5_CAP_GEN(dev->mdev, cc_query_allowed)) + return (0); + + err = mlx5_ib_get_all_cc_params(dev); + if (err) + return (err); + + parent = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(dev->ib_dev.dev.kobj.oidp), + OID_AUTO, "cong", CTLFLAG_RW, NULL, "Congestion control"); + if (parent == NULL) + return (-ENOMEM); + + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(parent), + OID_AUTO, "conf", CTLFLAG_RW, NULL, "Configuration"); + if (node == NULL) { + sysctl_ctx_free(&dev->congestion.ctx); + return (-ENOMEM); + } + + for (x = 0; x != MLX5_IB_CONG_PARAMS_NUM; x++) { + SYSCTL_ADD_PROC(ctx, + SYSCTL_CHILDREN(node), OID_AUTO, + mlx5_ib_cong_params_desc[2 * x], + CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + dev, x, &mlx5_ib_cong_params_handler, "QU", + mlx5_ib_cong_params_desc[2 * x + 1]); + } + + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(parent), + OID_AUTO, "stats", CTLFLAG_RD, NULL, "Statistics"); + if (node == NULL) { + sysctl_ctx_free(&dev->congestion.ctx); + return (-ENOMEM); + } + + for (x = 0; x != MLX5_IB_CONG_STATS_NUM; x++) { + /* read-only SYSCTLs */ + SYSCTL_ADD_U64(ctx, SYSCTL_CHILDREN(node), OID_AUTO, + mlx5_ib_cong_stats_desc[2 * x], + CTLFLAG_RD | CTLFLAG_MPSAFE, + &dev->congestion.arg[x + MLX5_IB_CONG_PARAMS_NUM], + 0, mlx5_ib_cong_stats_desc[2 * x + 1]); + } + schedule_delayed_work(&dev->congestion.dwork, hz); + return (0); +} Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Thu Mar 8 10:43:42 2018 (r330647) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Thu Mar 8 11:23:14 2018 (r330648) @@ -3151,6 +3151,10 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) goto err_umrc; } + err = mlx5_ib_init_congestion(dev); + if (err) + goto err_umrc; + dev->ib_active = true; return dev; @@ -3190,6 +3194,7 @@ static void mlx5_ib_remove(struct mlx5_core_dev *mdev, struct mlx5_ib_dev *dev = context; enum rdma_link_layer ll = mlx5_ib_port_link_layer(&dev->ib_dev, 1); + mlx5_ib_cleanup_congestion(dev); mlx5_remove_roce_notifier(dev); ib_unregister_device(&dev->ib_dev); mlx5_ib_dealloc_q_counters(dev); Modified: head/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ifc.h Thu Mar 8 10:43:42 2018 (r330647) +++ head/sys/dev/mlx5/mlx5_ifc.h Thu Mar 8 11:23:14 2018 (r330648) @@ -4865,17 +4865,17 @@ struct mlx5_ifc_query_cong_statistics_out_bits { u8 reserved_1[0x40]; - u8 cur_flows[0x20]; + u8 rp_cur_flows[0x20]; u8 sum_flows[0x20]; - u8 cnp_ignored_high[0x20]; + u8 rp_cnp_ignored_high[0x20]; - u8 cnp_ignored_low[0x20]; + u8 rp_cnp_ignored_low[0x20]; - u8 cnp_handled_high[0x20]; + u8 rp_cnp_handled_high[0x20]; - u8 cnp_handled_low[0x20]; + u8 rp_cnp_handled_low[0x20]; u8 reserved_2[0x100]; @@ -4885,13 +4885,13 @@ struct mlx5_ifc_query_cong_statistics_out_bits { u8 accumulators_period[0x20]; - u8 ecn_marked_roce_packets_high[0x20]; + u8 np_ecn_marked_roce_packets_high[0x20]; - u8 ecn_marked_roce_packets_low[0x20]; + u8 np_ecn_marked_roce_packets_low[0x20]; - u8 cnps_sent_high[0x20]; + u8 np_cnp_sent_high[0x20]; - u8 cnps_sent_low[0x20]; + u8 np_cnp_sent_low[0x20]; u8 reserved_3[0x560]; }; Modified: head/sys/modules/mlx5ib/Makefile ============================================================================== --- head/sys/modules/mlx5ib/Makefile Thu Mar 8 10:43:42 2018 (r330647) +++ head/sys/modules/mlx5ib/Makefile Thu Mar 8 11:23:14 2018 (r330648) @@ -4,6 +4,7 @@ KMOD=mlx5ib SRCS= \ mlx5_ib_ah.c \ +mlx5_ib_cong.c \ mlx5_ib_cq.c \ mlx5_ib_doorbell.c \ mlx5_ib_gsi.c \ From owner-svn-src-all@freebsd.org Thu Mar 8 11:40:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44F15F109D4; Thu, 8 Mar 2018 11:40:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E842975C28; Thu, 8 Mar 2018 11:40:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3175103E1; Thu, 8 Mar 2018 11:40:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28BednD086258; Thu, 8 Mar 2018 11:40:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28Bedd6086254; Thu, 8 Mar 2018 11:40:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081140.w28Bedd6086254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 11:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330649 - in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_core mlx5_en X-SVN-Commit-Revision: 330649 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 11:40:40 -0000 Author: hselasky Date: Thu Mar 8 11:40:39 2018 New Revision: 330649 URL: https://svnweb.freebsd.org/changeset/base/330649 Log: Add support for per priority flow control, PFC, to mlx5en(4). Add support for PFC and implement reading the per priority statistics using the sysctl(8) interface. PFC is used together with VLAN priority and can be enabled and disabled on a per priority basis. Global pause frames and PFC are incompatible features and surrounding logic has been added to warn the user about misconfiguration. Update relevant mlx5core APIs for PFC configuration. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/port.h Modified: head/sys/dev/mlx5/mlx5_core/mlx5_port.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_port.c Thu Mar 8 11:23:14 2018 (r330648) +++ head/sys/dev/mlx5/mlx5_core/mlx5_port.c Thu Mar 8 11:40:39 2018 (r330649) @@ -336,15 +336,26 @@ int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, } EXPORT_SYMBOL_GPL(mlx5_query_port_max_mtu); -int mlx5_set_port_pause(struct mlx5_core_dev *dev, u32 port, - u32 rx_pause, u32 tx_pause) +int mlx5_set_port_pause_and_pfc(struct mlx5_core_dev *dev, u32 port, + u8 rx_pause, u8 tx_pause, + u8 pfc_en_rx, u8 pfc_en_tx) { u32 in[MLX5_ST_SZ_DW(pfcc_reg)] = {0}; u32 out[MLX5_ST_SZ_DW(pfcc_reg)] = {0}; + if (pfc_en_rx || pfc_en_tx) { + /* PFC and global pauseframes are incompatible features */ + if (tx_pause || rx_pause) + return -EINVAL; + } + MLX5_SET(pfcc_reg, in, local_port, port); MLX5_SET(pfcc_reg, in, pptx, tx_pause); MLX5_SET(pfcc_reg, in, pprx, rx_pause); + MLX5_SET(pfcc_reg, in, pfctx, pfc_en_tx); + MLX5_SET(pfcc_reg, in, pfcrx, pfc_en_rx); + MLX5_SET(pfcc_reg, in, prio_mask_tx, pfc_en_tx); + MLX5_SET(pfcc_reg, in, prio_mask_rx, pfc_en_rx); return mlx5_core_access_reg(dev, in, sizeof(in), out, sizeof(out), MLX5_REG_PFCC, 0, 1); @@ -370,25 +381,9 @@ int mlx5_query_port_pause(struct mlx5_core_dev *dev, u return 0; } -int mlx5_set_port_pfc(struct mlx5_core_dev *dev, u8 pfc_en_tx, u8 pfc_en_rx) -{ - u32 in[MLX5_ST_SZ_DW(pfcc_reg)] = {0}; - u32 out[MLX5_ST_SZ_DW(pfcc_reg)]; - - MLX5_SET(pfcc_reg, in, local_port, 1); - MLX5_SET(pfcc_reg, in, pfctx, pfc_en_tx); - MLX5_SET(pfcc_reg, in, pfcrx, pfc_en_rx); - MLX5_SET_TO_ONES(pfcc_reg, in, prio_mask_tx); - MLX5_SET_TO_ONES(pfcc_reg, in, prio_mask_rx); - - return mlx5_core_access_reg(dev, in, sizeof(in), out, - sizeof(out), MLX5_REG_PFCC, 0, 1); -} -EXPORT_SYMBOL_GPL(mlx5_set_port_pfc); - int mlx5_query_port_pfc(struct mlx5_core_dev *dev, u8 *pfc_en_tx, u8 *pfc_en_rx) { - u32 in[MLX5_ST_SZ_DW(pfcc_reg)] = {0}; + u32 in[MLX5_ST_SZ_DW(pfcc_reg)] = {}; u32 out[MLX5_ST_SZ_DW(pfcc_reg)]; int err; @@ -398,12 +393,10 @@ int mlx5_query_port_pfc(struct mlx5_core_dev *dev, u8 if (err) return err; - if (pfc_en_tx) + if (pfc_en_tx != NULL) *pfc_en_tx = MLX5_GET(pfcc_reg, out, pfctx); - - if (pfc_en_rx) + if (pfc_en_rx != NULL) *pfc_en_rx = MLX5_GET(pfcc_reg, out, pfcrx); - return 0; } EXPORT_SYMBOL_GPL(mlx5_query_port_pfc); Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Thu Mar 8 11:23:14 2018 (r330648) +++ head/sys/dev/mlx5/mlx5_en/en.h Thu Mar 8 11:40:39 2018 (r330649) @@ -276,13 +276,55 @@ struct mlx5e_vport_stats { m(+1, u64 rs_corrected_symbols_lane2, "rs_corrected_symbols_lane2", \ "FEC corrected symbol counter lane 2") \ m(+1, u64 rs_corrected_symbols_lane3, "rs_corrected_symbols_lane3", \ - "FEC corrected symbol counter lane 3") \ + "FEC corrected symbol counter lane 3") +/* Per priority statistics for PFC */ +#define MLX5E_PPORT_PER_PRIO_STATS_SUB(m,n,p) \ + m(n, p, +1, u64, rx_octets, "rx_octets", "Received octets") \ + m(n, p, +1, u64, reserved_0, "reserved_0", "Reserved") \ + m(n, p, +1, u64, reserved_1, "reserved_1", "Reserved") \ + m(n, p, +1, u64, reserved_2, "reserved_2", "Reserved") \ + m(n, p, +1, u64, rx_frames, "rx_frames", "Received frames") \ + m(n, p, +1, u64, tx_octets, "tx_octets", "Transmitted octets") \ + m(n, p, +1, u64, reserved_3, "reserved_3", "Reserved") \ + m(n, p, +1, u64, reserved_4, "reserved_4", "Reserved") \ + m(n, p, +1, u64, reserved_5, "reserved_5", "Reserved") \ + m(n, p, +1, u64, tx_frames, "tx_frames", "Transmitted frames") \ + m(n, p, +1, u64, rx_pause, "rx_pause", "Received pause frames") \ + m(n, p, +1, u64, rx_pause_duration, "rx_pause_duration", \ + "Received pause duration") \ + m(n, p, +1, u64, tx_pause, "tx_pause", "Transmitted pause frames") \ + m(n, p, +1, u64, tx_pause_duration, "tx_pause_duration", \ + "Transmitted pause duration") \ + m(n, p, +1, u64, rx_pause_transition, "rx_pause_transition", \ + "Received pause transitions") \ + m(n, p, +1, u64, rx_discards, "rx_discards", "Discarded received frames") \ + m(n, p, +1, u64, device_stall_minor_watermark, \ + "device_stall_minor_watermark", "Device stall minor watermark") \ + m(n, p, +1, u64, device_stall_critical_watermark, \ + "device_stall_critical_watermark", "Device stall critical watermark") + +#define MLX5E_PPORT_PER_PRIO_STATS_PREFIX(m,p,c,t,f,s,d) \ + m(c, t pri_##p##_##f, "prio" #p "_" s, "Priority " #p " - " d) + +#define MLX5E_PPORT_PER_PRIO_STATS_NUM_PRIO 8 + +#define MLX5E_PPORT_PER_PRIO_STATS(m) \ + MLX5E_PPORT_PER_PRIO_STATS_SUB(MLX5E_PPORT_PER_PRIO_STATS_PREFIX,m,0) \ + MLX5E_PPORT_PER_PRIO_STATS_SUB(MLX5E_PPORT_PER_PRIO_STATS_PREFIX,m,1) \ + MLX5E_PPORT_PER_PRIO_STATS_SUB(MLX5E_PPORT_PER_PRIO_STATS_PREFIX,m,2) \ + MLX5E_PPORT_PER_PRIO_STATS_SUB(MLX5E_PPORT_PER_PRIO_STATS_PREFIX,m,3) \ + MLX5E_PPORT_PER_PRIO_STATS_SUB(MLX5E_PPORT_PER_PRIO_STATS_PREFIX,m,4) \ + MLX5E_PPORT_PER_PRIO_STATS_SUB(MLX5E_PPORT_PER_PRIO_STATS_PREFIX,m,5) \ + MLX5E_PPORT_PER_PRIO_STATS_SUB(MLX5E_PPORT_PER_PRIO_STATS_PREFIX,m,6) \ + MLX5E_PPORT_PER_PRIO_STATS_SUB(MLX5E_PPORT_PER_PRIO_STATS_PREFIX,m,7) + /* * Make sure to update mlx5e_update_pport_counters() * when adding a new MLX5E_PPORT_STATS block */ #define MLX5E_PPORT_STATS(m) \ + MLX5E_PPORT_PER_PRIO_STATS(m) \ MLX5E_PPORT_IEEE802_3_STATS(m) \ MLX5E_PPORT_RFC2819_STATS(m) @@ -298,6 +340,8 @@ struct mlx5e_vport_stats { #define MLX5E_PPORT_STATS_NUM \ (0 MLX5E_PPORT_STATS(MLX5E_STATS_COUNT)) +#define MLX5E_PPORT_PER_PRIO_STATS_NUM \ + (0 MLX5E_PPORT_PER_PRIO_STATS(MLX5E_STATS_COUNT)) #define MLX5E_PPORT_RFC2819_STATS_DEBUG_NUM \ (0 MLX5E_PPORT_RFC2819_STATS_DEBUG(MLX5E_STATS_COUNT)) #define MLX5E_PPORT_RFC2863_STATS_DEBUG_NUM \ @@ -391,8 +435,10 @@ struct mlx5e_params { bool cqe_zipping_en; u32 lro_wqe_sz; u16 rx_hash_log_tbl_sz; - u32 tx_pauseframe_control; - u32 rx_pauseframe_control; + u32 tx_pauseframe_control __aligned(4); + u32 rx_pauseframe_control __aligned(4); + u32 tx_priority_flow_control __aligned(4); + u32 rx_priority_flow_control __aligned(4); }; #define MLX5E_PARAMS(m) \ Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Mar 8 11:23:14 2018 (r330648) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Mar 8 11:40:39 2018 (r330649) @@ -230,6 +230,32 @@ mlx5e_find_link_mode(u32 subtype) } static int +mlx5e_set_port_pause_and_pfc(struct mlx5e_priv *priv) +{ + return (mlx5_set_port_pause_and_pfc(priv->mdev, 1, + priv->params.rx_pauseframe_control, + priv->params.tx_pauseframe_control, + priv->params.rx_priority_flow_control, + priv->params.tx_priority_flow_control)); +} + +static int +mlx5e_set_port_pfc(struct mlx5e_priv *priv) +{ + int error; + + if (priv->params.rx_pauseframe_control || + priv->params.tx_pauseframe_control) { + if_printf(priv->ifp, + "Global pauseframes must be disabled before enabling PFC.\n"); + error = -EINVAL; + } else { + error = mlx5e_set_port_pause_and_pfc(priv); + } + return (error); +} + +static int mlx5e_media_change(struct ifnet *dev) { struct mlx5e_priv *priv = dev->if_softc; @@ -272,6 +298,15 @@ mlx5e_media_change(struct ifnet *dev) goto done; } } + if (priv->media.ifm_media & (IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE)) { + /* check if PFC is enabled */ + if (priv->params.rx_priority_flow_control || + priv->params.tx_priority_flow_control) { + if_printf(dev, "PFC must be disabled before enabling global pauseframes.\n"); + error = EINVAL; + goto done; + } + } /* update pauseframe control bits */ priv->params.rx_pauseframe_control = (priv->media.ifm_media & IFM_ETH_RXPAUSE) ? 1 : 0; @@ -284,9 +319,7 @@ mlx5e_media_change(struct ifnet *dev) /* reconfigure the hardware */ mlx5_set_port_status(mdev, MLX5_PORT_DOWN); mlx5_set_port_proto(mdev, link_mode, MLX5_PTYS_EN); - mlx5_set_port_pause(mdev, 1, - priv->params.rx_pauseframe_control, - priv->params.tx_pauseframe_control); + error = -mlx5e_set_port_pause_and_pfc(priv); if (was_opened) mlx5_set_port_status(mdev, MLX5_PORT_UP); @@ -326,6 +359,7 @@ mlx5e_update_pport_counters(struct mlx5e_priv *priv) unsigned sz = MLX5_ST_SZ_BYTES(ppcnt_reg); unsigned x; unsigned y; + unsigned z; /* allocate firmware request structures */ in = mlx5_vzalloc(sz); @@ -344,7 +378,8 @@ mlx5e_update_pport_counters(struct mlx5e_priv *priv) /* read IEEE802_3 counter group using predefined counter layout */ MLX5_SET(ppcnt_reg, in, grp, MLX5_IEEE_802_3_COUNTERS_GROUP); mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_PPCNT, 0, 0); - for (x = y = 0; x != MLX5E_PPORT_IEEE802_3_STATS_NUM; x++, y++) + for (x = 0, y = MLX5E_PPORT_PER_PRIO_STATS_NUM; + x != MLX5E_PPORT_IEEE802_3_STATS_NUM; x++, y++) s->arg[y] = be64toh(ptr[x]); /* read RFC2819 counter group using predefined counter layout */ @@ -367,6 +402,20 @@ mlx5e_update_pport_counters(struct mlx5e_priv *priv) mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_PPCNT, 0, 0); for (x = 0; x != MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG_NUM; x++, y++) s_debug->arg[y] = be64toh(ptr[x]); + + /* read per-priority counters */ + MLX5_SET(ppcnt_reg, in, grp, MLX5_PER_PRIORITY_COUNTERS_GROUP); + + /* iterate all the priorities */ + for (y = z = 0; z != MLX5E_PPORT_PER_PRIO_STATS_NUM_PRIO; z++) { + MLX5_SET(ppcnt_reg, in, prio_tc, z); + mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_PPCNT, 0, 0); + + /* read per priority stats counter group using predefined counter layout */ + for (x = 0; x != (MLX5E_PPORT_PER_PRIO_STATS_NUM / + MLX5E_PPORT_PER_PRIO_STATS_NUM_PRIO); x++, y++) + s->arg[y] = be64toh(ptr[x]); + } free_out: /* free firmware request structures */ kvfree(in); @@ -3218,17 +3267,93 @@ mlx5e_add_hw_stats(struct mlx5e_priv *priv) "Board ID"); } +static int +mlx5e_sysctl_tx_priority_flow_control(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv = arg1; + uint32_t tx_pfc; + uint32_t value; + int error; + + PRIV_LOCK(priv); + + tx_pfc = priv->params.tx_priority_flow_control; + + /* get current value */ + value = (tx_pfc >> arg2) & 1; + + error = sysctl_handle_32(oidp, &value, 0, req); + + /* range check value */ + if (value != 0) + priv->params.tx_priority_flow_control |= (1 << arg2); + else + priv->params.tx_priority_flow_control &= ~(1 << arg2); + + /* check if update is required */ + if (error == 0 && priv->gone == 0 && + tx_pfc != priv->params.tx_priority_flow_control) { + error = -mlx5e_set_port_pfc(priv); + /* restore previous value */ + if (error != 0) + priv->params.tx_priority_flow_control= tx_pfc; + } + PRIV_UNLOCK(priv); + + return (error); +} + +static int +mlx5e_sysctl_rx_priority_flow_control(SYSCTL_HANDLER_ARGS) +{ + struct mlx5e_priv *priv = arg1; + uint32_t rx_pfc; + uint32_t value; + int error; + + PRIV_LOCK(priv); + + rx_pfc = priv->params.rx_priority_flow_control; + + /* get current value */ + value = (rx_pfc >> arg2) & 1; + + error = sysctl_handle_32(oidp, &value, 0, req); + + /* range check value */ + if (value != 0) + priv->params.rx_priority_flow_control |= (1 << arg2); + else + priv->params.rx_priority_flow_control &= ~(1 << arg2); + + /* check if update is required */ + if (error == 0 && priv->gone == 0 && + rx_pfc != priv->params.rx_priority_flow_control) { + error = -mlx5e_set_port_pfc(priv); + /* restore previous value */ + if (error != 0) + priv->params.rx_priority_flow_control= rx_pfc; + } + PRIV_UNLOCK(priv); + + return (error); +} + static void mlx5e_setup_pauseframes(struct mlx5e_priv *priv) { -#if (__FreeBSD_version < 1100000) - char path[64]; + unsigned int x; + char path[96]; + int error; -#endif /* Only receiving pauseframes is enabled by default */ priv->params.tx_pauseframe_control = 0; priv->params.rx_pauseframe_control = 1; + /* disable ports flow control, PFC, by default */ + priv->params.tx_priority_flow_control = 0; + priv->params.rx_priority_flow_control = 0; + #if (__FreeBSD_version < 1100000) /* compute path for sysctl */ snprintf(path, sizeof(path), "dev.mce.%d.tx_pauseframe_control", @@ -3243,9 +3368,28 @@ mlx5e_setup_pauseframes(struct mlx5e_priv *priv) /* try to fetch tunable, if any */ TUNABLE_INT_FETCH(path, &priv->params.rx_pauseframe_control); + + for (x = 0; x != 8; x++) { + + /* compute path for sysctl */ + snprintf(path, sizeof(path), "dev.mce.%d.tx_priority_flow_control_%u", + device_get_unit(priv->mdev->pdev->dev.bsddev), x); + + /* try to fetch tunable, if any */ + if (TUNABLE_INT_FETCH(path, &value) == 0 && value != 0) + priv->params.tx_priority_flow_control |= 1 << x; + + /* compute path for sysctl */ + snprintf(path, sizeof(path), "dev.mce.%d.rx_priority_flow_control_%u", + device_get_unit(priv->mdev->pdev->dev.bsddev), x); + + /* try to fetch tunable, if any */ + if (TUNABLE_INT_FETCH(path, &value) == 0 && value != 0) + priv->params.rx_priority_flow_control |= 1 << x; + } #endif - /* register pausframe SYSCTLs */ + /* register pauseframe SYSCTLs */ SYSCTL_ADD_INT(&priv->sysctl_ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), OID_AUTO, "tx_pauseframe_control", CTLFLAG_RDTUN, &priv->params.tx_pauseframe_control, 0, @@ -3256,6 +3400,25 @@ mlx5e_setup_pauseframes(struct mlx5e_priv *priv) &priv->params.rx_pauseframe_control, 0, "Set to enable RX pause frames. Clear to disable."); + /* register priority_flow control, PFC, SYSCTLs */ + for (x = 0; x != 8; x++) { + snprintf(path, sizeof(path), "tx_priority_flow_control_%u", x); + + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), + OID_AUTO, path, CTLTYPE_UINT | CTLFLAG_RWTUN | + CTLFLAG_MPSAFE, priv, x, &mlx5e_sysctl_tx_priority_flow_control, "IU", + "Set to enable TX ports flow control frames for given priority. Clear to disable."); + + snprintf(path, sizeof(path), "rx_priority_flow_control_%u", x); + + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), + OID_AUTO, path, CTLTYPE_UINT | CTLFLAG_RWTUN | + CTLFLAG_MPSAFE, priv, x, &mlx5e_sysctl_rx_priority_flow_control, "IU", + "Set to enable RX ports flow control frames for given priority. Clear to disable."); + } + + PRIV_LOCK(priv); + /* range check */ priv->params.tx_pauseframe_control = priv->params.tx_pauseframe_control ? 1 : 0; @@ -3263,9 +3426,17 @@ mlx5e_setup_pauseframes(struct mlx5e_priv *priv) priv->params.rx_pauseframe_control ? 1 : 0; /* update firmware */ - mlx5_set_port_pause(priv->mdev, 1, - priv->params.rx_pauseframe_control, - priv->params.tx_pauseframe_control); + error = mlx5e_set_port_pause_and_pfc(priv); + if (error == -EINVAL) { + if_printf(priv->ifp, + "Global pauseframes must be disabled before enabling PFC.\n"); + priv->params.rx_priority_flow_control = 0; + priv->params.tx_priority_flow_control = 0; + + /* update firmware */ + (void) mlx5e_set_port_pause_and_pfc(priv); + } + PRIV_UNLOCK(priv); } static void * Modified: head/sys/dev/mlx5/port.h ============================================================================== --- head/sys/dev/mlx5/port.h Thu Mar 8 11:23:14 2018 (r330648) +++ head/sys/dev/mlx5/port.h Thu Mar 8 11:40:39 2018 (r330649) @@ -127,11 +127,11 @@ int mlx5_set_port_status(struct mlx5_core_dev *dev, int mlx5_query_port_status(struct mlx5_core_dev *dev, u8 *status); int mlx5_query_port_admin_status(struct mlx5_core_dev *dev, enum mlx5_port_status *status); -int mlx5_set_port_pause(struct mlx5_core_dev *dev, u32 port, - u32 rx_pause, u32 tx_pause); +int mlx5_set_port_pause_and_pfc(struct mlx5_core_dev *dev, u32 port, + u8 rx_pause, u8 tx_pause, + u8 pfc_en_rx, u8 pfc_en_tx); int mlx5_query_port_pause(struct mlx5_core_dev *dev, u32 port, u32 *rx_pause, u32 *tx_pause); -int mlx5_set_port_pfc(struct mlx5_core_dev *dev, u8 pfc_en_tx, u8 pfc_en_rx); int mlx5_query_port_pfc(struct mlx5_core_dev *dev, u8 *pfc_en_tx, u8 *pfc_en_rx); int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu); From owner-svn-src-all@freebsd.org Thu Mar 8 11:51:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 255B7F27818 for ; Thu, 8 Mar 2018 11:51:08 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::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 8020076293 for ; Thu, 8 Mar 2018 11:51:07 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: by mail-io0-x244.google.com with SMTP id u84so6759105iod.9 for ; Thu, 08 Mar 2018 03:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=balabit-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=X+K0gebLFf7h9/1vaVJXB/XwwOUt2B7hoYl9zjgYwOQ=; b=sF37X4pBGw8/ioXBvldUdqgIG1qnDBoWuG128BLNsqAHsj9IwrMojkec7Ft+7R3S0c EzZEhmVvrvR3tdIdyTBGd1LdU8WIVIfYEKn8Pt2nVKjA8xFNlpbpOphUDwyTHlM5//K0 PDMmo3D9znrbyUyeyYhFNvDc/UxEO4U3yF8ta+eLH+hoItmq14a9U2yFFP6r8YZRbN9V 9skAUQZ/QmGK8n6fv4tWxEUX682pc3skCb7KwiP3uo90lGuaTokDCR20uQgRgJbuRmVV fwnNkcrPlq5NhdAIie3TfH/h6L6EJTOa2+KBlxAzmvRIjfeY6uHlkYG8DGEkK3yJvDwr kbPQ== 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=X+K0gebLFf7h9/1vaVJXB/XwwOUt2B7hoYl9zjgYwOQ=; b=bkmcc9rJ5vY39S9Izjvq67n8ebmC9kCiZtXJVRtPgXJqOzb4HmNRtz3RX5cy2iKLLd 61ArGxZX+2KaKToo8mQ2U1t8WxSMdgk41lkzSsHmNPBynIaLPpCQpcslT9OQGioeMc/A F1WGeBItmMh+JT0BpOkPAL/gJgVlKA6g7fQWbSCwScRVlUryFqiRIbM4tHNVQS3QsBC/ sjqGVBrGBhQk2oW3N/GruOvBGh3EF5u7UQwzf0T9DF2t4642PyARpP+241jEzy3uN9cY Tm7nTx7VfzAvgNGitJ0wDOuZ7/RySWr1ptZESeU4n5G9JO7+faC9ZsnWROBPqD7t9nwt Yk1Q== X-Gm-Message-State: AElRT7GOX2H5OAdyvLSoYeh3EEqBjW57kSSbeK0TQeAVc1ghMo3S2jI0 cYDH2JpwxlcW/R9c/K/1aoFuD5ExwBpoQ2bG5CRxZA== X-Google-Smtp-Source: AG47ELs/XX1VWE5bvw2GapoKZvZR6CQoH1Omgw1x9afhKw2hV6VUKnAUyO2TfnoFCrBwRNai7Nh8umjmAIrLFrW7+uo= X-Received: by 10.107.203.4 with SMTP id b4mr32155932iog.105.1520509866693; Thu, 08 Mar 2018 03:51:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.192.225.141 with HTTP; Thu, 8 Mar 2018 03:51:06 -0800 (PST) In-Reply-To: <201803072318.w27NIrI6056501@pdx.rh.CN85.dnsmgr.net> References: <201803072318.w27NIrI6056501@pdx.rh.CN85.dnsmgr.net> From: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= Date: Thu, 8 Mar 2018 12:51:06 +0100 Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: rgrimes@freebsd.org Cc: Eitan Adler , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 11:51:08 -0000 On Thu, Mar 8, 2018 at 12:18 AM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On 7 March 2018 at 09:37, John Baldwin wrote: > > > On Tuesday, March 06, 2018 06:46:37 PM Eitan Adler wrote: > > >> On 6 March 2018 at 08:26, John Baldwin wrote: > > >> > On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: > > >> >> On 5 March 2018 at 10:08, John Baldwin wrote: > > >> >> > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: > > >> >> >> Author: eadler > > >> >> >> Date: Mon Mar 5 07:54:57 2018 > > >> >> >> New Revision: 330451 > > >> >> >> URL: https://svnweb.freebsd.org/changeset/base/330451 > > >> >> >> > > >> >> >> Log: > > >> >> >> MFC r306837: > > >> >> >> > > >> >> >> [net80211] extend the ieee80211_rx_stats struct to include > more information. > > >> >> > > > >> >> > Have you thought about the KBI implications of this change and > some of the > > >> >> > other changes you've merged? > > >> >> > > >> >> I do have a copy of the modules from 11.1 and have loaded them at > > >> >> various points in time after merging. That said, I am not perfect. > > >> >> Unfortunately, my -STABLE box did not have fully functioning > drivers > > >> >> before these changes so its difficult to test anything beyond > "loads > > >> >> and does not panic.". I havn't done so today yet, but that will > happen > > >> >> soon. > > >> >> > > >> >> Ensuring these things work through code inspection is certainly > > >> >> possible and I've skipped over several changes as a result. > > >> > > > >> > Loading a module doesn't alone doesn't actually test for breakage. > > >> > > >> I'm aware. In this case I should likely just revert this change since > > >> its a pretty blatant break. > > > > > > I suspect many of these changes for iwm, etc. are all intertwined so > I'm not > > > sure if you can leave out individual ones. > > > > Possibly. I do have iwm working on my laptop though. I also know of > > one open PR assigned to me w.r.t. a model I don't own. I'll be > > addressing it some time this week. > > I believe I also have a tester of stable/11 iwm patches avaliable, > he has an 8265? > At weekend I will test them. > > -- > Rod Grimes > rgrimes@freebsd.org > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to "svn-src-stable-11- > unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Thu Mar 8 11:58:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F4A1F292BF; Thu, 8 Mar 2018 11:58:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A97A376818; Thu, 8 Mar 2018 11:58:27 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9758010715; Thu, 8 Mar 2018 11:58:27 +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 w28BwRt1095646; Thu, 8 Mar 2018 11:58:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28BwRcU095645; Thu, 8 Mar 2018 11:58:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081158.w28BwRcU095645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 11:58:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330650 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 330650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 11:58:28 -0000 Author: hselasky Date: Thu Mar 8 11:58:27 2018 New Revision: 330650 URL: https://svnweb.freebsd.org/changeset/base/330650 Log: Use device_printf() instead of printf() when printing warnings and errors to dmesg(8) in mlx5core. Submitted by: Matthew Finlay MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 11:40:39 2018 (r330649) +++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 11:58:27 2018 (r330650) @@ -49,14 +49,14 @@ do { \ mlx5_core_dbg(dev, format, ##__VA_ARGS__); \ } while (0) -#define mlx5_core_err(dev, format, ...) \ - printf("mlx5_core: ERR: ""%s:%s:%d:(pid %d): " format, \ - (dev)->priv.name, __func__, __LINE__, curthread->td_proc->p_pid, \ - ##__VA_ARGS__) +#define mlx5_core_err(_dev, format, ...) \ + device_printf((&(_dev)->pdev->dev)->bsddev, "ERR: ""%s:%d:(pid %d): " format, \ + __func__, __LINE__, curthread->td_proc->p_pid, \ + ##__VA_ARGS__) -#define mlx5_core_warn(dev, format, ...) \ - printf("mlx5_core: WARN: ""%s:%s:%d:(pid %d): " format, \ - (dev)->priv.name, __func__, __LINE__, curthread->td_proc->p_pid, \ +#define mlx5_core_warn(_dev, format, ...) \ + device_printf((&(_dev)->pdev->dev)->bsddev, "WARN: ""%s:%d:(pid %d): " format, \ + __func__, __LINE__, curthread->td_proc->p_pid, \ ##__VA_ARGS__) enum { From owner-svn-src-all@freebsd.org Thu Mar 8 11:59:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D30BF29415; Thu, 8 Mar 2018 11:59:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACF8876992; Thu, 8 Mar 2018 11:59:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A783D10716; Thu, 8 Mar 2018 11:59:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28Bxmxo095740; Thu, 8 Mar 2018 11:59:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28BxlVU095733; Thu, 8 Mar 2018 11:59:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081159.w28BxlVU095733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 11:59:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330651 - in head/sys: conf dev/mlx5 dev/mlx5/mlx5_core modules/mlx5 X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: conf dev/mlx5 dev/mlx5/mlx5_core modules/mlx5 X-SVN-Commit-Revision: 330651 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 11:59:49 -0000 Author: hselasky Date: Thu Mar 8 11:59:47 2018 New Revision: 330651 URL: https://svnweb.freebsd.org/changeset/base/330651 Log: Add vendor specific capability interface support in mlx5core. Add the ability to access the vendor specific space gateway in order to support reading and writing data into the different configuration domains. Submitted by: Matthew Finlay MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/dev/mlx5/mlx5_core/mlx5_vsc.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/mlx5/device.h head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_main.c head/sys/dev/mlx5/mlx5_ifc.h head/sys/modules/mlx5/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Mar 8 11:58:27 2018 (r330650) +++ head/sys/conf/files Thu Mar 8 11:59:47 2018 (r330651) @@ -4757,6 +4757,8 @@ dev/mlx5/mlx5_core/mlx5_uar.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_vport.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_vsc.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ compile-with "${OFED_C}" Modified: head/sys/dev/mlx5/device.h ============================================================================== --- head/sys/dev/mlx5/device.h Thu Mar 8 11:58:27 2018 (r330650) +++ head/sys/dev/mlx5/device.h Thu Mar 8 11:59:47 2018 (r330651) @@ -138,6 +138,26 @@ __mlx5_mask(typ, fld)) MLX5_BY_PASS_NUM_DONT_TRAP_PRIOS +\ MLX5_BY_PASS_NUM_MULTICAST_PRIOS) +/* insert a value to a struct */ +#define MLX5_VSC_SET(typ, p, fld, v) do { \ + BUILD_BUG_ON(__mlx5_st_sz_bits(typ) % 32); \ + BUILD_BUG_ON(__mlx5_bit_sz(typ, fld) > 32); \ + *((__le32 *)(p) + __mlx5_dw_off(typ, fld)) = \ + cpu_to_le32((le32_to_cpu(*((__le32 *)(p) + __mlx5_dw_off(typ, fld))) & \ + (~__mlx5_dw_mask(typ, fld))) | (((v) & __mlx5_mask(typ, fld)) \ + << __mlx5_dw_bit_off(typ, fld))); \ +} while (0) + +#define MLX5_VSC_GET(typ, p, fld) ((le32_to_cpu(*((__le32 *)(p) +\ +__mlx5_dw_off(typ, fld))) >> __mlx5_dw_bit_off(typ, fld)) & \ +__mlx5_mask(typ, fld)) + +#define MLX5_VSC_GET_PR(typ, p, fld) ({ \ + u32 ___t = MLX5_VSC_GET(typ, p, fld); \ + pr_debug(#fld " = 0x%x\n", ___t); \ + ___t; \ +}) + enum { MLX5_MAX_COMMANDS = 32, MLX5_CMD_DATA_BLOCK_SIZE = 512, Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Thu Mar 8 11:58:27 2018 (r330650) +++ head/sys/dev/mlx5/driver.h Thu Mar 8 11:59:47 2018 (r330651) @@ -221,6 +221,16 @@ enum mlx5_link_mode { MLX5_LINK_MODES_NUMBER, }; +enum { + MLX5_VSC_SPACE_SUPPORTED = 0x1, + MLX5_VSC_SPACE_OFFSET = 0x4, + MLX5_VSC_COUNTER_OFFSET = 0x8, + MLX5_VSC_SEMA_OFFSET = 0xC, + MLX5_VSC_ADDR_OFFSET = 0x10, + MLX5_VSC_DATA_OFFSET = 0x14, + MLX5_VSC_MAX_RETRIES = 0x1000, +}; + #define MLX5_PROT_MASK(link_mode) (1 << link_mode) struct mlx5_uuar_info { @@ -627,6 +637,7 @@ struct mlx5_core_dev { struct mlx5_priv priv; struct mlx5_profile *profile; atomic_t num_qps; + u32 vsc_addr; u32 issi; struct mlx5_special_contexts special_contexts; unsigned int module_status[MLX5_MAX_PORTS]; @@ -1001,6 +1012,12 @@ int mlx5_set_diagnostic_params(struct mlx5_core_dev *m int mlx5_query_diagnostic_counters(struct mlx5_core_dev *mdev, u8 num_of_samples, u16 sample_index, void *out, int out_size); +int mlx5_vsc_find_cap(struct mlx5_core_dev *mdev); +int mlx5_vsc_lock(struct mlx5_core_dev *mdev); +void mlx5_vsc_unlock(struct mlx5_core_dev *mdev); +int mlx5_vsc_set_space(struct mlx5_core_dev *mdev, u16 space); +int mlx5_vsc_write(struct mlx5_core_dev *mdev, u32 addr, u32 *data); +int mlx5_vsc_read(struct mlx5_core_dev *mdev, u32 addr, u32 *data); static inline u32 mlx5_mkey_to_idx(u32 mkey) { return mkey >> 8; Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu Mar 8 11:58:27 2018 (r330650) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu Mar 8 11:59:47 2018 (r330651) @@ -846,6 +846,9 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, st goto err_clr_master; } + if (mlx5_vsc_find_cap(dev)) + dev_err(&pdev->dev, "Unable to find vendor specific capabilities\n"); + return 0; err_clr_master: @@ -1183,7 +1186,6 @@ static int init_one(struct pci_dev *pdev, device_printf((&pdev->dev)->bsddev, "ERR: ""mlx5_register_device failed %d\n", err); goto clean_health; } - return 0; Added: head/sys/dev/mlx5/mlx5_core/mlx5_vsc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx5/mlx5_core/mlx5_vsc.c Thu Mar 8 11:59:47 2018 (r330651) @@ -0,0 +1,204 @@ +/*- + * Copyright (c) 2013-2017, Mellanox Technologies, Ltd. 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 AUTHOR AND CONTRIBUTORS `AS IS' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include + +struct mlx5_ifc_vsc_space_bits { + u8 status[0x3]; + u8 reserved0[0xd]; + u8 space[0x10]; +}; + +struct mlx5_ifc_vsc_addr_bits { + u8 flag[0x1]; + u8 reserved0[0x1]; + u8 address[0x1e]; +}; + +int mlx5_vsc_lock(struct mlx5_core_dev *mdev) +{ + device_t dev = mdev->pdev->dev.bsddev; + int vsc_addr = mdev->vsc_addr; + int retries = 0; + u32 lock_val; + u32 counter; + + if (!vsc_addr) { + mlx5_core_warn(mdev, "Unable to acquire vsc lock, vsc_addr not initialized\n"); + return EINVAL; + } + + while (true) { + if (retries > MLX5_VSC_MAX_RETRIES) + return EBUSY; + + if (pci_read_config(dev, vsc_addr + MLX5_VSC_SEMA_OFFSET, 4)) { + retries++; + /* + * The PRM suggests random 0 - 10ms to prevent multiple + * waiters on the same interval in order to avoid starvation + */ + DELAY((random() % 11) * 1000); + continue; + } + + counter = pci_read_config(dev, vsc_addr + MLX5_VSC_COUNTER_OFFSET, 4); + pci_write_config(dev, vsc_addr + MLX5_VSC_SEMA_OFFSET, counter, 4); + lock_val = pci_read_config(dev, vsc_addr + MLX5_VSC_SEMA_OFFSET, 4); + + if (lock_val == counter) + break; + + retries++; + } + + return 0; +} + +void mlx5_vsc_unlock(struct mlx5_core_dev *mdev) +{ + device_t dev = mdev->pdev->dev.bsddev; + int vsc_addr = mdev->vsc_addr; + + if (!vsc_addr) { + mlx5_core_warn(mdev, "Unable to release vsc lock, vsc_addr not initialized\n"); + return; + } + + pci_write_config(dev, vsc_addr + MLX5_VSC_SEMA_OFFSET, 0, 4); +} + +static int mlx5_vsc_wait_on_flag(struct mlx5_core_dev *mdev, u32 expected) +{ + device_t dev = mdev->pdev->dev.bsddev; + int vsc_addr = mdev->vsc_addr; + int retries = 0; + u32 flag; + + while (true) { + if (retries > MLX5_VSC_MAX_RETRIES) + return EBUSY; + + flag = pci_read_config(dev, vsc_addr + MLX5_VSC_ADDR_OFFSET, 4); + if (expected == MLX5_VSC_GET(vsc_addr, &flag, flag)) + break; + + retries++; + DELAY(10); + } + + return 0; +} + +int mlx5_vsc_set_space(struct mlx5_core_dev *mdev, u16 space) +{ + device_t dev = mdev->pdev->dev.bsddev; + int vsc_addr = mdev->vsc_addr; + u32 vsc_space = 0; + + if (!vsc_addr) { + mlx5_core_warn(mdev, "Unable to set vsc space, vsc_addr not initialized\n"); + return EINVAL; + } + + MLX5_VSC_SET(vsc_space, &vsc_space, space, space); + pci_write_config(dev, vsc_addr + MLX5_VSC_SPACE_OFFSET, vsc_space, 4); + vsc_space = pci_read_config(dev, vsc_addr + MLX5_VSC_SPACE_OFFSET, 4); + + if (MLX5_VSC_GET(vsc_space, &vsc_space, status) != MLX5_VSC_SPACE_SUPPORTED) { + mlx5_core_warn(mdev, "Space 0x%x is not supported.\n", space); + return ENOTSUP; + } + + return 0; +} + +int mlx5_vsc_write(struct mlx5_core_dev *mdev, u32 addr, u32 *data) +{ + device_t dev = mdev->pdev->dev.bsddev; + int vsc_addr = mdev->vsc_addr; + u32 in = 0; + int err; + + if (!vsc_addr) { + mlx5_core_warn(mdev, "Unable to call vsc write, vsc_addr not initialized\n"); + return EINVAL; + } + + MLX5_VSC_SET(vsc_addr, &in, address, addr); + MLX5_VSC_SET(vsc_addr, &in, flag, 1); + pci_write_config(dev, vsc_addr + MLX5_VSC_DATA_OFFSET, *data, 4); + pci_write_config(dev, vsc_addr + MLX5_VSC_ADDR_OFFSET, in, 4); + + err = mlx5_vsc_wait_on_flag(mdev, 0); + if (err) + mlx5_core_warn(mdev, "Failed waiting for write flag!\n"); + + return err; +} + +int mlx5_vsc_read(struct mlx5_core_dev *mdev, u32 addr, u32 *data) +{ + device_t dev = mdev->pdev->dev.bsddev; + int vsc_addr = mdev->vsc_addr; + int err; + u32 in; + + if (!vsc_addr) { + mlx5_core_warn(mdev, "Unable to call vsc read, vsc_addr not initialized\n"); + return EINVAL; + } + + MLX5_VSC_SET(vsc_addr, &in, address, addr); + pci_write_config(dev, vsc_addr + MLX5_VSC_ADDR_OFFSET, in, 4); + + err = mlx5_vsc_wait_on_flag(mdev, 1); + if (err) { + mlx5_core_warn(mdev, "Failed waiting for read complete flag!\n"); + return err; + } + + *data = pci_read_config(dev, vsc_addr + MLX5_VSC_DATA_OFFSET, 4); + + return 0; +} + +int mlx5_vsc_find_cap(struct mlx5_core_dev *mdev) +{ + int *capreg = &mdev->vsc_addr; + int err; + + err = pci_find_cap(mdev->pdev->dev.bsddev, PCIY_VENDOR, capreg); + + if (err) + *capreg = 0; + + return err; +} + Modified: head/sys/dev/mlx5/mlx5_ifc.h ============================================================================== --- head/sys/dev/mlx5/mlx5_ifc.h Thu Mar 8 11:58:27 2018 (r330650) +++ head/sys/dev/mlx5/mlx5_ifc.h Thu Mar 8 11:59:47 2018 (r330651) @@ -9328,6 +9328,13 @@ struct mlx5_ifc_mtt_bits { u8 rd_en[0x1]; }; +/* Vendor Specific Capabilities, VSC */ +enum { + MLX5_VSC_DOMAIN_ICMD = 0x1, + MLX5_VSC_DOMAIN_PROTECTED_CRSPACE = 0x6, + MLX5_VSC_DOMAIN_SEMAPHORES = 0xA, +}; + struct mlx5_ifc_vendor_specific_cap_bits { u8 type[0x8]; u8 length[0x8]; Modified: head/sys/modules/mlx5/Makefile ============================================================================== --- head/sys/modules/mlx5/Makefile Thu Mar 8 11:58:27 2018 (r330650) +++ head/sys/modules/mlx5/Makefile Thu Mar 8 11:59:47 2018 (r330651) @@ -24,6 +24,7 @@ mlx5_srq.c \ mlx5_transobj.c \ mlx5_uar.c \ mlx5_vport.c \ +mlx5_vsc.c \ mlx5_wq.c \ device_if.h bus_if.h vnode_if.h pci_if.h \ opt_inet.h opt_inet6.h opt_rss.h From owner-svn-src-all@freebsd.org Thu Mar 8 12:42:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16EB5F2DB25; Thu, 8 Mar 2018 12:42:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8D278996; Thu, 8 Mar 2018 12:42:43 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id A9907426FA2; Thu, 8 Mar 2018 23:42:34 +1100 (AEDT) Date: Thu, 8 Mar 2018 23:42:33 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler cc: Bruce Evans , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315480 - in head/sys: dev/syscons dev/vt kern teken In-Reply-To: Message-ID: <20180308225049.S1249@besplex.bde.org> References: <201703181113.v2IBDs2T090790@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=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=JqhwoUi6xzlgNkRkyysA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 12:42:44 -0000 On Wed, 7 Mar 2018, Eitan Adler wrote: > On 18 March 2017 at 04:13, Bruce Evans wrote: >> Author: bde >> Date: Sat Mar 18 11:13:54 2017 >> New Revision: 315480 >> URL: https://svnweb.freebsd.org/changeset/base/315480 >> >> Log: >> Fix bright colors for syscons, and make them work for the first time >> for vt. Restore syscons' rendering of background (bg) brightness as >> foreground (fg) blinking and vice versa, and add rendering of blinking >> as background brightness to vt. > > Is this one safe to MFC ? Fairly safe, except it might depend on my previous changes in syscons. They were fairly carefully ordered. You probably want all of them except colorized kernel console output with default colors that not everyone would like. Syscons an be fixed much more easily by not using scteken (teken upper layers and scteken.c). scterm-sc.c from FreeBSD-7 requires only 46 lines of patches to work again. Known lost functionality in scteken will take an estimated 2000 lines of patches to fix. I have written about 1/3 of these. Bruce From owner-svn-src-all@freebsd.org Thu Mar 8 14:33:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3338F36D55; Thu, 8 Mar 2018 14:33:59 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CCC47D16A; Thu, 8 Mar 2018 14:33:59 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 760D912065; Thu, 8 Mar 2018 14:33:59 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28EXxWB074724; Thu, 8 Mar 2018 14:33:59 GMT (envelope-from slavash@FreeBSD.org) Received: (from slavash@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28EXxYJ074723; Thu, 8 Mar 2018 14:33:59 GMT (envelope-from slavash@FreeBSD.org) Message-Id: <201803081433.w28EXxYJ074723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slavash set sender to slavash@FreeBSD.org using -f From: Slava Shwartsman Date: Thu, 8 Mar 2018 14:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330652 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: slavash X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 330652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 14:34:00 -0000 Author: slavash Date: Thu Mar 8 14:33:59 2018 New Revision: 330652 URL: https://svnweb.freebsd.org/changeset/base/330652 Log: Add myself and Hans Petter Selasky Approved by: hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu Mar 8 11:59:47 2018 (r330651) +++ head/share/misc/committers-src.dot Thu Mar 8 14:33:59 2018 (r330652) @@ -187,6 +187,7 @@ gshapiro [label="Gregory Shapiro\ngshapiro@FreeBSD.org harti [label="Hartmut Brandt\nharti@FreeBSD.org\n2003/01/29"] hiren [label="Hiren Panchasara\nhiren@FreeBSD.org\n2013/04/12"] hmp [label="Hiten Pandya\nhmp@FreeBSD.org\n2004/03/23"] +hselasky [label="Hans Petter Selasky\nhselasky@FreeBSD.org\n"] ian [label="Ian Lepore\nian@FreeBSD.org\n2013/01/07"] iedowse [label="Ian Dowse\niedowse@FreeBSD.org\n2000/12/01"] imp [label="Warner Losh\nimp@FreeBSD.org\n1996/09/20"] @@ -313,6 +314,7 @@ shurd [label="Stephen Hurd\nshurd@FreeBSD.org\n2017/09 simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2006/03/07"] sjg [label="Simon J. Gerraty\nsjg@FreeBSD.org\n2012/10/23"] skra [label="Svatopluk Kraus\nskra@FreeBSD.org\n2015/10/28"] +slavash [label="Slava Shwartsman\nslavash@FreeBSD.org\n2018/02/08"] slm [label="Stephen McConnell\nslm@FreeBSD.org\n2014/05/07"] smh [label="Steven Hartland\nsmh@FreeBSD.org\n2012/11/12"] sobomax [label="Maxim Sobolev\nsobomax@FreeBSD.org\n2001/07/25"] @@ -524,6 +526,8 @@ grog -> edwin grog -> le grog -> peterj +hselasky -> slavash + imp -> akiyama imp -> ambrisko imp -> andrew @@ -640,6 +644,7 @@ kib -> rdivacky kib -> rmacklem kib -> rmh kib -> skra +kib -> slavash kib -> stas kib -> tijl kib -> trociny From owner-svn-src-all@freebsd.org Thu Mar 8 15:21:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 126E1F3AE98; Thu, 8 Mar 2018 15:21:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B760D7F1D4; Thu, 8 Mar 2018 15:21:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B229E12815; Thu, 8 Mar 2018 15:21:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28FLvT0099477; Thu, 8 Mar 2018 15:21:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28FLudP099465; Thu, 8 Mar 2018 15:21:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081521.w28FLudP099465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 15:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330653 - in head: etc/mtree include share/man/man4 share/man/man5 share/mk sys/conf sys/dev/mlx5 sys/dev/mlx5/mlx5_core sys/modules/mlx5 targets/pseudo/userland tools/build/options usr... X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head: etc/mtree include share/man/man4 share/man/man5 share/mk sys/conf sys/dev/mlx5 sys/dev/mlx5/mlx5_core sys/modules/mlx5 targets/pseudo/userland tools/build/options usr.sbin usr.sbin/mlx5tool X-SVN-Commit-Revision: 330653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 15:21:58 -0000 Author: hselasky Date: Thu Mar 8 15:21:56 2018 New Revision: 330653 URL: https://svnweb.freebsd.org/changeset/base/330653 Log: Add kernel and userspace code to dump the firmware state of supported ConnectX-4/5 devices in mlx5core. The dump is obtained by reading a predefined register map from the non-destructive crspace, accessible by the vendor-specific PCIe capability (VSC). The dump is stored in preallocated kernel memory and managed by the mlx5tool(8), which communicates with the driver using a character device node. The utility allows to store the dump in format
into a file, to reset the dump content, and to manually initiate the dump. A call to mlx5_fwdump() should be added at the places where a dump must be fetched automatically. The most likely place is right before a firmware reset request. Submitted by: kib@ MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/share/man/man4/mlx5io.4 (contents, props changed) head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c (contents, props changed) head/sys/dev/mlx5/mlx5_core/mlx5_fwdump_regmaps.c (contents, props changed) head/sys/dev/mlx5/mlx5io.h (contents, props changed) head/tools/build/options/WITHOUT_MLX5TOOL (contents, props changed) head/tools/build/options/WITH_MLX5TOOL (contents, props changed) head/usr.sbin/mlx5tool/ head/usr.sbin/mlx5tool/Makefile (contents, props changed) head/usr.sbin/mlx5tool/mlx5tool.8 (contents, props changed) head/usr.sbin/mlx5tool/mlx5tool.c (contents, props changed) Modified: head/etc/mtree/BSD.include.dist head/include/Makefile head/share/man/man4/Makefile head/share/man/man5/src.conf.5 head/share/mk/src.opts.mk head/sys/conf/files head/sys/dev/mlx5/driver.h head/sys/dev/mlx5/mlx5_core/mlx5_core.h head/sys/dev/mlx5/mlx5_core/mlx5_main.c head/sys/modules/mlx5/Makefile head/targets/pseudo/userland/Makefile.depend head/usr.sbin/Makefile Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Thu Mar 8 14:33:59 2018 (r330652) +++ head/etc/mtree/BSD.include.dist Thu Mar 8 15:21:56 2018 (r330653) @@ -132,6 +132,8 @@ .. mfi .. + mlx5 + .. mmc .. mpt Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Thu Mar 8 14:33:59 2018 (r330652) +++ head/include/Makefile Thu Mar 8 15:21:56 2018 (r330653) @@ -255,6 +255,11 @@ copies: .PHONY .META ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nvpair.h \ ${SDESTDIR}${INCLUDEDIR}/sys .endif +.if ${MK_MLX5TOOL} != "no" + cd ${SRCTOP}/sys/dev/mlx5; \ + ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 mlx5io.h \ + ${SDESTDIR}${INCLUDEDIR}/dev/mlx5 +.endif symlinks: .PHONY .META @${ECHO} "Setting up symlinks to kernel source tree..." @@ -384,6 +389,10 @@ symlinks: .PHONY .META ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/rpc/$$h \ ${SDESTDIR}${INCLUDEDIR}/rpc; \ done +.if ${MK_MLX5TOOL} != "no" + ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/mlx5/mlx5io.h \ + ${SDESTDIR}${INCLUDEDIR}/dev/mlx5 +.endif .include Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Mar 8 14:33:59 2018 (r330652) +++ head/share/man/man4/Makefile Thu Mar 8 15:21:56 2018 (r330653) @@ -928,6 +928,10 @@ MAN+= mlx4ib.4 MAN+= mlx5ib.4 .endif +.if ${MK_MLX5TOOL} != "no" +MAN+= mlx5io.4 +.endif + .if ${MK_TESTS} != "no" ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/doc Added: head/share/man/man4/mlx5io.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/mlx5io.4 Thu Mar 8 15:21:56 2018 (r330653) @@ -0,0 +1,142 @@ +.\" +.\" Copyright (c) 2018 Mellanox Technologies +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 20, 2018 +.Dt mlx5io 4 +.Os +.Sh NAME +.Nm mlx5io +.Nd IOCTL interface to manage Connect-X 4/5 Mellanox network adapters +.Sh SYNOPSIS +.In dev/mlx5/mlx5io.h +.Sh DESCRIPTION +The +.Nm +interface is provided for management of the Connect-X 4 and 5 network adapters +in the aspects not covered by the generic network configuration, +mostly related to the PCIe attachment and internal card working. +Interface consists of the commands, which are passed by means of +.Xr ioctl 2 +on the file descriptor, opened from the +.Pa /dev/mlx5ctl +device node. +.Pp +The following commands are implemented: +.Bl -tag -width indent +.It Dv MLX5_FWDUMP_FORCE +Take the snapshot of the firmware registers state and store it in the +kernel buffer. +The buffer must be empty, in other words, no dumps should be written so +far, or existing dump cleared with the +.Dv MLX5_FWDUMP_RESET +command for the specified device. +The argument for the command should point to the +.Vt struct mlx5_fwdump_addr +structure, containing the PCIe bus address of the device. +.Bd -literal +struct mlx5_fwdump_addr { + uint32_t domain; + uint8_t bus; + uint8_t slot; + uint8_t func; +}; +.Ed +.It Dv MLX5_FWDUMP_RESET +Clear the stored firmware dump, preparing the kernel buffer for +the next dump. +The argument for the command should point to the +.Vt struct mlx5_fwdump_addr +structure, containing the PCIe bus address of the device. +.It Dv MLX5_FWDUMP_GET +Fetch the stored firmware dump into the user memory. +The argument to the command should point to the input/output +.Vt struct mlx5_fwdump_get +structure. +Its +.Dv devaddr +field specifies the address of the device, the +.Dv buf +fields points to the array of +.Vt struct mlx5_fwdump_reg +of records of the registers values, the size of the array is specified +in the +.Dv reg_cnt +field. +.Bd -literal +struct mlx5_fwdump_get { + struct mlx5_fwdump_addr devaddr; + struct mlx5_fwdump_reg *buf; + size_t reg_cnt; + size_t reg_filled; /* out */ +}; +.Ed +.Pp +On successfull return, the +.Dv reg_filled +field reports the number of the +.Dv buf +array elements actually filled with the registers values. +If +.Dv buf +contains the +.Dv NULL +pointer, no registers are filled, but +.Dv reg_filled +still contains the number of registers that should be passed for +the complete dump. +.Pp +The +.Vt struct mlx5_fwdump_reg +element contains the address of the register in the field +.Dv addr , +and its value in the field +.Dv val . +.Bd -literal +struct mlx5_fwdump_reg { + uint32_t addr; + uint32_t val; +}; +.Ed +.El +.Sh FILES +The +.Pa /dev/mlx5ctl +.Xr devfs 5 +node is used to pass commands to the driver. +.Sh RETURN VALUES +If successful, the IOCTL returns zero. +Otherwise, -1 is returned and the global variable +.Va errno +is set to indicate the error. +.Sh SEE ALSO +.Xr errno 2 , +.Xr ioctl 2 , +.Xr mlx5en 4 , +.Xr mlx5ib 4 , +.Xr mlx5tool 8 +and +.Xr pci 9 . Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Mar 8 14:33:59 2018 (r330652) +++ head/share/man/man5/src.conf.5 Thu Mar 8 15:21:56 2018 (r330653) @@ -436,12 +436,18 @@ Set to not build CUSE-related programs and libraries. .It Va WITHOUT_CXGBETOOL Set to not build .Xr cxgbetool 8 +.It Va WITHOUT_MLX5TOOL +Set to not build +.Xr mlx5tool 8 .Pp This is a default setting on arm/arm, arm/armeb, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_CXGBETOOL Set to build .Xr cxgbetool 8 +.It Va WITH_MLX5TOOL +Set to build +.Xr mlx5tool 8 .Pp This is a default setting on amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and sparc64/sparc64. Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Mar 8 14:33:59 2018 (r330652) +++ head/share/mk/src.opts.mk Thu Mar 8 15:21:56 2018 (r330653) @@ -320,8 +320,10 @@ BROKEN_OPTIONS+=PROFILE .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ ${__T} == "powerpc64" || ${__T} == "sparc64" __DEFAULT_YES_OPTIONS+=CXGBETOOL +__DEFAULT_YES_OPTIONS+=MLX5TOOL .else __DEFAULT_NO_OPTIONS+=CXGBETOOL +__DEFAULT_NO_OPTIONS+=MLX5TOOL .endif .include Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Mar 8 14:33:59 2018 (r330652) +++ head/sys/conf/files Thu Mar 8 15:21:56 2018 (r330653) @@ -4731,6 +4731,10 @@ dev/mlx5/mlx5_core/mlx5_fs_tree.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fw.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_fwdump.c optional mlx5 pci \ + compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_fwdump_regmaps.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_health.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mad.c optional mlx5 pci \ Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Thu Mar 8 14:33:59 2018 (r330652) +++ head/sys/dev/mlx5/driver.h Thu Mar 8 15:21:56 2018 (r330653) @@ -615,6 +615,7 @@ struct mlx5_special_contexts { }; struct mlx5_flow_root_namespace; +struct mlx5_dump_data; struct mlx5_core_dev { struct pci_dev *pdev; /* sync pci state */ @@ -648,6 +649,7 @@ struct mlx5_core_dev { struct mlx5_flow_root_namespace *sniffer_rx_root_ns; struct mlx5_flow_root_namespace *sniffer_tx_root_ns; u32 num_q_counter_allocated[MLX5_INTERFACE_NUMBER]; + struct mlx5_dump_data *dump_data; }; enum { Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 14:33:59 2018 (r330652) +++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 15:21:56 2018 (r330653) @@ -80,4 +80,17 @@ void mlx5e_cleanup(void); int mlx5_rename_eq(struct mlx5_core_dev *dev, int eq_ix, char *name); +int mlx5_fwdump_init(void); +void mlx5_fwdump_fini(void); +int mlx5_fwdump_prep(struct mlx5_core_dev *mdev); +void mlx5_fwdump(struct mlx5_core_dev *mdev); +void mlx5_fwdump_clean(struct mlx5_core_dev *mdev); + +struct mlx5_crspace_regmap { + uint32_t addr; + unsigned cnt; +}; + +extern struct pci_driver mlx5_core_driver; + #endif /* __MLX5_CORE_H__ */ Added: head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c Thu Mar 8 15:21:56 2018 (r330653) @@ -0,0 +1,308 @@ +/*- + * Copyright (c) 2018, Mellanox Technologies, Ltd. 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 AUTHOR AND CONTRIBUTORS `AS IS' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +extern const struct mlx5_crspace_regmap mlx5_crspace_regmap_mt4117[]; +extern const struct mlx5_crspace_regmap mlx5_crspace_regmap_mt4115[]; +extern const struct mlx5_crspace_regmap mlx5_crspace_regmap_connectx5[]; + +struct mlx5_dump_data { + const struct mlx5_crspace_regmap *rege; + uint32_t *dump; + unsigned dump_size; + int dump_valid; + struct mtx dump_lock; +}; + +static MALLOC_DEFINE(M_MLX5_DUMP, "MLX5DUMP", "MLX5 Firmware dump"); + +static unsigned +mlx5_fwdump_getsize(const struct mlx5_crspace_regmap *rege) +{ + const struct mlx5_crspace_regmap *r; + unsigned sz; + + for (sz = 0, r = rege; r->cnt != 0; r++) + sz += r->cnt; + return (sz); +} + +static void +mlx5_fwdump_destroy_dd(struct mlx5_dump_data *dd) +{ + + mtx_destroy(&dd->dump_lock); + free(dd->dump, M_MLX5_DUMP); + free(dd, M_MLX5_DUMP); +} + +int +mlx5_fwdump_prep(struct mlx5_core_dev *mdev) +{ + struct mlx5_dump_data *dd; + int error; + + error = mlx5_vsc_find_cap(mdev); + if (error != 0) + return (error); + dd = malloc(sizeof(struct mlx5_dump_data), M_MLX5_DUMP, M_WAITOK); + switch (pci_get_device(mdev->pdev->dev.bsddev)) { + case 0x1013: + dd->rege = mlx5_crspace_regmap_mt4115; + break; + case 0x1015: + dd->rege = mlx5_crspace_regmap_mt4117; + break; + case 0x1017: + case 0x1019: + dd->rege = mlx5_crspace_regmap_connectx5; + break; + default: + free(dd, M_MLX5_DUMP); + return (0); /* silently fail to not prevent driver attach */ + } + dd->dump_size = mlx5_fwdump_getsize(dd->rege); + dd->dump = malloc(dd->dump_size * sizeof(uint32_t), M_MLX5_DUMP, + M_WAITOK | M_ZERO); + dd->dump_valid = 0; + mtx_init(&dd->dump_lock, "mlx5dmp", NULL, MTX_DEF | MTX_NEW); + if (atomic_cmpset_rel_ptr((uintptr_t *)&mdev->dump_data, 0, + (uintptr_t)dd) == 0) + mlx5_fwdump_destroy_dd(dd); + return (0); +} + +void +mlx5_fwdump(struct mlx5_core_dev *mdev) +{ + struct mlx5_dump_data *dd; + const struct mlx5_crspace_regmap *r; + uint32_t i, ri; + int error; + + dd = (struct mlx5_dump_data *)atomic_load_acq_ptr((uintptr_t *) + &mdev->dump_data); + if (dd == NULL) + return; + mtx_lock(&dd->dump_lock); + if (dd->dump_valid) + /* only one dump */ + goto failed; + + /* mlx5_vsc already warns, be silent. */ + error = mlx5_vsc_lock(mdev); + if (error != 0) + goto failed; + error = mlx5_vsc_set_space(mdev, MLX5_VSC_DOMAIN_PROTECTED_CRSPACE); + if (error != 0) + goto unlock_vsc; + for (i = 0, r = dd->rege; r->cnt != 0; r++) { + for (ri = 0; ri < r->cnt; ri++) { + error = mlx5_vsc_read(mdev, r->addr + ri * 4, + &dd->dump[i]); + if (error != 0) + goto unlock_vsc; + i++; + } + } + atomic_store_rel_int(&dd->dump_valid, 1); +unlock_vsc: + mlx5_vsc_unlock(mdev); +failed: + mtx_unlock(&dd->dump_lock); +} + +void +mlx5_fwdump_clean(struct mlx5_core_dev *mdev) +{ + struct mlx5_dump_data *dd; + + for (;;) { + dd = mdev->dump_data; + if (dd == NULL) + return; + if (atomic_cmpset_ptr((uintptr_t *)&mdev->dump_data, + (uintptr_t)dd, 0) == 1) { + mlx5_fwdump_destroy_dd(dd); + return; + } + } +} + +static int +mlx5_dbsf_to_core(const struct mlx5_fwdump_addr *devaddr, + struct mlx5_core_dev **mdev) +{ + device_t dev; + struct pci_dev *pdev; + + dev = pci_find_dbsf(devaddr->domain, devaddr->bus, devaddr->slot, + devaddr->func); + if (dev == NULL) + return (ENOENT); + if (device_get_devclass(dev) != mlx5_core_driver.bsdclass) + return (EINVAL); + pdev = device_get_softc(dev); + *mdev = pci_get_drvdata(pdev); + if (*mdev == NULL) + return (ENOENT); + return (0); +} + +static int +mlx5_fwdump_copyout(struct mlx5_dump_data *dd, struct mlx5_fwdump_get *fwg) +{ + const struct mlx5_crspace_regmap *r; + struct mlx5_fwdump_reg rv, *urv; + uint32_t i, ri; + int error; + + if (dd == NULL) + return (ENOENT); + if (fwg->buf == NULL) { + fwg->reg_filled = dd->dump_size; + return (0); + } + if (atomic_load_acq_int(&dd->dump_valid) == 0) + return (ENOENT); + + urv = fwg->buf; + for (i = 0, r = dd->rege; r->cnt != 0; r++) { + for (ri = 0; ri < r->cnt; ri++) { + if (i >= fwg->reg_cnt) + goto out; + rv.addr = r->addr + ri * 4; + rv.val = dd->dump[i]; + error = copyout(&rv, urv, sizeof(rv)); + if (error != 0) + return (error); + urv++; + i++; + } + } +out: + fwg->reg_filled = i; + return (0); +} + +static int +mlx5_fwdump_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, + struct thread *td) +{ + struct mlx5_core_dev *mdev; + struct mlx5_fwdump_get *fwg; + struct mlx5_fwdump_addr *devaddr; + struct mlx5_dump_data *dd; + int error; + + error = 0; + switch (cmd) { + case MLX5_FWDUMP_GET: + if ((fflag & FREAD) == 0) { + error = EBADF; + break; + } + fwg = (struct mlx5_fwdump_get *)data; + devaddr = &fwg->devaddr; + error = mlx5_dbsf_to_core(devaddr, &mdev); + if (error != 0) + break; + error = mlx5_fwdump_copyout(mdev->dump_data, fwg); + break; + case MLX5_FWDUMP_RESET: + if ((fflag & FWRITE) == 0) { + error = EBADF; + break; + } + devaddr = (struct mlx5_fwdump_addr *)data; + error = mlx5_dbsf_to_core(devaddr, &mdev); + if (error != 0) + break; + dd = mdev->dump_data; + if (dd != NULL) + atomic_store_rel_int(&dd->dump_valid, 0); + else + error = ENOENT; + break; + case MLX5_FWDUMP_FORCE: + if ((fflag & FWRITE) == 0) { + error = EBADF; + break; + } + devaddr = (struct mlx5_fwdump_addr *)data; + error = mlx5_dbsf_to_core(devaddr, &mdev); + if (error != 0) + break; + mlx5_fwdump(mdev); + break; + default: + error = ENOTTY; + break; + } + return (error); +} + +static struct cdevsw mlx5_fwdump_devsw = { + .d_version = D_VERSION, + .d_ioctl = mlx5_fwdump_ioctl, +}; + +static struct cdev *mlx5_fwdump_dev; + +int +mlx5_fwdump_init(void) +{ + struct make_dev_args mda; + int error; + + make_dev_args_init(&mda); + mda.mda_flags = MAKEDEV_WAITOK | MAKEDEV_CHECKNAME; + mda.mda_devsw = &mlx5_fwdump_devsw; + mda.mda_uid = UID_ROOT; + mda.mda_gid = GID_OPERATOR; + mda.mda_mode = 0640; + error = make_dev_s(&mda, &mlx5_fwdump_dev, "mlx5ctl"); + return (-error); +} + +void +mlx5_fwdump_fini(void) +{ + + if (mlx5_fwdump_dev != NULL) + destroy_dev(mlx5_fwdump_dev); + +} Added: head/sys/dev/mlx5/mlx5_core/mlx5_fwdump_regmaps.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mlx5/mlx5_core/mlx5_fwdump_regmaps.c Thu Mar 8 15:21:56 2018 (r330653) @@ -0,0 +1,11187 @@ +/*- + * Copyright (c) 2018, Mellanox Technologies, Ltd. 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 AUTHOR AND CONTRIBUTORS `AS IS' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +const struct mlx5_crspace_regmap mlx5_crspace_regmap_mt4117[] = { + {0x000000, 16388}, + {0x010084, 1}, + {0x01008c, 2}, + {0x010180, 6}, + {0x01019c, 9}, + {0x010304, 1}, + {0x0103bc, 52}, + {0x010500, 35}, + {0x010604, 1}, + {0x01060c, 1}, + {0x010624, 1}, + {0x01062c, 1}, + {0x010644, 1}, + {0x01064c, 3}, + {0x010800, 1}, + {0x010814, 3}, + {0x010844, 1}, + {0x01084c, 4}, + {0x011000, 32}, + {0x011200, 32}, + {0x011400, 32}, + {0x011600, 32}, + {0x011800, 32}, + {0x011a00, 5}, + {0x011a24, 1}, + {0x011a2c, 1}, + {0x011a34, 3}, + {0x011a44, 1}, + {0x011a4c, 2}, + {0x012000, 20}, + {0x012088, 22}, + {0x012100, 18}, + {0x012200, 36}, + {0x012300, 3}, + {0x012310, 1}, + {0x012320, 1}, + {0x012330, 1}, + {0x012340, 1}, + {0x012350, 1}, + {0x012360, 1}, + {0x012370, 1}, + {0x012400, 166}, + {0x0126a0, 1}, + {0x012700, 32}, + {0x012800, 1}, + {0x012808, 1}, + {0x012810, 1}, + {0x012818, 1}, + {0x012820, 1}, + {0x012828, 1}, + {0x012830, 1}, + {0x012838, 1}, + {0x012850, 1}, + {0x012858, 1}, + {0x012860, 1}, + {0x012868, 1}, + {0x012870, 1}, + {0x012878, 1}, + {0x012880, 1}, + {0x012888, 1}, + {0x012890, 5}, + {0x012900, 10}, + {0x012940, 6}, + {0x012960, 6}, + {0x012980, 5}, + {0x012a00, 6}, + {0x012a40, 5}, + {0x012a80, 9}, + {0x012ac0, 19}, + {0x012b10, 2}, + {0x014000, 1}, + {0x014010, 10}, + {0x014104, 1}, + {0x01410c, 4}, + {0x014200, 1}, + {0x014210, 4}, + {0x014300, 4}, + {0x014400, 3}, + {0x014410, 1}, + {0x014444, 1}, + {0x01444c, 4}, + {0x014480, 2}, + {0x014500, 35}, + {0x014590, 1}, + {0x014600, 32}, + {0x014704, 1}, + {0x01470c, 1}, + {0x014804, 2}, + {0x014814, 3}, + {0x014824, 2}, + {0x014834, 3}, + {0x014844, 2}, + {0x014854, 5}, + {0x014a00, 4}, + {0x014a14, 2}, + {0x015004, 1}, + {0x01500c, 4}, + {0x015204, 1}, + {0x015214, 4}, + {0x015228, 1}, + {0x015244, 1}, + {0x015250, 4}, + {0x015274, 1}, + {0x01527c, 1}, + {0x0152a4, 1}, + {0x015300, 4}, + {0x015314, 1}, + {0x01531c, 3}, + {0x015404, 2}, + {0x015430, 20}, + {0x015484, 2}, + {0x015498, 5}, + {0x0154bc, 1}, + {0x0154c8, 1}, + {0x0154d4, 2}, + {0x01550c, 3}, + {0x015524, 3}, + {0x015608, 3}, + {0x015618, 4}, + {0x015680, 16}, + {0x015704, 2}, + {0x015730, 20}, + {0x015784, 3}, + {0x015794, 3}, + {0x0157c0, 6}, + {0x015800, 52}, + {0x0158d4, 1}, + {0x0158dc, 1}, + {0x0158e4, 3}, + {0x0158f4, 1}, + {0x0158fc, 52}, + {0x015b04, 2}, + {0x015b14, 3}, + {0x015b24, 2}, + {0x015b38, 6}, + {0x015b60, 5}, + {0x015c04, 1}, + {0x015cb8, 18}, + {0x015d98, 1}, + {0x015e00, 1}, + {0x015e08, 1}, + {0x015e10, 1}, + {0x016000, 32}, + {0x016100, 7}, + {0x016120, 2}, + {0x016144, 3}, + {0x016204, 1}, + {0x01620c, 1}, + {0x016224, 1}, + {0x01622c, 1}, + {0x016234, 1}, + {0x01623c, 1}, + {0x016244, 1}, + {0x01624c, 1}, + {0x016254, 1}, + {0x01625c, 2}, + {0x016270, 1}, + {0x016280, 1}, + {0x016290, 1}, + {0x0162a0, 1}, + {0x0162b0, 1}, + {0x0162c0, 1}, + {0x0162d0, 1}, + {0x0162e0, 1}, + {0x0162f0, 1}, + {0x016300, 1}, + {0x016310, 1}, + {0x016320, 1}, + {0x016330, 1}, + {0x016340, 32}, + {0x016400, 19}, + {0x016454, 7}, + {0x016484, 1}, + {0x01648c, 1}, + {0x016800, 9}, + {0x016840, 16}, + {0x017800, 1}, + {0x017828, 1}, + {0x017850, 1}, + {0x017878, 1}, + {0x0178a0, 12}, + {0x0179ac, 1}, + {0x0179d8, 4}, + {0x017a00, 6}, + {0x017a20, 6}, + {0x017a40, 3}, + {0x017c00, 6}, + {0x017c20, 6}, + {0x017c40, 6}, + {0x017c60, 6}, + {0x017c80, 6}, + {0x017ca0, 6}, + {0x017cc0, 6}, + {0x017ce0, 6}, + {0x017d00, 3}, + {0x017d10, 6}, + {0x018400, 11}, + {0x018430, 2}, + {0x018440, 4}, + {0x018604, 1}, + {0x018618, 2}, + {0x018640, 4}, + {0x018660, 2}, + {0x018800, 1}, + {0x018810, 4}, + {0x018844, 1}, + {0x01884c, 4}, + {0x018880, 2}, + {0x01a400, 12}, + {0x01a444, 1}, + {0x01a44c, 1}, + {0x01a800, 1}, + {0x01a814, 3}, + {0x01a844, 1}, + {0x01a84c, 4}, + {0x01c400, 7}, + {0x01c500, 8}, + {0x01c544, 1}, + {0x01c554, 3}, + {0x01c564, 3}, + {0x01c574, 3}, + {0x01c604, 1}, + {0x01c60c, 3}, + {0x01c800, 1}, + {0x01c814, 3}, + {0x01c844, 1}, + {0x01c84c, 4}, + {0x01f000, 1}, + {0x01f400, 1}, + {0x01f408, 4}, + {0x01f41c, 3}, + {0x01f500, 2}, + {0x01f800, 1}, + {0x01f814, 3}, + {0x01f844, 1}, + {0x01f84c, 4}, + {0x01f880, 3}, + {0x020004, 1}, + {0x02000c, 4}, + {0x020080, 3}, + {0x020090, 5}, + {0x020800, 16}, + {0x020900, 192}, + {0x021004, 1}, + {0x02100c, 4}, + {0x021400, 5}, + {0x021418, 5}, + {0x021480, 1}, + {0x021704, 2}, + {0x02173c, 17}, + {0x0217fc, 2}, + {0x021844, 1}, + {0x022280, 12}, + {0x022408, 6}, + {0x022444, 1}, + {0x022454, 3}, + {0x022504, 1}, + {0x02250c, 4}, + {0x022624, 1}, + {0x02262c, 3}, + {0x02263c, 1}, + {0x022804, 1}, + {0x02280c, 4}, + {0x022904, 4}, + {0x022924, 4}, + {0x024000, 36}, + {0x0240c0, 21}, + {0x024120, 11}, + {0x024200, 5}, + {0x024220, 1}, + {0x024230, 8}, + {0x024258, 1}, + {0x024260, 1}, + {0x024270, 9}, + {0x0242a0, 1}, + {0x0242b0, 4}, + {0x0242c8, 2}, + {0x024300, 5}, + {0x024318, 2}, + {0x02439c, 25}, + {0x024424, 4}, + {0x024464, 13}, + {0x0244a4, 1}, + {0x0244ac, 3}, + {0x0244c0, 2}, + {0x0244d0, 3}, + {0x0244e0, 3}, + {0x0244f0, 3}, + {0x024500, 3}, + {0x024510, 3}, + {0x024520, 3}, + {0x024530, 3}, + {0x024884, 11}, + {0x0248b4, 3}, + {0x0248c4, 1}, + {0x0248cc, 1}, + {0x0248d4, 1}, + {0x0248dc, 1}, + {0x0248f0, 2}, + {0x024908, 6}, + {0x024928, 6}, + {0x024968, 6}, + {0x024984, 3}, + {0x024994, 1}, + {0x02499c, 6}, + {0x0249b8, 7}, + {0x024a08, 6}, + {0x024a28, 6}, + {0x024a68, 6}, + {0x024a84, 1}, + {0x024a8c, 1}, + {0x024a94, 1}, + {0x024a9c, 13}, + {0x024ae0, 6}, + {0x024b00, 7}, + {0x024b20, 6}, + {0x024b40, 8}, + {0x024c00, 2}, + {0x024c24, 3}, + {0x024c34, 3}, + {0x025004, 6}, + {0x025800, 37}, + {0x025904, 1}, + {0x02590c, 1}, + {0x026000, 99}, + {0x026200, 1}, + {0x026800, 7}, + {0x026824, 6}, + {0x026840, 2}, + {0x026864, 1}, + {0x02686c, 1}, + {0x026874, 3}, + {0x026884, 1}, + {0x0268a4, 7}, + {0x026904, 1}, + {0x02690c, 4}, + {0x026940, 1}, + {0x026980, 33}, + {0x026a0c, 7}, + {0x026a30, 1}, + {0x026a44, 4}, + {0x026a60, 1}, + {0x026a70, 1}, + {0x026b00, 9}, + {0x026b44, 2}, + {0x026b68, 6}, + {0x026b84, 2}, + {0x026ba8, 14}, + {0x026c00, 16}, + {0x026c44, 1}, + {0x026c4c, 1}, + {0x026c84, 1}, + {0x026c8c, 4}, + {0x026cc4, 1}, + {0x026ccc, 4}, + {0x026d00, 2}, + {0x028800, 2}, + {0x028844, 1}, + {0x02884c, 4}, + {0x029004, 7}, + {0x029b30, 2}, + {0x029b50, 4}, + {0x02a004, 1}, + {0x02a00c, 4}, + {0x02a040, 6}, + {0x02a200, 1}, + {0x02a210, 11}, + {0x02a240, 8}, + {0x02a484, 1}, + {0x02a4c0, 16}, + {0x02a780, 1}, + {0x02a7a0, 4}, + {0x02a7c0, 1}, + {0x02a900, 1}, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Mar 8 15:28:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39811F3B7AE; Thu, 8 Mar 2018 15:28:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E06817F870; Thu, 8 Mar 2018 15:28:13 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB6C712850; Thu, 8 Mar 2018 15:28:13 +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 w28FSDj9001079; Thu, 8 Mar 2018 15:28:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28FSD4M001078; Thu, 8 Mar 2018 15:28:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081528.w28FSD4M001078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 15:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330654 - head/usr.sbin/mlx5tool X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/mlx5tool X-SVN-Commit-Revision: 330654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 15:28:14 -0000 Author: hselasky Date: Thu Mar 8 15:28:13 2018 New Revision: 330654 URL: https://svnweb.freebsd.org/changeset/base/330654 Log: Check that the address is specified in mlx5tool(8). Submitted by: kib@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/mlx5tool/mlx5tool.c Modified: head/usr.sbin/mlx5tool/mlx5tool.c ============================================================================== --- head/usr.sbin/mlx5tool/mlx5tool.c Thu Mar 8 15:21:56 2018 (r330653) +++ head/usr.sbin/mlx5tool/mlx5tool.c Thu Mar 8 15:28:13 2018 (r330654) @@ -47,6 +47,10 @@ parse_pci_addr(const char *addrstr, struct mlx5_fwdump unsigned long selarr[4]; int i; + if (addrstr == NULL) { + warnx("no pci address specified"); + return (1); + } if (strncmp(addrstr, "pci", 3) == 0) { addrstr += 3; i = 0; From owner-svn-src-all@freebsd.org Thu Mar 8 15:37:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3B72F3C4ED; Thu, 8 Mar 2018 15:37:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F9848005D; Thu, 8 Mar 2018 15:37: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A5A3129F1; Thu, 8 Mar 2018 15:37: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 w28FbAhs005816; Thu, 8 Mar 2018 15:37:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28FbAxk005815; Thu, 8 Mar 2018 15:37:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081537.w28FbAxk005815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 15:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330655 - head/sys/dev/mlx5 X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5 X-SVN-Commit-Revision: 330655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 15:37:10 -0000 Author: hselasky Date: Thu Mar 8 15:37:09 2018 New Revision: 330655 URL: https://svnweb.freebsd.org/changeset/base/330655 Log: Remove duplicate prototypes. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/cmd.h Modified: head/sys/dev/mlx5/cmd.h ============================================================================== --- head/sys/dev/mlx5/cmd.h Thu Mar 8 15:28:13 2018 (r330654) +++ head/sys/dev/mlx5/cmd.h Thu Mar 8 15:37:09 2018 (r330655) @@ -50,11 +50,4 @@ int mlx5_cmd_query_cong_params(struct mlx5_core_dev *d void *out, int out_size); int mlx5_cmd_modify_cong_params(struct mlx5_core_dev *mdev, void *in, int in_size); -struct mlx5_core_dev; -int mlx5_cmd_query_cong_counter(struct mlx5_core_dev *dev, - bool reset, void *out, int out_size); -int mlx5_cmd_query_cong_params(struct mlx5_core_dev *dev, int cong_point, - void *out, int out_size); -int mlx5_cmd_modify_cong_params(struct mlx5_core_dev *mdev, - void *in, int in_size); #endif /* MLX5_CMD_H */ From owner-svn-src-all@freebsd.org Thu Mar 8 15:43:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA328F3D17F; Thu, 8 Mar 2018 15:43:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C391811C6; Thu, 8 Mar 2018 15:43:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 871D712BA1; Thu, 8 Mar 2018 15:43:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28FhfQe012152; Thu, 8 Mar 2018 15:43:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28FhfL3012151; Thu, 8 Mar 2018 15:43:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081543.w28FhfL3012151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 15:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330656 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 330656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 15:43:42 -0000 Author: hselasky Date: Thu Mar 8 15:43:41 2018 New Revision: 330656 URL: https://svnweb.freebsd.org/changeset/base/330656 Log: Use the device unit number for naming the ifnet interface in mlx5en(4). Currently the ifnet interface is named mceX, where X is a monotonically incremented value. If the device is reset due to a fatal error, then the interface name will change. Using the device unit number will keep the naming consistent across the reset logic. Submitted by: Matthew Finlay 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 Thu Mar 8 15:37:09 2018 (r330655) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Mar 8 15:43:41 2018 (r330656) @@ -3442,7 +3442,6 @@ mlx5e_setup_pauseframes(struct mlx5e_priv *priv) static void * mlx5e_create_ifp(struct mlx5_core_dev *mdev) { - static volatile int mlx5_en_unit; struct ifnet *ifp; struct mlx5e_priv *priv; u8 dev_addr[ETHER_ADDR_LEN] __aligned(4); @@ -3466,7 +3465,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) goto err_free_priv; } ifp->if_softc = priv; - if_initname(ifp, "mce", atomic_fetchadd_int(&mlx5_en_unit, 1)); + if_initname(ifp, "mce", device_get_unit(mdev->pdev->dev.bsddev)); ifp->if_mtu = ETHERMTU; ifp->if_init = mlx5e_open; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; From owner-svn-src-all@freebsd.org Thu Mar 8 15:47:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6EB6F3D558; Thu, 8 Mar 2018 15:47:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9661E813D9; Thu, 8 Mar 2018 15:47:18 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7168E12BA3; Thu, 8 Mar 2018 15:47:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28FlI7Q012380; Thu, 8 Mar 2018 15:47:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28FlIFT012379; Thu, 8 Mar 2018 15:47:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081547.w28FlIFT012379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 15:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330657 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 330657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 15:47:19 -0000 Author: hselasky Date: Thu Mar 8 15:47:17 2018 New Revision: 330657 URL: https://svnweb.freebsd.org/changeset/base/330657 Log: Use vport rather than physical-port MTU in mlx5en(4). Set and report vport MTU rather than physical MTU, The driver will set both vport and physical port mtu and will rely on the query of vport mtu. SRIOV VFs have to report their MTU to their vport manager (PF), and this will allow them to work with any MTU they need without failing the request. Also for some cases where the PF is not a port owner, PF can work with MTU less than the physical port mtu if set physical port mtu didn't take effect. Based on Linux upstream commit: cd255efff9baadd654d6160e52d17ae7c568c9d3 Submitted by: Meny Yossefi 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 Thu Mar 8 15:43:41 2018 (r330656) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Mar 8 15:47:17 2018 (r330657) @@ -2442,15 +2442,29 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp, int sw_mtu) int hw_mtu; int err; - err = mlx5_set_port_mtu(mdev, MLX5E_SW2HW_MTU(sw_mtu)); + hw_mtu = MLX5E_SW2HW_MTU(sw_mtu); + + err = mlx5_set_port_mtu(mdev, hw_mtu); if (err) { if_printf(ifp, "%s: mlx5_set_port_mtu failed setting %d, err=%d\n", __func__, sw_mtu, err); return (err); } + /* Update vport context MTU */ + err = mlx5_set_vport_mtu(mdev, hw_mtu); + if (err) { + if_printf(ifp, "%s: Failed updating vport context with MTU size, err=%d\n", + __func__, err); + } + ifp->if_mtu = sw_mtu; - err = mlx5_query_port_oper_mtu(mdev, &hw_mtu); + + err = mlx5_query_vport_mtu(mdev, &hw_mtu); + if (err || !hw_mtu) { + /* fallback to port oper mtu */ + err = mlx5_query_port_oper_mtu(mdev, &hw_mtu); + } if (err) { if_printf(ifp, "Query port MTU, after setting new " "MTU value, failed\n"); From owner-svn-src-all@freebsd.org Thu Mar 8 15:53:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55D59F3DEF6; Thu, 8 Mar 2018 15:53:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 042FC81A85; Thu, 8 Mar 2018 15:53:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D957012D2A; Thu, 8 Mar 2018 15:53:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28Fr49R017273; Thu, 8 Mar 2018 15:53:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28Fr418017272; Thu, 8 Mar 2018 15:53:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081553.w28Fr418017272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 15:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330658 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 330658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 15:53:05 -0000 Author: hselasky Date: Thu Mar 8 15:53:04 2018 New Revision: 330658 URL: https://svnweb.freebsd.org/changeset/base/330658 Log: Fix mlx5en(4) driver to properly call m_defrag(). When the mlx5en(4) driver was converted to using BUSDMA(9) the call to m_defrag() was moved after the part of the TX routine that strips the header from the mbuf chain. Before it called m_defrag it first trimmed off the now-empty mbufs from the start of the chain. This has the side effect of also removing the head of the chain that has M_PKTHDR set. m_defrag() will not defrag a chain that does not have M_PKTHDR set, thus it was effectively never defragging the mbuf chains. As it turns out, trimming the mbufs in this fashion is unnecessary since the call to bus_dmamap_load_mbuf_sg doesn't map empty mbufs anyway, so remove it. Differential Revision: https://reviews.freebsd.org/D12050 Submitted by: mjoras@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Mar 8 15:47:17 2018 (r330657) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Mar 8 15:53:04 2018 (r330658) @@ -311,22 +311,9 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) } dseg = ((struct mlx5_wqe_data_seg *)&wqe->ctrl) + ds_cnt; - /* Trim off empty mbufs */ - while (mb->m_len == 0) { - mb = m_free(mb); - /* Check if all data has been inlined */ - if (mb == NULL) - goto skip_dma; - } - err = bus_dmamap_load_mbuf_sg(sq->dma_tag, sq->mbuf[pi].dma_map, mb, segs, &nsegs, BUS_DMA_NOWAIT); if (err == EFBIG) { - /* - * Update *mbp before defrag in case it was trimmed in the - * loop above - */ - *mbp = mb; /* Update statistics */ sq->stats.defragged++; /* Too many mbuf fragments */ @@ -343,6 +330,17 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) if (err != 0) goto tx_drop; + /* Make sure all mbuf data, if any, is written to RAM */ + if (nsegs != 0) { + bus_dmamap_sync(sq->dma_tag, sq->mbuf[pi].dma_map, + BUS_DMASYNC_PREWRITE); + } else { + /* All data was inlined, free the mbuf. */ + bus_dmamap_unload(sq->dma_tag, sq->mbuf[pi].dma_map); + m_freem(mb); + mb = NULL; + } + for (x = 0; x != nsegs; x++) { if (segs[x].ds_len == 0) continue; @@ -351,7 +349,7 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp) dseg->byte_count = cpu_to_be32((uint32_t)segs[x].ds_len); dseg++; } -skip_dma: + ds_cnt = (dseg - ((struct mlx5_wqe_data_seg *)&wqe->ctrl)); wqe->ctrl.opmod_idx_opcode = cpu_to_be32((sq->pc << 8) | opcode); @@ -368,10 +366,6 @@ skip_dma: sq->mbuf[pi].mbuf = mb; sq->mbuf[pi].num_wqebbs = DIV_ROUND_UP(ds_cnt, MLX5_SEND_WQEBB_NUM_DS); sq->pc += sq->mbuf[pi].num_wqebbs; - - /* Make sure all mbuf data is written to RAM */ - if (mb != NULL) - bus_dmamap_sync(sq->dma_tag, sq->mbuf[pi].dma_map, BUS_DMASYNC_PREWRITE); sq->stats.packets++; *mbp = NULL; /* safety clear */ From owner-svn-src-all@freebsd.org Thu Mar 8 15:58:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33697F3E5A5; Thu, 8 Mar 2018 15:58:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9A5981D78; Thu, 8 Mar 2018 15:58:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D495912D34; Thu, 8 Mar 2018 15:58:30 +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 w28FwUY4017513; Thu, 8 Mar 2018 15:58:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28FwUw9017510; Thu, 8 Mar 2018 15:58:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081558.w28FwUw9017510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 15:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330659 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 330659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 15:58:31 -0000 Author: hselasky Date: Thu Mar 8 15:58:30 2018 New Revision: 330659 URL: https://svnweb.freebsd.org/changeset/base/330659 Log: Avoid more LFENCE/SFENCe on x86 in mlx5en(4), by using the FreeBSD native fences. Submitted by: kib@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c head/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Mar 8 15:53:04 2018 (r330658) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Mar 8 15:58:30 2018 (r330659) @@ -1361,7 +1361,7 @@ mlx5e_sq_send_nops_locked(struct mlx5e_sq *sq, int can } /* send a single NOP */ mlx5e_send_nop(sq, 1); - wmb(); + atomic_thread_fence_rel(); } done: /* Check if we need to write the doorbell */ Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Mar 8 15:53:04 2018 (r330658) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Thu Mar 8 15:58:30 2018 (r330659) @@ -429,7 +429,7 @@ mlx5e_poll_tx_cq(struct mlx5e_sq *sq, int budget) mlx5_cqwq_update_db_record(&sq->cq.wq); /* Ensure cq space is freed before enabling more cqes */ - wmb(); + atomic_thread_fence_rel(); sq->cc = sqcc; Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Thu Mar 8 15:53:04 2018 (r330658) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Thu Mar 8 15:58:30 2018 (r330659) @@ -38,7 +38,7 @@ mlx5e_get_cqe(struct mlx5e_cq *cq) return (NULL); /* ensure cqe content is read after cqe ownership bit */ - rmb(); + atomic_thread_fence_acq(); return (cqe); } From owner-svn-src-all@freebsd.org Thu Mar 8 16:19:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A562F404CE; Thu, 8 Mar 2018 16:19:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3EED830EF; Thu, 8 Mar 2018 16:19:01 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AED07130A6; Thu, 8 Mar 2018 16:19:01 +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 w28GJ1Z4027395; Thu, 8 Mar 2018 16:19:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28GJ1Bh027391; Thu, 8 Mar 2018 16:19:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081619.w28GJ1Bh027391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 16:19:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330660 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 330660 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 16:19:02 -0000 Author: hselasky Date: Thu Mar 8 16:19:01 2018 New Revision: 330660 URL: https://svnweb.freebsd.org/changeset/base/330660 Log: Add call to setup firmware data dump structure during device load in mlx5core. Do not consider the inability to create a firmware dump fatal, but inform about the situation and allow the driver to attach. The device might not implement the needed VSC, or we might not know the layout of the registers map. In either case, only firmware dump functionality is limited, the network operations should be fine. Submitted by: kib@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c head/sys/dev/mlx5/mlx5_core/mlx5_main.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 15:58:30 2018 (r330659) +++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 16:19:01 2018 (r330660) @@ -82,7 +82,7 @@ int mlx5_rename_eq(struct mlx5_core_dev *dev, int eq_i int mlx5_fwdump_init(void); void mlx5_fwdump_fini(void); -int mlx5_fwdump_prep(struct mlx5_core_dev *mdev); +void mlx5_fwdump_prep(struct mlx5_core_dev *mdev); void mlx5_fwdump(struct mlx5_core_dev *mdev); void mlx5_fwdump_clean(struct mlx5_core_dev *mdev); Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c Thu Mar 8 15:58:30 2018 (r330659) +++ head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c Thu Mar 8 16:19:01 2018 (r330660) @@ -69,15 +69,19 @@ mlx5_fwdump_destroy_dd(struct mlx5_dump_data *dd) free(dd, M_MLX5_DUMP); } -int +void mlx5_fwdump_prep(struct mlx5_core_dev *mdev) { struct mlx5_dump_data *dd; int error; error = mlx5_vsc_find_cap(mdev); - if (error != 0) - return (error); + if (error != 0) { + /* Inability to create a firmware dump is not fatal. */ + device_printf((&mdev->pdev->dev)->bsddev, "WARN: " + "mlx5_fwdump_prep failed %d\n", error); + return; + } dd = malloc(sizeof(struct mlx5_dump_data), M_MLX5_DUMP, M_WAITOK); switch (pci_get_device(mdev->pdev->dev.bsddev)) { case 0x1013: @@ -92,7 +96,7 @@ mlx5_fwdump_prep(struct mlx5_core_dev *mdev) break; default: free(dd, M_MLX5_DUMP); - return (0); /* silently fail to not prevent driver attach */ + return; /* silently fail, do not prevent driver attach */ } dd->dump_size = mlx5_fwdump_getsize(dd->rege); dd->dump = malloc(dd->dump_size * sizeof(uint32_t), M_MLX5_DUMP, @@ -102,7 +106,6 @@ mlx5_fwdump_prep(struct mlx5_core_dev *mdev) if (atomic_cmpset_rel_ptr((uintptr_t *)&mdev->dump_data, 0, (uintptr_t)dd) == 0) mlx5_fwdump_destroy_dd(dd); - return (0); } void Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu Mar 8 15:58:30 2018 (r330659) +++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu Mar 8 16:19:01 2018 (r330660) @@ -1022,6 +1022,8 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, st goto err_reg_dev; } + mlx5_fwdump_prep(dev); + clear_bit(MLX5_INTERFACE_STATE_DOWN, &dev->intf_state); set_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state); From owner-svn-src-all@freebsd.org Thu Mar 8 16:26:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA9D1F411B9; Thu, 8 Mar 2018 16:26:49 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D04183ACC; Thu, 8 Mar 2018 16:26:49 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76C7313244; Thu, 8 Mar 2018 16:26:49 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28GQn6u032262; Thu, 8 Mar 2018 16:26:49 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28GQnFw032261; Thu, 8 Mar 2018 16:26:49 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803081626.w28GQnFw032261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Thu, 8 Mar 2018 16:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330661 - stable/11/usr.sbin/syslogd X-SVN-Group: stable-11 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/11/usr.sbin/syslogd X-SVN-Commit-Revision: 330661 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 16:26:50 -0000 Author: dab Date: Thu Mar 8 16:26:49 2018 New Revision: 330661 URL: https://svnweb.freebsd.org/changeset/base/330661 Log: MFC r330034 Fix a memory leak in syslogd A memory leak in syslogd for processing of forward actions was reported. This modification adapts the patch submitted with that bug to fix the leak. PR: 198385 Submitted by: Sreeram Reported by: Sreeram Sponsored by: Dell EMC Modified: stable/11/usr.sbin/syslogd/syslogd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/11/usr.sbin/syslogd/syslogd.c Thu Mar 8 16:19:01 2018 (r330660) +++ stable/11/usr.sbin/syslogd/syslogd.c Thu Mar 8 16:26:49 2018 (r330661) @@ -170,7 +170,7 @@ STAILQ_HEAD(, funix) funixes = { &funix_default, * This structure represents the files that will have log * copies printed. * We require f_file to be valid if f_type is F_FILE, F_CONSOLE, F_TTY - * or if f_type if F_PIPE and f_pid > 0. + * or if f_type is F_PIPE and f_pid > 0. */ struct filed { @@ -363,10 +363,16 @@ close_filed(struct filed *f) return; switch (f->f_type) { + case F_FORW: + if (f->f_un.f_forw.f_addr) { + freeaddrinfo(f->f_un.f_forw.f_addr); + f->f_un.f_forw.f_addr = NULL; + } + /*FALLTHROUGH*/ + case F_FILE: case F_TTY: case F_CONSOLE: - case F_FORW: f->f_type = F_UNUSED; break; case F_PIPE: From owner-svn-src-all@freebsd.org Thu Mar 8 16:27:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87354F412DB; Thu, 8 Mar 2018 16:27:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C2DB83C4D; Thu, 8 Mar 2018 16:27:32 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D14C13246; Thu, 8 Mar 2018 16:27:32 +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 w28GRVs1032341; Thu, 8 Mar 2018 16:27:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28GRVuN032340; Thu, 8 Mar 2018 16:27:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803081627.w28GRVuN032340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Mar 2018 16:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330662 - head/sys/dev/mlx5/mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_ib X-SVN-Commit-Revision: 330662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 16:27:32 -0000 Author: hselasky Date: Thu Mar 8 16:27:31 2018 New Revision: 330662 URL: https://svnweb.freebsd.org/changeset/base/330662 Log: Set correct SL in completion for RoCE in mlx5ib(4). There is a difference when parsing a completion entry between Ethernet and IB ports. When link layer is Ethernet the bits describe the type of L3 header in the packet. In the case when link layer is Ethernet and VLAN header is present the value of SL is equal to the 3 UP bits in the VLAN header. If VLAN header is not present then the SL is undefined and consumer of the completion should check if IB_WC_WITH_VLAN is set. While that, this patch also fills the vlan_id field in the completion if present. linux commit 12f8fedef2ec94c783f929126b20440a01512c14 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Thu Mar 8 16:26:49 2018 (r330661) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_cq.c Thu Mar 8 16:27:31 2018 (r330662) @@ -167,6 +167,8 @@ static void handle_responder(struct ib_wc *wc, struct struct mlx5_ib_srq *srq; struct mlx5_ib_wq *wq; u16 wqe_ctr; + u8 roce_packet_type; + bool vlan_present; u8 g; if (qp->ibqp.srq || qp->ibqp.xrcd) { @@ -218,7 +220,6 @@ static void handle_responder(struct ib_wc *wc, struct break; } wc->slid = be16_to_cpu(cqe->slid); - wc->sl = (be32_to_cpu(cqe->flags_rqpn) >> 24) & 0xf; wc->src_qp = be32_to_cpu(cqe->flags_rqpn) & 0xffffff; wc->dlid_path_bits = cqe->ml_path; g = (be32_to_cpu(cqe->flags_rqpn) >> 28) & 3; @@ -232,10 +233,22 @@ static void handle_responder(struct ib_wc *wc, struct wc->pkey_index = 0; } - if (ll != IB_LINK_LAYER_ETHERNET) + if (ll != IB_LINK_LAYER_ETHERNET) { + wc->sl = (be32_to_cpu(cqe->flags_rqpn) >> 24) & 0xf; return; + } - switch (wc->sl & 0x3) { + vlan_present = cqe_has_vlan(cqe); + roce_packet_type = (be32_to_cpu(cqe->flags_rqpn) >> 24) & 0x3; + if (vlan_present) { + wc->vlan_id = (be16_to_cpu(cqe->vlan_info)) & 0xfff; + wc->sl = (be16_to_cpu(cqe->vlan_info) >> 13) & 0x7; + wc->wc_flags |= IB_WC_WITH_VLAN; + } else { + wc->sl = 0; + } + + switch (roce_packet_type) { case MLX5_CQE_ROCE_L3_HEADER_TYPE_GRH: wc->network_hdr_type = RDMA_NETWORK_IB; break; From owner-svn-src-all@freebsd.org Thu Mar 8 17:04:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07AEDF443CE; Thu, 8 Mar 2018 17:04:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1E5C85E7D; Thu, 8 Mar 2018 17:04:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8A01139FD; Thu, 8 Mar 2018 17:04:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28H4a83052057; Thu, 8 Mar 2018 17:04:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28H4aQx052056; Thu, 8 Mar 2018 17:04:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803081704.w28H4aQx052056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 8 Mar 2018 17:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330663 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 17:04:37 -0000 Author: markj Date: Thu Mar 8 17:04:36 2018 New Revision: 330663 URL: https://svnweb.freebsd.org/changeset/base/330663 Log: Return E2BIG if we run out of space writing a compressed kernel dump. ENOSPC causes the MD kernel dump code to retry the dump, but this is undesirable in the case where we legitimately ran out of space. Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Thu Mar 8 16:27:31 2018 (r330662) +++ head/sys/kern/kern_shutdown.c Thu Mar 8 17:04:36 2018 (r330663) @@ -1115,6 +1115,12 @@ dump_check_bounds(struct dumperinfo *di, off_t offset, if (length != 0 && (offset < di->mediaoffset || offset - di->mediaoffset + length > di->mediasize)) { + if (di->kdcomp != NULL && offset >= di->mediaoffset) { + printf( + "Compressed dump failed to fit in device boundaries.\n"); + return (E2BIG); + } + printf("Attempt to write outside dump device boundaries.\n" "offset(%jd), mediaoffset(%jd), length(%ju), mediasize(%jd).\n", (intmax_t)offset, (intmax_t)di->mediaoffset, From owner-svn-src-all@freebsd.org Thu Mar 8 17:14:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFB71F44F2A; Thu, 8 Mar 2018 17:14:16 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 607D586624; Thu, 8 Mar 2018 17:14:16 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B4DA13C03; Thu, 8 Mar 2018 17:14:16 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28HEG0c057136; Thu, 8 Mar 2018 17:14:16 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28HEGXS057135; Thu, 8 Mar 2018 17:14:16 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803081714.w28HEGXS057135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Thu, 8 Mar 2018 17:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330664 - stable/10/usr.sbin/syslogd X-SVN-Group: stable-10 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/10/usr.sbin/syslogd X-SVN-Commit-Revision: 330664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 17:14:16 -0000 Author: dab Date: Thu Mar 8 17:14:16 2018 New Revision: 330664 URL: https://svnweb.freebsd.org/changeset/base/330664 Log: MFC r330034 Fix a memory leak in syslogd A memory leak in syslogd for processing of forward actions was reported. This modification adapts the patch submitted with that bug to fix the leak. PR: 198385 Submitted by: Sreeram Reported by: Sreeram Sponsored by: Dell EMC Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Thu Mar 8 17:04:36 2018 (r330663) +++ stable/10/usr.sbin/syslogd/syslogd.c Thu Mar 8 17:14:16 2018 (r330664) @@ -161,7 +161,7 @@ STAILQ_HEAD(, funix) funixes = { &funix_default, * This structure represents the files that will have log * copies printed. * We require f_file to be valid if f_type is F_FILE, F_CONSOLE, F_TTY - * or if f_type if F_PIPE and f_pid > 0. + * or if f_type is F_PIPE and f_pid > 0. */ struct filed { @@ -353,10 +353,16 @@ close_filed(struct filed *f) return; switch (f->f_type) { + case F_FORW: + if (f->f_un.f_forw.f_addr) { + freeaddrinfo(f->f_un.f_forw.f_addr); + f->f_un.f_forw.f_addr = NULL; + } + /*FALLTHROUGH*/ + case F_FILE: case F_TTY: case F_CONSOLE: - case F_FORW: f->f_type = F_UNUSED; break; case F_PIPE: From owner-svn-src-all@freebsd.org Thu Mar 8 17:23:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F731F45A6D; Thu, 8 Mar 2018 17:23:19 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 258AC86E77; Thu, 8 Mar 2018 17:23:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2078F13E02; Thu, 8 Mar 2018 17:23:19 +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 w28HNJGx062181; Thu, 8 Mar 2018 17:23:19 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28HNJYP062180; Thu, 8 Mar 2018 17:23:19 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803081723.w28HNJYP062180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 8 Mar 2018 17:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330665 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 330665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 17:23:19 -0000 Author: cem Date: Thu Mar 8 17:23:18 2018 New Revision: 330665 URL: https://svnweb.freebsd.org/changeset/base/330665 Log: ipfw(8): Fix endianness for Legacy and Ipv4 table hostname values The lookup_host() helper subroutine emits a struct in_addr value in network byte order via caller passed pointer. However, the table value is expected to be stored in host byte order. On little-endian machines, this produced a reversed endian table value for Legacy or IPv4 table types when the value was a hostname (instead of a plain IP address). Fix by using ntohl() on the output 32-bit address. While here, avoid some aliasing violations by storing the lookup_host() output in an intermediate object of the correct type. PR: 226429 Reported by: bugs.freebsd.org AT mx.zzux.com (also: Tested by) Security: ipfw hostname table rules could potentially not act as admin intended Sponsored by: Dell EMC Isilon Modified: head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/tables.c ============================================================================== --- head/sbin/ipfw/tables.c Thu Mar 8 17:14:16 2018 (r330664) +++ head/sbin/ipfw/tables.c Thu Mar 8 17:23:18 2018 (r330665) @@ -1471,6 +1471,7 @@ tentry_fill_value(ipfw_obj_header *oh, ipfw_obj_tentry uint32_t i; int dval; char *comma, *e, *etype, *n, *p; + struct in_addr ipaddr; v = &tent->v.value; @@ -1487,8 +1488,8 @@ tentry_fill_value(ipfw_obj_header *oh, ipfw_obj_tentry return; } /* Try hostname */ - if (lookup_host(arg, (struct in_addr *)&val) == 0) { - set_legacy_value(val, v); + if (lookup_host(arg, &ipaddr) == 0) { + set_legacy_value(ntohl(ipaddr.s_addr), v); return; } errx(EX_OSERR, "Unable to parse value %s", arg); @@ -1557,8 +1558,10 @@ tentry_fill_value(ipfw_obj_header *oh, ipfw_obj_tentry v->nh4 = ntohl(a4); break; } - if (lookup_host(n, (struct in_addr *)&v->nh4) == 0) + if (lookup_host(n, &ipaddr) == 0) { + v->nh4 = ntohl(ipaddr.s_addr); break; + } etype = "ipv4"; break; case IPFW_VTYPE_DSCP: From owner-svn-src-all@freebsd.org Thu Mar 8 18:42:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 472E4F4B1E3; Thu, 8 Mar 2018 18:42:24 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C09CA69ED4; Thu, 8 Mar 2018 18:42:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB73314AFE; Thu, 8 Mar 2018 18:42:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28IgNVQ001801; Thu, 8 Mar 2018 18:42:23 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28IgNHX001800; Thu, 8 Mar 2018 18:42:23 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803081842.w28IgNHX001800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 8 Mar 2018 18:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330666 - head/sys/dev/iwi X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/iwi X-SVN-Commit-Revision: 330666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 18:42:24 -0000 Author: avos Date: Thu Mar 8 18:42:23 2018 New Revision: 330666 URL: https://svnweb.freebsd.org/changeset/base/330666 Log: iwi(4): factor out rateset setup into iwi_set_rateset(). No functional change intended. Modified: head/sys/dev/iwi/if_iwi.c Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Thu Mar 8 17:23:18 2018 (r330665) +++ head/sys/dev/iwi/if_iwi.c Thu Mar 8 18:42:23 2018 (r330666) @@ -2550,11 +2550,36 @@ iwi_setwepkeys(struct iwi_softc *sc, struct ieee80211v } static int +iwi_set_rateset(struct iwi_softc *sc, const struct ieee80211_rateset *net_rs, + int mode, int type) +{ + struct iwi_rateset rs; + int i; + + memset(&rs, 0, sizeof(rs)); + rs.mode = mode; + rs.type = type; + rs.nrates = net_rs->rs_nrates; + if (rs.nrates > nitems(rs.rates)) { + DPRINTF(("Truncating negotiated rate set from %u\n", + rs.nrates)); + rs.nrates = nitems(rs.rates); + } + memcpy(rs.rates, net_rs->rs_rates, rs.nrates); + DPRINTF(("Setting .11%c%s %s rates (%u)\n", + mode == IWI_MODE_11A ? 'a' : 'b', + mode == IWI_MODE_11G ? "g" : "", + type == IWI_RATESET_TYPE_SUPPORTED ? "supported" : "negotiated", + rs.nrates)); + + return (iwi_cmd(sc, IWI_CMD_SET_RATES, &rs, sizeof(rs))); +} + +static int iwi_config(struct iwi_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; struct iwi_configuration config; - struct iwi_rateset rs; struct iwi_txpower power; uint32_t data; int error, i; @@ -2603,25 +2628,13 @@ iwi_config(struct iwi_softc *sc) return error; } - memset(&rs, 0, sizeof rs); - rs.mode = IWI_MODE_11G; - rs.type = IWI_RATESET_TYPE_SUPPORTED; - rs.nrates = ic->ic_sup_rates[IEEE80211_MODE_11G].rs_nrates; - memcpy(rs.rates, ic->ic_sup_rates[IEEE80211_MODE_11G].rs_rates, - rs.nrates); - DPRINTF(("Setting .11bg supported rates (%u)\n", rs.nrates)); - error = iwi_cmd(sc, IWI_CMD_SET_RATES, &rs, sizeof rs); + error = iwi_set_rateset(sc, &ic->ic_sup_rates[IEEE80211_MODE_11G], + IWI_MODE_11G, IWI_RATESET_TYPE_SUPPORTED); if (error != 0) return error; - memset(&rs, 0, sizeof rs); - rs.mode = IWI_MODE_11A; - rs.type = IWI_RATESET_TYPE_SUPPORTED; - rs.nrates = ic->ic_sup_rates[IEEE80211_MODE_11A].rs_nrates; - memcpy(rs.rates, ic->ic_sup_rates[IEEE80211_MODE_11A].rs_rates, - rs.nrates); - DPRINTF(("Setting .11a supported rates (%u)\n", rs.nrates)); - error = iwi_cmd(sc, IWI_CMD_SET_RATES, &rs, sizeof rs); + error = iwi_set_rateset(sc, &ic->ic_sup_rates[IEEE80211_MODE_11A], + IWI_MODE_11A, IWI_RATESET_TYPE_SUPPORTED); if (error != 0) return error; @@ -2815,7 +2828,6 @@ iwi_auth_and_assoc(struct iwi_softc *sc, struct ieee80 struct ieee80211_node *ni; struct iwi_configuration config; struct iwi_associate *assoc = &sc->assoc; - struct iwi_rateset rs; uint16_t capinfo; uint32_t data; int error, mode; @@ -2885,18 +2897,8 @@ iwi_auth_and_assoc(struct iwi_softc *sc, struct ieee80 goto done; /* the rate set has already been "negotiated" */ - memset(&rs, 0, sizeof rs); - rs.mode = mode; - rs.type = IWI_RATESET_TYPE_NEGOTIATED; - rs.nrates = ni->ni_rates.rs_nrates; - if (rs.nrates > IWI_RATESET_SIZE) { - DPRINTF(("Truncating negotiated rate set from %u\n", - rs.nrates)); - rs.nrates = IWI_RATESET_SIZE; - } - memcpy(rs.rates, ni->ni_rates.rs_rates, rs.nrates); - DPRINTF(("Setting negotiated rates (%u)\n", rs.nrates)); - error = iwi_cmd(sc, IWI_CMD_SET_RATES, &rs, sizeof rs); + error = iwi_set_rateset(sc, &ni->ni_rates, mode, + IWI_RATESET_TYPE_NEGOTIATED); if (error != 0) goto done; From owner-svn-src-all@freebsd.org Thu Mar 8 18:52:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1BC9F4BECE; Thu, 8 Mar 2018 18:52:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 644046A85B; Thu, 8 Mar 2018 18:52:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F14C14CC5; Thu, 8 Mar 2018 18:52:47 +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 w28IqlGW006941; Thu, 8 Mar 2018 18:52:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28Iqluj006940; Thu, 8 Mar 2018 18:52:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803081852.w28Iqluj006940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 8 Mar 2018 18:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330667 - head/sys/dev/asmc X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/asmc X-SVN-Commit-Revision: 330667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 18:52:47 -0000 Author: emaste Date: Thu Mar 8 18:52:47 2018 New Revision: 330667 URL: https://svnweb.freebsd.org/changeset/base/330667 Log: asmc: update temperature sensor name/description PR: 225911 Submitted by: Trev MFC after: 1 week Modified: head/sys/dev/asmc/asmcvar.h Modified: head/sys/dev/asmc/asmcvar.h ============================================================================== --- head/sys/dev/asmc/asmcvar.h Thu Mar 8 18:42:23 2018 (r330666) +++ head/sys/dev/asmc/asmcvar.h Thu Mar 8 18:52:47 2018 (r330667) @@ -311,7 +311,7 @@ struct asmc_softc { "cpu0_proximity", "hdd_bay", \ "northbridge_die", \ "northbridge_proximity", \ - "wireless_module", } + "wireless_proximity", } #define ASMC_MM31_TEMPDESCS { "CPU0 Die Core Temperature", \ "CPU0 Heatsink Temperature", \ @@ -319,7 +319,7 @@ struct asmc_softc { "HDD Bay Temperature", \ "Northbridge Die Core Temperature", \ "Northbridge Proximity Temperature", \ - "Wireless Module Temperature", } + "Wireless Module Proximity Temperature", } #define ASMC_MP_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ From owner-svn-src-all@freebsd.org Thu Mar 8 19:24:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62635F270D4; Thu, 8 Mar 2018 19:24:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 111AB6C1EB; Thu, 8 Mar 2018 19:24:11 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0ABDD151A8; Thu, 8 Mar 2018 19:24:11 +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 w28JOACc022100; Thu, 8 Mar 2018 19:24:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28JOArd022099; Thu, 8 Mar 2018 19:24:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803081924.w28JOArd022099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 8 Mar 2018 19:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330668 - head/sys/dev/bktr X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/bktr X-SVN-Commit-Revision: 330668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 19:24:11 -0000 Author: emaste Date: Thu Mar 8 19:24:10 2018 New Revision: 330668 URL: https://svnweb.freebsd.org/changeset/base/330668 Log: bktr: correct Japan IF frequency PR: 36451 Submitted by: Hijiri Umemoto MFC after: 2 weeks Modified: head/sys/dev/bktr/bktr_tuner.c Modified: head/sys/dev/bktr/bktr_tuner.c ============================================================================== --- head/sys/dev/bktr/bktr_tuner.c Thu Mar 8 18:52:47 2018 (r330667) +++ head/sys/dev/bktr/bktr_tuner.c Thu Mar 8 19:24:10 2018 (r330668) @@ -566,12 +566,10 @@ static int weurope[] = { * 8: 193.25MHz - 12: 217.25MHz (VHF) * 13: 471.25MHz - 62: 765.25MHz (UHF) * - * IF freq: 45.75 mHz - * OR * IF freq: 58.75 mHz */ #define OFFSET 6.00 -#define IF_FREQ 45.75 +#define IF_FREQ 58.75 static int jpnbcst[] = { 62, (int)(IF_FREQ * FREQFACTOR), 0, 13, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), @@ -593,10 +591,10 @@ static int jpnbcst[] = { * 22: 165.25MHz * 23: 223.25MHz - 63: 463.25MHz * - * IF freq: 45.75 mHz + * IF freq: 58.75 mHz */ #define OFFSET 6.00 -#define IF_FREQ 45.75 +#define IF_FREQ 58.75 static int jpncable[] = { 63, (int)(IF_FREQ * FREQFACTOR), 0, 23, (int)(223.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), From owner-svn-src-all@freebsd.org Thu Mar 8 21:33:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF08CF3275F; Thu, 8 Mar 2018 21:33:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD1071A45; Thu, 8 Mar 2018 21:33: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58C1C16615; Thu, 8 Mar 2018 21:33: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 w28LXrVM003554; Thu, 8 Mar 2018 21:33:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28LXrqu003551; Thu, 8 Mar 2018 21:33:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803082133.w28LXrqu003551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 8 Mar 2018 21:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330669 - stable/11/sys/dev/nvme X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/nvme X-SVN-Commit-Revision: 330669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 21:33:54 -0000 Author: mav Date: Thu Mar 8 21:33:52 2018 New Revision: 330669 URL: https://svnweb.freebsd.org/changeset/base/330669 Log: MFC r328521 (by imp): Use atomic load and stores to ensure that the compiler doesn't optimize away these loops. Change boolean to int to match what atomic API supplies. Remove wmb() since the atomic_store_rel() on status.done ensure the prior writes to status. It also fixes the fact that there wasn't a rmb() before reading done. This should also be more efficient since wmb() is fairly heavy weight. Modified: stable/11/sys/dev/nvme/nvme.c stable/11/sys/dev/nvme/nvme_ctrlr.c stable/11/sys/dev/nvme/nvme_private.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nvme/nvme.c ============================================================================== --- stable/11/sys/dev/nvme/nvme.c Thu Mar 8 19:24:10 2018 (r330668) +++ stable/11/sys/dev/nvme/nvme.c Thu Mar 8 21:33:52 2018 (r330669) @@ -467,6 +467,5 @@ nvme_completion_poll_cb(void *arg, const struct nvme_c * the request passed or failed. */ memcpy(&status->cpl, cpl, sizeof(*cpl)); - wmb(); - status->done = TRUE; + atomic_store_rel_int(&status->done, 1); } Modified: stable/11/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/11/sys/dev/nvme/nvme_ctrlr.c Thu Mar 8 19:24:10 2018 (r330668) +++ stable/11/sys/dev/nvme/nvme_ctrlr.c Thu Mar 8 21:33:52 2018 (r330669) @@ -402,10 +402,10 @@ nvme_ctrlr_identify(struct nvme_controller *ctrlr) { struct nvme_completion_poll_status status; - status.done = FALSE; + status.done = 0; nvme_ctrlr_cmd_identify_controller(ctrlr, &ctrlr->cdata, nvme_completion_poll_cb, &status); - while (status.done == FALSE) + while (!atomic_load_acq_int(&status.done)) pause("nvme", 1); if (nvme_completion_is_error(&status.cpl)) { nvme_printf(ctrlr, "nvme_identify_controller failed!\n"); @@ -429,10 +429,10 @@ nvme_ctrlr_set_num_qpairs(struct nvme_controller *ctrl struct nvme_completion_poll_status status; int cq_allocated, sq_allocated; - status.done = FALSE; + status.done = 0; nvme_ctrlr_cmd_set_num_queues(ctrlr, ctrlr->num_io_queues, nvme_completion_poll_cb, &status); - while (status.done == FALSE) + while (!atomic_load_acq_int(&status.done)) pause("nvme", 1); if (nvme_completion_is_error(&status.cpl)) { nvme_printf(ctrlr, "nvme_ctrlr_set_num_qpairs failed!\n"); @@ -468,20 +468,20 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr for (i = 0; i < ctrlr->num_io_queues; i++) { qpair = &ctrlr->ioq[i]; - status.done = FALSE; + status.done = 0; nvme_ctrlr_cmd_create_io_cq(ctrlr, qpair, qpair->vector, nvme_completion_poll_cb, &status); - while (status.done == FALSE) + while (!atomic_load_acq_int(&status.done)) pause("nvme", 1); if (nvme_completion_is_error(&status.cpl)) { nvme_printf(ctrlr, "nvme_create_io_cq failed!\n"); return (ENXIO); } - status.done = FALSE; + status.done = 0; nvme_ctrlr_cmd_create_io_sq(qpair->ctrlr, qpair, nvme_completion_poll_cb, &status); - while (status.done == FALSE) + while (!atomic_load_acq_int(&status.done)) pause("nvme", 1); if (nvme_completion_is_error(&status.cpl)) { nvme_printf(ctrlr, "nvme_create_io_sq failed!\n"); @@ -691,10 +691,10 @@ nvme_ctrlr_configure_aer(struct nvme_controller *ctrlr ctrlr->async_event_config.raw = 0xFF; ctrlr->async_event_config.bits.reserved = 0; - status.done = FALSE; + status.done = 0; nvme_ctrlr_cmd_get_feature(ctrlr, NVME_FEAT_TEMPERATURE_THRESHOLD, 0, NULL, 0, nvme_completion_poll_cb, &status); - while (status.done == FALSE) + while (!atomic_load_acq_int(&status.done)) pause("nvme", 1); if (nvme_completion_is_error(&status.cpl) || (status.cpl.cdw0 & 0xFFFF) == 0xFFFF || Modified: stable/11/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/11/sys/dev/nvme/nvme_private.h Thu Mar 8 19:24:10 2018 (r330668) +++ stable/11/sys/dev/nvme/nvme_private.h Thu Mar 8 21:33:52 2018 (r330669) @@ -126,7 +126,7 @@ extern int32_t nvme_retry_count; struct nvme_completion_poll_status { struct nvme_completion cpl; - boolean_t done; + int done; }; #define NVME_REQUEST_VADDR 1 From owner-svn-src-all@freebsd.org Thu Mar 8 21:58:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6ED8FF3433D; Thu, 8 Mar 2018 21:58:08 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03CDD726CE; Thu, 8 Mar 2018 21:58:08 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x242.google.com with SMTP id d71so1365604iog.4; Thu, 08 Mar 2018 13:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5/Os8dzUISeGSUBq1XXNGmthG1EKFRkIK08+pNMI8AE=; b=QDjwFiHVJadOD6DMANJPtPrPsvR+z1TmsN0Gxq3Kbab9h9jggCYlHOP2YOu1UuSmRb +LY1WuTwH/nJi4qIAPTPakbMPYXSJx3tXQ5O2/ugHr4g4GEdU8WBPULko9R8H5P73FLT lgnrZJtbk7ZlAUFhJ4xmqFQIgI2GdyeE/6Id1pLlrDQCFhvvCBUjhja3RbGcnph10Y5s 9419JcQRYXiIi9PV89RT4fFjOy2v7D394XMkRKDh6UAXezFcIvpETvvXIZOBIJoCLpgN Fhftr/nsTThZ8hlo6bJQ6WWQUxvsfxEVQLt/Qf0pNVz6s/4crtKfyNVFcY0EmgEvSOpt l5ZA== 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=5/Os8dzUISeGSUBq1XXNGmthG1EKFRkIK08+pNMI8AE=; b=g7KMujc0vLVuzurJ36bpWNBHIb7VNLfsK5EvGbIhJm90RH/AJDx16ul2Iy6kdLmpGY WrMB011OQou/1J2q3cbY1LnaWSswKsPa2ZY8eM2A4pJoKhYbHzI1f+5wWeN5lABb6GS7 U9X+h86R/CgJBBvyA20jK5/0cBynmpcKYtqBkYk+MjJnniQ6D6NugBPSScXJ5ZIsvKop qLwonbt3FX5W9oSbn5KVUJ1kJ8yV2G/jPmlXJ8yKkF8Pak92DEIlhphf2mCNVrJ5HIyu bO0Gsq2TP0et7upRSBSuPjeMJ+Z0fSyse+KMCXzKvQGjPCQ/ay+Q2+/+cG7zT/ku8SQ0 fT9Q== X-Gm-Message-State: APf1xPCcLuGDqelMflTVyc7U0Zf38I2b1kd2pi3ip9R1QHLiupycyR5G b1Ij708gHSabvh8fNcWMmJBOOS3dGtObZlXU2hOpBQ== X-Google-Smtp-Source: AG47ELuaw/mTNf6eq7qsNI5TYwjNrZQ13m8G0/IzJGb6+G4z5khMKHzVDFMxfEqULoGYUNKg1QZ8evI+5UXlKceCToQ= X-Received: by 10.107.141.12 with SMTP id p12mr33507713iod.288.1520546287267; Thu, 08 Mar 2018 13:58:07 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.163.13 with HTTP; Thu, 8 Mar 2018 13:57:46 -0800 (PST) In-Reply-To: <201801151837.w0FIb3R7098459@repo.freebsd.org> References: <201801151837.w0FIb3R7098459@repo.freebsd.org> From: Ed Maste Date: Thu, 8 Mar 2018 16:57:46 -0500 X-Google-Sender-Auth: L8_welenpRbhi9S5DhNUzdCgWkI Message-ID: Subject: Re: svn commit: r328011 - in head/sys/amd64/vmm: amd intel To: Tycho Nightingale Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 21:58:08 -0000 On 15 January 2018 at 13:37, Tycho Nightingale wrote: > Author: tychon > Date: Mon Jan 15 18:37:03 2018 > New Revision: 328011 > URL: https://svnweb.freebsd.org/changeset/base/328011 > > Log: > Provide some mitigation against CVE-2017-5715 by clearing registers > upon returning from the guest which aren't immediately clobbered by > the host. This eradicates any remaining guest contents limiting their > usefulness in an exploit gadget. Will you MFC this to stable/11? From owner-svn-src-all@freebsd.org Thu Mar 8 22:03:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4324F34C72; Thu, 8 Mar 2018 22:03:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 996AD72DDB; Thu, 8 Mar 2018 22:03:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9451516AE0; Thu, 8 Mar 2018 22:03:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28M3hXN018325; Thu, 8 Mar 2018 22:03:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28M3hnF018324; Thu, 8 Mar 2018 22:03:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201803082203.w28M3hnF018324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 8 Mar 2018 22:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330670 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 330670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 22:03:44 -0000 Author: kib Date: Thu Mar 8 22:03:43 2018 New Revision: 330670 URL: https://svnweb.freebsd.org/changeset/base/330670 Log: Make mlx5 compilable on ILP32 arches. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_health.c Thu Mar 8 21:33:52 2018 (r330669) +++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c Thu Mar 8 22:03:43 2018 (r330670) @@ -67,7 +67,7 @@ static void mlx5_trigger_cmd_completions(struct mlx5_c vector |= MLX5_TRIGGERED_CMD_COMP; spin_unlock_irqrestore(&dev->cmd.alloc_lock, flags); - mlx5_core_dbg(dev, "vector 0x%lx\n", vector); + mlx5_core_dbg(dev, "vector 0x%jx\n", (uintmax_t)vector); mlx5_cmd_comp_handler(dev, vector); return; From owner-svn-src-all@freebsd.org Thu Mar 8 22:04:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F9E1F34E10; Thu, 8 Mar 2018 22:04:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42DA172F74; Thu, 8 Mar 2018 22:04:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DE3416AE2; Thu, 8 Mar 2018 22:04:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28M4tEc018408; Thu, 8 Mar 2018 22:04:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28M4tjp018407; Thu, 8 Mar 2018 22:04:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201803082204.w28M4tjp018407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 8 Mar 2018 22:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330671 - head/sys/dev/iwi X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/iwi X-SVN-Commit-Revision: 330671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 22:04:55 -0000 Author: kib Date: Thu Mar 8 22:04:54 2018 New Revision: 330671 URL: https://svnweb.freebsd.org/changeset/base/330671 Log: Remove unused variable. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iwi/if_iwi.c Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Thu Mar 8 22:03:43 2018 (r330670) +++ head/sys/dev/iwi/if_iwi.c Thu Mar 8 22:04:54 2018 (r330671) @@ -2554,7 +2554,6 @@ iwi_set_rateset(struct iwi_softc *sc, const struct iee int mode, int type) { struct iwi_rateset rs; - int i; memset(&rs, 0, sizeof(rs)); rs.mode = mode; From owner-svn-src-all@freebsd.org Thu Mar 8 22:07:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7E2AF3529F for ; Thu, 8 Mar 2018 22:07:34 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::22d]) (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 4E21C7328F for ; Thu, 8 Mar 2018 22:07:34 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw0-x22d.google.com with SMTP id x197so480175ywg.11 for ; Thu, 08 Mar 2018 14:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/9VaNltj2HvVMvqQj2WbkPvqBKehowCLzVjbEMwiIoY=; b=lMKA25eWwNYSV7bbBJ+YpOKvS2qMHjvJLZ9BlI9YbyyShJ4Dk6bI5qERFStv/JnvcG PesMfns+pili+Go1mVCHjf84pHeH09V85SHvFjb2zIrSupFAiydB5zt00M5Y/BiFCoi8 z2tNj31YvCILThOZw9CX9Djjmyd1TUzWGOyWVXU9MjIIhwP7ouyIR7oQ3XO77u8892dz DeRV8HOoT/lf2nJP/Luyvs1Df7w/6VrgNYNbwfJxKoRva6xkzBVLhl3mG2AVYoa6YJFH AAWsAogitIiwLwt+49HOSnYWCFfgu9o9DHN10s0gkE8Py6Iok0V/HRbDnUpMbRJOJFXV Sbpw== 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=/9VaNltj2HvVMvqQj2WbkPvqBKehowCLzVjbEMwiIoY=; b=ma+Vi8slmPB+St5W9BTBTi819Gq4rA5KQ46PPHChwq/J2mfZoXBGEjqvg+Yo590UL4 j+rQSApUJ1v+xP6uoa58MBSkJ9/My5usCDrlmAX1nj51irUsrTei5MCpYhWTxBTnD/dI WJgCVt7Ij/Q4w595Ip37h+JPpmW8KUIVZEPzGu513cUlrFpVgKmfTtTYunrKpXkwCYfB Wegd+9OTjHSa27fdX0ESp+KCSJgCeWBeOPMtUmRczcA808fxc1l39FAkJ9f/KPOqswsM YNSs6OMwtOAij1uvHN7tbFUecPo9dzSERZfCneqWoZjF7MEggNF+GBtnwQzM2+tBXwQQ 99gw== X-Gm-Message-State: APf1xPCFyvGPheDBbRopx5JQra1zOdAGmdryLJSRYCeeDOUFpwdfE1xx fyvI6TywaGnhYgR8Y1T8SMFmNNXe3D43hLJ2BDs7eQ== X-Google-Smtp-Source: AG47ELsA0THcGEND0x6rMO2gT8vNgEEGr4j/olJbhqkFV4TJn0YlFL3Z51KWZpFFTMAg6NVOg1NdiJJXWG/TASJcCYw= X-Received: by 10.129.89.137 with SMTP id n131mr17856034ywb.41.1520546853728; Thu, 08 Mar 2018 14:07:33 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:5f41:0:0:0:0:0 with HTTP; Thu, 8 Mar 2018 14:07:33 -0800 (PST) In-Reply-To: <201607112125.u6BLPSfT084346@repo.freebsd.org> References: <201607112125.u6BLPSfT084346@repo.freebsd.org> From: Oliver Pinter Date: Thu, 8 Mar 2018 23:07:33 +0100 Message-ID: Subject: Re: svn commit: r302595 - in head/sys: kern net To: Nathan Whitehorn Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, emaste@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 22:07:35 -0000 On 7/11/16, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Mon Jul 11 21:25:28 2016 > New Revision: 302595 > URL: https://svnweb.freebsd.org/changeset/base/302595 > > Log: > Remove assumptions in MI code that the BSP is CPU 0. > > MFC after: 2 weeks Please MFC this commit to 11-STABLE, since without them, we encounter boot issues with enabled EARLY_AP_STARTUP. Thanks, Oliver > > Modified: > head/sys/kern/init_main.c > head/sys/net/netisr.c > > Modified: head/sys/kern/init_main.c > ============================================================================== > --- head/sys/kern/init_main.c Mon Jul 11 21:23:50 2016 (r302594) > +++ head/sys/kern/init_main.c Mon Jul 11 21:25:28 2016 (r302595) > @@ -495,7 +495,7 @@ proc0_init(void *dummy __unused) > td->td_lend_user_pri = PRI_MAX; > td->td_priority = PVM; > td->td_base_pri = PVM; > - td->td_oncpu = 0; > + td->td_oncpu = curcpu; > td->td_flags = TDF_INMEM; > td->td_pflags = TDP_KTHREAD; > td->td_cpuset = cpuset_thread0(); > > Modified: head/sys/net/netisr.c > ============================================================================== > --- head/sys/net/netisr.c Mon Jul 11 21:23:50 2016 (r302594) > +++ head/sys/net/netisr.c Mon Jul 11 21:25:28 2016 (r302595) > @@ -1273,8 +1273,6 @@ netisr_init(void *arg) > struct pcpu *pc; > #endif > > - KASSERT(curcpu == 0, ("%s: not on CPU 0", __func__)); > - > NETISR_LOCK_INIT(); > if (netisr_maxthreads == 0 || netisr_maxthreads < -1 ) > netisr_maxthreads = 1; /* default behavior */ > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Thu Mar 8 22:32:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75330F373AF; Thu, 8 Mar 2018 22:32:19 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC51274620; Thu, 8 Mar 2018 22:32:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B74EB16E80; Thu, 8 Mar 2018 22:32:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28MWIcF033217; Thu, 8 Mar 2018 22:32:18 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28MWItd033216; Thu, 8 Mar 2018 22:32:18 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803082232.w28MWItd033216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 8 Mar 2018 22:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330672 - head/cddl/usr.sbin/dwatch/libexec X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/cddl/usr.sbin/dwatch/libexec X-SVN-Commit-Revision: 330672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 22:32:19 -0000 Author: dteske Date: Thu Mar 8 22:32:18 2018 New Revision: 330672 URL: https://svnweb.freebsd.org/changeset/base/330672 Log: Fix display of wrong pid from dtrace_sched(4) Fix a comment while here. Sponsored by: Smule, Inc. Modified: head/cddl/usr.sbin/dwatch/libexec/sched Modified: head/cddl/usr.sbin/dwatch/libexec/sched ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/sched Thu Mar 8 22:04:54 2018 (r330671) +++ head/cddl/usr.sbin/dwatch/libexec/sched Thu Mar 8 22:32:18 2018 (r330672) @@ -66,7 +66,7 @@ sched:::enqueue /* probe ID $(( $ID + 2 )) */ sched:::change-pri, sched:::lend-pri /* probe ID $(( $ID + 3 )) */ {${TRACE:+ printf("<$(( $ID + 3 ))>");} - /* details = " -> arg2" */ + /* details = " -> " */ this->details = strjoin(lltostr(this->curprio), strjoin("->", lltostr((uint8_t)arg2))); } @@ -85,7 +85,7 @@ $PROBE /* probe ID $(( $ID + 5 )) */ /* details += " pid -- " */ this->details = strjoin(this->details, this->details == "" ? "" : " "); this->details = strjoin(this->details, strjoin( - strjoin("pid ", lltostr(this->pid_sched)), + strjoin("pid ", lltostr(this->pid)), strjoin(" -- ", this->args))); } EOF From owner-svn-src-all@freebsd.org Thu Mar 8 22:49:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D6FF38B6D; Thu, 8 Mar 2018 22:49:37 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3333275434; Thu, 8 Mar 2018 22:49:37 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 298AC1710D; Thu, 8 Mar 2018 22:49:37 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28MnaxB038725; Thu, 8 Mar 2018 22:49:36 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28Mnapr038723; Thu, 8 Mar 2018 22:49:36 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201803082249.w28Mnapr038723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 8 Mar 2018 22:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330673 - in head/sys: arm/nvidia dev/sdhci X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/nvidia dev/sdhci X-SVN-Commit-Revision: 330673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 22:49:37 -0000 Author: manu Date: Thu Mar 8 22:49:36 2018 New Revision: 330673 URL: https://svnweb.freebsd.org/changeset/base/330673 Log: Fix build when option MMCCAM is defined. Modified: head/sys/arm/nvidia/tegra_sdhci.c head/sys/dev/sdhci/sdhci_fdt.c Modified: head/sys/arm/nvidia/tegra_sdhci.c ============================================================================== --- head/sys/arm/nvidia/tegra_sdhci.c Thu Mar 8 22:32:18 2018 (r330672) +++ head/sys/arm/nvidia/tegra_sdhci.c Thu Mar 8 22:49:36 2018 (r330673) @@ -62,6 +62,8 @@ __FBSDID("$FreeBSD$"); #include "sdhci_if.h" +#include "opt_mmccam.h" + /* Tegra SDHOST controller vendor register definitions */ #define SDMMC_VENDOR_CLOCK_CNTRL 0x100 #define VENDOR_CLOCK_CNTRL_CLK_SHIFT 8 @@ -463,5 +465,7 @@ static DEFINE_CLASS_0(sdhci, tegra_sdhci_driver, tegra sizeof(struct tegra_sdhci_softc)); DRIVER_MODULE(sdhci_tegra, simplebus, tegra_sdhci_driver, tegra_sdhci_devclass, NULL, NULL); +#ifndef MMCCAM MODULE_DEPEND(sdhci_tegra, sdhci, 1, 1, 1); MMC_DECLARE_BRIDGE(sdhci); +#endif Modified: head/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- head/sys/dev/sdhci/sdhci_fdt.c Thu Mar 8 22:32:18 2018 (r330672) +++ head/sys/dev/sdhci/sdhci_fdt.c Thu Mar 8 22:49:36 2018 (r330673) @@ -59,6 +59,8 @@ __FBSDID("$FreeBSD$"); #include "mmcbr_if.h" #include "sdhci_if.h" +#include "opt_mmccam.h" + #define MAX_SLOTS 6 #define SDHCI_FDT_ARMADA38X 1 #define SDHCI_FDT_GENERIC 2 @@ -351,5 +353,7 @@ static devclass_t sdhci_fdt_devclass; DRIVER_MODULE(sdhci_fdt, simplebus, sdhci_fdt_driver, sdhci_fdt_devclass, NULL, NULL); +#ifndef MMCCAM MODULE_DEPEND(sdhci_fdt, sdhci, 1, 1, 1); MMC_DECLARE_BRIDGE(sdhci_fdt); +#endif From owner-svn-src-all@freebsd.org Thu Mar 8 22:54:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4983F391A1; Thu, 8 Mar 2018 22:54:50 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8ACB475AC3; Thu, 8 Mar 2018 22:54:50 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81CCB172AD; Thu, 8 Mar 2018 22:54:50 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28MsoZX043327; Thu, 8 Mar 2018 22:54:50 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28Msopg043326; Thu, 8 Mar 2018 22:54:50 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201803082254.w28Msopg043326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 8 Mar 2018 22:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330674 - head/sys/arm/conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/conf X-SVN-Commit-Revision: 330674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 22:54:51 -0000 Author: manu Date: Thu Mar 8 22:54:50 2018 New Revision: 330674 URL: https://svnweb.freebsd.org/changeset/base/330674 Log: arm: Add GENERIC-MMCCAM kernel config MMCCAM is the new mmc stack currently developped by kibab@, add a kernel configuration file that include GENERIC so it's easier to test for people. Added: head/sys/arm/conf/GENERIC-MMCCAM (contents, props changed) Added: head/sys/arm/conf/GENERIC-MMCCAM ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/GENERIC-MMCCAM Thu Mar 8 22:54:50 2018 (r330674) @@ -0,0 +1,22 @@ +# +# GEMERIC-MMCCAM +# +# Custom kernel for GENERIC plus MMCCAM as opposed to the prior MMC stack. +# +# $FreeBSD$ + +include GENERIC + +ident GENERIC-MMCCAM + +options MMCCAM + +# Add CAMDEBUG stuff +options CAMDEBUG +options CAM_DEBUG_FLAGS=(CAM_DEBUG_INFO|CAM_DEBUG_PROBE|CAM_DEBUG_PERIPH) + +# pass(4) device +device pass + +nodevice mmc +nodevice mmcsd From owner-svn-src-all@freebsd.org Fri Mar 9 00:08:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E69CF3EA6D; Fri, 9 Mar 2018 00:08:44 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8E7378553; Fri, 9 Mar 2018 00:08:43 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3B5517D93; Fri, 9 Mar 2018 00:08:43 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2908h24078102; Fri, 9 Mar 2018 00:08:43 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2908hUf078100; Fri, 9 Mar 2018 00:08:43 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201803090008.w2908hUf078100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 9 Mar 2018 00:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330675 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 330675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 00:08:44 -0000 Author: sbruno Date: Fri Mar 9 00:08:43 2018 New Revision: 330675 URL: https://svnweb.freebsd.org/changeset/base/330675 Log: Update tcp_lro with tested bugfixes from Netflix and LLNW: rrs - Lets make the LRO code look for true dup-acks and window update acks fly on through and combine. rrs - Make the LRO engine a bit more aware of ack-only seq space. Lets not have it incorrectly wipe out newer acks for older acks when we have out-of-order acks (common in wifi environments). jeggleston - LRO eating window updates Based on all of the above I think we are RFC compliant doing it this way: https://tools.ietf.org/html/rfc1122 section 4.2.2.16 "Note that TCP has a heuristic to select the latest window update despite possible datagram reordering; as a result, it may ignore a window update with a smaller window than previously offered if neither the sequence number nor the acknowledgment number is increased." Submitted by: Kevin Bowling Reviewed by: rstone gallatin Sponsored by: NetFlix and Limelight Networks Differential Revision: https://reviews.freebsd.org/D14540 Modified: head/sys/netinet/tcp_lro.c head/sys/netinet/tcp_seq.h Modified: head/sys/netinet/tcp_lro.c ============================================================================== --- head/sys/netinet/tcp_lro.c Thu Mar 8 22:54:50 2018 (r330674) +++ head/sys/netinet/tcp_lro.c Fri Mar 9 00:08:43 2018 (r330675) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -794,7 +795,9 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint3 /* Try to append the new segment. */ if (__predict_false(seq != le->next_seq || - (tcp_data_len == 0 && le->ack_seq == th->th_ack))) { + (tcp_data_len == 0 && + le->ack_seq == th->th_ack && + le->window == th->th_win))) { /* Out of order packet or duplicate ACK. */ tcp_lro_active_remove(le); tcp_lro_flush(lc, le); @@ -811,12 +814,20 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint3 le->tsval = tsval; le->tsecr = *(ts_ptr + 2); } - - le->next_seq += tcp_data_len; - le->ack_seq = th->th_ack; - le->window = th->th_win; - le->append_cnt++; - + if (tcp_data_len || SEQ_GT(ntohl(th->th_ack), ntohl(le->ack_seq))) { + le->next_seq += tcp_data_len; + le->ack_seq = th->th_ack; + le->window = th->th_win; + le->append_cnt++; + } else if (th->th_ack == le->ack_seq) { + le->window = WIN_MAX(le->window, th->th_win); + le->append_cnt++; + } else { + /* no data and old ack */ + le->append_cnt++; + m_freem(m); + return (0); + } #ifdef TCP_LRO_UPDATE_CSUM le->ulp_csum += tcp_lro_rx_csum_fixup(le, l3hdr, th, tcp_data_len, ~csum); Modified: head/sys/netinet/tcp_seq.h ============================================================================== --- head/sys/netinet/tcp_seq.h Thu Mar 8 22:54:50 2018 (r330674) +++ head/sys/netinet/tcp_seq.h Fri Mar 9 00:08:43 2018 (r330675) @@ -47,6 +47,14 @@ #define SEQ_MIN(a, b) ((SEQ_LT(a, b)) ? (a) : (b)) #define SEQ_MAX(a, b) ((SEQ_GT(a, b)) ? (a) : (b)) +#define WIN_LT(a,b) ((short)(ntohs(a)-ntohs(b)) < 0) +#define WIN_LEQ(a,b) ((short)(ntohs(a)-ntohs(b)) <= 0) +#define WIN_GT(a,b) ((short)(ntohs(a)-ntohs(b)) > 0) +#define WIN_GEQ(a,b) ((short)(ntohs(a)-ntohs(b)) >= 0) + +#define WIN_MIN(a, b) ((WIN_LT(a, b)) ? (a) : (b)) +#define WIN_MAX(a, b) ((WIN_GT(a, b)) ? (a) : (b)) + /* for modulo comparisons of timestamps */ #define TSTMP_LT(a,b) ((int)((a)-(b)) < 0) #define TSTMP_GT(a,b) ((int)((a)-(b)) > 0) From owner-svn-src-all@freebsd.org Fri Mar 9 00:50:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09B8AF41F13; Fri, 9 Mar 2018 00:50:41 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFEE479FD8; Fri, 9 Mar 2018 00:50:40 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA42B18409; Fri, 9 Mar 2018 00:50:40 +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 w290oevf098445; Fri, 9 Mar 2018 00:50:40 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w290oebi098444; Fri, 9 Mar 2018 00:50:40 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803090050.w290oebi098444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 9 Mar 2018 00:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330676 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330676 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 00:50:41 -0000 Author: brooks Date: Fri Mar 9 00:50:40 2018 New Revision: 330676 URL: https://svnweb.freebsd.org/changeset/base/330676 Log: Copyout a whole int to cpuset_domain's policy pointer. The previous code only copied 16-bits and corrupted the target int. Reviewed by: kib, markj Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14611 Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Fri Mar 9 00:08:43 2018 (r330675) +++ head/sys/kern/kern_cpuset.c Fri Mar 9 00:50:40 2018 (r330676) @@ -1972,8 +1972,8 @@ kern_cpuset_getdomain(struct thread *td, cpulevel_t le if (error == 0) error = copyout(mask, maskp, domainsetsize); if (error == 0) - error = copyout(&outset.ds_policy, policyp, - sizeof(outset.ds_policy)); + if (suword32(policyp, outset.ds_policy) != 0) + error = EFAULT; out: free(mask, M_TEMP); return (error); From owner-svn-src-all@freebsd.org Fri Mar 9 01:17:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4012F43CD1; Fri, 9 Mar 2018 01:17:04 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6193B7B174; Fri, 9 Mar 2018 01:17:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AC00188B6; Fri, 9 Mar 2018 01:17:04 +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 w291H4xj012822; Fri, 9 Mar 2018 01:17:04 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w291H4o1012821; Fri, 9 Mar 2018 01:17:04 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803090117.w291H4o1012821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 9 Mar 2018 01:17:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330677 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 330677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 01:17:04 -0000 Author: brooks Date: Fri Mar 9 01:17:03 2018 New Revision: 330677 URL: https://svnweb.freebsd.org/changeset/base/330677 Log: MFC r330527: Use umtx_copyin_umtx_time32() in __umtx_op_lock_umutex_compat32(). Non-NULL timeouts where copied in improperly and could produce failures due to incompatible data structures. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14587 Modified: stable/11/sys/kern/kern_umtx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_umtx.c ============================================================================== --- stable/11/sys/kern/kern_umtx.c Fri Mar 9 00:50:40 2018 (r330676) +++ stable/11/sys/kern/kern_umtx.c Fri Mar 9 01:17:03 2018 (r330677) @@ -4114,7 +4114,7 @@ __umtx_op_lock_umutex_compat32(struct thread *td, stru if (uap->uaddr2 == NULL) tm_p = NULL; else { - error = umtx_copyin_umtx_time(uap->uaddr2, + error = umtx_copyin_umtx_time32(uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); From owner-svn-src-all@freebsd.org Fri Mar 9 01:21:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CC28F4425A; Fri, 9 Mar 2018 01:21:23 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 434497B5DC; Fri, 9 Mar 2018 01:21:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E38B188F9; Fri, 9 Mar 2018 01:21:23 +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 w291LNPo016021; Fri, 9 Mar 2018 01:21:23 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w291LNPo016020; Fri, 9 Mar 2018 01:21:23 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803090121.w291LNPo016020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 9 Mar 2018 01:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330678 - stable/10/sys/kern X-SVN-Group: stable-10 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/10/sys/kern X-SVN-Commit-Revision: 330678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 01:21:23 -0000 Author: brooks Date: Fri Mar 9 01:21:22 2018 New Revision: 330678 URL: https://svnweb.freebsd.org/changeset/base/330678 Log: MFC r330527: Use umtx_copyin_umtx_time32() in __umtx_op_lock_umutex_compat32(). Non-NULL timeouts where copied in improperly and could produce failures due to incompatible data structures. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14587 Modified: stable/10/sys/kern/kern_umtx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_umtx.c ============================================================================== --- stable/10/sys/kern/kern_umtx.c Fri Mar 9 01:17:03 2018 (r330677) +++ stable/10/sys/kern/kern_umtx.c Fri Mar 9 01:21:22 2018 (r330678) @@ -3865,7 +3865,7 @@ __umtx_op_lock_umutex_compat32(struct thread *td, stru if (uap->uaddr2 == NULL) tm_p = NULL; else { - error = umtx_copyin_umtx_time(uap->uaddr2, + error = umtx_copyin_umtx_time32(uap->uaddr2, (size_t)uap->uaddr1, &timeout); if (error != 0) return (error); From owner-svn-src-all@freebsd.org Fri Mar 9 02:55:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5145F4A1BB; Fri, 9 Mar 2018 02:55:23 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 519827E638; Fri, 9 Mar 2018 02:55:23 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B4DD1982E; Fri, 9 Mar 2018 02:55:23 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w292tNqm062054; Fri, 9 Mar 2018 02:55:23 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w292tMrU062046; Fri, 9 Mar 2018 02:55:22 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201803090255.w292tMrU062046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Fri, 9 Mar 2018 02:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330679 - in stable/11: share/man/man4 sys/amd64/conf sys/conf sys/dev/imcsmb sys/i386/conf sys/modules/i2c/controllers sys/modules/i2c/controllers/imcsmb X-SVN-Group: stable-11 X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/amd64/conf sys/conf sys/dev/imcsmb sys/i386/conf sys/modules/i2c/controllers sys/modules/i2c/controllers/imcsmb X-SVN-Commit-Revision: 330679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 02:55:23 -0000 Author: rpokala Date: Fri Mar 9 02:55:22 2018 New Revision: 330679 URL: https://svnweb.freebsd.org/changeset/base/330679 Log: MFC r330304: imcsmb(4): Intel integrated Memory Controller (iMC) SMBus controller driver imcsmb(4) provides smbus(4) support for the SMBus controller functionality in the integrated Memory Controllers (iMCs) embedded in Intel Sandybridge- Xeon, Ivybridge-Xeon, Haswell-Xeon, and Broadwell-Xeon CPUs. Each CPU implements one or more iMCs, depending on the number of cores; each iMC implements two SMBus controllers (iMC-SMBs). *** IMPORTANT NOTE *** Because motherboard firmware or the BMC might try to use the iMC-SMBs for monitoring DIMM temperatures and/or managing an NVDIMM, the driver might need to temporarily disable those functions, or take a hardware interlock, before using the iMC-SMBs. Details on how to do this may vary from board to board, and the procedure may be proprietary. It is strongly suggested that anyone wishing to use this driver contact their motherboard vendor, and modify the driver as described in the manual page and in the driver itself. (For what it's worth, the driver as-is has been tested on various SuperMicro motherboards.) Added: stable/11/share/man/man4/imcsmb.4 - copied unchanged from r330304, head/share/man/man4/imcsmb.4 stable/11/sys/dev/imcsmb/ - copied from r330304, head/sys/dev/imcsmb/ stable/11/sys/modules/i2c/controllers/imcsmb/ - copied from r330304, head/sys/modules/i2c/controllers/imcsmb/ Modified: stable/11/share/man/man4/Makefile stable/11/sys/amd64/conf/NOTES stable/11/sys/conf/files.amd64 stable/11/sys/conf/files.i386 stable/11/sys/i386/conf/NOTES stable/11/sys/modules/i2c/controllers/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Fri Mar 9 01:21:22 2018 (r330678) +++ stable/11/share/man/man4/Makefile Fri Mar 9 02:55:22 2018 (r330679) @@ -215,6 +215,7 @@ MAN= aac.4 \ iicbus.4 \ iicsmb.4 \ iir.4 \ + ${_imcsmb.4} \ inet.4 \ inet6.4 \ intpm.4 \ @@ -823,6 +824,7 @@ _if_vmx.4= if_vmx.4 _if_vtnet.4= if_vtnet.4 _if_vxge.4= if_vxge.4 _if_wpi.4= if_wpi.4 +_imcsmb.4= imcsmb.4 _ipmi.4= ipmi.4 _io.4= io.4 _linux.4= linux.4 Copied: stable/11/share/man/man4/imcsmb.4 (from r330304, head/share/man/man4/imcsmb.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man4/imcsmb.4 Fri Mar 9 02:55:22 2018 (r330679, copy of r330304, head/share/man/man4/imcsmb.4) @@ -0,0 +1,133 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Panasas +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 2, 2018 +.Dt IMCSMB 4 +.Os +.Sh NAME +.Nm imcsmb +.Nd Intel integrated Memory Controller (iMC) SMBus controller driver +.Sh SYNOPSIS +.Cd device pci +.Cd device smbus +.Cd device imcsmb +.Pp +Alternatively, to load the driver as a module at boot time, place the following +line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +imcsmb_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr smbus 4 +support for the SMBus controller functionality in the integrated Memory +Controllers (iMCs) embedded in Intel Sandybridge-Xeon, Ivybridge-Xeon, +Haswell-Xeon, and Broadwell-Xeon CPUs. +Each CPU implements one or more iMCs, depending on the number of cores; +each iMC implements two SMBus controllers (iMC-SMBs). +The iMC-SMBs are used by the iMCs to read configuration information from the +DIMMs during POST. +They may also be used, by motherboard firmware or a BMC, to monitor the +temperature of the DIMMs. +.Pp +The iMC-SMBs are +.Sy not +general-purpose SMBus controllers. +By their nature, they are only ever attached to DIMMs, so they implement only +the SMBus operations need for communicating with DIMMs. +Specifically: +.Pp +.Bl -dash -offset indent -compact +.It +READB +.It +READW +.It +WRITEB +.It +WRITEW +.El +.Pp +A more detailed discussion of the hardware and driver architecture can be found +at the top of +.Pa sys/dev/imcsmb/imcsmb_pci.c . +.Sh WARNINGS +As mentioned above, firmware might use the iMC-SMBs to read DIMM temperatures. +The public iMC documentation does not describe any sort of coordination +mechanism to prevent requests from different sources -- such as the motherboard +firmware, a BMC, or the operating system -- from interfering with each other. +.Pp +.Bf Sy +Therefore, it is highly recommended that developers contact the motherboard +vendor for any board-specific instructions on how to disable and re-enable DIMM +temperature monitoring. +.Ef +.Pp +DIMM temperature monitoring should be disabled before returning from +.Fn imcsmb_pci_request_bus , +and re-enabled before returning from +.Fn imcsmb_pci_release_bus . +The driver includes comments to that effect at the appropriate locations. +The driver has been tested and shown to work, with only that type of +modification, on certain motherboards from Intel. +.Po +Unfortunately, those modifications were based on material covered under a +non-disclosure agreement, and therefore are not included in this driver. +.Pc +The driver has also been tested and shown to work as-is on various motherboards +from SuperMicro. +.Pp +The +.Xr smb 4 +driver will connect to the +.Xr smbus 4 +instances created by +.Nm . +However, since the IMC-SMBs are not general-purpose SMBus controllers, using +.Xr smbmsg 8 +with those +.Xr smb 4 +devices is not supported. +.Sh SEE ALSO +.Xr jedec_dimm 4 , +.Xr smbus 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +The +.Nm +driver was originally written for Panasas by +.An Joe Kloss . +It was substantially refactored, and this manual page was written, by +.An Ravi Pokala Aq Mt rpokala@freebsd.org Modified: stable/11/sys/amd64/conf/NOTES ============================================================================== --- stable/11/sys/amd64/conf/NOTES Fri Mar 9 01:21:22 2018 (r330678) +++ stable/11/sys/amd64/conf/NOTES Fri Mar 9 02:55:22 2018 (r330679) @@ -477,6 +477,11 @@ device hptiop device ips # +# Intel integrated Memory Controller (iMC) SMBus controller +# Sandybridge-Xeon, Ivybridge-Xeon, Haswell-Xeon, Broadwell-Xeon +device imcsmb + +# # Intel C600 (Patsburg) integrated SAS controller device isci options ISCI_LOGGING # enable debugging in isci HAL Modified: stable/11/sys/conf/files.amd64 ============================================================================== --- stable/11/sys/conf/files.amd64 Fri Mar 9 01:21:22 2018 (r330678) +++ stable/11/sys/conf/files.amd64 Fri Mar 9 02:55:22 2018 (r330679) @@ -228,6 +228,8 @@ dev/if_ndis/if_ndis.c optional ndis dev/if_ndis/if_ndis_pccard.c optional ndis pccard dev/if_ndis/if_ndis_pci.c optional ndis cardbus | ndis pci dev/if_ndis/if_ndis_usb.c optional ndis usb +dev/imcsmb/imcsmb.c optional imcsmb +dev/imcsmb/imcsmb_pci.c optional imcsmb pci dev/intel/spi.c optional intelspi dev/io/iodev.c optional io dev/ioat/ioat.c optional ioat pci Modified: stable/11/sys/conf/files.i386 ============================================================================== --- stable/11/sys/conf/files.i386 Fri Mar 9 01:21:22 2018 (r330678) +++ stable/11/sys/conf/files.i386 Fri Mar 9 02:55:22 2018 (r330679) @@ -277,6 +277,8 @@ dev/if_ndis/if_ndis.c optional ndis dev/if_ndis/if_ndis_pccard.c optional ndis pccard dev/if_ndis/if_ndis_pci.c optional ndis cardbus | ndis pci dev/if_ndis/if_ndis_usb.c optional ndis usb +dev/imcsmb/imcsmb.c optional imcsmb +dev/imcsmb/imcsmb_pci.c optional imcsmb pci dev/intel/spi.c optional intelspi dev/io/iodev.c optional io dev/ipmi/ipmi.c optional ipmi Modified: stable/11/sys/i386/conf/NOTES ============================================================================== --- stable/11/sys/i386/conf/NOTES Fri Mar 9 01:21:22 2018 (r330678) +++ stable/11/sys/i386/conf/NOTES Fri Mar 9 02:55:22 2018 (r330679) @@ -769,6 +769,11 @@ device hptrr device hptiop # +# Intel integrated Memory Controller (iMC) SMBus controller +# Sandybridge-Xeon, Ivybridge-Xeon, Haswell-Xeon, Broadwell-Xeon +device imcsmb + +# # IBM (now Adaptec) ServeRAID controllers device ips Modified: stable/11/sys/modules/i2c/controllers/Makefile ============================================================================== --- stable/11/sys/modules/i2c/controllers/Makefile Fri Mar 9 01:21:22 2018 (r330678) +++ stable/11/sys/modules/i2c/controllers/Makefile Fri Mar 9 02:55:22 2018 (r330679) @@ -6,4 +6,8 @@ SUBDIR = lpbb SUBDIR = alpm amdpm amdsmb ichiic ichsmb intpm ismt nfsmb viapm lpbb pcf .endif +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +SUBDIR += imcsmb +.endif + .include From owner-svn-src-all@freebsd.org Fri Mar 9 02:55:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BA37F4A200; Fri, 9 Mar 2018 02:55:31 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71BCE7E6F0; Fri, 9 Mar 2018 02:55:30 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0293B1982F; Fri, 9 Mar 2018 02:55:28 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w292tSAs062104; Fri, 9 Mar 2018 02:55:28 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w292tS4K062097; Fri, 9 Mar 2018 02:55:28 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201803090255.w292tS4K062097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Fri, 9 Mar 2018 02:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330680 - in stable/10: share/man/man4 sys/amd64/conf sys/conf sys/dev/imcsmb sys/i386/conf sys/modules/i2c/controllers sys/modules/i2c/controllers/imcsmb X-SVN-Group: stable-10 X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: in stable/10: share/man/man4 sys/amd64/conf sys/conf sys/dev/imcsmb sys/i386/conf sys/modules/i2c/controllers sys/modules/i2c/controllers/imcsmb X-SVN-Commit-Revision: 330680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 02:55:31 -0000 Author: rpokala Date: Fri Mar 9 02:55:27 2018 New Revision: 330680 URL: https://svnweb.freebsd.org/changeset/base/330680 Log: MFC r330304: imcsmb(4): Intel integrated Memory Controller (iMC) SMBus controller driver imcsmb(4) provides smbus(4) support for the SMBus controller functionality in the integrated Memory Controllers (iMCs) embedded in Intel Sandybridge- Xeon, Ivybridge-Xeon, Haswell-Xeon, and Broadwell-Xeon CPUs. Each CPU implements one or more iMCs, depending on the number of cores; each iMC implements two SMBus controllers (iMC-SMBs). *** IMPORTANT NOTE *** Because motherboard firmware or the BMC might try to use the iMC-SMBs for monitoring DIMM temperatures and/or managing an NVDIMM, the driver might need to temporarily disable those functions, or take a hardware interlock, before using the iMC-SMBs. Details on how to do this may vary from board to board, and the procedure may be proprietary. It is strongly suggested that anyone wishing to use this driver contact their motherboard vendor, and modify the driver as described in the manual page and in the driver itself. (For what it's worth, the driver as-is has been tested on various SuperMicro motherboards.) Added: stable/10/share/man/man4/imcsmb.4 - copied unchanged from r330304, head/share/man/man4/imcsmb.4 stable/10/sys/dev/imcsmb/ - copied from r330304, head/sys/dev/imcsmb/ stable/10/sys/modules/i2c/controllers/imcsmb/ - copied from r330304, head/sys/modules/i2c/controllers/imcsmb/ Modified: stable/10/share/man/man4/Makefile stable/10/sys/amd64/conf/NOTES stable/10/sys/conf/files.amd64 stable/10/sys/conf/files.i386 stable/10/sys/i386/conf/NOTES stable/10/sys/modules/i2c/controllers/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Fri Mar 9 02:55:22 2018 (r330679) +++ stable/10/share/man/man4/Makefile Fri Mar 9 02:55:27 2018 (r330680) @@ -195,6 +195,7 @@ MAN= aac.4 \ iicbus.4 \ iicsmb.4 \ iir.4 \ + ${_imcsmb.4} \ inet.4 \ inet6.4 \ intpm.4 \ @@ -786,6 +787,7 @@ _if_vmx.4= if_vmx.4 _if_vtnet.4= if_vtnet.4 _if_vxge.4= if_vxge.4 _if_wpi.4= if_wpi.4 +_imcsmb.4= imcsmb.4 _ipmi.4= ipmi.4 _io.4= io.4 _lindev.4= lindev.4 Copied: stable/10/share/man/man4/imcsmb.4 (from r330304, head/share/man/man4/imcsmb.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/imcsmb.4 Fri Mar 9 02:55:27 2018 (r330680, copy of r330304, head/share/man/man4/imcsmb.4) @@ -0,0 +1,133 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Panasas +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 2, 2018 +.Dt IMCSMB 4 +.Os +.Sh NAME +.Nm imcsmb +.Nd Intel integrated Memory Controller (iMC) SMBus controller driver +.Sh SYNOPSIS +.Cd device pci +.Cd device smbus +.Cd device imcsmb +.Pp +Alternatively, to load the driver as a module at boot time, place the following +line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +imcsmb_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr smbus 4 +support for the SMBus controller functionality in the integrated Memory +Controllers (iMCs) embedded in Intel Sandybridge-Xeon, Ivybridge-Xeon, +Haswell-Xeon, and Broadwell-Xeon CPUs. +Each CPU implements one or more iMCs, depending on the number of cores; +each iMC implements two SMBus controllers (iMC-SMBs). +The iMC-SMBs are used by the iMCs to read configuration information from the +DIMMs during POST. +They may also be used, by motherboard firmware or a BMC, to monitor the +temperature of the DIMMs. +.Pp +The iMC-SMBs are +.Sy not +general-purpose SMBus controllers. +By their nature, they are only ever attached to DIMMs, so they implement only +the SMBus operations need for communicating with DIMMs. +Specifically: +.Pp +.Bl -dash -offset indent -compact +.It +READB +.It +READW +.It +WRITEB +.It +WRITEW +.El +.Pp +A more detailed discussion of the hardware and driver architecture can be found +at the top of +.Pa sys/dev/imcsmb/imcsmb_pci.c . +.Sh WARNINGS +As mentioned above, firmware might use the iMC-SMBs to read DIMM temperatures. +The public iMC documentation does not describe any sort of coordination +mechanism to prevent requests from different sources -- such as the motherboard +firmware, a BMC, or the operating system -- from interfering with each other. +.Pp +.Bf Sy +Therefore, it is highly recommended that developers contact the motherboard +vendor for any board-specific instructions on how to disable and re-enable DIMM +temperature monitoring. +.Ef +.Pp +DIMM temperature monitoring should be disabled before returning from +.Fn imcsmb_pci_request_bus , +and re-enabled before returning from +.Fn imcsmb_pci_release_bus . +The driver includes comments to that effect at the appropriate locations. +The driver has been tested and shown to work, with only that type of +modification, on certain motherboards from Intel. +.Po +Unfortunately, those modifications were based on material covered under a +non-disclosure agreement, and therefore are not included in this driver. +.Pc +The driver has also been tested and shown to work as-is on various motherboards +from SuperMicro. +.Pp +The +.Xr smb 4 +driver will connect to the +.Xr smbus 4 +instances created by +.Nm . +However, since the IMC-SMBs are not general-purpose SMBus controllers, using +.Xr smbmsg 8 +with those +.Xr smb 4 +devices is not supported. +.Sh SEE ALSO +.Xr jedec_dimm 4 , +.Xr smbus 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +The +.Nm +driver was originally written for Panasas by +.An Joe Kloss . +It was substantially refactored, and this manual page was written, by +.An Ravi Pokala Aq Mt rpokala@freebsd.org Modified: stable/10/sys/amd64/conf/NOTES ============================================================================== --- stable/10/sys/amd64/conf/NOTES Fri Mar 9 02:55:22 2018 (r330679) +++ stable/10/sys/amd64/conf/NOTES Fri Mar 9 02:55:27 2018 (r330680) @@ -444,6 +444,11 @@ device hptiop device ips # +# Intel integrated Memory Controller (iMC) SMBus controller +# Sandybridge-Xeon, Ivybridge-Xeon, Haswell-Xeon, Broadwell-Xeon +device imcsmb + +# # Intel C600 (Patsburg) integrated SAS controller device isci options ISCI_LOGGING # enable debugging in isci HAL Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Fri Mar 9 02:55:22 2018 (r330679) +++ stable/10/sys/conf/files.amd64 Fri Mar 9 02:55:27 2018 (r330680) @@ -202,6 +202,8 @@ dev/if_ndis/if_ndis.c optional ndis dev/if_ndis/if_ndis_pccard.c optional ndis pccard dev/if_ndis/if_ndis_pci.c optional ndis cardbus | ndis pci dev/if_ndis/if_ndis_usb.c optional ndis usb +dev/imcsmb/imcsmb.c optional imcsmb +dev/imcsmb/imcsmb_pci.c optional imcsmb pci dev/io/iodev.c optional io dev/ioat/ioat.c optional ioat pci dev/ioat/ioat_test.c optional ioat pci Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Fri Mar 9 02:55:22 2018 (r330679) +++ stable/10/sys/conf/files.i386 Fri Mar 9 02:55:27 2018 (r330680) @@ -265,6 +265,8 @@ dev/if_ndis/if_ndis.c optional ndis dev/if_ndis/if_ndis_pccard.c optional ndis pccard dev/if_ndis/if_ndis_pci.c optional ndis cardbus | ndis pci dev/if_ndis/if_ndis_usb.c optional ndis usb +dev/imcsmb/imcsmb.c optional imcsmb +dev/imcsmb/imcsmb_pci.c optional imcsmb pci dev/io/iodev.c optional io dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_acpi.c optional ipmi acpi Modified: stable/10/sys/i386/conf/NOTES ============================================================================== --- stable/10/sys/i386/conf/NOTES Fri Mar 9 02:55:22 2018 (r330679) +++ stable/10/sys/i386/conf/NOTES Fri Mar 9 02:55:27 2018 (r330680) @@ -752,6 +752,11 @@ device hptrr device hptiop # +# Intel integrated Memory Controller (iMC) SMBus controller +# Sandybridge-Xeon, Ivybridge-Xeon, Haswell-Xeon, Broadwell-Xeon +device imcsmb + +# # IBM (now Adaptec) ServeRAID controllers device ips Modified: stable/10/sys/modules/i2c/controllers/Makefile ============================================================================== --- stable/10/sys/modules/i2c/controllers/Makefile Fri Mar 9 02:55:22 2018 (r330679) +++ stable/10/sys/modules/i2c/controllers/Makefile Fri Mar 9 02:55:27 2018 (r330680) @@ -6,4 +6,8 @@ SUBDIR = lpbb SUBDIR = alpm amdpm amdsmb ichsmb intpm ismt nfsmb viapm lpbb pcf .endif +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +SUBDIR += imcsmb +.endif + .include From owner-svn-src-all@freebsd.org Fri Mar 9 02:58:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0F80F4A52C; Fri, 9 Mar 2018 02:58:25 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AB237E936; Fri, 9 Mar 2018 02:58:25 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id j2so756952pff.10; Thu, 08 Mar 2018 18:58:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EkVLu1f+wq7uD0we0KaCwg7KI1AFmDG/gzZaqJL6fpw=; b=U0Jo8xidQe8w5aaCnOoBUKKwMJ1J4g0sFyRvzCxNQYkp86w/Jmof2T0pReFqxyoIeA UlAiNPkCVI378dUEX8dSlIQCUs2gG4XohMnNxZOKVO/n5FUiUpudHT5dfGVBdiAhTMif IrlfDJzI5MxY694uHtF4FO0XZzFTMzShhI1qQNysYXa9MEU4/twNtg+YXDNcC+SX26ZL 9+eTyWNpLfELb6Ikrowi9AemYkWPSqKUri0igL/s0BFFrGYYjWtnVm7QhmA1GKt4r79g A1PN+5GT4esxfuub/i2j84HiaqkuCwjJCQL8oa1msvCNu02nkBIL8T2uPYyIE5eNaiJb NQXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=EkVLu1f+wq7uD0we0KaCwg7KI1AFmDG/gzZaqJL6fpw=; b=iABbcLdxb3dxuA7oeAaB6ei5eUBpP9ttqACMEIMvAnCj6TRzTAsTAZ25Fe58KhIdl2 0VemqZCGD2tBR/axYt22IQbbtazHymG52b+TPEVV5fXoypPnB+nSVw6NqvQtZb+ZQTkX eUJuUAd5OKoWm7mLjLfzH3BOoVUmYgSC6HaEULMvvUUKCtdIlTFxPkOB355Taz9xLhIo ExhUnPjFs9E7NlTNK/gkj9mG9pSgCg3DnP+OzCBFQZDH6jFsBYDHn/eKQdHYgaEZTf28 y8LFTmUae1TYNh8ZC7B+yd95zpb7QMWI2TOaWG716VWIduMji0DDuqo661SwGYBkAZsW l4+w== X-Gm-Message-State: APf1xPAP1BflAaCmnUS9wswdU2KzR9c4qai6joK7/1nfTeJM7FxUdyE7 dXtwv/Ot26okywFRuRlLi7uucPoi X-Google-Smtp-Source: AG47ELsCC3wQJnK+nE/0oBtEdIFeHPB42nuwjsdW8rowlHMmRGMBgrQokBbccPMd5XDcoF6f/lkzXQ== X-Received: by 10.99.99.2 with SMTP id x2mr23099986pgb.406.1520564304135; Thu, 08 Mar 2018 18:58:24 -0800 (PST) Received: from [192.168.1.105] (152.94.214.218.sta.wbroadband.net.au. [218.214.94.152]) by smtp.gmail.com with ESMTPSA id n26sm116887pfk.94.2018.03.08.18.58.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 18:58:23 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r328011 - in head/sys/amd64/vmm: amd intel To: Ed Maste , FreeBSD Security Team Cc: Tycho Nightingale , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201801151837.w0FIb3R7098459@repo.freebsd.org> From: Kubilay Kocak Message-ID: Date: Fri, 9 Mar 2018 13:57:46 +1100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 02:58:26 -0000 On 9/03/2018 8:57 am, Ed Maste wrote: > On 15 January 2018 at 13:37, Tycho Nightingale wrote: >> Author: tychon >> Date: Mon Jan 15 18:37:03 2018 >> New Revision: 328011 >> URL: https://svnweb.freebsd.org/changeset/base/328011 >> >> Log: >> Provide some mitigation against CVE-2017-5715 by clearing registers >> upon returning from the guest which aren't immediately clobbered by >> the host. This eradicates any remaining guest contents limiting their >> usefulness in an exploit gadget. > > Will you MFC this to stable/11? Mitigations and related MFC's and SA's, etc for vulnerabilities, are presumably all being coordinated and handled by secteam, with associated (explicit) messaging when fixes don't apply to particular branches/versions, no? From owner-svn-src-all@freebsd.org Fri Mar 9 04:42:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC8B4F2B012; Fri, 9 Mar 2018 04:42:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 2F47A823AB; Fri, 9 Mar 2018 04:42:15 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 2F77F1A2661; Fri, 9 Mar 2018 15:42:06 +1100 (AEDT) Date: Fri, 9 Mar 2018 15:42:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mark Johnston cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330663 - head/sys/kern In-Reply-To: <201803081704.w28H4aQx052056@repo.freebsd.org> Message-ID: <20180309150402.X950@besplex.bde.org> References: <201803081704.w28H4aQx052056@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=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=IXfSM6YwnFqPYyAIxbIA:9 a=7064yCuboU82dyd_:21 a=PYkMtr5hiBaTbJBV:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 04:42:17 -0000 On Thu, 8 Mar 2018, Mark Johnston wrote: > Log: > Return E2BIG if we run out of space writing a compressed kernel dump. E2BIG a very wrong errno. It means "Argment list too long". It is broken as designed, with "too" encrypted as "2" and no indication of what is too big. EFBIG is not so wrong. It means "File too large". > ENOSPC causes the MD kernel dump code to retry the dump, but this is > undesirable in the case where we legitimately ran out of space. ENOSPC is the correct errno. It means "[really] No space left on device". The bug was either retrying or possibly abusing ENOSPC instead of EAGAIN to mean "transiently out of space for something". > > Modified: > head/sys/kern/kern_shutdown.c > > Modified: head/sys/kern/kern_shutdown.c > ============================================================================== > --- head/sys/kern/kern_shutdown.c Thu Mar 8 16:27:31 2018 (r330662) > +++ head/sys/kern/kern_shutdown.c Thu Mar 8 17:04:36 2018 (r330663) > @@ -1115,6 +1115,12 @@ dump_check_bounds(struct dumperinfo *di, off_t offset, > > if (length != 0 && (offset < di->mediaoffset || > offset - di->mediaoffset + length > di->mediasize)) { > + if (di->kdcomp != NULL && offset >= di->mediaoffset) { > + printf( > + "Compressed dump failed to fit in device boundaries.\n"); > + return (E2BIG); > + } > + Style bug: extra blank line. Even the outer if statements in this function are missing this error. > printf("Attempt to write outside dump device boundaries.\n" > "offset(%jd), mediaoffset(%jd), length(%ju), mediasize(%jd).\n", > (intmax_t)offset, (intmax_t)di->mediaoffset, ENOSPC is still returned for this error. The problem is that this function shouldn't decide the caller's retry policy or error handling policy. It should just return ENOSPC or EINVAL without printing anything. Then the caller may retry for ENOSPC if it has alternative method(s) that take less space. Then the caller should print the failure message if nothing works. Other style bugs: - capitalization of error messages - termination of error messages with a period - no prefix for the error messages. Normal kernel error messages look like "dump: No space left on device". Here the error messages are English sentences which have to be parsed to find the subsystem that generated the error. Since the error messages here are fairly well written sentences, this is possible, but it often saves space to not write full sentences and it is always clearer to start with a prefix. Here you had to outdent the messages to get them to fit. Use of the err() family in userland gives a more uniform style in which it is impossible to terminate the message with a period (since err() prints the final word in sterror(errno) and doesn't print a period after it, but prints a newline so you can't print the period after it). Bruce From owner-svn-src-all@freebsd.org Fri Mar 9 04:45:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28E34F2B471; Fri, 9 Mar 2018 04:45:25 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB548825FB; Fri, 9 Mar 2018 04:45:24 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C64F21A9CE; Fri, 9 Mar 2018 04:45:24 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w294jOfe017379; Fri, 9 Mar 2018 04:45:24 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w294jOi6017378; Fri, 9 Mar 2018 04:45:24 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201803090445.w294jOi6017378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Fri, 9 Mar 2018 04:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330681 - head/sys/fs/fdescfs X-SVN-Group: head X-SVN-Commit-Author: ume X-SVN-Commit-Paths: head/sys/fs/fdescfs X-SVN-Commit-Revision: 330681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 04:45:25 -0000 Author: ume Date: Fri Mar 9 04:45:24 2018 New Revision: 330681 URL: https://svnweb.freebsd.org/changeset/base/330681 Log: Fix Bad file descriptor error. MFC after: 1 week Modified: head/sys/fs/fdescfs/fdesc_vnops.c Modified: head/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vnops.c Fri Mar 9 02:55:27 2018 (r330680) +++ head/sys/fs/fdescfs/fdesc_vnops.c Fri Mar 9 04:45:24 2018 (r330681) @@ -415,6 +415,8 @@ fdesc_pathconf(struct vop_pathconf_args *ap) *ap->a_retval = 1; return (0); default: + if (VTOFDESC(vp)->fd_type == Froot) + return (vop_stdpathconf(ap)); vref(vp); VOP_UNLOCK(vp, 0); error = kern_fpathconf(curthread, VTOFDESC(vp)->fd_fd, From owner-svn-src-all@freebsd.org Fri Mar 9 06:51:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA054F31976; Fri, 9 Mar 2018 06:51:04 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) (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 7794686DC3; Fri, 9 Mar 2018 06:51:03 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f46.google.com with SMTP id u5-v6so1651553itc.1; Thu, 08 Mar 2018 22:51:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=CUVrkfr91OtOGlK3UCzmYNParbgvLwrIVNB/iKGiusE=; b=VoxUx0yvC0tJljlhld9eey6xpZeCN9k/KA2FXCeR2SFmqqvJxAQVEX3Hbzq5SGlaZ2 39C5D/PrPy6Hl9gtehXXbPqxhPNFDgbwRIYHeNCREhXa1L8qCkEK0zK59HgtbObPMi5u PSn22Cz2spufraDKEqyEGzJ1BSZzIoj4EhzYm+d0hLJT7OEtQdyvvcJZ7Jqm/nrkPOJm usNSFRB9V396z5oCQj8VRoBLkyoTDMr2a+MZ2kSLW0l1+wYqpoatE8LzE8pQ0IY2EZsG MnZ5j2ke19X2JkG/I20KGLATJIfL0BAizjCWpswWK16ddnfweOXOwy71h6EKARyWGH6Q CoOQ== X-Gm-Message-State: AElRT7FqsrJXKEzZ5upVlqdPgVmDJDfEgFo5aVbRy9tSLhKoTEgBb6lB 0E+7OuistA7hw6h8ezo3p056nB6z X-Google-Smtp-Source: AG47ELsgpZsQe+NkaB+8QwWBLqAzoI308eSNEXEyWt2u7ItvRIFglaIqQjVA8TYuKVdqMOje3Pmdsw== X-Received: by 2002:a24:2e4e:: with SMTP id i75-v6mr2011432ita.96.1520578262946; Thu, 08 Mar 2018 22:51:02 -0800 (PST) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com. [209.85.214.45]) by smtp.gmail.com with ESMTPSA id e102sm313071ioj.87.2018.03.08.22.51.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 22:51:02 -0800 (PST) Received: by mail-it0-f45.google.com with SMTP id u66so1603582ith.1; Thu, 08 Mar 2018 22:51:02 -0800 (PST) X-Received: by 10.36.161.2 with SMTP id y2mr2073453ite.53.1520578261880; Thu, 08 Mar 2018 22:51:01 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.30.149 with HTTP; Thu, 8 Mar 2018 22:51:01 -0800 (PST) In-Reply-To: <20180309150402.X950@besplex.bde.org> References: <201803081704.w28H4aQx052056@repo.freebsd.org> <20180309150402.X950@besplex.bde.org> From: Conrad Meyer Date: Thu, 8 Mar 2018 22:51:01 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r330663 - head/sys/kern To: Bruce Evans Cc: Mark Johnston , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 06:51:05 -0000 On Thu, Mar 8, 2018 at 8:42 PM, Bruce Evans wrote: > On Thu, 8 Mar 2018, Mark Johnston wrote: >> ... >> +++ head/sys/kern/kern_shutdown.c Thu Mar 8 17:04:36 2018 >> (r330663) >> @@ -1115,6 +1115,12 @@ dump_check_bounds(struct dumperinfo *di, off_t >> offset, >> >> if (length != 0 && (offset < di->mediaoffset || >> offset - di->mediaoffset + length > di->mediasize)) { >> + if (di->kdcomp != NULL && offset >= di->mediaoffset) { >> + printf( >> + "Compressed dump failed to fit in device >> boundaries.\n"); >> + return (E2BIG); >> + } >> + > > Style bug: extra blank line. Even the outer if statements in this function > are missing this error. No. Style(9) does not and should not require the complete absence of blank lines. Committers are free to use their best judgement on how to separate blocks of code. I think Mark's decision is eminently reasonable. >> printf("Attempt to write outside dump device >> boundaries.\n" >> "offset(%jd), mediaoffset(%jd), length(%ju), >> mediasize(%jd).\n", >> (intmax_t)offset, (intmax_t)di->mediaoffset, > ... > > Other style bugs: > - capitalization of error messages > - termination of error messages with a period Why do you think these are style bugs? Conrad From owner-svn-src-all@freebsd.org Fri Mar 9 09:21:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B26EF3B629; Fri, 9 Mar 2018 09:21:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2B826C9E1; Fri, 9 Mar 2018 09:21:22 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDB461D5B2; Fri, 9 Mar 2018 09:21:22 +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 w299LMfJ057252; Fri, 9 Mar 2018 09:21:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w299LMjj057251; Fri, 9 Mar 2018 09:21:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803090921.w299LMjj057251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Mar 2018 09:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330686 - head/contrib/llvm/lib/Target/ARM X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm/lib/Target/ARM X-SVN-Commit-Revision: 330686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 09:21:23 -0000 Author: dim Date: Fri Mar 9 09:21:22 2018 New Revision: 330686 URL: https://svnweb.freebsd.org/changeset/base/330686 Log: Pull in r326882 from upstream llvm trunk (by Sjoerd Meijer): [ARM] Fix for PR36577 Don't PerformSHLSimplify if the given node is used by a node that also uses a constant because we may get stuck in an infinite combine loop. bugzilla: https://bugs.llvm.org/show_bug.cgi?id=36577 Patch by Sam Parker. Differential Revision: https://reviews.llvm.org/D44097 This fixes a hang when compiling one particular file in java/openjdk8 for armv6 and armv7. Reported by: swills PR: 226388 Modified: head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Modified: head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Fri Mar 9 05:55:53 2018 (r330685) +++ head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Fri Mar 9 09:21:22 2018 (r330686) @@ -10201,7 +10201,14 @@ static SDValue PerformSHLSimplify(SDNode *N, case ISD::XOR: case ISD::SETCC: case ARMISD::CMP: - // Check that its not already using a shl. + // Check that the user isn't already using a constant because there + // aren't any instructions that support an immediate operand and a + // shifted operand. + if (isa(U->getOperand(0)) || + isa(U->getOperand(1))) + return SDValue(); + + // Check that it's not already using a shift. if (U->getOperand(0).getOpcode() == ISD::SHL || U->getOperand(1).getOpcode() == ISD::SHL) return SDValue(); @@ -10223,8 +10230,6 @@ static SDValue PerformSHLSimplify(SDNode *N, if (!C1ShlC2 || !C2) return SDValue(); - DEBUG(dbgs() << "Trying to simplify shl: "; N->dump()); - APInt C2Int = C2->getAPIntValue(); APInt C1Int = C1ShlC2->getAPIntValue(); @@ -10238,12 +10243,12 @@ static SDValue PerformSHLSimplify(SDNode *N, C1Int.lshrInPlace(C2Int); // The immediates are encoded as an 8-bit value that can be rotated. - unsigned Zeros = C1Int.countLeadingZeros() + C1Int.countTrailingZeros(); - if (C1Int.getBitWidth() - Zeros > 8) - return SDValue(); + auto LargeImm = [](const APInt &Imm) { + unsigned Zeros = Imm.countLeadingZeros() + Imm.countTrailingZeros(); + return Imm.getBitWidth() - Zeros > 8; + }; - Zeros = C2Int.countLeadingZeros() + C2Int.countTrailingZeros(); - if (C2Int.getBitWidth() - Zeros > 8) + if (LargeImm(C1Int) || LargeImm(C2Int)) return SDValue(); SelectionDAG &DAG = DCI.DAG; @@ -10253,6 +10258,10 @@ static SDValue PerformSHLSimplify(SDNode *N, DAG.getConstant(C1Int, dl, MVT::i32)); // Shift left to compensate for the lshr of C1Int. SDValue Res = DAG.getNode(ISD::SHL, dl, MVT::i32, BinOp, SHL.getOperand(1)); + + DEBUG(dbgs() << "Simplify shl use:\n"; SHL.getOperand(0).dump(); SHL.dump(); + N->dump()); + DEBUG(dbgs() << "Into:\n"; X.dump(); BinOp.dump(); Res.dump()); DAG.ReplaceAllUsesWith(SDValue(N, 0), Res); return SDValue(N, 0); From owner-svn-src-all@freebsd.org Fri Mar 9 09:50:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3842DF3DB2B; Fri, 9 Mar 2018 09:50:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 7E8D96DCDA; Fri, 9 Mar 2018 09:50:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id A12871A2D65; Fri, 9 Mar 2018 20:50:33 +1100 (AEDT) Date: Fri, 9 Mar 2018 20:50:32 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Conrad Meyer cc: Bruce Evans , Mark Johnston , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330663 - head/sys/kern In-Reply-To: Message-ID: <20180309194900.F2122@besplex.bde.org> References: <201803081704.w28H4aQx052056@repo.freebsd.org> <20180309150402.X950@besplex.bde.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=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=EVY10kfv5RHgi_n90qYA:9 a=fUBJKX1s9cisX-TV:21 a=W0ZdzM6i1VXaRkF-:21 a=SskPc2CMMsG2m25c:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 09:50:37 -0000 On Thu, 8 Mar 2018, Conrad Meyer wrote: > On Thu, Mar 8, 2018 at 8:42 PM, Bruce Evans wrote: >> On Thu, 8 Mar 2018, Mark Johnston wrote: >>> ... >>> +++ head/sys/kern/kern_shutdown.c Thu Mar 8 17:04:36 2018 >>> (r330663) >>> @@ -1115,6 +1115,12 @@ dump_check_bounds(struct dumperinfo *di, off_t >>> offset, >>> >>> if (length != 0 && (offset < di->mediaoffset || >>> offset - di->mediaoffset + length > di->mediasize)) { >>> + if (di->kdcomp != NULL && offset >= di->mediaoffset) { >>> + printf( >>> + "Compressed dump failed to fit in device >>> boundaries.\n"); >>> + return (E2BIG); >>> + } >>> + >> >> Style bug: extra blank line. Even the outer if statements in this function >> are missing this error. > > No. Style(9) does not and should not require the complete absence of > blank lines. Committers are free to use their best judgement on how > to separate blocks of code. I think Mark's decision is eminently > reasonable. style(9) does require this. This is hard to see since the style guide has been mangled by converting it into a man page, with markup in non C-code and lots of blank lines to separate the markup. See /usr/src/admin/style/style in 4.4BSD or /usr/src/share/misc/style in NetBSD for non-mangled versions. These are pure C code which give many rules implicitly by example. All versions give 2 or 3 rules for leaving a blank line between groups of header files. These rules are somewhat needed since leaving blank lines is so unusual. It is also the default for indent(1) (indent -sob). indent removes far too many blank lines by default. I like to have optional blank lines only before blocks of code headed by a comment (with the blank line before the comment). But is more common in KNF code to not have a blank line before a block comment (since the "/*" for the first line of the comment is an adequate separator). Blank lines might be used to separate sections of code, but the above blank line is a very large style bug since it separates related code, while the style nearby is to not separate even unrelated code. kern_shutdown.c has very few extra blank lines. indent only wants to remove 2. I see a few more: - the include of sys/signalvar.h is separated from all other includes by a blank line (and more so by not sorting it into the sys includes section) - similarly for the include of machine/stdarg.h. This has an attached comment about K&R support that wasn't needed even when K&R was supported. - boot() has an extra blank line between initializing waittime() and calling sync(). These are unrelated, but the code is so simple (just 2 statements) that splitting it up is not useful. Elsewhere, boot() uses lots of little sections headed by comments with a block line before the comments except for some block comments. - panic() has a blank line before a va_start() but no blank line after the matching va_end(), then blank line after the next statement. The second blank line is correct for matching the first one since the next statement is related (it completes printing a message). - kproc_shutdown() has a bogus blank line after a return statement, and a nonsense blank line to separate checking of 'error' from setting it. - kthread() copies the bad style of kproc_shutdown() perfectly. Dumper code had no extra blank lines. This is easy enough since it is small (less than 10% of the file). >>> printf("Attempt to write outside dump device >>> boundaries.\n" >>> "offset(%jd), mediaoffset(%jd), length(%ju), >>> mediasize(%jd).\n", >>> (intmax_t)offset, (intmax_t)di->mediaoffset, >> ... >> >> Other style bugs: >> - capitalization of error messages >> - termination of error messages with a period > > Why do you think these are style bugs? Because they are. Error messages are conventionally not capitalized or terminated with a period. You snipped my partial explanation by example that err(3) almost enforces this in userland by not supporting it. Userland messages look like "foo: bar: Bad style", where 'foo' is the program name and it would be unUnix-like to capitalize it; 'bar' might be a function name and it would be Unix-like to capitalize that too, or it might be an English word and then it is unclear whose style rules apply (IIRC, capitalization after a colon only depends on style); and "Bad style" is strerror(ESTYLE) -- for some reason, strings returned by strerror() are always capitalized so they match some style rules for colons, and then using different style rules for 'bar' is either a bug or a feature. There is not much enforcement of this in the kernel. panic() is a bit like err(). Using device_printf() gives a uniform style for the first word in device driver messages. It would be unUnix-line to capitalize device names, so this gives uncapitalized messages if the style rule used for capitalization after colons is to not capitalize. Bruce From owner-svn-src-all@freebsd.org Fri Mar 9 10:34:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 753F3F41156; Fri, 9 Mar 2018 10:34:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29E826F692; Fri, 9 Mar 2018 10:34:45 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24B601E108; Fri, 9 Mar 2018 10:34:45 +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 w29AYjFo093352; Fri, 9 Mar 2018 10:34:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29AYj9G093351; Fri, 9 Mar 2018 10:34:45 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201803091034.w29AYj9G093351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 9 Mar 2018 10:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330687 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 330687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 10:34:45 -0000 Author: andrew Date: Fri Mar 9 10:34:44 2018 New Revision: 330687 URL: https://svnweb.freebsd.org/changeset/base/330687 Log: Use the correct address to write back to memory in the GICv3 ITS driver. This seems to no be needed on supported hardware as they are cache-coherent, however this may not be the case on all platforms. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/gicv3_its.c Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Fri Mar 9 09:21:22 2018 (r330686) +++ head/sys/arm64/arm64/gicv3_its.c Fri Mar 9 10:34:44 2018 (r330687) @@ -567,7 +567,7 @@ gicv3_its_pendtables_init(struct gicv3_its_softc *sc) 0, LPI_PENDTAB_MAX_ADDR, LPI_PENDTAB_ALIGN, 0); /* Flush so the ITS can see the memory */ - cpu_dcache_wb_range((vm_offset_t)sc->sc_pend_base, + cpu_dcache_wb_range((vm_offset_t)sc->sc_pend_base[i], LPI_PENDTAB_SIZE); } } From owner-svn-src-all@freebsd.org Fri Mar 9 11:02:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AE39F42E6A; Fri, 9 Mar 2018 11:02:40 +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 4E17170A5A; Fri, 9 Mar 2018 11:02:40 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 439E71B09; Fri, 9 Mar 2018 11:02:40 +0000 (UTC) Date: Fri, 9 Mar 2018 11:02:40 +0000 From: Alexey Dokuchaev To: Eitan Adler Cc: John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 Message-ID: <20180309110240.GA77718@FreeBSD.org> References: <201803050754.w257swAE001435@repo.freebsd.org> <6465173.s2nWvWCLOs@ralph.baldwin.cx> <8377086.JrIgVVMXMv@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 11:02:40 -0000 On Wed, Mar 07, 2018 at 02:53:49PM -0800, Eitan Adler wrote: > On 7 March 2018 at 09:37, John Baldwin wrote: > > ... > > I suspect many of these changes for iwm, etc. are all intertwined > > so I'm not sure if you can leave out individual ones. > > Possibly. I do have iwm working on my laptop though. I also know of > one open PR assigned to me w.r.t. a model I don't own. I'll be > addressing it some time this week. I often have mixed feelings when I see lots of similar changes (i.e. that make up for better hardware support, esp. on a laptop) MFCed. I'd rather see laptop users run -CURRENT and leave -STABLE branches for very conservative (server?) users who can't/don't want to afford the risks of running -CURRENT or require ABI stability in a really long run, rather than binge-merging things. :-) By default it should be -CURRENT all over; it's a very good thing that we as a Project ourselves are doing this as part of our own dogfood eating strategy. ./danfe From owner-svn-src-all@freebsd.org Fri Mar 9 11:33:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F04FCF45104; Fri, 9 Mar 2018 11:33:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93E5371D2F; Fri, 9 Mar 2018 11:33:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E4641EA40; Fri, 9 Mar 2018 11:33:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29BXvXS023089; Fri, 9 Mar 2018 11:33:57 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29BXuTg023081; Fri, 9 Mar 2018 11:33:56 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803091133.w29BXuTg023081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 9 Mar 2018 11:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330688 - in head/sys: dev/bwn dev/ral dev/usb/wlan net80211 X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys: dev/bwn dev/ral dev/usb/wlan net80211 X-SVN-Commit-Revision: 330688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 11:33:58 -0000 Author: avos Date: Fri Mar 9 11:33:56 2018 New Revision: 330688 URL: https://svnweb.freebsd.org/changeset/base/330688 Log: net80211: wrap protection frame allocation into ieee80211_alloc_prot() Move copy-pasted code for RTS/CTS frame allocation into net80211. While here, add stat / debug message for allocation failures (copied from run(4)) + return error here in bwn(4). Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D14628 Modified: head/sys/dev/bwn/if_bwn.c head/sys/dev/ral/rt2560.c head/sys/dev/ral/rt2661.c head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_ural.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Fri Mar 9 10:34:44 2018 (r330687) +++ head/sys/dev/bwn/if_bwn.c Fri Mar 9 11:33:56 2018 (r330688) @@ -6401,15 +6401,14 @@ bwn_set_txhdr(struct bwn_mac *mac, struct ieee80211_no struct bwn_softc *sc = mac->mac_sc; struct ieee80211_frame *wh; struct ieee80211_frame *protwh; - struct ieee80211_frame_cts *cts; - struct ieee80211_frame_rts *rts; const struct ieee80211_txparam *tp = ni->ni_txparms; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *mprot; + uint8_t *prot_ptr; unsigned int len; uint32_t macctl = 0; - int protdur, rts_rate, rts_rate_fb, ismcast, isshort, rix, type; + int rts_rate, rts_rate_fb, ismcast, isshort, rix, type; uint16_t phyctl = 0; uint8_t rate, rate_fb; int fill_phy_ctl1 = 0; @@ -6528,7 +6527,8 @@ bwn_set_txhdr(struct bwn_mac *mac, struct ieee80211_no m->m_pkthdr.len + IEEE80211_CRC_LEN > vap->iv_rtsthreshold) macctl |= BWN_TX_MAC_LONGFRAME; - if (ic->ic_flags & IEEE80211_F_USEPROT) { + if ((ic->ic_flags & IEEE80211_F_USEPROT) && + ic->ic_protmode != IEEE80211_PROT_NONE) { /* Note: don't fall back to CCK rates for 5G */ if (phy->gmode) rts_rate = BWN_CCK_RATE_1MB; @@ -6537,60 +6537,34 @@ bwn_set_txhdr(struct bwn_mac *mac, struct ieee80211_no rts_rate_fb = bwn_get_fbrate(rts_rate); /* XXX 'rate' here is hardware rate now, not the net80211 rate */ - protdur = ieee80211_compute_duration(ic->ic_rt, - m->m_pkthdr.len, rate, isshort) + - + ieee80211_ack_duration(ic->ic_rt, rate, isshort); + mprot = ieee80211_alloc_prot(ni, m, rate, ic->ic_protmode); + if (mprot == NULL) { + if_inc_counter(vap->iv_ifp, IFCOUNTER_OERRORS, 1); + device_printf(sc->sc_dev, + "could not allocate mbuf for protection mode %d\n", + ic->ic_protmode); + return (ENOBUFS); + } - if (ic->ic_protmode == IEEE80211_PROT_CTSONLY) { + switch (mac->mac_fw.fw_hdr_format) { + case BWN_FW_HDR_351: + prot_ptr = txhdr->body.r351.rts_frame; + break; + case BWN_FW_HDR_410: + prot_ptr = txhdr->body.r410.rts_frame; + break; + case BWN_FW_HDR_598: + prot_ptr = txhdr->body.r598.rts_frame; + break; + } - switch (mac->mac_fw.fw_hdr_format) { - case BWN_FW_HDR_351: - cts = (struct ieee80211_frame_cts *) - txhdr->body.r351.rts_frame; - break; - case BWN_FW_HDR_410: - cts = (struct ieee80211_frame_cts *) - txhdr->body.r410.rts_frame; - break; - case BWN_FW_HDR_598: - cts = (struct ieee80211_frame_cts *) - txhdr->body.r598.rts_frame; - break; - } + bcopy(mtod(mprot, uint8_t *), prot_ptr, mprot->m_pkthdr.len); + m_freem(mprot); - mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, - protdur); - KASSERT(mprot != NULL, ("failed to alloc mbuf\n")); - bcopy(mtod(mprot, uint8_t *), (uint8_t *)cts, - mprot->m_pkthdr.len); - m_freem(mprot); + if (ic->ic_protmode == IEEE80211_PROT_CTSONLY) { macctl |= BWN_TX_MAC_SEND_CTSTOSELF; len = sizeof(struct ieee80211_frame_cts); } else { - switch (mac->mac_fw.fw_hdr_format) { - case BWN_FW_HDR_351: - rts = (struct ieee80211_frame_rts *) - txhdr->body.r351.rts_frame; - break; - case BWN_FW_HDR_410: - rts = (struct ieee80211_frame_rts *) - txhdr->body.r410.rts_frame; - break; - case BWN_FW_HDR_598: - rts = (struct ieee80211_frame_rts *) - txhdr->body.r598.rts_frame; - break; - } - - /* XXX rate/rate_fb is the hardware rate */ - protdur += ieee80211_ack_duration(ic->ic_rt, rate, - isshort); - mprot = ieee80211_alloc_rts(ic, wh->i_addr1, - wh->i_addr2, protdur); - KASSERT(mprot != NULL, ("failed to alloc mbuf\n")); - bcopy(mtod(mprot, uint8_t *), (uint8_t *)rts, - mprot->m_pkthdr.len); - m_freem(mprot); macctl |= BWN_TX_MAC_SEND_RTSCTS; len = sizeof(struct ieee80211_frame_rts); } Modified: head/sys/dev/ral/rt2560.c ============================================================================== --- head/sys/dev/ral/rt2560.c Fri Mar 9 10:34:44 2018 (r330687) +++ head/sys/dev/ral/rt2560.c Fri Mar 9 11:33:56 2018 (r330688) @@ -1594,38 +1594,18 @@ rt2560_sendprot(struct rt2560_softc *sc, const struct mbuf *m, struct ieee80211_node *ni, int prot, int rate) { struct ieee80211com *ic = ni->ni_ic; - const struct ieee80211_frame *wh; struct rt2560_tx_desc *desc; struct rt2560_tx_data *data; struct mbuf *mprot; - int protrate, ackrate, pktlen, flags, isshort, error; - uint16_t dur; + int protrate, flags, error; bus_dma_segment_t segs[RT2560_MAX_SCATTER]; int nsegs; - KASSERT(prot == IEEE80211_PROT_RTSCTS || prot == IEEE80211_PROT_CTSONLY, - ("protection %d", prot)); - - wh = mtod(m, const struct ieee80211_frame *); - pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; - - protrate = ieee80211_ctl_rate(ic->ic_rt, rate); - ackrate = ieee80211_ack_rate(ic->ic_rt, rate); - - isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) - + ieee80211_ack_duration(ic->ic_rt, rate, isshort); - flags = RT2560_TX_MORE_FRAG; - if (prot == IEEE80211_PROT_RTSCTS) { - /* NB: CTS is the same size as an ACK */ - dur += ieee80211_ack_duration(ic->ic_rt, rate, isshort); - flags |= RT2560_TX_ACK; - mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); - } else { - mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, dur); - } + mprot = ieee80211_alloc_prot(ni, m, rate, prot); if (mprot == NULL) { - /* XXX stat + msg */ + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + device_printf(sc->sc_dev, + "could not allocate mbuf for protection mode %d\n", prot); return ENOBUFS; } @@ -1645,6 +1625,11 @@ rt2560_sendprot(struct rt2560_softc *sc, data->ni = ieee80211_ref_node(ni); /* ctl frames are not taken into account for amrr */ data->rix = IEEE80211_FIXED_RATE_NONE; + + protrate = ieee80211_ctl_rate(ic->ic_rt, rate); + flags = RT2560_TX_MORE_FRAG; + if (prot == IEEE80211_PROT_RTSCTS) + flags |= RT2560_TX_ACK; rt2560_setup_tx_desc(sc, desc, flags, mprot->m_pkthdr.len, protrate, 1, segs->ds_addr); Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Fri Mar 9 10:34:44 2018 (r330687) +++ head/sys/dev/ral/rt2661.c Fri Mar 9 11:33:56 2018 (r330688) @@ -1361,38 +1361,18 @@ rt2661_sendprot(struct rt2661_softc *sc, int ac, { struct ieee80211com *ic = ni->ni_ic; struct rt2661_tx_ring *txq = &sc->txq[ac]; - const struct ieee80211_frame *wh; struct rt2661_tx_desc *desc; struct rt2661_tx_data *data; struct mbuf *mprot; - int protrate, ackrate, pktlen, flags, isshort, error; - uint16_t dur; + int protrate, flags, error; bus_dma_segment_t segs[RT2661_MAX_SCATTER]; int nsegs; - KASSERT(prot == IEEE80211_PROT_RTSCTS || prot == IEEE80211_PROT_CTSONLY, - ("protection %d", prot)); - - wh = mtod(m, const struct ieee80211_frame *); - pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; - - protrate = ieee80211_ctl_rate(ic->ic_rt, rate); - ackrate = ieee80211_ack_rate(ic->ic_rt, rate); - - isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) - + ieee80211_ack_duration(ic->ic_rt, rate, isshort); - flags = RT2661_TX_MORE_FRAG; - if (prot == IEEE80211_PROT_RTSCTS) { - /* NB: CTS is the same size as an ACK */ - dur += ieee80211_ack_duration(ic->ic_rt, rate, isshort); - flags |= RT2661_TX_NEED_ACK; - mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); - } else { - mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, dur); - } + mprot = ieee80211_alloc_prot(ni, m, rate, prot); if (mprot == NULL) { - /* XXX stat + msg */ + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + device_printf(sc->sc_dev, + "could not allocate mbuf for protection mode %d\n", prot); return ENOBUFS; } @@ -1412,6 +1392,11 @@ rt2661_sendprot(struct rt2661_softc *sc, int ac, data->ni = ieee80211_ref_node(ni); /* ctl frames are not taken into account for amrr */ data->rix = IEEE80211_FIXED_RATE_NONE; + + protrate = ieee80211_ctl_rate(ic->ic_rt, rate); + flags = RT2661_TX_MORE_FRAG; + if (prot == IEEE80211_PROT_RTSCTS) + flags |= RT2661_TX_NEED_ACK; rt2661_setup_tx_desc(sc, desc, flags, 0, mprot->m_pkthdr.len, protrate, segs, 1, ac); Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Fri Mar 9 10:34:44 2018 (r330687) +++ head/sys/dev/usb/wlan/if_rum.c Fri Mar 9 11:33:56 2018 (r330688) @@ -1419,37 +1419,25 @@ rum_sendprot(struct rum_softc *sc, const struct mbuf *m, struct ieee80211_node *ni, int prot, int rate) { struct ieee80211com *ic = ni->ni_ic; - const struct ieee80211_frame *wh; struct rum_tx_data *data; struct mbuf *mprot; - int protrate, pktlen, flags, isshort; - uint16_t dur; + int protrate, flags; RUM_LOCK_ASSERT(sc); - KASSERT(prot == IEEE80211_PROT_RTSCTS || prot == IEEE80211_PROT_CTSONLY, - ("protection %d", prot)); - wh = mtod(m, const struct ieee80211_frame *); - pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; + mprot = ieee80211_alloc_prot(ni, m, rate, prot); + if (mprot == NULL) { + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + device_printf(sc->sc_dev, + "could not allocate mbuf for protection mode %d\n", prot); + return (ENOBUFS); + } protrate = ieee80211_ctl_rate(ic->ic_rt, rate); - - isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) - + ieee80211_ack_duration(ic->ic_rt, rate, isshort); flags = 0; - if (prot == IEEE80211_PROT_RTSCTS) { - /* NB: CTS is the same size as an ACK */ - dur += ieee80211_ack_duration(ic->ic_rt, rate, isshort); + if (prot == IEEE80211_PROT_RTSCTS) flags |= RT2573_TX_NEED_ACK; - mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); - } else { - mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, dur); - } - if (mprot == NULL) { - /* XXX stat + msg */ - return (ENOBUFS); - } + data = STAILQ_FIRST(&sc->tx_free); STAILQ_REMOVE_HEAD(&sc->tx_free, next); sc->tx_nfree--; Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Mar 9 10:34:44 2018 (r330687) +++ head/sys/dev/usb/wlan/if_run.c Fri Mar 9 11:33:56 2018 (r330688) @@ -3543,56 +3543,34 @@ run_sendprot(struct run_softc *sc, const struct mbuf *m, struct ieee80211_node *ni, int prot, int rate) { struct ieee80211com *ic = ni->ni_ic; - struct ieee80211_frame *wh; struct run_tx_data *data; struct rt2870_txd *txd; struct rt2860_txwi *txwi; struct mbuf *mprot; int ridx; int protrate; - int ackrate; - int pktlen; - int isshort; - uint16_t dur; - uint8_t type; uint8_t wflags = 0; uint8_t xflags = 0; RUN_LOCK_ASSERT(sc, MA_OWNED); - KASSERT(prot == IEEE80211_PROT_RTSCTS || prot == IEEE80211_PROT_CTSONLY, - ("protection %d", prot)); - - wh = mtod(m, struct ieee80211_frame *); - pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; - type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; - - protrate = ieee80211_ctl_rate(ic->ic_rt, rate); - ackrate = ieee80211_ack_rate(ic->ic_rt, rate); - - isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) - + ieee80211_ack_duration(ic->ic_rt, rate, isshort); - wflags = RT2860_TX_FRAG; - /* check that there are free slots before allocating the mbuf */ if (sc->sc_epq[0].tx_nfree == 0) /* let caller free mbuf */ return (ENOBUFS); - if (prot == IEEE80211_PROT_RTSCTS) { - /* NB: CTS is the same size as an ACK */ - dur += ieee80211_ack_duration(ic->ic_rt, rate, isshort); - xflags |= RT2860_TX_ACK; - mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); - } else { - mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, dur); - } + mprot = ieee80211_alloc_prot(ni, m, rate, prot); if (mprot == NULL) { if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); RUN_DPRINTF(sc, RUN_DEBUG_XMIT, "could not allocate mbuf\n"); return (ENOBUFS); } + + protrate = ieee80211_ctl_rate(ic->ic_rt, rate); + wflags = RT2860_TX_FRAG; + xflags = 0; + if (prot == IEEE80211_PROT_RTSCTS) + xflags |= RT2860_TX_ACK; data = STAILQ_FIRST(&sc->sc_epq[0].tx_fh); STAILQ_REMOVE_HEAD(&sc->sc_epq[0].tx_fh, next); Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Fri Mar 9 10:34:44 2018 (r330687) +++ head/sys/dev/usb/wlan/if_ural.c Fri Mar 9 11:33:56 2018 (r330688) @@ -1130,37 +1130,23 @@ ural_sendprot(struct ural_softc *sc, const struct mbuf *m, struct ieee80211_node *ni, int prot, int rate) { struct ieee80211com *ic = ni->ni_ic; - const struct ieee80211_frame *wh; struct ural_tx_data *data; struct mbuf *mprot; - int protrate, ackrate, pktlen, flags, isshort; - uint16_t dur; + int protrate, flags; - KASSERT(prot == IEEE80211_PROT_RTSCTS || prot == IEEE80211_PROT_CTSONLY, - ("protection %d", prot)); + mprot = ieee80211_alloc_prot(ni, m, rate, prot); + if (mprot == NULL) { + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + device_printf(sc->sc_dev, + "could not allocate mbuf for protection mode %d\n", prot); + return ENOBUFS; + } - wh = mtod(m, const struct ieee80211_frame *); - pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; - protrate = ieee80211_ctl_rate(ic->ic_rt, rate); - ackrate = ieee80211_ack_rate(ic->ic_rt, rate); - - isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) - + ieee80211_ack_duration(ic->ic_rt, rate, isshort); flags = RAL_TX_RETRY(7); - if (prot == IEEE80211_PROT_RTSCTS) { - /* NB: CTS is the same size as an ACK */ - dur += ieee80211_ack_duration(ic->ic_rt, rate, isshort); + if (prot == IEEE80211_PROT_RTSCTS) flags |= RAL_TX_ACK; - mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); - } else { - mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, dur); - } - if (mprot == NULL) { - /* XXX stat + msg */ - return ENOBUFS; - } + data = STAILQ_FIRST(&sc->tx_free); STAILQ_REMOVE_HEAD(&sc->tx_free, next); sc->tx_nfree--; Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Fri Mar 9 10:34:44 2018 (r330687) +++ head/sys/net80211/ieee80211_output.c Fri Mar 9 11:33:56 2018 (r330688) @@ -3088,6 +3088,39 @@ ieee80211_alloc_cts(struct ieee80211com *ic, return m; } +/* + * Wrapper for CTS/RTS frame allocation. + */ +struct mbuf * +ieee80211_alloc_prot(struct ieee80211_node *ni, const struct mbuf *m, + uint8_t rate, int prot) +{ + struct ieee80211com *ic = ni->ni_ic; + const struct ieee80211_frame *wh; + struct mbuf *mprot; + uint16_t dur; + int pktlen, isshort; + + KASSERT(prot == IEEE80211_PROT_RTSCTS || + prot == IEEE80211_PROT_CTSONLY, + ("wrong protection type %d", prot)); + + wh = mtod(m, const struct ieee80211_frame *); + pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; + isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; + dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) + + ieee80211_ack_duration(ic->ic_rt, rate, isshort); + + if (prot == IEEE80211_PROT_RTSCTS) { + /* NB: CTS is the same size as an ACK */ + dur += ieee80211_ack_duration(ic->ic_rt, rate, isshort); + mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); + } else + mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, dur); + + return (mprot); +} + static void ieee80211_tx_mgt_timeout(void *arg) { Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Fri Mar 9 10:34:44 2018 (r330687) +++ head/sys/net80211/ieee80211_proto.h Fri Mar 9 11:33:56 2018 (r330688) @@ -140,6 +140,8 @@ struct mbuf *ieee80211_alloc_rts(struct ieee80211com * const uint8_t [IEEE80211_ADDR_LEN], uint16_t); struct mbuf *ieee80211_alloc_cts(struct ieee80211com *, const uint8_t [IEEE80211_ADDR_LEN], uint16_t); +struct mbuf *ieee80211_alloc_prot(struct ieee80211_node *, + const struct mbuf *, uint8_t, int); uint8_t *ieee80211_add_rates(uint8_t *, const struct ieee80211_rateset *); uint8_t *ieee80211_add_xrates(uint8_t *, const struct ieee80211_rateset *); From owner-svn-src-all@freebsd.org Fri Mar 9 12:16:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2620EF48F05; Fri, 9 Mar 2018 12:16:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD05674115; Fri, 9 Mar 2018 12:16:55 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C398B1F087; Fri, 9 Mar 2018 12:16:55 +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 w29CGtOL043666; Fri, 9 Mar 2018 12:16:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29CGtif043665; Fri, 9 Mar 2018 12:16:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803091216.w29CGtif043665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 9 Mar 2018 12:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330689 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 330689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 12:16:56 -0000 Author: hselasky Date: Fri Mar 9 12:16:55 2018 New Revision: 330689 URL: https://svnweb.freebsd.org/changeset/base/330689 Log: Implement proper support for complete_all() in the LinuxKPI. When complete_all() is called there might be multiple waiters. The current implementation could only handle one waiter. Make sure the completion is sticky when complete_all() is called to be compatible with Linux. Found by: Johannes Lundberg MFC after: 1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 9 11:33:56 2018 (r330688) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 9 12:16:55 2018 (r330689) @@ -1779,11 +1779,14 @@ linux_complete_common(struct completion *c, int all) int wakeup_swapper; sleepq_lock(c); - c->done++; - if (all) + if (all) { + c->done = UINT_MAX; wakeup_swapper = sleepq_broadcast(c, SLEEPQ_SLEEP, 0, 0); - else + } else { + if (c->done != UINT_MAX) + c->done++; wakeup_swapper = sleepq_signal(c, SLEEPQ_SLEEP, 0, 0); + } sleepq_release(c); if (wakeup_swapper) kick_proc0(); @@ -1825,7 +1828,8 @@ linux_wait_for_common(struct completion *c, int flags) } else sleepq_wait(c, 0); } - c->done--; + if (c->done != UINT_MAX) + c->done--; sleepq_release(c); intr: @@ -1878,7 +1882,8 @@ linux_wait_for_timeout_common(struct completion *c, in goto done; } } - c->done--; + if (c->done != UINT_MAX) + c->done--; sleepq_release(c); /* return how many jiffies are left */ @@ -1894,12 +1899,10 @@ linux_try_wait_for_completion(struct completion *c) { int isdone; - isdone = 1; sleepq_lock(c); - if (c->done) + isdone = (c->done != 0); + if (c->done != 0 && c->done != UINT_MAX) c->done--; - else - isdone = 0; sleepq_release(c); return (isdone); } @@ -1909,10 +1912,8 @@ linux_completion_done(struct completion *c) { int isdone; - isdone = 1; sleepq_lock(c); - if (c->done == 0) - isdone = 0; + isdone = (c->done != 0); sleepq_release(c); return (isdone); } From owner-svn-src-all@freebsd.org Fri Mar 9 14:16:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2735F2BAB2; Fri, 9 Mar 2018 14:16:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8630878A15; Fri, 9 Mar 2018 14:16:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 80EE520314; Fri, 9 Mar 2018 14:16:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29EGXdF005295; Fri, 9 Mar 2018 14:16:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29EGXDF005294; Fri, 9 Mar 2018 14:16:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803091416.w29EGXDF005294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 9 Mar 2018 14:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330690 - head/stand X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand X-SVN-Commit-Revision: 330690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 14:16:34 -0000 Author: kevans Date: Fri Mar 9 14:16:33 2018 New Revision: 330690 URL: https://svnweb.freebsd.org/changeset/base/330690 Log: stand: Fix copy-paste-o, unbreaks libi386 lualoader build The 32-bit version of liblua is, in fact, NOT libficl. =) Reported by: emaste Modified: head/stand/loader.mk Modified: head/stand/loader.mk ============================================================================== --- head/stand/loader.mk Fri Mar 9 12:16:55 2018 (r330689) +++ head/stand/loader.mk Fri Mar 9 14:16:33 2018 (r330690) @@ -149,7 +149,7 @@ LIBFICL32= ${BOOTOBJ}/ficl32/libficl.a LIBLUA= ${BOOTOBJ}/liblua/liblua.a .if ${MACHINE} == "i386" -LIBLUA32= ${LIBFICL} +LIBLUA32= ${LIBLUA} .else LIBLUA32= ${BOOTOBJ}/liblua32/liblua.a .endif From owner-svn-src-all@freebsd.org Fri Mar 9 14:27:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9C88F2C87B; Fri, 9 Mar 2018 14:27:02 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::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 7915D79108; Fri, 9 Mar 2018 14:27:02 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x241.google.com with SMTP id v6so3714591iog.7; Fri, 09 Mar 2018 06:27:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xRN/2P36X4H8wKGPX58koS+k6eRNsAteVTboKweL49c=; b=HVo6phendWmD32eLQ1CFXZQ8+vbpt78PONFHglsfoYCmmFVdQdBbmnnKSsHgCL/41e fz61/mFcT3SmBYUdcFTD37Q3bbXpLOVOcVnzwFM/MTflM3XNM6YvGx4FSMdU9qtPskot ThL8RE1/4Opv7OCe5J92mio0rBcl4efHuc/O56KRZk8ATIGUO2zNMyUkKlO+9MonaUA/ PU17dQP3ka6ZyLlGVscVbKmo7dF8pJLG/le95kUSQv1f/VPdhqyxBXxqKaOVRZ9NVAqK Th207bRnqfJLmWp/AOJAxDh/WzyMOMVte7Tqk+9GxeoqRQ4WIfx6XNj+eFmZlBJ/WM9y fLmw== 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=xRN/2P36X4H8wKGPX58koS+k6eRNsAteVTboKweL49c=; b=lTMoTotUg7z23kHKviHl55J1qDgTr79gPmvhQbDNdprT53UITsJ4TGXUlg3O/FlVkF u1lsQT1fJ7lCilhZEzDFCLTHMkS1QuFbljFMw4zLQKzUcqU5aF4f2UUCYcwPaSnbiXW7 ZpmEgrwva0MdJ7gl7sCpXGIbXt+9uPlzhCRIpyY0xehGQrwp7jGdp/K90GSXjq8Mot+H eAd3k9s7lSdbGlvjcfDolJcturG80amxVZnbHvbt5+MZLpn7KlTr/FGrmRl3F9y4U2xV vvtqN9hsSiy01CC72nbpVbggwTvAGNaIMDikrdIffRhum1TlzjrJUC1rTS5zJ8dCUvpp biJw== X-Gm-Message-State: AElRT7GvMVHiJ29SZTIiMVDIBfQw0evUyovrkiWYtl+UmqYqk30ygN+8 vJuA2JibeYpElma/JLNXezRLwndi/L0CEalszt6Jlg== X-Google-Smtp-Source: AG47ELuR5+lBpceVO3kwYcO4VWiDpxSapnf1SLBfAxRupyPrcXtWnac3buNzqLL9pXjLHWWw4eqlAImtehsL7x05yHw= X-Received: by 10.107.134.95 with SMTP id i92mr35399438iod.210.1520605621683; Fri, 09 Mar 2018 06:27:01 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.163.13 with HTTP; Fri, 9 Mar 2018 06:26:40 -0800 (PST) In-Reply-To: References: <201801151837.w0FIb3R7098459@repo.freebsd.org> From: Ed Maste Date: Fri, 9 Mar 2018 09:26:40 -0500 X-Google-Sender-Auth: BzPNyiL6d6ZmFUfxcmOi0dPGV2Q Message-ID: Subject: Re: svn commit: r328011 - in head/sys/amd64/vmm: amd intel To: Kubilay Kocak Cc: FreeBSD Security Team , Tycho Nightingale , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 14:27:03 -0000 On 8 March 2018 at 21:57, Kubilay Kocak wrote: > On 9/03/2018 8:57 am, Ed Maste wrote: >> On 15 January 2018 at 13:37, Tycho Nightingale wrote: >>> Author: tychon >>> Date: Mon Jan 15 18:37:03 2018 >>> New Revision: 328011 >>> URL: https://svnweb.freebsd.org/changeset/base/328011 >>> >>> Log: >>> Provide some mitigation against CVE-2017-5715 by clearing registers >>> upon returning from the guest which aren't immediately clobbered by >>> the host. This eradicates any remaining guest contents limiting their >>> usefulness in an exploit gadget. >> >> Will you MFC this to stable/11? > > Mitigations and related MFC's and SA's, etc for vulnerabilities, are > presumably all being coordinated and handled by secteam, with associated > (explicit) messaging when fixes don't apply to particular > branches/versions, no? Embargoed patches to address specific security vulnerabilities are handled by secteam, and are committed to all branches simultaneously. For cases like this, where it's a mitigation or other improvement that is already committed to CURRENT, it's best if the domain expert / original committer handles the merge. That said, I'm happy to take care of the merge if desired. From owner-svn-src-all@freebsd.org Fri Mar 9 14:34:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F75FF2D391; Fri, 9 Mar 2018 14:34:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0ADD97982B; Fri, 9 Mar 2018 14:34:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 014D62061F; Fri, 9 Mar 2018 14:34:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29EYg0U014971; Fri, 9 Mar 2018 14:34:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29EYgOb014970; Fri, 9 Mar 2018 14:34:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201803091434.w29EYgOb014970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 9 Mar 2018 14:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330691 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 330691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 14:34:43 -0000 Author: kib Date: Fri Mar 9 14:34:42 2018 New Revision: 330691 URL: https://svnweb.freebsd.org/changeset/base/330691 Log: MFC r330285: Remove _Nonnull attributes from user addresses arguments for copyout(9) family. Modified: stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Fri Mar 9 14:16:33 2018 (r330690) +++ stable/11/sys/sys/systm.h Fri Mar 9 14:34:42 2018 (r330691) @@ -269,14 +269,14 @@ int copystr(const void * _Nonnull __restrict kfaddr, int copyinstr(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len, size_t * __restrict lencopied); -int copyin(const void * _Nonnull __restrict udaddr, +int copyin(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); -int copyin_nofault(const void * _Nonnull __restrict udaddr, +int copyin_nofault(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); int copyout(const void * _Nonnull __restrict kaddr, - void * _Nonnull __restrict udaddr, size_t len); + void * __restrict udaddr, size_t len); int copyout_nofault(const void * _Nonnull __restrict kaddr, - void * _Nonnull __restrict udaddr, size_t len); + void * __restrict udaddr, size_t len); int fubyte(volatile const void *base); long fuword(volatile const void *base); From owner-svn-src-all@freebsd.org Fri Mar 9 14:36:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0BF5F2D694; Fri, 9 Mar 2018 14:36:49 +0000 (UTC) (envelope-from tychon@freebsd.org) Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DE0479A2E; Fri, 9 Mar 2018 14:36:49 +0000 (UTC) (envelope-from tychon@freebsd.org) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id B8A77DC824; Fri, 9 Mar 2018 09:36:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=sasl; bh= +RW4R4nYyphtbmEc9b3QO85NQB4=; b=uGK1E7TiD9EtoJyxe0EehHjDdYTjv1vi RJQKAisLJgLjP2nwAh+ahChNzvbX4B3Jj7+QekvhM7rK6YTJyoTQR28hp6rUN6fK 58oFkTaAJ5lU/830VOIXRgbDlmbu1IyigRiItAt7Ac2hQuJ8gOoQFnusM/9rkXEb OLm9KgeC3NY= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id AF847DC823; Fri, 9 Mar 2018 09:36:41 -0500 (EST) Received: from [10.0.1.195] (unknown [146.115.68.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 11BBCDC821; Fri, 9 Mar 2018 09:36:41 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: svn commit: r328011 - in head/sys/amd64/vmm: amd intel From: Tycho Nightingale In-Reply-To: Date: Fri, 9 Mar 2018 09:36:40 -0500 Cc: Kubilay Kocak , FreeBSD Security Team , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Content-Transfer-Encoding: quoted-printable Message-Id: References: <201801151837.w0FIb3R7098459@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3445.5.20) X-Pobox-Relay-ID: 482CC228-23A7-11E8-B669-44CE1968708C-09779102!pb-smtp1.pobox.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 14:36:50 -0000 > On Mar 9, 2018, at 9:26 AM, Ed Maste wrote: >=20 > On 8 March 2018 at 21:57, Kubilay Kocak wrote: >> On 9/03/2018 8:57 am, Ed Maste wrote: >>> On 15 January 2018 at 13:37, Tycho Nightingale = wrote: >>>> Author: tychon >>>> Date: Mon Jan 15 18:37:03 2018 >>>> New Revision: 328011 >>>> URL: https://svnweb.freebsd.org/changeset/base/328011 >>>>=20 >>>> Log: >>>> Provide some mitigation against CVE-2017-5715 by clearing = registers >>>> upon returning from the guest which aren't immediately clobbered = by >>>> the host. This eradicates any remaining guest contents limiting = their >>>> usefulness in an exploit gadget. >>>=20 >>> Will you MFC this to stable/11? >>=20 >> Mitigations and related MFC's and SA's, etc for vulnerabilities, are >> presumably all being coordinated and handled by secteam, with = associated >> (explicit) messaging when fixes don't apply to particular >> branches/versions, no? >=20 > Embargoed patches to address specific security vulnerabilities are > handled by secteam, and are committed to all branches simultaneously. >=20 > For cases like this, where it's a mitigation or other improvement that > is already committed to CURRENT, it's best if the domain expert / > original committer handles the merge. That said, I'm happy to take > care of the merge if desired. No worries, I will merge this and r329162 too. Tycho From owner-svn-src-all@freebsd.org Fri Mar 9 14:38:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CDCAF2D926; Fri, 9 Mar 2018 14:38:47 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A7B779C21; Fri, 9 Mar 2018 14:38:47 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30AFE20622; Fri, 9 Mar 2018 14:38:47 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29EcljJ015194; Fri, 9 Mar 2018 14:38:47 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29EclCa015193; Fri, 9 Mar 2018 14:38:47 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803091438.w29EclCa015193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 9 Mar 2018 14:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330692 - stable/11/sbin/dhclient X-SVN-Group: stable-11 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/11/sbin/dhclient X-SVN-Commit-Revision: 330692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 14:38:47 -0000 Author: dab Date: Fri Mar 9 14:38:46 2018 New Revision: 330692 URL: https://svnweb.freebsd.org/changeset/base/330692 Log: MFC r330085: dhclient violates RFC2131 when sending early DHCPREQUEST message to re-obtain old IP When dhclient first starts, if an old IP address exists in the dhclient.leases file, dhclient(8) sends early DHCPREQUEST message(s) in an attempt to re-obtain the old IP address again. These messages contain the old IP as a requested-IP-address option in the message body (correct) but also use the old IP address as the packet's source IP (incorrect). RFC2131 sec 4.1 states: DHCP messages broadcast by a client prior to that client obtaining its IP address must have the source address field in the IP header set to 0. The use of the old IP as the packet's source address is incorrect if (a) the computer is now on a different network or (b) it is on the same network, but the old IP has been reallocated to another host. Fix dhclient to use 0.0.0.0 as the source IP in this circumstance without removing any existing functionality. Any previously-used old IP is still requested in the body of an early DHCPREQUEST message. PR: 199378 Submitted by: J.R. Oldroyd Reported by: J.R. Oldroyd Sponsored by: Dell EMC Modified: stable/11/sbin/dhclient/dhclient.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/dhclient/dhclient.c ============================================================================== --- stable/11/sbin/dhclient/dhclient.c Fri Mar 9 14:34:42 2018 (r330691) +++ stable/11/sbin/dhclient/dhclient.c Fri Mar 9 14:38:46 2018 (r330692) @@ -1478,7 +1478,8 @@ cancel: memcpy(&to.s_addr, ip->client->destination.iabuf, sizeof(to.s_addr)); - if (ip->client->state != S_REQUESTING) + if (ip->client->state != S_REQUESTING && + ip->client->state != S_REBOOTING) memcpy(&from, ip->client->active->address.iabuf, sizeof(from)); else From owner-svn-src-all@freebsd.org Fri Mar 9 14:39:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 590D2F2DA1C; Fri, 9 Mar 2018 14:39:29 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07CCB79E37; Fri, 9 Mar 2018 14:39:29 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02B2820625; Fri, 9 Mar 2018 14:39:29 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29EdSLe015419; Fri, 9 Mar 2018 14:39:28 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29EdS3F015418; Fri, 9 Mar 2018 14:39:28 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803091439.w29EdS3F015418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 9 Mar 2018 14:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330693 - stable/10/sbin/dhclient X-SVN-Group: stable-10 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/10/sbin/dhclient X-SVN-Commit-Revision: 330693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 14:39:29 -0000 Author: dab Date: Fri Mar 9 14:39:28 2018 New Revision: 330693 URL: https://svnweb.freebsd.org/changeset/base/330693 Log: MFC r330085: dhclient violates RFC2131 when sending early DHCPREQUEST message to re-obtain old IP When dhclient first starts, if an old IP address exists in the dhclient.leases file, dhclient(8) sends early DHCPREQUEST message(s) in an attempt to re-obtain the old IP address again. These messages contain the old IP as a requested-IP-address option in the message body (correct) but also use the old IP address as the packet's source IP (incorrect). RFC2131 sec 4.1 states: DHCP messages broadcast by a client prior to that client obtaining its IP address must have the source address field in the IP header set to 0. The use of the old IP as the packet's source address is incorrect if (a) the computer is now on a different network or (b) it is on the same network, but the old IP has been reallocated to another host. Fix dhclient to use 0.0.0.0 as the source IP in this circumstance without removing any existing functionality. Any previously-used old IP is still requested in the body of an early DHCPREQUEST message. PR: 199378 Submitted by: J.R. Oldroyd Reported by: J.R. Oldroyd Sponsored by: Dell EMC Modified: stable/10/sbin/dhclient/dhclient.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dhclient/dhclient.c ============================================================================== --- stable/10/sbin/dhclient/dhclient.c Fri Mar 9 14:38:46 2018 (r330692) +++ stable/10/sbin/dhclient/dhclient.c Fri Mar 9 14:39:28 2018 (r330693) @@ -1460,7 +1460,8 @@ cancel: memcpy(&to.s_addr, ip->client->destination.iabuf, sizeof(to.s_addr)); - if (ip->client->state != S_REQUESTING) + if (ip->client->state != S_REQUESTING && + ip->client->state != S_REBOOTING) memcpy(&from, ip->client->active->address.iabuf, sizeof(from)); else From owner-svn-src-all@freebsd.org Fri Mar 9 14:45:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6935DF2E1E2; Fri, 9 Mar 2018 14:45:20 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 724E17A485; Fri, 9 Mar 2018 14:45:18 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A0B6207C5; Fri, 9 Mar 2018 14:45:18 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29EjHjD021110; Fri, 9 Mar 2018 14:45:17 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29EjHgU021108; Fri, 9 Mar 2018 14:45:17 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803091445.w29EjHgU021108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 9 Mar 2018 14:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330694 - in stable/11/usr.sbin/pw: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: in stable/11/usr.sbin/pw: . tests X-SVN-Commit-Revision: 330694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 14:45:20 -0000 Author: dab Date: Fri Mar 9 14:45:17 2018 New Revision: 330694 URL: https://svnweb.freebsd.org/changeset/base/330694 Log: MFC r330245: Allow the "@" and "!" characters in passwd file GECOS fields. Two PRs (152084 & 210187) request allowing the "@" and/or "!" characters in the passwd file GECOS field. The man page for pw does not mention that those characters are disallowed, Linux supports those characters in this field, and the "@" character in particular would be useful for storing email addresses in that field. PR: 152084, 210187 Submitted by: jschauma@netmeister.org, Dave Cottlehuber Reported by: jschauma@netmeister.org, Dave Cottlehuber Sponsored by: Dell EMC Modified: stable/11/usr.sbin/pw/pw_user.c stable/11/usr.sbin/pw/tests/pw_useradd_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pw/pw_user.c ============================================================================== --- stable/11/usr.sbin/pw/pw_user.c Fri Mar 9 14:39:28 2018 (r330693) +++ stable/11/usr.sbin/pw/pw_user.c Fri Mar 9 14:45:17 2018 (r330694) @@ -632,7 +632,7 @@ pw_checkname(char *name, int gecos) reject = 0; if (gecos) { /* See if the name is valid as a gecos (comment) field. */ - badchars = ":!@"; + badchars = ":"; showtype = "gecos field"; } else { /* See if the name is valid as a userid or group. */ Modified: stable/11/usr.sbin/pw/tests/pw_useradd_test.sh ============================================================================== --- stable/11/usr.sbin/pw/tests/pw_useradd_test.sh Fri Mar 9 14:39:28 2018 (r330693) +++ stable/11/usr.sbin/pw/tests/pw_useradd_test.sh Fri Mar 9 14:45:17 2018 (r330694) @@ -27,9 +27,9 @@ atf_test_case user_add_comments user_add_comments_body() { populate_etc_skel - atf_check -s exit:0 ${PW} useradd test -c "Test User,work,123,456" - atf_check -s exit:0 -o match:"^test:.*:Test User,work,123,456:" \ - grep "^test:.*:Test User,work,123,456:" $HOME/master.passwd + atf_check -s exit:0 ${PW} useradd test -c 'Test User,work!,123,user@example.com' + atf_check -s exit:0 -o match:'^test:.*:Test User,work!,123,user@example.com:' \ + grep '^test:.*:Test User,work!,123,user@example.com:' $HOME/master.passwd } # Test add user with comments and option -N From owner-svn-src-all@freebsd.org Fri Mar 9 14:45:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5221EF2E265; Fri, 9 Mar 2018 14:45:48 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07B357A68C; Fri, 9 Mar 2018 14:45:48 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0287C207C8; Fri, 9 Mar 2018 14:45:48 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29Ejl96021196; Fri, 9 Mar 2018 14:45:47 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29Ejluq021194; Fri, 9 Mar 2018 14:45:47 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803091445.w29Ejluq021194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 9 Mar 2018 14:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330695 - in stable/10/usr.sbin/pw: . tests X-SVN-Group: stable-10 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: in stable/10/usr.sbin/pw: . tests X-SVN-Commit-Revision: 330695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 14:45:48 -0000 Author: dab Date: Fri Mar 9 14:45:47 2018 New Revision: 330695 URL: https://svnweb.freebsd.org/changeset/base/330695 Log: MFC r330245: Allow the "@" and "!" characters in passwd file GECOS fields. Two PRs (152084 & 210187) request allowing the "@" and/or "!" characters in the passwd file GECOS field. The man page for pw does not mention that those characters are disallowed, Linux supports those characters in this field, and the "@" character in particular would be useful for storing email addresses in that field. PR: 152084, 210187 Submitted by: jschauma@netmeister.org, Dave Cottlehuber Reported by: jschauma@netmeister.org, Dave Cottlehuber Sponsored by: Dell EMC Modified: stable/10/usr.sbin/pw/pw_user.c stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Fri Mar 9 14:45:17 2018 (r330694) +++ stable/10/usr.sbin/pw/pw_user.c Fri Mar 9 14:45:47 2018 (r330695) @@ -632,7 +632,7 @@ pw_checkname(char *name, int gecos) reject = 0; if (gecos) { /* See if the name is valid as a gecos (comment) field. */ - badchars = ":!@"; + badchars = ":"; showtype = "gecos field"; } else { /* See if the name is valid as a userid or group. */ Modified: stable/10/usr.sbin/pw/tests/pw_useradd_test.sh ============================================================================== --- stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Fri Mar 9 14:45:17 2018 (r330694) +++ stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Fri Mar 9 14:45:47 2018 (r330695) @@ -27,9 +27,9 @@ atf_test_case user_add_comments user_add_comments_body() { populate_etc_skel - atf_check -s exit:0 ${PW} useradd test -c "Test User,work,123,456" - atf_check -s exit:0 -o match:"^test:.*:Test User,work,123,456:" \ - grep "^test:.*:Test User,work,123,456:" $HOME/master.passwd + atf_check -s exit:0 ${PW} useradd test -c 'Test User,work!,123,user@example.com' + atf_check -s exit:0 -o match:'^test:.*:Test User,work!,123,user@example.com:' \ + grep '^test:.*:Test User,work!,123,user@example.com:' $HOME/master.passwd } # Test add user with comments and option -N From owner-svn-src-all@freebsd.org Fri Mar 9 15:28:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1CA1F31985; Fri, 9 Mar 2018 15:28:42 +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 576827C37C; Fri, 9 Mar 2018 15:28:41 +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 w29FScTG065006; Fri, 9 Mar 2018 07:28:38 -0800 (PST) (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 w29FSabK065005; Fri, 9 Mar 2018 07:28:36 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803091528.w29FSabK065005@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: <20180309110240.GA77718@FreeBSD.org> To: Alexey Dokuchaev Date: Fri, 9 Mar 2018 07:28:36 -0800 (PST) CC: Eitan Adler , John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 15:28:43 -0000 > On Wed, Mar 07, 2018 at 02:53:49PM -0800, Eitan Adler wrote: > > On 7 March 2018 at 09:37, John Baldwin wrote: > > > ... > > > I suspect many of these changes for iwm, etc. are all intertwined > > > so I'm not sure if you can leave out individual ones. > > > > Possibly. I do have iwm working on my laptop though. I also know of > > one open PR assigned to me w.r.t. a model I don't own. I'll be > > addressing it some time this week. > > I often have mixed feelings when I see lots of similar changes (i.e. > that make up for better hardware support, esp. on a laptop) MFCed. > I'd rather see laptop users run -CURRENT and leave -STABLE branches > for very conservative (server?) users who can't/don't want to afford > the risks of running -CURRENT or require ABI stability in a really > long run, rather than binge-merging things. :-) > > By default it should be -CURRENT all over; it's a very good thing > that we as a Project ourselves are doing this as part of our own > dogfood eating strategy. As a data point just last night a person came into #freebsd irc channel with a none working wireless nic on a desktop, he was attemtping to use a Realteak RTL8192EU on 11.1-RELEASE. Someone had already told him to try urtwn driver, which in -current is the right driver and supports this device. It did not work for him. This is about when I came in to the discussion, and helped to confirm that -current did infact have support for this device, and that this supported had existed in -current for 16 months, and that this support would not be a simple grab a couple driver files and build it on 11.1. The commit to add this support involves 46 files, which 18 of are new files. My feelings are if this driver has been in -current for 16 months why is it NOT in -stable yet? I know part of the answer "its not a simple merge". But as a project this is egg on our face. We can merge a new very complicated change to a our boot code, within a few months (thank you kevans for that work), but we can not merge back a device driver in 16? As a semi- regular visit to the FreeBSD irc help room, I try to go there once a month and spend 8 hours helping people with any problem them might have, I see this lack of driver support in stable/ regularly. On my last visit it was the iwn driver adding 8565 support, I reached out to GNN who did the -current work, again a significant time ago, the commit had a MFC: 1 month in it. George replied to me that it turned out to be non-trivial to merge due to other dependencies. I procurred an offer from the reporting person to test patches if I could get them put togeather, and he accepted. George agreed to review these patches for me. A few days later eadler merged a good deal of code in this area. I informed George of concerns about that and left it lie. Jhb stepped in and clearly identified abi breakage, which I believe has been reverted. I have made an offer to eadler to pass my tester of the Intel 8565 on to him, which I have received no reply from him, but from someone else that said they would test it "this weekend" I do not know if stable/11 is in a state that this driver should or should not work now. Regards, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 9 15:30:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0184AF31B65; Fri, 9 Mar 2018 15:30:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5ED27C525; Fri, 9 Mar 2018 15:30:20 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C0F020DFB; Fri, 9 Mar 2018 15:30:20 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29FUKFe041286; Fri, 9 Mar 2018 15:30:20 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29FUKin041283; Fri, 9 Mar 2018 15:30:20 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803091530.w29FUKin041283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 9 Mar 2018 15:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330696 - in head/libexec/tftpd: . tests X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/libexec/tftpd: . tests X-SVN-Commit-Revision: 330696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 15:30:21 -0000 Author: asomers Date: Fri Mar 9 15:30:20 2018 New Revision: 330696 URL: https://svnweb.freebsd.org/changeset/base/330696 Log: Add some functional tests for tftpd(8) tftpd(8) is difficult to test in isolation due to its relationship with inetd. Create a test program that mimics the behavior of tftp(1) and inetd(8) and verifies tftpd's response in several different scenarios. These test cases cover all of the basic TFTP protocol, but not the optional parts. PR: 157700 PR: 225996 PR: 226004 PR: 226005 MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D14310 Added: head/libexec/tftpd/tests/ head/libexec/tftpd/tests/Makefile (contents, props changed) head/libexec/tftpd/tests/functional.c (contents, props changed) Modified: head/libexec/tftpd/Makefile Modified: head/libexec/tftpd/Makefile ============================================================================== --- head/libexec/tftpd/Makefile Fri Mar 9 14:45:47 2018 (r330695) +++ head/libexec/tftpd/Makefile Fri Mar 9 15:30:20 2018 (r330696) @@ -14,4 +14,7 @@ CFLAGS+= -DLIBWRAP LIBADD= wrap .endif +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include Added: head/libexec/tftpd/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/tftpd/tests/Makefile Fri Mar 9 15:30:20 2018 (r330696) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.include + +# Skip on GCC 4.2, because it lacks __COUNTER__ +.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40300 +ATF_TESTS_C= functional +TEST_METADATA.functional+= timeout=15 +.endif + +LIBADD= util +WARNS?= 6 + +.include Added: head/libexec/tftpd/tests/functional.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/tftpd/tests/functional.c Fri Mar 9 15:30:20 2018 (r330696) @@ -0,0 +1,1006 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Alan Somers. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +static const uint16_t BASEPORT = 6969; +static const char pidfile[] = "tftpd.pid"; +static int protocol = PF_UNSPEC; +static int s = -1; /* tftp client socket */ +static struct sockaddr_storage addr; /* Destination address for the client */ +static bool s_flag = false; /* Pass -s to tftpd */ +static bool w_flag = false; /* Pass -w to tftpd */ + +/* Helper functions*/ +static void require_bufeq(const char *expected, ssize_t expected_len, + const char *actual, ssize_t len); + +/* + * Receive a response from tftpd + * @param hdr The reply's expected header, as a char array + * @param contents The reply's expected contents, as a char array + * @param contents_len Length of contents + */ +#define RECV(hdr, contents, contents_len) do { \ + char buffer[1024]; \ + struct sockaddr_storage from; \ + socklen_t fromlen = sizeof(from); \ + ssize_t r = recvfrom(s, buffer, sizeof(buffer), 0, \ + (struct sockaddr*)&from, &fromlen); \ + ATF_REQUIRE(r > 0); \ + require_bufeq((hdr), sizeof(hdr), buffer, \ + MIN(r, (ssize_t)sizeof(hdr))); \ + require_bufeq((const char*) (contents), (contents_len), \ + &buffer[sizeof(hdr)], r - sizeof(hdr)); \ + if (protocol == PF_INET) { \ + ((struct sockaddr_in*)&addr)->sin_port = \ + ((struct sockaddr_in*)&from)->sin_port; \ + } else { \ + ((struct sockaddr_in6*)&addr)->sin6_port = \ + ((struct sockaddr_in6*)&from)->sin6_port; \ + } \ +} while(0) + +static void +recv_ack(uint16_t blocknum) +{ + char hdr[] = {0, 4, blocknum >> 8, blocknum & 0xFF}; + RECV(hdr, NULL, 0); +} + +/* + * Receive a data packet from tftpd + * @param blocknum Expected block number to be received + * @param contents Pointer to expected contents + * @param contents_len Length of contents expected to receive + */ +static void +recv_data(uint16_t blocknum, const char* contents, size_t contents_len) +{ + char hdr[] = {0, 3, blocknum >> 8, blocknum & 0xFF}; + RECV(hdr, contents, contents_len); +} + +#define RECV_ERROR(code, msg) do { \ + char hdr[] = {0, 5, code >> 8, code & 0xFF}; \ + RECV(hdr, msg, sizeof(msg)); \ +} while (0) + +/* + * send a command to tftpd. + * @param cmd Command to send, as a char array + */ +static void +send_bytes(const void* cmd, ssize_t len) +{ + ssize_t r; + + r = sendto(s, cmd, len, 0, (struct sockaddr*)(&addr), addr.ss_len); + ATF_REQUIRE_EQ(r, len); +} + +static void +send_data(uint16_t blocknum, const char* contents, size_t contents_len) +{ + char buffer[1024]; + + buffer[0] = 0; /* DATA opcode high byte */ + buffer[1] = 3; /* DATA opcode low byte */ + buffer[2] = blocknum >> 8; + buffer[3] = blocknum & 0xFF; + memmove(&buffer[4], contents, contents_len); + send_bytes(buffer, 4 + contents_len); +} + +/* + * send a command to tftpd. + * @param cmd Command to send, as a const string + * (terminating NUL will be ignored) + */ +#define SEND_STR(cmd) ATF_REQUIRE_EQ( \ + sendto(s, (cmd), sizeof(cmd) - 1, 0, (struct sockaddr*)(&addr), \ + addr.ss_len), \ + sizeof(cmd) - 1) + +/* + * Acknowledge block blocknum + */ +static void +send_ack(uint16_t blocknum) +{ + char packet[] = { + 0, 4, /* ACK opcode in BE */ + blocknum >> 8, + blocknum & 0xFF + }; + + send_bytes(packet, sizeof(packet)); + +} + +/* + * send a read request to tftpd. + * @param filename filename as a string, absolute or relative + * @param mode either "octet" or "netascii" + */ +#define SEND_RRQ(filename, mode) SEND_STR("\0\001" filename "\0" mode "\0") + +/* + * send a write request to tftpd. + * @param filename filename as a string, absolute or relative + * @param mode either "octet" or "netascii" + */ +#define SEND_WRQ(filename, mode) SEND_STR("\0\002" filename "\0" mode "\0") + +/* Define a test case, for both IPv4 and IPv6 */ +#define TFTPD_TC_DEFINE(name, head, ...) \ +static void \ +name ## _body(void); \ +ATF_TC_WITH_CLEANUP(name ## _v4); \ +ATF_TC_HEAD(name ## _v4, tc) \ +{ \ + head \ +} \ +ATF_TC_BODY(name ## _v4, tc) \ +{ \ + __VA_ARGS__; \ + protocol = AF_INET; \ + s = setup(&addr, __COUNTER__); \ + name ## _body(); \ + close(s); \ +} \ +ATF_TC_CLEANUP(name ## _v4, tc) \ +{ \ + cleanup(); \ +} \ +ATF_TC_WITH_CLEANUP(name ## _v6); \ +ATF_TC_HEAD(name ## _v6, tc) \ +{ \ + head \ +} \ +ATF_TC_BODY(name ## _v6, tc) \ +{ \ + __VA_ARGS__; \ + protocol = AF_INET6; \ + s = setup(&addr, __COUNTER__); \ + name ## _body(); \ + close(s); \ +} \ +ATF_TC_CLEANUP(name ## _v6, tc) \ +{ \ + cleanup(); \ +} \ +static void \ +name ## _body(void) + +/* Add the IPv4 and IPv6 versions of a test case */ +#define TFTPD_TC_ADD(tp, name ) \ +do { \ + ATF_TP_ADD_TC(tp, name ## _v4); \ + ATF_TP_ADD_TC(tp, name ## _v6); \ +} while (0) + +/* Standard cleanup used by all testcases */ +static void +cleanup(void) +{ + int fd = -1; + char buffer[80] = {0}; + pid_t pid; + + fd = open(pidfile, O_RDONLY); + if (fd < 0) + return; + if (read(fd, buffer, sizeof(buffer)) > 0) { + sscanf(buffer, "%d", &pid); + kill(pid, SIGTERM); + waitpid(pid, NULL, 0); + } + close(fd); + unlink(pidfile); +} + +/* Assert that two binary buffers are identical */ +static void +require_bufeq(const char *expected, ssize_t expected_len, const char *actual, + ssize_t len) +{ + ssize_t i; + + ATF_REQUIRE_EQ_MSG(expected_len, len, + "Expected %ld bytes but got %ld", expected_len, len); + for (i = 0; i < len; i++) { + ATF_REQUIRE_EQ_MSG(actual[i], expected[i], + "Expected %#hhx at position %ld; got %hhx instead", + expected[i], i, actual[i]); + } +} + +/* + * Start tftpd and return its communicating socket + * @param to Will be filled in for use with sendto + * @param idx Unique identifier of the test case + * @return Socket ready to use + */ +static int +setup(struct sockaddr_storage *to, uint16_t idx) +{ + int client_s, server_s, pid, argv_idx; + char execname[] = "/usr/libexec/tftpd"; + char s_flag_str[] = "-s"; + char w_flag_str[] = "-w"; + char pwd[MAXPATHLEN]; + char *argv[10]; + struct sockaddr_in addr4; + struct sockaddr_in6 addr6; + struct sockaddr *server_addr; + struct pidfh *pfh; + uint16_t port = BASEPORT + idx; + socklen_t len; + + if (protocol == PF_INET) { + len = sizeof(addr4); + bzero(&addr4, len); + addr4.sin_len = len; + addr4.sin_family = PF_INET; + addr4.sin_port = htons(port); + server_addr = (struct sockaddr*)&addr4; + } else { + len = sizeof(addr6); + bzero(&addr6, len); + addr6.sin6_len = len; + addr6.sin6_family = PF_INET6; + addr6.sin6_port = htons(port); + server_addr = (struct sockaddr*)&addr6; + } + + ATF_REQUIRE_EQ(getcwd(pwd, sizeof(pwd)), pwd); + + /* Must bind(2) pre-fork so it happens before the client's send(2) */ + ATF_REQUIRE((server_s = socket(protocol, SOCK_DGRAM, 0)) > 0); + ATF_REQUIRE_EQ_MSG(bind(server_s, server_addr, len), 0, + "bind failed with error %s", strerror(errno)); + + pid = fork(); + switch (pid) { + case -1: + atf_tc_fail("fork failed"); + break; + case 0: + /* In child */ + pfh = pidfile_open(pidfile, 0644, NULL); + ATF_REQUIRE_MSG(pfh != NULL, + "pidfile_open: %s", strerror(errno)); + ATF_REQUIRE_EQ(pidfile_write(pfh), 0); + ATF_REQUIRE_EQ(pidfile_close(pfh), 0); + + bzero(argv, sizeof(argv)); + argv[0] = execname; + argv_idx = 1; + if (w_flag) + argv[argv_idx++] = w_flag_str; + if (s_flag) + argv[argv_idx++] = s_flag_str; + argv[argv_idx++] = pwd; + ATF_REQUIRE_EQ(dup2(server_s, STDOUT_FILENO), STDOUT_FILENO); + ATF_REQUIRE_EQ(dup2(server_s, STDIN_FILENO), STDIN_FILENO); + ATF_REQUIRE_EQ(dup2(server_s, STDERR_FILENO), STDERR_FILENO); + execv(execname, argv); + atf_tc_fail("exec failed"); + break; + default: + /* In parent */ + bzero(to, sizeof(*to)); + if (protocol == PF_INET) { + struct sockaddr_in *to4 = (struct sockaddr_in*)to; + to4->sin_len = sizeof(*to4); + to4->sin_family = PF_INET; + to4->sin_port = htons(port); + to4->sin_addr.s_addr = htonl(INADDR_LOOPBACK); + } else { + struct in6_addr loopback = IN6ADDR_LOOPBACK_INIT; + struct sockaddr_in6 *to6 = (struct sockaddr_in6*)to; + to6->sin6_len = sizeof(*to6); + to6->sin6_family = PF_INET6; + to6->sin6_port = htons(port); + to6->sin6_addr = loopback; + } + + close(server_s); + ATF_REQUIRE((client_s = socket(protocol, SOCK_DGRAM, 0)) > 0); + break; + } + return (client_s); +} + +/* Like write(2), but never returns less than the requested length */ +static void +write_all(int fd, const void *buf, size_t nbytes) +{ + ssize_t r; + + while (nbytes > 0) { + r = write(fd, buf, nbytes); + ATF_REQUIRE(r > 0); + nbytes -= r; + buf = (const char*)buf + r; + } +} + + +/* + * Test Cases + */ + +/* + * Read a file, specified by absolute pathname. + */ +TFTPD_TC_DEFINE(abspath,) +{ + int fd; + char command[1024]; + size_t pathlen; + char suffix[] = {'\0', 'o', 'c', 't', 'e', 't', '\0'}; + + command[0] = 0; /* RRQ high byte */ + command[1] = 1; /* RRQ low byte */ + ATF_REQUIRE(getcwd(&command[2], sizeof(command) - 2) != NULL); + pathlen = strlcat(&command[2], "/abspath.txt", sizeof(command) - 2); + ATF_REQUIRE(pathlen + sizeof(suffix) < sizeof(command) - 2); + memmove(&command[2 + pathlen], suffix, sizeof(suffix)); + + fd = open("abspath.txt", O_CREAT | O_RDONLY, 0644); + ATF_REQUIRE(fd >= 0); + close(fd); + + send_bytes(command, 2 + pathlen + sizeof(suffix)); + recv_data(1, NULL, 0); + send_ack(1); +} + +/* + * Attempt to read a file outside of the allowed directory(ies) + */ +TFTPD_TC_DEFINE(dotdot,) +{ + ATF_REQUIRE_EQ(mkdir("subdir", 0777), 0); + SEND_RRQ("../disallowed.txt", "octet"); + RECV_ERROR(2, "Access violation"); + s = setup(&addr, __COUNTER__); \ + SEND_RRQ("subdir/../../disallowed.txt", "octet"); + RECV_ERROR(2, "Access violation"); + s = setup(&addr, __COUNTER__); \ + SEND_RRQ("/etc/passwd", "octet"); + RECV_ERROR(2, "Access violation"); +} + +/* + * With "-s", tftpd should chroot to the specified directory + */ +TFTPD_TC_DEFINE(s_flag, atf_tc_set_md_var(tc, "require.user", "root");, + s_flag = true) +{ + int fd; + char contents[] = "small"; + + fd = open("small.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, strlen(contents) + 1); + close(fd); + + SEND_RRQ("/small.txt", "octet"); + recv_data(1, contents, strlen(contents) + 1); + send_ack(1); +} + +/* + * Read a file, and simulate a dropped ACK packet + */ +TFTPD_TC_DEFINE(rrq_dropped_ack,) +{ + int fd; + char contents[] = "small"; + + fd = open("small.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, strlen(contents) + 1); + close(fd); + + SEND_RRQ("small.txt", "octet"); + recv_data(1, contents, strlen(contents) + 1); + /* + * client "sends" the ack, but network drops it + * Eventually, tftpd should resend the data packet + */ + recv_data(1, contents, strlen(contents) + 1); + send_ack(1); +} + +/* + * Read a file, and simulate a dropped DATA packet + */ +TFTPD_TC_DEFINE(rrq_dropped_data,) +{ + int fd; + size_t i; + uint32_t contents[192]; + char buffer[1024]; + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, sizeof(contents)); + close(fd); + + SEND_RRQ("medium.txt", "octet"); + recv_data(1, (const char*)&contents[0], 512); + send_ack(1); + (void) recvfrom(s, buffer, sizeof(buffer), 0, NULL, NULL); + /* + * server "sends" the data, but network drops it + * Eventually, client should resend the last ACK + */ + send_ack(1); + recv_data(2, (const char*)&contents[128], 256); + send_ack(2); +} + +/* + * Read a medium file, and simulate a duplicated ACK packet + */ +TFTPD_TC_DEFINE(rrq_duped_ack,) +{ + int fd; + size_t i; + uint32_t contents[192]; + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, sizeof(contents)); + close(fd); + + SEND_RRQ("medium.txt", "octet"); + recv_data(1, (const char*)&contents[0], 512); + send_ack(1); + send_ack(1); /* Dupe an ACK packet */ + recv_data(2, (const char*)&contents[128], 256); + recv_data(2, (const char*)&contents[128], 256); + send_ack(2); +} + + +/* + * Attempt to read a file without read permissions + */ +TFTPD_TC_DEFINE(rrq_eaccess,) +{ + int fd; + + fd = open("empty.txt", O_CREAT | O_RDONLY, 0000); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_RRQ("empty.txt", "octet"); + RECV_ERROR(2, "Access violation"); +} + +/* + * Read an empty file + */ +TFTPD_TC_DEFINE(rrq_empty,) +{ + int fd; + + fd = open("empty.txt", O_CREAT | O_RDONLY, 0644); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_RRQ("empty.txt", "octet"); + recv_data(1, NULL, 0); + send_ack(1); +} + +/* + * Read a medium file of more than one block + */ +TFTPD_TC_DEFINE(rrq_medium,) +{ + int fd; + size_t i; + uint32_t contents[192]; + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, sizeof(contents)); + close(fd); + + SEND_RRQ("medium.txt", "octet"); + recv_data(1, (const char*)&contents[0], 512); + send_ack(1); + recv_data(2, (const char*)&contents[128], 256); + send_ack(2); +} + +/* + * Read a file in netascii format + */ +TFTPD_TC_DEFINE(rrq_netascii,) +{ + int fd; + char contents[] = "foo\nbar\rbaz\n"; + /* + * Weirdly, RFC-764 says that CR must be followed by NUL if a line feed + * is not intended + */ + char expected[] = "foo\r\nbar\r\0baz\r\n"; + + fd = open("unix.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, strlen(contents) + 1); + close(fd); + + SEND_RRQ("unix.txt", "netascii"); + recv_data(1, expected, sizeof(expected)); + send_ack(1); +} + +/* + * Read a file that doesn't exist + */ +TFTPD_TC_DEFINE(rrq_nonexistent,) +{ + SEND_RRQ("nonexistent.txt", "octet"); + RECV_ERROR(1, "File not found"); +} + +/* + * Attempt to read a file whose name exceeds PATH_MAX + */ +TFTPD_TC_DEFINE(rrq_path_max,) +{ +#define AReallyBigFileName \ + "AReallyBigFileNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ + ".txt" + ATF_REQUIRE_MSG(strlen(AReallyBigFileName) > PATH_MAX, + "Somebody increased PATH_MAX. Update the test"); + SEND_RRQ(AReallyBigFileName, "octet"); + RECV_ERROR(4, "Illegal TFTP operation"); +} + +/* + * Read a small file of less than one block + */ +TFTPD_TC_DEFINE(rrq_small,) +{ + int fd; + char contents[] = "small"; + + fd = open("small.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, strlen(contents) + 1); + close(fd); + + SEND_RRQ("small.txt", "octet"); + recv_data(1, contents, strlen(contents) + 1); + send_ack(1); +} + +/* + * Try to transfer a file with an unknown mode. + */ +TFTPD_TC_DEFINE(unknown_modes,) +{ + SEND_RRQ("foo.txt", "ascii"); /* Misspelling of "ascii" */ + RECV_ERROR(4, "Illegal TFTP operation"); + s = setup(&addr, __COUNTER__); \ + SEND_RRQ("foo.txt", "binary"); /* Obsolete. Use "octet" instead */ + RECV_ERROR(4, "Illegal TFTP operation"); + s = setup(&addr, __COUNTER__); \ + SEND_RRQ("foo.txt", "en_US.UTF-8"); + RECV_ERROR(4, "Illegal TFTP operation"); + s = setup(&addr, __COUNTER__); \ + SEND_RRQ("foo.txt", "mail"); /* Obsolete in RFC-1350 */ + RECV_ERROR(4, "Illegal TFTP operation"); +} + +/* + * Send an unknown opcode. tftpd should respond with the appropriate error + */ +TFTPD_TC_DEFINE(unknown_opcode,) +{ + /* Looks like an RRQ or WRQ request, but with a bad opcode */ + SEND_STR("\0\007foo.txt\0octet\0"); + atf_tc_expect_timeout("PR 226005 tftpd ignores bad opcodes but doesn't reject them"); + RECV_ERROR(4, "Illegal TFTP operation"); +} + +/* + * Invoke tftpd with "-w" and write to a nonexistent file. + */ +TFTPD_TC_DEFINE(w_flag,, w_flag = 1;) +{ + int fd; + ssize_t r; + char contents[] = "small"; + char buffer[1024]; + size_t contents_len; + + contents_len = strlen(contents) + 1; + SEND_WRQ("small.txt", "octet"); + recv_ack(0); + send_data(1, contents, contents_len); + recv_ack(1); + + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); + fd = open("small.txt", O_RDONLY); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq(contents, contents_len, buffer, r); +} + +/* + * Write a medium file, and simulate a dropped ACK packet + */ +TFTPD_TC_DEFINE(wrq_dropped_ack,) +{ + int fd; + size_t i; + ssize_t r; + uint32_t contents[192]; + char buffer[1024]; + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ("medium.txt", "octet"); + recv_ack(0); + send_data(1, (const char*)&contents[0], 512); + /* + * Servers "sends" an ACK packet, but network drops it. + * Eventually, server should resend the last ACK + */ + (void) recvfrom(s, buffer, sizeof(buffer), 0, NULL, NULL); + recv_ack(1); + send_data(2, (const char*)&contents[128], 256); + recv_ack(2); + + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); + fd = open("medium.txt", O_RDONLY); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq((const char*)contents, 768, buffer, r); +} + +/* + * Write a small file, and simulate a dropped DATA packet + */ +TFTPD_TC_DEFINE(wrq_dropped_data,) +{ + int fd; + ssize_t r; + char contents[] = "small"; + size_t contents_len; + char buffer[1024]; + + fd = open("small.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + close(fd); + contents_len = strlen(contents) + 1; + + SEND_WRQ("small.txt", "octet"); + recv_ack(0); + /* + * Client "sends" a DATA packet, but network drops it. + * Eventually, server should resend the last ACK + */ + recv_ack(0); + send_data(1, contents, contents_len); + recv_ack(1); + + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); + fd = open("small.txt", O_RDONLY); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq(contents, contents_len, buffer, r); +} + +/* + * Write a medium file, and simulate a duplicated DATA packet + */ +TFTPD_TC_DEFINE(wrq_duped_data,) +{ + int fd; + size_t i; + ssize_t r; + uint32_t contents[192]; + char buffer[1024]; + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ("medium.txt", "octet"); + recv_ack(0); + send_data(1, (const char*)&contents[0], 512); + send_data(1, (const char*)&contents[0], 512); + recv_ack(1); + recv_ack(1); + send_data(2, (const char*)&contents[128], 256); + recv_ack(2); + + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); + fd = open("medium.txt", O_RDONLY); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq((const char*)contents, 768, buffer, r); +} + +/* + * Attempt to write a file without write permissions + */ +TFTPD_TC_DEFINE(wrq_eaccess,) +{ + int fd; + + fd = open("empty.txt", O_CREAT | O_RDONLY, 0440); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ("empty.txt", "octet"); + atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " + "violation"); + RECV_ERROR(2, "Access violation"); +} + +/* + * Attempt to write a file without world write permissions, but with world + * read permissions + */ +TFTPD_TC_DEFINE(wrq_eaccess_world_readable,) +{ + int fd; + + fd = open("empty.txt", O_CREAT | O_RDONLY, 0444); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ("empty.txt", "octet"); + atf_tc_expect_fail("PR 226004 with relative pathnames, tftpd doesn't validate world writability"); + RECV_ERROR(2, "Access violation"); +} + + +/* + * Write a medium file of more than one block + */ +TFTPD_TC_DEFINE(wrq_medium,) +{ + int fd; + size_t i; + ssize_t r; + uint32_t contents[192]; + char buffer[1024]; + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ("medium.txt", "octet"); + recv_ack(0); + send_data(1, (const char*)&contents[0], 512); + recv_ack(1); + send_data(2, (const char*)&contents[128], 256); + recv_ack(2); + + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); + fd = open("medium.txt", O_RDONLY); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq((const char*)contents, 768, buffer, r); +} + +/* + * Write a file in netascii format + */ +TFTPD_TC_DEFINE(wrq_netascii,) +{ + int fd; + ssize_t r; + /* + * Weirdly, RFC-764 says that CR must be followed by NUL if a line feed + * is not intended + */ + char contents[] = "foo\r\nbar\r\0baz\r\n"; + char expected[] = "foo\nbar\rbaz\n"; + size_t contents_len; + char buffer[1024]; + + fd = open("unix.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + close(fd); + contents_len = strlen(contents) + 1; + + SEND_WRQ("unix.txt", "netascii"); + recv_ack(0); + send_data(1, contents, contents_len); + recv_ack(1); + + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); + fd = open("unix.txt", O_RDONLY); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq(expected, sizeof(expected), buffer, r); +} + +/* + * Attempt to write to a nonexistent file. With the default options, this + * isn't allowed. + */ +TFTPD_TC_DEFINE(wrq_nonexistent,) +{ + SEND_WRQ("nonexistent.txt", "octet"); + atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " + "violation"); + RECV_ERROR(1, "File not found"); +} + +/* + * Write a small file of less than one block + */ +TFTPD_TC_DEFINE(wrq_small,) +{ + int fd; + ssize_t r; + char contents[] = "small"; + size_t contents_len; + char buffer[1024]; + + fd = open("small.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + close(fd); + contents_len = strlen(contents) + 1; + + SEND_WRQ("small.txt", "octet"); + recv_ack(0); + send_data(1, contents, contents_len); + recv_ack(1); + + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); + fd = open("small.txt", O_RDONLY); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq(contents, contents_len, buffer, r); +} + +/* + * Write an empty file over a non-empty one + */ +TFTPD_TC_DEFINE(wrq_truncate,) +{ + int fd; + char contents[] = "small"; + struct stat sb; + + fd = open("small.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, strlen(contents) + 1); + close(fd); + + SEND_WRQ("small.txt", "octet"); + recv_ack(0); + send_data(1, NULL, 0); + recv_ack(1); + + ATF_REQUIRE_EQ(stat("small.txt", &sb), 0); + ATF_REQUIRE_EQ(sb.st_size, 0); +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Mar 9 15:52:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA102F33817; Fri, 9 Mar 2018 15:52:08 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) (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 71D027D5C1; Fri, 9 Mar 2018 15:52:08 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f45.google.com with SMTP id 37-v6so13819782lfs.7; Fri, 09 Mar 2018 07:52:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=z7rb7r5Z1tqr55oWXUxZAurcYLJo8Z3rWNy5lWlo3RE=; b=USNpidZkG1tvo6vOs1iTRW6NtzdRVifAr5wuapCVgNmjLQyXGqp282WEm2t4aDszCP MoTgdXKUgJViojfERX4odXkAhl+9XC6VW6NoReAZToCl74a2qn1b4beAlGQEJHS1I2sd HcT2m6fbgYgb+qzqLrm+dSqQ3kEL7pdVKvmEnnjm1HQZwabHvZ049yPTtN+atvyKz/TM g5YcARAKikFZwc6WpOyBSfLH+a9CJvnZVqCRV+ZVYWSFS4g/novS/kGilWGKqHdqSHAS m3fNNdfUuxKznezro8bQKxP+5qFaeSquhojcPdvaTb0P2pLWDHvbvRLPbia3NX7eBMKg wdXQ== X-Gm-Message-State: AElRT7H7aMseXn1IC0On0UA6eOdTLNyNWRgoPjhFRV5DcyL+X7GMT0dK Q87b3i7Dr3/ZclbrPoT6SC5T7/2f X-Google-Smtp-Source: AG47ELts8B8JZRZor7yWSsSKmHnAi1oBgr9twvD5LefLi/z4xnDJbxehtLBQ5MZp7ErJsJfge95I2A== X-Received: by 10.25.181.147 with SMTP id g19mr22950619lfk.47.1520610313977; Fri, 09 Mar 2018 07:45:13 -0800 (PST) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com. [209.85.215.47]) by smtp.gmail.com with ESMTPSA id y128-v6sm343543lfc.64.2018.03.09.07.45.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 07:45:13 -0800 (PST) Received: by mail-lf0-f47.google.com with SMTP id e28-v6so4856398lfc.3; Fri, 09 Mar 2018 07:45:13 -0800 (PST) X-Received: by 10.46.114.26 with SMTP id n26mr22569980ljc.74.1520610313171; Fri, 09 Mar 2018 07:45:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.54.1 with HTTP; Fri, 9 Mar 2018 07:44:52 -0800 (PST) In-Reply-To: <201803091528.w29FSabK065005@pdx.rh.CN85.dnsmgr.net> References: <20180309110240.GA77718@FreeBSD.org> <201803091528.w29FSabK065005@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Fri, 9 Mar 2018 09:44:52 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: "Rodney W. Grimes" Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 15:52:09 -0000 On Fri, Mar 9, 2018 at 9:28 AM, Rodney W. Grimes wrote: >> On Wed, Mar 07, 2018 at 02:53:49PM -0800, Eitan Adler wrote: >> > On 7 March 2018 at 09:37, John Baldwin wrote: >> > > ... >> > > I suspect many of these changes for iwm, etc. are all intertwined >> > > so I'm not sure if you can leave out individual ones. >> > >> > Possibly. I do have iwm working on my laptop though. I also know of >> > one open PR assigned to me w.r.t. a model I don't own. I'll be >> > addressing it some time this week. >> >> I often have mixed feelings when I see lots of similar changes (i.e. >> that make up for better hardware support, esp. on a laptop) MFCed. >> I'd rather see laptop users run -CURRENT and leave -STABLE branches >> for very conservative (server?) users who can't/don't want to afford >> the risks of running -CURRENT or require ABI stability in a really >> long run, rather than binge-merging things. :-) >> >> By default it should be -CURRENT all over; it's a very good thing >> that we as a Project ourselves are doing this as part of our own >> dogfood eating strategy. > > As a data point just last night a person came into #freebsd irc > channel with a none working wireless nic on a desktop, he was > attemtping to use a Realteak RTL8192EU on 11.1-RELEASE. > > Someone had already told him to try urtwn driver, which in > -current is the right driver and supports this device. > > It did not work for him. This is about when I came in to the > discussion, and helped to confirm that -current did infact > have support for this device, and that this supported had > existed in -current for 16 months, and that this support > would not be a simple grab a couple driver files and build > it on 11.1. > > The commit to add this support involves 46 files, which 18 > of are new files. > > My feelings are if this driver has been in -current for > 16 months why is it NOT in -stable yet? I know part of > the answer "its not a simple merge". But as a project > this is egg on our face. We can merge a new very complicated > change to a our boot code, within a few months (thank you > kevans for that work), but we can not merge back a > device driver in 16? > I had the same questions- this exact same person had hopped over to #freebsd-wifi and I had walked through this same process, identifying it as "not MFC-able" at this point because so many commits having been left un-merged prior to it. I've already recently gone through the fun of catching up on one and a half years worth of unmerged work in stand, I'm not really prepared to do it again quite yet. It felt pretty bad having to tell him that his only option here was to either hop on -CURRENT + rtwn(4) or grab a stable/11 supported NIC- especially since stable/11 is still supposed to be supported for another three (3!) years, and I had to leave before I could help him walk through getting it setup on -CURRENT properly. From owner-svn-src-all@freebsd.org Fri Mar 9 15:52:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58DDDF33861; Fri, 9 Mar 2018 15:52:13 +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 4B65F7D5F9; Fri, 9 Mar 2018 15:52:12 +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 w29FqAc3065078; Fri, 9 Mar 2018 07:52:10 -0800 (PST) (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 w29FqAWo065077; Fri, 9 Mar 2018 07:52:10 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803091552.w29FqAWo065077@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330696 - in head/libexec/tftpd: . tests In-Reply-To: <201803091530.w29FUKin041283@repo.freebsd.org> To: Alan Somers Date: Fri, 9 Mar 2018 07:52:10 -0800 (PST) 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 15:52:13 -0000 > Author: asomers > Date: Fri Mar 9 15:30:20 2018 > New Revision: 330696 > URL: https://svnweb.freebsd.org/changeset/base/330696 > > Log: > Add some functional tests for tftpd(8) > > tftpd(8) is difficult to test in isolation due to its relationship with > inetd. Create a test program that mimics the behavior of tftp(1) and > inetd(8) and verifies tftpd's response in several different scenarios. At one time I thought it was possible to run all of the external "inetd" daemons as standalone daemons without inetd involved. I do not recall if tftpd was included in that, but believe it was. I am sure that telnetd and ftpd would run standalone. Have we lost some useful functionality here that maybe we want back? > These test cases cover all of the basic TFTP protocol, but not the optional > parts. > > PR: 157700 > PR: 225996 > PR: 226004 > PR: 226005 > MFC after: 3 weeks > Differential Revision: https://reviews.freebsd.org/D14310 ... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 9 15:55:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00B8FF33C7C; Fri, 9 Mar 2018 15:55:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x236.google.com (mail-lf0-x236.google.com [IPv6:2a00:1450:4010:c07::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 5FFA67D966; Fri, 9 Mar 2018 15:55:34 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x236.google.com with SMTP id q69-v6so13807447lfi.10; Fri, 09 Mar 2018 07:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cz06ZBHFuhUWZOubHXeM6cq/Qb/vM7yBLT0zWCpbT0Y=; b=f+5diI7klxd5do8Q5gNdnDqyFzH/uOIUk9Uvi6Yg8aywoahsoi8MRRTkhkWdVVyJIb uqI2D5ZM49pPHye20p+biXtzgAWkSg1FsUrUMWKpllENujF40KIiOGeZX6vH4a190cwn Db6DB7Dpc2LMXL+kOKMQ8nyfYRx0GSn+k+GWFmty7kvZFoFXgjIfQjPORzVEoSuZSnky mZG8PdapHtGBGWebG6GJEPcuATu/PWI/20On2qdzg4e60pj+uTAx1/azoHkDDPcbNPo4 qBQBYfWHubhSwyIUNpX1xEmu3Dk1qC9zd4IrfXi8DrgqTTDxXA/BT0aSZwXOgGLoQFuu 9wtw== 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=cz06ZBHFuhUWZOubHXeM6cq/Qb/vM7yBLT0zWCpbT0Y=; b=teLKdCjtFRPQSir+IFMvCRHIseHk35T0IQTySbLLgsBLfPeSvLUxASjas5TPEt0Yvi AYSR7BbOWI3vsd4JlaqMJJzzyNAsSvfy8F9PbsO334dJKt7SD+q6/AOwZ8CV+O0+YRvJ xA+A9j2Oz3A+chOk0TO/MFz3tcVmpYrmRwnPVeHwqVZyvs7bH7TMiGSCR4Ma8SNlZTAq +n7KBuhdQWBcGs6f2IIFFCuMbjv/lf9FsWL0NF0d/jImoWD0i56q4zOmdmwFdYJf/dDE Hr95CkBxEMB4RfjoaKAT2febSbCkq02Nl5dZzjkYxjERJ2jWlRNZBTF7DeFJ5NmqJZK0 e6Dg== X-Gm-Message-State: AElRT7GoSxZU30wT3wsEoolvK1zsAzu1kUvQTQy+BoJ1CHEe4WUUzcOa o5Cn98kM85rFD5Wpk7ocBNc+f+HdDbrB7zbrRZA= X-Google-Smtp-Source: AG47ELuLDcs4b73s+RoE4rmMnsxve4dqpLprGWIiz6m3e+3tWKHGAp4MFw5nFxB/Z+r3wmEF2RmUTApDb9yPI/eDoGg= X-Received: by 10.46.50.16 with SMTP id y16mr20431053ljy.53.1520610932308; Fri, 09 Mar 2018 07:55:32 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.2.195 with HTTP; Fri, 9 Mar 2018 07:55:31 -0800 (PST) In-Reply-To: <201803091552.w29FqAWo065077@pdx.rh.CN85.dnsmgr.net> References: <201803091530.w29FUKin041283@repo.freebsd.org> <201803091552.w29FqAWo065077@pdx.rh.CN85.dnsmgr.net> From: Alan Somers Date: Fri, 9 Mar 2018 08:55:31 -0700 X-Google-Sender-Auth: I7wCurvgUT6brxz9TY9jBGe754A Message-ID: Subject: Re: svn commit: r330696 - in head/libexec/tftpd: . tests To: rgrimes@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 15:55:35 -0000 On Fri, Mar 9, 2018 at 8:52 AM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > Author: asomers > > Date: Fri Mar 9 15:30:20 2018 > > New Revision: 330696 > > URL: https://svnweb.freebsd.org/changeset/base/330696 > > > > Log: > > Add some functional tests for tftpd(8) > > > > tftpd(8) is difficult to test in isolation due to its relationship with > > inetd. Create a test program that mimics the behavior of tftp(1) and > > inetd(8) and verifies tftpd's response in several different scenarios. > > At one time I thought it was possible to run all of the external "inetd" > daemons as standalone daemons without inetd involved. > I do not recall if tftpd was included in that, but believe it was. > I am sure that telnetd and ftpd would run standalone. > > Have we lost some useful functionality here that maybe we want back? > Some daemons support that, but others don't. It's not in common code. sprayd and ftpd can do it. It looks like telnetd cannot. I'm not sure which others can. -Alan From owner-svn-src-all@freebsd.org Fri Mar 9 16:00:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9293CF342B2 for ; Fri, 9 Mar 2018 16:00:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2314D7DC89 for ; Fri, 9 Mar 2018 16:00:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22f.google.com with SMTP id k21so86169ioc.2 for ; Fri, 09 Mar 2018 08:00:19 -0800 (PST) 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=qs2aV+J4LoZtzkw57zVM00jal7c0Ho8NvVrXHpadpX0=; b=yod2P9wIjiMPAYcHEa0IM20yD1muXCsQ4+f5GmrzRRqPaHYSFcz5plB/oFWetKPPK1 sN8YIUxpF93iihVOR8M3tP0pYMFIjr+DPNHJ/VbxhU4rCbgeyyuHnQU4FCALABPVy3nE u+71NLsGpcoIyzQiqjIhlCrSgMQFSKjkFmXhck5bW/7kV5VhMi7gZ0Bev+UMw64DyBYc 2gmesXKvOqpEGqo9HqvLXDppWycVd7dVdrH3Q+7ffjBY6SVy1OazYmN6Nr0ZSKOc8wvD faybIL+kW363+wtA6qIHvwUeV6IG8qOMUdVml0AG6EbYjk4on+VQB9u8CI5AiFc0UXuQ 3Jgg== 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=qs2aV+J4LoZtzkw57zVM00jal7c0Ho8NvVrXHpadpX0=; b=igEvKCKV1ybcEAa27aVoNeCWDWEEKmt7giMXwGPN1j02Yy4tfz3rO9SEeodQbO/yr8 o39sB6GEbUmwQbv9R0E5M9atYrq9GV4hExdff3YSQZ+msjsq1JVEj7L/4FYQRYX8WTlb 9jkFae4JC5TYkghymMo95kAnBAtMGQSbT8eHrZkImmZANuL2bMIQxmuGJgRV8cy5NrCM klENczOof6xehZTBAxi4G1OtBa36cYYLSAEA7daDlhIm6xhpB2Iib+FIjhCJ4HU/R6Xr 58rmT/T7pfbTQDaBtAq34VX81vvbyjveNTWcAfZ2TFEwcSbbKDxqXi5agNEe6YSRFHur Wq5g== X-Gm-Message-State: APf1xPA15f2cUJnkfQ7qQdjIt8cXndNB8AUh9MhhwzAb4kyATgy66XwE 3QUemsCFESx3KFBE6gjG3NIIFC9xjtWudkti3sNClw== X-Google-Smtp-Source: AG47ELuAXxY1m5jBKpZ4TZhiT8GzOYMBTjzl5+KQxL84Z8AVR90M13FT4VzTtB+rAoXCVJfZlIKVeMlcI0OWkK/XDC8= X-Received: by 10.107.2.6 with SMTP id 6mr35734652ioc.117.1520611218835; Fri, 09 Mar 2018 08:00:18 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Fri, 9 Mar 2018 08:00:18 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:18a2:a4f7:170:8dd9] In-Reply-To: References: <20180309110240.GA77718@FreeBSD.org> <201803091528.w29FSabK065005@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Fri, 9 Mar 2018 09:00:18 -0700 X-Google-Sender-Auth: t4ts4G6-tSFetFXnplXoA_rSyac Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: Kyle Evans Cc: "Rodney W. Grimes" , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 16:00:20 -0000 On Fri, Mar 9, 2018 at 8:44 AM, Kyle Evans wrote: > On Fri, Mar 9, 2018 at 9:28 AM, Rodney W. Grimes > wrote: > >> On Wed, Mar 07, 2018 at 02:53:49PM -0800, Eitan Adler wrote: > >> > On 7 March 2018 at 09:37, John Baldwin wrote: > >> > > ... > >> > > I suspect many of these changes for iwm, etc. are all intertwined > >> > > so I'm not sure if you can leave out individual ones. > >> > > >> > Possibly. I do have iwm working on my laptop though. I also know of > >> > one open PR assigned to me w.r.t. a model I don't own. I'll be > >> > addressing it some time this week. > >> > >> I often have mixed feelings when I see lots of similar changes (i.e. > >> that make up for better hardware support, esp. on a laptop) MFCed. > >> I'd rather see laptop users run -CURRENT and leave -STABLE branches > >> for very conservative (server?) users who can't/don't want to afford > >> the risks of running -CURRENT or require ABI stability in a really > >> long run, rather than binge-merging things. :-) > >> > >> By default it should be -CURRENT all over; it's a very good thing > >> that we as a Project ourselves are doing this as part of our own > >> dogfood eating strategy. > > > > As a data point just last night a person came into #freebsd irc > > channel with a none working wireless nic on a desktop, he was > > attemtping to use a Realteak RTL8192EU on 11.1-RELEASE. > > > > Someone had already told him to try urtwn driver, which in > > -current is the right driver and supports this device. > > > > It did not work for him. This is about when I came in to the > > discussion, and helped to confirm that -current did infact > > have support for this device, and that this supported had > > existed in -current for 16 months, and that this support > > would not be a simple grab a couple driver files and build > > it on 11.1. > > > > The commit to add this support involves 46 files, which 18 > > of are new files. > > > > My feelings are if this driver has been in -current for > > 16 months why is it NOT in -stable yet? I know part of > > the answer "its not a simple merge". But as a project > > this is egg on our face. We can merge a new very complicated > > change to a our boot code, within a few months (thank you > > kevans for that work), but we can not merge back a > > device driver in 16? > > > > I had the same questions- this exact same person had hopped over to > #freebsd-wifi and I had walked through this same process, identifying > it as "not MFC-able" at this point because so many commits having been > left un-merged prior to it. I've already recently gone through the fun > of catching up on one and a half years worth of unmerged work in > stand, I'm not really prepared to do it again quite yet. > > It felt pretty bad having to tell him that his only option here was to > either hop on -CURRENT + rtwn(4) or grab a stable/11 supported NIC- > especially since stable/11 is still supposed to be supported for > another three (3!) years, and I had to leave before I could help him > walk through getting it setup on -CURRENT properly > one has to wonder why 12.0 is so far in the future.... Warner From owner-svn-src-all@freebsd.org Fri Mar 9 16:08:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2283F3503F; Fri, 9 Mar 2018 16:08:58 +0000 (UTC) (envelope-from markjdb@gmail.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 346D27E545; Fri, 9 Mar 2018 16:08:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io0-x22b.google.com with SMTP id m22so4037353iob.12; Fri, 09 Mar 2018 08:08:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=umXhokMmeKfDlqke/5OKJzh39Kh77z6WEIGwUWY6+AU=; b=VHq7CWT7at7A1BrPEvWnSqYt/UsKdJtT5W/eBtxKZQrtQUE4T4wkLuKNNThA6bx2of grGECIbpb9BwqrpurgOC10JDcjAzmn1EM18UyDcW8b3hQn/6txfRAd+59oLqweY1Cng0 8fkWt3+6Hjb+rqz/y8z3xQmDtqlW8oy94rAkawFJ0aRFcxmy6YWtoh2JJ3/nzP2gdqPQ MjQkMh+ZrLlKaR6MboPGcGSEHxSpH+85h9HnvTnbiQ8r8bLHC8DPcw+g2pOZo3edK1GS TOZfeZZp5+onAbmL+phv4rD+oxyNW2o7mo+rupfFvm3X+A/+hY1qxMOTGS9vJHFkgpgz uppA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=umXhokMmeKfDlqke/5OKJzh39Kh77z6WEIGwUWY6+AU=; b=mLeN+CQRDeR7ujKJCi6ItD1EfA0W3brcUlR9INK2HO1XDDyuJHL9g/8lVIJprpOa0n tiZf4ku3QtU3LP0q8byWn/56ErnQvLXskOnU6EbnAcu97OR1Z44h5GPl6ejwRh2gd6vz psbcPJAjG9zNHN6h/W8+azyYATQuStQtiMmIoQfrRJCMMHktYL/2Hp4Ddzlf0iN9LYks OP3AygUS1Wd/o+7ANKblkEtR72zf7WgmtM/43EFEl+Hp3MGpeu8NqSGUv+VT4fMPthPj 6WCxT1/Za5cQEoPBb1Rn0U6N2uBDxQuOoVavCmN9MrhaNmeoqi5c4Wy8e3CO49tG7NWf AZkg== X-Gm-Message-State: AElRT7E5ikeUWWBVUvPe1yxRf74s3RqUSlUEJQMkx6E2UrzALp6v7lIY YlamHgVyUb1F9+9Q5d9Tbbk= X-Google-Smtp-Source: AG47ELvJ0K1eB1cCpJzfnL8JnL+/dnJjG+SPzmGBGSyOqPwH+nJXK3usSyFGgAU8VBL769dgkfasFQ== X-Received: by 10.107.21.3 with SMTP id 3mr36025625iov.148.1520611737511; Fri, 09 Mar 2018 08:08:57 -0800 (PST) Received: from raichu (toroon0560w-lp130-01-174-88-76-226.dsl.bell.ca. [174.88.76.226]) by smtp.gmail.com with ESMTPSA id b99sm1066544ioj.82.2018.03.09.08.08.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 08:08:56 -0800 (PST) Sender: Mark Johnston Date: Fri, 9 Mar 2018 11:08:54 -0500 From: Mark Johnston To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330663 - head/sys/kern Message-ID: <20180309160854.GC6174@raichu> References: <201803081704.w28H4aQx052056@repo.freebsd.org> <20180309150402.X950@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180309150402.X950@besplex.bde.org> User-Agent: Mutt/1.9.3 (2018-01-21) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 16:08:58 -0000 On Fri, Mar 09, 2018 at 03:42:05PM +1100, Bruce Evans wrote: > On Thu, 8 Mar 2018, Mark Johnston wrote: > > > Log: > > Return E2BIG if we run out of space writing a compressed kernel dump. > > E2BIG a very wrong errno. It means "Argment list too long". It is broken > as designed, with "too" encrypted as "2" and no indication of what is too > big. EFBIG is not so wrong. It means "File too large". There is explicit handling for E2BIG most of the (mini)dumpsys() implementations, which is why I chose it. In particular, amd64's minidumpsys() retries the dump upon receiving ENOSPC from the MI code, but E2BIG simply causes the dump to fail: 443 else if (error == E2BIG) 444 printf("Dump failed. Partition too small.\n"); > > ENOSPC causes the MD kernel dump code to retry the dump, but this is > > undesirable in the case where we legitimately ran out of space. > > ENOSPC is the correct errno. It means "[really] No space left on device". > The bug was either retrying or possibly abusing ENOSPC instead of EAGAIN > to mean "transiently out of space for something". When writing an uncompressed dump, the starting offset is chosen so that the end of the dump lines up with the end of the dump device. If we attempt to write past the end of the dump, the presumption is that something caused pages to be added to the dump map during the dump, and we should retry with a different starting offset. EAGAIN seems like a reasonable error number for this case, but it's somewhat unsatisfying since these checks were originally meant to stop programming errors from scribbling over a filesystem. I wonder if the retry logic in amd64's minidumpsys() is really useful at all. It was added in r215133 and copied to arm64, but isn't present in any other MD dump code. I've never seen a kernel dump succeed after a retry; for instance, the problem addressed in r329521 simply caused us to retry a number of times before giving up. The description for Differential D8254 also suggests that the retry logic is of questionable value. From owner-svn-src-all@freebsd.org Fri Mar 9 16:09:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 772ACF351D2; Fri, 9 Mar 2018 16:09:49 +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 1FB537E6C7; Fri, 9 Mar 2018 16:09: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 w29G9kCY065168; Fri, 9 Mar 2018 08:09:46 -0800 (PST) (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 w29G9kI1065167; Fri, 9 Mar 2018 08:09:46 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803091609.w29G9kI1065167@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: To: Kyle Evans Date: Fri, 9 Mar 2018 08:09:46 -0800 (PST) CC: "Rodney W. Grimes" , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 16:09:49 -0000 > On Fri, Mar 9, 2018 at 9:28 AM, Rodney W. Grimes > wrote: > >> On Wed, Mar 07, 2018 at 02:53:49PM -0800, Eitan Adler wrote: > >> > On 7 March 2018 at 09:37, John Baldwin wrote: > >> > > ... > >> > > I suspect many of these changes for iwm, etc. are all intertwined > >> > > so I'm not sure if you can leave out individual ones. > >> > > >> > Possibly. I do have iwm working on my laptop though. I also know of > >> > one open PR assigned to me w.r.t. a model I don't own. I'll be > >> > addressing it some time this week. > >> > >> I often have mixed feelings when I see lots of similar changes (i.e. > >> that make up for better hardware support, esp. on a laptop) MFCed. > >> I'd rather see laptop users run -CURRENT and leave -STABLE branches > >> for very conservative (server?) users who can't/don't want to afford > >> the risks of running -CURRENT or require ABI stability in a really > >> long run, rather than binge-merging things. :-) > >> > >> By default it should be -CURRENT all over; it's a very good thing > >> that we as a Project ourselves are doing this as part of our own > >> dogfood eating strategy. > > > > As a data point just last night a person came into #freebsd irc > > channel with a none working wireless nic on a desktop, he was > > attemtping to use a Realteak RTL8192EU on 11.1-RELEASE. > > > > Someone had already told him to try urtwn driver, which in > > -current is the right driver and supports this device. > > > > It did not work for him. This is about when I came in to the > > discussion, and helped to confirm that -current did infact > > have support for this device, and that this supported had > > existed in -current for 16 months, and that this support > > would not be a simple grab a couple driver files and build > > it on 11.1. > > > > The commit to add this support involves 46 files, which 18 > > of are new files. > > > > My feelings are if this driver has been in -current for > > 16 months why is it NOT in -stable yet? I know part of > > the answer "its not a simple merge". But as a project > > this is egg on our face. We can merge a new very complicated > > change to a our boot code, within a few months (thank you > > kevans for that work), but we can not merge back a > > device driver in 16? > > > > I had the same questions- this exact same person had hopped over to > #freebsd-wifi and I had walked through this same process, identifying > it as "not MFC-able" at this point because so many commits having been > left un-merged prior to it. I've already recently gone through the fun > of catching up on one and a half years worth of unmerged work in > stand, I'm not really prepared to do it again quite yet. But but but.. you did it so well the first time!!! :-) I can fully appreciate that you do not desire to do another massive merge. > It felt pretty bad having to tell him that his only option here was to > either hop on -CURRENT + rtwn(4) or grab a stable/11 supported NIC- > especially since stable/11 is still supposed to be supported for > another three (3!) years, and I had to leave before I could help him > walk through getting it setup on -CURRENT properly. When I left the #freebsd channel he was downloading, and others there are capable of helping him get up and running. One thing that did come up while discussing some of the issues with merging head to stable was it might be usefull if we add yet another marker line: Changes ABI/KABI: yes to the commit messages, at least if marked you can be pretty sure that merging is going to involve additional work, lack of this mark would not guarantee you didnt have an ABI issue as they are easy to overlook and you would still need to look for those types of problems. I have been told by someone there are some tools that can mechanically look for ABI changes. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 9 16:22:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D3D6F3651F for ; Fri, 9 Mar 2018 16:22:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 807757F241 for ; Fri, 9 Mar 2018 16:22:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id j7-v6so3477489ita.3 for ; Fri, 09 Mar 2018 08:22:33 -0800 (PST) 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=hUswTB+N4b6f2rOfvb7jsLG+DNUb4axtd47iKyVE8TE=; b=Pb2Lo1mVIudCaiq/v/80j572TEMzGSaOEsQXIzxq87c47+XSb0L40YON9XAnIQzZ5F Hh+lJuZo8jAwpaO19QitmoLn2HZQKkwyZqQE0Eib0JtR2cIBI5yPq4qSSU8XQzFozl6F xAH+OZ+ZN4Y1qGYZRLIg9ornTYXWU6wnElgQhqlaK5TtgI+6kmPZk6hIO3YhKQmJRpSq 6Ei9uTjtIRZidnDzGbhZb+3Rt+cWmkgB2lxAiTALf2loH2qmOjU0B15YVzG58ZJzQubb +fBlpC87YhCc+2qkzkt3YO0FAKBGNcOEAWNqkjr7xO1r2G/qLKmXBkV2cGTWdCBg8Qtn 8cxQ== 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=hUswTB+N4b6f2rOfvb7jsLG+DNUb4axtd47iKyVE8TE=; b=R2GjgD7Sk6sa6gN6/1fpfBm7FSfu2p5kOJMXDGaqPKZeT05r8djvaxFpECRAwapA1c dMBpfqsD0+iSJcEOXm1U6ABv9UhldsIKu0mKOQg/IsoU5YrJZrlWiueaitZDzub9Ez+6 Q3mWavQBEpacuazPYRGCXbEzVimSCb3+7flivAOPY0NXvxYK5uFin6/VNvrkfy1PYDP9 X2nF3rius/eidOvosr8HnXqXAPPjGZRxvktw8B6EA/wl4DxxgJ38gLb4VaWJ5x8ikVQb IQwnOZvhdhrGBOKdvgFNg6bc+DpiHpmkX1g7Wj/c7Obv3J2KegysMx3eVWrVZDZKILzl ZXhg== X-Gm-Message-State: AElRT7F2mEx3Pl/B0Ai/HUp+rkLerTUydN7Vm5DyC3v+LkfyP0+28CeJ mVtBNTFqYlO4nX2wrU96Y5mL3A927ooBLlJsVTZVxw== X-Google-Smtp-Source: AG47ELvVskXGSfcRIE4nYP7tO73pBZe1C7tYJYCLaEyTQzLVnJ3c0Yz+hjtpCEG5Pd6koHvQbH8ptaPwLiEXCjAiKaI= X-Received: by 10.36.4.65 with SMTP id 62mr4118914itb.57.1520612552664; Fri, 09 Mar 2018 08:22:32 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Fri, 9 Mar 2018 08:22:31 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:18a2:a4f7:170:8dd9] In-Reply-To: <201803091609.w29G9kI1065167@pdx.rh.CN85.dnsmgr.net> References: <201803091609.w29G9kI1065167@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Fri, 9 Mar 2018 09:22:31 -0700 X-Google-Sender-Auth: jFN5_qz-eSFb3uA_qr8sJQjDZFU Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: "Rodney W. Grimes" Cc: Kyle Evans , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 16:22:35 -0000 On Fri, Mar 9, 2018 at 9:09 AM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On Fri, Mar 9, 2018 at 9:28 AM, Rodney W. Grimes > > wrote: > > >> On Wed, Mar 07, 2018 at 02:53:49PM -0800, Eitan Adler wrote: > > >> > On 7 March 2018 at 09:37, John Baldwin wrote: > > >> > > ... > > >> > > I suspect many of these changes for iwm, etc. are all intertwined > > >> > > so I'm not sure if you can leave out individual ones. > > >> > > > >> > Possibly. I do have iwm working on my laptop though. I also know of > > >> > one open PR assigned to me w.r.t. a model I don't own. I'll be > > >> > addressing it some time this week. > > >> > > >> I often have mixed feelings when I see lots of similar changes (i.e. > > >> that make up for better hardware support, esp. on a laptop) MFCed. > > >> I'd rather see laptop users run -CURRENT and leave -STABLE branches > > >> for very conservative (server?) users who can't/don't want to afford > > >> the risks of running -CURRENT or require ABI stability in a really > > >> long run, rather than binge-merging things. :-) > > >> > > >> By default it should be -CURRENT all over; it's a very good thing > > >> that we as a Project ourselves are doing this as part of our own > > >> dogfood eating strategy. > > > > > > As a data point just last night a person came into #freebsd irc > > > channel with a none working wireless nic on a desktop, he was > > > attemtping to use a Realteak RTL8192EU on 11.1-RELEASE. > > > > > > Someone had already told him to try urtwn driver, which in > > > -current is the right driver and supports this device. > > > > > > It did not work for him. This is about when I came in to the > > > discussion, and helped to confirm that -current did infact > > > have support for this device, and that this supported had > > > existed in -current for 16 months, and that this support > > > would not be a simple grab a couple driver files and build > > > it on 11.1. > > > > > > The commit to add this support involves 46 files, which 18 > > > of are new files. > > > > > > My feelings are if this driver has been in -current for > > > 16 months why is it NOT in -stable yet? I know part of > > > the answer "its not a simple merge". But as a project > > > this is egg on our face. We can merge a new very complicated > > > change to a our boot code, within a few months (thank you > > > kevans for that work), but we can not merge back a > > > device driver in 16? > > > > > > > I had the same questions- this exact same person had hopped over to > > #freebsd-wifi and I had walked through this same process, identifying > > it as "not MFC-able" at this point because so many commits having been > > left un-merged prior to it. I've already recently gone through the fun > > of catching up on one and a half years worth of unmerged work in > > stand, I'm not really prepared to do it again quite yet. > > But but but.. you did it so well the first time!!! :-) > I can fully appreciate that you do not desire to do another > massive merge. > > > It felt pretty bad having to tell him that his only option here was to > > either hop on -CURRENT + rtwn(4) or grab a stable/11 supported NIC- > > especially since stable/11 is still supposed to be supported for > > another three (3!) years, and I had to leave before I could help him > > walk through getting it setup on -CURRENT properly. > > When I left the #freebsd channel he was downloading, and others > there are capable of helping him get up and running. > > One thing that did come up while discussing some of the issues > with merging head to stable was it might be usefull if we add > yet another marker line: > Changes ABI/KABI: yes > to the commit messages, at least if marked you can be pretty > sure that merging is going to involve additional work, lack > of this mark would not guarantee you didnt have an ABI issue > as they are easy to overlook and you would still need to > look for those types of problems. > Given our past experience, it is often the case that people make changes and aren't aware it's an ABI change, or forget that it is an ABI change once testing is done. Or not realize a change in place X affects Y that affects Z that makes it an ABI change. We've had several changes to CAM that we had to redo because people didn't realize they were breaking something. And at least one of them I approved knowing what changed, but not groking the implications of the change. > I have been told by someone there are some tools that can > mechanically look for ABI changes. > This is the only way forward that may work, but it's much harder in the kernel where the interfaces aren't well enumerated. But we have to look at why so much is desirable to MFC. It's been a long time since a major release and a lot has gone into 12 on the assumption the release would be maybe 30 months from 11.0. The current schedule doesn't have it going out for quite some time. Another way forward is to pull in the 12.0R release. If there were an impending major release, it wouldn't be so bad. However, the agreed to release schedule a few years ago is slipping, which is putting pressure to MFC things, which is why we're talking about this. 11.0 was released in October 2016. That means we should be entering a code slush this summer for 12.0 towards the end of the year, but so far the best guess is a vague hand wave of sometime in early 2019, maybe. That's what's creating the pressure to MFC: we have at least one more year of 11 being the latest release. Warner From owner-svn-src-all@freebsd.org Fri Mar 9 16:25:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 575CFF369D9; Fri, 9 Mar 2018 16:25:46 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id F26FA7F517; Fri, 9 Mar 2018 16:25:43 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 6CCF156497; Fri, 9 Mar 2018 10:20:33 -0600 (CST) Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: Warner Losh , Kyle Evans Cc: "Rodney W. Grimes" , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org References: <20180309110240.GA77718@FreeBSD.org> <201803091528.w29FSabK065005@pdx.rh.CN85.dnsmgr.net> From: Eric van Gyzen Message-ID: Date: Fri, 9 Mar 2018 10:20:32 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 16:25:46 -0000 On 03/09/2018 10:00, Warner Losh wrote: > > > On Fri, Mar 9, 2018 at 8:44 AM, Kyle Evans > wrote: > > On Fri, Mar 9, 2018 at 9:28 AM, Rodney W. Grimes > > wrote: > >> On Wed, Mar 07, 2018 at 02:53:49PM -0800, Eitan Adler wrote: > >> > On 7 March 2018 at 09:37, John Baldwin > wrote: > >> > > ... > >> > > I suspect many of these changes for iwm, etc. are all > intertwined > >> > > so I'm not sure if you can leave out individual ones. > >> > > >> > Possibly. I do have iwm working on my laptop though. I also > know of > >> > one open PR assigned to me w.r.t. a model I don't own. I'll be > >> > addressing it some time this week. > >> > >> I often have mixed feelings when I see lots of similar changes > (i.e. > >> that make up for better hardware support, esp. on a laptop) MFCed. > >> I'd rather see laptop users run -CURRENT and leave -STABLE branches > >> for very conservative (server?) users who can't/don't want to > afford > >> the risks of running -CURRENT or require ABI stability in a really > >> long run, rather than binge-merging things. :-) > >> > >> By default it should be -CURRENT all over; it's a very good thing > >> that we as a Project ourselves are doing this as part of our own > >> dogfood eating strategy. > > > > As a data point just last night a person came into #freebsd irc > > channel with a none working wireless nic on a desktop, he was > > attemtping to use a Realteak RTL8192EU on 11.1-RELEASE. > > > > Someone had already told him to try urtwn driver, which in > > -current is the right driver and supports this device. > > > > It did not work for him.  This is about when I came in to the > > discussion, and helped to confirm that -current did infact > > have support for this device, and that this supported had > > existed in -current for 16 months, and that this support > > would not be a simple grab a couple driver files and build > > it on 11.1. > > > > The commit to add this support involves 46 files, which 18 > > of are new files. > > > > My feelings are if this driver has been in -current for > > 16 months why is it NOT in -stable yet?  I know part of > > the answer "its not a simple merge".  But as a project > > this is egg on our face.  We can merge a new very complicated > > change to a our boot code, within a few months (thank you > > kevans for that work), but we can not merge back a > > device driver in 16? > > > > I had the same questions- this exact same person had hopped over to > #freebsd-wifi and I had walked through this same process, identifying > it as "not MFC-able" at this point because so many commits having been > left un-merged prior to it. I've already recently gone through the fun > of catching up on one and a half years worth of unmerged work in > stand, I'm not really prepared to do it again quite yet. > > It felt pretty bad having to tell him that his only option here was to > either hop on -CURRENT + rtwn(4) or grab a stable/11 supported NIC- > especially since stable/11 is still supposed to be supported for > another three (3!) years, and I had to leave before I could help him > walk through getting it setup on -CURRENT properly > > > one has to wonder why 12.0 is so far in the future.... My thoughts precisely.  If there is so much interesting content in head, it's time for a release. Eric From owner-svn-src-all@freebsd.org Fri Mar 9 16:34:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5702DF374F6; Fri, 9 Mar 2018 16:34:42 +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 D75CF7FD16; Fri, 9 Mar 2018 16:34:41 +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 w29GYYCd065286; Fri, 9 Mar 2018 08:34:34 -0800 (PST) (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 w29GYYdX065285; Fri, 9 Mar 2018 08:34:34 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803091634.w29GYYdX065285@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: To: Eric van Gyzen Date: Fri, 9 Mar 2018 08:34:34 -0800 (PST) CC: Warner Losh , Kyle Evans , "Rodney W. Grimes" , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 16:34:42 -0000 [ Charset UTF-8 unsupported, converting... ] > On 03/09/2018 10:00, Warner Losh wrote: > > > > > > On Fri, Mar 9, 2018 at 8:44 AM, Kyle Evans > > wrote: > > > > On Fri, Mar 9, 2018 at 9:28 AM, Rodney W. Grimes > > > > wrote: > > >> On Wed, Mar 07, 2018 at 02:53:49PM -0800, Eitan Adler wrote: > > >> > On 7 March 2018 at 09:37, John Baldwin > > wrote: > > >> > > ... > > >> > > I suspect many of these changes for iwm, etc. are all > > intertwined > > >> > > so I'm not sure if you can leave out individual ones. > > >> > > > >> > Possibly. I do have iwm working on my laptop though. I also > > know of > > >> > one open PR assigned to me w.r.t. a model I don't own. I'll be > > >> > addressing it some time this week. > > >> > > >> I often have mixed feelings when I see lots of similar changes > > (i.e. > > >> that make up for better hardware support, esp. on a laptop) MFCed. > > >> I'd rather see laptop users run -CURRENT and leave -STABLE branches > > >> for very conservative (server?) users who can't/don't want to > > afford > > >> the risks of running -CURRENT or require ABI stability in a really > > >> long run, rather than binge-merging things. :-) > > >> > > >> By default it should be -CURRENT all over; it's a very good thing > > >> that we as a Project ourselves are doing this as part of our own > > >> dogfood eating strategy. > > > > > > As a data point just last night a person came into #freebsd irc > > > channel with a none working wireless nic on a desktop, he was > > > attemtping to use a Realteak RTL8192EU on 11.1-RELEASE. > > > > > > Someone had already told him to try urtwn driver, which in > > > -current is the right driver and supports this device. > > > > > > It did not work for him.? This is about when I came in to the > > > discussion, and helped to confirm that -current did infact > > > have support for this device, and that this supported had > > > existed in -current for 16 months, and that this support > > > would not be a simple grab a couple driver files and build > > > it on 11.1. > > > > > > The commit to add this support involves 46 files, which 18 > > > of are new files. > > > > > > My feelings are if this driver has been in -current for > > > 16 months why is it NOT in -stable yet?? I know part of > > > the answer "its not a simple merge".? But as a project > > > this is egg on our face.? We can merge a new very complicated > > > change to a our boot code, within a few months (thank you > > > kevans for that work), but we can not merge back a > > > device driver in 16? > > > > > > > I had the same questions- this exact same person had hopped over to > > #freebsd-wifi and I had walked through this same process, identifying > > it as "not MFC-able" at this point because so many commits having been > > left un-merged prior to it. I've already recently gone through the fun > > of catching up on one and a half years worth of unmerged work in > > stand, I'm not really prepared to do it again quite yet. > > > > It felt pretty bad having to tell him that his only option here was to > > either hop on -CURRENT + rtwn(4) or grab a stable/11 supported NIC- > > especially since stable/11 is still supposed to be supported for > > another three (3!) years, and I had to leave before I could help him > > walk through getting it setup on -CURRENT properly > > > > > > one has to wonder why 12.0 is so far in the future.... > > My thoughts precisely.? If there is so much interesting content in head, > it's time for a release. A release of 12.0 would not remove the demands from those running 11.x to have driver support for FOO. It would simply give us the ability to answer with "update to 12", while this would be a valid answer, it is one I see as lack luster which often drives people to other platforms. And as someone else pointed out, 11 has 3 years of life left. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 9 17:44:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AD3FF3D0E4 for ; Fri, 9 Mar 2018 17:44:20 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1813F83302 for ; Fri, 9 Mar 2018 17:44:19 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 5d329c00-23c1-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 5d329c00-23c1-11e8-b951-f99fef315fd9; Fri, 09 Mar 2018 17:43:23 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w29HiBC8008208; Fri, 9 Mar 2018 10:44:11 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1520617451.84937.21.camel@freebsd.org> Subject: Re: svn commit: r330663 - head/sys/kern From: Ian Lepore To: Bruce Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 09 Mar 2018 10:44:11 -0700 In-Reply-To: <20180309194900.F2122@besplex.bde.org> References: <201803081704.w28H4aQx052056@repo.freebsd.org> <20180309150402.X950@besplex.bde.org> <20180309194900.F2122@besplex.bde.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 17:44:20 -0000 On Fri, 2018-03-09 at 20:50 +1100, Bruce Evans wrote: > style(9) does require this. This is hard to see since the style > guide > has been mangled by converting it into a man page, with markup in non > C-code and lots of blank lines to separate the markup. See > /usr/src/admin/style/style in 4.4BSD or /usr/src/share/misc/style in > NetBSD for non-mangled versions. These are pure C code which give > many rules implicitly by example. All versions give 2 or 3 rules for > leaving a blank line between groups of header files. These rules are > somewhat needed since leaving blank lines is so unusual. I feel pretty certain that freebsd code does not have to conform to the style document in 4.4BSD, so I intend to waste absolutely none of my life reading it. If you feel that the 4.4BSD rules about blank lines need to be part of freebsd's style(9), then submit patches to make it so, and we'll run it through the voting process like we do other style changes. -- Ian From owner-svn-src-all@freebsd.org Fri Mar 9 17:50:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5EF1F3D714 for ; Fri, 9 Mar 2018 17:50:05 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D75A8374B for ; Fri, 9 Mar 2018 17:50:05 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 2e18d6ce-23c2-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 2e18d6ce-23c2-11e8-b951-f99fef315fd9; Fri, 09 Mar 2018 17:49:14 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w29Ho29F008236; Fri, 9 Mar 2018 10:50:02 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1520617802.84937.26.camel@freebsd.org> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 From: Ian Lepore To: Alexey Dokuchaev , Eitan Adler Cc: John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org Date: Fri, 09 Mar 2018 10:50:02 -0700 In-Reply-To: <20180309110240.GA77718@FreeBSD.org> References: <201803050754.w257swAE001435@repo.freebsd.org> <6465173.s2nWvWCLOs@ralph.baldwin.cx> <8377086.JrIgVVMXMv@ralph.baldwin.cx> <20180309110240.GA77718@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 17:50:05 -0000 On Fri, 2018-03-09 at 11:02 +0000, Alexey Dokuchaev wrote: > On Wed, Mar 07, 2018 at 02:53:49PM -0800, Eitan Adler wrote: > > > > On 7 March 2018 at 09:37, John Baldwin wrote: > > > > > > ... > > > I suspect many of these changes for iwm, etc. are all intertwined > > > so I'm not sure if you can leave out individual ones. > > Possibly. I do have iwm working on my laptop though. I also know of > > one open PR assigned to me w.r.t. a model I don't own. I'll be > > addressing it some time this week. > I often have mixed feelings when I see lots of similar changes (i.e. > that make up for better hardware support, esp. on a laptop) MFCed. > I'd rather see laptop users run -CURRENT and leave -STABLE branches > for very conservative (server?) users who can't/don't want to afford > the risks of running -CURRENT or require ABI stability in a really > long run, rather than binge-merging things. :-) > > By default it should be -CURRENT all over; it's a very good thing > that we as a Project ourselves are doing this as part of our own > dogfood eating strategy. > > ./danfe > Some of us have to use our freebsd machines to earn a living, and we can't afford the time and resources to set our jobs aside and debug our working machines on a daily basis. We have the same right to use an up to date and stable OS as "very conservative server users". Discouraging MFCs because your opinion is that everyone should run current is, not to put too fine a point on it, 'totally f'ing crazy'. -- Ian From owner-svn-src-all@freebsd.org Fri Mar 9 17:54:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0059FF3DE06; Fri, 9 Mar 2018 17:54:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86DA683CBC; Fri, 9 Mar 2018 17:54:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B889225C1; Fri, 9 Mar 2018 17:54:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29HsEVw017606; Fri, 9 Mar 2018 17:54:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29HsE7Q017605; Fri, 9 Mar 2018 17:54:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803091754.w29HsE7Q017605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 9 Mar 2018 17:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330699 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 330699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 17:54:15 -0000 Author: imp Date: Fri Mar 9 17:54:14 2018 New Revision: 330699 URL: https://svnweb.freebsd.org/changeset/base/330699 Log: Remove K&R stuff: never use it in new code. Remove how to format K&R stuff. The project hasn't been using it in new code for a long time. It's so obsolete, we don't need a statement to never use it. Add a statement requesting that comments about parameters be preserved when converting to ASNI style, per Kirk. Differential Revision: https://reviews.freebsd.org/D14051 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Fri Mar 9 16:35:49 2018 (r330698) +++ head/share/man/man9/style.9 Fri Mar 9 17:54:14 2018 (r330699) @@ -763,17 +763,9 @@ do not roll your own. } .Ed .Pp -Old-style function declarations look like this: -.Bd -literal -static char * -function(a1, a2, fl, a4) - int a1, a2; /* Declare ints, too, do not default them. */ - float fl; /* Beware double vs. float prototype differences. */ - int a4; /* List in order declared. */ -{ -.Ed +When converting K&R style declarations to ANSI style, preserve +any comments about parameters. .Pp -Use ANSI function declarations unless you explicitly need K&R compatibility. Long parameter lists are wrapped with a normal four space indent. .Pp Variable numbers of arguments should look like this: From owner-svn-src-all@freebsd.org Fri Mar 9 17:59:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01AF6F3E55C; Fri, 9 Mar 2018 17:59:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 977E684228; Fri, 9 Mar 2018 17:59:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92604225EA; Fri, 9 Mar 2018 17:59:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29HxM15018214; Fri, 9 Mar 2018 17:59:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29HxM9K018213; Fri, 9 Mar 2018 17:59:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803091759.w29HxM9K018213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 9 Mar 2018 17:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330700 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/fs/tmpfs X-SVN-Commit-Revision: 330700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 17:59:23 -0000 Author: emaste Date: Fri Mar 9 17:59:22 2018 New Revision: 330700 URL: https://svnweb.freebsd.org/changeset/base/330700 Log: MFC r285885 by brueffer: In tmpfs_chtimes(), remove checks on the nanosecond level when determining whether a node changed. Other filesystems, e.g., UFS, only check on seconds, when determining whether something changed. This also corrects the birthtime case, where we checked tv_nsec twice, instead of tv_sec and tv_nsec (PR). PR: 201284 Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Fri Mar 9 17:54:14 2018 (r330699) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Fri Mar 9 17:59:22 2018 (r330700) @@ -1740,20 +1740,18 @@ tmpfs_chtimes(struct vnode *vp, struct vattr *vap, if (error != 0) return (error); - if (vap->va_atime.tv_sec != VNOVAL && vap->va_atime.tv_nsec != VNOVAL) + if (vap->va_atime.tv_sec != VNOVAL) node->tn_status |= TMPFS_NODE_ACCESSED; - if (vap->va_mtime.tv_sec != VNOVAL && vap->va_mtime.tv_nsec != VNOVAL) + if (vap->va_mtime.tv_sec != VNOVAL) node->tn_status |= TMPFS_NODE_MODIFIED; - if (vap->va_birthtime.tv_nsec != VNOVAL && - vap->va_birthtime.tv_nsec != VNOVAL) + if (vap->va_birthtime.tv_sec != VNOVAL) node->tn_status |= TMPFS_NODE_MODIFIED; tmpfs_itimes(vp, &vap->va_atime, &vap->va_mtime); - if (vap->va_birthtime.tv_nsec != VNOVAL && - vap->va_birthtime.tv_nsec != VNOVAL) + if (vap->va_birthtime.tv_sec != VNOVAL) node->tn_birthtime = vap->va_birthtime; ASSERT_VOP_ELOCKED(vp, "chtimes2"); From owner-svn-src-all@freebsd.org Fri Mar 9 18:45:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3AE5F41ED5; Fri, 9 Mar 2018 18:45:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9ECB286628; Fri, 9 Mar 2018 18:45:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99CB322DAD; Fri, 9 Mar 2018 18:45:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29IjD1T043609; Fri, 9 Mar 2018 18:45:13 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29IjDUN043608; Fri, 9 Mar 2018 18:45:13 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803091845.w29IjDUN043608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 9 Mar 2018 18:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330701 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 18:45:14 -0000 Author: kevans Date: Fri Mar 9 18:45:13 2018 New Revision: 330701 URL: https://svnweb.freebsd.org/changeset/base/330701 Log: lualoader: Don't redraw the autoboot message every .05s Modified: head/stand/lua/menu.lua Modified: head/stand/lua/menu.lua ============================================================================== --- head/stand/lua/menu.lua Fri Mar 9 17:59:22 2018 (r330700) +++ head/stand/lua/menu.lua Fri Mar 9 18:45:13 2018 (r330701) @@ -425,14 +425,17 @@ function menu.autoboot() local endtime = loader.time() + ab local time - + local last repeat time = endtime - loader.time() - screen.setcursor(x, y) - print("Autoboot in " .. time .. - " seconds, hit [Enter] to boot" .. - " or any other key to stop ") - screen.defcursor() + if last == nil or last ~= time then + last = time + screen.setcursor(x, y) + print("Autoboot in " .. time .. + " seconds, hit [Enter] to boot" .. + " or any other key to stop ") + screen.defcursor() + end if io.ischar() then local ch = io.getchar() if ch == core.KEY_ENTER then From owner-svn-src-all@freebsd.org Fri Mar 9 18:51:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C44E5F4267E; Fri, 9 Mar 2018 18:51:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7938886C05; Fri, 9 Mar 2018 18:51:24 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7445F22DF0; Fri, 9 Mar 2018 18:51:24 +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 w29IpOXD045579; Fri, 9 Mar 2018 18:51:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29IpOrR045578; Fri, 9 Mar 2018 18:51:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803091851.w29IpOrR045578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 9 Mar 2018 18:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330702 - head/lib/libmagic X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/lib/libmagic X-SVN-Commit-Revision: 330702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 18:51:24 -0000 Author: bdrewery Date: Fri Mar 9 18:51:24 2018 New Revision: 330702 URL: https://svnweb.freebsd.org/changeset/base/330702 Log: LIB32: Avoid linking in unneeded (and invalid lib32) libz for libmagic build tool. Usually this is just ignored: /usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.so when searching for -lz /usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.a when searching for -lz However some combination of newer toolchains simply fail here instead: /usr/bin/ld: error: /home/dstolfa/obj/home/dstolfa/cadets/amd64.amd64/obj-lib32/lib/libz/libz.so is incompatible with /usr/lib/crt1.o Libz is not needed for mkmagic so just exclude it. Reported by: Domagoj Stolfa MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/lib/libmagic/Makefile Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Fri Mar 9 18:45:13 2018 (r330701) +++ head/lib/libmagic/Makefile Fri Mar 9 18:51:24 2018 (r330702) @@ -8,7 +8,9 @@ CONTRDIR= ${SRCTOP}/contrib/file LIB= magic SHLIB_MAJOR= 4 +.if !make(build-tools) LIBADD= z +.endif MAN= libmagic.3 magic.5 SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \ From owner-svn-src-all@freebsd.org Fri Mar 9 19:04:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB1C2F43725; Fri, 9 Mar 2018 19:04:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59A3487586; Fri, 9 Mar 2018 19:04:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F0E7230F4; Fri, 9 Mar 2018 19:04:07 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29J47a7053718; Fri, 9 Mar 2018 19:04:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29J47KY053716; Fri, 9 Mar 2018 19:04:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803091904.w29J47KY053716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 9 Mar 2018 19:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330703 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 19:04:08 -0000 Author: kevans Date: Fri Mar 9 19:04:06 2018 New Revision: 330703 URL: https://svnweb.freebsd.org/changeset/base/330703 Log: lualoader: Cache kernel list With autodetection turned on, hitting the filesystem everytime we need to calculate choices for the kernel carousel is kind of slow. Cache once on the first listing and reload it anytime the config is reloaded in case any of the loader.conf(5) changes that affect this (kernel, kernels, kernels_autodetect) have changed. This also picks up the case where we've changed currdev and the autodetected kernels could change. Modified: head/stand/lua/config.lua head/stand/lua/core.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Fri Mar 9 18:51:24 2018 (r330702) +++ head/stand/lua/config.lua Fri Mar 9 19:04:06 2018 (r330703) @@ -497,6 +497,7 @@ function config.reload(file) modules = {} config.restoreEnv() config.load(file) + core.configReloaded() end function config.loadelf() Modified: head/stand/lua/core.lua ============================================================================== --- head/stand/lua/core.lua Fri Mar 9 18:51:24 2018 (r330702) +++ head/stand/lua/core.lua Fri Mar 9 19:04:06 2018 (r330703) @@ -138,7 +138,18 @@ function core.setSafeMode(safe_mode) core.sm = safe_mode end +function core.configReloaded() + -- Clear the kernel cache on config changes, autodetect might have + -- changed or if we've switched boot environments then we could have + -- a new kernel set. + core.cached_kernels = nil +end + function core.kernelList() + if core.cached_kernels ~= nil then + return core.cached_kernels + end + local k = loader.getenv("kernel") local v = loader.getenv("kernels") local autodetect = loader.getenv("kernels_autodetect") or "" @@ -166,7 +177,8 @@ function core.kernelList() -- setting, kernels_autodetect. If it's set to 'yes', we'll add -- any kernels we detect based on the criteria described. if autodetect:lower() ~= "yes" then - return kernels + core.cached_kernels = kernels + return core.cached_kernels end -- Automatically detect other bootable kernel directories using a @@ -195,7 +207,8 @@ function core.kernelList() ::continue:: end - return kernels + core.cached_kernels = kernels + return core.cached_kernels end function core.bootenvDefault() From owner-svn-src-all@freebsd.org Fri Mar 9 19:22:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B93CF44A4F; Fri, 9 Mar 2018 19:22:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B434680FB; Fri, 9 Mar 2018 19:22:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id EDF7A10A87D; Fri, 9 Mar 2018 14:22:25 -0500 (EST) From: John Baldwin To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330338 - head/sys/amd64/amd64 Date: Fri, 09 Mar 2018 11:22:19 -0800 Message-ID: <2557369.6nFzd3kAUm@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201803031510.w23FAbeC065867@repo.freebsd.org> References: <201803031510.w23FAbeC065867@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 09 Mar 2018 14:22:26 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 19:22:27 -0000 On Saturday, March 03, 2018 03:10:37 PM Andriy Gapon wrote: > Author: avg > Date: Sat Mar 3 15:10:37 2018 > New Revision: 330338 > URL: https://svnweb.freebsd.org/changeset/base/330338 > > Log: > db_nextframe/amd64: catch up with r328083 to recognize fast_syscall_common > > Since that change the system call stack traces look like this: > ... > sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe0028e13ac0 > amd64_syscall() at amd64_syscall+0x79b/frame 0xfffffe0028e13bf0 > fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0028e13bf0 > So, db_nextframe() stopped recognizing the system call frame. > This commit should fix that. > > Reviewed by: kib > MFC after: 4 days > > Modified: > head/sys/amd64/amd64/db_trace.c > > Modified: head/sys/amd64/amd64/db_trace.c > ============================================================================== > --- head/sys/amd64/amd64/db_trace.c Sat Mar 3 13:20:44 2018 (r330337) > +++ head/sys/amd64/amd64/db_trace.c Sat Mar 3 15:10:37 2018 (r330338) > @@ -212,7 +212,9 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s > strcmp(name, "Xcpususpend") == 0 || > strcmp(name, "Xrendezvous") == 0) > frame_type = INTERRUPT; > - else if (strcmp(name, "Xfast_syscall") == 0) > + else if (strcmp(name, "Xfast_syscall") == 0 || > + strcmp(name, "Xfast_syscall_pti") == 0 || > + strcmp(name, "fast_syscall_common") == 0) > frame_type = SYSCALL; I think you actually just want to replace Xfast_syscall with fast_syscall_common. Neither Xfast_syscall nor Xfast_syscall_pti call any functions before jumping to the common label, so when unwinding from a system call you should always get the common label. (That is, I think we should remove Xfast_syscall and Xfast_syscall_pti here. Any stack trace that happens to find those symbols during unwinding won't have a valid SYSCALL frame to unwind.) -- John Baldwin From owner-svn-src-all@freebsd.org Fri Mar 9 19:39:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2764EF45BFE; Fri, 9 Mar 2018 19:39:09 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC11368AD8; Fri, 9 Mar 2018 19:39:08 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2AE7235B4; Fri, 9 Mar 2018 19:39:08 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29Jd8aB069304; Fri, 9 Mar 2018 19:39:08 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29Jd8lV069300; Fri, 9 Mar 2018 19:39:08 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201803091939.w29Jd8lV069300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Fri, 9 Mar 2018 19:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330704 - in stable/11/sys/amd64/vmm: amd intel X-SVN-Group: stable-11 X-SVN-Commit-Author: tychon X-SVN-Commit-Paths: in stable/11/sys/amd64/vmm: amd intel X-SVN-Commit-Revision: 330704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 19:39:09 -0000 Author: tychon Date: Fri Mar 9 19:39:08 2018 New Revision: 330704 URL: https://svnweb.freebsd.org/changeset/base/330704 Log: MFC r328011,329162 r328011: Provide some mitigation against CVE-2017-5715 by clearing registers upon returning from the guest which aren't immediately clobbered by the host. This eradicates any remaining guest contents limiting their usefulness in an exploit gadget. r329162: Provide further mitigation against CVE-2017-5715 by flushing the return stack buffer (RSB) upon returning from the guest. Modified: stable/11/sys/amd64/vmm/amd/svm_support.S stable/11/sys/amd64/vmm/intel/vmcs.c stable/11/sys/amd64/vmm/intel/vmx.h stable/11/sys/amd64/vmm/intel/vmx_support.S Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/vmm/amd/svm_support.S ============================================================================== --- stable/11/sys/amd64/vmm/amd/svm_support.S Fri Mar 9 19:04:06 2018 (r330703) +++ stable/11/sys/amd64/vmm/amd/svm_support.S Fri Mar 9 19:39:08 2018 (r330704) @@ -113,6 +113,23 @@ ENTRY(svm_launch) movq %rdi, SCTX_RDI(%rax) movq %rsi, SCTX_RSI(%rax) + /* + * To prevent malicious branch target predictions from + * affecting the host, overwrite all entries in the RSB upon + * exiting a guest. + */ + mov $16, %ecx /* 16 iterations, two calls per loop */ + mov %rsp, %rax +0: call 2f /* create an RSB entry. */ +1: pause + call 1b /* capture rogue speculation. */ +2: call 2f /* create an RSB entry. */ +1: pause + call 1b /* capture rogue speculation. */ +2: sub $1, %ecx + jnz 0b + mov %rax, %rsp + /* Restore host state */ pop %r15 pop %r14 @@ -124,8 +141,20 @@ ENTRY(svm_launch) pop %rdx mov %edx, %eax shr $32, %rdx - mov $MSR_GSBASE, %ecx + mov $MSR_GSBASE, %rcx wrmsr + + /* + * Clobber the remaining registers with guest contents so they + * can't be misused. + */ + xor %rbp, %rbp + xor %rdi, %rdi + xor %rsi, %rsi + xor %r8, %r8 + xor %r9, %r9 + xor %r10, %r10 + xor %r11, %r11 VLEAVE ret Modified: stable/11/sys/amd64/vmm/intel/vmcs.c ============================================================================== --- stable/11/sys/amd64/vmm/intel/vmcs.c Fri Mar 9 19:04:06 2018 (r330703) +++ stable/11/sys/amd64/vmm/intel/vmcs.c Fri Mar 9 19:39:08 2018 (r330704) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -50,6 +51,12 @@ __FBSDID("$FreeBSD$"); #include #endif +SYSCTL_DECL(_hw_vmm_vmx); + +static int no_flush_rsb; +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, no_flush_rsb, CTLFLAG_RW, + &no_flush_rsb, 0, "Do not flush RSB upon vmexit"); + static uint64_t vmcs_fix_regval(uint32_t encoding, uint64_t val) { @@ -401,8 +408,15 @@ vmcs_init(struct vmcs *vmcs) goto done; /* instruction pointer */ - if ((error = vmwrite(VMCS_HOST_RIP, (u_long)vmx_exit_guest)) != 0) - goto done; + if (no_flush_rsb) { + if ((error = vmwrite(VMCS_HOST_RIP, + (u_long)vmx_exit_guest)) != 0) + goto done; + } else { + if ((error = vmwrite(VMCS_HOST_RIP, + (u_long)vmx_exit_guest_flush_rsb)) != 0) + goto done; + } /* link pointer */ if ((error = vmwrite(VMCS_LINK_POINTER, ~0)) != 0) Modified: stable/11/sys/amd64/vmm/intel/vmx.h ============================================================================== --- stable/11/sys/amd64/vmm/intel/vmx.h Fri Mar 9 19:04:06 2018 (r330703) +++ stable/11/sys/amd64/vmm/intel/vmx.h Fri Mar 9 19:39:08 2018 (r330704) @@ -148,5 +148,6 @@ u_long vmx_fix_cr4(u_long cr4); int vmx_set_tsc_offset(struct vmx *vmx, int vcpu, uint64_t offset); extern char vmx_exit_guest[]; +extern char vmx_exit_guest_flush_rsb[]; #endif Modified: stable/11/sys/amd64/vmm/intel/vmx_support.S ============================================================================== --- stable/11/sys/amd64/vmm/intel/vmx_support.S Fri Mar 9 19:04:06 2018 (r330703) +++ stable/11/sys/amd64/vmm/intel/vmx_support.S Fri Mar 9 19:39:08 2018 (r330704) @@ -42,6 +42,29 @@ #define VLEAVE pop %rbp /* + * Save the guest context. + */ +#define VMX_GUEST_SAVE \ + movq %rdi,VMXCTX_GUEST_RDI(%rsp); \ + movq %rsi,VMXCTX_GUEST_RSI(%rsp); \ + movq %rdx,VMXCTX_GUEST_RDX(%rsp); \ + movq %rcx,VMXCTX_GUEST_RCX(%rsp); \ + movq %r8,VMXCTX_GUEST_R8(%rsp); \ + movq %r9,VMXCTX_GUEST_R9(%rsp); \ + movq %rax,VMXCTX_GUEST_RAX(%rsp); \ + movq %rbx,VMXCTX_GUEST_RBX(%rsp); \ + movq %rbp,VMXCTX_GUEST_RBP(%rsp); \ + movq %r10,VMXCTX_GUEST_R10(%rsp); \ + movq %r11,VMXCTX_GUEST_R11(%rsp); \ + movq %r12,VMXCTX_GUEST_R12(%rsp); \ + movq %r13,VMXCTX_GUEST_R13(%rsp); \ + movq %r14,VMXCTX_GUEST_R14(%rsp); \ + movq %r15,VMXCTX_GUEST_R15(%rsp); \ + movq %cr2,%rdi; \ + movq %rdi,VMXCTX_GUEST_CR2(%rsp); \ + movq %rsp,%rdi; + +/* * Assumes that %rdi holds a pointer to the 'vmxctx'. * * On "return" all registers are updated to reflect guest state. The two @@ -72,6 +95,20 @@ movq VMXCTX_GUEST_RDI(%rdi),%rdi; /* restore rdi the last */ /* + * Clobber the remaining registers with guest contents so they can't + * be misused. + */ +#define VMX_GUEST_CLOBBER \ + xor %rax, %rax; \ + xor %rcx, %rcx; \ + xor %rdx, %rdx; \ + xor %rsi, %rsi; \ + xor %r8, %r8; \ + xor %r9, %r9; \ + xor %r10, %r10; \ + xor %r11, %r11; + +/* * Save and restore the host context. * * Assumes that %rdi holds a pointer to the 'vmxctx'. @@ -197,33 +234,57 @@ inst_error: * The VMCS-restored %rsp points to the struct vmxctx */ ALIGN_TEXT - .globl vmx_exit_guest -vmx_exit_guest: + .globl vmx_exit_guest_flush_rsb +vmx_exit_guest_flush_rsb: /* * Save guest state that is not automatically saved in the vmcs. */ - movq %rdi,VMXCTX_GUEST_RDI(%rsp) - movq %rsi,VMXCTX_GUEST_RSI(%rsp) - movq %rdx,VMXCTX_GUEST_RDX(%rsp) - movq %rcx,VMXCTX_GUEST_RCX(%rsp) - movq %r8,VMXCTX_GUEST_R8(%rsp) - movq %r9,VMXCTX_GUEST_R9(%rsp) - movq %rax,VMXCTX_GUEST_RAX(%rsp) - movq %rbx,VMXCTX_GUEST_RBX(%rsp) - movq %rbp,VMXCTX_GUEST_RBP(%rsp) - movq %r10,VMXCTX_GUEST_R10(%rsp) - movq %r11,VMXCTX_GUEST_R11(%rsp) - movq %r12,VMXCTX_GUEST_R12(%rsp) - movq %r13,VMXCTX_GUEST_R13(%rsp) - movq %r14,VMXCTX_GUEST_R14(%rsp) - movq %r15,VMXCTX_GUEST_R15(%rsp) + VMX_GUEST_SAVE - movq %cr2,%rdi - movq %rdi,VMXCTX_GUEST_CR2(%rsp) + /* + * Deactivate guest pmap from this cpu. + */ + movq VMXCTX_PMAP(%rdi), %r11 + movl PCPU(CPUID), %r10d + LK btrl %r10d, PM_ACTIVE(%r11) - movq %rsp,%rdi + VMX_HOST_RESTORE + VMX_GUEST_CLOBBER + /* + * To prevent malicious branch target predictions from + * affecting the host, overwrite all entries in the RSB upon + * exiting a guest. + */ + mov $16, %ecx /* 16 iterations, two calls per loop */ + mov %rsp, %rax +0: call 2f /* create an RSB entry. */ +1: pause + call 1b /* capture rogue speculation. */ +2: call 2f /* create an RSB entry. */ +1: pause + call 1b /* capture rogue speculation. */ +2: sub $1, %ecx + jnz 0b + mov %rax, %rsp + + /* + * This will return to the caller of 'vmx_enter_guest()' with a return + * value of VMX_GUEST_VMEXIT. + */ + movl $VMX_GUEST_VMEXIT, %eax + VLEAVE + ret + + .globl vmx_exit_guest +vmx_exit_guest: + /* + * Save guest state that is not automatically saved in the vmcs. + */ + VMX_GUEST_SAVE + + /* * Deactivate guest pmap from this cpu. */ movq VMXCTX_PMAP(%rdi), %r11 @@ -231,6 +292,8 @@ vmx_exit_guest: LK btrl %r10d, PM_ACTIVE(%r11) VMX_HOST_RESTORE + + VMX_GUEST_CLOBBER /* * This will return to the caller of 'vmx_enter_guest()' with a return From owner-svn-src-all@freebsd.org Fri Mar 9 20:41:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4F1DF49E9C; Fri, 9 Mar 2018 20:41:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 18F4D6B4D0; Fri, 9 Mar 2018 20:41:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id E80F9429C1B; Sat, 10 Mar 2018 07:41:30 +1100 (AEDT) Date: Sat, 10 Mar 2018 07:41:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330338 - head/sys/amd64/amd64 In-Reply-To: <2557369.6nFzd3kAUm@ralph.baldwin.cx> Message-ID: <20180310070452.P5919@besplex.bde.org> References: <201803031510.w23FAbeC065867@repo.freebsd.org> <2557369.6nFzd3kAUm@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=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=V4blWmsMqxuLYuRTueAA:9 a=934a5VvCigGelsVO:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 20:41:42 -0000 On Fri, 9 Mar 2018, John Baldwin wrote: > On Saturday, March 03, 2018 03:10:37 PM Andriy Gapon wrote: >> Author: avg >> Date: Sat Mar 3 15:10:37 2018 >> New Revision: 330338 >> URL: https://svnweb.freebsd.org/changeset/base/330338 >> >> Log: >> db_nextframe/amd64: catch up with r328083 to recognize fast_syscall_common >> >> Since that change the system call stack traces look like this: >> ... >> sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe0028e13ac0 >> amd64_syscall() at amd64_syscall+0x79b/frame 0xfffffe0028e13bf0 >> fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0028e13bf0 >> So, db_nextframe() stopped recognizing the system call frame. >> This commit should fix that. >> >> Reviewed by: kib >> MFC after: 4 days >> >> Modified: >> head/sys/amd64/amd64/db_trace.c >> >> Modified: head/sys/amd64/amd64/db_trace.c >> ============================================================================== >> --- head/sys/amd64/amd64/db_trace.c Sat Mar 3 13:20:44 2018 (r330337) >> +++ head/sys/amd64/amd64/db_trace.c Sat Mar 3 15:10:37 2018 (r330338) >> @@ -212,7 +212,9 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s >> strcmp(name, "Xcpususpend") == 0 || >> strcmp(name, "Xrendezvous") == 0) >> frame_type = INTERRUPT; >> - else if (strcmp(name, "Xfast_syscall") == 0) >> + else if (strcmp(name, "Xfast_syscall") == 0 || >> + strcmp(name, "Xfast_syscall_pti") == 0 || >> + strcmp(name, "fast_syscall_common") == 0) >> frame_type = SYSCALL; > > I think you actually just want to replace Xfast_syscall with > fast_syscall_common. Neither Xfast_syscall nor Xfast_syscall_pti call any > functions before jumping to the common label, so when unwinding from a system > call you should always get the common label. (That is, I think we should > remove Xfast_syscall and Xfast_syscall_pti here. Any stack trace that > happens to find those symbols during unwinding won't have a valid SYSCALL > frame to unwind.) No, it needs these symbols to decode the frame after reaching a point where the frame is actually set up. Also, in uncommitted fixes I add some decoding of the non-frame between the entry point and when the frame is set up. Then the frame register is still the user's for the syscall case, so should not even be accessed. The i386 output looks like this: current: XX12: Breakpoint at Xint0x80_syscall: pushl $0x2 XX12: db> t XX12: Tracing pid 1 tid 100001 td 0xc6fad000 XX12: Xint0x80_syscall(33,282,bfbfee0c,3b,0,...) at Xint0x80_syscall/frame 0xd1d05bd8 XX12: kernload(2,bfbfeec4,bfbfeed0,804812b,80a3d64,...) at 0x805188f/frame 0xbfbfee7c fixed: XX12F: Breakpoint at Xint0x80_syscall: pushl $0x2 XX12F: db> t XX12F: Tracing pid 1 tid 100001 td 0xd4c23000 XX12F: Xint0x80_syscall(2,bfbfeec4,bfbfeed0,804812b,80a3d64,...) at Xint0x80_syscall/frame 0xbfbfee7c XX12F: --- unknown trap, ebp = 0xbfbfee7c, sp = 0xd3399bdc, ks = 0xd3398000, kse = 0xd339a000 --- where most of the values on the last line are for debugging (ebp is the user stack pointer which will become inaccessible, sp is the local variable sp and [ks, kse - 1] is the thread's kernel stack range (sp must be in this else the backtrace stops). Jumps and labels with names inside functions complicate things. I think fast_syscall_common needs to be in the list too, and the many alltraps labels should have been there. This will be more useful with my fix. The label calltrap has always been in the list. This works right since the frame has been set up then -- IIRC it is the first place where the frame has been set up, and label it more for gdb than for ddb, and decode the frame for ddb (presumably gdb decodes the frame too). Bruce From owner-svn-src-all@freebsd.org Fri Mar 9 20:57:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 089B0F4AE93; Fri, 9 Mar 2018 20:57:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 7B3F66C056; Fri, 9 Mar 2018 20:57:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 8343910171B; Sat, 10 Mar 2018 07:57:32 +1100 (AEDT) Date: Sat, 10 Mar 2018 07:57:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: John Baldwin , Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330338 - head/sys/amd64/amd64 In-Reply-To: <20180310070452.P5919@besplex.bde.org> Message-ID: <20180310074320.S6000@besplex.bde.org> References: <201803031510.w23FAbeC065867@repo.freebsd.org> <2557369.6nFzd3kAUm@ralph.baldwin.cx> <20180310070452.P5919@besplex.bde.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=VJytp5HX c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=Z0mnDzNeAm6wlDpW9RcA:9 a=nTHrAxpj3QkipIiO:21 a=JVfJ45zcLPeVcv5e:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 20:57:42 -0000 On Sat, 10 Mar 2018, Bruce Evans wrote: > On Fri, 9 Mar 2018, John Baldwin wrote: >> >> I think you actually just want to replace Xfast_syscall with >> fast_syscall_common. Neither Xfast_syscall nor Xfast_syscall_pti call any >> functions before jumping to the common label, so when unwinding from a >> system >> call you should always get the common label. (That is, I think we should >> remove Xfast_syscall and Xfast_syscall_pti here. Any stack trace that >> happens to find those symbols during unwinding won't have a valid SYSCALL >> frame to unwind.) > > No, it needs these symbols to decode the frame after reaching a point where > the frame is actually set up. > > Also, in uncommitted fixes I add some decoding of the non-frame between > the entry point and when the frame is set up. Then the frame register > ... > Jumps and labels with names inside functions complicate things. I think > fast_syscall_common needs to be in the list too, and the many alltraps > labels should have been there. This will be more useful with my fix. > The label calltrap has always been in the list. This works right since > the frame has been set up then -- IIRC it is the first place where the > frame has been set up, and label it more for gdb than for ddb, and decode > the frame for ddb (presumably gdb decodes the frame too). Actually, internal labels like alltraps just break finding the entry point. Cross-jumping to such labels also breaks finding the entry point. The calltrap label is a work around for this problem -- it is too hard to trace back to the entry point (e.g., Xpage) or even to alltraps, so the single fake entry point calltrap is used. Syscalls and interrupts are more important, or at least easier to handle, so the problem was avoided for them by not using cross jumps or too many internal labels (though I don't like unnamed labels). This is quite broken for amd64 now. Cross-jumps also complicate mcounting. (The non-traps are easier to handle since they are not multiplexed through trap(). The multiplexing can be thought of as making all traps enter at trap() with a trap code giving the trap number, so no label for the entry point is needed. The trap code is an arg, so it is printed in the stack trace on i386.) Bruce From owner-svn-src-all@freebsd.org Fri Mar 9 21:32:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2E58F4D273; Fri, 9 Mar 2018 21:32:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6906F6D8EC; Fri, 9 Mar 2018 21:32:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63BD724866; Fri, 9 Mar 2018 21:32:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29LW8Kk030491; Fri, 9 Mar 2018 21:32:08 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29LW8QD030490; Fri, 9 Mar 2018 21:32:08 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803092132.w29LW8QD030490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 9 Mar 2018 21:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330705 - head/sbin/mount X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/mount X-SVN-Commit-Revision: 330705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 21:32:08 -0000 Author: imp Date: Fri Mar 9 21:32:07 2018 New Revision: 330705 URL: https://svnweb.freebsd.org/changeset/base/330705 Log: Remove decade's old whine about msdos vs msdosfs. Retain the compatibility silently though. Reviewed by: cem@, kevans@, emaste@ (and many others in the past) Modified: head/sbin/mount/mount.c Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Fri Mar 9 19:39:08 2018 (r330704) +++ head/sbin/mount/mount.c Fri Mar 9 21:32:07 2018 (r330705) @@ -589,11 +589,8 @@ mountfs(const char *vfstype, const char *spec, const c optbuf = catopt(optbuf, "update"); /* Compatibility glue. */ - if (strcmp(vfstype, "msdos") == 0) { - warnx( - "Using \"-t msdosfs\", since \"-t msdos\" is deprecated."); + if (strcmp(vfstype, "msdos") == 0) vfstype = "msdosfs"; - } /* Construct the name of the appropriate mount command */ (void)snprintf(execname, sizeof(execname), "mount_%s", vfstype); From owner-svn-src-all@freebsd.org Fri Mar 9 22:09:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB8FAF2A065; Fri, 9 Mar 2018 22:09:45 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48794701F4; Fri, 9 Mar 2018 22:09:45 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io0-x231.google.com with SMTP id o74so1550311iod.6; Fri, 09 Mar 2018 14:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/vsfZ6Y9rbDNOeuIR0hu2q6Is7+ngj+5m1v9LUH0+2A=; b=kO20dSuFGZtHxPgL98oMGfMEyfh56burmCJSHMpfBmPpSXjd1kIlM4s9qL7ScLTBuj ks6Hj7LzU7FUynI4zLcOD+N6oR+SeHgtJloimJ3nAj7B1pwdOlsByyYt5QYBBE5gbCij oRkJ7xXD1YKCN5JzO0a9EabE3Jf1GzQVaJJkj8+Yqm9LK1+NdQ1WTLvcy+u+YdgA5j6H BAh78VQxd/qXW2LCfLCWvCA4V+NDh9BASxjOJcv3JEtuexFx5a+gxApxIQc3cpi9atWb BenMdQMgaCsw466SYh2t9qfGB2Dg8QJgg5nFSyS65S1uFZuxkx8LOcCbEh2UDQWgB1v5 HGJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=/vsfZ6Y9rbDNOeuIR0hu2q6Is7+ngj+5m1v9LUH0+2A=; b=BGqH0ygXmwAhbVJxG3Y/kvEzIi2lJWUXik2S80KdcmoErvbpAYSbggLeEDZ97LzPPX OU5sYJ/EkBhc4TXh+oKnQucEge3dcJrgLKB+NntSA3BerddEZNoA23G4JXH8Tey46Pzf ThFkmqZDs93u1prsHEMTSDPgWYX2ApnDap+UEkwMYUvc1PLT13NVfhWk4X1RvSwX4rhb +m/gfHCZYMY1xOZy/siJN2Yw/rEsLNWTkOAVzJ/xvCR8/2xv5I9+fCW99lBU1w1yeKuP K99tAl/oNnELo2G38FE4tLX8QuN5agcWLCgjVqGDumpD8ZqCi/NN/eC3/bNg9SRlGQAF IlXA== X-Gm-Message-State: AElRT7HPM4KymMzjWA57MJT1vPCIcJKWyrweW25MYUQYQ6zUcI4DJekX ZDhMX8UK/Go/sXa5PU9MbpUMyulo X-Google-Smtp-Source: AG47ELunmN+/+dUw3o9jlbciuAJY5UWdaZOVRcKdAiQsraXKyn/ShA0OmAthA6B+Wd/u3APe6ea+vg== X-Received: by 10.107.213.72 with SMTP id x8mr46547ioc.60.1520633384184; Fri, 09 Mar 2018 14:09:44 -0800 (PST) Received: from raichu (toroon0560w-lp130-01-174-88-76-226.dsl.bell.ca. [174.88.76.226]) by smtp.gmail.com with ESMTPSA id 33sm1505739ioj.71.2018.03.09.14.09.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 14:09:43 -0800 (PST) Sender: Mark Johnston Date: Fri, 9 Mar 2018 17:09:40 -0500 From: Mark Johnston To: David Bright Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs Message-ID: <20180309220940.GG6174@raichu> References: <201801151925.w0FJPCKA019434@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201801151925.w0FJPCKA019434@repo.freebsd.org> User-Agent: Mutt/1.9.3 (2018-01-21) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 22:09:45 -0000 On Mon, Jan 15, 2018 at 07:25:11PM +0000, David Bright wrote: > Author: dab > Date: Mon Jan 15 19:25:11 2018 > New Revision: 328013 > URL: https://svnweb.freebsd.org/changeset/base/328013 > > Log: > Exit fsck_ffs with non-zero status when file system is not repaired. > > When the fsck_ffs program cannot fully repair a file system, it will > output the message PLEASE RERUN FSCK. However, it does not exit with a > non-zero status in this case (contradicting the man page claim that it > "exits with 0 on success, and >0 if an error occurs." The fsck > rc-script (when running "fsck -y") tests the status from fsck (which > passes along the exit status from fsck_ffs) and issues a "stop_boot" > if the status fails. However, this is not effective since fsck_ffs can > return zero even on (some) errors. Effectively, it is left to a later > step in the boot process when the file systems are mounted to detect > the still-unclean file system and stop the boot. > > This change modifies fsck_ffs so that when it cannot fully repair the > file system and issues the PLEASE RERUN FSCK message it also exits > with a non-zero status. > > While here, the fsck_ffs man page has also been updated to document > the failing exit status codes used by fsck_ffs. Previously, only exit > status 7 was documented. Some of these exit statuses are tested for in > the fsck rc-script, so they are clearly depended upon and deserve > documentation. etc/rc.d/fsck doesn't know how to interpret the new exit code and now just drops to a single-user shell when it is encountered. This is happening to me semi-regularly when my test systems crash, especially when I test kernel panic handling. :) Is there any reason etc/rc.d/fsck shouldn't automatically retry (up to some configurable number of retries) when the new error code is seen? The patch below seems to do the trick for me: diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 584e842bba2c..63d2fcc0be8d 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -95,6 +95,7 @@ root_rw_mount="YES" # Set to NO to inhibit remounting root read-write. root_hold_delay="30" # Time to wait for root mount hold release. fsck_y_enable="NO" # Set to YES to do fsck -y if the initial preen fails. fsck_y_flags="-T ffs:-R -T ufs:-R" # Additional flags for fsck -y +fsck_retries="3" # Number of times to retry fsck before giving up. background_fsck="YES" # Attempt to run fsck in the background where possible. background_fsck_delay="60" # Time to wait (seconds) before starting the fsck. growfs_enable="NO" # Set to YES to attempt to grow the root filesystem on boot diff --git a/etc/rc.d/fsck b/etc/rc.d/fsck index bd3122a20110..708d92228e3d 100755 --- a/etc/rc.d/fsck +++ b/etc/rc.d/fsck @@ -14,8 +14,82 @@ desc="Run file system checks" start_cmd="fsck_start" stop_cmd=":" +_fsck_run() +{ + local err + + if checkyesno background_fsck; then + fsck -F -p + else + fsck -p + fi + + err=$? + if [ ${err} -eq 3 ]; then + echo "Warning! Some of the devices might not be" \ + "available; retrying" + root_hold_wait + check_startmsgs && echo "Restarting file system checks:" + if checkyesno background_fsck; then + fsck -F -p + else + fsck -p + fi + err=$? + fi + + case ${err} in + 0) + ;; + 2) + stop_boot + ;; + 4) + echo "Rebooting..." + reboot + echo "Reboot failed; help!" + stop_boot + ;; + 8) + if checkyesno fsck_y_enable; then + echo "File system preen failed, trying fsck -y ${fsck_y_flags}" + fsck -y ${fsck_y_flags} + case $? in + 0) + ;; + *) + echo "Automatic file system check failed; help!" + stop_boot + ;; + esac + else + echo "Automatic file system check failed; help!" + stop_boot + fi + ;; + 12) + echo "Boot interrupted." + stop_boot + ;; + 16) + echo "File system check retry requested." + ;; + 130) + stop_boot + ;; + *) + echo "Unknown error ${err}; help!" + stop_boot + ;; + esac + + return $err +} + fsck_start() { + local err tries + if [ "$autoboot" = no ]; then echo "Fast boot: skipping disk checks." elif [ ! -r /etc/fstab ]; then @@ -25,67 +99,13 @@ fsck_start() trap : 3 check_startmsgs && echo "Starting file system checks:" - if checkyesno background_fsck; then - fsck -F -p - else - fsck -p - fi - - err=$? - if [ ${err} -eq 3 ]; then - echo "Warning! Some of the devices might not be" \ - "available; retrying" - root_hold_wait - check_startmsgs && echo "Restarting file system checks:" - if checkyesno background_fsck; then - fsck -F -p - else - fsck -p - fi + tries=$fsck_retries + while [ $tries -gt 0 ]; do + _fsck_run err=$? - fi - - case ${err} in - 0) - ;; - 2) - stop_boot - ;; - 4) - echo "Rebooting..." - reboot - echo "Reboot failed; help!" - stop_boot - ;; - 8) - if checkyesno fsck_y_enable; then - echo "File system preen failed, trying fsck -y ${fsck_y_flags}" - fsck -y ${fsck_y_flags} - case $? in - 0) - ;; - *) - echo "Automatic file system check failed; help!" - stop_boot - ;; - esac - else - echo "Automatic file system check failed; help!" - stop_boot - fi - ;; - 12) - echo "Boot interrupted." - stop_boot - ;; - 130) - stop_boot - ;; - *) - echo "Unknown error ${err}; help!" - stop_boot - ;; - esac + [ $err -eq 16 ] || break + tries=$(($tries - 1)) + done fi } diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index c27a2134e6bc..c9a16ca9f65c 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2018 +.Dd March 9, 2018 .Dt RC.CONF 5 .Os .Sh NAME @@ -2053,6 +2053,11 @@ will be run with the .Fl y flag if the initial preen of the file systems fails. +.It Va fsck_retries +.Pq Vt int +Maximum number of times to re-run +.Xr fsck 8 +if its exit status indicates that a re-run is required. .It Va background_fsck .Pq Vt bool If set to From owner-svn-src-all@freebsd.org Fri Mar 9 22:31:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B60CF2BD62 for ; Fri, 9 Mar 2018 22:31:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2FD47128D for ; Fri, 9 Mar 2018 22:31:32 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 7fdbfb70-23e9-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 7fdbfb70-23e9-11e8-b951-f99fef315fd9; Fri, 09 Mar 2018 22:30:42 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w29MVUBl008952; Fri, 9 Mar 2018 15:31:30 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1520634689.84937.74.camel@freebsd.org> Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs From: Ian Lepore To: Mark Johnston , David Bright Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 09 Mar 2018 15:31:29 -0700 In-Reply-To: <20180309220940.GG6174@raichu> References: <201801151925.w0FJPCKA019434@repo.freebsd.org> <20180309220940.GG6174@raichu> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 22:31:33 -0000 On Fri, 2018-03-09 at 17:09 -0500, Mark Johnston wrote: > On Mon, Jan 15, 2018 at 07:25:11PM +0000, David Bright wrote: > > > > Author: dab > > Date: Mon Jan 15 19:25:11 2018 > > New Revision: 328013 > > URL: https://svnweb.freebsd.org/changeset/base/328013 > > > > Log: > > Exit fsck_ffs with non-zero status when file system is not repaired. > > > > [...] > etc/rc.d/fsck doesn't know how to interpret the new exit code and now > just drops to a single-user shell when it is encountered. This is > happening to me semi-regularly when my test systems crash, especially > when I test kernel panic handling. :) > > Is there any reason etc/rc.d/fsck shouldn't automatically retry (up to > some configurable number of retries) when the new error code is seen? > The patch below seems to do the trick for me: > fsck_ffs already has a -R flag to automatically retry, wouldn't that be a better mechanism for handling this new type of retry? -- Ian From owner-svn-src-all@freebsd.org Fri Mar 9 22:58:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 244E0F2D9F5; Fri, 9 Mar 2018 22:58:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDCBA721D9; Fri, 9 Mar 2018 22:58:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C043225502; Fri, 9 Mar 2018 22:58:05 +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 w29Mw5R4073797; Fri, 9 Mar 2018 22:58:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29Mw5jk073796; Fri, 9 Mar 2018 22:58:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803092258.w29Mw5jk073796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 9 Mar 2018 22:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330708 - head/gnu/usr.bin/gdb/kgdb X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/gnu/usr.bin/gdb/kgdb X-SVN-Commit-Revision: 330708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 22:58:06 -0000 Author: jhb Date: Fri Mar 9 22:58:05 2018 New Revision: 330708 URL: https://svnweb.freebsd.org/changeset/base/330708 Log: Use the trapframe unwinder for "fast_syscall_common". MFC after: 3 days Modified: head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Modified: head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Fri Mar 9 22:52:52 2018 (r330707) +++ head/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Fri Mar 9 22:58:05 2018 (r330708) @@ -189,6 +189,7 @@ kgdb_trgt_trapframe_sniffer(struct frame_info *next_fr if (pname == NULL) return (NULL); if (strcmp(pname, "calltrap") == 0 || + strcmp(pname, "fast_syscall_common") == 0 || strcmp(pname, "mchk_calltrap") == 0 || strcmp(pname, "nmi_calltrap") == 0 || (pname[0] == 'X' && pname[1] != '_')) From owner-svn-src-all@freebsd.org Fri Mar 9 23:17:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C522AF2F0A6; Fri, 9 Mar 2018 23:17:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79F2172CB3; Fri, 9 Mar 2018 23:17:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7075225810; Fri, 9 Mar 2018 23:17:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29NHTOG083934; Fri, 9 Mar 2018 23:17:29 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29NHTfi083933; Fri, 9 Mar 2018 23:17:29 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803092317.w29NHTfi083933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 9 Mar 2018 23:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330709 - head/etc/mtree X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/etc/mtree X-SVN-Commit-Revision: 330709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 23:17:29 -0000 Author: asomers Date: Fri Mar 9 23:17:29 2018 New Revision: 330709 URL: https://svnweb.freebsd.org/changeset/base/330709 Log: Commit missing file from r330696 MFC after: 3 weeks X-MFC-With: 330696 Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Fri Mar 9 22:58:05 2018 (r330708) +++ head/etc/mtree/BSD.tests.dist Fri Mar 9 23:17:29 2018 (r330709) @@ -382,6 +382,8 @@ .. rtld-elf .. + tftpd + .. .. sbin dhclient From owner-svn-src-all@freebsd.org Fri Mar 9 23:25:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AD7BF2FA51; Fri, 9 Mar 2018 23:25:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29BCE73303; Fri, 9 Mar 2018 23:25:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2099D259AA; Fri, 9 Mar 2018 23:25:19 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w29NPIc3088628; Fri, 9 Mar 2018 23:25:18 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29NPIwP088624; Fri, 9 Mar 2018 23:25:18 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803092325.w29NPIwP088624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 9 Mar 2018 23:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330710 - in head: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Commit-Revision: 330710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 23:25:19 -0000 Author: asomers Date: Fri Mar 9 23:25:18 2018 New Revision: 330710 URL: https://svnweb.freebsd.org/changeset/base/330710 Log: tftpd: Flush files as soon as they are fully received On an RRQ, tftpd doesn't exit as soon as it's finished receiving a file. Instead, it waits five seconds just in case the client didn't receive the server's last ACK and decides to resend the final DATA packet. Unfortunately, this created a 5 second delay from when the client thinks it's done sending the file, and when the file is available for other processes. Fix this bug by closing the file as soon as receipt is finished. PR: 157700 Reported by: Barry Mishler MFC after: 3 weeks Modified: head/libexec/tftpd/tests/functional.c head/libexec/tftpd/tftp-transfer.c head/libexec/tftpd/tftpd.c head/usr.bin/tftp/tftp.c Modified: head/libexec/tftpd/tests/functional.c ============================================================================== --- head/libexec/tftpd/tests/functional.c Fri Mar 9 23:17:29 2018 (r330709) +++ head/libexec/tftpd/tests/functional.c Fri Mar 9 23:25:18 2018 (r330710) @@ -694,7 +694,6 @@ TFTPD_TC_DEFINE(w_flag,, w_flag = 1;) send_data(1, contents, contents_len); recv_ack(1); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("small.txt", O_RDONLY); r = read(fd, buffer, sizeof(buffer)); close(fd); @@ -731,7 +730,6 @@ TFTPD_TC_DEFINE(wrq_dropped_ack,) send_data(2, (const char*)&contents[128], 256); recv_ack(2); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("medium.txt", O_RDONLY); r = read(fd, buffer, sizeof(buffer)); close(fd); @@ -764,7 +762,6 @@ TFTPD_TC_DEFINE(wrq_dropped_data,) send_data(1, contents, contents_len); recv_ack(1); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("small.txt", O_RDONLY); r = read(fd, buffer, sizeof(buffer)); close(fd); @@ -798,7 +795,6 @@ TFTPD_TC_DEFINE(wrq_duped_data,) send_data(2, (const char*)&contents[128], 256); recv_ack(2); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("medium.txt", O_RDONLY); r = read(fd, buffer, sizeof(buffer)); close(fd); @@ -865,7 +861,6 @@ TFTPD_TC_DEFINE(wrq_medium,) send_data(2, (const char*)&contents[128], 256); recv_ack(2); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("medium.txt", O_RDONLY); r = read(fd, buffer, sizeof(buffer)); close(fd); @@ -891,14 +886,13 @@ TFTPD_TC_DEFINE(wrq_netascii,) fd = open("unix.txt", O_RDWR | O_CREAT, 0666); ATF_REQUIRE(fd >= 0); close(fd); - contents_len = strlen(contents) + 1; + contents_len = sizeof(contents); SEND_WRQ("unix.txt", "netascii"); recv_ack(0); send_data(1, contents, contents_len); recv_ack(1); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("unix.txt", O_RDONLY); r = read(fd, buffer, sizeof(buffer)); close(fd); @@ -938,7 +932,6 @@ TFTPD_TC_DEFINE(wrq_small,) send_data(1, contents, contents_len); recv_ack(1); - atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); fd = open("small.txt", O_RDONLY); r = read(fd, buffer, sizeof(buffer)); close(fd); Modified: head/libexec/tftpd/tftp-transfer.c ============================================================================== --- head/libexec/tftpd/tftp-transfer.c Fri Mar 9 23:17:29 2018 (r330709) +++ head/libexec/tftpd/tftp-transfer.c Fri Mar 9 23:25:18 2018 (r330710) @@ -304,6 +304,8 @@ send_ack: gettimeofday(&(ts->tstop), NULL); } while (n_data == segsize); + write_close(); + /* Don't do late packet management for the client implementation */ if (acting_as_client) return; Modified: head/libexec/tftpd/tftpd.c ============================================================================== --- head/libexec/tftpd/tftpd.c Fri Mar 9 23:17:29 2018 (r330709) +++ head/libexec/tftpd/tftpd.c Fri Mar 9 23:25:18 2018 (r330710) @@ -823,7 +823,6 @@ tftp_recvfile(int peer, const char *mode) block = 0; tftp_receive(peer, &block, &ts, NULL, 0); - write_close(); gettimeofday(&now2, NULL); if (debug&DEBUG_SIMPLE) { Modified: head/usr.bin/tftp/tftp.c ============================================================================== --- head/usr.bin/tftp/tftp.c Fri Mar 9 23:17:29 2018 (r330709) +++ head/usr.bin/tftp/tftp.c Fri Mar 9 23:25:18 2018 (r330710) @@ -265,7 +265,6 @@ recvfile(int peer, char *port, int fd, char *name, cha tftp_receive(peer, &block, &tftp_stats, rp, n); } - write_close(); if (tftp_stats.amount > 0) printstats("Received", verbose, &tftp_stats); return; From owner-svn-src-all@freebsd.org Fri Mar 9 23:37:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 869D6F3087C; Fri, 9 Mar 2018 23:37:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 350ED739FF; Fri, 9 Mar 2018 23:37:20 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E38D25B39; Fri, 9 Mar 2018 23:37:20 +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 w29NbKOH093828; Fri, 9 Mar 2018 23:37:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w29NbJSX093826; Fri, 9 Mar 2018 23:37:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803092337.w29NbJSX093826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 9 Mar 2018 23:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330711 - head/sbin/sysctl X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sbin/sysctl X-SVN-Commit-Revision: 330711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 23:37:20 -0000 Author: jhb Date: Fri Mar 9 23:37:19 2018 New Revision: 330711 URL: https://svnweb.freebsd.org/changeset/base/330711 Log: Permit sysctl(8) to set an array of numeric values for a single node. Most sysctl nodes only return a single value, but some nodes return an array of values (e.g. kern.cp_time). sysctl(8) understand how to display the values of a node that returns multiple values (it prints out each numeric value separated by spaces). However, until now sysctl(8) has only been able to set sysctl nodes to a single value. This change allows sysctl to accept a new value for a numeric sysctl node that contains multiple values separated by either spaces or commas. sysctl(8) parses this list into an array of values and passes the array as the "new" value to sysctl(2). Reviewed by: rpokala MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D14569 Modified: head/sbin/sysctl/sysctl.8 head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.8 ============================================================================== --- head/sbin/sysctl/sysctl.8 Fri Mar 9 23:25:18 2018 (r330710) +++ head/sbin/sysctl/sysctl.8 Fri Mar 9 23:37:19 2018 (r330711) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 10, 2015 +.Dd March 9, 2018 .Dt SYSCTL 8 .Os .Sh NAME @@ -39,7 +39,7 @@ .Op Fl bdehiNnoRTtqx .Op Fl B Ar bufsize .Op Fl f Ar filename -.Ar name Ns Op = Ns Ar value +.Ar name Ns Op = Ns Ar value Ns Op , Ns Ar value .Ar ... .Nm .Op Fl bdehNnoRTtqx Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Fri Mar 9 23:25:18 2018 (r330710) +++ head/sbin/sysctl/sysctl.c Fri Mar 9 23:37:19 2018 (r330711) @@ -65,6 +65,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -234,16 +235,17 @@ main(int argc, char **argv) } /* - * Parse a name into a MIB entry. - * Lookup and print out the MIB entry if it exists. - * Set a new value if requested. + * Parse a single numeric value, append it to 'newbuf', and update + * 'newsize'. Returns true if the value was parsed and false if the + * value was invalid. Non-numeric types (strings) are handled + * directly in parse(). */ -static int -parse(const char *string, int lineno) +static bool +parse_numeric(const char *newvalstr, const char *fmt, u_int kind, + void **newbufp, size_t *newsizep) { - int len, i, j; + void *newbuf; const void *newval; - const char *newvalstr = NULL; int8_t i8val; uint8_t u8val; int16_t i16val; @@ -254,11 +256,111 @@ parse(const char *string, int lineno) unsigned int uintval; long longval; unsigned long ulongval; - size_t newsize = Bflag; int64_t i64val; uint64_t u64val; + size_t valsize; + char *endptr = NULL; + + errno = 0; + + switch (kind & CTLTYPE) { + case CTLTYPE_INT: + if (strncmp(fmt, "IK", 2) == 0) + intval = strIKtoi(newvalstr, &endptr, fmt); + else + intval = (int)strtol(newvalstr, &endptr, 0); + newval = &intval; + valsize = sizeof(intval); + break; + case CTLTYPE_UINT: + uintval = (int) strtoul(newvalstr, &endptr, 0); + newval = &uintval; + valsize = sizeof(uintval); + break; + case CTLTYPE_LONG: + longval = strtol(newvalstr, &endptr, 0); + newval = &longval; + valsize = sizeof(longval); + break; + case CTLTYPE_ULONG: + ulongval = strtoul(newvalstr, &endptr, 0); + newval = &ulongval; + valsize = sizeof(ulongval); + break; + case CTLTYPE_S8: + i8val = (int8_t)strtol(newvalstr, &endptr, 0); + newval = &i8val; + valsize = sizeof(i8val); + break; + case CTLTYPE_S16: + i16val = (int16_t)strtol(newvalstr, &endptr, 0); + newval = &i16val; + valsize = sizeof(i16val); + break; + case CTLTYPE_S32: + i32val = (int32_t)strtol(newvalstr, &endptr, 0); + newval = &i32val; + valsize = sizeof(i32val); + break; + case CTLTYPE_S64: + i64val = strtoimax(newvalstr, &endptr, 0); + newval = &i64val; + valsize = sizeof(i64val); + break; + case CTLTYPE_U8: + u8val = (uint8_t)strtoul(newvalstr, &endptr, 0); + newval = &u8val; + valsize = sizeof(u8val); + break; + case CTLTYPE_U16: + u16val = (uint16_t)strtoul(newvalstr, &endptr, 0); + newval = &u16val; + valsize = sizeof(u16val); + break; + case CTLTYPE_U32: + u32val = (uint32_t)strtoul(newvalstr, &endptr, 0); + newval = &u32val; + valsize = sizeof(u32val); + break; + case CTLTYPE_U64: + u64val = strtoumax(newvalstr, &endptr, 0); + newval = &u64val; + valsize = sizeof(u64val); + break; + default: + /* NOTREACHED */ + abort(); + } + + if (errno != 0 || endptr == newvalstr || + (endptr != NULL && *endptr != '\0')) + return (false); + + newbuf = realloc(*newbufp, *newsizep + valsize); + if (newbuf == NULL) + err(1, "out of memory"); + memcpy((char *)newbuf + *newsizep, newval, valsize); + *newbufp = newbuf; + *newsizep += valsize; + + return (true); +} + +/* + * Parse a name into a MIB entry. + * Lookup and print out the MIB entry if it exists. + * Set a new value if requested. + */ +static int +parse(const char *string, int lineno) +{ + int len, i, j; + const void *newval; + char *newvalstr = NULL; + void *newbuf; + size_t newsize = Bflag; int mib[CTL_MAXNAME]; - char *cp, *bufp, buf[BUFSIZ], *endptr = NULL, fmt[BUFSIZ], line[BUFSIZ]; + char *cp, *bufp, buf[BUFSIZ], fmt[BUFSIZ], line[BUFSIZ]; u_int kind; if (lineno) @@ -377,94 +479,33 @@ parse(const char *string, int lineno) return (1); } - errno = 0; + newbuf = NULL; switch (kind & CTLTYPE) { - case CTLTYPE_INT: - if (strncmp(fmt, "IK", 2) == 0) - intval = strIKtoi(newvalstr, &endptr, fmt); - else - intval = (int)strtol(newvalstr, &endptr, - 0); - newval = &intval; - newsize = sizeof(intval); - break; - case CTLTYPE_UINT: - uintval = (int) strtoul(newvalstr, &endptr, 0); - newval = &uintval; - newsize = sizeof(uintval); - break; - case CTLTYPE_LONG: - longval = strtol(newvalstr, &endptr, 0); - newval = &longval; - newsize = sizeof(longval); - break; - case CTLTYPE_ULONG: - ulongval = strtoul(newvalstr, &endptr, 0); - newval = &ulongval; - newsize = sizeof(ulongval); - break; - case CTLTYPE_STRING: - newval = newvalstr; - break; - case CTLTYPE_S8: - i8val = (int8_t)strtol(newvalstr, &endptr, 0); - newval = &i8val; - newsize = sizeof(i8val); - break; - case CTLTYPE_S16: - i16val = (int16_t)strtol(newvalstr, &endptr, - 0); - newval = &i16val; - newsize = sizeof(i16val); - break; - case CTLTYPE_S32: - i32val = (int32_t)strtol(newvalstr, &endptr, - 0); - newval = &i32val; - newsize = sizeof(i32val); - break; - case CTLTYPE_S64: - i64val = strtoimax(newvalstr, &endptr, 0); - newval = &i64val; - newsize = sizeof(i64val); - break; - case CTLTYPE_U8: - u8val = (uint8_t)strtoul(newvalstr, &endptr, 0); - newval = &u8val; - newsize = sizeof(u8val); - break; - case CTLTYPE_U16: - u16val = (uint16_t)strtoul(newvalstr, &endptr, - 0); - newval = &u16val; - newsize = sizeof(u16val); - break; - case CTLTYPE_U32: - u32val = (uint32_t)strtoul(newvalstr, &endptr, - 0); - newval = &u32val; - newsize = sizeof(u32val); - break; - case CTLTYPE_U64: - u64val = strtoumax(newvalstr, &endptr, 0); - newval = &u64val; - newsize = sizeof(u64val); - break; - default: - /* NOTREACHED */ - abort(); + case CTLTYPE_STRING: + newval = newvalstr; + break; + default: + newsize = 0; + while ((cp = strsep(&newvalstr, " ,")) != NULL) { + if (*cp == '\0') + continue; + if (!parse_numeric(cp, fmt, kind, &newbuf, + &newsize)) { + warnx("invalid %s '%s'%s", + ctl_typename[kind & CTLTYPE], + cp, line); + free(newbuf); + return (1); + } + } + newval = newbuf; + break; } - if (errno != 0 || endptr == newvalstr || - (endptr != NULL && *endptr != '\0')) { - warnx("invalid %s '%s'%s", ctl_typename[kind & CTLTYPE], - newvalstr, line); - return (1); - } - i = show_var(mib, len); if (sysctl(mib, len, 0, 0, newval, newsize) == -1) { + free(newbuf); if (!i && !bflag) putchar('\n'); switch (errno) { @@ -485,6 +526,7 @@ parse(const char *string, int lineno) return (1); } } + free(newbuf); if (!bflag) printf(" -> "); i = nflag; From owner-svn-src-all@freebsd.org Sat Mar 10 00:10:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25A3FF32DFB; Sat, 10 Mar 2018 00:10:48 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA4CF74CF9; Sat, 10 Mar 2018 00:10:47 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BA7E2602A; Sat, 10 Mar 2018 00:10:47 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A0Al3a008787; Sat, 10 Mar 2018 00:10:47 GMT (envelope-from karels@FreeBSD.org) Received: (from karels@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A0AlkF008785; Sat, 10 Mar 2018 00:10:47 GMT (envelope-from karels@FreeBSD.org) Message-Id: <201803100010.w2A0AlkF008785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: karels set sender to karels@FreeBSD.org using -f From: Mike Karels Date: Sat, 10 Mar 2018 00:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330712 - head/bin/ps X-SVN-Group: head X-SVN-Commit-Author: karels X-SVN-Commit-Paths: head/bin/ps X-SVN-Commit-Revision: 330712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 00:10:48 -0000 Author: karels Date: Sat Mar 10 00:10:47 2018 New Revision: 330712 URL: https://svnweb.freebsd.org/changeset/base/330712 Log: Change ps(1) output width to unlimited if not interactive Apply patch submitted with PR 217159 to make ps use unlimited width when not associated with a terminal (i.e., none of stdout, stdin, or stderr is a tty). Update comments and man page correspondingly. This change was requested to work around lack of -ww in scripts from third-party packages, including Hadoop, and adds a small measure of Linux compatibility. Hopefully few if any non-interactive scripts depend on the old default of 79. PR: 217159 Submitted by: n.deepak at gmail.com Reviewed by: vangyzen jhb Differential Revision: https://reviews.freebsd.org/D14614 Modified: head/bin/ps/ps.1 head/bin/ps/ps.c Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Fri Mar 9 23:37:19 2018 (r330711) +++ head/bin/ps/ps.1 Sat Mar 10 00:10:47 2018 (r330712) @@ -101,6 +101,14 @@ The default output format includes, for each process, controlling terminal, state, CPU time (including both user and system time) and associated command. .Pp +If the +.Nm +process is associated with a terminal, the default output width is that of the +terminal; otherwise the output width is unlimited. +See also the +.Fl w +option. +.Pp The options are as follows: .Bl -tag -width indent .It Fl -libxo @@ -257,13 +265,15 @@ option implies the .Fl m option. .It Fl w -Use 132 columns to display information, instead of the default which -is your window size. +Use at least 132 columns to display information, instead of the default which +is the window size if +.Nm +is associated with a terminal. If the .Fl w option is specified more than once, .Nm -will use as many columns as necessary without regard for your window size. +will use as many columns as necessary without regard for the window size. Note that this option has no effect if the .Dq command column is not the last column displayed. Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Fri Mar 9 23:37:19 2018 (r330711) +++ head/bin/ps/ps.c Sat Mar 10 00:10:47 2018 (r330712) @@ -202,6 +202,11 @@ main(int argc, char *argv[]) * any of stdout, stderr, or stdin is a terminal. The intent * is that "ps", "ps | more", and "ps | grep" all use the same * default line length unless -w is specified. + * + * If not interactive, the default length was traditionally 79. + * It has been changed to unlimited. This is mostly for the + * benefit of non-interactive scripts, which arguably should + * use -ww, but is compatible with Linux. */ if ((cols = getenv("COLUMNS")) != NULL && *cols != '\0') termwidth = atoi(cols); @@ -209,7 +214,7 @@ main(int argc, char *argv[]) ioctl(STDERR_FILENO, TIOCGWINSZ, (char *)&ws) == -1 && ioctl(STDIN_FILENO, TIOCGWINSZ, (char *)&ws) == -1) || ws.ws_col == 0) - termwidth = 79; + termwidth = UNLIMITED; else termwidth = ws.ws_col - 1; From owner-svn-src-all@freebsd.org Sat Mar 10 00:41:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B57EBF35993; Sat, 10 Mar 2018 00:41:47 +0000 (UTC) (envelope-from dexuan.bsd@gmail.com) Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::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 0F2B07620B; Sat, 10 Mar 2018 00:41:47 +0000 (UTC) (envelope-from dexuan.bsd@gmail.com) Received: by mail-lf0-x244.google.com with SMTP id e28-v6so6624752lfc.3; Fri, 09 Mar 2018 16:41:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=t/g85Ex4mphkP1x6PdSEfZlPsarOkdB8Nf9yNGBRQfc=; b=dfxDsy1ViytbPiOX/jE5rpyrA5Bx4wISEHNuMaFRYBQY48pGmBSdboUQk8KRq/WK9X 8oLio6pgCKqlz4qetzySva6X88eJkFRpXll3BS5rFSccYyPquZ6AuPZ3jAzQESXGpflp tW9wMfjVkoRJk5idxGqyHucvnroVqc56WK18FFaDd7nOqSLzrZzH0Afofk9W5CKUh2L1 +MN2eAFD8KUyRFw3cqYLbBhY/Mp9PkNmS2qDl8C/imgTQDqT3kb521J15caiU4yu+3vK +sO/yqCjGpLSEPYaGOmr/o4hFt3ScX5U689RiSoJ3AFRu13p2MfMse7HJoSi6PvGo/EU Hd/g== 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=t/g85Ex4mphkP1x6PdSEfZlPsarOkdB8Nf9yNGBRQfc=; b=QJb3ckoyFSbZX9JfvglpBLnZ8sNk9xIC+nnYQxK4YW7Dfulij2iJMn/1gh38+bnQH7 UdovaCj7x2klFOhop8MEw0u7toosdbHaj6IYxIHeQmswFBBE4kc2WmfgxDkOoEjoqncE tU2HyQOQgJl3TeT7+ZyUIibafEK0w5oosKu98y0pfEsFRWqeAKTQXLvQhunyy8f/hJvG yG9Su0KF4tWMJe9xtk8LyXbO/Jb/jL9sqGofNvafL708YHerQrF6xbg0bczbFnInSUcI n4J9AV0yACHxoMZpg4RJrp6QjGNlJtRaN/Z0MFEwdGuT59ZMMVRNcKYDVi3lR3lbxtWk I9Ag== X-Gm-Message-State: AElRT7Hf62Coo+R+QZJN0G+Sqoz8rnBenBGTwbwcvDc6yCO7+g32H4+l mAwMW5Vv8RbXVBIorrTaLenejJdWkAshzkz8kT7dug== X-Google-Smtp-Source: AG47ELvyhJyNsgh6PN2rtisZfL6LCdY7MhLJBxF6pjfp6YxtZrNJCW6C89sd9CIg3zmBzuTSsnZG8AAwgV4ZwGlPOGI= X-Received: by 10.46.7.26 with SMTP id 26mr229802ljh.122.1520642504472; Fri, 09 Mar 2018 16:41:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.216.232 with HTTP; Fri, 9 Mar 2018 16:41:43 -0800 (PST) In-Reply-To: <201801311436.w0VEaRrZ030839@repo.freebsd.org> References: <201801311436.w0VEaRrZ030839@repo.freebsd.org> From: Dexuan-BSD Cui Date: Fri, 9 Mar 2018 16:41:43 -0800 Message-ID: Subject: Re: svn commit: r328625 - in head/sys: amd64/amd64 amd64/ia32 amd64/include dev/cpuctl i386/i386 x86/include x86/x86 To: Konstantin Belousov , Dexuan Cui Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 00:41:48 -0000 Hi, In my FreeBSD 11.1 VM, I'm getting this build failure and it looks this revision causes the failure: cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/root/bsd.git/amd64.amd64/tmp -B/usr/obj/root/bsd.git/amd64.amd64/tmp/usr/bin -c -x assembler-with-cpp -DLOCORE -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I/root/bsd.git/sys -I/root/bsd.git/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MF.depend.support.o -MTsupport.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -Werror /root/bsd.git/sys/amd64/amd64/support.S --- ptrace_machdep.o --- ctfconvert -L VERSION -g ptrace_machdep.o --- support.o --- /root/bsd.git/sys/amd64/amd64/support.S:855:2: error: unknown directive .altmacro ^ Should I upgrade my cc/as? [root@bsd11-39 ~/bsd.git]# cc --version FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0) Target: x86_64-unknown-freebsd11.1 Thread model: posix InstalledDir: /usr/bin [root@bsd11-39 ~/bsd.git]# as --version GNU assembler 2.17.50 [FreeBSD] 2007-07-03 Copyright 2007 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. This assembler was configured for a target of `x86_64-unknown-freebsd'. It looks -fno-integrated-as might fix the failure for me according to: https://stackoverflow.com/questions/47938599/unknown-directive-altmacro-error-happens-when-using-android-ndk-standalone-tool But when I tried: export CC="clang -no-integrated-as" make I got a different error: --- all_subdir_accf_data --- /tmp/accf_data-013c70.s: Assembler messages: /tmp/accf_data-013c70.s:33: Error: unknown pseudo-op: `.cfi_sections' clang: error: assembler command failed with exit code 1 (use -v to see invocation) *** [accf_data.o] Error code 1 Any insight? Thanks! -- Dexuan On Wed, Jan 31, 2018 at 6:36 AM, Konstantin Belousov wrote: > Author: kib > Date: Wed Jan 31 14:36:27 2018 > New Revision: 328625 > URL: https://svnweb.freebsd.org/changeset/base/328625 > > Log: > IBRS support, AKA Spectre hardware mitigation. > > It is coded according to the Intel document 336996-001, reading of the > patches posted on lkml, and some additional consultations with Intel. > > For existing processors, you need a microcode update which adds IBRS > CPU features, and to manually enable it by setting the tunable/sysctl > hw.ibrs_disable to 0. Current status can be checked in sysctl > hw.ibrs_active. The mitigation might be inactive if the CPU feature > is not patched in, or if CPU reports that IBRS use is not required, by > IA32_ARCH_CAP_IBRS_ALL bit. > > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D14029 > > Modified: > head/sys/amd64/amd64/exception.S > head/sys/amd64/amd64/genassym.c > head/sys/amd64/amd64/initcpu.c > head/sys/amd64/amd64/machdep.c > head/sys/amd64/amd64/support.S > head/sys/amd64/ia32/ia32_exception.S > head/sys/amd64/include/md_var.h > head/sys/amd64/include/pcpu.h > head/sys/dev/cpuctl/cpuctl.c > head/sys/i386/i386/support.s > head/sys/x86/include/specialreg.h > head/sys/x86/include/x86_var.h > head/sys/x86/x86/cpu_machdep.c > > Modified: head/sys/amd64/amd64/exception.S > ============================================================================== > --- head/sys/amd64/amd64/exception.S Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/amd64/amd64/exception.S Wed Jan 31 14:36:27 2018 (r328625) > @@ -171,21 +171,22 @@ X\l: > alltraps: > movq %rdi,TF_RDI(%rsp) > testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ > - jz alltraps_segs /* already running with kernel GS.base */ > + jz 1f /* already running with kernel GS.base */ > swapgs > movq PCPU(CURPCB),%rdi > andl $~PCB_FULL_IRET,PCB_FLAGS(%rdi) > -alltraps_segs: > - SAVE_SEGS > - testl $PSL_I,TF_RFLAGS(%rsp) > - jz alltraps_pushregs_no_rdi > - sti > -alltraps_pushregs_no_rdi: > +1: SAVE_SEGS > movq %rdx,TF_RDX(%rsp) > movq %rax,TF_RAX(%rsp) > + movq %rcx,TF_RCX(%rsp) > + testb $SEL_RPL_MASK,TF_CS(%rsp) > + jz 2f > + call handle_ibrs_entry > +2: testl $PSL_I,TF_RFLAGS(%rsp) > + jz alltraps_pushregs_no_rax > + sti > alltraps_pushregs_no_rax: > movq %rsi,TF_RSI(%rsp) > - movq %rcx,TF_RCX(%rsp) > movq %r8,TF_R8(%rsp) > movq %r9,TF_R9(%rsp) > movq %rbx,TF_RBX(%rsp) > @@ -243,13 +244,18 @@ calltrap: > alltraps_noen: > movq %rdi,TF_RDI(%rsp) > testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ > - jz alltraps_noen_segs /* already running with kernel GS.base */ > + jz 1f /* already running with kernel GS.base */ > swapgs > movq PCPU(CURPCB),%rdi > andl $~PCB_FULL_IRET,PCB_FLAGS(%rdi) > -alltraps_noen_segs: > - SAVE_SEGS > - jmp alltraps_pushregs_no_rdi > +1: SAVE_SEGS > + movq %rdx,TF_RDX(%rsp) > + movq %rax,TF_RAX(%rsp) > + movq %rcx,TF_RCX(%rsp) > + testb $SEL_RPL_MASK,TF_CS(%rsp) > + jz alltraps_pushregs_no_rax > + call handle_ibrs_entry > + jmp alltraps_pushregs_no_rax > > IDTVEC(dblfault) > subq $TF_ERR,%rsp > @@ -301,12 +307,14 @@ IDTVEC(page_pti) > movq %rdi,TF_RDI(%rsp) > movq %rax,TF_RAX(%rsp) > movq %rdx,TF_RDX(%rsp) > + movq %rcx,TF_RCX(%rsp) > jmp page_u > IDTVEC(page) > subq $TF_ERR,%rsp > movq %rdi,TF_RDI(%rsp) /* free up GP registers */ > movq %rax,TF_RAX(%rsp) > movq %rdx,TF_RDX(%rsp) > + movq %rcx,TF_RCX(%rsp) > testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ > jz page_cr2 /* already running with kernel GS.base */ > swapgs > @@ -314,6 +322,7 @@ page_u: movq PCPU(CURPCB),%rdi > andl $~PCB_FULL_IRET,PCB_FLAGS(%rdi) > movq PCPU(SAVED_UCR3),%rax > movq %rax,PCB_SAVED_UCR3(%rdi) > + call handle_ibrs_entry > page_cr2: > movq %cr2,%rdi /* preserve %cr2 before .. */ > movq %rdi,TF_ADDR(%rsp) /* enabling interrupts. */ > @@ -371,6 +380,7 @@ prot_addrf: > movq %rdi,TF_RDI(%rsp) /* free up a GP register */ > movq %rax,TF_RAX(%rsp) > movq %rdx,TF_RDX(%rsp) > + movq %rcx,TF_RCX(%rsp) > movw %fs,TF_FS(%rsp) > movw %gs,TF_GS(%rsp) > leaq doreti_iret(%rip),%rdi > @@ -396,7 +406,8 @@ prot_addrf: > 3: cmpw $KUG32SEL,TF_GS(%rsp) > jne 4f > movq %rdx,PCB_GSBASE(%rdi) > -4: orl $PCB_FULL_IRET,PCB_FLAGS(%rdi) /* always full iret from GPF */ > +4: call handle_ibrs_entry > + orl $PCB_FULL_IRET,PCB_FLAGS(%rdi) /* always full iret from GPF */ > movw %es,TF_ES(%rsp) > movw %ds,TF_DS(%rsp) > testl $PSL_I,TF_RFLAGS(%rsp) > @@ -440,7 +451,9 @@ fast_syscall_common: > movq %r11,TF_RSP(%rsp) /* user stack pointer */ > movq PCPU(SCRATCH_RAX),%rax > movq %rax,TF_RAX(%rsp) /* syscall number */ > + movq %rdx,TF_RDX(%rsp) /* arg 3 */ > SAVE_SEGS > + call handle_ibrs_entry > movq PCPU(CURPCB),%r11 > andl $~PCB_FULL_IRET,PCB_FLAGS(%r11) > sti > @@ -449,7 +462,6 @@ fast_syscall_common: > movq $2,TF_ERR(%rsp) > movq %rdi,TF_RDI(%rsp) /* arg 1 */ > movq %rsi,TF_RSI(%rsp) /* arg 2 */ > - movq %rdx,TF_RDX(%rsp) /* arg 3 */ > movq %r10,TF_RCX(%rsp) /* arg 4 */ > movq %r8,TF_R8(%rsp) /* arg 5 */ > movq %r9,TF_R9(%rsp) /* arg 6 */ > @@ -475,6 +487,7 @@ fast_syscall_common: > movq PCPU(CURTHREAD),%rax > testl $TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%rax) > jne 3f > + call handle_ibrs_exit > /* Restore preserved registers. */ > MEXITCOUNT > movq TF_RDI(%rsp),%rdi /* bonus; preserve arg 1 */ > @@ -561,8 +574,8 @@ IDTVEC(nmi) > testb $SEL_RPL_MASK,TF_CS(%rsp) > jnz nmi_fromuserspace > /* > - * We've interrupted the kernel. Preserve GS.base in %r12 > - * and %cr3 in %r13. > + * We've interrupted the kernel. Preserve GS.base in %r12, > + * %cr3 in %r13, and possibly lower half of MSR_IA32_SPEC_CTL in %r14d. > */ > movl $MSR_GSBASE,%ecx > rdmsr > @@ -577,8 +590,14 @@ IDTVEC(nmi) > movq %cr3,%r13 > movq PCPU(KCR3),%rax > cmpq $~0,%rax > - je nmi_calltrap > + je 1f > movq %rax,%cr3 > +1: testl $CPUID_STDEXT3_IBPB,cpu_stdext_feature3(%rip) > + je nmi_calltrap > + movl $MSR_IA32_SPEC_CTRL,%ecx > + rdmsr > + movl %eax,%r14d > + call handle_ibrs_entry > jmp nmi_calltrap > nmi_fromuserspace: > incl %ebx > @@ -588,7 +607,8 @@ nmi_fromuserspace: > cmpq $~0,%rax > je 1f > movq %rax,%cr3 > -1: movq PCPU(CURPCB),%rdi > +1: call handle_ibrs_entry > + movq PCPU(CURPCB),%rdi > testq %rdi,%rdi > jz 3f > orl $PCB_FULL_IRET,PCB_FLAGS(%rdi) > @@ -683,9 +703,18 @@ nocallchain: > testl %ebx,%ebx /* %ebx == 0 => return to userland */ > jnz doreti_exit > /* > + * Restore speculation control MSR, if preserved. > + */ > + testl $CPUID_STDEXT3_IBPB,cpu_stdext_feature3(%rip) > + je 1f > + movl %r14d,%eax > + xorl %edx,%edx > + movl $MSR_IA32_SPEC_CTRL,%ecx > + wrmsr > + /* > * Put back the preserved MSR_GSBASE value. > */ > - movl $MSR_GSBASE,%ecx > +1: movl $MSR_GSBASE,%ecx > movq %r12,%rdx > movl %edx,%eax > shrq $32,%rdx > @@ -743,8 +772,8 @@ IDTVEC(mchk) > testb $SEL_RPL_MASK,TF_CS(%rsp) > jnz mchk_fromuserspace > /* > - * We've interrupted the kernel. Preserve GS.base in %r12 > - * and %cr3 in %r13. > + * We've interrupted the kernel. Preserve GS.base in %r12, > + * %cr3 in %r13, and possibly lower half of MSR_IA32_SPEC_CTL in %r14d. > */ > movl $MSR_GSBASE,%ecx > rdmsr > @@ -759,8 +788,14 @@ IDTVEC(mchk) > movq %cr3,%r13 > movq PCPU(KCR3),%rax > cmpq $~0,%rax > - je mchk_calltrap > + je 1f > movq %rax,%cr3 > +1: testl $CPUID_STDEXT3_IBPB,cpu_stdext_feature3(%rip) > + je mchk_calltrap > + movl $MSR_IA32_SPEC_CTRL,%ecx > + rdmsr > + movl %eax,%r14d > + call handle_ibrs_entry > jmp mchk_calltrap > mchk_fromuserspace: > incl %ebx > @@ -770,7 +805,7 @@ mchk_fromuserspace: > cmpq $~0,%rax > je 1f > movq %rax,%cr3 > -1: > +1: call handle_ibrs_entry > /* Note: this label is also used by ddb and gdb: */ > mchk_calltrap: > FAKE_MCOUNT(TF_RIP(%rsp)) > @@ -780,9 +815,18 @@ mchk_calltrap: > testl %ebx,%ebx /* %ebx == 0 => return to userland */ > jnz doreti_exit > /* > + * Restore speculation control MSR, if preserved. > + */ > + testl $CPUID_STDEXT3_IBPB,cpu_stdext_feature3(%rip) > + je 1f > + movl %r14d,%eax > + xorl %edx,%edx > + movl $MSR_IA32_SPEC_CTRL,%ecx > + wrmsr > + /* > * Put back the preserved MSR_GSBASE value. > */ > - movl $MSR_GSBASE,%ecx > +1: movl $MSR_GSBASE,%ecx > movq %r12,%rdx > movl %edx,%eax > shrq $32,%rdx > @@ -960,6 +1004,7 @@ ld_regs: > testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ > jz 2f /* keep running with kernel GS.base */ > cli > + call handle_ibrs_exit_rs > cmpb $0,pti > je 1f > pushq %rdx > @@ -1011,6 +1056,10 @@ set_segs: > .globl doreti_iret_fault > doreti_iret_fault: > subq $TF_RIP,%rsp /* space including tf_err, tf_trapno */ > + movq %rax,TF_RAX(%rsp) > + movq %rdx,TF_RDX(%rsp) > + movq %rcx,TF_RCX(%rsp) > + call handle_ibrs_entry > testb $SEL_RPL_MASK,TF_CS(%rsp) > jz 1f > sti > @@ -1019,11 +1068,8 @@ doreti_iret_fault: > movl $TF_HASSEGS,TF_FLAGS(%rsp) > movq %rdi,TF_RDI(%rsp) > movq %rsi,TF_RSI(%rsp) > - movq %rdx,TF_RDX(%rsp) > - movq %rcx,TF_RCX(%rsp) > movq %r8,TF_R8(%rsp) > movq %r9,TF_R9(%rsp) > - movq %rax,TF_RAX(%rsp) > movq %rbx,TF_RBX(%rsp) > movq %rbp,TF_RBP(%rsp) > movq %r10,TF_R10(%rsp) > > Modified: head/sys/amd64/amd64/genassym.c > ============================================================================== > --- head/sys/amd64/amd64/genassym.c Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/amd64/amd64/genassym.c Wed Jan 31 14:36:27 2018 (r328625) > @@ -228,6 +228,7 @@ ASSYM(PC_UCR3, offsetof(struct pcpu, pc_ucr3)); > ASSYM(PC_SAVED_UCR3, offsetof(struct pcpu, pc_saved_ucr3)); > ASSYM(PC_PTI_STACK, offsetof(struct pcpu, pc_pti_stack)); > ASSYM(PC_PTI_STACK_SZ, PC_PTI_STACK_SZ); > +ASSYM(PC_IBPB_SET, offsetof(struct pcpu, pc_ibpb_set)); > > ASSYM(LA_EOI, LAPIC_EOI * LAPIC_MEM_MUL); > ASSYM(LA_ISR, LAPIC_ISR0 * LAPIC_MEM_MUL); > > Modified: head/sys/amd64/amd64/initcpu.c > ============================================================================== > --- head/sys/amd64/amd64/initcpu.c Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/amd64/amd64/initcpu.c Wed Jan 31 14:36:27 2018 (r328625) > @@ -223,6 +223,7 @@ initializecpu(void) > wrmsr(MSR_EFER, msr); > pg_nx = PG_NX; > } > + hw_ibrs_recalculate(); > switch (cpu_vendor_id) { > case CPU_VENDOR_AMD: > init_amd(); > > Modified: head/sys/amd64/amd64/machdep.c > ============================================================================== > --- head/sys/amd64/amd64/machdep.c Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/amd64/amd64/machdep.c Wed Jan 31 14:36:27 2018 (r328625) > @@ -1826,6 +1826,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) > #endif > thread0.td_critnest = 0; > > + TUNABLE_INT_FETCH("hw.ibrs_disable", &hw_ibrs_disable); > + > TSEXIT(); > > /* Location of kernel stack for locore */ > > Modified: head/sys/amd64/amd64/support.S > ============================================================================== > --- head/sys/amd64/amd64/support.S Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/amd64/amd64/support.S Wed Jan 31 14:36:27 2018 (r328625) > @@ -33,6 +33,7 @@ > #include "opt_ddb.h" > > #include > +#include > #include > > #include "assym.s" > @@ -850,3 +851,67 @@ ENTRY(pmap_pti_pcid_invlrng) > movq %rsi,%cr3 /* back to kernel */ > popfq > retq > + > + .altmacro > + .macro ibrs_seq_label l > +handle_ibrs_\l: > + .endm > + .macro ibrs_call_label l > + call handle_ibrs_\l > + .endm > + .macro ibrs_seq count > + ll=1 > + .rept \count > + ibrs_call_label %(ll) > + nop > + ibrs_seq_label %(ll) > + addq $8,%rsp > + ll=ll+1 > + .endr > + .endm > + > +/* all callers already saved %rax, %rdx, and %rcx */ > +ENTRY(handle_ibrs_entry) > + cmpb $0,hw_ibrs_active(%rip) > + je 1f > + movl $MSR_IA32_SPEC_CTRL,%ecx > + movl $IA32_SPEC_CTRL_IBRS,%eax > + movl $IA32_SPEC_CTRL_IBRS>>32,%edx > + wrmsr > + movb $1,PCPU(IBPB_SET) > + testl $CPUID_STDEXT_SMEP,cpu_stdext_feature(%rip) > + jne 1f > + ibrs_seq 32 > +1: ret > +END(handle_ibrs_entry) > + > +ENTRY(handle_ibrs_exit) > + cmpb $0,PCPU(IBPB_SET) > + je 1f > + movl $MSR_IA32_SPEC_CTRL,%ecx > + xorl %eax,%eax > + xorl %edx,%edx > + wrmsr > + movb $0,PCPU(IBPB_SET) > +1: ret > +END(handle_ibrs_exit) > + > +/* registers-neutral version, but needs stack */ > +ENTRY(handle_ibrs_exit_rs) > + cmpb $0,PCPU(IBPB_SET) > + je 1f > + pushq %rax > + pushq %rdx > + pushq %rcx > + movl $MSR_IA32_SPEC_CTRL,%ecx > + xorl %eax,%eax > + xorl %edx,%edx > + wrmsr > + popq %rcx > + popq %rdx > + popq %rax > + movb $0,PCPU(IBPB_SET) > +1: ret > +END(handle_ibrs_exit_rs) > + > + .noaltmacro > > Modified: head/sys/amd64/ia32/ia32_exception.S > ============================================================================== > --- head/sys/amd64/ia32/ia32_exception.S Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/amd64/ia32/ia32_exception.S Wed Jan 31 14:36:27 2018 (r328625) > @@ -53,13 +53,14 @@ int0x80_syscall_common: > movq PCPU(CURPCB),%rdi > andl $~PCB_FULL_IRET,PCB_FLAGS(%rdi) > SAVE_SEGS > - sti > - movq %rsi,TF_RSI(%rsp) > + movq %rax,TF_RAX(%rsp) > movq %rdx,TF_RDX(%rsp) > movq %rcx,TF_RCX(%rsp) > + call handle_ibrs_entry > + sti > + movq %rsi,TF_RSI(%rsp) > movq %r8,TF_R8(%rsp) > movq %r9,TF_R9(%rsp) > - movq %rax,TF_RAX(%rsp) > movq %rbx,TF_RBX(%rsp) > movq %rbp,TF_RBP(%rsp) > movq %r10,TF_R10(%rsp) > > Modified: head/sys/amd64/include/md_var.h > ============================================================================== > --- head/sys/amd64/include/md_var.h Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/amd64/include/md_var.h Wed Jan 31 14:36:27 2018 (r328625) > @@ -38,6 +38,7 @@ > > extern uint64_t *vm_page_dump; > extern int hw_lower_amd64_sharedpage; > +extern int hw_ibrs_disable; > > /* > * The file "conf/ldscript.amd64" defines the symbol "kernphys". Its > > Modified: head/sys/amd64/include/pcpu.h > ============================================================================== > --- head/sys/amd64/include/pcpu.h Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/amd64/include/pcpu.h Wed Jan 31 14:36:27 2018 (r328625) > @@ -74,7 +74,8 @@ > uint32_t pc_pcid_next; \ > uint32_t pc_pcid_gen; \ > uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ > - char __pad[224] /* be divisor of PAGE_SIZE \ > + uint32_t pc_ibpb_set; \ > + char __pad[216] /* be divisor of PAGE_SIZE \ > after cache alignment */ > > #define PC_DBREG_CMD_NONE 0 > > Modified: head/sys/dev/cpuctl/cpuctl.c > ============================================================================== > --- head/sys/dev/cpuctl/cpuctl.c Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/dev/cpuctl/cpuctl.c Wed Jan 31 14:36:27 2018 (r328625) > @@ -527,6 +527,7 @@ cpuctl_do_eval_cpu_features(int cpu, struct thread *td > set_cpu(cpu, td); > identify_cpu1(); > identify_cpu2(); > + hw_ibrs_recalculate(); > restore_cpu(oldcpu, is_bound, td); > printcpuinfo(); > return (0); > > Modified: head/sys/i386/i386/support.s > ============================================================================== > --- head/sys/i386/i386/support.s Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/i386/i386/support.s Wed Jan 31 14:36:27 2018 (r328625) > @@ -827,3 +827,11 @@ msr_onfault: > movl $0,PCB_ONFAULT(%ecx) > movl $EFAULT,%eax > ret > + > +ENTRY(handle_ibrs_entry) > + ret > +END(handle_ibrs_entry) > + > +ENTRY(handle_ibrs_exit) > + ret > +END(handle_ibrs_exit) > > Modified: head/sys/x86/include/specialreg.h > ============================================================================== > --- head/sys/x86/include/specialreg.h Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/x86/include/specialreg.h Wed Jan 31 14:36:27 2018 (r328625) > @@ -697,6 +697,10 @@ > #define IA32_MISC_EN_xTPRD 0x0000000000800000ULL > #define IA32_MISC_EN_XDD 0x0000000400000000ULL > > +/* > + * IA32_SPEC_CTRL and IA32_PRED_CMD MSRs are described in the Intel' > + * document 336996-001 Speculative Execution Side Channel Mitigations. > + */ > /* MSR IA32_SPEC_CTRL */ > #define IA32_SPEC_CTRL_IBRS 0x0000000000000001ULL > #define IA32_SPEC_CTRL_STIBP 0x0000000000000002ULL > > Modified: head/sys/x86/include/x86_var.h > ============================================================================== > --- head/sys/x86/include/x86_var.h Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/x86/include/x86_var.h Wed Jan 31 14:36:27 2018 (r328625) > @@ -131,6 +131,9 @@ bool fix_cpuid(void); > void fillw(int /*u_short*/ pat, void *base, size_t cnt); > int is_physical_memory(vm_paddr_t addr); > int isa_nmi(int cd); > +void handle_ibrs_entry(void); > +void handle_ibrs_exit(void); > +void hw_ibrs_recalculate(void); > void nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame); > void nmi_call_kdb_smp(u_int type, struct trapframe *frame); > void nmi_handle_intr(u_int type, struct trapframe *frame); > > Modified: head/sys/x86/x86/cpu_machdep.c > ============================================================================== > --- head/sys/x86/x86/cpu_machdep.c Wed Jan 31 14:25:42 2018 (r328624) > +++ head/sys/x86/x86/cpu_machdep.c Wed Jan 31 14:36:27 2018 (r328625) > @@ -142,6 +142,12 @@ acpi_cpu_idle_mwait(uint32_t mwait_hint) > int *state; > > /* > + * A comment in Linux patch claims that 'CPUs run faster with > + * speculation protection disabled. All CPU threads in a core > + * must disable speculation protection for it to be > + * disabled. Disable it while we are idle so the other > + * hyperthread can run fast.' > + * > * XXXKIB. Software coordination mode should be supported, > * but all Intel CPUs provide hardware coordination. > */ > @@ -150,9 +156,11 @@ acpi_cpu_idle_mwait(uint32_t mwait_hint) > KASSERT(*state == STATE_SLEEPING, > ("cpu_mwait_cx: wrong monitorbuf state")); > *state = STATE_MWAIT; > + handle_ibrs_entry(); > cpu_monitor(state, 0, 0); > if (*state == STATE_MWAIT) > cpu_mwait(MWAIT_INTRBREAK, mwait_hint); > + handle_ibrs_exit(); > > /* > * We should exit on any event that interrupts mwait, because > @@ -569,3 +577,47 @@ nmi_handle_intr(u_int type, struct trapframe *frame) > nmi_call_kdb(PCPU_GET(cpuid), type, frame); > #endif > } > + > +int hw_ibrs_active; > +int hw_ibrs_disable = 1; > + > +SYSCTL_INT(_hw, OID_AUTO, ibrs_active, CTLFLAG_RD, &hw_ibrs_active, 0, > + "IBRS active"); > + > +void > +hw_ibrs_recalculate(void) > +{ > + uint64_t v; > + > + if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_IBRS_ALL) != 0) { > + if (hw_ibrs_disable) { > + v= rdmsr(MSR_IA32_SPEC_CTRL); > + v &= ~IA32_SPEC_CTRL_IBRS; > + wrmsr(MSR_IA32_SPEC_CTRL, v); > + } else { > + v= rdmsr(MSR_IA32_SPEC_CTRL); > + v |= IA32_SPEC_CTRL_IBRS; > + wrmsr(MSR_IA32_SPEC_CTRL, v); > + } > + return; > + } > + hw_ibrs_active = (cpu_stdext_feature3 & CPUID_STDEXT3_IBPB) != 0 && > + !hw_ibrs_disable; > +} > + > +static int > +hw_ibrs_disable_handler(SYSCTL_HANDLER_ARGS) > +{ > + int error, val; > + > + val = hw_ibrs_disable; > + error = sysctl_handle_int(oidp, &val, 0, req); > + if (error != 0 || req->newptr == NULL) > + return (error); > + hw_ibrs_disable = val != 0; > + hw_ibrs_recalculate(); > + return (0); > +} > +SYSCTL_PROC(_hw, OID_AUTO, ibrs_disable, CTLTYPE_INT | CTLFLAG_RWTUN | > + CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, NULL, 0, hw_ibrs_disable_handler, "I", > + "Disable IBRS"); > From owner-svn-src-all@freebsd.org Sat Mar 10 00:44:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85BE9F35D2D; Sat, 10 Mar 2018 00:44:34 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39A40764BF; Sat, 10 Mar 2018 00:44:34 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FE9426657; Sat, 10 Mar 2018 00:44:34 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A0iYR8028385; Sat, 10 Mar 2018 00:44:34 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A0iX9F028381; Sat, 10 Mar 2018 00:44:33 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201803100044.w2A0iX9F028381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Sat, 10 Mar 2018 00:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330713 - in stable/10/sys/amd64/vmm: amd intel X-SVN-Group: stable-10 X-SVN-Commit-Author: tychon X-SVN-Commit-Paths: in stable/10/sys/amd64/vmm: amd intel X-SVN-Commit-Revision: 330713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 00:44:34 -0000 Author: tychon Date: Sat Mar 10 00:44:33 2018 New Revision: 330713 URL: https://svnweb.freebsd.org/changeset/base/330713 Log: MFC r328011,329162 r328011: Provide some mitigation against CVE-2017-5715 by clearing registers upon returning from the guest which aren't immediately clobbered by the host. This eradicates any remaining guest contents limiting their usefulness in an exploit gadget. r329162: Provide further mitigation against CVE-2017-5715 by flushing the return stack buffer (RSB) upon returning from the guest. Modified: stable/10/sys/amd64/vmm/amd/svm_support.S stable/10/sys/amd64/vmm/intel/vmcs.c stable/10/sys/amd64/vmm/intel/vmx.h stable/10/sys/amd64/vmm/intel/vmx_support.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/amd/svm_support.S ============================================================================== --- stable/10/sys/amd64/vmm/amd/svm_support.S Sat Mar 10 00:10:47 2018 (r330712) +++ stable/10/sys/amd64/vmm/amd/svm_support.S Sat Mar 10 00:44:33 2018 (r330713) @@ -113,6 +113,23 @@ ENTRY(svm_launch) movq %rdi, SCTX_RDI(%rax) movq %rsi, SCTX_RSI(%rax) + /* + * To prevent malicious branch target predictions from + * affecting the host, overwrite all entries in the RSB upon + * exiting a guest. + */ + mov $16, %ecx /* 16 iterations, two calls per loop */ + mov %rsp, %rax +0: call 2f /* create an RSB entry. */ +1: pause + call 1b /* capture rogue speculation. */ +2: call 2f /* create an RSB entry. */ +1: pause + call 1b /* capture rogue speculation. */ +2: sub $1, %ecx + jnz 0b + mov %rax, %rsp + /* Restore host state */ pop %r15 pop %r14 @@ -124,8 +141,20 @@ ENTRY(svm_launch) pop %rdx mov %edx, %eax shr $32, %rdx - mov $MSR_GSBASE, %ecx + mov $MSR_GSBASE, %rcx wrmsr + + /* + * Clobber the remaining registers with guest contents so they + * can't be misused. + */ + xor %rbp, %rbp + xor %rdi, %rdi + xor %rsi, %rsi + xor %r8, %r8 + xor %r9, %r9 + xor %r10, %r10 + xor %r11, %r11 VLEAVE ret Modified: stable/10/sys/amd64/vmm/intel/vmcs.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmcs.c Sat Mar 10 00:10:47 2018 (r330712) +++ stable/10/sys/amd64/vmm/intel/vmcs.c Sat Mar 10 00:44:33 2018 (r330713) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -50,6 +51,12 @@ __FBSDID("$FreeBSD$"); #include #endif +SYSCTL_DECL(_hw_vmm_vmx); + +static int no_flush_rsb; +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, no_flush_rsb, CTLFLAG_RW, + &no_flush_rsb, 0, "Do not flush RSB upon vmexit"); + static uint64_t vmcs_fix_regval(uint32_t encoding, uint64_t val) { @@ -401,8 +408,15 @@ vmcs_init(struct vmcs *vmcs) goto done; /* instruction pointer */ - if ((error = vmwrite(VMCS_HOST_RIP, (u_long)vmx_exit_guest)) != 0) - goto done; + if (no_flush_rsb) { + if ((error = vmwrite(VMCS_HOST_RIP, + (u_long)vmx_exit_guest)) != 0) + goto done; + } else { + if ((error = vmwrite(VMCS_HOST_RIP, + (u_long)vmx_exit_guest_flush_rsb)) != 0) + goto done; + } /* link pointer */ if ((error = vmwrite(VMCS_LINK_POINTER, ~0)) != 0) Modified: stable/10/sys/amd64/vmm/intel/vmx.h ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx.h Sat Mar 10 00:10:47 2018 (r330712) +++ stable/10/sys/amd64/vmm/intel/vmx.h Sat Mar 10 00:44:33 2018 (r330713) @@ -138,5 +138,6 @@ u_long vmx_fix_cr4(u_long cr4); int vmx_set_tsc_offset(struct vmx *vmx, int vcpu, uint64_t offset); extern char vmx_exit_guest[]; +extern char vmx_exit_guest_flush_rsb[]; #endif Modified: stable/10/sys/amd64/vmm/intel/vmx_support.S ============================================================================== --- stable/10/sys/amd64/vmm/intel/vmx_support.S Sat Mar 10 00:10:47 2018 (r330712) +++ stable/10/sys/amd64/vmm/intel/vmx_support.S Sat Mar 10 00:44:33 2018 (r330713) @@ -42,6 +42,29 @@ #define VLEAVE pop %rbp /* + * Save the guest context. + */ +#define VMX_GUEST_SAVE \ + movq %rdi,VMXCTX_GUEST_RDI(%rsp); \ + movq %rsi,VMXCTX_GUEST_RSI(%rsp); \ + movq %rdx,VMXCTX_GUEST_RDX(%rsp); \ + movq %rcx,VMXCTX_GUEST_RCX(%rsp); \ + movq %r8,VMXCTX_GUEST_R8(%rsp); \ + movq %r9,VMXCTX_GUEST_R9(%rsp); \ + movq %rax,VMXCTX_GUEST_RAX(%rsp); \ + movq %rbx,VMXCTX_GUEST_RBX(%rsp); \ + movq %rbp,VMXCTX_GUEST_RBP(%rsp); \ + movq %r10,VMXCTX_GUEST_R10(%rsp); \ + movq %r11,VMXCTX_GUEST_R11(%rsp); \ + movq %r12,VMXCTX_GUEST_R12(%rsp); \ + movq %r13,VMXCTX_GUEST_R13(%rsp); \ + movq %r14,VMXCTX_GUEST_R14(%rsp); \ + movq %r15,VMXCTX_GUEST_R15(%rsp); \ + movq %cr2,%rdi; \ + movq %rdi,VMXCTX_GUEST_CR2(%rsp); \ + movq %rsp,%rdi; + +/* * Assumes that %rdi holds a pointer to the 'vmxctx'. * * On "return" all registers are updated to reflect guest state. The two @@ -72,6 +95,20 @@ movq VMXCTX_GUEST_RDI(%rdi),%rdi; /* restore rdi the last */ /* + * Clobber the remaining registers with guest contents so they can't + * be misused. + */ +#define VMX_GUEST_CLOBBER \ + xor %rax, %rax; \ + xor %rcx, %rcx; \ + xor %rdx, %rdx; \ + xor %rsi, %rsi; \ + xor %r8, %r8; \ + xor %r9, %r9; \ + xor %r10, %r10; \ + xor %r11, %r11; + +/* * Save and restore the host context. * * Assumes that %rdi holds a pointer to the 'vmxctx'. @@ -197,33 +234,57 @@ inst_error: * The VMCS-restored %rsp points to the struct vmxctx */ ALIGN_TEXT - .globl vmx_exit_guest -vmx_exit_guest: + .globl vmx_exit_guest_flush_rsb +vmx_exit_guest_flush_rsb: /* * Save guest state that is not automatically saved in the vmcs. */ - movq %rdi,VMXCTX_GUEST_RDI(%rsp) - movq %rsi,VMXCTX_GUEST_RSI(%rsp) - movq %rdx,VMXCTX_GUEST_RDX(%rsp) - movq %rcx,VMXCTX_GUEST_RCX(%rsp) - movq %r8,VMXCTX_GUEST_R8(%rsp) - movq %r9,VMXCTX_GUEST_R9(%rsp) - movq %rax,VMXCTX_GUEST_RAX(%rsp) - movq %rbx,VMXCTX_GUEST_RBX(%rsp) - movq %rbp,VMXCTX_GUEST_RBP(%rsp) - movq %r10,VMXCTX_GUEST_R10(%rsp) - movq %r11,VMXCTX_GUEST_R11(%rsp) - movq %r12,VMXCTX_GUEST_R12(%rsp) - movq %r13,VMXCTX_GUEST_R13(%rsp) - movq %r14,VMXCTX_GUEST_R14(%rsp) - movq %r15,VMXCTX_GUEST_R15(%rsp) + VMX_GUEST_SAVE - movq %cr2,%rdi - movq %rdi,VMXCTX_GUEST_CR2(%rsp) + /* + * Deactivate guest pmap from this cpu. + */ + movq VMXCTX_PMAP(%rdi), %r11 + movl PCPU(CPUID), %r10d + LK btrl %r10d, PM_ACTIVE(%r11) - movq %rsp,%rdi + VMX_HOST_RESTORE + VMX_GUEST_CLOBBER + /* + * To prevent malicious branch target predictions from + * affecting the host, overwrite all entries in the RSB upon + * exiting a guest. + */ + mov $16, %ecx /* 16 iterations, two calls per loop */ + mov %rsp, %rax +0: call 2f /* create an RSB entry. */ +1: pause + call 1b /* capture rogue speculation. */ +2: call 2f /* create an RSB entry. */ +1: pause + call 1b /* capture rogue speculation. */ +2: sub $1, %ecx + jnz 0b + mov %rax, %rsp + + /* + * This will return to the caller of 'vmx_enter_guest()' with a return + * value of VMX_GUEST_VMEXIT. + */ + movl $VMX_GUEST_VMEXIT, %eax + VLEAVE + ret + + .globl vmx_exit_guest +vmx_exit_guest: + /* + * Save guest state that is not automatically saved in the vmcs. + */ + VMX_GUEST_SAVE + + /* * Deactivate guest pmap from this cpu. */ movq VMXCTX_PMAP(%rdi), %r11 @@ -231,6 +292,8 @@ vmx_exit_guest: LK btrl %r10d, PM_ACTIVE(%r11) VMX_HOST_RESTORE + + VMX_GUEST_CLOBBER /* * This will return to the caller of 'vmx_enter_guest()' with a return From owner-svn-src-all@freebsd.org Sat Mar 10 00:59:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A436BF36EEA; Sat, 10 Mar 2018 00:59:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB6276E57; Sat, 10 Mar 2018 00:59:49 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46638267E6; Sat, 10 Mar 2018 00:59:49 +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 w2A0xnWv033609; Sat, 10 Mar 2018 00:59:49 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A0xnax033608; Sat, 10 Mar 2018 00:59:49 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803100059.w2A0xnax033608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 10 Mar 2018 00:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330714 - head/sys/dev/mlx5 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/mlx5 X-SVN-Commit-Revision: 330714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 00:59:49 -0000 Author: cem Date: Sat Mar 10 00:59:48 2018 New Revision: 330714 URL: https://svnweb.freebsd.org/changeset/base/330714 Log: mlx5(4): Remove redundant declaration of mlx5_enter_error_state Broken in r330644. Sponsored by: Dell EMC Isilon Modified: head/sys/dev/mlx5/driver.h Modified: head/sys/dev/mlx5/driver.h ============================================================================== --- head/sys/dev/mlx5/driver.h Sat Mar 10 00:44:33 2018 (r330713) +++ head/sys/dev/mlx5/driver.h Sat Mar 10 00:59:48 2018 (r330714) @@ -865,7 +865,6 @@ static inline u32 mlx5_base_mkey(const u32 key) return key & 0xffffff00u; } -void mlx5_enter_error_state(struct mlx5_core_dev *dev); int mlx5_cmd_init(struct mlx5_core_dev *dev); void mlx5_cmd_cleanup(struct mlx5_core_dev *dev); void mlx5_cmd_use_events(struct mlx5_core_dev *dev); From owner-svn-src-all@freebsd.org Sat Mar 10 01:01:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05C88F371DC; Sat, 10 Mar 2018 01:01:02 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABF367703C; Sat, 10 Mar 2018 01:01:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6DD726806; Sat, 10 Mar 2018 01:01:01 +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 w2A111Js034441; Sat, 10 Mar 2018 01:01:01 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A1116E034440; Sat, 10 Mar 2018 01:01:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803100101.w2A1116E034440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 10 Mar 2018 01:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330715 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 01:01:02 -0000 Author: cem Date: Sat Mar 10 01:01:01 2018 New Revision: 330715 URL: https://svnweb.freebsd.org/changeset/base/330715 Log: subr_gtaskqueue: Fix minor leak of tq_name in error case Reported by: cppcheck Sponsored by: Dell EMC Isilon Modified: head/sys/kern/subr_gtaskqueue.c Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Sat Mar 10 00:59:48 2018 (r330714) +++ head/sys/kern/subr_gtaskqueue.c Sat Mar 10 01:01:01 2018 (r330715) @@ -134,8 +134,10 @@ _gtaskqueue_create(const char *name, int mflags, snprintf(tq_name, TASKQUEUE_NAMELEN, "%s", (name) ? name : "taskqueue"); queue = malloc(sizeof(struct gtaskqueue), M_GTASKQUEUE, mflags | M_ZERO); - if (!queue) + if (!queue) { + free(queue->tq_name, M_GTASKQUEUE); return (NULL); + } STAILQ_INIT(&queue->tq_queue); TAILQ_INIT(&queue->tq_active); From owner-svn-src-all@freebsd.org Sat Mar 10 01:07:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AA47F377CA; Sat, 10 Mar 2018 01:07:31 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 308C377797; Sat, 10 Mar 2018 01:07:31 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1354B269A3; Sat, 10 Mar 2018 01:07:31 +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 w2A17Uvc038432; Sat, 10 Mar 2018 01:07:30 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A17UQT038431; Sat, 10 Mar 2018 01:07:30 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803100107.w2A17UQT038431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Sat, 10 Mar 2018 01:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330716 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 330716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 01:07:31 -0000 Author: brooks Date: Sat Mar 10 01:07:30 2018 New Revision: 330716 URL: https://svnweb.freebsd.org/changeset/base/330716 Log: Remove obsolete dataacq.h. Nothing includes this file, lists it in a Makefile, or uses any of the ioctl definitions. Deleted: head/sys/sys/dataacq.h From owner-svn-src-all@freebsd.org Sat Mar 10 01:31:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9C2FF39B35; Sat, 10 Mar 2018 01:31:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 614D878F2E; Sat, 10 Mar 2018 01:31:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 453BA10AC13; Fri, 9 Mar 2018 20:31:48 -0500 (EST) From: John Baldwin To: Bruce Evans Cc: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330338 - head/sys/amd64/amd64 Date: Fri, 09 Mar 2018 15:33:37 -0800 Message-ID: <1997852.rATkjh2guz@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <20180310070452.P5919@besplex.bde.org> References: <201803031510.w23FAbeC065867@repo.freebsd.org> <2557369.6nFzd3kAUm@ralph.baldwin.cx> <20180310070452.P5919@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); Fri, 09 Mar 2018 20:31:48 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 01:31:50 -0000 On Saturday, March 10, 2018 07:41:30 AM Bruce Evans wrote: > On Fri, 9 Mar 2018, John Baldwin wrote: > > > On Saturday, March 03, 2018 03:10:37 PM Andriy Gapon wrote: > >> Author: avg > >> Date: Sat Mar 3 15:10:37 2018 > >> New Revision: 330338 > >> URL: https://svnweb.freebsd.org/changeset/base/330338 > >> > >> Log: > >> db_nextframe/amd64: catch up with r328083 to recognize fast_syscall_common > >> > >> Since that change the system call stack traces look like this: > >> ... > >> sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe0028e13ac0 > >> amd64_syscall() at amd64_syscall+0x79b/frame 0xfffffe0028e13bf0 > >> fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0028e13bf0 > >> So, db_nextframe() stopped recognizing the system call frame. > >> This commit should fix that. > >> > >> Reviewed by: kib > >> MFC after: 4 days > >> > >> Modified: > >> head/sys/amd64/amd64/db_trace.c > >> > >> Modified: head/sys/amd64/amd64/db_trace.c > >> ============================================================================== > >> --- head/sys/amd64/amd64/db_trace.c Sat Mar 3 13:20:44 2018 (r330337) > >> +++ head/sys/amd64/amd64/db_trace.c Sat Mar 3 15:10:37 2018 (r330338) > >> @@ -212,7 +212,9 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s > >> strcmp(name, "Xcpususpend") == 0 || > >> strcmp(name, "Xrendezvous") == 0) > >> frame_type = INTERRUPT; > >> - else if (strcmp(name, "Xfast_syscall") == 0) > >> + else if (strcmp(name, "Xfast_syscall") == 0 || > >> + strcmp(name, "Xfast_syscall_pti") == 0 || > >> + strcmp(name, "fast_syscall_common") == 0) > >> frame_type = SYSCALL; > > > > I think you actually just want to replace Xfast_syscall with > > fast_syscall_common. Neither Xfast_syscall nor Xfast_syscall_pti call any > > functions before jumping to the common label, so when unwinding from a system > > call you should always get the common label. (That is, I think we should > > remove Xfast_syscall and Xfast_syscall_pti here. Any stack trace that > > happens to find those symbols during unwinding won't have a valid SYSCALL > > frame to unwind.) > > No, it needs these symbols to decode the frame after reaching a point where > the frame is actually set up. My point is that during the instructions from Xfast_syscall to fast_syscall_common there isn't a valid frame. Xfast_syscall has two instructions and hasn't yet decremented %rsp to create room for the trapframe for example. If you wanted to handle the special case of stepping through those functions you'd have to create a new type of frame that used register values from the saved frame for the debug trap. You can't assume that there's a 'struct trapframe' at 'rbp + 16'. > Also, in uncommitted fixes I add some decoding of the non-frame between > the entry point and when the frame is set up. Then the frame register > is still the user's for the syscall case, so should not even be accessed. > The i386 output looks like this: > > current: > XX12: Breakpoint at Xint0x80_syscall: pushl $0x2 > XX12: db> t > XX12: Tracing pid 1 tid 100001 td 0xc6fad000 > XX12: Xint0x80_syscall(33,282,bfbfee0c,3b,0,...) at Xint0x80_syscall/frame 0xd1d05bd8 > XX12: kernload(2,bfbfeec4,bfbfeed0,804812b,80a3d64,...) at 0x805188f/frame 0xbfbfee7c > > fixed: > XX12F: Breakpoint at Xint0x80_syscall: pushl $0x2 > XX12F: db> t > XX12F: Tracing pid 1 tid 100001 td 0xd4c23000 > XX12F: Xint0x80_syscall(2,bfbfeec4,bfbfeed0,804812b,80a3d64,...) at Xint0x80_syscall/frame 0xbfbfee7c > XX12F: --- unknown trap, ebp = 0xbfbfee7c, sp = 0xd3399bdc, ks = 0xd3398000, kse = 0xd339a000 --- > > where most of the values on the last line are for debugging (ebp is the user > stack pointer which will become inaccessible, sp is the local variable sp > and [ks, kse - 1] is the thread's kernel stack range (sp must be in this > else the backtrace stops). Yes, both of these symbols would only be found instructions for this type of special frame. Using the 'SYSCALL' frame type for the Xfast_syscall* symbols would always be wrong. Until such time as we have the new frame type we should just ignore them. > Jumps and labels with names inside functions complicate things. I think > fast_syscall_common needs to be in the list too, and the many alltraps > labels should have been there. This will be more useful with my fix. > The label calltrap has always been in the list. This works right since > the frame has been set up then -- IIRC it is the first place where the > frame has been set up, and label it more for gdb than for ddb, and decode > the frame for ddb (presumably gdb decodes the frame too). gdb does depend on the names, and I was looking at this commit again to see if I needed to update gdb. I thought I didn't, but now I see that gdb was depending on the 'X' prefix for the old Xfast_syscall name and it now needs to check for fast_syscall_common directly. -- John Baldwin From owner-svn-src-all@freebsd.org Sat Mar 10 01:28:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3DAFF396B6; Sat, 10 Mar 2018 01:28:55 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81C3B78AEF; Sat, 10 Mar 2018 01:28:55 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CAC426D4C; Sat, 10 Mar 2018 01:28:55 +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 w2A1StNw048969; Sat, 10 Mar 2018 01:28:55 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A1StTF048968; Sat, 10 Mar 2018 01:28:55 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803100128.w2A1StTF048968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 10 Mar 2018 01:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330717 - head/sys/cam/nvme X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/cam/nvme X-SVN-Commit-Revision: 330717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 01:28:56 -0000 Author: cem Date: Sat Mar 10 01:28:55 2018 New Revision: 330717 URL: https://svnweb.freebsd.org/changeset/base/330717 Log: nvme_da: Fix minor memory leak in error case Reported by: cppcheck Sponsored by: Dell EMC Isilon Modified: head/sys/cam/nvme/nvme_da.c Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Sat Mar 10 01:07:30 2018 (r330716) +++ head/sys/cam/nvme/nvme_da.c Sat Mar 10 01:28:55 2018 (r330717) @@ -695,6 +695,7 @@ ndaregister(struct cam_periph *periph, void *arg) if (cam_iosched_init(&softc->cam_iosched, periph) != 0) { printf("ndaregister: Unable to probe new device. " "Unable to allocate iosched memory\n"); + free(softc, M_DEVBUF); return(CAM_REQ_CMP_ERR); } From owner-svn-src-all@freebsd.org Sat Mar 10 01:35:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2AF8F3A032; Sat, 10 Mar 2018 01:35:26 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 910E279197; Sat, 10 Mar 2018 01:35:26 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AE4826EDC; Sat, 10 Mar 2018 01:35:26 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A1ZQ5u053987; Sat, 10 Mar 2018 01:35:26 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A1ZQTt053985; Sat, 10 Mar 2018 01:35:26 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100135.w2A1ZQTt053985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 01:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330718 - in head/libexec/tftpd: . tests X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/libexec/tftpd: . tests X-SVN-Commit-Revision: 330718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 01:35:27 -0000 Author: asomers Date: Sat Mar 10 01:35:26 2018 New Revision: 330718 URL: https://svnweb.freebsd.org/changeset/base/330718 Log: tftpd: Verify world-writability for WRQ when using relative paths tftpd(8) says that files may only be written if they already exist and are publicly writable. tftpd.c verifies that a file is publicly writable if it uses an absolute pathname. However, if the pathname is relative, that check is skipped. Fix it. Note that this is not a security vulnerability, because the transfer ultimately doesn't work unless the file already exists and is owned by user nobody. Also, this bug does not affect the default configuration, because the default uses the "-s" option which makes all pathnames absolute. PR: 226004 MFC after: 3 weeks Modified: head/libexec/tftpd/tests/functional.c head/libexec/tftpd/tftpd.c Modified: head/libexec/tftpd/tests/functional.c ============================================================================== --- head/libexec/tftpd/tests/functional.c Sat Mar 10 01:28:55 2018 (r330717) +++ head/libexec/tftpd/tests/functional.c Sat Mar 10 01:35:26 2018 (r330718) @@ -350,6 +350,10 @@ setup(struct sockaddr_storage *to, uint16_t idx) ATF_REQUIRE((client_s = socket(protocol, SOCK_DGRAM, 0)) > 0); break; } + + /* Clear the client's umask. Test cases will specify exact modes */ + umask(0000); + return (client_s); } @@ -714,7 +718,7 @@ TFTPD_TC_DEFINE(wrq_dropped_ack,) for (i = 0; i < nitems(contents); i++) contents[i] = i; - fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); ATF_REQUIRE(fd >= 0); close(fd); @@ -747,7 +751,7 @@ TFTPD_TC_DEFINE(wrq_dropped_data,) size_t contents_len; char buffer[1024]; - fd = open("small.txt", O_RDWR | O_CREAT, 0644); + fd = open("small.txt", O_RDWR | O_CREAT, 0666); ATF_REQUIRE(fd >= 0); close(fd); contents_len = strlen(contents) + 1; @@ -782,7 +786,7 @@ TFTPD_TC_DEFINE(wrq_duped_data,) for (i = 0; i < nitems(contents); i++) contents[i] = i; - fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); ATF_REQUIRE(fd >= 0); close(fd); @@ -831,7 +835,8 @@ TFTPD_TC_DEFINE(wrq_eaccess_world_readable,) close(fd); SEND_WRQ("empty.txt", "octet"); - atf_tc_expect_fail("PR 226004 with relative pathnames, tftpd doesn't validate world writability"); + atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " + "violation"); RECV_ERROR(2, "Access violation"); } Modified: head/libexec/tftpd/tftpd.c ============================================================================== --- head/libexec/tftpd/tftpd.c Sat Mar 10 01:28:55 2018 (r330717) +++ head/libexec/tftpd/tftpd.c Sat Mar 10 01:35:26 2018 (r330718) @@ -743,8 +743,12 @@ validate_access(int peer, char **filep, int mode) dirp->name, filename); if (stat(pathname, &stbuf) == 0 && (stbuf.st_mode & S_IFMT) == S_IFREG) { - if ((stbuf.st_mode & S_IROTH) != 0) { - break; + if (mode == RRQ) { + if ((stbuf.st_mode & S_IROTH) != 0) + break; + } else { + if ((stbuf.st_mode & S_IWOTH) != 0) + break; } err = EACCESS; } @@ -752,6 +756,8 @@ validate_access(int peer, char **filep, int mode) if (dirp->name != NULL) *filep = filename = pathname; else if (mode == RRQ) + return (err); + else if (err != ENOTFOUND || !create_new) return (err); } From owner-svn-src-all@freebsd.org Sat Mar 10 01:43:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EDFFF3AD8E; Sat, 10 Mar 2018 01:43:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31C677995B; Sat, 10 Mar 2018 01:43:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CB8727078; Sat, 10 Mar 2018 01:43:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A1huUB059015; Sat, 10 Mar 2018 01:43:56 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A1htCx059013; Sat, 10 Mar 2018 01:43:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100143.w2A1htCx059013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 01:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330719 - in head/libexec/tftpd: . tests X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/libexec/tftpd: . tests X-SVN-Commit-Revision: 330719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 01:43:56 -0000 Author: asomers Date: Sat Mar 10 01:43:55 2018 New Revision: 330719 URL: https://svnweb.freebsd.org/changeset/base/330719 Log: tftpd: Abort on an WRQ access violation On a WRQ (write request) tftpd checks whether the client has access permission for the file in question. If not, then the write is prevented. However, tftpd doesn't reply with an ERROR packet, nor does it abort. Instead, it tries to receive the packet anyway. The symptom is slightly different depending on the nature of the error. If the target file is nonexistent and tftpd lacks permission to create it, then tftpd will willingly receive the file, but not write it anywhere. If the file exists but is not writable, then tftpd will fail to ACK to WRQ. PR: 225996 MFC after: 3 weeks Modified: head/libexec/tftpd/tests/functional.c head/libexec/tftpd/tftpd.c Modified: head/libexec/tftpd/tests/functional.c ============================================================================== --- head/libexec/tftpd/tests/functional.c Sat Mar 10 01:35:26 2018 (r330718) +++ head/libexec/tftpd/tests/functional.c Sat Mar 10 01:43:55 2018 (r330719) @@ -817,8 +817,6 @@ TFTPD_TC_DEFINE(wrq_eaccess,) close(fd); SEND_WRQ("empty.txt", "octet"); - atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " - "violation"); RECV_ERROR(2, "Access violation"); } @@ -835,8 +833,6 @@ TFTPD_TC_DEFINE(wrq_eaccess_world_readable,) close(fd); SEND_WRQ("empty.txt", "octet"); - atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " - "violation"); RECV_ERROR(2, "Access violation"); } @@ -911,8 +907,6 @@ TFTPD_TC_DEFINE(wrq_netascii,) TFTPD_TC_DEFINE(wrq_nonexistent,) { SEND_WRQ("nonexistent.txt", "octet"); - atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " - "violation"); RECV_ERROR(1, "File not found"); } Modified: head/libexec/tftpd/tftpd.c ============================================================================== --- head/libexec/tftpd/tftpd.c Sat Mar 10 01:35:26 2018 (r330718) +++ head/libexec/tftpd/tftpd.c Sat Mar 10 01:43:55 2018 (r330719) @@ -545,6 +545,10 @@ tftp_wrq(int peer, char *recvbuffer, ssize_t size) filename, errtomsg(ecode)); } + if (ecode) { + send_error(peer, ecode); + exit(1); + } tftp_recvfile(peer, mode); exit(0); } From owner-svn-src-all@freebsd.org Sat Mar 10 01:50:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9255F3BAD2; Sat, 10 Mar 2018 01:50:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A4A679DD0; Sat, 10 Mar 2018 01:50:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 554BD2709A; Sat, 10 Mar 2018 01:50:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A1oiut059333; Sat, 10 Mar 2018 01:50:44 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A1oivg059331; Sat, 10 Mar 2018 01:50:44 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100150.w2A1oivg059331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 01:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330720 - in head/libexec/tftpd: . tests X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/libexec/tftpd: . tests X-SVN-Commit-Revision: 330720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 01:50:44 -0000 Author: asomers Date: Sat Mar 10 01:50:43 2018 New Revision: 330720 URL: https://svnweb.freebsd.org/changeset/base/330720 Log: tftpd: reject unknown opcodes If tftpd receives a command with an unknown opcode, it simply exits 1. It doesn't send an ERROR packet, and the client will hang waiting for one. Fix it. PR: 226005 MFC after: 3 weeks Modified: head/libexec/tftpd/tests/functional.c head/libexec/tftpd/tftpd.c Modified: head/libexec/tftpd/tests/functional.c ============================================================================== --- head/libexec/tftpd/tests/functional.c Sat Mar 10 01:43:55 2018 (r330719) +++ head/libexec/tftpd/tests/functional.c Sat Mar 10 01:50:43 2018 (r330720) @@ -677,7 +677,6 @@ TFTPD_TC_DEFINE(unknown_opcode,) { /* Looks like an RRQ or WRQ request, but with a bad opcode */ SEND_STR("\0\007foo.txt\0octet\0"); - atf_tc_expect_timeout("PR 226005 tftpd ignores bad opcodes but doesn't reject them"); RECV_ERROR(4, "Illegal TFTP operation"); } Modified: head/libexec/tftpd/tftpd.c ============================================================================== --- head/libexec/tftpd/tftpd.c Sat Mar 10 01:43:55 2018 (r330719) +++ head/libexec/tftpd/tftpd.c Sat Mar 10 01:50:43 2018 (r330720) @@ -421,8 +421,7 @@ main(int argc, char *argv[]) "%s read access denied", peername); exit(1); } - } - if (tp->th_opcode == WRQ) { + } else if (tp->th_opcode == WRQ) { if (allow_wo) tftp_wrq(peer, tp->th_stuff, n - 1); else { @@ -430,7 +429,8 @@ main(int argc, char *argv[]) "%s write access denied", peername); exit(1); } - } + } else + send_error(peer, EBADOP); exit(1); } From owner-svn-src-all@freebsd.org Sat Mar 10 01:53:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D5EDF3BFE9; Sat, 10 Mar 2018 01:53:43 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1C097A2A3; Sat, 10 Mar 2018 01:53:42 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA50E27238; Sat, 10 Mar 2018 01:53:42 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A1rg0V064023; Sat, 10 Mar 2018 01:53:42 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A1rgIB064022; Sat, 10 Mar 2018 01:53:42 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803100153.w2A1rgIB064022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 10 Mar 2018 01:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330721 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 01:53:43 -0000 Author: cem Date: Sat Mar 10 01:53:42 2018 New Revision: 330721 URL: https://svnweb.freebsd.org/changeset/base/330721 Log: subr_gtaskqueue: Fix braino from r330715 Submitted by: markj Sponsored by: Dell EMC Isilon Modified: head/sys/kern/subr_gtaskqueue.c Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Sat Mar 10 01:50:43 2018 (r330720) +++ head/sys/kern/subr_gtaskqueue.c Sat Mar 10 01:53:42 2018 (r330721) @@ -135,7 +135,7 @@ _gtaskqueue_create(const char *name, int mflags, queue = malloc(sizeof(struct gtaskqueue), M_GTASKQUEUE, mflags | M_ZERO); if (!queue) { - free(queue->tq_name, M_GTASKQUEUE); + free(tq_name, M_GTASKQUEUE); return (NULL); } From owner-svn-src-all@freebsd.org Sat Mar 10 01:58:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7088DF3C692; Sat, 10 Mar 2018 01:58:16 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA3267A5F7; Sat, 10 Mar 2018 01:58:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x243.google.com with SMTP id k135so4908842ite.2; Fri, 09 Mar 2018 17:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=FECY+iF4sRjFl4KHExIecgf71XtjF/I1HBY6lF9K4bM=; b=GeBPPPZi1PSXnqDPykRWXoXZekjOcB587tUSxSsqJ+RjrhMCDCNhJmRCOGe+yWu3hn Z0pnSWLUBkAWDCSTVYo6w1ifcXShP3l0k1WY+RPSiUzsVcm7BGiXese5NuNLCUHbzJDi 2PV/dZ3U2w16ShDm1ppvmarSkKvRUYAKOQAvcuA2J2FxPDYtn2myKF8leFGBnF+EiSt0 Pv30cUpU1y1SrysKpYP/gxGcX5qRbrzIU0OzOQLC4mTv6713m8xs7LaqvpURkYbUqcEA Y+EehqhgX4T9YeMqoWmSX+Z5upc2DmRdQSHvjbpjROG4n1LizDLt6Nlyy7QDHzPUeFSm V1kw== 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=FECY+iF4sRjFl4KHExIecgf71XtjF/I1HBY6lF9K4bM=; b=cUZTcubodYXRJi8tYj2rwN1UviSjK3RK+4ZksXgP0e4EOErjRQgbwYxCpWGgxoxliB vQ4kZKQ/K2ab+LZ4OvHJgHDtHG49l3nfBugundr9yo8oQVVcawag7Z03bO1tNpJPc4AY w7S8rkuSfeh/cO+IEPyhSZU+KFivRcWfrtqD2WkJ06CF7cdqWL79KsM/ri1km3yXUfFF lDJwErwW0P7xuoggIF2bftQ8xJ4a/9TNVBA1p2EV/LqTZ9yU/y2CJ8DLx8+rsGfBSK1U fJ7+K6UkrZWasSSxDsFJd6nKmvS2kL5P/gFMr+m9l/Khm83jmJuTiuzwOYaBtq3H1kzH A+QA== X-Gm-Message-State: AElRT7EtdCpA5n4hq0r8+SH70Txi6HvmYLuWG6QtMh1J+Mt0KsYAoSDR uoc8vxpS08S7AEpJfiz15dpc00+bWbg5hNfb4b0= X-Google-Smtp-Source: AG47ELt56sYEycI2HVX3AHxetQ4kMIA41LJ0rwwwcUTRvvtqCM3v5XbzjWYt/TJGRwxmeCnVjCZMBYWtNXl1BOWvhho= X-Received: by 10.36.7.198 with SMTP id f189mr57020itf.114.1520647095217; Fri, 09 Mar 2018 17:58:15 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.163.13 with HTTP; Fri, 9 Mar 2018 17:57:54 -0800 (PST) In-Reply-To: References: <201801311436.w0VEaRrZ030839@repo.freebsd.org> From: Ed Maste Date: Fri, 9 Mar 2018 20:57:54 -0500 X-Google-Sender-Auth: 3dHsfoPpmR6mW0WJELV3BhgTnDM Message-ID: Subject: Re: svn commit: r328625 - in head/sys: amd64/amd64 amd64/ia32 amd64/include dev/cpuctl i386/i386 x86/include x86/x86 To: Dexuan-BSD Cui Cc: Konstantin Belousov , Dexuan Cui , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 01:58:16 -0000 On 9 March 2018 at 19:41, Dexuan-BSD Cui wrote: > Hi, > > In my FreeBSD 11.1 VM, I'm getting this build failure and it looks > this revision causes the failure: > > /root/bsd.git/sys/amd64/amd64/support.S:855:2: error: unknown directive > .altmacro > ^ Are you trying to build a head kernel using the toolchain in 11.1? That won't work (because of missing .altmacro support). Building kernel-toolchain first should get a working toolchain. > It looks -fno-integrated-as might fix the failure for me according to: Avoiding the integrated assembler is indeed the workaround for this issue, but you'll want to apply it only to the affected file. Kostik's 11.1 merge candidate patch adds to sys/conf/Makefile.amd64 ASM_CFLAGS.support.S= ${CLANG_NO_IAS} From owner-svn-src-all@freebsd.org Sat Mar 10 02:09:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E105F3D76B; Sat, 10 Mar 2018 02:09:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D2A327AE6E; Sat, 10 Mar 2018 02:09:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC976273FC; Sat, 10 Mar 2018 02:09:36 +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 w2A29aJW068980; Sat, 10 Mar 2018 02:09:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A29aZ6068978; Sat, 10 Mar 2018 02:09:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803100209.w2A29aZ6068978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 10 Mar 2018 02:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330722 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 330722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 02:09:37 -0000 Author: bdrewery Date: Sat Mar 10 02:09:36 2018 New Revision: 330722 URL: https://svnweb.freebsd.org/changeset/base/330722 Log: Reduce overhead for simple 'make -V' lookups by avoiding 'find sys/'. Setting -DNO_SKIP_MPATH can be used for debugging. Reported by: bde MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/sys/conf/config.mk head/sys/conf/kern.pre.mk Modified: head/sys/conf/config.mk ============================================================================== --- head/sys/conf/config.mk Sat Mar 10 01:53:42 2018 (r330721) +++ head/sys/conf/config.mk Sat Mar 10 02:09:36 2018 (r330722) @@ -50,7 +50,8 @@ KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$ .export KERN_OPTS .endif -.if !defined(NO_MODULES) && !defined(__MPATH) +.if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) && \ + (empty(.MAKEFLAGS:M-V) || defined(NO_SKIP_MPATH)) __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m .export __MPATH .endif Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Sat Mar 10 01:53:42 2018 (r330721) +++ head/sys/conf/kern.pre.mk Sat Mar 10 02:09:36 2018 (r330722) @@ -214,7 +214,8 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compil SYSTEM_DEP+= ${LDSCRIPT} # Calculate path for .m files early, if needed. -.if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) +.if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) && \ + (empty(.MAKEFLAGS:M-V) || defined(NO_SKIP_MPATH)) __MPATH!=find ${S:tA}/ -name \*_if.m .endif From owner-svn-src-all@freebsd.org Sat Mar 10 02:10:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B4A5F3D897; Sat, 10 Mar 2018 02:10:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31E017AFC7; Sat, 10 Mar 2018 02:10:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CDAC27403; Sat, 10 Mar 2018 02:10:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A2AKAL069080; Sat, 10 Mar 2018 02:10:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A2AKqH069079; Sat, 10 Mar 2018 02:10:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803100210.w2A2AKqH069079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 10 Mar 2018 02:10:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330723 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 330723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 02:10:20 -0000 Author: bdrewery Date: Sat Mar 10 02:10:19 2018 New Revision: 330723 URL: https://svnweb.freebsd.org/changeset/base/330723 Log: Skip reading depend files with -V unless looking up a depend variable. This speeds up some simple -V lookups significantly. Reported by: bde MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sat Mar 10 02:09:36 2018 (r330722) +++ head/sys/conf/kern.post.mk Sat Mar 10 02:10:19 2018 (r330723) @@ -201,6 +201,7 @@ _meta_filemon= 1 # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used # for _meta_filemon but not for _SKIP_DEPEND. .if !defined(NO_SKIP_DEPEND) && (make(*obj) || \ + (!empty(.MAKEFLAGS:M-V) && empty(.MAKEFLAGS:M*DEP*)) || \ ${.TARGETS:M*clean*} == ${.TARGETS} || \ ${.TARGETS:M*install*} == ${.TARGETS}) _SKIP_DEPEND= 1 From owner-svn-src-all@freebsd.org Sat Mar 10 02:10:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D32AF3D8FE; Sat, 10 Mar 2018 02:10:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B67F7B094; Sat, 10 Mar 2018 02:10:27 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD48F27405; Sat, 10 Mar 2018 02:10:26 +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 w2A2AQjQ069127; Sat, 10 Mar 2018 02:10:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A2AQYO069126; Sat, 10 Mar 2018 02:10:26 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803100210.w2A2AQYO069126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 10 Mar 2018 02:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330724 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 330724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 02:10:28 -0000 Author: bdrewery Date: Sat Mar 10 02:10:26 2018 New Revision: 330724 URL: https://svnweb.freebsd.org/changeset/base/330724 Log: Don't skip reading depend for 'make obj' unless it is alone. This was effectively done in bsd.dep.mk quite some time ago. MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sat Mar 10 02:10:19 2018 (r330723) +++ head/sys/conf/kern.post.mk Sat Mar 10 02:10:26 2018 (r330724) @@ -200,8 +200,9 @@ _meta_filemon= 1 # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used # for _meta_filemon but not for _SKIP_DEPEND. -.if !defined(NO_SKIP_DEPEND) && (make(*obj) || \ +.if !defined(NO_SKIP_DEPEND) && \ (!empty(.MAKEFLAGS:M-V) && empty(.MAKEFLAGS:M*DEP*)) || \ + (${.TARGETS:M*obj} == ${.TARGETS} || \ ${.TARGETS:M*clean*} == ${.TARGETS} || \ ${.TARGETS:M*install*} == ${.TARGETS}) _SKIP_DEPEND= 1 From owner-svn-src-all@freebsd.org Sat Mar 10 02:13:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C1F6F3DF62; Sat, 10 Mar 2018 02:13:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE79E7B60F; Sat, 10 Mar 2018 02:13:48 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9579275A6; Sat, 10 Mar 2018 02:13:48 +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 w2A2Dmit073930; Sat, 10 Mar 2018 02:13:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A2Dm8K073929; Sat, 10 Mar 2018 02:13:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201803100213.w2A2Dm8K073929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 10 Mar 2018 02:13:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330725 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 330725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 02:13:49 -0000 Author: bdrewery Date: Sat Mar 10 02:13:48 2018 New Revision: 330725 URL: https://svnweb.freebsd.org/changeset/base/330725 Log: Fix rebase mismerge in r330724. X-MFC-With: r330724 MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Sat Mar 10 02:10:26 2018 (r330724) +++ head/sys/conf/kern.post.mk Sat Mar 10 02:13:48 2018 (r330725) @@ -201,8 +201,8 @@ _meta_filemon= 1 # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used # for _meta_filemon but not for _SKIP_DEPEND. .if !defined(NO_SKIP_DEPEND) && \ - (!empty(.MAKEFLAGS:M-V) && empty(.MAKEFLAGS:M*DEP*)) || \ - (${.TARGETS:M*obj} == ${.TARGETS} || \ + ((!empty(.MAKEFLAGS:M-V) && empty(.MAKEFLAGS:M*DEP*)) || \ + ${.TARGETS:M*obj} == ${.TARGETS} || \ ${.TARGETS:M*clean*} == ${.TARGETS} || \ ${.TARGETS:M*install*} == ${.TARGETS}) _SKIP_DEPEND= 1 From owner-svn-src-all@freebsd.org Sat Mar 10 02:15:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C74F9F3E2CE; Sat, 10 Mar 2018 02:15:47 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EAE37B812; Sat, 10 Mar 2018 02:15:47 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 689D5275B4; Sat, 10 Mar 2018 02:15:47 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A2Fl0e074065; Sat, 10 Mar 2018 02:15:47 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A2FkqY074051; Sat, 10 Mar 2018 02:15:46 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100215.w2A2FkqY074051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 02:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330726 - in stable/11: sbin/geom/class/cache sbin/geom/class/concat sbin/geom/class/journal sbin/geom/class/label sbin/geom/class/mirror sbin/geom/class/raid3 sbin/geom/class/shsec sbi... X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: sbin/geom/class/cache sbin/geom/class/concat sbin/geom/class/journal sbin/geom/class/label sbin/geom/class/mirror sbin/geom/class/raid3 sbin/geom/class/shsec sbin/geom/class/stripe sbin/... X-SVN-Commit-Revision: 330726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 02:15:48 -0000 Author: asomers Date: Sat Mar 10 02:15:45 2018 New Revision: 330726 URL: https://svnweb.freebsd.org/changeset/base/330726 Log: MFC r323314, r323338, r328849 r323314: Audit userspace geom code for leaking memory to disk Any geom class using g_metadata_store, as well as geom_virstor which duplicated g_metadata_store internally, would dump sectorsize - mdsize bytes of userspace memory following the metadata block stored. This is most or all geom classes (gcache, gconcat, geli, gjournal, glabel, gmirror, gmultipath, graid3, gshsec, gstripe, and geom_virstor). PR: 222077 (comment #3) Reported by: Maxim Khitrov Reviewed by: des Security: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12269 r323338: Fix information leak in geli(8) integrity mode In integrity mode, a larger logical sector (e.g., 4096 bytes) spans several physical sectors (e.g., 512 bytes) on the backing device. Due to hash overhead, a 4096 byte logical sector takes 8.5625 512-byte physical sectors. This means that only 288 bytes (256 data + 32 hash) of the last 512 byte sector are used. The memory allocation used to store the encrypted data to be written to the physical sectors comes from malloc(9) and does not use M_ZERO. Previously, nothing initialized the final physical sector backing each logical sector, aside from the hash + encrypted data portion. So 224 bytes of kernel heap memory was leaked to every block :-(. This patch addresses the issue by initializing the trailing portion of the physical sector in every logical sector to zeros before use. A much simpler but higher overhead fix would be to tag the entire allocation M_ZERO. PR: 222077 Reported by: Maxim Khitrov Reviewed by: emaste Security: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12272 r328849: geom: don't write stack garbage in disk labels Most consumers of g_metadata_store were passing in partially unallocated memory, resulting in stack garbage being written to disk labels. Fix them by zeroing the memory first. gvirstor repeated the same mistake, but in the kernel. Also, glabel's label contained a fixed-size string that wasn't initialized to zero. PR: 222077 Reported by: Maxim Khitrov Reviewed by: cem X-MFC-With: 323314 X-MFC-With: 323338 Differential Revision: https://reviews.freebsd.org/D14164 Modified: stable/11/sbin/geom/class/cache/geom_cache.c stable/11/sbin/geom/class/concat/geom_concat.c stable/11/sbin/geom/class/journal/geom_journal.c stable/11/sbin/geom/class/label/geom_label.c stable/11/sbin/geom/class/mirror/geom_mirror.c stable/11/sbin/geom/class/raid3/geom_raid3.c stable/11/sbin/geom/class/shsec/geom_shsec.c stable/11/sbin/geom/class/stripe/geom_stripe.c stable/11/sbin/geom/class/virstor/geom_virstor.c stable/11/sbin/geom/misc/subr.c stable/11/sys/geom/eli/g_eli_integrity.c stable/11/sys/geom/virstor/g_virstor.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/geom/class/cache/geom_cache.c ============================================================================== --- stable/11/sbin/geom/class/cache/geom_cache.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/class/cache/geom_cache.c Sat Mar 10 02:15:45 2018 (r330726) @@ -137,6 +137,7 @@ cache_label(struct gctl_req *req) int error, nargs; intmax_t val; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs != 2) { gctl_error(req, "Invalid number of arguments."); Modified: stable/11/sbin/geom/class/concat/geom_concat.c ============================================================================== --- stable/11/sbin/geom/class/concat/geom_concat.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/class/concat/geom_concat.c Sat Mar 10 02:15:45 2018 (r330726) @@ -119,6 +119,7 @@ concat_label(struct gctl_req *req) const char *name; int error, i, hardcode, nargs; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs < 2) { gctl_error(req, "Too few arguments."); Modified: stable/11/sbin/geom/class/journal/geom_journal.c ============================================================================== --- stable/11/sbin/geom/class/journal/geom_journal.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/class/journal/geom_journal.c Sat Mar 10 02:15:45 2018 (r330726) @@ -144,6 +144,7 @@ journal_label(struct gctl_req *req) intmax_t jsize, msize, ssize; int error, force, i, nargs, checksum, hardcode; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); str = NULL; /* gcc */ Modified: stable/11/sbin/geom/class/label/geom_label.c ============================================================================== --- stable/11/sbin/geom/class/label/geom_label.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/class/label/geom_label.c Sat Mar 10 02:15:45 2018 (r330726) @@ -125,6 +125,7 @@ label_label(struct gctl_req *req) u_char sector[512]; int error, nargs; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs != 2) { gctl_error(req, "Invalid number of arguments."); @@ -145,6 +146,7 @@ label_label(struct gctl_req *req) strlcpy(md.md_magic, G_LABEL_MAGIC, sizeof(md.md_magic)); md.md_version = G_LABEL_VERSION; label = gctl_get_ascii(req, "arg0"); + bzero(md.md_label, sizeof(md.md_label)); strlcpy(md.md_label, label, sizeof(md.md_label)); md.md_provsize = g_get_mediasize(name); if (md.md_provsize == 0) { Modified: stable/11/sbin/geom/class/mirror/geom_mirror.c ============================================================================== --- stable/11/sbin/geom/class/mirror/geom_mirror.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/class/mirror/geom_mirror.c Sat Mar 10 02:15:45 2018 (r330726) @@ -188,6 +188,7 @@ mirror_label(struct gctl_req *req) intmax_t val; int error, i, nargs, bal, hardcode; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs < 2) { gctl_error(req, "Too few arguments."); Modified: stable/11/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- stable/11/sbin/geom/class/raid3/geom_raid3.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/class/raid3/geom_raid3.c Sat Mar 10 02:15:45 2018 (r330726) @@ -151,6 +151,7 @@ raid3_label(struct gctl_req *req) int hardcode, round_robin, verify; int error, i, nargs; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs < 4) { gctl_error(req, "Too few arguments."); Modified: stable/11/sbin/geom/class/shsec/geom_shsec.c ============================================================================== --- stable/11/sbin/geom/class/shsec/geom_shsec.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/class/shsec/geom_shsec.c Sat Mar 10 02:15:45 2018 (r330726) @@ -112,6 +112,7 @@ shsec_label(struct gctl_req *req) const char *name; int error, i, nargs, hardcode; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs <= 2) { gctl_error(req, "Too few arguments."); Modified: stable/11/sbin/geom/class/stripe/geom_stripe.c ============================================================================== --- stable/11/sbin/geom/class/stripe/geom_stripe.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/class/stripe/geom_stripe.c Sat Mar 10 02:15:45 2018 (r330726) @@ -130,6 +130,7 @@ stripe_label(struct gctl_req *req) const char *name; int error, i, nargs, hardcode; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs < 3) { gctl_error(req, "Too few arguments."); Modified: stable/11/sbin/geom/class/virstor/geom_virstor.c ============================================================================== --- stable/11/sbin/geom/class/virstor/geom_virstor.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/class/virstor/geom_virstor.c Sat Mar 10 02:15:45 2018 (r330726) @@ -185,6 +185,7 @@ my_g_metadata_store(const char *name, u_char *md, size goto out; } bcopy(md, sector, size); + bzero(sector + size, sectorsize - size); if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) != (ssize_t)sectorsize) { error = errno; Modified: stable/11/sbin/geom/misc/subr.c ============================================================================== --- stable/11/sbin/geom/misc/subr.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sbin/geom/misc/subr.c Sat Mar 10 02:15:45 2018 (r330726) @@ -273,6 +273,13 @@ out: return (error); } +/* + * Actually write the GEOM label to the provider + * + * @param name GEOM provider's name (ie "ada0") + * @param md Pointer to the label data to write + * @param size Size of the data pointed to by md + */ int g_metadata_store(const char *name, const unsigned char *md, size_t size) { @@ -304,6 +311,7 @@ g_metadata_store(const char *name, const unsigned char goto out; } bcopy(md, sector, size); + bzero(sector + size, sectorsize - size); if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) != sectorsize) { error = errno; Modified: stable/11/sys/geom/eli/g_eli_integrity.c ============================================================================== --- stable/11/sys/geom/eli/g_eli_integrity.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sys/geom/eli/g_eli_integrity.c Sat Mar 10 02:15:45 2018 (r330726) @@ -458,8 +458,16 @@ g_eli_auth_run(struct g_eli_worker *wr, struct bio *bp authkey = (u_char *)p; p += G_ELI_AUTH_SECKEYLEN; data_secsize = sc->sc_data_per_sector; - if ((i % lsec) == 0) + if ((i % lsec) == 0) { data_secsize = decr_secsize % data_secsize; + /* + * Last encrypted sector of each decrypted sector is + * only partially filled. + */ + if (bp->bio_cmd == BIO_WRITE) + memset(data + sc->sc_alen + data_secsize, 0, + encr_secsize - sc->sc_alen - data_secsize); + } if (bp->bio_cmd == BIO_READ) { /* Remember read HMAC. */ Modified: stable/11/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/11/sys/geom/virstor/g_virstor.c Sat Mar 10 02:13:48 2018 (r330725) +++ stable/11/sys/geom/virstor/g_virstor.c Sat Mar 10 02:15:45 2018 (r330726) @@ -1040,6 +1040,7 @@ write_metadata(struct g_consumer *cp, struct g_virstor pp = cp->provider; buf = malloc(pp->sectorsize, M_GVIRSTOR, M_WAITOK); + bzero(buf, pp->sectorsize); virstor_metadata_encode(md, buf); g_topology_unlock(); error = g_write_data(cp, pp->mediasize - pp->sectorsize, buf, From owner-svn-src-all@freebsd.org Sat Mar 10 02:49:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA9B4F4131B; Sat, 10 Mar 2018 02:49:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A03D17CDC7; Sat, 10 Mar 2018 02:49:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B15E27ACA; Sat, 10 Mar 2018 02:49:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A2nw9Y089225; Sat, 10 Mar 2018 02:49:58 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A2nwjo089222; Sat, 10 Mar 2018 02:49:58 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201803100249.w2A2nwjo089222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 10 Mar 2018 02:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330727 - in head/sys: arm/broadcom/bcm2835 dts/arm X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in head/sys: arm/broadcom/bcm2835 dts/arm X-SVN-Commit-Revision: 330727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 02:49:59 -0000 Author: gonzo Date: Sat Mar 10 02:49:58 2018 New Revision: 330727 URL: https://svnweb.freebsd.org/changeset/base/330727 Log: [rpi] remove IRQ support for BCM233x RNG Upstream DTBs don't provide IRQ lines for the RNG. Moreover, harvesting bytes as often as the RNG interrupt is triggered (87 times per sec) is an overkill. For these reasons, get rid of the interrupt mode and make callout mode the default, with random bits harvested every 4 seconds. Submitted by: Sylvain Garrigues Reviewed by: ian, imp, manu, mmel Approved by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D14541 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_rng.c head/sys/dts/arm/rpi.dts head/sys/dts/arm/rpi2.dts Modified: head/sys/arm/broadcom/bcm2835/bcm2835_rng.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_rng.c Sat Mar 10 02:15:45 2018 (r330726) +++ head/sys/arm/broadcom/bcm2835/bcm2835_rng.c Sat Mar 10 02:49:58 2018 (r330727) @@ -51,10 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if !defined(BCM2835_RNG_USE_CALLOUT) -#define BCM2835_RNG_USE_INTERRUPT -#endif - static device_attach_t bcm2835_rng_attach; static device_detach_t bcm2835_rng_detach; static device_probe_t bcm2835_rng_probe; @@ -92,18 +88,15 @@ static device_probe_t bcm2835_rng_probe; #define RNG_NUM_OSCILLATORS 6 #define RNG_STALL_COUNT_DEFAULT 10 +#define RNG_CALLOUT_TICKS (hz * 4) + struct bcm2835_rng_softc { device_t sc_dev; struct resource * sc_mem_res; struct resource * sc_irq_res; void * sc_intr_hdl; -#if defined(BCM2835_RNG_USE_CALLOUT) || defined(BCM2835_RNG_USE_INTERRUPT) uint32_t sc_buf[RNG_FIFO_WORDS]; -#endif -#if defined(BCM2835_RNG_USE_CALLOUT) struct callout sc_rngto; - int sc_rnghz; -#endif int sc_stall_count; int sc_rbg2x; long sc_underrun; @@ -214,20 +207,7 @@ bcm2835_rng_disable_intr(struct bcm2835_rng_softc *sc) bcm2835_rng_write4(sc, RNG_INT_MASK, mask); } -#if defined(BCM2835_RNG_USE_INTERRUPT) static void -bcm2835_rng_enable_intr(struct bcm2835_rng_softc *sc) -{ - uint32_t mask; - - /* Clear the interrupt off bit in the interrupt mask register */ - mask = bcm2835_rng_read4(sc, RNG_INT_MASK); - mask &= ~RNG_INT_OFF_BIT; - bcm2835_rng_write4(sc, RNG_INT_MASK, mask); -} -#endif - -static void bcm2835_rng_start(struct bcm2835_rng_softc *sc) { uint32_t ctrl; @@ -244,11 +224,6 @@ bcm2835_rng_start(struct bcm2835_rng_softc *sc) if (sc->sc_rbg2x) ctrl |= RNG_RBG2X; bcm2835_rng_write4(sc, RNG_CTRL, ctrl); - -#if defined(BCM2835_RNG_USE_INTERRUPT) - /* Enable the interrupt */ - bcm2835_rng_enable_intr(sc); -#endif } static void @@ -263,12 +238,13 @@ bcm2835_rng_stop(struct bcm2835_rng_softc *sc) } static void -bcm2835_rng_harvest(struct bcm2835_rng_softc *sc) +bcm2835_rng_harvest(void *arg) { uint32_t *dest; uint32_t status; u_int cnt, nread, num_avail, num_words; int seen_underrun, num_stalls; + struct bcm2835_rng_softc *sc = arg; dest = sc->sc_buf; nread = num_words = 0; @@ -316,9 +292,7 @@ bcm2835_rng_harvest(struct bcm2835_rng_softc *sc) random_harvest_queue(sc->sc_buf, cnt, cnt * NBBY / 2, RANDOM_PURE_BROADCOM); -#if defined(BCM2835_RNG_USE_CALLOUT) - callout_reset(&sc->sc_rngto, sc->sc_rnghz, bcm2835_rng_harvest, sc); -#endif + callout_reset(&sc->sc_rngto, RNG_CALLOUT_TICKS, bcm2835_rng_harvest, sc); } static int @@ -390,10 +364,10 @@ bcm2835_rng_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; sc->sc_stall_count = RNG_STALL_COUNT_DEFAULT; -#ifdef BCM2835_RNG_USE_CALLOUT + /* Initialize callout */ callout_init(&sc->sc_rngto, CALLOUT_MPSAFE); -#endif + TUNABLE_INT_FETCH("bcmrng.2xspeed", &sc->sc_rbg2x); TUNABLE_INT_FETCH("bcmrng.stall_count", &sc->sc_stall_count); @@ -406,27 +380,6 @@ bcm2835_rng_attach(device_t dev) return (ENXIO); } -#if defined(BCM2835_RNG_USE_INTERRUPT) - /* Allocate interrupt resource */ - rid = 0; - sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE); - if (sc->sc_irq_res == NULL) { - bcm2835_rng_detach(dev); - return (ENXIO); - } - - /* Set up the interrupt handler */ - error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (driver_intr_t *)bcm2835_rng_harvest, sc, &sc->sc_intr_hdl); - if (error) { - device_printf(dev, "Failed to set up IRQ\n"); - sc->sc_intr_hdl = NULL; - bcm2835_rng_detach(dev); - return (error); - } -#endif - /* Start the RNG */ bcm2835_rng_start(sc); @@ -461,14 +414,11 @@ bcm2835_rng_attach(device_t dev) sysctl_bcm2835_rng_dump, "S", "Dump RNG registers"); #endif -#if defined(BCM2835_RNG_USE_CALLOUT) - /* Reset callout */ - if (hz >= 100) - sc->sc_rnghz = hz / 100; - else - sc->sc_rnghz = 1; - callout_reset(&sc->sc_rngto, sc->sc_rnghz, bcm2835_rng_harvest, sc); -#endif + /* + * Schedule the initial harvesting one second from now, which should give the + * hardware RNG plenty of time to generate the first random bytes. + */ + callout_reset(&sc->sc_rngto, hz, bcm2835_rng_harvest, sc); return (0); } @@ -477,9 +427,6 @@ static int bcm2835_rng_detach(device_t dev) { struct bcm2835_rng_softc *sc; -#if defined(BCM2835_RNG_USE_INTERRUPT) - int error; -#endif sc = device_get_softc(dev); @@ -487,27 +434,7 @@ bcm2835_rng_detach(device_t dev) bcm2835_rng_stop(sc); /* Drain the callout it */ -#if defined(BCM2835_RNG_USE_CALLOUT) callout_drain(&sc->sc_rngto); -#endif - -#if defined(BCM2835_RNG_USE_INTERRUPT) - /* Tear down the interrupt */ - if (sc->sc_irq_res && sc->sc_intr_hdl) { - error = bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intr_hdl); - if (error != 0) { - device_printf(dev, "could not tear down IRQ\n"); - return (error); - } - sc->sc_intr_hdl = NULL; - } - - /* Release interrupt resource */ - if (sc->sc_irq_res) { - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); - sc->sc_irq_res = NULL; - } -#endif /* Release memory resource */ if (sc->sc_mem_res != NULL) Modified: head/sys/dts/arm/rpi.dts ============================================================================== --- head/sys/dts/arm/rpi.dts Sat Mar 10 02:15:45 2018 (r330726) +++ head/sys/dts/arm/rpi.dts Sat Mar 10 02:49:58 2018 (r330727) @@ -51,10 +51,6 @@ status = "okay"; }; - rng@7e104000 { - interrupts = <2 29>; - } - spi@7e204000 { status = "okay"; }; Modified: head/sys/dts/arm/rpi2.dts ============================================================================== --- head/sys/dts/arm/rpi2.dts Sat Mar 10 02:15:45 2018 (r330726) +++ head/sys/dts/arm/rpi2.dts Sat Mar 10 02:49:58 2018 (r330727) @@ -51,10 +51,6 @@ status = "okay"; }; - rng@7e104000 { - interrupts = <2 29>; - } - spi@7e204000 { status = "okay"; }; From owner-svn-src-all@freebsd.org Sat Mar 10 03:04:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8223DF42AAD; Sat, 10 Mar 2018 03:04:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CA087DE8E; Sat, 10 Mar 2018 03:04:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2783627EA5; Sat, 10 Mar 2018 03:04:49 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A34nd9099953; Sat, 10 Mar 2018 03:04:49 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A34nm0099952; Sat, 10 Mar 2018 03:04:49 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100304.w2A34nm0099952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 03:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330728 - stable/11/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/cddl/contrib/opensolaris/cmd/zpool X-SVN-Commit-Revision: 330728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:04:49 -0000 Author: asomers Date: Sat Mar 10 03:04:48 2018 New Revision: 330728 URL: https://svnweb.freebsd.org/changeset/base/330728 Log: MFC r329067: Fix "zpool add" crash when a replacing vdev has a spare child Fix an assertion in zpool that causes a crash when running any "zpool add" command on a spare that contains a replacing vdev with a spare child. This likely affects Illumos, too. PR: 225546 Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D14138 Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat Mar 10 02:49:58 2018 (r330727) +++ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat Mar 10 03:04:48 2018 (r330728) @@ -688,6 +688,21 @@ get_replication(nvlist_t *nvroot, boolean_t fatal) verify(nvlist_lookup_string(cnv, ZPOOL_CONFIG_TYPE, &childtype) == 0); + if (strcmp(childtype, + VDEV_TYPE_SPARE) == 0) { + /* We have a replacing vdev with + * a spare child. Get the first + * real child of the spare + */ + verify( + nvlist_lookup_nvlist_array( + cnv, + ZPOOL_CONFIG_CHILDREN, + &rchild, + &rchildren) == 0); + assert(rchildren >= 2); + cnv = rchild[0]; + } } verify(nvlist_lookup_string(cnv, From owner-svn-src-all@freebsd.org Sat Mar 10 03:06:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 167BCF42DDE; Sat, 10 Mar 2018 03:06:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACCC17E087; Sat, 10 Mar 2018 03:06:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3F0327EAB; Sat, 10 Mar 2018 03:06:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A36tZM000193; Sat, 10 Mar 2018 03:06:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A36tdY000192; Sat, 10 Mar 2018 03:06:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100306.w2A36tdY000192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 03:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330729 - in stable/11: contrib/netbsd-tests/lib/libc/sys tools/regression/sockets/socketpair X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: contrib/netbsd-tests/lib/libc/sys tools/regression/sockets/socketpair X-SVN-Commit-Revision: 330729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:06:56 -0000 Author: asomers Date: Sat Mar 10 03:06:55 2018 New Revision: 330729 URL: https://svnweb.freebsd.org/changeset/base/330729 Log: MFC r329108: Convert tools/regression/sockets/socketpair to ATF Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D14305 Deleted: stable/11/tools/regression/sockets/socketpair/ Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c Sat Mar 10 03:04:48 2018 (r330728) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c Sat Mar 10 03:06:55 2018 (r330729) @@ -56,7 +56,7 @@ connected(int fd) } static void -run(int flags) +run(int domain, int type, int flags) { int fd[2], i; @@ -69,7 +69,7 @@ run(int flags) ATF_REQUIRE(closefrom(3) != -1); #endif - ATF_REQUIRE(socketpair(AF_UNIX, SOCK_DGRAM | flags, 0, fd) == 0); + ATF_REQUIRE(socketpair(domain, type | flags, 0, fd) == 0); ATF_REQUIRE(fd[0] == 3); ATF_REQUIRE(fd[1] == 4); @@ -97,6 +97,42 @@ run(int flags) ATF_REQUIRE(close(fd[1]) != -1); } +ATF_TC(inet); +ATF_TC_HEAD(inet, tc) +{ + atf_tc_set_md_var(tc, "descr", + "socketpair(2) does not work in the PF_INET domain"); +} + +ATF_TC_BODY(inet, tc) +{ + int fd[2]; + + ATF_REQUIRE_EQ(socketpair(PF_INET, SOCK_DGRAM, 0, fd), -1); + ATF_REQUIRE_EQ(EOPNOTSUPP, errno); + ATF_REQUIRE_EQ(socketpair(PF_INET, SOCK_STREAM, 0, fd), -1); + ATF_REQUIRE_EQ(EOPNOTSUPP, errno); +} + +ATF_TC(null_sv); +ATF_TC_HEAD(null_sv, tc) +{ + atf_tc_set_md_var(tc, "descr", + "socketpair(2) should fail without return storage"); +} + +ATF_TC_BODY(null_sv, tc) +{ + int fd; + + closefrom(3); + ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_DGRAM, 0, NULL), -1); + ATF_REQUIRE_EQ(EFAULT, errno); + fd = open("/", O_RDONLY); + ATF_REQUIRE_EQ_MSG(fd, 3, + "socketpair(..., NULL) allocated descriptors"); +} + ATF_TC(socketpair_basic); ATF_TC_HEAD(socketpair_basic, tc) { @@ -105,7 +141,7 @@ ATF_TC_HEAD(socketpair_basic, tc) ATF_TC_BODY(socketpair_basic, tc) { - run(0); + run(AF_UNIX, SOCK_DGRAM, 0); } ATF_TC(socketpair_nonblock); @@ -116,7 +152,7 @@ ATF_TC_HEAD(socketpair_nonblock, tc) ATF_TC_BODY(socketpair_nonblock, tc) { - run(SOCK_NONBLOCK); + run(AF_UNIX, SOCK_DGRAM, SOCK_NONBLOCK); } ATF_TC(socketpair_cloexec); @@ -127,15 +163,29 @@ ATF_TC_HEAD(socketpair_cloexec, tc) ATF_TC_BODY(socketpair_cloexec, tc) { - run(SOCK_CLOEXEC); + run(AF_UNIX, SOCK_DGRAM, SOCK_CLOEXEC); } +ATF_TC(socketpair_stream); +ATF_TC_HEAD(socketpair_stream, tc) +{ + atf_tc_set_md_var(tc, "descr", "A stream-oriented socketpair(2)"); +} + +ATF_TC_BODY(socketpair_stream, tc) +{ + run(AF_UNIX, SOCK_STREAM, 0); +} + ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, inet); + ATF_TP_ADD_TC(tp, null_sv); ATF_TP_ADD_TC(tp, socketpair_basic); ATF_TP_ADD_TC(tp, socketpair_nonblock); ATF_TP_ADD_TC(tp, socketpair_cloexec); + ATF_TP_ADD_TC(tp, socketpair_stream); return atf_no_error(); } From owner-svn-src-all@freebsd.org Sat Mar 10 03:08:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4C1EF4303F; Sat, 10 Mar 2018 03:08:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BDF77E274; Sat, 10 Mar 2018 03:08:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4702627EB2; Sat, 10 Mar 2018 03:08:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A38LR2000293; Sat, 10 Mar 2018 03:08:21 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A38LdK000292; Sat, 10 Mar 2018 03:08:21 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100308.w2A38LdK000292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 03:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330730 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 330730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:08:21 -0000 Author: asomers Date: Sat Mar 10 03:08:20 2018 New Revision: 330730 URL: https://svnweb.freebsd.org/changeset/base/330730 Log: MFC r329174: Fix a comment. No functional change. Sponsored by: Spectra Logic Corp Modified: stable/11/sys/sys/aio.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/aio.h ============================================================================== --- stable/11/sys/sys/aio.h Sat Mar 10 03:06:55 2018 (r330729) +++ stable/11/sys/sys/aio.h Sat Mar 10 03:08:20 2018 (r330730) @@ -52,7 +52,7 @@ #define LIO_WAIT 0x1 /* - * Maximum number of allowed LIO operations + * Maximum number of operations in a single lio_listio call */ #define AIO_LISTIO_MAX 16 From owner-svn-src-all@freebsd.org Sat Mar 10 03:14:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E699AF43921; Sat, 10 Mar 2018 03:14:05 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D73A7E7E6; Sat, 10 Mar 2018 03:14:05 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22f.google.com with SMTP id l191-v6so15840833lfe.1; Fri, 09 Mar 2018 19:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=+dAu5ld8LyfQ2LUVBp1Wwn6d5t3ybNXFvCYKv2avVEk=; b=sVz8eGtGtGPDiE2XZMZS02Xkakjk6lLsdIJ3g5nY0fqZ9Yo5n7E3jHr7s7/RD6Zr0Y HMPAUwQCpZJ0v6A5JyV1nWyYOBkBz540PaFBIAwLymwSLOL7Dm8luY57sVMDi3znorTp csTlb/jBG7PK6XZbLelqcxAd6m0axM/iufKYVn8gR05KZYcMujZZvhymrIfvvAstPB+P 0lcYjJcCc4l4wnNuuo6YvrCYOIu4NP2t1I6F2LQsf46f8Qwza5hhqX6iiJKEUAfrqkHZ HJsLfV1S7r4QZlTpiIPUh16A9WAjdXFv6mlLCefKTR76DQ3DHWHqc/TLy6cLwgA/EkeY Q4ig== 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=+dAu5ld8LyfQ2LUVBp1Wwn6d5t3ybNXFvCYKv2avVEk=; b=Y85hg9rnSnQIQOJJF3QWbenfYoXGSt+ru1aMkQwOwXC49GRwMdrCUZ+j3Ckr8nO3Xs UPQ44aQrw8UBpLdzkkCUKKY92ekoHZPXD1BVJzZuiSdNoukLMpFwbR6/NReP8WEiAgmD 3s7u8kGdATM+66TGxJ6dik2P3DcWArGo2C1fDHo/VbM4TAnmMWpCb70UvT+Ggk9K6p1s muSxVqzGwCsAmy1rRrUvv4E01okC/t3EyhdNKzcqLe+4Ej1PsdKL5VG7FhCerYYxlMSM Ptk4cyHbwQb7K4121N3PK2AE+FwgseJ6obCGzHMbpWpYaL/bTCxLz9g+Wv8sYitTtJS6 rbwQ== X-Gm-Message-State: AElRT7HVFxLryV7yOxbBG0FRkZn1/pb5DM7ls1i2Hl7rg/MFq2d1sXCm M7N5hudPmWe0biP045AA1byC2RwtLz1m0/C3/EgXKQ== X-Google-Smtp-Source: AG47ELu1cWT0PB9vA53fwsbqoYfXjVJqbT2L3kqSQtK9aTb07umGs6LYXZu93hyut6WpytGLWyglrZ6ccHInTELqVNA= X-Received: by 10.46.27.211 with SMTP id c80mr444757ljf.46.1520651643675; Fri, 09 Mar 2018 19:14:03 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.2.195 with HTTP; Fri, 9 Mar 2018 19:14:03 -0800 (PST) In-Reply-To: <201803080947.w289lArk031151@repo.freebsd.org> References: <201803080947.w289lArk031151@repo.freebsd.org> From: Alan Somers Date: Fri, 9 Mar 2018 20:14:03 -0700 X-Google-Sender-Auth: IXMX7KlWPRDAhUnvXM59sNF_N5w Message-ID: Subject: Re: svn commit: r330644 - in head/sys/dev/mlx5: . mlx5_core To: Hans Petter Selasky Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:14:06 -0000 On Thu, Mar 8, 2018 at 2:47 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Mar 8 09:47:09 2018 > New Revision: 330644 > URL: https://svnweb.freebsd.org/changeset/base/330644 > > Log: > Updates for PCI and health monitor recovery in mlx5core. > This patch accumulates the following Linux commits: > > mlx5_health.c > - 78ccb25861d76a8fc5c678d762180e6918834200 > mlx5_core: Fix wrong name in struct > - 171bb2c560f45c0427ca3776a4c8f4e26e559400 > mlx5_core: Update health syndromes > - 0144a95e2ad53a40c62148f44fb0c1f9d2a0d1e9 > mlx5_core: Use accessor functions to read from device memory > - ac6ea6e81a80172612e0c9ef93720f371b198918 > mlx5_core: Use private health thread for each device > - fd76ee4da55abb21babfc69310d321b9cb9a32e0 > mlx5_core: Fix internal error detection conditions > - 2241007b3d783cbdbaa78c30bdb1994278b6f9b9 > mlx5: Clear health sick bit when starting health poll > - 712bfef60912d91033cb25739f7444d5b8d8c59f > mlx5: Fix version printout in case of health issue > - 89d44f0a6c732db23b219be708e2fe1e03ee4842 > mlx5_core: Add pci error handlers to mlx5_core driver > > mlx5_cmd.c > - be87544de8df2b1eb34bcb5e32691287d96f9ec4 > mlx5_core: Fix async commands return code > - a31208b1e11df334d443ec8cace7636150bb8ce2 > mlx5_core: New init and exit flow for mlx5_core > - 020446e01eebc9dbe7eda038e570ab9c7ab13586 > mlx5_core: Prepare cmd interface to system errors handling > - 89d44f0a6c732db23b219be708e2fe1e03ee4842 > mlx5_core: Add pci error handlers to mlx5_core driver > - 0d834442cc247c7b3f3bd6019512ae03e96dd99a > mlx5: Fix teardown errors that happen in pci error handler > > mlx5_main.c > - 5fc7197d3a256d9c5de3134870304b24892a4908 > mlx5: Add pci shutdown callback > > Submitted by: Matthew Finlay > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > > It looks like this commit broke the build with GCC6. Could you please take a look? https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/4790/ From owner-svn-src-all@freebsd.org Sat Mar 10 03:15:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6B37F43B5C; Sat, 10 Mar 2018 03:15:45 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BBBB7E9A3; Sat, 10 Mar 2018 03:15:45 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 769BB69; Sat, 10 Mar 2018 03:15:45 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A3Fj5X004985; Sat, 10 Mar 2018 03:15:45 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A3Fjl4004983; Sat, 10 Mar 2018 03:15:45 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100315.w2A3Fjl4004983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 03:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330731 - in stable/11: contrib/netbsd-tests/kernel tests/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: contrib/netbsd-tests/kernel tests/sys/kern X-SVN-Commit-Revision: 330731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:15:46 -0000 Author: asomers Date: Sat Mar 10 03:15:44 2018 New Revision: 330731 URL: https://svnweb.freebsd.org/changeset/base/330731 Log: MFC r328896, r329236 r328896: Fix and enable SysV IPC tests. Don't declare some types that FreeBSD incorrectly declares. Fix an incorrect call to open() (missing mode). ANSIfy prototypes. Enable SysV message queue, semaphore, and shared memory tests. With exception of the workaround for union semun, these fixes have been committed to NetBSD. Reviewed by: asomers Approved by: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D13471 r329236: Fix Coverity CIDs in the sys/kern/sysv_test tests CID 979810: strcpy => strlcpy CID 1193367: don't leak a file descriptor CID 1299856: Check the return value of read(2) Reported by: Coverity Coverity CID: 978910 1193367 1299856 X-MFC-With: 328896 Sponsored by: Spectra Logic Corp Modified: stable/11/contrib/netbsd-tests/kernel/t_sysv.c stable/11/tests/sys/kern/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/kernel/t_sysv.c ============================================================================== --- stable/11/contrib/netbsd-tests/kernel/t_sysv.c Sat Mar 10 03:08:20 2018 (r330730) +++ stable/11/contrib/netbsd-tests/kernel/t_sysv.c Sat Mar 10 03:15:44 2018 (r330731) @@ -72,7 +72,7 @@ void sharer(void); #define MESSAGE_TEXT_LEN 256 -struct mymsg { +struct testmsg { long mtype; char mtext[MESSAGE_TEXT_LEN]; }; @@ -94,11 +94,13 @@ key_t msgkey, semkey, shmkey; int maxloop = 1; +#ifndef __FreeBSD__ union semun { int val; /* value for SETVAL */ struct semid_ds *buf; /* buffer for IPC_{STAT,SET} */ u_short *array; /* array for GETALL & SETALL */ }; +#endif /* Writes an integer to a file. To be used from the body of the test @@ -127,7 +129,8 @@ read_int(const char *path) return -1; else { int value; - read(input, &value, sizeof(value)); + ATF_REQUIRE_EQ(read(input, &value, sizeof(value)), sizeof(value)); + close(input); return value; } } @@ -174,7 +177,7 @@ key_t get_ftok(int id) /* Create the file, since ftok() requires it to exist! */ - fd = open(token_key, O_RDWR | O_CREAT | O_EXCL); + fd = open(token_key, O_RDWR | O_CREAT | O_EXCL, 0600); if (fd == -1) { rmdir(tmpdir); atf_tc_fail("open() of temp file failed: %d", errno); @@ -202,7 +205,7 @@ ATF_TC_BODY(msg, tc) { struct sigaction sa; struct msqid_ds m_ds; - struct mymsg m; + struct testmsg m; sigset_t sigmask; int sender_msqid; int loop; @@ -282,7 +285,7 @@ ATF_TC_BODY(msg, tc) * Send the first message to the receiver and wait for the ACK. */ m.mtype = MTYPE_1; - strcpy(m.mtext, m1_str); + strlcpy(m.mtext, m1_str, sizeof(m.mtext)); ATF_REQUIRE_MSG(msgsnd(sender_msqid, &m, MESSAGE_TEXT_LEN, 0) != -1, "sender: msgsnd 1: %d", errno); @@ -296,7 +299,7 @@ ATF_TC_BODY(msg, tc) * Send the second message to the receiver and wait for the ACK. */ m.mtype = MTYPE_2; - strcpy(m.mtext, m2_str); + strlcpy(m.mtext, m2_str, sizeof(m.mtext)); ATF_REQUIRE_MSG(msgsnd(sender_msqid, &m, MESSAGE_TEXT_LEN, 0) != -1, "sender: msgsnd 2: %d", errno); @@ -347,9 +350,7 @@ ATF_TC_CLEANUP(msg, tc) } void -print_msqid_ds(mp, mode) - struct msqid_ds *mp; - mode_t mode; +print_msqid_ds(struct msqid_ds *mp, mode_t mode) { uid_t uid = geteuid(); gid_t gid = getegid(); @@ -381,9 +382,9 @@ print_msqid_ds(mp, mode) } void -receiver() +receiver(void) { - struct mymsg m; + struct testmsg m; int msqid, loop; if ((msqid = msgget(msgkey, 0)) == -1) @@ -588,9 +589,7 @@ ATF_TC_CLEANUP(sem, tc) } void -print_semid_ds(sp, mode) - struct semid_ds *sp; - mode_t mode; +print_semid_ds(struct semid_ds *sp, mode_t mode) { uid_t uid = geteuid(); gid_t gid = getegid(); @@ -620,7 +619,7 @@ print_semid_ds(sp, mode) } void -waiter() +waiter(void) { struct sembuf s; int semid; @@ -789,9 +788,7 @@ ATF_TC_CLEANUP(shm, tc) } void -print_shmid_ds(sp, mode) - struct shmid_ds *sp; - mode_t mode; +print_shmid_ds(struct shmid_ds *sp, mode_t mode) { uid_t uid = geteuid(); gid_t gid = getegid(); @@ -823,7 +820,7 @@ print_shmid_ds(sp, mode) } void -sharer() +sharer(void) { int shmid; void *shm_buf; Modified: stable/11/tests/sys/kern/Makefile ============================================================================== --- stable/11/tests/sys/kern/Makefile Sat Mar 10 03:08:20 2018 (r330730) +++ stable/11/tests/sys/kern/Makefile Sat Mar 10 03:15:44 2018 (r330731) @@ -21,6 +21,7 @@ LIBADD.unix_seqpacket_test+= pthread NETBSD_ATF_TESTS_C+= lockf_test NETBSD_ATF_TESTS_C+= mqueue_test +NETBSD_ATF_TESTS_C+= sysv_test CFLAGS.mqueue_test+= -I${SRCTOP}/tests LIBADD.mqueue_test+= rt From owner-svn-src-all@freebsd.org Sat Mar 10 03:25:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 427E4F44793; Sat, 10 Mar 2018 03:25:00 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E46567F050; Sat, 10 Mar 2018 03:24:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF55723D; Sat, 10 Mar 2018 03:24:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A3OxXL010016; Sat, 10 Mar 2018 03:24:59 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A3Ox3I010015; Sat, 10 Mar 2018 03:24:59 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100324.w2A3Ox3I010015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 03:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330732 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:25:00 -0000 Author: asomers Date: Sat Mar 10 03:24:59 2018 New Revision: 330732 URL: https://svnweb.freebsd.org/changeset/base/330732 Log: MFC r329265, r329384 r329265: Implement .vop_pathconf and .vop_getacl for the .zfs ctldir zfsctl_common_pathconf will report all the same variables that regular ZFS volumes report. zfsctl_common_getacl will report an ACL equivalent to 555, except that you can't read xattrs or edit attributes. Fixes a bug where "ls .zfs" will occasionally print something like: ls: .zfs/.: Operation not supported PR: 225793 Reviewed by: avg Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D14365 r329384: Handle generic pathconf attributes in the .zfs ctldir MFC instructions: change the value of _PC_LINK_MAX to INT_MAX Reported by: jhb X-MFC-With: 329265 Sponsored by: Spectra Logic Corp Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat Mar 10 03:15:44 2018 (r330731) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat Mar 10 03:24:59 2018 (r330732) @@ -80,6 +80,10 @@ #include "zfs_namecheck.h" +/* Common access mode for all virtual directories under the ctldir */ +const u_short zfsctl_ctldir_mode = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | + S_IROTH | S_IXOTH; + /* * "Synthetic" filesystem implementation. */ @@ -496,8 +500,7 @@ zfsctl_common_getattr(vnode_t *vp, vattr_t *vap) vap->va_nblocks = 0; vap->va_seq = 0; vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; - vap->va_mode = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | - S_IROTH | S_IXOTH; + vap->va_mode = zfsctl_ctldir_mode; vap->va_type = VDIR; /* * We live in the now (for atime). @@ -724,6 +727,91 @@ zfsctl_root_vptocnp(struct vop_vptocnp_args *ap) return (0); } +static int +zfsctl_common_pathconf(ap) + struct vop_pathconf_args /* { + struct vnode *a_vp; + int a_name; + int *a_retval; + } */ *ap; +{ + /* + * We care about ACL variables so that user land utilities like ls + * can display them correctly. Since the ctldir's st_dev is set to be + * the same as the parent dataset, we must support all variables that + * it supports. + */ + switch (ap->a_name) { + case _PC_LINK_MAX: + *ap->a_retval = INT_MAX; + return (0); + + case _PC_FILESIZEBITS: + *ap->a_retval = 64; + return (0); + + case _PC_MIN_HOLE_SIZE: + *ap->a_retval = (int)SPA_MINBLOCKSIZE; + return (0); + + case _PC_ACL_EXTENDED: + *ap->a_retval = 0; + return (0); + + case _PC_ACL_NFS4: + *ap->a_retval = 1; + return (0); + + case _PC_ACL_PATH_MAX: + *ap->a_retval = ACL_MAX_ENTRIES; + return (0); + + case _PC_NAME_MAX: + *ap->a_retval = NAME_MAX; + return (0); + + default: + return (vop_stdpathconf(ap)); + } +} + +/** + * Returns a trivial ACL + */ +int +zfsctl_common_getacl(ap) + struct vop_getacl_args /* { + struct vnode *vp; + acl_type_t a_type; + struct acl *a_aclp; + struct ucred *cred; + struct thread *td; + } */ *ap; +{ + int i; + + if (ap->a_type != ACL_TYPE_NFS4) + return (EINVAL); + + acl_nfs4_sync_acl_from_mode(ap->a_aclp, zfsctl_ctldir_mode, 0); + /* + * acl_nfs4_sync_acl_from_mode assumes that the owner can always modify + * attributes. That is not the case for the ctldir, so we must clear + * those bits. We also must clear ACL_READ_NAMED_ATTRS, because xattrs + * aren't supported by the ctldir. + */ + for (i = 0; i < ap->a_aclp->acl_cnt; i++) { + struct acl_entry *entry; + entry = &(ap->a_aclp->acl_entry[i]); + uint32_t old_perm = entry->ae_perm; + entry->ae_perm &= ~(ACL_WRITE_ACL | ACL_WRITE_OWNER | + ACL_WRITE_ATTRIBUTES | ACL_WRITE_NAMED_ATTRS | + ACL_READ_NAMED_ATTRS ); + } + + return (0); +} + static struct vop_vector zfsctl_ops_root = { .vop_default = &default_vnodeops, .vop_open = zfsctl_common_open, @@ -738,6 +826,8 @@ static struct vop_vector zfsctl_ops_root = { .vop_fid = zfsctl_common_fid, .vop_print = zfsctl_common_print, .vop_vptocnp = zfsctl_root_vptocnp, + .vop_pathconf = zfsctl_common_pathconf, + .vop_getacl = zfsctl_common_getacl, }; static int @@ -1059,6 +1149,8 @@ static struct vop_vector zfsctl_ops_snapdir = { .vop_reclaim = zfsctl_common_reclaim, .vop_fid = zfsctl_common_fid, .vop_print = zfsctl_common_print, + .vop_pathconf = zfsctl_common_pathconf, + .vop_getacl = zfsctl_common_getacl, }; static int From owner-svn-src-all@freebsd.org Sat Mar 10 03:31:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3E8DF44E1F; Sat, 10 Mar 2018 03:31:12 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E43E7F3E7; Sat, 10 Mar 2018 03:31:12 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f196.google.com with SMTP id m22so5649226iob.12; Fri, 09 Mar 2018 19:31:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=W0mzS5/37Y9UlVlPRzWhMapLja1jQxNPkIBhXHrvudw=; b=UBDkgrrkMKbVEXd8Dk+ycanxzY6GyKwLQ0vaEMQE3GxSmnt3uaVy75aLxaq84pQqpc esV9T3JUgirnFP+1dPbF+0eSUProJlc0gxU2ZbnucyGca8jX9ZTq01pOqvwE0W2euz44 pnLljlDWhMRkeOxnGtV1/gh6Bmj2AVunGxba7YUianiq7YE/c9PEnmbkCP5jVp+baJO6 XS6leshzH+tK4/+I2N2MjinSgC+lTq5rsMteDKcpEEtHBr0CNr31tKUAXXbZhWJ9zUOc WRRTeOrrrnz0AwGETCDRDvK1q9pjVhtYBcrGT+KshhIZwDQ9WFlgFpjrzQG/X1AVsJHr buKA== X-Gm-Message-State: AElRT7EAm1BEDGkqwb2v1MjsFku8aBRG0L/0RslJGg61XoSeb8cBd3ss Z4RxV1NkcjAgE8ekNkxfspXMs8AO X-Google-Smtp-Source: AG47ELtFpmoFIepBiBrIi8v9aRDHqtstjcJROT9d/QzBua8iIUUmiaoZsDXez0Qhp5mFyg+ZpL7L0w== X-Received: by 10.107.9.138 with SMTP id 10mr739904ioj.257.1520652334990; Fri, 09 Mar 2018 19:25:34 -0800 (PST) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com. [209.85.214.45]) by smtp.gmail.com with ESMTPSA id z84sm98592itf.21.2018.03.09.19.25.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 19:25:34 -0800 (PST) Received: by mail-it0-f45.google.com with SMTP id k79-v6so5214970ita.2; Fri, 09 Mar 2018 19:25:34 -0800 (PST) X-Received: by 10.36.161.2 with SMTP id y2mr236165ite.53.1520652334416; Fri, 09 Mar 2018 19:25:34 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.30.149 with HTTP; Fri, 9 Mar 2018 19:25:33 -0800 (PST) In-Reply-To: References: <201803080947.w289lArk031151@repo.freebsd.org> From: Conrad Meyer Date: Fri, 9 Mar 2018 19:25:33 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r330644 - in head/sys/dev/mlx5: . mlx5_core To: Alan Somers Cc: Hans Petter Selasky , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:31:13 -0000 Hi Alan, I think I fixed it in r330714, if you want to update to that revision. Best, Conrad On Fri, Mar 9, 2018 at 7:14 PM, Alan Somers wrote: > On Thu, Mar 8, 2018 at 2:47 AM, Hans Petter Selasky > wrote: >> >> Author: hselasky >> Date: Thu Mar 8 09:47:09 2018 >> New Revision: 330644 >> URL: https://svnweb.freebsd.org/changeset/base/330644 >> >> Log: >> Updates for PCI and health monitor recovery in mlx5core. >> This patch accumulates the following Linux commits: >> >> mlx5_health.c >> - 78ccb25861d76a8fc5c678d762180e6918834200 >> mlx5_core: Fix wrong name in struct >> - 171bb2c560f45c0427ca3776a4c8f4e26e559400 >> mlx5_core: Update health syndromes >> - 0144a95e2ad53a40c62148f44fb0c1f9d2a0d1e9 >> mlx5_core: Use accessor functions to read from device memory >> - ac6ea6e81a80172612e0c9ef93720f371b198918 >> mlx5_core: Use private health thread for each device >> - fd76ee4da55abb21babfc69310d321b9cb9a32e0 >> mlx5_core: Fix internal error detection conditions >> - 2241007b3d783cbdbaa78c30bdb1994278b6f9b9 >> mlx5: Clear health sick bit when starting health poll >> - 712bfef60912d91033cb25739f7444d5b8d8c59f >> mlx5: Fix version printout in case of health issue >> - 89d44f0a6c732db23b219be708e2fe1e03ee4842 >> mlx5_core: Add pci error handlers to mlx5_core driver >> >> mlx5_cmd.c >> - be87544de8df2b1eb34bcb5e32691287d96f9ec4 >> mlx5_core: Fix async commands return code >> - a31208b1e11df334d443ec8cace7636150bb8ce2 >> mlx5_core: New init and exit flow for mlx5_core >> - 020446e01eebc9dbe7eda038e570ab9c7ab13586 >> mlx5_core: Prepare cmd interface to system errors handling >> - 89d44f0a6c732db23b219be708e2fe1e03ee4842 >> mlx5_core: Add pci error handlers to mlx5_core driver >> - 0d834442cc247c7b3f3bd6019512ae03e96dd99a >> mlx5: Fix teardown errors that happen in pci error handler >> >> mlx5_main.c >> - 5fc7197d3a256d9c5de3134870304b24892a4908 >> mlx5: Add pci shutdown callback >> >> Submitted by: Matthew Finlay >> MFC after: 1 week >> Sponsored by: Mellanox Technologies >> >> Modified: >> > > It looks like this commit broke the build with GCC6. Could you please take > a look? > > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/4790/ > From owner-svn-src-all@freebsd.org Sat Mar 10 03:34:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18733F452F6; Sat, 10 Mar 2018 03:34:29 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B59D47F7F5; Sat, 10 Mar 2018 03:34:28 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFA2E3E3; Sat, 10 Mar 2018 03:34:28 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A3YSJj015320; Sat, 10 Mar 2018 03:34:28 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A3YRVb015307; Sat, 10 Mar 2018 03:34:27 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100334.w2A3YRVb015307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 03:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330733 - in stable/11: cddl/usr.sbin/zfsd etc/mtree lib/libdevdctl sys/geom/eli sys/geom/part tests/sys/geom/class tests/sys/geom/class/eli tests/sys/geom/class/part X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: cddl/usr.sbin/zfsd etc/mtree lib/libdevdctl sys/geom/eli sys/geom/part tests/sys/geom/class tests/sys/geom/class/eli tests/sys/geom/class/part X-SVN-Commit-Revision: 330733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:34:29 -0000 Author: asomers Date: Sat Mar 10 03:34:27 2018 New Revision: 330733 URL: https://svnweb.freebsd.org/changeset/base/330733 Log: MFC r329273, r329275, r329277, r329284, r329344 r329273: geli: append "/eli" to the underlying provider's physical path If the underlying provider's physical path is null, then the geli device's physical path will be, too. Otherwise, it will append "/eli". This will make geli work better with zfsd(8). PR: 224962 Differential Revision: https://reviews.freebsd.org/D13979 r329275: gpart: append partition name to the underlying provider's physical path If the underlying provider's physical path is null, then the gpart device's physical path will be, too. Otherwise, it will append the partition name, such as "/p1" or "/s1/a". This will make gpart work better with zfsd(8). PR: 224965 Differential Revision: https://reviews.freebsd.org/D14010 r329277: Add mtree entry for 329275 X-MFC-With: 329275 Sponsored by: Spectra Logic Corp r329284: zfsd: Allow zfsd to work on any type of GEOM provider cddl/usr.sbin/zfsd/zfsd_event.cc Remove the check for da and ada devices. This way zfsd can work on md, geli, glabel, gstripe, etc devices. geli in particular is useful combined with ZFS. gnop is also useful for simulating drive pulls in the ZFSD test suite. Also, eliminate the DevfsEvent class entirely. Move its responsibilities into GeomEvent. We can get everything we need to know just from listening to GEOM events. lib/libdevdctl/event.cc Fix GeomEvent::DevName for CREATE events. Oddly, the relevant field is named "cdev" for CREATE events but "devname" for disk events. Relnotes: Yes (probably worth mentioning the geli part) Sponsored by: Spectra Logic Corp r329344: Optimize zfsd for the happy case If there are no damaged pools, then ignore all GEOM events. We only use them to fix damaged pools. However, still pay attention to ZFS events. X-MFC-With: 329284 Sponsored by: Spectra Logic Corp Added: stable/11/tests/sys/geom/class/eli/misc_test.sh - copied unchanged from r329273, head/tests/sys/geom/class/eli/misc_test.sh stable/11/tests/sys/geom/class/part/ - copied from r329275, head/tests/sys/geom/class/part/ Modified: stable/11/cddl/usr.sbin/zfsd/case_file.cc stable/11/cddl/usr.sbin/zfsd/case_file.h stable/11/cddl/usr.sbin/zfsd/zfsd.cc stable/11/cddl/usr.sbin/zfsd/zfsd_event.cc stable/11/cddl/usr.sbin/zfsd/zfsd_event.h stable/11/etc/mtree/BSD.tests.dist stable/11/lib/libdevdctl/event.cc stable/11/sys/geom/eli/g_eli.c stable/11/sys/geom/part/g_part.c stable/11/tests/sys/geom/class/Makefile stable/11/tests/sys/geom/class/eli/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/usr.sbin/zfsd/case_file.cc ============================================================================== --- stable/11/cddl/usr.sbin/zfsd/case_file.cc Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/cddl/usr.sbin/zfsd/case_file.cc Sat Mar 10 03:34:27 2018 (r330733) @@ -186,6 +186,12 @@ CaseFile::DeSerialize() free(caseFiles); } +bool +CaseFile::Empty() +{ + return (s_activeCases.empty()); +} + void CaseFile::LogAll() { Modified: stable/11/cddl/usr.sbin/zfsd/case_file.h ============================================================================== --- stable/11/cddl/usr.sbin/zfsd/case_file.h Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/cddl/usr.sbin/zfsd/case_file.h Sat Mar 10 03:34:27 2018 (r330733) @@ -135,6 +135,11 @@ class CaseFile (public) static void DeSerialize(); /** + * \brief returns true if there are no CaseFiles + */ + static bool Empty(); + + /** * \brief Emit syslog data on all active CaseFile%%s in the system. */ static void LogAll(); Modified: stable/11/cddl/usr.sbin/zfsd/zfsd.cc ============================================================================== --- stable/11/cddl/usr.sbin/zfsd/zfsd.cc Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/cddl/usr.sbin/zfsd/zfsd.cc Sat Mar 10 03:34:27 2018 (r330733) @@ -98,7 +98,6 @@ int ZfsDaemon::s_signalPipeFD[2]; bool ZfsDaemon::s_systemRescanRequested(false); EventFactory::Record ZfsDaemon::s_registryEntries[] = { - { Event::NOTIFY, "DEVFS", &DevfsEvent::Builder }, { Event::NOTIFY, "GEOM", &GeomEvent::Builder }, { Event::NOTIFY, "ZFS", &ZfsEvent::Builder } }; Modified: stable/11/cddl/usr.sbin/zfsd/zfsd_event.cc ============================================================================== --- stable/11/cddl/usr.sbin/zfsd/zfsd_event.cc Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/cddl/usr.sbin/zfsd/zfsd_event.cc Sat Mar 10 03:34:27 2018 (r330733) @@ -76,113 +76,42 @@ using std::stringstream; /*=========================== Class Implementations ==========================*/ -/*-------------------------------- DevfsEvent --------------------------------*/ +/*-------------------------------- GeomEvent --------------------------------*/ -//- DevfsEvent Static Public Methods ------------------------------------------- +//- GeomEvent Static Public Methods ------------------------------------------- Event * -DevfsEvent::Builder(Event::Type type, - NVPairMap &nvPairs, - const string &eventString) +GeomEvent::Builder(Event::Type type, + NVPairMap &nvPairs, + const string &eventString) { - return (new DevfsEvent(type, nvPairs, eventString)); + return (new GeomEvent(type, nvPairs, eventString)); } -//- DevfsEvent Static Protected Methods ---------------------------------------- -nvlist_t * -DevfsEvent::ReadLabel(int devFd, bool &inUse, bool °raded) -{ - pool_state_t poolState; - char *poolName; - boolean_t b_inuse; - int nlabels; - - inUse = false; - degraded = false; - poolName = NULL; - if (zpool_in_use(g_zfsHandle, devFd, &poolState, - &poolName, &b_inuse) == 0) { - nvlist_t *devLabel = NULL; - - inUse = b_inuse == B_TRUE; - if (poolName != NULL) - free(poolName); - - nlabels = zpool_read_all_labels(devFd, &devLabel); - /* - * If we find a disk with fewer than the maximum number of - * labels, it might be the whole disk of a partitioned disk - * where ZFS resides on a partition. In that case, we should do - * nothing and wait for the partition to appear. Or, the disk - * might be damaged. In that case, zfsd should do nothing and - * wait for the sysadmin to decide. - */ - if (nlabels != VDEV_LABELS || devLabel == NULL) { - nvlist_free(devLabel); - return (NULL); - } - - try { - Vdev vdev(devLabel); - degraded = vdev.State() != VDEV_STATE_HEALTHY; - return (devLabel); - } catch (ZfsdException &exp) { - string devName = fdevname(devFd); - string devPath = _PATH_DEV + devName; - string context("DevfsEvent::ReadLabel: " - + devPath + ": "); - - exp.GetString().insert(0, context); - exp.Log(); - nvlist_free(devLabel); - } - } - return (NULL); -} - -bool -DevfsEvent::OnlineByLabel(const string &devPath, const string& physPath, - nvlist_t *devConfig) -{ - try { - /* - * A device with ZFS label information has been - * inserted. If it matches a device for which we - * have a case, see if we can solve that case. - */ - syslog(LOG_INFO, "Interrogating VDEV label for %s\n", - devPath.c_str()); - Vdev vdev(devConfig); - CaseFile *caseFile(CaseFile::Find(vdev.PoolGUID(), - vdev.GUID())); - if (caseFile != NULL) - return (caseFile->ReEvaluate(devPath, physPath, &vdev)); - - } catch (ZfsdException &exp) { - string context("DevfsEvent::OnlineByLabel: " + devPath + ": "); - - exp.GetString().insert(0, context); - exp.Log(); - } - return (false); -} - -//- DevfsEvent Virtual Public Methods ------------------------------------------ +//- GeomEvent Virtual Public Methods ------------------------------------------ Event * -DevfsEvent::DeepCopy() const +GeomEvent::DeepCopy() const { - return (new DevfsEvent(*this)); + return (new GeomEvent(*this)); } - + bool -DevfsEvent::Process() const +GeomEvent::Process() const { /* - * We are only concerned with newly discovered - * devices that can be ZFS vdevs. + * We only use GEOM events to repair damaged pools. So return early if + * there are no damaged pools */ - if (Value("type") != "CREATE" || !IsDiskDev()) + if (CaseFile::Empty()) return (false); + /* + * We are only concerned with arrivals and physical path changes, + * because those can be used to satisfy online and autoreplace + * operations + */ + if (Value("type") != "GEOM::physpath" && Value("type") != "CREATE") + return (false); + /* Log the event since it is of interest. */ Log(LOG_INFO); @@ -199,7 +128,7 @@ DevfsEvent::Process() const nvlist_t *devLabel(ReadLabel(devFd, inUse, degraded)); string physPath; - bool havePhysPath(PhysicalPath(physPath)); + bool havePhysPath(PhysicalPath(physPath)); string devName; DevName(devName); @@ -211,8 +140,8 @@ DevfsEvent::Process() const syslog(LOG_INFO, "%s is marked degraded. Ignoring " "as a replace by physical path candidate.\n", devName.c_str()); - } else if (havePhysPath && IsWholeDev()) { - /* + } else if (havePhysPath) { + /* * TODO: attempt to resolve events using every casefile * that matches this physpath */ @@ -227,93 +156,97 @@ DevfsEvent::Process() const caseFile->ReEvaluate(devPath, physPath, /*vdev*/NULL); } } - if (devLabel != NULL) - nvlist_free(devLabel); return (false); } -//- DevfsEvent Protected Methods ----------------------------------------------- -DevfsEvent::DevfsEvent(Event::Type type, NVPairMap &nvpairs, +//- GeomEvent Protected Methods ----------------------------------------------- +GeomEvent::GeomEvent(Event::Type type, NVPairMap &nvpairs, const string &eventString) - : DevdCtl::DevfsEvent(type, nvpairs, eventString) + : DevdCtl::GeomEvent(type, nvpairs, eventString) { } -DevfsEvent::DevfsEvent(const DevfsEvent &src) - : DevdCtl::DevfsEvent::DevfsEvent(src) +GeomEvent::GeomEvent(const GeomEvent &src) + : DevdCtl::GeomEvent::GeomEvent(src) { } -/*-------------------------------- GeomEvent --------------------------------*/ - -//- GeomEvent Static Public Methods ------------------------------------------- -Event * -GeomEvent::Builder(Event::Type type, - NVPairMap &nvPairs, - const string &eventString) +nvlist_t * +GeomEvent::ReadLabel(int devFd, bool &inUse, bool °raded) { - return (new GeomEvent(type, nvPairs, eventString)); -} + pool_state_t poolState; + char *poolName; + boolean_t b_inuse; + int nlabels; -//- GeomEvent Virtual Public Methods ------------------------------------------ -Event * -GeomEvent::DeepCopy() const -{ - return (new GeomEvent(*this)); -} - -bool -GeomEvent::Process() const -{ - /* - * We are only concerned with physical path changes, because those can - * be used to satisfy autoreplace operations - */ - if (Value("type") != "GEOM::physpath" || !IsDiskDev()) - return (false); + inUse = false; + degraded = false; + poolName = NULL; + if (zpool_in_use(g_zfsHandle, devFd, &poolState, + &poolName, &b_inuse) == 0) { + nvlist_t *devLabel = NULL; - /* Log the event since it is of interest. */ - Log(LOG_INFO); + inUse = b_inuse == B_TRUE; + if (poolName != NULL) + free(poolName); - string devPath; - if (!DevPath(devPath)) - return (false); + nlabels = zpool_read_all_labels(devFd, &devLabel); + /* + * If we find a disk with fewer than the maximum number of + * labels, it might be the whole disk of a partitioned disk + * where ZFS resides on a partition. In that case, we should do + * nothing and wait for the partition to appear. Or, the disk + * might be damaged. In that case, zfsd should do nothing and + * wait for the sysadmin to decide. + */ + if (nlabels != VDEV_LABELS || devLabel == NULL) { + nvlist_free(devLabel); + return (NULL); + } - string physPath; - bool havePhysPath(PhysicalPath(physPath)); + try { + Vdev vdev(devLabel); + degraded = vdev.State() != VDEV_STATE_HEALTHY; + return (devLabel); + } catch (ZfsdException &exp) { + string devName = fdevname(devFd); + string devPath = _PATH_DEV + devName; + string context("GeomEvent::ReadLabel: " + + devPath + ": "); - string devName; - DevName(devName); - - if (havePhysPath) { - /* - * TODO: attempt to resolve events using every casefile - * that matches this physpath - */ - CaseFile *caseFile(CaseFile::Find(physPath)); - if (caseFile != NULL) { - syslog(LOG_INFO, - "Found CaseFile(%s:%s:%s) - ReEvaluating\n", - caseFile->PoolGUIDString().c_str(), - caseFile->VdevGUIDString().c_str(), - zpool_state_to_name(caseFile->VdevState(), - VDEV_AUX_NONE)); - caseFile->ReEvaluate(devPath, physPath, /*vdev*/NULL); + exp.GetString().insert(0, context); + exp.Log(); + nvlist_free(devLabel); } } - return (false); + return (NULL); } -//- GeomEvent Protected Methods ----------------------------------------------- -GeomEvent::GeomEvent(Event::Type type, NVPairMap &nvpairs, - const string &eventString) - : DevdCtl::GeomEvent(type, nvpairs, eventString) +bool +GeomEvent::OnlineByLabel(const string &devPath, const string& physPath, + nvlist_t *devConfig) { -} + try { + /* + * A device with ZFS label information has been + * inserted. If it matches a device for which we + * have a case, see if we can solve that case. + */ + syslog(LOG_INFO, "Interrogating VDEV label for %s\n", + devPath.c_str()); + Vdev vdev(devConfig); + CaseFile *caseFile(CaseFile::Find(vdev.PoolGUID(), + vdev.GUID())); + if (caseFile != NULL) + return (caseFile->ReEvaluate(devPath, physPath, &vdev)); -GeomEvent::GeomEvent(const GeomEvent &src) - : DevdCtl::GeomEvent::GeomEvent(src) -{ + } catch (ZfsdException &exp) { + string context("GeomEvent::OnlineByLabel: " + devPath + ": "); + + exp.GetString().insert(0, context); + exp.Log(); + } + return (false); } Modified: stable/11/cddl/usr.sbin/zfsd/zfsd_event.h ============================================================================== --- stable/11/cddl/usr.sbin/zfsd/zfsd_event.h Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/cddl/usr.sbin/zfsd/zfsd_event.h Sat Mar 10 03:34:27 2018 (r330733) @@ -60,63 +60,6 @@ typedef struct zpool_handle zpool_handle_t; struct nvlist; typedef struct nvlist nvlist_t; -/*============================= Class Definitions ============================*/ -/*-------------------------------- DevfsEvent --------------------------------*/ -class DevfsEvent : public DevdCtl::DevfsEvent -{ -public: - /** Specialized DevdCtlEvent object factory for Devfs events. */ - static BuildMethod Builder; - - virtual DevdCtl::Event *DeepCopy() const; - - /** - * Interpret and perform any actions necessary to - * consume the event. - * \return True if this event should be queued for later reevaluation - */ - virtual bool Process() const; - -protected: - /** - * \brief Read and return label information for a device. - * - * \param devFd The device from which to read ZFS label information. - * \param inUse The device is part of an active or potentially - * active configuration. - * \param degraded The device label indicates the vdev is not healthy. - * - * \return If label information is available, an nvlist describing - * the vdev configuraiton found on the device specified by - * devFd. Otherwise NULL. - */ - static nvlist_t *ReadLabel(int devFd, bool &inUse, bool °raded); - - /** - * Attempt to match the ZFS labeled device at devPath with an active - * CaseFile for a missing vdev. If a CaseFile is found, attempt - * to re-integrate the device with its pool. - * - * \param devPath The devfs path to the potential leaf vdev. - * \param physPath The physical path string reported by the device - * at devPath. - * \param devConfig The ZFS label information found on the device - * at devPath. - * - * \return true if the event that caused the online action can - * be considered consumed. - */ - static bool OnlineByLabel(const string &devPath, - const string& physPath, - nvlist_t *devConfig); - - /** DeepCopy Constructor. */ - DevfsEvent(const DevfsEvent &src); - - /** Constructor */ - DevfsEvent(Type, DevdCtl::NVPairMap &, const string &); -}; - /*--------------------------------- ZfsEvent ---------------------------------*/ class ZfsEvent : public DevdCtl::ZfsEvent { @@ -164,5 +107,38 @@ class GeomEvent : public DevdCtl::GeomEvent (protected /** Constructor */ GeomEvent(Type, DevdCtl::NVPairMap &, const string &); + + /** + * Attempt to match the ZFS labeled device at devPath with an active + * CaseFile for a missing vdev. If a CaseFile is found, attempt + * to re-integrate the device with its pool. + * + * \param devPath The devfs path to the potential leaf vdev. + * \param physPath The physical path string reported by the device + * at devPath. + * \param devConfig The ZFS label information found on the device + * at devPath. + * + * \return true if the event that caused the online action can + * be considered consumed. + */ + static bool OnlineByLabel(const string &devPath, + const string& physPath, + nvlist_t *devConfig); + + /** + * \brief Read and return label information for a device. + * + * \param devFd The device from which to read ZFS label information. + * \param inUse The device is part of an active or potentially + * active configuration. + * \param degraded The device label indicates the vdev is not healthy. + * + * \return If label information is available, an nvlist describing + * the vdev configuraiton found on the device specified by + * devFd. Otherwise NULL. + */ + static nvlist_t *ReadLabel(int devFd, bool &inUse, bool °raded); + }; #endif /*_ZFSD_EVENT_H_ */ Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/etc/mtree/BSD.tests.dist Sat Mar 10 03:34:27 2018 (r330733) @@ -440,6 +440,8 @@ .. nop .. + part + .. raid3 .. shsec Modified: stable/11/lib/libdevdctl/event.cc ============================================================================== --- stable/11/lib/libdevdctl/event.cc Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/lib/libdevdctl/event.cc Sat Mar 10 03:34:27 2018 (r330733) @@ -542,7 +542,10 @@ GeomEvent::DeepCopy() const bool GeomEvent::DevName(std::string &name) const { - name = Value("devname"); + if (Value("subsystem") == "disk") + name = Value("devname"); + else + name = Value("cdev"); return (!name.empty()); } Modified: stable/11/sys/geom/eli/g_eli.c ============================================================================== --- stable/11/sys/geom/eli/g_eli.c Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/sys/geom/eli/g_eli.c Sat Mar 10 03:34:27 2018 (r330733) @@ -210,6 +210,16 @@ g_eli_crypto_rerun(struct cryptop *crp) return (error); } +static void +g_eli_getattr_done(struct bio *bp) +{ + if (bp->bio_error == 0 && + !strcmp(bp->bio_attribute, "GEOM::physpath")) { + strlcat(bp->bio_data, "/eli", bp->bio_length); + } + g_std_done(bp); +} + /* * The function is called afer reading encrypted data from the provider. * @@ -378,7 +388,10 @@ g_eli_start(struct bio *bp) case BIO_FLUSH: case BIO_DELETE: case BIO_ZONE: - cbp->bio_done = g_std_done; + if (bp->bio_cmd == BIO_GETATTR) + cbp->bio_done = g_eli_getattr_done; + else + cbp->bio_done = g_std_done; cp = LIST_FIRST(&sc->sc_geom->consumer); cbp->bio_to = cp->provider; G_ELI_LOGREQ(2, cbp, "Sending request."); Modified: stable/11/sys/geom/part/g_part.c ============================================================================== --- stable/11/sys/geom/part/g_part.c Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/sys/geom/part/g_part.c Sat Mar 10 03:34:27 2018 (r330733) @@ -268,6 +268,35 @@ g_part_geometry(struct g_part_table *table, struct g_c } } +static void +g_part_get_physpath_done(struct bio *bp) +{ + struct g_geom *gp; + struct g_part_entry *entry; + struct g_part_table *table; + struct g_provider *pp; + struct bio *pbp; + + pbp = bp->bio_parent; + pp = pbp->bio_to; + gp = pp->geom; + table = gp->softc; + entry = pp->private; + + if (bp->bio_error == 0) { + char *end; + size_t len, remainder; + len = strlcat(bp->bio_data, "/", bp->bio_length); + if (len < bp->bio_length) { + end = bp->bio_data + len; + remainder = bp->bio_length - len; + G_PART_NAME(table, entry, end, remainder); + } + } + g_std_done(bp); +} + + #define DPRINTF(...) if (bootverbose) { \ printf("GEOM_PART: " __VA_ARGS__); \ } @@ -2157,6 +2186,7 @@ g_part_start(struct bio *bp) struct g_part_table *table; struct g_kerneldump *gkd; struct g_provider *pp; + void (*done_func)(struct bio *) = g_std_done; char buf[64]; pp = bp->bio_to; @@ -2209,6 +2239,10 @@ g_part_start(struct bio *bp) if (g_handleattr_str(bp, "PART::type", G_PART_TYPE(table, entry, buf, sizeof(buf)))) return; + if (!strcmp("GEOM::physpath", bp->bio_attribute)) { + done_func = g_part_get_physpath_done; + break; + } if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) { /* * Check that the partition is suitable for kernel @@ -2245,7 +2279,7 @@ g_part_start(struct bio *bp) g_io_deliver(bp, ENOMEM); return; } - bp2->bio_done = g_std_done; + bp2->bio_done = done_func; g_io_request(bp2, cp); } Modified: stable/11/tests/sys/geom/class/Makefile ============================================================================== --- stable/11/tests/sys/geom/class/Makefile Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/tests/sys/geom/class/Makefile Sat Mar 10 03:34:27 2018 (r330733) @@ -7,10 +7,9 @@ TESTSDIR= ${TESTSBASE}/sys/geom/class TESTS_SUBDIRS+= concat TESTS_SUBDIRS+= eli TESTS_SUBDIRS+= gate -# XXX: might not work due to geom(4) changes; more investigation's needed -#TESTS_SUBDIRS+= gpt TESTS_SUBDIRS+= mirror TESTS_SUBDIRS+= nop +TESTS_SUBDIRS+= part TESTS_SUBDIRS+= raid3 TESTS_SUBDIRS+= shsec TESTS_SUBDIRS+= stripe Modified: stable/11/tests/sys/geom/class/eli/Makefile ============================================================================== --- stable/11/tests/sys/geom/class/eli/Makefile Sat Mar 10 03:24:59 2018 (r330732) +++ stable/11/tests/sys/geom/class/eli/Makefile Sat Mar 10 03:34:27 2018 (r330733) @@ -14,6 +14,7 @@ ATF_TESTS_SH+= detach_test ATF_TESTS_SH+= init_test ATF_TESTS_SH+= integrity_test ATF_TESTS_SH+= kill_test +ATF_TESTS_SH+= misc_test ATF_TESTS_SH+= onetime_test ATF_TESTS_SH+= resize_test ATF_TESTS_SH+= setkey_test Copied: stable/11/tests/sys/geom/class/eli/misc_test.sh (from r329273, head/tests/sys/geom/class/eli/misc_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tests/sys/geom/class/eli/misc_test.sh Sat Mar 10 03:34:27 2018 (r330733, copy of r329273, head/tests/sys/geom/class/eli/misc_test.sh) @@ -0,0 +1,177 @@ +# Copyright (c) 2018 Alan Somers +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case preserve_props cleanup +preserve_props_head() +{ + atf_set "descr" "geli should preserve basic GEOM properties" + atf_set "require.user" "root" + atf_set "timeout" 15 +} +preserve_props_body() +{ + . $(atf_get_srcdir)/conf.sh + md=$(attach_md -s1m) + atf_check geli onetime /dev/${md} + md_secsize=$(diskinfo ${md} | cut -wf 2) + md_stripesize=$(diskinfo ${md} | cut -wf 5) + eli_secsize=$(diskinfo ${md}.eli | cut -wf 2) + eli_stripesize=$(diskinfo ${md}.eli | cut -wf 5) + atf_check_equal "$md_secsize" "$eli_secsize" + atf_check_equal "$md_stripesize" "$eli_stripesize" +} +preserve_props_cleanup() +{ + . $(atf_get_srcdir)/conf.sh + geli_test_cleanup +} + +atf_test_case preserve_disk_props cleanup +preserve_disk_props_head() +{ + atf_set "descr" "geli should preserve properties for disks" + atf_set "require.user" "root" + atf_set "require.config" "disks" + atf_set "timeout" 15 +} +preserve_disk_props_body() +{ + . $(atf_get_srcdir)/conf.sh + disks=`atf_config_get disks` + disk=${disks%% *} + if [ -z "$disk" ]; then + atf_skip "Must define disks (see tests(7))" + fi + atf_check geli onetime ${disk} + + disk_ident=$(diskinfo -s ${disk}) + disk_descr=$(diskinfo -v ${disk} | awk '/Disk descr/ {print $1}') + disk_rotrate=$(diskinfo -v ${disk} | awk '/Rotation rate/ {print $1}') + disk_zonemode=$(diskinfo -v ${disk} | awk '/Zone Mode/ {print $1}') + eli_ident=$(diskinfo -s ${disk}.eli) + eli_descr=$(diskinfo -v ${disk}.eli | awk '/Disk descr/ {print $1}') + eli_rotrate=$(diskinfo -v ${disk}.eli | awk '/Rotation/ {print $1}') + eli_zonemode=$(diskinfo -v ${disk}.eli | awk '/Zone Mode/ {print $1}') + atf_check_equal "$disk_ident" "$eli_ident" + atf_check_equal "$disk_descr" "$eli_descr" + atf_check_equal "$disk_rotrate" "$eli_rotrate" + atf_check_equal "$disk_zonemode" "$eli_zonemode" +} +preserve_disk_props_cleanup() +{ + . $(atf_get_srcdir)/conf.sh + disk_cleanup + geli_test_cleanup +} + +atf_test_case physpath cleanup +physpath_head() +{ + atf_set "descr" "geli should append /eli to the underlying device's physical path" + atf_set "require.user" "root" + atf_set "timeout" 15 +} +physpath_body() +{ + . $(atf_get_srcdir)/conf.sh + load_gnop + + md=$(attach_md -s1m) + # If the underlying device has no physical path, then geli should not + # create one. + atf_check -o empty -e ignore diskinfo -p $md + atf_check -s exit:0 geli onetime $md + atf_check -o empty -e ignore diskinfo -p $md.eli + atf_check -s exit:0 geli kill $md + + # If the underlying device does have a physical path, then geli should + # append "/eli" + physpath="some/physical/path" + atf_check gnop create -z $physpath ${md} + atf_check -s exit:0 geli onetime $md.nop + atf_check -o match:"^${physpath}/eli$" diskinfo -p $md.nop.eli +} +physpath_cleanup() +{ + . $(atf_get_srcdir)/conf.sh + + if [ -f "$TEST_MDS_FILE" ]; then + while read md; do + [ -c /dev/${md}.nop.eli ] && \ + geli detach $md.nop.eli 2>/dev/null + [ -c /dev/${md}.nop ] && \ + gnop destroy -f $md.nop 2>/dev/null + [ -c /dev/${md}.eli ] && \ + geli detach $md.eli 2>/dev/null + mdconfig -d -u $md 2>/dev/null + done < $TEST_MDS_FILE + fi + true +} + +atf_init_test_cases() +{ + atf_add_test_case physpath + atf_add_test_case preserve_props + atf_add_test_case preserve_disk_props +} + + +common_cleanup() +{ + + if [ -f "$MD_DEVS" ]; then + while read test_md; do + gnop destroy -f ${test_md}.nop 2>/dev/null + mdconfig -d -u $test_md 2>/dev/null + done < $MD_DEVS + rm $MD_DEVS + fi + + if [ -f "$PLAINFILES" ]; then + while read f; do + rm -f ${f} + done < ${PLAINFILES} + rm ${PLAINFILES} + fi + true +} + +disk_cleanup() +{ + disks=`atf_config_get disks` + disk=${disks%% *} + if [ -n "$disk" ]; then + geli kill ${disk} 2>/dev/null + fi +} + +load_gnop() +{ + if ! kldstat -q -m g_nop; then + geom nop load || atf_skip "could not load module for geom nop" + fi +} From owner-svn-src-all@freebsd.org Sat Mar 10 03:38:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 393BAF458B2; Sat, 10 Mar 2018 03:38:52 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x231.google.com (mail-lf0-x231.google.com [IPv6:2a00:1450:4010:c07::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 733877FAF2; Sat, 10 Mar 2018 03:38:51 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x231.google.com with SMTP id m69-v6so15836084lfe.8; Fri, 09 Mar 2018 19:38:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WikMZxDtgGz/WPYAwp7PIqaLkyc0FK02vjRYdZfc98A=; b=FEHcVTXMFqr0EHzZjEGP4c3mMdvdF7anohUQeqSayZxITVdi7XNhJtWGd3PFXa5KKT pVdJiUUofOVWIMOi8IueocZoZhgYV7ED8bBlJNwx5y9bqD2bxXG4y3/UQuoWaMK4llVg rhz6LTPgBZeKq9Wm6w5I/gyoiHagbg9RHdfDkWjR/e/kfNhxgZRQ8AaLMP4sE+Aw8dpQ 5oSXD44f4ITCj20jtEOMkm+STQ9bSj2rn1J7WhrjKFfREEU7vda0ZDjadGxRLzbzsKfL 5drx+zT1BfHvygSZAAenLi/Ba2GKxuh4hhqcSWGX9rzpr7hDUuyx62FYa/rgpQfCmyhh HnvQ== 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=WikMZxDtgGz/WPYAwp7PIqaLkyc0FK02vjRYdZfc98A=; b=StHbu8h22xhntjUCjnLGYxlXj6prf34oW4d9qer6v6VehuFKtxtej+NcWu9OXykx+L GCpqCBV0F3yBu50Y3J14AVm/OqXftQWYf4bj7er74AO7zLCWnWc3BAN2FHNDBaViPjJ1 RmRW3GbuP9G5a0fqNzVooGcmxtnkoM1v/1xImyNQKP/6QzLrCXzmoz4KjirY9Ii2RRSR pM9Ac++GUEAq3JyRXzUE5jPpRVprAT5fFTFeAStfMHPAjtQyNOt0aVI8zM5k8rBQZvN+ ZQs238RTkBgUbe9/eURXy6rOm4Q8DlhZfeFXIcbPTU4AFhDTRZNKl2NNPuSd65PjKLRb xFPg== X-Gm-Message-State: AElRT7EJB2uGZ7Y+nDq8YdY6HB5Ru0nbwP7V7fPOWEcWuYldWQ9DOSQW bbi5xO6RRJbxwvgxt2S0tWeguVM2LoalDfIZPgc= X-Google-Smtp-Source: AG47ELvtJQHL0vFtMLaO5DuGRUph6t5tMTffsr4bnxSsCOHJwImTNBFLDiXjkzzc3thTO4ITu2BTbfuvyDrHTbJD8xA= X-Received: by 2002:a19:505c:: with SMTP id z28-v6mr424807lfj.34.1520653129729; Fri, 09 Mar 2018 19:38:49 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.2.195 with HTTP; Fri, 9 Mar 2018 19:38:49 -0800 (PST) In-Reply-To: References: <201803080947.w289lArk031151@repo.freebsd.org> From: Alan Somers Date: Fri, 9 Mar 2018 20:38:49 -0700 X-Google-Sender-Auth: ozeXgw8Y0mI_Z-g5wPcNJ3IaJXQ Message-ID: Subject: Re: svn commit: r330644 - in head/sys/dev/mlx5: . mlx5_core To: "Conrad E. Meyer" Cc: Hans Petter Selasky , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:38:52 -0000 Yeah, looks like it's working now. Thanks. On Fri, Mar 9, 2018 at 8:25 PM, Conrad Meyer wrote: > Hi Alan, > > I think I fixed it in r330714, if you want to update to that revision. > > Best, > Conrad > > On Fri, Mar 9, 2018 at 7:14 PM, Alan Somers wrote: > > On Thu, Mar 8, 2018 at 2:47 AM, Hans Petter Selasky < > hselasky@freebsd.org> > > wrote: > >> > >> Author: hselasky > >> Date: Thu Mar 8 09:47:09 2018 > >> New Revision: 330644 > >> URL: https://svnweb.freebsd.org/changeset/base/330644 > >> > >> Log: > >> Updates for PCI and health monitor recovery in mlx5core. > >> This patch accumulates the following Linux commits: > >> > >> mlx5_health.c > >> - 78ccb25861d76a8fc5c678d762180e6918834200 > >> mlx5_core: Fix wrong name in struct > >> - 171bb2c560f45c0427ca3776a4c8f4e26e559400 > >> mlx5_core: Update health syndromes > >> - 0144a95e2ad53a40c62148f44fb0c1f9d2a0d1e9 > >> mlx5_core: Use accessor functions to read from device memory > >> - ac6ea6e81a80172612e0c9ef93720f371b198918 > >> mlx5_core: Use private health thread for each device > >> - fd76ee4da55abb21babfc69310d321b9cb9a32e0 > >> mlx5_core: Fix internal error detection conditions > >> - 2241007b3d783cbdbaa78c30bdb1994278b6f9b9 > >> mlx5: Clear health sick bit when starting health poll > >> - 712bfef60912d91033cb25739f7444d5b8d8c59f > >> mlx5: Fix version printout in case of health issue > >> - 89d44f0a6c732db23b219be708e2fe1e03ee4842 > >> mlx5_core: Add pci error handlers to mlx5_core driver > >> > >> mlx5_cmd.c > >> - be87544de8df2b1eb34bcb5e32691287d96f9ec4 > >> mlx5_core: Fix async commands return code > >> - a31208b1e11df334d443ec8cace7636150bb8ce2 > >> mlx5_core: New init and exit flow for mlx5_core > >> - 020446e01eebc9dbe7eda038e570ab9c7ab13586 > >> mlx5_core: Prepare cmd interface to system errors handling > >> - 89d44f0a6c732db23b219be708e2fe1e03ee4842 > >> mlx5_core: Add pci error handlers to mlx5_core driver > >> - 0d834442cc247c7b3f3bd6019512ae03e96dd99a > >> mlx5: Fix teardown errors that happen in pci error handler > >> > >> mlx5_main.c > >> - 5fc7197d3a256d9c5de3134870304b24892a4908 > >> mlx5: Add pci shutdown callback > >> > >> Submitted by: Matthew Finlay > >> MFC after: 1 week > >> Sponsored by: Mellanox Technologies > >> > >> Modified: > >> > > > > It looks like this commit broke the build with GCC6. Could you please > take > > a look? > > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/4790/ > > > From owner-svn-src-all@freebsd.org Sat Mar 10 03:39:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D3FBF459F2; Sat, 10 Mar 2018 03:39:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 371837FC6F; Sat, 10 Mar 2018 03:39:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31F3B40B; Sat, 10 Mar 2018 03:39:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A3doFw015573; Sat, 10 Mar 2018 03:39:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A3dos4015572; Sat, 10 Mar 2018 03:39:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100339.w2A3dos4015572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 03:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330734 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:39:50 -0000 Author: asomers Date: Sat Mar 10 03:39:49 2018 New Revision: 330734 URL: https://svnweb.freebsd.org/changeset/base/330734 Log: MFC r329412: zfs: fix formatting in a log statement Submitted by: Dave Baukus Sponsored by: Spectra Logic Corp Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Mar 10 03:34:27 2018 (r330733) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Mar 10 03:39:49 2018 (r330734) @@ -239,7 +239,7 @@ vdev_geom_attach(struct g_provider *pp, vdev_t *vd, bo } error = g_access(cp, 1, 0, 1); if (error != 0) { - ZFS_LOG(1, "%s(%d): g_access failed: %d", __func__, + ZFS_LOG(1, "%s(%d): g_access failed: %d\n", __func__, __LINE__, error); vdev_geom_detach(cp, B_FALSE); return (NULL); From owner-svn-src-all@freebsd.org Sat Mar 10 03:47:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5394EF46458; Sat, 10 Mar 2018 03:47:20 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C090380288; Sat, 10 Mar 2018 03:47:19 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w2A3l6WM069900 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 10 Mar 2018 04:47:07 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jhb@FreeBSD.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w2A3kvkb069422 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 10 Mar 2018 10:46:57 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r330711 - head/sbin/sysctl To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803092337.w29NbJSX093826@repo.freebsd.org> From: Eugene Grosbein Message-ID: <5AA3552D.5080203@grosbein.net> Date: Sat, 10 Mar 2018 10:46:53 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201803092337.w29NbJSX093826@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 03:47:20 -0000 10.03.2018 6:37, John Baldwin wrote: > Author: jhb > Date: Fri Mar 9 23:37:19 2018 > New Revision: 330711 > URL: https://svnweb.freebsd.org/changeset/base/330711 > > Log: > Permit sysctl(8) to set an array of numeric values for a single node. > > Most sysctl nodes only return a single value, but some nodes return an > array of values (e.g. kern.cp_time). sysctl(8) understand how to display > the values of a node that returns multiple values (it prints out each > numeric value separated by spaces). However, until now sysctl(8) has > only been able to set sysctl nodes to a single value. This change > allows sysctl to accept a new value for a numeric sysctl node that contains > multiple values separated by either spaces or commas. sysctl(8) parses > this list into an array of values and passes the array as the "new" value > to sysctl(2). Note well: we already have some examples of complex sysctl comma-separated "list" values such as: security.mac.portacl.rules=uid:53:tcp:53,uid:53:udp:53 From owner-svn-src-all@freebsd.org Sat Mar 10 04:02:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7E47F47889; Sat, 10 Mar 2018 04:02:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97BC080E79; Sat, 10 Mar 2018 04:02:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 929EA8FF; Sat, 10 Mar 2018 04:02:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A42p88029893; Sat, 10 Mar 2018 04:02:51 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A42pVA029892; Sat, 10 Mar 2018 04:02:51 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100402.w2A42pVA029892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 04:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330735 - stable/10/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/10/cddl/contrib/opensolaris/cmd/zpool X-SVN-Commit-Revision: 330735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 04:02:52 -0000 Author: asomers Date: Sat Mar 10 04:02:51 2018 New Revision: 330735 URL: https://svnweb.freebsd.org/changeset/base/330735 Log: MFC r329067: Fix "zpool add" crash when a replacing vdev has a spare child Fix an assertion in zpool that causes a crash when running any "zpool add" command on a spare that contains a replacing vdev with a spare child. This likely affects Illumos, too. PR: 225546 Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D14138 Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat Mar 10 03:39:49 2018 (r330734) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat Mar 10 04:02:51 2018 (r330735) @@ -684,6 +684,21 @@ get_replication(nvlist_t *nvroot, boolean_t fatal) verify(nvlist_lookup_string(cnv, ZPOOL_CONFIG_TYPE, &childtype) == 0); + if (strcmp(childtype, + VDEV_TYPE_SPARE) == 0) { + /* We have a replacing vdev with + * a spare child. Get the first + * real child of the spare + */ + verify( + nvlist_lookup_nvlist_array( + cnv, + ZPOOL_CONFIG_CHILDREN, + &rchild, + &rchildren) == 0); + assert(rchildren >= 2); + cnv = rchild[0]; + } } verify(nvlist_lookup_string(cnv, From owner-svn-src-all@freebsd.org Sat Mar 10 04:10:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8AFEF483E0; Sat, 10 Mar 2018 04:10:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D7A48128E; Sat, 10 Mar 2018 04:10:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 885BD93E; Sat, 10 Mar 2018 04:10:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A4AvZG032409; Sat, 10 Mar 2018 04:10:57 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A4AvTc032408; Sat, 10 Mar 2018 04:10:57 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100410.w2A4AvTc032408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 04:10:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330736 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 04:10:58 -0000 Author: asomers Date: Sat Mar 10 04:10:57 2018 New Revision: 330736 URL: https://svnweb.freebsd.org/changeset/base/330736 Log: MFC r329265, r329384 r329265: Implement .vop_pathconf and .vop_getacl for the .zfs ctldir zfsctl_common_pathconf will report all the same variables that regular ZFS volumes report. zfsctl_common_getacl will report an ACL equivalent to 555, except that you can't read xattrs or edit attributes. Fixes a bug where "ls .zfs" will occasionally print something like: ls: .zfs/.: Operation not supported PR: 225793 Reviewed by: avg Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D14365 r329384: Handle generic pathconf attributes in the .zfs ctldir MFC instructions: change the value of _PC_LINK_MAX to INT_MAX Reported by: jhb X-MFC-With: 329265 Sponsored by: Spectra Logic Corp Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat Mar 10 04:02:51 2018 (r330735) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sat Mar 10 04:10:57 2018 (r330736) @@ -80,6 +80,10 @@ #include "zfs_namecheck.h" +/* Common access mode for all virtual directories under the ctldir */ +const u_short zfsctl_ctldir_mode = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | + S_IROTH | S_IXOTH; + /* * "Synthetic" filesystem implementation. */ @@ -496,8 +500,7 @@ zfsctl_common_getattr(vnode_t *vp, vattr_t *vap) vap->va_nblocks = 0; vap->va_seq = 0; vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; - vap->va_mode = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | - S_IROTH | S_IXOTH; + vap->va_mode = zfsctl_ctldir_mode; vap->va_type = VDIR; /* * We live in the now (for atime). @@ -724,6 +727,91 @@ zfsctl_root_vptocnp(struct vop_vptocnp_args *ap) return (0); } +static int +zfsctl_common_pathconf(ap) + struct vop_pathconf_args /* { + struct vnode *a_vp; + int a_name; + int *a_retval; + } */ *ap; +{ + /* + * We care about ACL variables so that user land utilities like ls + * can display them correctly. Since the ctldir's st_dev is set to be + * the same as the parent dataset, we must support all variables that + * it supports. + */ + switch (ap->a_name) { + case _PC_LINK_MAX: + *ap->a_retval = INT_MAX; + return (0); + + case _PC_FILESIZEBITS: + *ap->a_retval = 64; + return (0); + + case _PC_MIN_HOLE_SIZE: + *ap->a_retval = (int)SPA_MINBLOCKSIZE; + return (0); + + case _PC_ACL_EXTENDED: + *ap->a_retval = 0; + return (0); + + case _PC_ACL_NFS4: + *ap->a_retval = 1; + return (0); + + case _PC_ACL_PATH_MAX: + *ap->a_retval = ACL_MAX_ENTRIES; + return (0); + + case _PC_NAME_MAX: + *ap->a_retval = NAME_MAX; + return (0); + + default: + return (vop_stdpathconf(ap)); + } +} + +/** + * Returns a trivial ACL + */ +int +zfsctl_common_getacl(ap) + struct vop_getacl_args /* { + struct vnode *vp; + acl_type_t a_type; + struct acl *a_aclp; + struct ucred *cred; + struct thread *td; + } */ *ap; +{ + int i; + + if (ap->a_type != ACL_TYPE_NFS4) + return (EINVAL); + + acl_nfs4_sync_acl_from_mode(ap->a_aclp, zfsctl_ctldir_mode, 0); + /* + * acl_nfs4_sync_acl_from_mode assumes that the owner can always modify + * attributes. That is not the case for the ctldir, so we must clear + * those bits. We also must clear ACL_READ_NAMED_ATTRS, because xattrs + * aren't supported by the ctldir. + */ + for (i = 0; i < ap->a_aclp->acl_cnt; i++) { + struct acl_entry *entry; + entry = &(ap->a_aclp->acl_entry[i]); + uint32_t old_perm = entry->ae_perm; + entry->ae_perm &= ~(ACL_WRITE_ACL | ACL_WRITE_OWNER | + ACL_WRITE_ATTRIBUTES | ACL_WRITE_NAMED_ATTRS | + ACL_READ_NAMED_ATTRS ); + } + + return (0); +} + static struct vop_vector zfsctl_ops_root = { .vop_default = &default_vnodeops, .vop_open = zfsctl_common_open, @@ -738,6 +826,8 @@ static struct vop_vector zfsctl_ops_root = { .vop_fid = zfsctl_common_fid, .vop_print = zfsctl_common_print, .vop_vptocnp = zfsctl_root_vptocnp, + .vop_pathconf = zfsctl_common_pathconf, + .vop_getacl = zfsctl_common_getacl, }; static int @@ -1059,6 +1149,8 @@ static struct vop_vector zfsctl_ops_snapdir = { .vop_reclaim = zfsctl_common_reclaim, .vop_fid = zfsctl_common_fid, .vop_print = zfsctl_common_print, + .vop_pathconf = zfsctl_common_pathconf, + .vop_getacl = zfsctl_common_getacl, }; static int From owner-svn-src-all@freebsd.org Sat Mar 10 04:17:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF238F48AF5; Sat, 10 Mar 2018 04:17:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8EF2081B05; Sat, 10 Mar 2018 04:17:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89687B43; Sat, 10 Mar 2018 04:17:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A4H2Du035819; Sat, 10 Mar 2018 04:17:02 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A4H1np035807; Sat, 10 Mar 2018 04:17:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803100417.w2A4H1np035807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 04:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330737 - in stable/10: sbin/geom/class/cache sbin/geom/class/concat sbin/geom/class/journal sbin/geom/class/label sbin/geom/class/mirror sbin/geom/class/raid3 sbin/geom/class/shsec sbi... X-SVN-Group: stable-10 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/10: sbin/geom/class/cache sbin/geom/class/concat sbin/geom/class/journal sbin/geom/class/label sbin/geom/class/mirror sbin/geom/class/raid3 sbin/geom/class/shsec sbin/geom/class/stripe sbin/... X-SVN-Commit-Revision: 330737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 04:17:03 -0000 Author: asomers Date: Sat Mar 10 04:17:01 2018 New Revision: 330737 URL: https://svnweb.freebsd.org/changeset/base/330737 Log: MFC r323314, r323338, r328849 r323314: Audit userspace geom code for leaking memory to disk Any geom class using g_metadata_store, as well as geom_virstor which duplicated g_metadata_store internally, would dump sectorsize - mdsize bytes of userspace memory following the metadata block stored. This is most or all geom classes (gcache, gconcat, geli, gjournal, glabel, gmirror, gmultipath, graid3, gshsec, gstripe, and geom_virstor). PR: 222077 (comment #3) Reported by: Maxim Khitrov Reviewed by: des Security: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12269 r323338: Fix information leak in geli(8) integrity mode In integrity mode, a larger logical sector (e.g., 4096 bytes) spans several physical sectors (e.g., 512 bytes) on the backing device. Due to hash overhead, a 4096 byte logical sector takes 8.5625 512-byte physical sectors. This means that only 288 bytes (256 data + 32 hash) of the last 512 byte sector are used. The memory allocation used to store the encrypted data to be written to the physical sectors comes from malloc(9) and does not use M_ZERO. Previously, nothing initialized the final physical sector backing each logical sector, aside from the hash + encrypted data portion. So 224 bytes of kernel heap memory was leaked to every block :-(. This patch addresses the issue by initializing the trailing portion of the physical sector in every logical sector to zeros before use. A much simpler but higher overhead fix would be to tag the entire allocation M_ZERO. PR: 222077 Reported by: Maxim Khitrov Reviewed by: emaste Security: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12272 r328849: geom: don't write stack garbage in disk labels Most consumers of g_metadata_store were passing in partially unallocated memory, resulting in stack garbage being written to disk labels. Fix them by zeroing the memory first. gvirstor repeated the same mistake, but in the kernel. Also, glabel's label contained a fixed-size string that wasn't initialized to zero. PR: 222077 Reported by: Maxim Khitrov Reviewed by: cem X-MFC-With: 323314 X-MFC-With: 323338 Differential Revision: https://reviews.freebsd.org/D14164 Modified: stable/10/sbin/geom/class/cache/geom_cache.c stable/10/sbin/geom/class/concat/geom_concat.c stable/10/sbin/geom/class/journal/geom_journal.c stable/10/sbin/geom/class/label/geom_label.c stable/10/sbin/geom/class/mirror/geom_mirror.c stable/10/sbin/geom/class/raid3/geom_raid3.c stable/10/sbin/geom/class/shsec/geom_shsec.c stable/10/sbin/geom/class/stripe/geom_stripe.c stable/10/sbin/geom/class/virstor/geom_virstor.c stable/10/sbin/geom/misc/subr.c stable/10/sys/geom/eli/g_eli_integrity.c stable/10/sys/geom/virstor/g_virstor.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/cache/geom_cache.c ============================================================================== --- stable/10/sbin/geom/class/cache/geom_cache.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/class/cache/geom_cache.c Sat Mar 10 04:17:01 2018 (r330737) @@ -135,6 +135,7 @@ cache_label(struct gctl_req *req) int error, nargs; intmax_t val; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs != 2) { gctl_error(req, "Invalid number of arguments."); Modified: stable/10/sbin/geom/class/concat/geom_concat.c ============================================================================== --- stable/10/sbin/geom/class/concat/geom_concat.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/class/concat/geom_concat.c Sat Mar 10 04:17:01 2018 (r330737) @@ -117,6 +117,7 @@ concat_label(struct gctl_req *req) const char *name; int error, i, hardcode, nargs; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs < 2) { gctl_error(req, "Too few arguments."); Modified: stable/10/sbin/geom/class/journal/geom_journal.c ============================================================================== --- stable/10/sbin/geom/class/journal/geom_journal.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/class/journal/geom_journal.c Sat Mar 10 04:17:01 2018 (r330737) @@ -142,6 +142,7 @@ journal_label(struct gctl_req *req) intmax_t jsize, msize, ssize; int error, force, i, nargs, checksum, hardcode; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); str = NULL; /* gcc */ Modified: stable/10/sbin/geom/class/label/geom_label.c ============================================================================== --- stable/10/sbin/geom/class/label/geom_label.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/class/label/geom_label.c Sat Mar 10 04:17:01 2018 (r330737) @@ -117,6 +117,7 @@ label_label(struct gctl_req *req) u_char sector[512]; int error, nargs; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs != 2) { gctl_error(req, "Invalid number of arguments."); @@ -137,6 +138,7 @@ label_label(struct gctl_req *req) strlcpy(md.md_magic, G_LABEL_MAGIC, sizeof(md.md_magic)); md.md_version = G_LABEL_VERSION; label = gctl_get_ascii(req, "arg0"); + bzero(md.md_label, sizeof(md.md_label)); strlcpy(md.md_label, label, sizeof(md.md_label)); md.md_provsize = g_get_mediasize(name); if (md.md_provsize == 0) { Modified: stable/10/sbin/geom/class/mirror/geom_mirror.c ============================================================================== --- stable/10/sbin/geom/class/mirror/geom_mirror.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/class/mirror/geom_mirror.c Sat Mar 10 04:17:01 2018 (r330737) @@ -176,6 +176,7 @@ mirror_label(struct gctl_req *req) intmax_t val; int error, i, nargs, bal, hardcode; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs < 2) { gctl_error(req, "Too few arguments."); Modified: stable/10/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- stable/10/sbin/geom/class/raid3/geom_raid3.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/class/raid3/geom_raid3.c Sat Mar 10 04:17:01 2018 (r330737) @@ -149,6 +149,7 @@ raid3_label(struct gctl_req *req) int hardcode, round_robin, verify; int error, i, nargs; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs < 4) { gctl_error(req, "Too few arguments."); Modified: stable/10/sbin/geom/class/shsec/geom_shsec.c ============================================================================== --- stable/10/sbin/geom/class/shsec/geom_shsec.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/class/shsec/geom_shsec.c Sat Mar 10 04:17:01 2018 (r330737) @@ -110,6 +110,7 @@ shsec_label(struct gctl_req *req) const char *name; int error, i, nargs, hardcode; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs <= 2) { gctl_error(req, "Too few arguments."); Modified: stable/10/sbin/geom/class/stripe/geom_stripe.c ============================================================================== --- stable/10/sbin/geom/class/stripe/geom_stripe.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/class/stripe/geom_stripe.c Sat Mar 10 04:17:01 2018 (r330737) @@ -128,6 +128,7 @@ stripe_label(struct gctl_req *req) const char *name; int error, i, nargs, hardcode; + bzero(sector, sizeof(sector)); nargs = gctl_get_int(req, "nargs"); if (nargs < 3) { gctl_error(req, "Too few arguments."); Modified: stable/10/sbin/geom/class/virstor/geom_virstor.c ============================================================================== --- stable/10/sbin/geom/class/virstor/geom_virstor.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/class/virstor/geom_virstor.c Sat Mar 10 04:17:01 2018 (r330737) @@ -183,6 +183,7 @@ my_g_metadata_store(const char *name, u_char *md, size goto out; } bcopy(md, sector, size); + bzero(sector + size, sectorsize - size); if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) != (ssize_t)sectorsize) { error = errno; Modified: stable/10/sbin/geom/misc/subr.c ============================================================================== --- stable/10/sbin/geom/misc/subr.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sbin/geom/misc/subr.c Sat Mar 10 04:17:01 2018 (r330737) @@ -271,6 +271,13 @@ out: return (error); } +/* + * Actually write the GEOM label to the provider + * + * @param name GEOM provider's name (ie "ada0") + * @param md Pointer to the label data to write + * @param size Size of the data pointed to by md + */ int g_metadata_store(const char *name, const unsigned char *md, size_t size) { @@ -302,6 +309,7 @@ g_metadata_store(const char *name, const unsigned char goto out; } bcopy(md, sector, size); + bzero(sector + size, sectorsize - size); if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) != sectorsize) { error = errno; Modified: stable/10/sys/geom/eli/g_eli_integrity.c ============================================================================== --- stable/10/sys/geom/eli/g_eli_integrity.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sys/geom/eli/g_eli_integrity.c Sat Mar 10 04:17:01 2018 (r330737) @@ -468,8 +468,16 @@ g_eli_auth_run(struct g_eli_worker *wr, struct bio *bp iov = (struct iovec *)p; p += sizeof(*iov); data_secsize = sc->sc_data_per_sector; - if ((i % lsec) == 0) + if ((i % lsec) == 0) { data_secsize = decr_secsize % data_secsize; + /* + * Last encrypted sector of each decrypted sector is + * only partially filled. + */ + if (bp->bio_cmd == BIO_WRITE) + memset(data + sc->sc_alen + data_secsize, 0, + encr_secsize - sc->sc_alen - data_secsize); + } if (bp->bio_cmd == BIO_READ) { /* Remember read HMAC. */ Modified: stable/10/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/10/sys/geom/virstor/g_virstor.c Sat Mar 10 04:10:57 2018 (r330736) +++ stable/10/sys/geom/virstor/g_virstor.c Sat Mar 10 04:17:01 2018 (r330737) @@ -1044,6 +1044,7 @@ write_metadata(struct g_consumer *cp, struct g_virstor pp = cp->provider; buf = malloc(pp->sectorsize, M_GVIRSTOR, M_WAITOK); + bzero(buf, pp->sectorsize); virstor_metadata_encode(md, buf); g_topology_unlock(); error = g_write_data(cp, pp->mediasize - pp->sectorsize, buf, From owner-svn-src-all@freebsd.org Sat Mar 10 06:18:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07083F276D2; Sat, 10 Mar 2018 06:18:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 4D05A85724; Sat, 10 Mar 2018 06:18:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id E1B0D1049B04; Sat, 10 Mar 2018 16:56:18 +1100 (AEDT) Date: Sat, 10 Mar 2018 16:56:17 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330338 - head/sys/amd64/amd64 In-Reply-To: <1997852.rATkjh2guz@ralph.baldwin.cx> Message-ID: <20180310154454.D971@besplex.bde.org> References: <201803031510.w23FAbeC065867@repo.freebsd.org> <2557369.6nFzd3kAUm@ralph.baldwin.cx> <20180310070452.P5919@besplex.bde.org> <1997852.rATkjh2guz@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=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=hNusopO0UmrS9mlNGgQA:9 a=5wjp8Tm52k4UfIQL:21 a=R6By-DyKjgHlol7m:21 a=VGjOnp0SFQuy57pt:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 06:18:19 -0000 On Fri, 9 Mar 2018, John Baldwin wrote: > On Saturday, March 10, 2018 07:41:30 AM Bruce Evans wrote: >> On Fri, 9 Mar 2018, John Baldwin wrote: >> >>> On Saturday, March 03, 2018 03:10:37 PM Andriy Gapon wrote: >>>> Author: avg >>>> Date: Sat Mar 3 15:10:37 2018 >>>> New Revision: 330338 >>>> URL: https://svnweb.freebsd.org/changeset/base/330338 >>>> >>>> Log: >>>> db_nextframe/amd64: catch up with r328083 to recognize fast_syscall_common >>>> >>>> Since that change the system call stack traces look like this: >>>> ... >>>> sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe0028e13ac0 >>>> amd64_syscall() at amd64_syscall+0x79b/frame 0xfffffe0028e13bf0 >>>> fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0028e13bf0 >>>> So, db_nextframe() stopped recognizing the system call frame. >>>> This commit should fix that. >>>> >>>> Reviewed by: kib >>>> MFC after: 4 days >>>> >>>> Modified: >>>> head/sys/amd64/amd64/db_trace.c >>>> >>>> Modified: head/sys/amd64/amd64/db_trace.c >>>> ============================================================================== >>>> --- head/sys/amd64/amd64/db_trace.c Sat Mar 3 13:20:44 2018 (r330337) >>>> +++ head/sys/amd64/amd64/db_trace.c Sat Mar 3 15:10:37 2018 (r330338) >>>> @@ -212,7 +212,9 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s >>>> strcmp(name, "Xcpususpend") == 0 || >>>> strcmp(name, "Xrendezvous") == 0) >>>> frame_type = INTERRUPT; >>>> - else if (strcmp(name, "Xfast_syscall") == 0) >>>> + else if (strcmp(name, "Xfast_syscall") == 0 || >>>> + strcmp(name, "Xfast_syscall_pti") == 0 || >>>> + strcmp(name, "fast_syscall_common") == 0) >>>> frame_type = SYSCALL; >>> >>> I think you actually just want to replace Xfast_syscall with >>> fast_syscall_common. Neither Xfast_syscall nor Xfast_syscall_pti call any >>> functions before jumping to the common label, so when unwinding from a system >>> call you should always get the common label. (That is, I think we should >>> remove Xfast_syscall and Xfast_syscall_pti here. Any stack trace that >>> happens to find those symbols during unwinding won't have a valid SYSCALL >>> frame to unwind.) >> >> No, it needs these symbols to decode the frame after reaching a point where >> the frame is actually set up. > > My point is that during the instructions from Xfast_syscall to fast_syscall_common > there isn't a valid frame. I know. > Xfast_syscall has two instructions and hasn't yet > decremented %rsp to create room for the trapframe for example. If you wanted to > handle the special case of stepping through those functions you'd have to create > a new type of frame that used register values from the saved frame for the > debug trap. You can't assume that there's a 'struct trapframe' at 'rbp + 16'. In my version (only written for i386 so far), the strcmp()s are not even reached for syscalls since t is known and discovered that there is no trapframe at [er]bp + 16 (since that is not in the kernel stack). For nested exceptions, [er]bp + 16 is on the kernel stack and the trap printing for the reentry is bogus before the frame is set up, but ebp is now a usually-good frame for the interrupted context and the backtrace continues (as in -current) back to the top frame with no further problems except for a wrong name at the top level caused by cross-jumping. >> Also, in uncommitted fixes I add some decoding of the non-frame between >> the entry point and when the frame is set up. Then the frame register >> is still the user's for the syscall case, so should not even be accessed. >> The i386 output looks like this: >> >> current: >> XX12: Breakpoint at Xint0x80_syscall: pushl $0x2 >> XX12: db> t >> XX12: Tracing pid 1 tid 100001 td 0xc6fad000 >> XX12: Xint0x80_syscall(33,282,bfbfee0c,3b,0,...) at Xint0x80_syscall/frame 0xd1d05bd8 >> XX12: kernload(2,bfbfeec4,bfbfeed0,804812b,80a3d64,...) at 0x805188f/frame 0xbfbfee7c >> >> fixed: >> XX12F: Breakpoint at Xint0x80_syscall: pushl $0x2 >> XX12F: db> t >> XX12F: Tracing pid 1 tid 100001 td 0xd4c23000 >> XX12F: Xint0x80_syscall(2,bfbfeec4,bfbfeed0,804812b,80a3d64,...) at Xint0x80_syscall/frame 0xbfbfee7c >> XX12F: --- unknown trap, ebp = 0xbfbfee7c, sp = 0xd3399bdc, ks = 0xd3398000, kse = 0xd339a000 --- >> >> where most of the values on the last line are for debugging (ebp is the user >> stack pointer which will become inaccessible, sp is the local variable sp >> and [ks, kse - 1] is the thread's kernel stack range (sp must be in this >> else the backtrace stops). > > Yes, both of these symbols would only be found instructions for this type of > special frame. Using the 'SYSCALL' frame type for the Xfast_syscall* symbols > would always be wrong. Until such time as we have the new frame type we should > just ignore them. It's to have to have a new frame type. Setting up the frame takes 20-50 or more instructions and there is a different frame type at every instruction, possibly multiplied by different setups for different entries (similarly for doreti except it clearly has only one exit). (i386 is still optimized for the original i386 or possibly 8088's so it sets up the frame using lots of pushls and the offsets from esp change at every step. amd64 reserves space for the frame, but the frame contains garbage intil it is filled in and the order is unlikely to be to fill in ebp first so that the frame is usable for tracing early.) It is the cross-jump targets like fast_syscall_common that should be ignorded. This is easy to do by obfuscating their names as 1: or .Lfoo. This hides the name of one of the entry points for Xfast_syscall* instead of both. Xfast_syscall is last, so it is Xfast_syscall_pti that is hidden. This is least worst. The difference is small unless you are debugging pti and then all hidings of names are equally bad. Cross-jumping also breaks mcounting. mcount() follows the [er]bp chain in an even simpler way than backtrace. It knows nothing of frames and uses a different buggy method of determining kernel (instruction pointer) addresses: it checks the kernel's low and high pc recorded in the data where backtrace use INKERNEL(). Both assume a single flat address space for the kernel and user. I fixed this for backtrace by checking stack addresses instead of instruction pointer addresses. mcount() looks up the instruction pointer at each step so currently finds the cross-jump target fast_syscall_common instead of either actual entry point. ALTENTRY() has complications to separate the entry points for function calls, and CROSSJUMP*() is supposed to be used for cross-jumps, but CROSSJUMP*() is no useable before the frame is set up. CROSSJUMP*() is hard to use. It is better to not use cross jumps. Most uses were for the idle loop and went away when that was moved to C. All uses went away, although i386 needs at least 1 and amd64 probably needs many. I fixed 1 on i386 in some trees, but couldn't use CROSSJMP*() since it isn't general/complicated enough. >> Jumps and labels with names inside functions complicate things. I think >> fast_syscall_common needs to be in the list too, and the many alltraps >> labels should have been there. This will be more useful with my fix. >> ... See my other reply. It said that alltraps indeed causes problems for backtraces. > gdb does depend on the names, and I was looking at this commit again to see if > I needed to update gdb. I thought I didn't, but now I see that gdb was depending > on the 'X' prefix for the old Xfast_syscall name and it now needs to check for > fast_syscall_common directly. The X checks are dangerously general, but show another problem: the names of all entry points and pseudo-entry points should begin with X so that all versions of kgdb can find them. calltrap is handled quite differently on amd64 and i386. On amd64, it is treated like a normal entry point while on i386 it is treated like a double fault. i386 also uses calltrap to detect the change of the frame arg of trap() from direct to indirect. amd64 has the same change, but kgdb doesn't seem to detect it. Detecting it using the same method would be difficult since args are hard to find on amd64. Cross-jumps can be avoided using function calls, but that would be a bit slower. This method is already essentially used for interrupts -- call something and then do not much cleanup before jumping to doreti. Optimizations to avoid this call are not attempted. Bruce From owner-svn-src-all@freebsd.org Sat Mar 10 06:35:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B5E8F292F0; Sat, 10 Mar 2018 06:35:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 77E478605B; Sat, 10 Mar 2018 06:35:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 2872B1049F85; Sat, 10 Mar 2018 17:35:56 +1100 (AEDT) Date: Sat, 10 Mar 2018 17:35:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mike Karels cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330712 - head/bin/ps In-Reply-To: <201803100010.w2A0AlkF008785@repo.freebsd.org> Message-ID: <20180310171525.R971@besplex.bde.org> References: <201803100010.w2A0AlkF008785@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=VJytp5HX c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=eLFt2R2capelzvn5pO4A:9 a=J6VmII6G4GYPtRYm:21 a=EOEuclWW4B7WC7QA:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 06:35:59 -0000 On Sat, 10 Mar 2018, Mike Karels wrote: > ... > Log: > Change ps(1) output width to unlimited if not interactive > ... > Modified: head/bin/ps/ps.1 > ============================================================================== > --- head/bin/ps/ps.1 Fri Mar 9 23:37:19 2018 (r330711) > +++ head/bin/ps/ps.1 Sat Mar 10 00:10:47 2018 (r330712) > @@ -101,6 +101,14 @@ The default output format includes, for each process, > controlling terminal, state, CPU time (including both user and system time) > and associated command. > .Pp > +If the > +.Nm > +process is associated with a terminal, the default output width is that of the > +terminal; otherwise the output width is unlimited. It is unclear how a process is assocated with a terminal and thus what this width is. For ps, unlike for most programs, a process is associated with a terminal iff any of the 3 standard file descriptors is a terminal that supports the TIOCGWINSZ ioctl, and the width of the preferred one is not 0. The preferred one is the first of STDOUT_FILENO, STDERR_FILENO and STDIN_FILENO that supports the ioctl. BUGS: if the first one somehow has width 0, then the process is considered as not being associated with a terminal even of a later one has a nonzero width. > ... > Modified: head/bin/ps/ps.c > ============================================================================== > --- head/bin/ps/ps.c Fri Mar 9 23:37:19 2018 (r330711) > +++ head/bin/ps/ps.c Sat Mar 10 00:10:47 2018 (r330712) > @@ -202,6 +202,11 @@ main(int argc, char *argv[]) > * any of stdout, stderr, or stdin is a terminal. The intent > * is that "ps", "ps | more", and "ps | grep" all use the same > * default line length unless -w is specified. > + * > + * If not interactive, the default length was traditionally 79. > + * It has been changed to unlimited. This is mostly for the > + * benefit of non-interactive scripts, which arguably should > + * use -ww, but is compatible with Linux. > */ This belongs in the HOSTORY section of the man page, with version info for the change. Bruce From owner-svn-src-all@freebsd.org Sat Mar 10 06:49:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E252F29C4F for ; Sat, 10 Mar 2018 06:49:46 +0000 (UTC) (envelope-from ilya@bakulin.de) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2E928676F for ; Sat, 10 Mar 2018 06:49:45 +0000 (UTC) (envelope-from ilya@bakulin.de) Received: by mail-lf0-x22f.google.com with SMTP id l191-v6so16199255lfe.1 for ; Fri, 09 Mar 2018 22:49:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bakulin-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MWLAUHNPwpFNpLF4Rv9L5oZrptorCBJ4Sh+iJhlbeqY=; b=BO8LBwjqi9LnQEGR+BuVgiN5j4qulP82iZvkX+bnRAO3YTXzKe8pbQ+fdldcoRQb98 u6F8AFFcNEVX+kVvwf3YdUyd8ZiZ1ySjOSUj1mfnxwLMHSxbxP1PkqrV0/vG4bMNp52Y OSVmqk7wLYdeoSY/bWwSoaNcAboFkx3zJxpPKk3VnwgUN1BTQrFB5pTCeaiZsRcUtPlJ FM5V7yAMaQ1rv/smDb/i8aTYf51L3XCUajBjk8Yrf6umx2M6bKOfgDqgLw15ufCsayKD BLeivjD720U/y+h9FwllxxpAXp5k9LUJyzvhzApaB0t2QtltYr+QqXTJWQSO6ii+6oXT GEag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MWLAUHNPwpFNpLF4Rv9L5oZrptorCBJ4Sh+iJhlbeqY=; b=fFZhIz6qdV/beTpC4+m0m3vNjx94VtlGYjdSgSrRTXr7ex/1zCOI5cSyuRqKbdpkgm MYDG79766Cw6gfrE/28LhsgnzdOPIqGBsvq9FnmSgRK/Z1vwMkHn4Yi9DaSh6RNwWLlh YHFAarkAbk9dewg+IFLlq0O3BjLEaMDZ/9dYyfxJlibPbVa1syMSZqVd2ZB1xSmC/lla Wir95j5N28pRWr6vD9sv31v941rRHwc3WFoyGoe+ix9dB9O6bCvWmJ1bQ4uRSh6rORhb oiCHkoSwbgyMcdoIyGJSB8NQoLakJDWRGLLpe9FnpimLuRLPoNNSu1gVSj7equWywVTf lYaA== X-Gm-Message-State: AElRT7G6V5/InP6+oC8iZmN27d92o8Bh3LkGTKSQw17IlBCIZzfAecZQ g3/L9HNOjQaxRMfZVmDE8MknDlWTcSWgzKBvWqjeQNKh X-Google-Smtp-Source: AG47ELuZ0Bq1U2A/7zOk371yyIYPnbEYEG8HVuHt+TW+bXMrw0gAyaS6053Mg1AlPEpDlqNeREXAPNTA6c7JNkphqo0= X-Received: by 10.46.16.74 with SMTP id j71mr656817lje.139.1520664583970; Fri, 09 Mar 2018 22:49:43 -0800 (PST) MIME-Version: 1.0 References: <201803091530.w29FUKin041283@repo.freebsd.org> In-Reply-To: <201803091530.w29FUKin041283@repo.freebsd.org> From: Ilya Bakulin Date: Sat, 10 Mar 2018 06:49:33 +0000 Message-ID: Subject: Re: svn commit: r330696 - in head/libexec/tftpd: . tests To: Alan Somers Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 06:49:47 -0000 This broke build for at least ARM. Fix: diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c index fea6870cac59..c467dfee3ba0 100644 --- a/libexec/tftpd/tests/functional.c +++ b/libexec/tftpd/tests/functional.c @@ -248,10 +248,10 @@ require_bufeq(const char *expected, ssize_t expected_len, const char *actual, ssize_t i; ATF_REQUIRE_EQ_MSG(expected_len, len, - "Expected %ld bytes but got %ld", expected_len, len); + "Expected %zd bytes but got %zd", expected_len, len); for (i = 0; i < len; i++) { ATF_REQUIRE_EQ_MSG(actual[i], expected[i], - "Expected %#hhx at position %ld; got %hhx instead", + "Expected %#hhx at position %zd; got %hhx instead", expected[i], i, actual[i]); } } On Sat, Mar 10, 2018 at 12:30 AM Alan Somers wrote: > Author: asomers > Date: Fri Mar 9 15:30:20 2018 > New Revision: 330696 > URL: https://svnweb.freebsd.org/changeset/base/330696 > > Log: > Add some functional tests for tftpd(8) > > tftpd(8) is difficult to test in isolation due to its relationship with > inetd. Create a test program that mimics the behavior of tftp(1) and > inetd(8) and verifies tftpd's response in several different scenarios. > > These test cases cover all of the basic TFTP protocol, but not the > optional > parts. > > PR: 157700 > PR: 225996 > PR: 226004 > PR: 226005 > MFC after: 3 weeks > Differential Revision: https://reviews.freebsd.org/D14310 > > Added: > head/libexec/tftpd/tests/ > head/libexec/tftpd/tests/Makefile (contents, props changed) > head/libexec/tftpd/tests/functional.c (contents, props changed) > Modified: > head/libexec/tftpd/Makefile > > Modified: head/libexec/tftpd/Makefile > > ============================================================================== > --- head/libexec/tftpd/Makefile Fri Mar 9 14:45:47 2018 (r330695) > +++ head/libexec/tftpd/Makefile Fri Mar 9 15:30:20 2018 (r330696) > @@ -14,4 +14,7 @@ CFLAGS+= -DLIBWRAP > LIBADD= wrap > .endif > > +HAS_TESTS= > +SUBDIR.${MK_TESTS}+= tests > + > .include > > Added: head/libexec/tftpd/tests/Makefile > > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/libexec/tftpd/tests/Makefile Fri Mar 9 15:30:20 2018 > (r330696) > @@ -0,0 +1,14 @@ > +# $FreeBSD$ > + > +.include > + > +# Skip on GCC 4.2, because it lacks __COUNTER__ > +.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40300 > +ATF_TESTS_C= functional > +TEST_METADATA.functional+= timeout=15 > +.endif > + > +LIBADD= util > +WARNS?= 6 > + > +.include > > Added: head/libexec/tftpd/tests/functional.c > > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/libexec/tftpd/tests/functional.c Fri Mar 9 15:30:20 2018 > (r330696) > @@ -0,0 +1,1006 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2018 Alan Somers. All rights reserved. > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY > WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > + > +#include > + > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +static const uint16_t BASEPORT = 6969; > +static const char pidfile[] = "tftpd.pid"; > +static int protocol = PF_UNSPEC; > +static int s = -1; /* tftp client socket */ > +static struct sockaddr_storage addr; /* Destination address for the > client */ > +static bool s_flag = false; /* Pass -s to tftpd */ > +static bool w_flag = false; /* Pass -w to tftpd */ > + > +/* Helper functions*/ > +static void require_bufeq(const char *expected, ssize_t expected_len, > + const char *actual, ssize_t len); > + > +/* > + * Receive a response from tftpd > + * @param hdr The reply's expected header, as a char > array > + * @param contents The reply's expected contents, as a char > array > + * @param contents_len Length of contents > + */ > +#define RECV(hdr, contents, contents_len) do { \ > + char buffer[1024]; \ > + struct sockaddr_storage from; \ > + socklen_t fromlen = sizeof(from); \ > + ssize_t r = recvfrom(s, buffer, sizeof(buffer), 0, \ > + (struct sockaddr*)&from, &fromlen); \ > + ATF_REQUIRE(r > 0); \ > + require_bufeq((hdr), sizeof(hdr), buffer, \ > + MIN(r, (ssize_t)sizeof(hdr))); \ > + require_bufeq((const char*) (contents), (contents_len), \ > + &buffer[sizeof(hdr)], r - sizeof(hdr)); \ > + if (protocol == PF_INET) { \ > + ((struct sockaddr_in*)&addr)->sin_port = \ > + ((struct sockaddr_in*)&from)->sin_port; \ > + } else { \ > + ((struct sockaddr_in6*)&addr)->sin6_port = \ > + ((struct sockaddr_in6*)&from)->sin6_port; \ > + } \ > +} while(0) > + > +static void > +recv_ack(uint16_t blocknum) > +{ > + char hdr[] = {0, 4, blocknum >> 8, blocknum & 0xFF}; > + RECV(hdr, NULL, 0); > +} > + > +/* > + * Receive a data packet from tftpd > + * @param blocknum Expected block number to be received > + * @param contents Pointer to expected contents > + * @param contents_len Length of contents expected to receive > + */ > +static void > +recv_data(uint16_t blocknum, const char* contents, size_t contents_len) > +{ > + char hdr[] = {0, 3, blocknum >> 8, blocknum & 0xFF}; > + RECV(hdr, contents, contents_len); > +} > + > +#define RECV_ERROR(code, msg) do { \ > + char hdr[] = {0, 5, code >> 8, code & 0xFF}; \ > + RECV(hdr, msg, sizeof(msg)); \ > +} while (0) > + > +/* > + * send a command to tftpd. > + * @param cmd Command to send, as a char array > + */ > +static void > +send_bytes(const void* cmd, ssize_t len) > +{ > + ssize_t r; > + > + r = sendto(s, cmd, len, 0, (struct sockaddr*)(&addr), addr.ss_len); > + ATF_REQUIRE_EQ(r, len); > +} > + > +static void > +send_data(uint16_t blocknum, const char* contents, size_t contents_len) > +{ > + char buffer[1024]; > + > + buffer[0] = 0; /* DATA opcode high byte */ > + buffer[1] = 3; /* DATA opcode low byte */ > + buffer[2] = blocknum >> 8; > + buffer[3] = blocknum & 0xFF; > + memmove(&buffer[4], contents, contents_len); > + send_bytes(buffer, 4 + contents_len); > +} > + > +/* > + * send a command to tftpd. > + * @param cmd Command to send, as a const string > + * (terminating NUL will be ignored) > + */ > +#define SEND_STR(cmd) ATF_REQUIRE_EQ( \ > + sendto(s, (cmd), sizeof(cmd) - 1, 0, (struct sockaddr*)(&addr), \ > + addr.ss_len), \ > + sizeof(cmd) - 1) > + > +/* > + * Acknowledge block blocknum > + */ > +static void > +send_ack(uint16_t blocknum) > +{ > + char packet[] = { > + 0, 4, /* ACK opcode in BE */ > + blocknum >> 8, > + blocknum & 0xFF > + }; > + > + send_bytes(packet, sizeof(packet)); > + > +} > + > +/* > + * send a read request to tftpd. > + * @param filename filename as a string, absolute or relative > + * @param mode either "octet" or "netascii" > + */ > +#define SEND_RRQ(filename, mode) SEND_STR("\0\001" filename "\0" mode > "\0") > + > +/* > + * send a write request to tftpd. > + * @param filename filename as a string, absolute or relative > + * @param mode either "octet" or "netascii" > + */ > +#define SEND_WRQ(filename, mode) SEND_STR("\0\002" filename "\0" mode > "\0") > + > +/* Define a test case, for both IPv4 and IPv6 */ > +#define TFTPD_TC_DEFINE(name, head, ...) \ > +static void \ > +name ## _body(void); \ > +ATF_TC_WITH_CLEANUP(name ## _v4); \ > +ATF_TC_HEAD(name ## _v4, tc) \ > +{ \ > + head \ > +} \ > +ATF_TC_BODY(name ## _v4, tc) \ > +{ \ > + __VA_ARGS__; \ > + protocol = AF_INET; \ > + s = setup(&addr, __COUNTER__); \ > + name ## _body(); \ > + close(s); \ > +} \ > +ATF_TC_CLEANUP(name ## _v4, tc) \ > +{ \ > + cleanup(); \ > +} \ > +ATF_TC_WITH_CLEANUP(name ## _v6); \ > +ATF_TC_HEAD(name ## _v6, tc) \ > +{ \ > + head \ > +} \ > +ATF_TC_BODY(name ## _v6, tc) \ > +{ \ > + __VA_ARGS__; \ > + protocol = AF_INET6; \ > + s = setup(&addr, __COUNTER__); \ > + name ## _body(); \ > + close(s); \ > +} \ > +ATF_TC_CLEANUP(name ## _v6, tc) \ > +{ \ > + cleanup(); \ > +} \ > +static void \ > +name ## _body(void) > + > +/* Add the IPv4 and IPv6 versions of a test case */ > +#define TFTPD_TC_ADD(tp, name ) \ > +do { \ > + ATF_TP_ADD_TC(tp, name ## _v4); \ > + ATF_TP_ADD_TC(tp, name ## _v6); \ > +} while (0) > + > +/* Standard cleanup used by all testcases */ > +static void > +cleanup(void) > +{ > + int fd = -1; > + char buffer[80] = {0}; > + pid_t pid; > + > + fd = open(pidfile, O_RDONLY); > + if (fd < 0) > + return; > + if (read(fd, buffer, sizeof(buffer)) > 0) { > + sscanf(buffer, "%d", &pid); > + kill(pid, SIGTERM); > + waitpid(pid, NULL, 0); > + } > + close(fd); > + unlink(pidfile); > +} > + > +/* Assert that two binary buffers are identical */ > +static void > +require_bufeq(const char *expected, ssize_t expected_len, const char > *actual, > + ssize_t len) > +{ > + ssize_t i; > + > + ATF_REQUIRE_EQ_MSG(expected_len, len, > + "Expected %ld bytes but got %ld", expected_len, len); > + for (i = 0; i < len; i++) { > + ATF_REQUIRE_EQ_MSG(actual[i], expected[i], > + "Expected %#hhx at position %ld; got %hhx instead", > + expected[i], i, actual[i]); > + } > +} > + > +/* > + * Start tftpd and return its communicating socket > + * @param to Will be filled in for use with sendto > + * @param idx Unique identifier of the test case > + * @return Socket ready to use > + */ > +static int > +setup(struct sockaddr_storage *to, uint16_t idx) > +{ > + int client_s, server_s, pid, argv_idx; > + char execname[] = "/usr/libexec/tftpd"; > + char s_flag_str[] = "-s"; > + char w_flag_str[] = "-w"; > + char pwd[MAXPATHLEN]; > + char *argv[10]; > + struct sockaddr_in addr4; > + struct sockaddr_in6 addr6; > + struct sockaddr *server_addr; > + struct pidfh *pfh; > + uint16_t port = BASEPORT + idx; > + socklen_t len; > + > + if (protocol == PF_INET) { > + len = sizeof(addr4); > + bzero(&addr4, len); > + addr4.sin_len = len; > + addr4.sin_family = PF_INET; > + addr4.sin_port = htons(port); > + server_addr = (struct sockaddr*)&addr4; > + } else { > + len = sizeof(addr6); > + bzero(&addr6, len); > + addr6.sin6_len = len; > + addr6.sin6_family = PF_INET6; > + addr6.sin6_port = htons(port); > + server_addr = (struct sockaddr*)&addr6; > + } > + > + ATF_REQUIRE_EQ(getcwd(pwd, sizeof(pwd)), pwd); > + > + /* Must bind(2) pre-fork so it happens before the client's send(2) > */ > + ATF_REQUIRE((server_s = socket(protocol, SOCK_DGRAM, 0)) > 0); > + ATF_REQUIRE_EQ_MSG(bind(server_s, server_addr, len), 0, > + "bind failed with error %s", strerror(errno)); > + > + pid = fork(); > + switch (pid) { > + case -1: > + atf_tc_fail("fork failed"); > + break; > + case 0: > + /* In child */ > + pfh = pidfile_open(pidfile, 0644, NULL); > + ATF_REQUIRE_MSG(pfh != NULL, > + "pidfile_open: %s", strerror(errno)); > + ATF_REQUIRE_EQ(pidfile_write(pfh), 0); > + ATF_REQUIRE_EQ(pidfile_close(pfh), 0); > + > + bzero(argv, sizeof(argv)); > + argv[0] = execname; > + argv_idx = 1; > + if (w_flag) > + argv[argv_idx++] = w_flag_str; > + if (s_flag) > + argv[argv_idx++] = s_flag_str; > + argv[argv_idx++] = pwd; > + ATF_REQUIRE_EQ(dup2(server_s, STDOUT_FILENO), > STDOUT_FILENO); > + ATF_REQUIRE_EQ(dup2(server_s, STDIN_FILENO), STDIN_FILENO); > + ATF_REQUIRE_EQ(dup2(server_s, STDERR_FILENO), > STDERR_FILENO); > + execv(execname, argv); > + atf_tc_fail("exec failed"); > + break; > + default: > + /* In parent */ > + bzero(to, sizeof(*to)); > + if (protocol == PF_INET) { > + struct sockaddr_in *to4 = (struct sockaddr_in*)to; > + to4->sin_len = sizeof(*to4); > + to4->sin_family = PF_INET; > + to4->sin_port = htons(port); > + to4->sin_addr.s_addr = htonl(INADDR_LOOPBACK); > + } else { > + struct in6_addr loopback = IN6ADDR_LOOPBACK_INIT; > + struct sockaddr_in6 *to6 = (struct > sockaddr_in6*)to; > + to6->sin6_len = sizeof(*to6); > + to6->sin6_family = PF_INET6; > + to6->sin6_port = htons(port); > + to6->sin6_addr = loopback; > + } > + > + close(server_s); > + ATF_REQUIRE((client_s = socket(protocol, SOCK_DGRAM, 0)) > > 0); > + break; > + } > + return (client_s); > +} > + > +/* Like write(2), but never returns less than the requested length */ > +static void > +write_all(int fd, const void *buf, size_t nbytes) > +{ > + ssize_t r; > + > + while (nbytes > 0) { > + r = write(fd, buf, nbytes); > + ATF_REQUIRE(r > 0); > + nbytes -= r; > + buf = (const char*)buf + r; > + } > +} > + > + > +/* > + * Test Cases > + */ > + > +/* > + * Read a file, specified by absolute pathname. > + */ > +TFTPD_TC_DEFINE(abspath,) > +{ > + int fd; > + char command[1024]; > + size_t pathlen; > + char suffix[] = {'\0', 'o', 'c', 't', 'e', 't', '\0'}; > + > + command[0] = 0; /* RRQ high byte */ > + command[1] = 1; /* RRQ low byte */ > + ATF_REQUIRE(getcwd(&command[2], sizeof(command) - 2) != NULL); > + pathlen = strlcat(&command[2], "/abspath.txt", sizeof(command) - > 2); > + ATF_REQUIRE(pathlen + sizeof(suffix) < sizeof(command) - 2); > + memmove(&command[2 + pathlen], suffix, sizeof(suffix)); > + > + fd = open("abspath.txt", O_CREAT | O_RDONLY, 0644); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + send_bytes(command, 2 + pathlen + sizeof(suffix)); > + recv_data(1, NULL, 0); > + send_ack(1); > +} > + > +/* > + * Attempt to read a file outside of the allowed directory(ies) > + */ > +TFTPD_TC_DEFINE(dotdot,) > +{ > + ATF_REQUIRE_EQ(mkdir("subdir", 0777), 0); > + SEND_RRQ("../disallowed.txt", "octet"); > + RECV_ERROR(2, "Access violation"); > + s = setup(&addr, __COUNTER__); \ > + SEND_RRQ("subdir/../../disallowed.txt", "octet"); > + RECV_ERROR(2, "Access violation"); > + s = setup(&addr, __COUNTER__); \ > + SEND_RRQ("/etc/passwd", "octet"); > + RECV_ERROR(2, "Access violation"); > +} > + > +/* > + * With "-s", tftpd should chroot to the specified directory > + */ > +TFTPD_TC_DEFINE(s_flag, atf_tc_set_md_var(tc, "require.user", "root");, > + s_flag = true) > +{ > + int fd; > + char contents[] = "small"; > + > + fd = open("small.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, strlen(contents) + 1); > + close(fd); > + > + SEND_RRQ("/small.txt", "octet"); > + recv_data(1, contents, strlen(contents) + 1); > + send_ack(1); > +} > + > +/* > + * Read a file, and simulate a dropped ACK packet > + */ > +TFTPD_TC_DEFINE(rrq_dropped_ack,) > +{ > + int fd; > + char contents[] = "small"; > + > + fd = open("small.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, strlen(contents) + 1); > + close(fd); > + > + SEND_RRQ("small.txt", "octet"); > + recv_data(1, contents, strlen(contents) + 1); > + /* > + * client "sends" the ack, but network drops it > + * Eventually, tftpd should resend the data packet > + */ > + recv_data(1, contents, strlen(contents) + 1); > + send_ack(1); > +} > + > +/* > + * Read a file, and simulate a dropped DATA packet > + */ > +TFTPD_TC_DEFINE(rrq_dropped_data,) > +{ > + int fd; > + size_t i; > + uint32_t contents[192]; > + char buffer[1024]; > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, sizeof(contents)); > + close(fd); > + > + SEND_RRQ("medium.txt", "octet"); > + recv_data(1, (const char*)&contents[0], 512); > + send_ack(1); > + (void) recvfrom(s, buffer, sizeof(buffer), 0, NULL, NULL); > + /* > + * server "sends" the data, but network drops it > + * Eventually, client should resend the last ACK > + */ > + send_ack(1); > + recv_data(2, (const char*)&contents[128], 256); > + send_ack(2); > +} > + > +/* > + * Read a medium file, and simulate a duplicated ACK packet > + */ > +TFTPD_TC_DEFINE(rrq_duped_ack,) > +{ > + int fd; > + size_t i; > + uint32_t contents[192]; > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, sizeof(contents)); > + close(fd); > + > + SEND_RRQ("medium.txt", "octet"); > + recv_data(1, (const char*)&contents[0], 512); > + send_ack(1); > + send_ack(1); /* Dupe an ACK packet */ > + recv_data(2, (const char*)&contents[128], 256); > + recv_data(2, (const char*)&contents[128], 256); > + send_ack(2); > +} > + > + > +/* > + * Attempt to read a file without read permissions > + */ > +TFTPD_TC_DEFINE(rrq_eaccess,) > +{ > + int fd; > + > + fd = open("empty.txt", O_CREAT | O_RDONLY, 0000); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_RRQ("empty.txt", "octet"); > + RECV_ERROR(2, "Access violation"); > +} > + > +/* > + * Read an empty file > + */ > +TFTPD_TC_DEFINE(rrq_empty,) > +{ > + int fd; > + > + fd = open("empty.txt", O_CREAT | O_RDONLY, 0644); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_RRQ("empty.txt", "octet"); > + recv_data(1, NULL, 0); > + send_ack(1); > +} > + > +/* > + * Read a medium file of more than one block > + */ > +TFTPD_TC_DEFINE(rrq_medium,) > +{ > + int fd; > + size_t i; > + uint32_t contents[192]; > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, sizeof(contents)); > + close(fd); > + > + SEND_RRQ("medium.txt", "octet"); > + recv_data(1, (const char*)&contents[0], 512); > + send_ack(1); > + recv_data(2, (const char*)&contents[128], 256); > + send_ack(2); > +} > + > +/* > + * Read a file in netascii format > + */ > +TFTPD_TC_DEFINE(rrq_netascii,) > +{ > + int fd; > + char contents[] = "foo\nbar\rbaz\n"; > + /* > + * Weirdly, RFC-764 says that CR must be followed by NUL if a line > feed > + * is not intended > + */ > + char expected[] = "foo\r\nbar\r\0baz\r\n"; > + > + fd = open("unix.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, strlen(contents) + 1); > + close(fd); > + > + SEND_RRQ("unix.txt", "netascii"); > + recv_data(1, expected, sizeof(expected)); > + send_ack(1); > +} > + > +/* > + * Read a file that doesn't exist > + */ > +TFTPD_TC_DEFINE(rrq_nonexistent,) > +{ > + SEND_RRQ("nonexistent.txt", "octet"); > + RECV_ERROR(1, "File not found"); > +} > + > +/* > + * Attempt to read a file whose name exceeds PATH_MAX > + */ > +TFTPD_TC_DEFINE(rrq_path_max,) > +{ > +#define AReallyBigFileName \ > + > "AReallyBigFileNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + > "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"\ > + ".txt" > + ATF_REQUIRE_MSG(strlen(AReallyBigFileName) > PATH_MAX, > + "Somebody increased PATH_MAX. Update the test"); > + SEND_RRQ(AReallyBigFileName, "octet"); > + RECV_ERROR(4, "Illegal TFTP operation"); > +} > + > +/* > + * Read a small file of less than one block > + */ > +TFTPD_TC_DEFINE(rrq_small,) > +{ > + int fd; > + char contents[] = "small"; > + > + fd = open("small.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, strlen(contents) + 1); > + close(fd); > + > + SEND_RRQ("small.txt", "octet"); > + recv_data(1, contents, strlen(contents) + 1); > + send_ack(1); > +} > + > +/* > + * Try to transfer a file with an unknown mode. > + */ > +TFTPD_TC_DEFINE(unknown_modes,) > +{ > + SEND_RRQ("foo.txt", "ascii"); /* Misspelling of "ascii" */ > + RECV_ERROR(4, "Illegal TFTP operation"); > + s = setup(&addr, __COUNTER__); \ > + SEND_RRQ("foo.txt", "binary"); /* Obsolete. Use "octet" instead > */ > + RECV_ERROR(4, "Illegal TFTP operation"); > + s = setup(&addr, __COUNTER__); \ > + SEND_RRQ("foo.txt", "en_US.UTF-8"); > + RECV_ERROR(4, "Illegal TFTP operation"); > + s = setup(&addr, __COUNTER__); \ > + SEND_RRQ("foo.txt", "mail"); /* Obsolete in RFC-1350 */ > + RECV_ERROR(4, "Illegal TFTP operation"); > +} > + > +/* > + * Send an unknown opcode. tftpd should respond with the appropriate > error > + */ > +TFTPD_TC_DEFINE(unknown_opcode,) > +{ > + /* Looks like an RRQ or WRQ request, but with a bad opcode */ > + SEND_STR("\0\007foo.txt\0octet\0"); > + atf_tc_expect_timeout("PR 226005 tftpd ignores bad opcodes but > doesn't reject them"); > + RECV_ERROR(4, "Illegal TFTP operation"); > +} > + > +/* > + * Invoke tftpd with "-w" and write to a nonexistent file. > + */ > +TFTPD_TC_DEFINE(w_flag,, w_flag = 1;) > +{ > + int fd; > + ssize_t r; > + char contents[] = "small"; > + char buffer[1024]; > + size_t contents_len; > + > + contents_len = strlen(contents) + 1; > + SEND_WRQ("small.txt", "octet"); > + recv_ack(0); > + send_data(1, contents, contents_len); > + recv_ack(1); > + > + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); > + fd = open("small.txt", O_RDONLY); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq(contents, contents_len, buffer, r); > +} > + > +/* > + * Write a medium file, and simulate a dropped ACK packet > + */ > +TFTPD_TC_DEFINE(wrq_dropped_ack,) > +{ > + int fd; > + size_t i; > + ssize_t r; > + uint32_t contents[192]; > + char buffer[1024]; > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_WRQ("medium.txt", "octet"); > + recv_ack(0); > + send_data(1, (const char*)&contents[0], 512); > + /* > + * Servers "sends" an ACK packet, but network drops it. > + * Eventually, server should resend the last ACK > + */ > + (void) recvfrom(s, buffer, sizeof(buffer), 0, NULL, NULL); > + recv_ack(1); > + send_data(2, (const char*)&contents[128], 256); > + recv_ack(2); > + > + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); > + fd = open("medium.txt", O_RDONLY); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq((const char*)contents, 768, buffer, r); > +} > + > +/* > + * Write a small file, and simulate a dropped DATA packet > + */ > +TFTPD_TC_DEFINE(wrq_dropped_data,) > +{ > + int fd; > + ssize_t r; > + char contents[] = "small"; > + size_t contents_len; > + char buffer[1024]; > + > + fd = open("small.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + contents_len = strlen(contents) + 1; > + > + SEND_WRQ("small.txt", "octet"); > + recv_ack(0); > + /* > + * Client "sends" a DATA packet, but network drops it. > + * Eventually, server should resend the last ACK > + */ > + recv_ack(0); > + send_data(1, contents, contents_len); > + recv_ack(1); > + > + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); > + fd = open("small.txt", O_RDONLY); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq(contents, contents_len, buffer, r); > +} > + > +/* > + * Write a medium file, and simulate a duplicated DATA packet > + */ > +TFTPD_TC_DEFINE(wrq_duped_data,) > +{ > + int fd; > + size_t i; > + ssize_t r; > + uint32_t contents[192]; > + char buffer[1024]; > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_WRQ("medium.txt", "octet"); > + recv_ack(0); > + send_data(1, (const char*)&contents[0], 512); > + send_data(1, (const char*)&contents[0], 512); > + recv_ack(1); > + recv_ack(1); > + send_data(2, (const char*)&contents[128], 256); > + recv_ack(2); > + > + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); > + fd = open("medium.txt", O_RDONLY); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq((const char*)contents, 768, buffer, r); > +} > + > +/* > + * Attempt to write a file without write permissions > + */ > +TFTPD_TC_DEFINE(wrq_eaccess,) > +{ > + int fd; > + > + fd = open("empty.txt", O_CREAT | O_RDONLY, 0440); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_WRQ("empty.txt", "octet"); > + atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " > + "violation"); > + RECV_ERROR(2, "Access violation"); > +} > + > +/* > + * Attempt to write a file without world write permissions, but with world > + * read permissions > + */ > +TFTPD_TC_DEFINE(wrq_eaccess_world_readable,) > +{ > + int fd; > + > + fd = open("empty.txt", O_CREAT | O_RDONLY, 0444); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_WRQ("empty.txt", "octet"); > + atf_tc_expect_fail("PR 226004 with relative pathnames, tftpd > doesn't validate world writability"); > + RECV_ERROR(2, "Access violation"); > +} > + > + > +/* > + * Write a medium file of more than one block > + */ > +TFTPD_TC_DEFINE(wrq_medium,) > +{ > + int fd; > + size_t i; > + ssize_t r; > + uint32_t contents[192]; > + char buffer[1024]; > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_WRQ("medium.txt", "octet"); > + recv_ack(0); > + send_data(1, (const char*)&contents[0], 512); > + recv_ack(1); > + send_data(2, (const char*)&contents[128], 256); > + recv_ack(2); > + > + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); > + fd = open("medium.txt", O_RDONLY); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq((const char*)contents, 768, buffer, r); > +} > + > +/* > + * Write a file in netascii format > + */ > +TFTPD_TC_DEFINE(wrq_netascii,) > +{ > + int fd; > + ssize_t r; > + /* > + * Weirdly, RFC-764 says that CR must be followed by NUL if a line > feed > + * is not intended > + */ > + char contents[] = "foo\r\nbar\r\0baz\r\n"; > + char expected[] = "foo\nbar\rbaz\n"; > + size_t contents_len; > + char buffer[1024]; > + > + fd = open("unix.txt", O_RDWR | O_CREAT, 0666); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + contents_len = strlen(contents) + 1; > + > + SEND_WRQ("unix.txt", "netascii"); > + recv_ack(0); > + send_data(1, contents, contents_len); > + recv_ack(1); > + > + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); > + fd = open("unix.txt", O_RDONLY); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq(expected, sizeof(expected), buffer, r); > +} > + > +/* > + * Attempt to write to a nonexistent file. With the default options, this > + * isn't allowed. > + */ > +TFTPD_TC_DEFINE(wrq_nonexistent,) > +{ > + SEND_WRQ("nonexistent.txt", "octet"); > + atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access " > + "violation"); > + RECV_ERROR(1, "File not found"); > +} > + > +/* > + * Write a small file of less than one block > + */ > +TFTPD_TC_DEFINE(wrq_small,) > +{ > + int fd; > + ssize_t r; > + char contents[] = "small"; > + size_t contents_len; > + char buffer[1024]; > + > + fd = open("small.txt", O_RDWR | O_CREAT, 0666); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + contents_len = strlen(contents) + 1; > + > + SEND_WRQ("small.txt", "octet"); > + recv_ack(0); > + send_data(1, contents, contents_len); > + recv_ack(1); > + > + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); > + fd = open("small.txt", O_RDONLY); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq(contents, contents_len, buffer, r); > +} > + > +/* > + * Write an empty file over a non-empty one > + */ > +TFTPD_TC_DEFINE(wrq_truncate,) > +{ > + int fd; > + char contents[] = "small"; > + struct stat sb; > + > + fd = open("small.txt", O_RDWR | O_CREAT, 0666); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, strlen(contents) + 1); > + close(fd); > + > + SEND_WRQ("small.txt", "octet"); > + recv_ack(0); > + send_data(1, NULL, 0); > + recv_ack(1); > + > + ATF_REQUIRE_EQ(stat("small.txt", &sb), 0); > + ATF_REQUIRE_EQ(sb.st_size, 0); > +} > + > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > From owner-svn-src-all@freebsd.org Sat Mar 10 06:56:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAB15F2A162; Sat, 10 Mar 2018 06:56:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 0454F86C3E; Sat, 10 Mar 2018 06:56:48 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id CC62CD4ADA2; Sat, 10 Mar 2018 17:56:38 +1100 (AEDT) Date: Sat, 10 Mar 2018 17:56:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bryan Drewery cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330722 - head/sys/conf In-Reply-To: <201803100209.w2A29aZ6068978@repo.freebsd.org> Message-ID: <20180310175603.A1308@besplex.bde.org> References: <201803100209.w2A29aZ6068978@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=VJytp5HX c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=OktE5W1Amtd_KkKttNcA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 06:56:50 -0000 On Sat, 10 Mar 2018, Bryan Drewery wrote: > Log: > Reduce overhead for simple 'make -V' lookups by avoiding 'find sys/'. > > Setting -DNO_SKIP_MPATH can be used for debugging. > > Reported by: bde Thanks. Bruce From owner-svn-src-all@freebsd.org Sat Mar 10 07:29:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12FC3F2B15D for ; Sat, 10 Mar 2018 07:29:16 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x241.google.com (mail-yw0-x241.google.com [IPv6:2607:f8b0:4002: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 A73B887BE3 for ; Sat, 10 Mar 2018 07:29:15 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x241.google.com with SMTP id l24so2389218ywk.6 for ; Fri, 09 Mar 2018 23:29:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=RX5LswTUFS0Mlz9dkyYI6Krmb9Fm6KJG9nCJ2C+0GHY=; b=GT8jMs6VsqzRyhGPIPBMxyi9MTe+LpmKHIPTdqEvJDkahaR/+pE/wwXlsqC4N/EkPc oFlFR/fYS2WRu+nO29t11qpE+YxYjahhFPnpU5lkPhsyyoOLfexdFFBqXQIBsX/6gi6j 5slJAfn5fnwfE7uya07HwDMItv0bpzCDfzgjU= 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:content-transfer-encoding; bh=RX5LswTUFS0Mlz9dkyYI6Krmb9Fm6KJG9nCJ2C+0GHY=; b=PBsAIOKlb+cq+SyDfKA1gQV9ijJ+0ADsF2MIJwC6XG3EKcOikzYbKJCD+/EFPonRPr LEk6+5X/xxXabYPosf9Nn6nqvJ36Jywa54EVS3vzkEDMWi+bNt+yfHkSY/sfvEu9pL+0 TZasbE8XjWB5WZ8bJwG0JNPh5lT/ppQ52PoNi71Gcmaf8WKNkhWRFYG7d/LMIxv7zoKf CEpr642LoH6YDE0GF5fQIfSXVQA9uephP2kMdpebFkzzd6ndFQNFGHq38i2kfq+wBFN+ f5qM16tBq9M2y0kr/OdXZC/jIyaaM2Sz7bTmYcANZVtChpnXI9y8mweMDVZkMdTvyVds b/Yw== X-Gm-Message-State: AElRT7EBMur/oC6lQ5bgbdeUXBk/CrXzFqwhtHgU1aU/2Us8i5fDuZ8K CpskFEObspTpIRjPl0LXFWEPrsTfI9WrPhJngEvKiA== X-Google-Smtp-Source: AG47ELtUyZYQL5ayceQGDcOa3+aHY2Nujf2J9Bv1liw2krAQdv/sEpMVRJSdNwUm8VxHo+L6ZaQWT+xTn9/uME+R874= X-Received: by 2002:a25:accd:: with SMTP id x13-v6mr622490ybd.194.1520666954752; Fri, 09 Mar 2018 23:29:14 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Fri, 9 Mar 2018 23:28:44 -0800 (PST) In-Reply-To: References: <201801151925.w0FJPCKA019434@repo.freebsd.org> <20180309220940.GG6174@raichu> <1520634689.84937.74.camel@freebsd.org> From: Eitan Adler Date: Fri, 9 Mar 2018 23:28:44 -0800 Message-ID: Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs To: David Bright Cc: Ian Lepore , Mark Johnston , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 07:29:16 -0000 On 9 March 2018 at 18:36, David Bright wrote: > On Mar 9, 2018, at 17:31, Ian Lepore wrote: >> >> On Fri, 2018-03-09 at 17:09 -0500, Mark Johnston wrote: >>> >>> etc/rc.d/fsck doesn't know how to interpret the new exit code and now >>> just drops to a single-user shell when it is encountered. [=E2=80=A6] >>> >>> Is there any reason etc/rc.d/fsck shouldn't automatically retry (up to > > This is, in fact, the reason that I made the change I did. I was trying t= o put in a retry loop to rc.d/fsck, but found that I couldn=E2=80=99t get i= t to work because fsck and fsck_ffs were not exiting with non-zero status. = The drop to single user is not really due to the specific (new) error code = of 16, it is due to the fact that fsck_ffs is now exiting with a non-zero s= tatus when it hasn=E2=80=99t completely cleaned the file system; /any/ non-= zero status would cause the current rc.d/fsck script to go to single user. = Prior to my change, fsck_ffs was exiting with a zero status even though it = had not completely cleaned the filesystem and told the user to run it again= . > >> >> fsck_ffs already has a -R flag to automatically retry, wouldn't that be >> a better mechanism for handling this new type of retry? > > That=E2=80=99s true; however, there is currently no way to pass that flag= through the filesystem-agnostic fsck wrapper called from rc.d/fsck to the = filesystem-specific fsck_ffs program that it calls. One could implement a s= imilar flag on the fsck wrapper to be passed along to the filesystem-specif= ic checker, but I think fsck_ffs is the only one that currently implements = such a flag. Why does it need to be filesystem specific? Can't the retry happen in the wrapper itself? --=20 Eitan Adler From owner-svn-src-all@freebsd.org Sat Mar 10 08:08:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D91BF2C727; Sat, 10 Mar 2018 08:08:36 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from APC01-PU1-obe.outbound.protection.outlook.com (mail-pu1apc01on0122.outbound.protection.outlook.com [104.47.126.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5ECE1691F2; Sat, 10 Mar 2018 08:08:35 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM (10.170.167.17) by KL1P15301MB0039.APCP153.PROD.OUTLOOK.COM (10.170.168.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.9; Sat, 10 Mar 2018 08:08:17 +0000 Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) by KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) with mapi id 15.20.0588.008; Sat, 10 Mar 2018 08:08:17 +0000 From: Dexuan Cui To: Ed Maste , Dexuan-BSD Cui CC: Konstantin Belousov , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: RE: svn commit: r328625 - in head/sys: amd64/amd64 amd64/ia32 amd64/include dev/cpuctl i386/i386 x86/include x86/x86 Thread-Topic: svn commit: r328625 - in head/sys: amd64/amd64 amd64/ia32 amd64/include dev/cpuctl i386/i386 x86/include x86/x86 Thread-Index: AQHTuBNDhcc79JhUek+qyDjid1KkGaPJHNaw Date: Sat, 10 Mar 2018 08:08:17 +0000 Message-ID: References: <201801311436.w0VEaRrZ030839@repo.freebsd.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=decui@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-03-10T08:08:12.3768733Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [2601:600:a27f:df20:5552:156f:4633:2a34] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; KL1P15301MB0039; 7:m7a4E/nZaMSdAxr7+p6ZDRdFfxB2OIX1E+Gz/+SmqEnESsJ+r2J9zeaNUOxqgfpvMOpbYwIxLVw02MwqBSTudulEPUoWNq1z0uGoCQbg276NX/Rboz1XAZRkhzmZn0mDaPhh6w8MaKu9jpHXVQwOTswKKjGN84E5mP19juV53+H71VtSDXu8RkKmN9MjAhXRDQKgDaDLoAPJOQsy5nYshTX+3ivavHjMDI7VCVDxdilGoryvtyCa9QuBmDIwihSz; 20:RsqCFpCf3Bm5rE3w6NHtxzxGF3B1oXIwsAAUroA3ndmUF4uX2HWHXaIc5KWzkbedogID4CbPNLxAvJXvY3iyvzKrdT6Ialtu/t7sHI/5JDY+g7wIOblVHmUh+Whd1r3mk2FGdcTJsiPYsyiwu2VfQWt5teKZKsDVSRSUtRJbOxY= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 56558a5d-3df3-4f23-bd31-08d5865e14d7 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:KL1P15301MB0039; x-ms-traffictypediagnostic: KL1P15301MB0039: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231220)(944501244)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041310)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:KL1P15301MB0039; BCL:0; PCL:0; RULEID:; SRVR:KL1P15301MB0039; x-forefront-prvs: 06070568C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(366004)(346002)(39380400002)(39860400002)(189003)(51914003)(199004)(10090500001)(2900100001)(110136005)(59450400001)(76176011)(86612001)(46003)(5660300001)(97736004)(2906002)(7696005)(9686003)(6116002)(10290500003)(316002)(86362001)(99286004)(3280700002)(478600001)(186003)(22452003)(54906003)(229853002)(4326008)(2950100002)(6246003)(53546011)(6506007)(8676002)(81156014)(8936002)(33656002)(53936002)(39060400002)(55016002)(6436002)(68736007)(77096007)(105586002)(305945005)(7736002)(3660700001)(106356001)(14454004)(8990500004)(102836004)(74316002)(81166006)(25786009); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1P15301MB0039; H:KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /ZfwplysqGzMgKAdMbnAMmW6qQGi/Wwc4SaoTDTriMX86nFmnHtd/REEm5SGBezaa/t37GVLD79KbzUlru911gGqWCA3W00Y/sNc9nkkpSnZwOo56ZvxLIAj2BVgfXadulZUHXr7qGFAtr/61lTns7fOvZohiehDFQQAeabHyVPVZCuXeSOTx+++MgrdHp4l47cl2pMu6mF6iBz+NzJnqWtqVIiEQg95xdWVXWQa9GE3mdPADbRPCDCSXhst6hVFDCquw9p8ZICp91qWuuTwUFLS2kReP3CS0IDO/r8aKtclWMzPbpfLblaohrztt/5HP9Wb+BBrkRxN932GU8B8RA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56558a5d-3df3-4f23-bd31-08d5865e14d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Mar 2018 08:08:17.3520 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1P15301MB0039 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 08:08:37 -0000 PiBGcm9tOiBjYXJwZWRkaWVtQGdtYWlsLmNvbSA8Y2FycGVkZGllbUBnbWFpbC5jb20+IE9uIEJl aGFsZiBPZiBFZA0KPiBNYXN0ZQ0KPiBTZW50OiBGcmlkYXksIE1hcmNoIDksIDIwMTggMTc6NTgN Cj4gT24gOSBNYXJjaCAyMDE4IGF0IDE5OjQxLCBEZXh1YW4tQlNEIEN1aSA8ZGV4dWFuLmJzZEBn bWFpbC5jb20+IHdyb3RlOg0KPiA+IEhpLA0KPiA+DQo+ID4gSW4gbXkgRnJlZUJTRCAxMS4xIFZN LCBJJ20gZ2V0dGluZyB0aGlzIGJ1aWxkIGZhaWx1cmUgYW5kIGl0IGxvb2tzDQo+ID4gdGhpcyBy ZXZpc2lvbiBjYXVzZXMgdGhlIGZhaWx1cmU6DQo+ID4NCj4gPiAvcm9vdC9ic2QuZ2l0L3N5cy9h bWQ2NC9hbWQ2NC9zdXBwb3J0LlM6ODU1OjI6IGVycm9yOiB1bmtub3duIGRpcmVjdGl2ZQ0KPiA+ ICAuYWx0bWFjcm8NCj4gPiAgXg0KPiANCj4gQXJlIHlvdSB0cnlpbmcgdG8gYnVpbGQgYSBoZWFk IGtlcm5lbCB1c2luZyB0aGUgdG9vbGNoYWluIGluIDExLjE/DQoNClllcy4NCg0KPiBUaGF0IHdv bid0IHdvcmsgKGJlY2F1c2Ugb2YgbWlzc2luZyAuYWx0bWFjcm8gc3VwcG9ydCkuIEJ1aWxkaW5n DQo+IGtlcm5lbC10b29sY2hhaW4gZmlyc3Qgc2hvdWxkIGdldCBhIHdvcmtpbmcgdG9vbGNoYWlu Lg0KDQoibWFrZSBrZXJuZWwtdG9vbGNoYWluIiBmaXJzdCB3b3JrcyBmb3IgbWUhIDotKQ0KDQpU aGFuayB5b3UsIEVkIQ0KIA0KPiA+IEl0IGxvb2tzIC1mbm8taW50ZWdyYXRlZC1hcyBtaWdodCBm aXggdGhlIGZhaWx1cmUgZm9yIG1lIGFjY29yZGluZyB0bzoNCj4gDQo+IEF2b2lkaW5nIHRoZSBp bnRlZ3JhdGVkIGFzc2VtYmxlciBpcyBpbmRlZWQgdGhlIHdvcmthcm91bmQgZm9yIHRoaXMNCj4g aXNzdWUsIGJ1dCB5b3UnbGwgd2FudCB0byBhcHBseSBpdCBvbmx5IHRvIHRoZSBhZmZlY3RlZCBm aWxlLg0KPiANCj4gS29zdGlrJ3MgMTEuMSBtZXJnZSBjYW5kaWRhdGUgcGF0Y2ggYWRkcyB0byBz eXMvY29uZi9NYWtlZmlsZS5hbWQ2NA0KPiBBU01fQ0ZMQUdTLnN1cHBvcnQuUz0gJHtDTEFOR19O T19JQVN9DQoNClRoYW5rcyBmb3IgdGhlIGV4cGxhbmF0aW9uLiBHb29kIHRvIGtub3cgdGhpcyEN Cg0KVGhhbmtzLA0KLS0gRGV4dWFuDQo= From owner-svn-src-all@freebsd.org Sat Mar 10 08:27:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49214F2CF24; Sat, 10 Mar 2018 08:27:44 +0000 (UTC) (envelope-from danfe@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 ED8EA69A52; Sat, 10 Mar 2018 08:27:43 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id E118D1C780; Sat, 10 Mar 2018 08:27:43 +0000 (UTC) Date: Sat, 10 Mar 2018 08:27:43 +0000 From: Alexey Dokuchaev To: Ian Lepore Cc: Eitan Adler , John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 Message-ID: <20180310082743.GB18340@FreeBSD.org> References: <201803050754.w257swAE001435@repo.freebsd.org> <6465173.s2nWvWCLOs@ralph.baldwin.cx> <8377086.JrIgVVMXMv@ralph.baldwin.cx> <20180309110240.GA77718@FreeBSD.org> <1520617802.84937.26.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1520617802.84937.26.camel@freebsd.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 08:27:44 -0000 On Fri, Mar 09, 2018 at 10:50:02AM -0700, Ian Lepore wrote: > On Fri, 2018-03-09 at 11:02 +0000, Alexey Dokuchaev wrote: > > I often have mixed feelings when I see lots of similar changes (i.e. > > that make up for better hardware support, esp. on a laptop) MFCed. > > I'd rather see laptop users run -CURRENT and leave -STABLE branches > > for very conservative (server?) users who can't/don't want to afford > > the risks of running -CURRENT or require ABI stability in a really > > long run, rather than binge-merging things. :-) > > > > By default it should be -CURRENT all over; it's a very good thing > > that we as a Project ourselves are doing this as part of our own > > dogfood eating strategy. > > Some of us have to use our freebsd machines to earn a living, and we > can't afford the time and resources to set our jobs aside and debug > our working machines on a daily basis. It's 2018 Ian, -CURRENT is not as much of a flux as it used to be (but it takes a lot more time to build now). Disks got larger, filesystems learned snapshots; one can update their machines and go back easily if things went south. Development, collaboration, testing/CI, etc. tools also got better, people no longer commit their WIP to -CURRENT in hope that it'll work (at least not as often as 15-20 years ago. :-) ./danfe From owner-svn-src-all@freebsd.org Sat Mar 10 08:43:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8238DF2D773; Sat, 10 Mar 2018 08:43:33 +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 3A40B6A497; Sat, 10 Mar 2018 08:43:33 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 19F0A1CC5D; Sat, 10 Mar 2018 08:43:33 +0000 (UTC) Date: Sat, 10 Mar 2018 08:43:33 +0000 From: Alexey Dokuchaev To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330705 - head/sbin/mount Message-ID: <20180310084333.GC18340@FreeBSD.org> References: <201803092132.w29LW8QD030490@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201803092132.w29LW8QD030490@repo.freebsd.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 08:43:33 -0000 On Fri, Mar 09, 2018 at 09:32:08PM +0000, Warner Losh wrote: > New Revision: 330705 > URL: https://svnweb.freebsd.org/changeset/base/330705 > > Log: > Remove decade's old whine about msdos vs msdosfs. > > Retain the compatibility silently though. Shouldn't it be the other way around? That is, after a decade of whining people would've updated their configs/scripts and old (deprecated) gimmick can now be removed? That's what usually implied by "deprecated", right? ./danfe > Modified: head/sbin/mount/mount.c > ... > @@ -589,11 +589,8 @@ mountfs(const char *vfstype, const char *spec, const c > optbuf = catopt(optbuf, "update"); > > /* Compatibility glue. */ > - if (strcmp(vfstype, "msdos") == 0) { > - warnx( > - "Using \"-t msdosfs\", since \"-t msdos\" is deprecated."); > + if (strcmp(vfstype, "msdos") == 0) > vfstype = "msdosfs"; > - } From owner-svn-src-all@freebsd.org Sat Mar 10 08:51:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCB76F2DAA0; Sat, 10 Mar 2018 08:51:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F6B16A805; Sat, 10 Mar 2018 08:51:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A3963B11; Sat, 10 Mar 2018 08:51:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A8p2tL070841; Sat, 10 Mar 2018 08:51:02 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A8p284070839; Sat, 10 Mar 2018 08:51:02 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803100851.w2A8p284070839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 10 Mar 2018 08:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330738 - in stable/11/bin/cat: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/bin/cat: . tests X-SVN-Commit-Revision: 330738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 08:51:02 -0000 Author: eadler Date: Sat Mar 10 08:51:02 2018 New Revision: 330738 URL: https://svnweb.freebsd.org/changeset/base/330738 Log: Revert MFC of r323865 While this behavior can be viewed as a bug fix, due to the fundamental nature of cat(1), leave this change only for a major version. PR: 210607 Requested by: sevan Modified: stable/11/bin/cat/cat.c stable/11/bin/cat/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/cat/cat.c ============================================================================== --- stable/11/bin/cat/cat.c Sat Mar 10 04:17:01 2018 (r330737) +++ stable/11/bin/cat/cat.c Sat Mar 10 08:51:02 2018 (r330738) @@ -225,16 +225,10 @@ cook_cat(FILE *fp) } else gobble = 0; } - if (nflag) { - if (!bflag || ch != '\n') { - (void)fprintf(stdout, "%6d\t", ++line); - if (ferror(stdout)) - break; - } else if (eflag) { - (void)fprintf(stdout, "%6s\t", ""); - if (ferror(stdout)) - break; - } + if (nflag && (!bflag || ch != '\n')) { + (void)fprintf(stdout, "%6d\t", ++line); + if (ferror(stdout)) + break; } } if (ch == '\n') { Modified: stable/11/bin/cat/tests/Makefile ============================================================================== --- stable/11/bin/cat/tests/Makefile Sat Mar 10 04:17:01 2018 (r330737) +++ stable/11/bin/cat/tests/Makefile Sat Mar 10 08:51:02 2018 (r330738) @@ -17,4 +17,10 @@ ${PACKAGE}FILES+= d_vt_output.out .include +d_align.out: ${TESTSRC}/d_align.out + sed -E -e 's,^[[:space:]]{7}\$$$$,\$$,' < ${.ALLSRC} > ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} + +CLEANFILES+= d_align.out d_align.out.tmp + .include From owner-svn-src-all@freebsd.org Sat Mar 10 09:17:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3178FF2EB53; Sat, 10 Mar 2018 09:17:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBBFF6B8A1; Sat, 10 Mar 2018 09:17:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D69C94035; Sat, 10 Mar 2018 09:17:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A9HqG8085810; Sat, 10 Mar 2018 09:17:52 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A9Hq87085809; Sat, 10 Mar 2018 09:17:52 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803100917.w2A9Hq87085809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 10 Mar 2018 09:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330739 - stable/11/lib/libc/rpc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/lib/libc/rpc X-SVN-Commit-Revision: 330739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 09:17:53 -0000 Author: eadler Date: Sat Mar 10 09:17:52 2018 New Revision: 330739 URL: https://svnweb.freebsd.org/changeset/base/330739 Log: MFC r330572: des_crypt.3: Fix typo. Modified: stable/11/lib/libc/rpc/des_crypt.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/rpc/des_crypt.3 ============================================================================== --- stable/11/lib/libc/rpc/des_crypt.3 Sat Mar 10 08:51:02 2018 (r330738) +++ stable/11/lib/libc/rpc/des_crypt.3 Sat Mar 10 09:17:52 2018 (r330739) @@ -108,7 +108,7 @@ vector upon return. No error. .It Bq Er DESERR_NOHWDEVICE Encryption succeeded, but done in software instead of the requested hardware. -.It Bq Er DESERR_HWERR +.It Bq Er DESERR_HWERROR An error occurred in the hardware or driver. .It Bq Er DESERR_BADPARAM Bad argument to routine. From owner-svn-src-all@freebsd.org Sat Mar 10 09:49:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A667F2F9EF; Sat, 10 Mar 2018 09:49:32 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A076C6C87C; Sat, 10 Mar 2018 09:49:31 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 23307260042; Sat, 10 Mar 2018 10:49:24 +0100 (CET) Subject: Re: svn commit: r330644 - in head/sys/dev/mlx5: . mlx5_core To: Alan Somers , "Conrad E. Meyer" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803080947.w289lArk031151@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Sat, 10 Mar 2018 10:49:20 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 09:49:32 -0000 On 03/10/18 04:38, Alan Somers wrote: > Yeah, looks like it's working now. Thanks. > No problem. Thanks for handling! --HPS From owner-svn-src-all@freebsd.org Sat Mar 10 09:49:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 966E3F2FA19; Sat, 10 Mar 2018 09:49:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35F266C980; Sat, 10 Mar 2018 09:49:53 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 704BA260042; Sat, 10 Mar 2018 10:49:52 +0100 (CET) Subject: Re: svn commit: r330644 - in head/sys/dev/mlx5: . mlx5_core To: Alan Somers , "Conrad E. Meyer" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803080947.w289lArk031151@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <8761469f-6d20-a676-5482-b4dcf49bf80e@selasky.org> Date: Sat, 10 Mar 2018 10:49:49 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 09:49:54 -0000 On 03/10/18 04:38, Alan Somers wrote: > Yeah, looks like it's working now. Thanks. > No problem, thanks for handling. --HPS From owner-svn-src-all@freebsd.org Sat Mar 10 13:27:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2695F374E9; Sat, 10 Mar 2018 13:27:03 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 774557359E; Sat, 10 Mar 2018 13:27:02 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 8492FE1A; Sat, 10 Mar 2018 07:27:00 -0600 (CST) Date: Sat, 10 Mar 2018 07:26:59 -0600 From: Mark Linimon To: Alexey Dokuchaev Cc: Ian Lepore , src-committers , Eitan Adler , John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 Message-ID: <20180310132659.GA27490@lonesome.com> References: <201803050754.w257swAE001435@repo.freebsd.org> <6465173.s2nWvWCLOs@ralph.baldwin.cx> <8377086.JrIgVVMXMv@ralph.baldwin.cx> <20180309110240.GA77718@FreeBSD.org> <1520617802.84937.26.camel@freebsd.org> <20180310082743.GB18340@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180310082743.GB18340@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 13:27:04 -0000 On Sat, Mar 10, 2018 at 08:27:43AM +0000, Alexey Dokuchaev wrote: > one can update their machines and go back easily if things went south. After wasting time, like I did most of Thursday. mcl From owner-svn-src-all@freebsd.org Sat Mar 10 13:48:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 420CCF38D3C; Sat, 10 Mar 2018 13:48:08 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8FAA74030; Sat, 10 Mar 2018 13:48:07 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id f14so11502320wre.8; Sat, 10 Mar 2018 05:48:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=IX5UlUbmctDBEeEQ8FaOsuoqxDWP1vN9eIAEuGN2064=; b=ujUlWL0ALAK1OyVjQKi671OqyF9/wLVgj1D2DQoOl/llogMJSss5zjbklnhNL4OwPG OFclmyFWinyGkh6LQBWwaVuU/P1V79aR8ugmBOzuhj7qpGPTXoSe9elHVxpXYo4hnLqi z/idTnsvl2p0TgTngU7rW742xiKfGhac2zsHL/nt4mu8vhY9C8YgamV4N5VkrAx6nrds fi4m+QY6NgUiMgz6iar0+ZDnn1hkeBTZ9I6eFXrMNw+AtSV9Pv9xWLd0sbWKvyBjt+1h FJnNY9Ye+MXiu/JI/xYuJCDxu/GHAphoTtx+ykilmgGJjdgzrkRoxKE8dGV/pOvF+ZSR XHdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=IX5UlUbmctDBEeEQ8FaOsuoqxDWP1vN9eIAEuGN2064=; b=XXp+uSG7pSelChoKsQM2FJbwPaAt70UpRA/HK84G5aNYQcVwXmQ3e0r0O9/X3nsnJb WulmGDIU9Z8LG65+TWyNI4U2VI/FYrv37rnb7+Z6qLAhhubUVsmp3mYgA8SC/mgjoddz i1XPfORw8Te7x7qGQVb65iFafut/wASd2f5D3hLX2fzaZAlWr/akZ1laq4gs75ipWREz gMRidi9W25FVuS04ijTe26Uo0VNKoKYkmxHn4/FFjfLbcfoZ9kP3l/XTHvxiL24mXldq LLTFmyUdyVF8AhK2qSlnjck8noeGCrlmnI3VXQUXVe5yOd539FR+ddLc9Yn8lBYGLKA7 7bmQ== X-Gm-Message-State: AElRT7F1oj0tcfs4tpmG8P3l/LME1jHPum+P3ih1F6pHVDW/DbnrNZc/ +HdzdAwprRhtdaCFgLKWuJWVDg== X-Google-Smtp-Source: AG47ELtKYcDrHnMaz9KqwLPSYksXBzhN3W4IGfOEyIsPpn3tO6w/nNfHxYWWsg7tubqCDizADT2+Lg== X-Received: by 10.223.195.204 with SMTP id d12mr1699202wrg.116.1520689686255; Sat, 10 Mar 2018 05:48:06 -0800 (PST) Received: from brick (cpc92302-cmbg19-2-0-cust461.5-4.cable.virginm.net. [82.1.209.206]) by smtp.gmail.com with ESMTPSA id l11sm2895892wrg.71.2018.03.10.05.48.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Mar 2018 05:48:05 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 10 Mar 2018 13:48:02 +0000 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: David Bright Cc: Ian Lepore , Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs Message-ID: <20180310134802.GA7708@brick> Mail-Followup-To: David Bright , Ian Lepore , Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801151925.w0FJPCKA019434@repo.freebsd.org> <20180309220940.GG6174@raichu> <1520634689.84937.74.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 13:48:08 -0000 On 0309T2136, David Bright wrote: > On Mar 9, 2018, at 17:31, Ian Lepore wrote: > > > > On Fri, 2018-03-09 at 17:09 -0500, Mark Johnston wrote: > >> > >> etc/rc.d/fsck doesn't know how to interpret the new exit code and now > >> just drops to a single-user shell when it is encountered. […] > >> > >> Is there any reason etc/rc.d/fsck shouldn't automatically retry (up to > > This is, in fact, the reason that I made the change I did. I was trying to put in a retry loop to rc.d/fsck, but found that I couldn’t get it to work because fsck and fsck_ffs were not exiting with non-zero status. The drop to single user is not really due to the specific (new) error code of 16, it is due to the fact that fsck_ffs is now exiting with a non-zero status when it hasn’t completely cleaned the file system; /any/ non-zero status would cause the current rc.d/fsck script to go to single user. Prior to my change, fsck_ffs was exiting with a zero status even though it had not completely cleaned the filesystem and told the user to run it again. > > > > > fsck_ffs already has a -R flag to automatically retry, wouldn't that be > > a better mechanism for handling this new type of retry? > > That’s true; however, there is currently no way to pass that flag through the filesystem-agnostic fsck wrapper called from rc.d/fsck to the filesystem-specific fsck_ffs program that it calls. One could implement a similar flag on the fsck wrapper to be passed along to the filesystem-specific checker, but I think fsck_ffs is the only one that currently implements such a flag. Sure there is. See /etc/defaults/rc.conf: fsck_y_flags="-T ffs:-R -T ufs:-R" # Additional flags for fsck -y From owner-svn-src-all@freebsd.org Sat Mar 10 14:10:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29073F3A98F for ; Sat, 10 Mar 2018 14:10:21 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8ED574D18 for ; Sat, 10 Mar 2018 14:10:20 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: c1424ca3-246c-11e8-91c6-33ffc249f3e8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id c1424ca3-246c-11e8-91c6-33ffc249f3e8; Sat, 10 Mar 2018 14:10:16 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2AEABHB010938; Sat, 10 Mar 2018 07:10:11 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1520691011.84937.115.camel@freebsd.org> Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs From: Ian Lepore To: David Bright Cc: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 10 Mar 2018 07:10:11 -0700 In-Reply-To: References: <201801151925.w0FJPCKA019434@repo.freebsd.org> <20180309220940.GG6174@raichu> <1520634689.84937.74.camel@freebsd.org> Content-Type: text/plain; charset="windows-1251" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 14:10:21 -0000 On Fri, 2018-03-09 at 21:36 -0500, David Bright wrote: > On Mar 9, 2018, at 17:31, Ian Lepore wrote: > > > > > > On Fri, 2018-03-09 at 17:09 -0500, Mark Johnston wrote: > > > > > > > > > etc/rc.d/fsck doesn't know how to interpret the new exit code and > > > now > > > just drops to a single-user shell when it is encountered. [] > > > > > > Is there any reason etc/rc.d/fsck shouldn't automatically retry > > > (up to > This is, in fact, the reason that I made the change I did. I was > trying to put in a retry loop to rc.d/fsck, but found that I couldnt > get it to work because fsck and fsck_ffs were not exiting with non- > zero status. The drop to single user is not really due to the > specific (new) error code of 16, it is due to the fact that fsck_ffs > is now exiting with a non-zero status when it hasnt completely > cleaned the file system; /any/ non-zero status would cause the > current rc.d/fsck script to go to single user. Prior to my change, > fsck_ffs was exiting with a zero status even though it had not > completely cleaned the filesystem and told the user to run it again. > > > > > > > fsck_ffs already has a -R flag to automatically retry, wouldn't > > that be > > a better mechanism for handling this new type of retry? > Thats true; however, there is currently no way to pass that flag > through the filesystem-agnostic fsck wrapper called from rc.d/fsck to > the filesystem-specific fsck_ffs program that it calls. One could > implement a similar flag on the fsck wrapper to be passed along to > the filesystem-specific checker, but I think fsck_ffs is the only one > that currently implements such a flag. > > fsck -T ffs:-R -- Ian From owner-svn-src-all@freebsd.org Sat Mar 10 14:21:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20C98F3BBE6; Sat, 10 Mar 2018 14:21:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3272755BF; Sat, 10 Mar 2018 14:21:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE0F37133; Sat, 10 Mar 2018 14:21:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2AELb10039108; Sat, 10 Mar 2018 14:21:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2AELbPO039089; Sat, 10 Mar 2018 14:21:37 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201803101421.w2AELbPO039089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 10 Mar 2018 14:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330740 - head/sys/dev/iscsi X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/dev/iscsi X-SVN-Commit-Revision: 330740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 14:21:38 -0000 Author: trasz Date: Sat Mar 10 14:21:37 2018 New Revision: 330740 URL: https://svnweb.freebsd.org/changeset/base/330740 Log: Check for duplicates when modifying an iSCSI session. Previously we did this check on open, but "iscsictl -M", or an iSCSI redirect received by iscsid(8) could end up with two sessions with the same target name and portal. MFC after: 2 weeks Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Sat Mar 10 09:17:52 2018 (r330739) +++ head/sys/dev/iscsi/iscsi.c Sat Mar 10 14:21:37 2018 (r330740) @@ -1983,6 +1983,7 @@ iscsi_ioctl_session_modify(struct iscsi_softc *sc, struct iscsi_session_modify *ism) { struct iscsi_session *is; + const struct iscsi_session *is2; iscsi_sanitize_session_conf(&ism->ism_conf); if (iscsi_valid_session_conf(&ism->ism_conf) == false) @@ -1991,14 +1992,42 @@ iscsi_ioctl_session_modify(struct iscsi_softc *sc, sx_xlock(&sc->sc_lock); TAILQ_FOREACH(is, &sc->sc_sessions, is_next) { ISCSI_SESSION_LOCK(is); - if (is->is_id == ism->ism_session_id) + if (is->is_id == ism->ism_session_id) { + /* Note that the session remains locked. */ break; + } ISCSI_SESSION_UNLOCK(is); } if (is == NULL) { sx_xunlock(&sc->sc_lock); return (ESRCH); } + + /* + * Prevent duplicates. + */ + TAILQ_FOREACH(is2, &sc->sc_sessions, is_next) { + if (is == is2) + continue; + + if (!!ism->ism_conf.isc_discovery != + !!is2->is_conf.isc_discovery) + continue; + + if (strcmp(ism->ism_conf.isc_target_addr, + is2->is_conf.isc_target_addr) != 0) + continue; + + if (ism->ism_conf.isc_discovery == 0 && + strcmp(ism->ism_conf.isc_target, + is2->is_conf.isc_target) != 0) + continue; + + ISCSI_SESSION_UNLOCK(is); + sx_xunlock(&sc->sc_lock); + return (EBUSY); + } + sx_xunlock(&sc->sc_lock); memcpy(&is->is_conf, &ism->ism_conf, sizeof(is->is_conf)); From owner-svn-src-all@freebsd.org Sat Mar 10 14:33:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99A71F3CD05; Sat, 10 Mar 2018 14:33:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BD9D75EBC; Sat, 10 Mar 2018 14:33:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35BA87312; Sat, 10 Mar 2018 14:33:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2AEX0A6045791; Sat, 10 Mar 2018 14:33:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2AEX0sa045790; Sat, 10 Mar 2018 14:33:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201803101433.w2AEX0sa045790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 10 Mar 2018 14:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330741 - head/usr.bin/iscsictl X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.bin/iscsictl X-SVN-Commit-Revision: 330741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 14:33:01 -0000 Author: trasz Date: Sat Mar 10 14:33:00 2018 New Revision: 330741 URL: https://svnweb.freebsd.org/changeset/base/330741 Log: Make iscsictl(1) display "Disabled" status for disabled sessions. MFC after: 2 weeks Modified: head/usr.bin/iscsictl/iscsictl.c Modified: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Sat Mar 10 14:21:37 2018 (r330740) +++ head/usr.bin/iscsictl/iscsictl.c Sat Mar 10 14:33:00 2018 (r330741) @@ -605,7 +605,8 @@ kernel_list(int iscsi_fd, const struct target *targ __ xo_emit("{V:name/%-36s/%s} {V:portal/%-16s/%s} ", conf->isc_target, conf->isc_target_addr); - if (state->iss_reason[0] != '\0') { + if (state->iss_reason[0] != '\0' && + conf->isc_enable != 0) { xo_emit("{V:state/%s}\n", state->iss_reason); } else { if (conf->isc_discovery) { From owner-svn-src-all@freebsd.org Sat Mar 10 14:36:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C43D2F3D24F for ; Sat, 10 Mar 2018 14:36:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (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 3F60376166 for ; Sat, 10 Mar 2018 14:36:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x234.google.com with SMTP id c11so6023675ith.4 for ; Sat, 10 Mar 2018 06:36:18 -0800 (PST) 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=jCUdP2C8Lwn2SoR5036EqJYn3tC4YArryirbMBoiy58=; b=WDoRk+yQVqfKcxkm+X5mQqqyTqzKCGZi4z9fY3CMVVPE/AVhvHPTvLzHajF+h1DW5T nhhhzARwJ54Lf9y/7LoT6barWP7gAGCDNxoeoaPhvTZPJ+SPLmDuFI7LTJadtYnnBMqL eHdzFMH8dDizguJK1JP/kHgk/IFC78IaP29CouvKHPwbEjo6m9CVFGFOEoVzOoFL7A// RgYjVBqW+pBIBHTpprQjscNXmzKiSg/K86K9W9hDYDyinqxRiItAk0qNOMrlq6MZ1RLS WRJMPbUymaWVookMDYi0FGxeNnjJ+ybmALSAuNW8pmIc3IXVD1RncaYTAFF0qGOOY/co jfDA== 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=jCUdP2C8Lwn2SoR5036EqJYn3tC4YArryirbMBoiy58=; b=BtAezjJaZDgzqCb3DUGVDeKCrL6gUrvfFIYACQfX0Rp0FpCkg7IxDZarkr5z3SpWmB ncObBXnd5KvSDN5ecCmdcMGRObddHcWApK5Ofo0AbzzB3/myvR4OOxhOtfJ3C/ynpW2m yJxLQEFe/4nNvJfmcbJAwkA6O1Gt7Ncpywbb5k0WAFMmUskXiU9wPkdvb07EU9+UuduU AE2t1ouiJhgb9XJhd/twCXkqeVLJ9oICGwDimOJ7klvyf3KbXnwvk9aOnCbPZwlWXSur A4tAQQX1JzgwyTzbj8JDrssB8HPypq0zutphVXBdIU1P6gvFG3OFVo6/qSDLKyce6AB8 dIRA== X-Gm-Message-State: AElRT7GW3/QHG6/mm/olpXHezhBc+FrOaw1hla0G9qCM17KHF5ycgIdZ biVxxSrSe1Z9adB4kkl4QA57rm8GkkYH7gmgc+nzfA== X-Google-Smtp-Source: AG47ELvx6K0JWkss8cmoT94mhbZvAcM40tT851mhzMLKl13QGhOm3ShV3pCXjDoEA41u2myMrVk/tr7pmw0Ax4M/lHo= X-Received: by 10.36.148.204 with SMTP id j195mr1912063ite.1.1520692577283; Sat, 10 Mar 2018 06:36:17 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Sat, 10 Mar 2018 06:36:16 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:18a2:a4f7:170:8dd9] In-Reply-To: <20180310084333.GC18340@FreeBSD.org> References: <201803092132.w29LW8QD030490@repo.freebsd.org> <20180310084333.GC18340@FreeBSD.org> From: Warner Losh Date: Sat, 10 Mar 2018 07:36:16 -0700 X-Google-Sender-Auth: C3FSSJvFL5gKZVB9G0obR2L9Om4 Message-ID: Subject: Re: svn commit: r330705 - head/sbin/mount To: Alexey Dokuchaev Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 14:36:19 -0000 On Sat, Mar 10, 2018 at 1:43 AM, Alexey Dokuchaev wrote: > On Fri, Mar 09, 2018 at 09:32:08PM +0000, Warner Losh wrote: > > New Revision: 330705 > > URL: https://svnweb.freebsd.org/changeset/base/330705 > > > > Log: > > Remove decade's old whine about msdos vs msdosfs. > > > > Retain the compatibility silently though. > > Shouldn't it be the other way around? That is, after a decade of whining > people would've updated their configs/scripts and old (deprecated) gimmick > can now be removed? That's what usually implied by "deprecated", right? > Nope. We accept both because even after a decade, people's fingers haven't changed. The original change was poorly socialized and met with scorn at the time. It's better to just accept both as some people have changed and others haven't. The 'deprecated' part never took hold, so I just removed the warning because the consensus is we are never going to stop accepting both. Warner > ./danfe > > > Modified: head/sbin/mount/mount.c > > ... > > @@ -589,11 +589,8 @@ mountfs(const char *vfstype, const char *spec, > const c > > optbuf = catopt(optbuf, "update"); > > > > /* Compatibility glue. */ > > - if (strcmp(vfstype, "msdos") == 0) { > > - warnx( > > - "Using \"-t msdosfs\", since \"-t msdos\" is > deprecated."); > > + if (strcmp(vfstype, "msdos") == 0) > > vfstype = "msdosfs"; > > - } > From owner-svn-src-all@freebsd.org Sat Mar 10 16:17:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3212DF45040; Sat, 10 Mar 2018 16:17:08 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::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 B55C079531; Sat, 10 Mar 2018 16:17:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it0-x244.google.com with SMTP id c11so6204053ith.4; Sat, 10 Mar 2018 08:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=oEzYCbTZx2M25e8uryn4V6B1YmIDY8xCs9ZzBe+uksM=; b=ZBE8vpvm4wz8HYfLKk5O4lnwowzsM0oygwcyqlHS0vAJvsRH6Bh9PzEWrzsKCAuNfH DAenuKGy33MQSmcLUawkFJeyspL20eBFIJHnvhuAD99xDx3ADeh+faB4hXjGeYAwMSXf A3qtNT7ZXRF/OP6Hw9JhdIbjSseB/VOPAXTf8eg5V2yEN3drNZlDXIYczfBpnRZz0frm RP1YbmPozPmQvQFQjrMozft+ejsXHjy03XC/GeSv+w6PtFXr+Ww4x8lmLc7AjW+wDnnj dkglu3lTLabELYuAVUkqby9WNWqvdRLPIiBm9lzjsBK7yocsw++h/W41CdsblhuTgU1I sIfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=oEzYCbTZx2M25e8uryn4V6B1YmIDY8xCs9ZzBe+uksM=; b=Ajpzf9pgxGs5Ocg7YsPFodyuDNnSWhDet/MDPgQkSKF5iaUAbyfu5yUWb7EesyQfjz Uzhzc2fMM0JitDcN6x9nXpoMCkmxp9blVuv5flExZ1TmBvHDBYigJznLpKPztm2TBYHn wfats8UiQ9p3mmKszLBIZXqIXRdQDes82HjrHW54q5p8I0boEaJinZIkabhaIKXZgXwA Weqrq0siqAT9jteGzds6wFsTXkva6yWIxm+cEwTYzP6ZyjVW+nxcZDAMQjGUoTEmAXHH v9ZdkikPgz/cMJOyDUePvSjkNvArZY2wF8WeA9yIT3I921ieXNkY/p2PLNOLwQJhmOdN UkOg== X-Gm-Message-State: AElRT7FP3CTh2yaRtSNCCXzNF25QikCKGdxKMvhR5F3HL8WFkJV98YCM Z/L9odOprMxfGVjneB0J9CihlQ== X-Google-Smtp-Source: AG47ELun5+DRh277+6WrawQ23giNrZzgEo4hbp/S6OBLlSKulQDMieYOdPK8vInk+X+uAYgoHixOgQ== X-Received: by 10.36.101.194 with SMTP id u185mr2174110itb.124.1520698626812; Sat, 10 Mar 2018 08:17:06 -0800 (PST) Received: from raichu (toroon0560w-lp130-01-174-88-76-226.dsl.bell.ca. [174.88.76.226]) by smtp.gmail.com with ESMTPSA id s1sm2451387ioe.79.2018.03.10.08.17.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Mar 2018 08:17:05 -0800 (PST) Sender: Mark Johnston Date: Sat, 10 Mar 2018 11:17:01 -0500 From: Mark Johnston To: David Bright Cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs Message-ID: <20180310161701.GA73335@raichu> References: <201801151925.w0FJPCKA019434@repo.freebsd.org> <20180309220940.GG6174@raichu> <1520634689.84937.74.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 16:17:08 -0000 On Fri, Mar 09, 2018 at 09:36:25PM -0500, David Bright wrote: > On Mar 9, 2018, at 17:31, Ian Lepore wrote: > > > > On Fri, 2018-03-09 at 17:09 -0500, Mark Johnston wrote: > >> > >> etc/rc.d/fsck doesn't know how to interpret the new exit code and now > >> just drops to a single-user shell when it is encountered. […] > >> > >> Is there any reason etc/rc.d/fsck shouldn't automatically retry (up to > > This is, in fact, the reason that I made the change I did. I was trying to put in a retry loop to rc.d/fsck, but found that I couldn’t get it to work because fsck and fsck_ffs were not exiting with non-zero status. The drop to single user is not really due to the specific (new) error code of 16, it is due to the fact that fsck_ffs is now exiting with a non-zero status when it hasn’t completely cleaned the file system; Sure, but that's a regression IMO: before, I believe we'd successfully mount the FS even without retrying fsck, and continue booting. > /any/ non-zero status would cause the current rc.d/fsck script to go to single user. Prior to my change, fsck_ffs was exiting with a zero status even though it had not completely cleaned the filesystem and told the user to run it again. > > > > > fsck_ffs already has a -R flag to automatically retry, wouldn't that be > > a better mechanism for handling this new type of retry? > > That’s true; however, there is currently no way to pass that flag through the filesystem-agnostic fsck wrapper called from rc.d/fsck to the filesystem-specific fsck_ffs program that it calls. One could implement a similar flag on the fsck wrapper to be passed along to the filesystem-specific checker, but I think fsck_ffs is the only one that currently implements such a flag. As was pointed out by others, this isn't true. In my experience it's fsck -p that is exiting with status 16. It thus seems like it would be desirable to add "-T ffs:-R" to the initial fsck invocation in rc.d/fsck. From owner-svn-src-all@freebsd.org Sat Mar 10 16:44:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AAE5F46F6B; Sat, 10 Mar 2018 16:44:14 +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 553427A5AB; Sat, 10 Mar 2018 16:44:12 +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 w2AGiALV070243; Sat, 10 Mar 2018 08:44:10 -0800 (PST) (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 w2AGiA0x070242; Sat, 10 Mar 2018 08:44:10 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803101644.w2AGiA0x070242@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs In-Reply-To: <20180310161701.GA73335@raichu> To: Mark Johnston Date: Sat, 10 Mar 2018 08:44:10 -0800 (PST) CC: David Bright , Ian Lepore , 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 16:44:14 -0000 [ Charset UTF-8 unsupported, converting... ] > On Fri, Mar 09, 2018 at 09:36:25PM -0500, David Bright wrote: > > On Mar 9, 2018, at 17:31, Ian Lepore wrote: > > > > > > On Fri, 2018-03-09 at 17:09 -0500, Mark Johnston wrote: > > >> > > >> etc/rc.d/fsck doesn't know how to interpret the new exit code and now > > >> just drops to a single-user shell when it is encountered. [?] > > >> > > >> Is there any reason etc/rc.d/fsck shouldn't automatically retry (up to > > > > This is, in fact, the reason that I made the change I did. I was trying to put in a retry loop to rc.d/fsck, but found that I couldn?t get it to work because fsck and fsck_ffs were not exiting with non-zero status. The drop to single user is not really due to the specific (new) error code of 16, it is due to the fact that fsck_ffs is now exiting with a non-zero status when it hasn?t completely cleaned the file system; > > Sure, but that's a regression IMO: before, I believe we'd successfully > mount the FS even without retrying fsck, and continue booting. > > > /any/ non-zero status would cause the current rc.d/fsck script to go to single user. Prior to my change, fsck_ffs was exiting with a zero status even though it had not completely cleaned the filesystem and told the user to run it again. > > > > > > > > fsck_ffs already has a -R flag to automatically retry, wouldn't that be > > > a better mechanism for handling this new type of retry? > > > > That?s true; however, there is currently no way to pass that flag through the filesystem-agnostic fsck wrapper called from rc.d/fsck to the filesystem-specific fsck_ffs program that it calls. One could implement a similar flag on the fsck wrapper to be passed along to the filesystem-specific checker, but I think fsck_ffs is the only one that currently implements such a flag. > > As was pointed out by others, this isn't true. In my experience it's > fsck -p that is exiting with status 16. It thus seems like it would be > desirable to add "-T ffs:-R" to the initial fsck invocation in > rc.d/fsck. Please do not do that, if fsck -p fails YOU may optionally wish to continue, or do retries, but please do not make this a hardcoded situation. At most make it a controllable knob that defaults to the old behavior please. Thanks you, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sat Mar 10 16:56:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B859F47DE1 for ; Sat, 10 Mar 2018 16:56:49 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A27E97ACA5 for ; Sat, 10 Mar 2018 16:56:48 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 029c809c-2484-11e8-91c6-33ffc249f3e8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 029c809c-2484-11e8-91c6-33ffc249f3e8; Sat, 10 Mar 2018 16:56:44 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2AGudHw011178; Sat, 10 Mar 2018 09:56:39 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1520700999.84937.119.camel@freebsd.org> Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs From: Ian Lepore To: rgrimes@freebsd.org, Mark Johnston Cc: David Bright , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 10 Mar 2018 09:56:39 -0700 In-Reply-To: <201803101644.w2AGiA0x070242@pdx.rh.CN85.dnsmgr.net> References: <201803101644.w2AGiA0x070242@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 16:56:49 -0000 On Sat, 2018-03-10 at 08:44 -0800, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > > > On Fri, Mar 09, 2018 at 09:36:25PM -0500, David Bright wrote: > > > > > > On Mar 9, 2018, at 17:31, Ian Lepore wrote: > > > > > > > > > > > > On Fri, 2018-03-09 at 17:09 -0500, Mark Johnston wrote: > > > > > > > > > > > > > > > etc/rc.d/fsck doesn't know how to interpret the new exit code and now > > > > > just drops to a single-user shell when it is encountered. [?] > > > > > > > > > > Is there any reason etc/rc.d/fsck shouldn't automatically retry (up to > > > This is, in fact, the reason that I made the change I did. I was trying to put in a retry loop to rc.d/fsck, but found that I couldn?t get it to work because fsck and fsck_ffs were not exiting with non-zero status. The drop to single user is not really due to the specific (new) error code of 16, it is due to the fact that fsck_ffs is now exiting with a non-zero status when it hasn?t completely cleaned the file system; > > Sure, but that's a regression IMO: before, I believe we'd successfully > > mount the FS even without retrying fsck, and continue booting. > > > > > > > > /any/ non-zero status would cause the current rc.d/fsck script to go to single user. Prior to my change, fsck_ffs was exiting with a zero status even though it had not completely cleaned the filesystem and told the user to run it again. > > > > > > > > > > > > > > > fsck_ffs already has a -R flag to automatically retry, wouldn't that be > > > > a better mechanism for handling this new type of retry? > > > That?s true; however, there is currently no way to pass that flag through the filesystem-agnostic fsck wrapper called from rc.d/fsck to the filesystem-specific fsck_ffs program that it calls. One could implement a similar flag on the fsck wrapper to be passed along to the filesystem-specific checker, but I think fsck_ffs is the only one that currently implements such a flag. > > As was pointed out by others, this isn't true. In my experience it's > > fsck -p that is exiting with status 16. It thus seems like it would be > > desirable to add "-T ffs:-R" to the initial fsck invocation in > > rc.d/fsck. > Please do not do that, if fsck -p fails YOU may optionally > wish to continue, or do retries, but please do not make this > a hardcoded situation.At most make it a controllable knob > that defaults to the old behavior please. > > Thanks you, This whole situation with fsck retries is just very strange. How many other tools in the base system exhibit this behavior: I didn't do everything you asked, even though I am completely capable of doing so. If you'd like to actually do the thing you asked for, please run this program again. If there is some reason why fsck should do less than a complete job under some circumstances, isn't THAT the exceptional situation that should need a special flag to make it happen? -- Ian From owner-svn-src-all@freebsd.org Sat Mar 10 17:02:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEA63F4873C; Sat, 10 Mar 2018 17:02:58 +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 3A2967B33E; Sat, 10 Mar 2018 17:02:57 +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 w2AH2uir070388; Sat, 10 Mar 2018 09:02:56 -0800 (PST) (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 w2AH2uW6070387; Sat, 10 Mar 2018 09:02:56 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803101702.w2AH2uW6070387@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs In-Reply-To: <1520700999.84937.119.camel@freebsd.org> To: Ian Lepore Date: Sat, 10 Mar 2018 09:02:56 -0800 (PST) CC: rgrimes@freebsd.org, Mark Johnston , David Bright , 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 17:02:58 -0000 > On Sat, 2018-03-10 at 08:44 -0800, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > > > > > On Fri, Mar 09, 2018 at 09:36:25PM -0500, David Bright wrote: > > > > > > > > On Mar 9, 2018, at 17:31, Ian Lepore wrote: > > > > > > > > > > > > > > > On Fri, 2018-03-09 at 17:09 -0500, Mark Johnston wrote: > > > > > > > > > > > > > > > > > > etc/rc.d/fsck doesn't know how to interpret the new exit code and now > > > > > > just drops to a single-user shell when it is encountered. [?] > > > > > > > > > > > > Is there any reason etc/rc.d/fsck shouldn't automatically retry (up to > > > > This is, in fact, the reason that I made the change I did. I was trying to put in a retry loop to rc.d/fsck, but found that I couldn?t get it to work because fsck and fsck_ffs were not exiting with non-zero status. The drop to single user is not really due to the specific (new) error code of 16, it is due to the fact that fsck_ffs is now exiting with a non-zero status when it hasn?t completely cleaned the file system; > > > Sure, but that's a regression IMO: before, I believe we'd successfully > > > mount the FS even without retrying fsck, and continue booting. > > > > > > > > > > > /any/ non-zero status would cause the current rc.d/fsck script to go to single user. Prior to my change, fsck_ffs was exiting with a zero status even though it had not completely cleaned the filesystem and told the user to run it again. > > > > > > > > > > > > > > > > > > > fsck_ffs already has a -R flag to automatically retry, wouldn't that be > > > > > a better mechanism for handling this new type of retry? > > > > That?s true; however, there is currently no way to pass that flag through the filesystem-agnostic fsck wrapper called from rc.d/fsck to the filesystem-specific fsck_ffs program that it calls. One could implement a similar flag on the fsck wrapper to be passed along to the filesystem-specific checker, but I think fsck_ffs is the only one that currently implements such a flag.? > > > As was pointed out by others, this isn't true. In my experience it's > > > fsck -p that is exiting with status 16. It thus seems like it would be > > > desirable to add "-T ffs:-R" to the initial fsck invocation in > > > rc.d/fsck. > > Please do not do that, if fsck -p fails YOU may optionally > > wish to continue, or do retries, but please do not make this > > a hardcoded situation.??At most make it a controllable knob > > that defaults to the old behavior please. > > > > Thanks you, > > This whole situation with fsck retries is just very strange. ?How many > other tools in the base system exhibit this behavior:? > > I didn't do everything you asked, even though I am completely > capable of doing so. ?If you'd like to actually do the thing you > asked for, please run this program again. > > If there is some reason why fsck should do less than a complete job > under some circumstances, isn't THAT the exceptional situation that > should need a special flag to make it happen? The job is "make sure my data is ok, keep my data at all costs, do not however do something that may damange my data". The job is NOT "do everything you can to bring the file system to a consistent state, even if you have to screw my data all up". -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sat Mar 10 17:26:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4F21F4A2F3 for ; Sat, 10 Mar 2018 17:26:52 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48F1B7C007 for ; Sat, 10 Mar 2018 17:26:52 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 228c21c3-2488-11e8-bb8e-b35b57339d60 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 228c21c3-2488-11e8-bb8e-b35b57339d60; Sat, 10 Mar 2018 17:26:15 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2AHQgTO011245; Sat, 10 Mar 2018 10:26:42 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1520702802.84937.126.camel@freebsd.org> Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs From: Ian Lepore To: rgrimes@freebsd.org Cc: Mark Johnston , David Bright , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 10 Mar 2018 10:26:42 -0700 In-Reply-To: <201803101702.w2AH2uW6070387@pdx.rh.CN85.dnsmgr.net> References: <201803101702.w2AH2uW6070387@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 17:26:52 -0000 On Sat, 2018-03-10 at 09:02 -0800, Rodney W. Grimes wrote: > > > > On Sat, 2018-03-10 at 08:44 -0800, Rodney W. Grimes wrote: > > > [...] > > > > add "-T ffs:-R" to the initial fsck invocation in rc.d/fsck. > > > Please do not do that, if fsck -p fails YOU may optionally > > > wish to continue, or do retries, but please do not make this > > > a hardcoded situation.??At most make it a controllable knob > > > that defaults to the old behavior please. > > > > > > Thanks you, > > This whole situation with fsck retries is just very strange. ?How > > many other tools in the base system exhibit this behavior:? > > > > I didn't do everything you asked, even though I am completely > > capable of doing so. ?If you'd like to actually do the thing > > you asked for, please run this program again. > > > > If there is some reason why fsck should do less than a complete job > > under some circumstances, isn't THAT the exceptional situation that > > should need a special flag to make it happen? > The job is "make sure my data is ok, keep my data at all costs, do > not however do something that may damange my data". > > The job is NOT "do everything you can to bring the file system to > a consistent state, even if you have to screw my data all up". > I'm not sure why you think the -R flag is some sort of "ruin my data" request. Maybe because all of this stuff is so scantily documented in the manpage? -R Instruct fsck_ffs to restart itself if it encounters certain errors that warrant another run. Who knows what "certain errors" means? Looking at the code, it appears -R has no effect if you're in preen mode. Hmmm, what's "preen mode" again? Don't bother looking in the man page, you'll just find a bunch of mentions of the word preen that say "see the -p flag" and then, surrealistically, when you look at the -p flag it says "Preen file systems (see above)". Of course, what was above was all the places that told you to see -p. So, I guess I'll just keep using fsck_y_enable=YES and relying on the fact that by default that now includes the -R option. -- Ian From owner-svn-src-all@freebsd.org Sat Mar 10 17:32:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D87AF4AAA8 for ; Sat, 10 Mar 2018 17:32:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C4517C60E for ; Sat, 10 Mar 2018 17:32:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id h23so6902673iob.11 for ; Sat, 10 Mar 2018 09:32:27 -0800 (PST) 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=6FpKmWKB54NmMVxlzjpPfjamloACNJI+bj+HGzvEgs4=; b=zaLc8ThwWLTVZt8FboYScw8S9zVY5rfu4jGYVuLBrK64rFwz9S9mRGfPqhvg6tw++H didOZmRR25Hkl21TWSPQPSJyH6xsGAr+tYG4jRzBzXDC5lYrYTGuCAKOIsLrP+gnqDL+ FyATelfiB1knjCWNxBmSHNhmSTYqO9XC/bDZSsfKwXo4ply1DQ6u5wFq3jQbBeK8otVs 4C/Tg7zaQ27+qQv8FAy8jE2rr5ujppLs1cKZXtMs3VAKmp2CleYYby2ytIPaTrUbxiEk lclmPmFNe1EUTIZk1EAj+9uShoZc3bqErHobrkUNI9AcYbz0iudgFHjxn90DY20bCJ4U uPng== 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=6FpKmWKB54NmMVxlzjpPfjamloACNJI+bj+HGzvEgs4=; b=eG7Mq1iyNKHQvhafChcoVuAJ5eoinOc4HU2GsZFvVjx1AXWjDhRUZcek9HYNiOtIYn FdrKw2W4pQC2J6iU7It83c7svtWwFgowcDSYft/ejSPgXd8HMg/iUQlHx64xYzOnR89J eQCh7JBt8aeHOcWOZWJc5coH+Ihpy9NRzRnI0MlKWQZekLP2dW0/YHQkAbD/uSzhMVAt 7NmM/+tKhGwbKrvoHIqesYjYVtyXvy/huSFKPxcVgBOHLusvY1ZnTNFf0LYdjS+KUx2/ 4rNH2+SLh8jhtKXa10QY8lRQ6w6RcUVNwNnGQEqaB7GTQM927l9ta+dAWTFvYf4fTTsB /Kew== X-Gm-Message-State: AElRT7Gw/63vlaGOBVxWGAiFs/ai7jkCXeZTV9tXlI7iTcouTJBAo3bh 6+pCMZTLbzsCctMXyaEd42Lb7vbUjyRrRi8e4CrXCQ== X-Google-Smtp-Source: AG47ELsi0zdudY68rIV/Aub3mfm56C56c+nzLXS1egSQ8YzNGXHMyxrykfOWxKDeQzrdWBS2TQErOrdebeat8b0SQX4= X-Received: by 10.107.175.77 with SMTP id y74mr3013670ioe.37.1520703146387; Sat, 10 Mar 2018 09:32:26 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Sat, 10 Mar 2018 09:32:25 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:18a2:a4f7:170:8dd9] In-Reply-To: <1520702802.84937.126.camel@freebsd.org> References: <201803101702.w2AH2uW6070387@pdx.rh.CN85.dnsmgr.net> <1520702802.84937.126.camel@freebsd.org> From: Warner Losh Date: Sat, 10 Mar 2018 10:32:25 -0700 X-Google-Sender-Auth: 9qam31eKIv1q3FQhI83qAtwcYC8 Message-ID: Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs To: Ian Lepore Cc: "Rodney W. Grimes" , Mark Johnston , David Bright , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 17:32:27 -0000 On Sat, Mar 10, 2018 at 10:26 AM, Ian Lepore wrote: > On Sat, 2018-03-10 at 09:02 -0800, Rodney W. Grimes wrote: > > > > > > On Sat, 2018-03-10 at 08:44 -0800, Rodney W. Grimes wrote: > > > > > [...] > > > > > add "-T ffs:-R" to the initial fsck invocation in rc.d/fsck. > > > > Please do not do that, if fsck -p fails YOU may optionally > > > > wish to continue, or do retries, but please do not make this > > > > a hardcoded situation.??At most make it a controllable knob > > > > that defaults to the old behavior please. > > > > > > > > Thanks you, > > > This whole situation with fsck retries is just very strange. ?How > > > many other tools in the base system exhibit this behavior:? > > > > > > I didn't do everything you asked, even though I am completely > > > capable of doing so. ?If you'd like to actually do the thing > > > you asked for, please run this program again. > > > > > > If there is some reason why fsck should do less than a complete job > > > under some circumstances, isn't THAT the exceptional situation that > > > should need a special flag to make it happen? > > The job is "make sure my data is ok, keep my data at all costs, do > > not however do something that may damange my data". > > > > The job is NOT "do everything you can to bring the file system to > > a consistent state, even if you have to screw my data all up". > > > > I'm not sure why you think the -R flag is some sort of "ruin my data" > request. Maybe because all of this stuff is so scantily documented in > the manpage? > > -R Instruct fsck_ffs to restart itself if it encounters certain > errors that warrant another run. > > Who knows what "certain errors" means? > There are some classes of errors that fsck correct that it must recompute a large amount of state to make sure it is consistent. Rather than doing that, it exits with a message saying to re-run fsck to make sure that there aren't more errors that were hidden by the now-corrected errors from the past pass. > Looking at the code, it appears -R has no effect if you're in preen > mode. Hmmm, what's "preen mode" again? Don't bother looking in the > man page, you'll just find a bunch of mentions of the word preen that > say "see the -p flag" and then, surrealistically, when you look at the > -p flag it says "Preen file systems (see above)". Of course, what was > above was all the places that told you to see -p. > The man page could use some improvement. Preen mode means 'fix all the stupid inconsistencies that crop up that never result in data loss'. non-preen mode means to do that, and ask if you want to correct other errors that usually don't cause data loss, but might and some modicum of human intelligence is required to tell the two apart. Eg, I usually give up hitting 'y' after a dozen or so times in FSCK unless I have a specific reason to keep going. fsck -y has no such nuance. Warner > So, I guess I'll just keep using fsck_y_enable=YES and relying on the > fact that by default that now includes the -R option. > > -- Ian > > > From owner-svn-src-all@freebsd.org Sat Mar 10 17:51:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FB85F4C03C; Sat, 10 Mar 2018 17:51: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 B6B657D3AE; Sat, 10 Mar 2018 17:51:47 +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 w2AHphcK070579; Sat, 10 Mar 2018 09:51:43 -0800 (PST) (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 w2AHphph070578; Sat, 10 Mar 2018 09:51:43 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803101751.w2AHphph070578@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs In-Reply-To: To: Warner Losh Date: Sat, 10 Mar 2018 09:51:43 -0800 (PST) CC: Ian Lepore , "Rodney W. Grimes" , Mark Johnston , David Bright , 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 17:51:48 -0000 > On Sat, Mar 10, 2018 at 10:26 AM, Ian Lepore wrote: > > > On Sat, 2018-03-10 at 09:02 -0800, Rodney W. Grimes wrote: > > > > > > > > On Sat, 2018-03-10 at 08:44 -0800, Rodney W. Grimes wrote: > > > > > > > [...] > > > > > > add "-T ffs:-R" to the initial fsck invocation in rc.d/fsck. > > > > > Please do not do that, if fsck -p fails YOU may optionally > > > > > wish to continue, or do retries, but please do not make this > > > > > a hardcoded situation.??At most make it a controllable knob > > > > > that defaults to the old behavior please. > > > > > > > > > > Thanks you, > > > > This whole situation with fsck retries is just very strange. ?How > > > > many other tools in the base system exhibit this behavior:? > > > > > > > > I didn't do everything you asked, even though I am completely > > > > capable of doing so. ?If you'd like to actually do the thing > > > > you asked for, please run this program again. > > > > > > > > If there is some reason why fsck should do less than a complete job > > > > under some circumstances, isn't THAT the exceptional situation that > > > > should need a special flag to make it happen? > > > The job is "make sure my data is ok, keep my data at all costs, do > > > not however do something that may damange my data". > > > > > > The job is NOT "do everything you can to bring the file system to > > > a consistent state, even if you have to screw my data all up". > > > > > > > I'm not sure why you think the -R flag is some sort of "ruin my data" > > request. Maybe because all of this stuff is so scantily documented in > > the manpage? > > > > -R Instruct fsck_ffs to restart itself if it encounters certain > > errors that warrant another run. > > > > Who knows what "certain errors" means? > > > > There are some classes of errors that fsck correct that it must recompute a > large amount of state to make sure it is consistent. Rather than doing > that, it exits with a message saying to re-run fsck to make sure that there > aren't more errors that were hidden by the now-corrected errors from the > past pass. > > > > Looking at the code, it appears -R has no effect if you're in preen > > mode. Hmmm, what's "preen mode" again? Don't bother looking in the > > man page, you'll just find a bunch of mentions of the word preen that > > say "see the -p flag" and then, surrealistically, when you look at the > > -p flag it says "Preen file systems (see above)". Of course, what was > > above was all the places that told you to see -p. > > > > The man page could use some improvement. Preen mode means 'fix all the > stupid inconsistencies that crop up that never result in data loss'. > non-preen mode means to do that, and ask if you want to correct other > errors that usually don't cause data loss, but might and some modicum of > human intelligence is required to tell the two apart. Eg, I usually give up > hitting 'y' after a dozen or so times in FSCK unless I have a specific > reason to keep going. fsck -y has no such nuance. I do not believe that normal mode has any intellegnce to as if data loss will or will not occur. It will gladly ask you if you want to clear an inode that is the root of a rather large tree, and you end up with either data loss, or a huge lost+found, sometimes even over flowing the size of lost+found (though that may of been fixed in ufs2). It simply runs along and if it finds an error it asks if you want to correct it or not. Y is not always the correct answer, but most people are oblivious to what the questions imply with respect to the file system, and hence answer Y. fsck does do thing in a sequence that tries to make Y the correct answer, but as you say human intelligence may do better. Some times if you had answered N at the right question you would not of gotten all of the other 11 questions that lead you to giving up, sometimes the N answer maybe 100's of Y's in, often to a clear inode question. When I get a preen failure my usual next step is to run a logged fsck -n to see what that says so I can evaluate the extent of fs damage, especially if this is a critical file system containing very valuable data. > Warner > > > > So, I guess I'll just keep using fsck_y_enable=YES and relying on the > > fact that by default that now includes the -R option. And if your running ufs2 with soft updates your in a pretty safe place. I would not recommend doing this on ufs1 or without soft updates enabled. One must try to remeber that fsck -p during /etc/rc processing can run into many different file systems, some more resilent to running things like fsck -R -y, some not. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sat Mar 10 17:54:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84061F4C3D0; Sat, 10 Mar 2018 17:54:15 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A9EEF7D5FE; Sat, 10 Mar 2018 17:54:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with ESMTPA id uih8eZXamYxCTuihAeT7N6; Sat, 10 Mar 2018 10:54:12 -0700 X-Authority-Analysis: v=2.3 cv=cav8UELM c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=8nJEP1OIZ-IA:10 a=v2DPQv5-lfwA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=VZMtDPgJqhoKK3BJdpwA:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id A22F610F6; Sat, 10 Mar 2018 09:54:10 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w2AHsATJ038450; Sat, 10 Mar 2018 09:54:10 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w2AHsA2l038446; Sat, 10 Mar 2018 09:54:10 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201803101754.w2AHsA2l038446@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ian Lepore cc: rgrimes@freebsd.org, Mark Johnston , David Bright , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs In-Reply-To: Message from Ian Lepore of "Sat, 10 Mar 2018 10:26:42 -0700." <1520702802.84937.126.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sat, 10 Mar 2018 09:54:09 -0800 X-CMAE-Envelope: MS4wfOq7dyTWM4z8DrjMvRDhU5Mxp/n9SuDNoigL+OZRcBJugoCSSRgq4sO3zl81TDttbCMK8ZDKE+t8UQ1AJp2LEnXE6VFQnVPOJcyW/GGxmIxODGGzrKT7 v41hlhy4y2JpazTeOhaMwInd6YyD6WRfkiNyupC4c0TU4unvV6cCsUUcgtrO/3XjdpAvvFaIlaROgtI+4kMRw7vONs4yP/IdueSNmW3RiOhZ8IjF4E5p9Lu0 XqSNe2Ol9f6EM1ztM9X3GwpFA1tgpo66THA72bxHdWL6r4x0kc/UXlSh4k+5TBSDDpeMPsRYrqpypoDfy2ltStugbXz0N6ikUtCi6GpR/31he1+UUrij6SK1 hrn9zFyUMeI38dCR/BHs8LUz43oXSljre4PB3P0y12MVcIqiC9E= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 17:54:15 -0000 In message <1520702802.84937.126.camel@freebsd.org>, Ian Lepore writes: > On Sat, 2018-03-10 at 09:02 -0800, Rodney W. Grimes wrote: > > > > > > On Sat, 2018-03-10 at 08:44 -0800, Rodney W. Grimes wrote: > > > > > [...] > > > > > add "-T ffs:-R" to the initial fsck invocation in rc.d/fsck. > > > > Please do not do that, if fsck -p fails YOU may optionally > > > > wish to continue, or do retries, but please do not make this > > > > a hardcoded situation.??At most make it a controllable knob > > > > that defaults to the old behavior please. > > > > > > > > Thanks you, > > > This whole situation with fsck retries is just very strange. ?How > > > many other tools in the base system exhibit this behavior:? > > > > > >     I didn't do everything you asked, even though I am completely > > >     capable of doing so. ?If you'd like to actually do the thing > > >     you asked for, please run this program again. > > > > > > If there is some reason why fsck should do less than a complete job > > > under some circumstances, isn't THAT the exceptional situation that > > > should need a special flag to make it happen? > > The job is "make sure my data is ok, keep my data at all costs, do > > not however do something that may damange my data". > > > > The job is NOT "do everything you can to bring the file system to > > a consistent state, even if you have to screw my data all up". > > > > I'm not sure why you think the -R flag is some sort of "ruin my data" > request.  Maybe because all of this stuff is so scantily documented in > the manpage? > > -R Instruct fsck_ffs to restart itself if it encounters certain   >  errors that warrant another run. > > Who knows what "certain errors" means?   > > Looking at the code, it appears -R has no effect if you're in preen > mode.  Hmmm, what's "preen mode" again?  Don't bother looking in the > man page, you'll just find a bunch of mentions of the word preen that > say "see the -p flag" and then, surrealistically, when you look at the > -p flag it says "Preen file systems (see above)".  Of course, what was > above was all the places that told you to see -p. > > So, I guess I'll just keep using fsck_y_enable=YES and relying on the > fact that by default that now includes the -R option. That's how I've set up my firewall/gateway. For it I'm much more concerned to have it successfully boot than data loss. The reason is if I'm remote I want to be able to ssh back in. So, I'm willing to take the risk to be able to do so. Having said that, I maintain backup slices on an alternate disk in case of loss should the primary slice fail to boot. In that case data loss is tolerable to allow a better chance I can remotely ssh in. (Of course there's no 100% guarantee if there's data loss but it's better than 0% if the gateway dropped into single user state from the get-go.) With my other gear using UFS I want a failing fsck to fall to single user as I can get in using a console server to examine the damage decide for myself. Long story short, it depends. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sat Mar 10 18:07:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAA44F4D283; Sat, 10 Mar 2018 18:07:31 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D3E47DCDA; Sat, 10 Mar 2018 18:07:31 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 780A411465; Sat, 10 Mar 2018 18:07:31 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2AI7Vel073969; Sat, 10 Mar 2018 18:07:31 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2AI7Vt4073968; Sat, 10 Mar 2018 18:07:31 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803101807.w2AI7Vt4073968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 10 Mar 2018 18:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330742 - head/libexec/tftpd/tests X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/libexec/tftpd/tests X-SVN-Commit-Revision: 330742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 18:07:32 -0000 Author: asomers Date: Sat Mar 10 18:07:31 2018 New Revision: 330742 URL: https://svnweb.freebsd.org/changeset/base/330742 Log: tftpd: fix the build of tests on i386 after 330696 It's those darn printf format specifiers again Reported by: cy, kibab MFC after: 20 days X-MFC-With: 330696 Modified: head/libexec/tftpd/tests/functional.c Modified: head/libexec/tftpd/tests/functional.c ============================================================================== --- head/libexec/tftpd/tests/functional.c Sat Mar 10 14:33:00 2018 (r330741) +++ head/libexec/tftpd/tests/functional.c Sat Mar 10 18:07:31 2018 (r330742) @@ -248,10 +248,10 @@ require_bufeq(const char *expected, ssize_t expected_l ssize_t i; ATF_REQUIRE_EQ_MSG(expected_len, len, - "Expected %ld bytes but got %ld", expected_len, len); + "Expected %zd bytes but got %zd", expected_len, len); for (i = 0; i < len; i++) { ATF_REQUIRE_EQ_MSG(actual[i], expected[i], - "Expected %#hhx at position %ld; got %hhx instead", + "Expected %#hhx at position %zd; got %hhx instead", expected[i], i, actual[i]); } } From owner-svn-src-all@freebsd.org Sat Mar 10 18:08:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C650F4D3A9; Sat, 10 Mar 2018 18:08:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 396B57DE3A; Sat, 10 Mar 2018 18:08:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with ESMTPA id uiute19yJXziTuiuvePYIm; Sat, 10 Mar 2018 11:08:25 -0700 X-Authority-Analysis: v=2.3 cv=X6B81lbe c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=v2DPQv5-lfwA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=3tXnQLfBrKYg1UqCfHUA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id A2596113C; Sat, 10 Mar 2018 10:08:23 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w2AI8NAE038594; Sat, 10 Mar 2018 10:08:23 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w2AI8Ntn038591; Sat, 10 Mar 2018 10:08:23 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201803101808.w2AI8Ntn038591@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Warner Losh , Ian Lepore , Mark Johnston , David Bright , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs In-Reply-To: Message from "Rodney W. Grimes" of "Sat, 10 Mar 2018 09:51:43 -0800." <201803101751.w2AHphph070578@pdx.rh.CN85.dnsmgr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 10 Mar 2018 10:08:23 -0800 X-CMAE-Envelope: MS4wfPGkohg/cEn19TRWJLXdU9gEdLpuAvCa+EZ56bzIPpGlTTv0GLNzEhA1xXCwj+1QQq8Oi7c9nCObAMq8bgSbe9V9dszKiVf0RwO6BF4M70iLZlN3Wrge sKLnRpG/EbuqG42DGC0OtsNWxekyT9Jn8FtxDqarF2wzuLy6Ks1RyrPcY2IMOVBsAPipeAIimyw54esp+0hWZzqZeHxdjLy4EO5XXZk112Tfe5F4YYhjexqr fudYqpDZo2YIBClYuZPIRO4B02WB0ZeBeW1Hb+HxQHjL9AkI9JfKIuXTsV/GwZKR0WbMp20XJ+zQDETl+fakkwThd8/sHnD43t7EarUmBdX27IRK5ftBsotn ZZtCNBbVlbJm3uqakMabME2/B1U+tKxzMGLJsCa30DDEnelzEX7S3DM1cXSxDYg7bBAM+ExzfCnj5qoJS7HnwLEYIna8dQ== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 18:08:34 -0000 In message <201803101751.w2AHphph070578@pdx.rh.CN85.dnsmgr.net>, "Rodney W. Gri mes" writes: > > On Sat, Mar 10, 2018 at 10:26 AM, Ian Lepore wrote: > > > > > On Sat, 2018-03-10 at 09:02 -0800, Rodney W. Grimes wrote: > > > > > > > > > > On Sat, 2018-03-10 at 08:44 -0800, Rodney W. Grimes wrote: > > > > > > > > > [...] > > > > > > > add "-T ffs:-R" to the initial fsck invocation in rc.d/fsck. > > > > > > Please do not do that, if fsck -p fails YOU may optionally > > > > > > wish to continue, or do retries, but please do not make this > > > > > > a hardcoded situation.??At most make it a controllable knob > > > > > > that defaults to the old behavior please. > > > > > > > > > > > > Thanks you, > > > > > This whole situation with fsck retries is just very strange. ?How > > > > > many other tools in the base system exhibit this behavior:? > > > > > > > > > > I didn't do everything you asked, even though I am completely > > > > > capable of doing so. ?If you'd like to actually do the thing > > > > > you asked for, please run this program again. > > > > > > > > > > If there is some reason why fsck should do less than a complete job > > > > > under some circumstances, isn't THAT the exceptional situation that > > > > > should need a special flag to make it happen? > > > > The job is "make sure my data is ok, keep my data at all costs, do > > > > not however do something that may damange my data". > > > > > > > > The job is NOT "do everything you can to bring the file system to > > > > a consistent state, even if you have to screw my data all up". > > > > > > > > > > I'm not sure why you think the -R flag is some sort of "ruin my data" > > > request. Maybe because all of this stuff is so scantily documented in > > > the manpage? > > > > > > -R Instruct fsck_ffs to restart itself if it encounters certain > > > errors that warrant another run. > > > > > > Who knows what "certain errors" means? > > > > > > > There are some classes of errors that fsck correct that it must recompute a > > large amount of state to make sure it is consistent. Rather than doing > > that, it exits with a message saying to re-run fsck to make sure that there > > aren't more errors that were hidden by the now-corrected errors from the > > past pass. > > > > > > > Looking at the code, it appears -R has no effect if you're in preen > > > mode. Hmmm, what's "preen mode" again? Don't bother looking in the > > > man page, you'll just find a bunch of mentions of the word preen that > > > say "see the -p flag" and then, surrealistically, when you look at the > > > -p flag it says "Preen file systems (see above)". Of course, what was > > > above was all the places that told you to see -p. > > > > > > > The man page could use some improvement. Preen mode means 'fix all the > > stupid inconsistencies that crop up that never result in data loss'. > > non-preen mode means to do that, and ask if you want to correct other > > errors that usually don't cause data loss, but might and some modicum of > > human intelligence is required to tell the two apart. Eg, I usually give up > > hitting 'y' after a dozen or so times in FSCK unless I have a specific > > reason to keep going. fsck -y has no such nuance. > > I do not believe that normal mode has any intellegnce to as if data > loss will or will not occur. It will gladly ask you if you want to > clear an inode that is the root of a rather large tree, and you end > up with either data loss, or a huge lost+found, sometimes even over > flowing the size of lost+found (though that may of been fixed in ufs2). > > It simply runs along and if it finds an error it asks if you want > to correct it or not. Y is not always the correct answer, but > most people are oblivious to what the questions imply with respect > to the file system, and hence answer Y. fsck does do thing in > a sequence that tries to make Y the correct answer, but as you > say human intelligence may do better. > > Some times if you had answered N at the right question you would not > of gotten all of the other 11 questions that lead you to giving up, > sometimes the N answer maybe 100's of Y's in, often to a clear > inode question. > > When I get a preen failure my usual next step is to run a logged > fsck -n to see what that says so I can evaluate the extent of fs > damage, especially if this is a critical file system containing > very valuable data. > > > Warner > > > > > > > So, I guess I'll just keep using fsck_y_enable=YES and relying on the > > > fact that by default that now includes the -R option. > > And if your running ufs2 with soft updates your in a > pretty safe place. I would not recommend doing this on ufs1 > or without soft updates enabled. > > One must try to remeber that fsck -p during /etc/rc processing can > run into many different file systems, some more resilent to running > things like fsck -R -y, some not. Having been in this situation with FreeBSD, Solaris, Linux, and many other operating systems, if you have more than a reasonable number of inodes that need to be cleared and if time constrained, as a person usually is in a system down situation, you're better off simply recovering from backup. In those situations data loss is usually unrecoverable. In my experience it comes down to: do I bite the bullet now or do I continue to waste precious time? Having said that, if you have the time and recovery is too expensiveyou can use a binary editor avoid data loss. A co-worker and I spent 28 hours on five mainframe filesystems once. The reason management chose this was that even though there were backups the customer would have lost 24 hours of transactions. This was partially successful as all data except for one customer database were recovered. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sat Mar 10 18:08:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E39DF4D39B; Sat, 10 Mar 2018 18:08:31 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) (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 B34E37DE27; Sat, 10 Mar 2018 18:08:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22d.google.com with SMTP id i80-v6so17563184lfg.5; Sat, 10 Mar 2018 10:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5/nzZhjh1QOnMsOU7z2VDUl/ilXragolZBrsrvkynrU=; b=I+Lacq7xCWsm6JJWgWfKrj6e6tlKCdkasteD2T04N/9/KHKoQunArOjSfr7eHD05/K PM90h23IRnpvmKiaFF67CUd1In/82+5mk9lczkASHiN6uObyZ/pPJAZdbDo+wsKUlGls 4L4n5baOhb7SQE0yYeaB73q3G3QuBzCJYkHukkbHLz7fNRlns7RS8feV7C1okE02AEs7 rMBONemte/Hfp1rdrPz1W1Fm9eEpTIJ4t/HZGDxBjwWK1ZIYVQdM+ZEmbqZ9/Ap3qRN6 XtY5QSqlU+67qDFfCBRuftg7nID7G5UDUcu+7EICYwg1a6PGBxSfBYVRp2d8NWNGNegj miQg== 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=5/nzZhjh1QOnMsOU7z2VDUl/ilXragolZBrsrvkynrU=; b=uJyFbi7fPoxuK3gHCAxnD3Oqs8Grrf37Wh8vIc+oT+Br5uDST2kal7uw0SsvO5t6o2 ZQaed2Zabh1br4altR1Ww86zWk6JJQvqmro8Knc2d7y/EftT3GD4pvWo4xmo0dOIoFSj oniw52Vyf5E/fuKKIZVjH2RNIszwmbmNEnxoHocmV2y+8LKPgMelU0XNf55gMT8H0f/g MBk2mtPYe8VlyJsNCjbj61Fw7mJVsgvR7MRT+VjX84T6WASEDY1B1covGirbyoBLqzKQ b01UjzA4jFKdlGCvV6ELHlal6G2YeFuFnFr5p4tuH1RZza9QmGB06sEiBpOosrz3PG+Z ZP+w== X-Gm-Message-State: AElRT7F7nBGWxl46T10+bd18/uncl9vILT/B63+Ykgar52O9/uoQT5nR TCie9nW9O1EBohd2gxQM3x5rnY9HTtTJ8U1fuGMppw== X-Google-Smtp-Source: AG47ELtZ4HC2dstRt6Jvh12EIUQUezLrKSeWlbkOxeGL52tQxl60KIYkl5/AHA0uWU4e/KKATgdXgG4y7ZkDMquqK4Q= X-Received: by 10.46.86.201 with SMTP id k70mr1695523lje.16.1520705309021; Sat, 10 Mar 2018 10:08:29 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.2.195 with HTTP; Sat, 10 Mar 2018 10:08:28 -0800 (PST) In-Reply-To: References: <201803091530.w29FUKin041283@repo.freebsd.org> From: Alan Somers Date: Sat, 10 Mar 2018 11:08:28 -0700 X-Google-Sender-Auth: n1XRnaNF1HiFoF6iPPAG-RBuwf8 Message-ID: Subject: Re: svn commit: r330696 - in head/libexec/tftpd: . tests To: Ilya Bakulin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 18:08:32 -0000 Sorry, should be fixed by 330742. On Fri, Mar 9, 2018 at 11:49 PM, Ilya Bakulin wrote: > This broke build for at least ARM. > Fix: > diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/ > functional.c > index fea6870cac59..c467dfee3ba0 100644 > --- a/libexec/tftpd/tests/functional.c > +++ b/libexec/tftpd/tests/functional.c > @@ -248,10 +248,10 @@ require_bufeq(const char *expected, ssize_t > expected_len, const char *actual, > ssize_t i; > > ATF_REQUIRE_EQ_MSG(expected_len, len, > - "Expected %ld bytes but got %ld", expected_len, len); > + "Expected %zd bytes but got %zd", expected_len, len); > for (i = 0; i < len; i++) { > ATF_REQUIRE_EQ_MSG(actual[i], expected[i], > - "Expected %#hhx at position %ld; got %hhx instead", > + "Expected %#hhx at position %zd; got %hhx instead", > expected[i], i, actual[i]); > } > } > > On Sat, Mar 10, 2018 at 12:30 AM Alan Somers wrote: > >> Author: asomers >> Date: Fri Mar 9 15:30:20 2018 >> New Revision: 330696 >> URL: https://svnweb.freebsd.org/changeset/base/330696 >> >> Log: >> Add some functional tests for tftpd(8) >> >> tftpd(8) is difficult to test in isolation due to its relationship with >> inetd. Create a test program that mimics the behavior of tftp(1) and >> inetd(8) and verifies tftpd's response in several different scenarios. >> >> These test cases cover all of the basic TFTP protocol, but not the >> optional >> parts. >> >> PR: 157700 >> PR: 225996 >> PR: 226004 >> PR: 226005 >> MFC after: 3 weeks >> Differential Revision: https://reviews.freebsd.org/D14310 >> >> Added: >> head/libexec/tftpd/tests/ >> head/libexec/tftpd/tests/Makefile (contents, props changed) >> head/libexec/tftpd/tests/functional.c (contents, props changed) >> Modified: >> head/libexec/tftpd/Makefile >> >> Modified: head/libexec/tftpd/Makefile >> ============================================================ >> ================== >> --- head/libexec/tftpd/Makefile Fri Mar 9 14:45:47 2018 (r330695) >> +++ head/libexec/tftpd/Makefile Fri Mar 9 15:30:20 2018 (r330696) >> @@ -14,4 +14,7 @@ CFLAGS+= -DLIBWRAP >> LIBADD= wrap >> .endif >> >> +HAS_TESTS= >> +SUBDIR.${MK_TESTS}+= tests >> + >> .include >> >> Added: head/libexec/tftpd/tests/Makefile >> ============================================================ >> ================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/libexec/tftpd/tests/Makefile Fri Mar 9 15:30:20 2018 >> (r330696) >> @@ -0,0 +1,14 @@ >> +# $FreeBSD$ >> + >> +.include >> + >> +# Skip on GCC 4.2, because it lacks __COUNTER__ >> +.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40300 >> +ATF_TESTS_C= functional >> +TEST_METADATA.functional+= timeout=15 >> +.endif >> + >> +LIBADD= util >> +WARNS?= 6 >> + >> +.include >> >> Added: head/libexec/tftpd/tests/functional.c >> ============================================================ >> ================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/libexec/tftpd/tests/functional.c Fri Mar 9 15:30:20 >> 2018 (r330696) >> @@ -0,0 +1,1006 @@ >> +/*- >> + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD >> + * >> + * Copyright (c) 2018 Alan Somers. All rights reserved. >> + * Redistribution and use in source and binary forms, with or without >> + * modification, are permitted provided that the following conditions >> + * are met: >> + * 1. Redistributions of source code must retain the above copyright >> + * notice, this list of conditions and the following disclaimer. >> + * 2. Redistributions in binary form must reproduce the above copyright >> + * notice, this list of conditions and the following disclaimer in the >> + * documentation and/or other materials provided with the >> distribution. >> + * >> + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND >> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >> PURPOSE >> + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE >> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >> CONSEQUENTIAL >> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE >> GOODS >> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, >> STRICT >> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY >> WAY >> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >> + * SUCH DAMAGE. >> + */ >> + >> +#include >> +__FBSDID("$FreeBSD$"); >> + >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> + >> +static const uint16_t BASEPORT = 6969; >> +static const char pidfile[] = "tftpd.pid"; >> +static int protocol = PF_UNSPEC; >> +static int s = -1; /* tftp client socket */ >> +static struct sockaddr_storage addr; /* Destination address for the >> client */ >> +static bool s_flag = false; /* Pass -s to tftpd */ >> +static bool w_flag = false; /* Pass -w to tftpd */ >> + >> +/* Helper functions*/ >> +static void require_bufeq(const char *expected, ssize_t expected_len, >> + const char *actual, ssize_t len); >> + >> +/* >> + * Receive a response from tftpd >> + * @param hdr The reply's expected header, as a char >> array >> + * @param contents The reply's expected contents, as a char >> array >> + * @param contents_len Length of contents >> + */ >> +#define RECV(hdr, contents, contents_len) do { \ >> + char buffer[1024]; \ >> + struct sockaddr_storage from; \ >> + socklen_t fromlen = sizeof(from); \ >> + ssize_t r = recvfrom(s, buffer, sizeof(buffer), 0, \ >> + (struct sockaddr*)&from, &fromlen); \ >> + ATF_REQUIRE(r > 0); \ >> + require_bufeq((hdr), sizeof(hdr), buffer, \ >> + MIN(r, (ssize_t)sizeof(hdr))); \ >> + require_bufeq((const char*) (contents), (contents_len), \ >> + &buffer[sizeof(hdr)], r - sizeof(hdr)); \ >> + if (protocol == PF_INET) { \ >> + ((struct sockaddr_in*)&addr)->sin_port = \ >> + ((struct sockaddr_in*)&from)->sin_port; \ >> + } else { \ >> + ((struct sockaddr_in6*)&addr)->sin6_port = \ >> + ((struct sockaddr_in6*)&from)->sin6_port; \ >> + } \ >> +} while(0) >> + >> +static void >> +recv_ack(uint16_t blocknum) >> +{ >> + char hdr[] = {0, 4, blocknum >> 8, blocknum & 0xFF}; >> + RECV(hdr, NULL, 0); >> +} >> + >> +/* >> + * Receive a data packet from tftpd >> + * @param blocknum Expected block number to be received >> + * @param contents Pointer to expected contents >> + * @param contents_len Length of contents expected to receive >> + */ >> +static void >> +recv_data(uint16_t blocknum, const char* contents, size_t contents_len) >> +{ >> + char hdr[] = {0, 3, blocknum >> 8, blocknum & 0xFF}; >> + RECV(hdr, contents, contents_len); >> +} >> + >> +#define RECV_ERROR(code, msg) do { \ >> + char hdr[] = {0, 5, code >> 8, code & 0xFF}; \ >> + RECV(hdr, msg, sizeof(msg)); \ >> +} while (0) >> + >> +/* >> + * send a command to tftpd. >> + * @param cmd Command to send, as a char array >> + */ >> +static void >> +send_bytes(const void* cmd, ssize_t len) >> +{ >> + ssize_t r; >> + >> + r = sendto(s, cmd, len, 0, (struct sockaddr*)(&addr), >> addr.ss_len); >> + ATF_REQUIRE_EQ(r, len); >> +} >> + >> +static void >> +send_data(uint16_t blocknum, const char* contents, size_t contents_len) >> +{ >> + char buffer[1024]; >> + >> + buffer[0] = 0; /* DATA opcode high byte */ >> + buffer[1] = 3; /* DATA opcode low byte */ >> + buffer[2] = blocknum >> 8; >> + buffer[3] = blocknum & 0xFF; >> + memmove(&buffer[4], contents, contents_len); >> + send_bytes(buffer, 4 + contents_len); >> +} >> + >> +/* >> + * send a command to tftpd. >> + * @param cmd Command to send, as a const string >> + * (terminating NUL will be ignored) >> + */ >> +#define SEND_STR(cmd) ATF_REQUIRE_EQ( \ >> + sendto(s, (cmd), sizeof(cmd) - 1, 0, (struct sockaddr*)(&addr), \ >> + addr.ss_len), \ >> + sizeof(cmd) - 1) >> + >> +/* >> + * Acknowledge block blocknum >> + */ >> +static void >> +send_ack(uint16_t blocknum) >> +{ >> + char packet[] = { >> + 0, 4, /* ACK opcode in BE */ >> + blocknum >> 8, >> + blocknum & 0xFF >> + }; >> + >> + send_bytes(packet, sizeof(packet)); >> + >> +} >> + >> +/* >> + * send a read request to tftpd. >> + * @param filename filename as a string, absolute or relative >> + * @param mode either "octet" or "netascii" >> + */ >> +#define SEND_RRQ(filename, mode) SEND_STR("\0\001" filename "\0" mode >> "\0") >> + >> +/* >> + * send a write request to tftpd. >> + * @param filename filename as a string, absolute or relative >> + * @param mode either "octet" or "netascii" >> + */ >> +#define SEND_WRQ(filename, mode) SEND_STR("\0\002" filename "\0" mode >> "\0") >> + >> +/* Define a test case, for both IPv4 and IPv6 */ >> +#define TFTPD_TC_DEFINE(name, head, ...) \ >> +static void \ >> +name ## _body(void); \ >> +ATF_TC_WITH_CLEANUP(name ## _v4); \ >> +ATF_TC_HEAD(name ## _v4, tc) \ >> +{ \ >> + head \ >> +} \ >> +ATF_TC_BODY(name ## _v4, tc) \ >> +{ \ >> + __VA_ARGS__; \ >> + protocol = AF_INET; \ >> + s = setup(&addr, __COUNTER__); \ >> + name ## _body(); \ >> + close(s); \ >> +} \ >> +ATF_TC_CLEANUP(name ## _v4, tc) \ >> +{ \ >> + cleanup(); \ >> +} \ >> +ATF_TC_WITH_CLEANUP(name ## _v6); \ >> +ATF_TC_HEAD(name ## _v6, tc) \ >> +{ \ >> + head \ >> +} \ >> +ATF_TC_BODY(name ## _v6, tc) \ >> +{ \ >> + __VA_ARGS__; \ >> + protocol = AF_INET6; \ >> + s = setup(&addr, __COUNTER__); \ >> + name ## _body(); \ >> + close(s); \ >> +} \ >> +ATF_TC_CLEANUP(name ## _v6, tc) \ >> +{ \ >> + cleanup(); \ >> +} \ >> +static void \ >> +name ## _body(void) >> + >> +/* Add the IPv4 and IPv6 versions of a test case */ >> +#define TFTPD_TC_ADD(tp, name ) \ >> +do { \ >> + ATF_TP_ADD_TC(tp, name ## _v4); \ >> + ATF_TP_ADD_TC(tp, name ## _v6); \ >> +} while (0) >> + >> +/* Standard cleanup used by all testcases */ >> +static void >> +cleanup(void) >> +{ >> + int fd = -1; >> + char buffer[80] = {0}; >> + pid_t pid; >> + >> + fd = open(pidfile, O_RDONLY); >> + if (fd < 0) >> + return; >> + if (read(fd, buffer, sizeof(buffer)) > 0) { >> + sscanf(buffer, "%d", &pid); >> + kill(pid, SIGTERM); >> + waitpid(pid, NULL, 0); >> + } >> + close(fd); >> + unlink(pidfile); >> +} >> + >> +/* Assert that two binary buffers are identical */ >> +static void >> +require_bufeq(const char *expected, ssize_t expected_len, const char >> *actual, >> + ssize_t len) >> +{ >> + ssize_t i; >> + >> + ATF_REQUIRE_EQ_MSG(expected_len, len, >> + "Expected %ld bytes but got %ld", expected_len, len); >> + for (i = 0; i < len; i++) { >> + ATF_REQUIRE_EQ_MSG(actual[i], expected[i], >> + "Expected %#hhx at position %ld; got %hhx instead", >> + expected[i], i, actual[i]); >> + } >> +} >> + >> +/* >> + * Start tftpd and return its communicating socket >> + * @param to Will be filled in for use with sendto >> + * @param idx Unique identifier of the test case >> + * @return Socket ready to use >> + */ >> +static int >> +setup(struct sockaddr_storage *to, uint16_t idx) >> +{ >> + int client_s, server_s, pid, argv_idx; >> + char execname[] = "/usr/libexec/tftpd"; >> + char s_flag_str[] = "-s"; >> + char w_flag_str[] = "-w"; >> + char pwd[MAXPATHLEN]; >> + char *argv[10]; >> + struct sockaddr_in addr4; >> + struct sockaddr_in6 addr6; >> + struct sockaddr *server_addr; >> + struct pidfh *pfh; >> + uint16_t port = BASEPORT + idx; >> + socklen_t len; >> + >> + if (protocol == PF_INET) { >> + len = sizeof(addr4); >> + bzero(&addr4, len); >> + addr4.sin_len = len; >> + addr4.sin_family = PF_INET; >> + addr4.sin_port = htons(port); >> + server_addr = (struct sockaddr*)&addr4; >> + } else { >> + len = sizeof(addr6); >> + bzero(&addr6, len); >> + addr6.sin6_len = len; >> + addr6.sin6_family = PF_INET6; >> + addr6.sin6_port = htons(port); >> + server_addr = (struct sockaddr*)&addr6; >> + } >> + >> + ATF_REQUIRE_EQ(getcwd(pwd, sizeof(pwd)), pwd); >> + >> + /* Must bind(2) pre-fork so it happens before the client's >> send(2) */ >> + ATF_REQUIRE((server_s = socket(protocol, SOCK_DGRAM, 0)) > 0); >> + ATF_REQUIRE_EQ_MSG(bind(server_s, server_addr, len), 0, >> + "bind failed with error %s", strerror(errno)); >> + >> + pid = fork(); >> + switch (pid) { >> + case -1: >> + atf_tc_fail("fork failed"); >> + break; >> + case 0: >> + /* In child */ >> + pfh = pidfile_open(pidfile, 0644, NULL); >> + ATF_REQUIRE_MSG(pfh != NULL, >> + "pidfile_open: %s", strerror(errno)); >> + ATF_REQUIRE_EQ(pidfile_write(pfh), 0); >> + ATF_REQUIRE_EQ(pidfile_close(pfh), 0); >> + >> + bzero(argv, sizeof(argv)); >> + argv[0] = execname; >> + argv_idx = 1; >> + if (w_flag) >> + argv[argv_idx++] = w_flag_str; >> + if (s_flag) >> + argv[argv_idx++] = s_flag_str; >> + argv[argv_idx++] = pwd; >> + ATF_REQUIRE_EQ(dup2(server_s, STDOUT_FILENO), >> STDOUT_FILENO); >> + ATF_REQUIRE_EQ(dup2(server_s, STDIN_FILENO), >> STDIN_FILENO); >> + ATF_REQUIRE_EQ(dup2(server_s, STDERR_FILENO), >> STDERR_FILENO); >> + execv(execname, argv); >> + atf_tc_fail("exec failed"); >> + break; >> + default: >> + /* In parent */ >> + bzero(to, sizeof(*to)); >> + if (protocol == PF_INET) { >> + struct sockaddr_in *to4 = (struct sockaddr_in*)to; >> + to4->sin_len = sizeof(*to4); >> + to4->sin_family = PF_INET; >> + to4->sin_port = htons(port); >> + to4->sin_addr.s_addr = htonl(INADDR_LOOPBACK); >> + } else { >> + struct in6_addr loopback = IN6ADDR_LOOPBACK_INIT; >> + struct sockaddr_in6 *to6 = (struct >> sockaddr_in6*)to; >> + to6->sin6_len = sizeof(*to6); >> + to6->sin6_family = PF_INET6; >> + to6->sin6_port = htons(port); >> + to6->sin6_addr = loopback; >> + } >> + >> + close(server_s); >> + ATF_REQUIRE((client_s = socket(protocol, SOCK_DGRAM, 0)) >> > 0); >> + break; >> + } >> + return (client_s); >> +} >> + >> +/* Like write(2), but never returns less than the requested length */ >> +static void >> +write_all(int fd, const void *buf, size_t nbytes) >> +{ >> + ssize_t r; >> + >> + while (nbytes > 0) { >> + r = write(fd, buf, nbytes); >> + ATF_REQUIRE(r > 0); >> + nbytes -= r; >> + buf = (const char*)buf + r; >> + } >> +} >> + >> + >> +/* >> + * Test Cases >> + */ >> + >> +/* >> + * Read a file, specified by absolute pathname. >> + */ >> +TFTPD_TC_DEFINE(abspath,) >> +{ >> + int fd; >> + char command[1024]; >> + size_t pathlen; >> + char suffix[] = {'\0', 'o', 'c', 't', 'e', 't', '\0'}; >> + >> + command[0] = 0; /* RRQ high byte */ >> + command[1] = 1; /* RRQ low byte */ >> + ATF_REQUIRE(getcwd(&command[2], sizeof(command) - 2) != NULL); >> + pathlen = strlcat(&command[2], "/abspath.txt", sizeof(command) - >> 2); >> + ATF_REQUIRE(pathlen + sizeof(suffix) < sizeof(command) - 2); >> + memmove(&command[2 + pathlen], suffix, sizeof(suffix)); >> + >> + fd = open("abspath.txt", O_CREAT | O_RDONLY, 0644); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + >> + send_bytes(command, 2 + pathlen + sizeof(suffix)); >> + recv_data(1, NULL, 0); >> + send_ack(1); >> +} >> + >> +/* >> + * Attempt to read a file outside of the allowed directory(ies) >> + */ >> +TFTPD_TC_DEFINE(dotdot,) >> +{ >> + ATF_REQUIRE_EQ(mkdir("subdir", 0777), 0); >> + SEND_RRQ("../disallowed.txt", "octet"); >> + RECV_ERROR(2, "Access violation"); >> + s = setup(&addr, __COUNTER__); \ >> + SEND_RRQ("subdir/../../disallowed.txt", "octet"); >> + RECV_ERROR(2, "Access violation"); >> + s = setup(&addr, __COUNTER__); \ >> + SEND_RRQ("/etc/passwd", "octet"); >> + RECV_ERROR(2, "Access violation"); >> +} >> + >> +/* >> + * With "-s", tftpd should chroot to the specified directory >> + */ >> +TFTPD_TC_DEFINE(s_flag, atf_tc_set_md_var(tc, "require.user", "root");, >> + s_flag = true) >> +{ >> + int fd; >> + char contents[] = "small"; >> + >> + fd = open("small.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + write_all(fd, contents, strlen(contents) + 1); >> + close(fd); >> + >> + SEND_RRQ("/small.txt", "octet"); >> + recv_data(1, contents, strlen(contents) + 1); >> + send_ack(1); >> +} >> + >> +/* >> + * Read a file, and simulate a dropped ACK packet >> + */ >> +TFTPD_TC_DEFINE(rrq_dropped_ack,) >> +{ >> + int fd; >> + char contents[] = "small"; >> + >> + fd = open("small.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + write_all(fd, contents, strlen(contents) + 1); >> + close(fd); >> + >> + SEND_RRQ("small.txt", "octet"); >> + recv_data(1, contents, strlen(contents) + 1); >> + /* >> + * client "sends" the ack, but network drops it >> + * Eventually, tftpd should resend the data packet >> + */ >> + recv_data(1, contents, strlen(contents) + 1); >> + send_ack(1); >> +} >> + >> +/* >> + * Read a file, and simulate a dropped DATA packet >> + */ >> +TFTPD_TC_DEFINE(rrq_dropped_data,) >> +{ >> + int fd; >> + size_t i; >> + uint32_t contents[192]; >> + char buffer[1024]; >> + >> + for (i = 0; i < nitems(contents); i++) >> + contents[i] = i; >> + >> + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + write_all(fd, contents, sizeof(contents)); >> + close(fd); >> + >> + SEND_RRQ("medium.txt", "octet"); >> + recv_data(1, (const char*)&contents[0], 512); >> + send_ack(1); >> + (void) recvfrom(s, buffer, sizeof(buffer), 0, NULL, NULL); >> + /* >> + * server "sends" the data, but network drops it >> + * Eventually, client should resend the last ACK >> + */ >> + send_ack(1); >> + recv_data(2, (const char*)&contents[128], 256); >> + send_ack(2); >> +} >> + >> +/* >> + * Read a medium file, and simulate a duplicated ACK packet >> + */ >> +TFTPD_TC_DEFINE(rrq_duped_ack,) >> +{ >> + int fd; >> + size_t i; >> + uint32_t contents[192]; >> + >> + for (i = 0; i < nitems(contents); i++) >> + contents[i] = i; >> + >> + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + write_all(fd, contents, sizeof(contents)); >> + close(fd); >> + >> + SEND_RRQ("medium.txt", "octet"); >> + recv_data(1, (const char*)&contents[0], 512); >> + send_ack(1); >> + send_ack(1); /* Dupe an ACK packet */ >> + recv_data(2, (const char*)&contents[128], 256); >> + recv_data(2, (const char*)&contents[128], 256); >> + send_ack(2); >> +} >> + >> + >> +/* >> + * Attempt to read a file without read permissions >> + */ >> +TFTPD_TC_DEFINE(rrq_eaccess,) >> +{ >> + int fd; >> + >> + fd = open("empty.txt", O_CREAT | O_RDONLY, 0000); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + >> + SEND_RRQ("empty.txt", "octet"); >> + RECV_ERROR(2, "Access violation"); >> +} >> + >> +/* >> + * Read an empty file >> + */ >> +TFTPD_TC_DEFINE(rrq_empty,) >> +{ >> + int fd; >> + >> + fd = open("empty.txt", O_CREAT | O_RDONLY, 0644); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + >> + SEND_RRQ("empty.txt", "octet"); >> + recv_data(1, NULL, 0); >> + send_ack(1); >> +} >> + >> +/* >> + * Read a medium file of more than one block >> + */ >> +TFTPD_TC_DEFINE(rrq_medium,) >> +{ >> + int fd; >> + size_t i; >> + uint32_t contents[192]; >> + >> + for (i = 0; i < nitems(contents); i++) >> + contents[i] = i; >> + >> + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + write_all(fd, contents, sizeof(contents)); >> + close(fd); >> + >> + SEND_RRQ("medium.txt", "octet"); >> + recv_data(1, (const char*)&contents[0], 512); >> + send_ack(1); >> + recv_data(2, (const char*)&contents[128], 256); >> + send_ack(2); >> +} >> + >> +/* >> + * Read a file in netascii format >> + */ >> +TFTPD_TC_DEFINE(rrq_netascii,) >> +{ >> + int fd; >> + char contents[] = "foo\nbar\rbaz\n"; >> + /* >> + * Weirdly, RFC-764 says that CR must be followed by NUL if a >> line feed >> + * is not intended >> + */ >> + char expected[] = "foo\r\nbar\r\0baz\r\n"; >> + >> + fd = open("unix.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + write_all(fd, contents, strlen(contents) + 1); >> + close(fd); >> + >> + SEND_RRQ("unix.txt", "netascii"); >> + recv_data(1, expected, sizeof(expected)); >> + send_ack(1); >> +} >> + >> +/* >> + * Read a file that doesn't exist >> + */ >> +TFTPD_TC_DEFINE(rrq_nonexistent,) >> +{ >> + SEND_RRQ("nonexistent.txt", "octet"); >> + RECV_ERROR(1, "File not found"); >> +} >> + >> +/* >> + * Attempt to read a file whose name exceeds PATH_MAX >> + */ >> +TFTPD_TC_DEFINE(rrq_path_max,) >> +{ >> +#define AReallyBigFileName \ >> + "AReallyBigFileNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> XXXX"\ >> + ".txt" >> + ATF_REQUIRE_MSG(strlen(AReallyBigFileName) > PATH_MAX, >> + "Somebody increased PATH_MAX. Update the test"); >> + SEND_RRQ(AReallyBigFileName, "octet"); >> + RECV_ERROR(4, "Illegal TFTP operation"); >> +} >> + >> +/* >> + * Read a small file of less than one block >> + */ >> +TFTPD_TC_DEFINE(rrq_small,) >> +{ >> + int fd; >> + char contents[] = "small"; >> + >> + fd = open("small.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + write_all(fd, contents, strlen(contents) + 1); >> + close(fd); >> + >> + SEND_RRQ("small.txt", "octet"); >> + recv_data(1, contents, strlen(contents) + 1); >> + send_ack(1); >> +} >> + >> +/* >> + * Try to transfer a file with an unknown mode. >> + */ >> +TFTPD_TC_DEFINE(unknown_modes,) >> +{ >> + SEND_RRQ("foo.txt", "ascii"); /* Misspelling of "ascii" */ >> + RECV_ERROR(4, "Illegal TFTP operation"); >> + s = setup(&addr, __COUNTER__); \ >> + SEND_RRQ("foo.txt", "binary"); /* Obsolete. Use "octet" instead >> */ >> + RECV_ERROR(4, "Illegal TFTP operation"); >> + s = setup(&addr, __COUNTER__); \ >> + SEND_RRQ("foo.txt", "en_US.UTF-8"); >> + RECV_ERROR(4, "Illegal TFTP operation"); >> + s = setup(&addr, __COUNTER__); \ >> + SEND_RRQ("foo.txt", "mail"); /* Obsolete in RFC-1350 */ >> + RECV_ERROR(4, "Illegal TFTP operation"); >> +} >> + >> +/* >> + * Send an unknown opcode. tftpd should respond with the appropriate >> error >> + */ >> +TFTPD_TC_DEFINE(unknown_opcode,) >> +{ >> + /* Looks like an RRQ or WRQ request, but with a bad opcode */ >> + SEND_STR("\0\007foo.txt\0octet\0"); >> + atf_tc_expect_timeout("PR 226005 tftpd ignores bad opcodes but >> doesn't reject them"); >> + RECV_ERROR(4, "Illegal TFTP operation"); >> +} >> + >> +/* >> + * Invoke tftpd with "-w" and write to a nonexistent file. >> + */ >> +TFTPD_TC_DEFINE(w_flag,, w_flag = 1;) >> +{ >> + int fd; >> + ssize_t r; >> + char contents[] = "small"; >> + char buffer[1024]; >> + size_t contents_len; >> + >> + contents_len = strlen(contents) + 1; >> + SEND_WRQ("small.txt", "octet"); >> + recv_ack(0); >> + send_data(1, contents, contents_len); >> + recv_ack(1); >> + >> + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); >> + fd = open("small.txt", O_RDONLY); >> + r = read(fd, buffer, sizeof(buffer)); >> + close(fd); >> + require_bufeq(contents, contents_len, buffer, r); >> +} >> + >> +/* >> + * Write a medium file, and simulate a dropped ACK packet >> + */ >> +TFTPD_TC_DEFINE(wrq_dropped_ack,) >> +{ >> + int fd; >> + size_t i; >> + ssize_t r; >> + uint32_t contents[192]; >> + char buffer[1024]; >> + >> + for (i = 0; i < nitems(contents); i++) >> + contents[i] = i; >> + >> + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + >> + SEND_WRQ("medium.txt", "octet"); >> + recv_ack(0); >> + send_data(1, (const char*)&contents[0], 512); >> + /* >> + * Servers "sends" an ACK packet, but network drops it. >> + * Eventually, server should resend the last ACK >> + */ >> + (void) recvfrom(s, buffer, sizeof(buffer), 0, NULL, NULL); >> + recv_ack(1); >> + send_data(2, (const char*)&contents[128], 256); >> + recv_ack(2); >> + >> + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); >> + fd = open("medium.txt", O_RDONLY); >> + r = read(fd, buffer, sizeof(buffer)); >> + close(fd); >> + require_bufeq((const char*)contents, 768, buffer, r); >> +} >> + >> +/* >> + * Write a small file, and simulate a dropped DATA packet >> + */ >> +TFTPD_TC_DEFINE(wrq_dropped_data,) >> +{ >> + int fd; >> + ssize_t r; >> + char contents[] = "small"; >> + size_t contents_len; >> + char buffer[1024]; >> + >> + fd = open("small.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + contents_len = strlen(contents) + 1; >> + >> + SEND_WRQ("small.txt", "octet"); >> + recv_ack(0); >> + /* >> + * Client "sends" a DATA packet, but network drops it. >> + * Eventually, server should resend the last ACK >> + */ >> + recv_ack(0); >> + send_data(1, contents, contents_len); >> + recv_ack(1); >> + >> + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); >> + fd = open("small.txt", O_RDONLY); >> + r = read(fd, buffer, sizeof(buffer)); >> + close(fd); >> + require_bufeq(contents, contents_len, buffer, r); >> +} >> + >> +/* >> + * Write a medium file, and simulate a duplicated DATA packet >> + */ >> +TFTPD_TC_DEFINE(wrq_duped_data,) >> +{ >> + int fd; >> + size_t i; >> + ssize_t r; >> + uint32_t contents[192]; >> + char buffer[1024]; >> + >> + for (i = 0; i < nitems(contents); i++) >> + contents[i] = i; >> + >> + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + >> + SEND_WRQ("medium.txt", "octet"); >> + recv_ack(0); >> + send_data(1, (const char*)&contents[0], 512); >> + send_data(1, (const char*)&contents[0], 512); >> + recv_ack(1); >> + recv_ack(1); >> + send_data(2, (const char*)&contents[128], 256); >> + recv_ack(2); >> + >> + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); >> + fd = open("medium.txt", O_RDONLY); >> + r = read(fd, buffer, sizeof(buffer)); >> + close(fd); >> + require_bufeq((const char*)contents, 768, buffer, r); >> +} >> + >> +/* >> + * Attempt to write a file without write permissions >> + */ >> +TFTPD_TC_DEFINE(wrq_eaccess,) >> +{ >> + int fd; >> + >> + fd = open("empty.txt", O_CREAT | O_RDONLY, 0440); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + >> + SEND_WRQ("empty.txt", "octet"); >> + atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access >> " >> + "violation"); >> + RECV_ERROR(2, "Access violation"); >> +} >> + >> +/* >> + * Attempt to write a file without world write permissions, but with >> world >> + * read permissions >> + */ >> +TFTPD_TC_DEFINE(wrq_eaccess_world_readable,) >> +{ >> + int fd; >> + >> + fd = open("empty.txt", O_CREAT | O_RDONLY, 0444); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + >> + SEND_WRQ("empty.txt", "octet"); >> + atf_tc_expect_fail("PR 226004 with relative pathnames, tftpd >> doesn't validate world writability"); >> + RECV_ERROR(2, "Access violation"); >> +} >> + >> + >> +/* >> + * Write a medium file of more than one block >> + */ >> +TFTPD_TC_DEFINE(wrq_medium,) >> +{ >> + int fd; >> + size_t i; >> + ssize_t r; >> + uint32_t contents[192]; >> + char buffer[1024]; >> + >> + for (i = 0; i < nitems(contents); i++) >> + contents[i] = i; >> + >> + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + >> + SEND_WRQ("medium.txt", "octet"); >> + recv_ack(0); >> + send_data(1, (const char*)&contents[0], 512); >> + recv_ack(1); >> + send_data(2, (const char*)&contents[128], 256); >> + recv_ack(2); >> + >> + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); >> + fd = open("medium.txt", O_RDONLY); >> + r = read(fd, buffer, sizeof(buffer)); >> + close(fd); >> + require_bufeq((const char*)contents, 768, buffer, r); >> +} >> + >> +/* >> + * Write a file in netascii format >> + */ >> +TFTPD_TC_DEFINE(wrq_netascii,) >> +{ >> + int fd; >> + ssize_t r; >> + /* >> + * Weirdly, RFC-764 says that CR must be followed by NUL if a >> line feed >> + * is not intended >> + */ >> + char contents[] = "foo\r\nbar\r\0baz\r\n"; >> + char expected[] = "foo\nbar\rbaz\n"; >> + size_t contents_len; >> + char buffer[1024]; >> + >> + fd = open("unix.txt", O_RDWR | O_CREAT, 0666); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + contents_len = strlen(contents) + 1; >> + >> + SEND_WRQ("unix.txt", "netascii"); >> + recv_ack(0); >> + send_data(1, contents, contents_len); >> + recv_ack(1); >> + >> + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); >> + fd = open("unix.txt", O_RDONLY); >> + r = read(fd, buffer, sizeof(buffer)); >> + close(fd); >> + require_bufeq(expected, sizeof(expected), buffer, r); >> +} >> + >> +/* >> + * Attempt to write to a nonexistent file. With the default options, >> this >> + * isn't allowed. >> + */ >> +TFTPD_TC_DEFINE(wrq_nonexistent,) >> +{ >> + SEND_WRQ("nonexistent.txt", "octet"); >> + atf_tc_expect_fail("PR 225996 tftpd doesn't abort on a WRQ access >> " >> + "violation"); >> + RECV_ERROR(1, "File not found"); >> +} >> + >> +/* >> + * Write a small file of less than one block >> + */ >> +TFTPD_TC_DEFINE(wrq_small,) >> +{ >> + int fd; >> + ssize_t r; >> + char contents[] = "small"; >> + size_t contents_len; >> + char buffer[1024]; >> + >> + fd = open("small.txt", O_RDWR | O_CREAT, 0666); >> + ATF_REQUIRE(fd >= 0); >> + close(fd); >> + contents_len = strlen(contents) + 1; >> + >> + SEND_WRQ("small.txt", "octet"); >> + recv_ack(0); >> + send_data(1, contents, contents_len); >> + recv_ack(1); >> + >> + atf_tc_expect_fail("PR 157700 tftpd expects more data after EOF"); >> + fd = open("small.txt", O_RDONLY); >> + r = read(fd, buffer, sizeof(buffer)); >> + close(fd); >> + require_bufeq(contents, contents_len, buffer, r); >> +} >> + >> +/* >> + * Write an empty file over a non-empty one >> + */ >> +TFTPD_TC_DEFINE(wrq_truncate,) >> +{ >> + int fd; >> + char contents[] = "small"; >> + struct stat sb; >> + >> + fd = open("small.txt", O_RDWR | O_CREAT, 0666); >> + ATF_REQUIRE(fd >= 0); >> + write_all(fd, contents, strlen(contents) + 1); >> + close(fd); >> + >> + SEND_WRQ("small.txt", "octet"); >> + recv_ack(0); >> + send_data(1, NULL, 0); >> + recv_ack(1); >> + >> + ATF_REQUIRE_EQ(stat("small.txt", &sb), 0); >> + ATF_REQUIRE_EQ(sb.st_size, 0); >> +} >> + >> >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >> >> From owner-svn-src-all@freebsd.org Sat Mar 10 20:13:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BD16F2F910; Sat, 10 Mar 2018 20:13:08 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1A52822A1; Sat, 10 Mar 2018 20:13:07 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6F9F1290D; Sat, 10 Mar 2018 20:13:07 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2AKD7MF039282; Sat, 10 Mar 2018 20:13:07 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2AKD78X039280; Sat, 10 Mar 2018 20:13:07 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201803102013.w2AKD78X039280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Sat, 10 Mar 2018 20:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330743 - in head: etc/rc.d share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: in head: etc/rc.d share/man/man5 X-SVN-Commit-Revision: 330743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 20:13:08 -0000 Author: jamie Date: Sat Mar 10 20:13:07 2018 New Revision: 330743 URL: https://svnweb.freebsd.org/changeset/base/330743 Log: Don't warn when the "hostname" rc variable is unset, but the hostname is already non-empty (common in jails). Modified: head/etc/rc.d/hostname head/share/man/man5/rc.conf.5 Modified: head/etc/rc.d/hostname ============================================================================== --- head/etc/rc.d/hostname Sat Mar 10 18:07:31 2018 (r330742) +++ head/etc/rc.d/hostname Sat Mar 10 20:13:07 2018 (r330743) @@ -60,9 +60,11 @@ hostname_start() # Have we got a hostname yet? # if [ -z "${hostname}" ]; then - # Null hostname is probably OK if DHCP is in use. + # Null hostname is probably OK if DHCP is in use, + # or when hostname is already set (common for jails). # - if [ -z "`list_net_interfaces dhcp`" ]; then + if [ -z "`list_net_interfaces dhcp`" -a \ + -z "`/bin/hostname`" ]; then warn "\$hostname is not set -- see rc.conf(5)." fi return Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Mar 10 18:07:31 2018 (r330742) +++ head/share/man/man5/rc.conf.5 Sat Mar 10 20:13:07 2018 (r330743) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2018 +.Dd March 10, 2018 .Dt RC.CONF 5 .Os .Sh NAME @@ -421,6 +421,9 @@ If .Xr dhclient 8 is used to set the hostname via DHCP, this variable should be set to an empty string. +Within a +.Xr jail 8 +the hostname is generally already set and this variable may absent. If this value remains unset when the system is done booting your console login will display the default hostname of .Dq Amnesiac . From owner-svn-src-all@freebsd.org Sat Mar 10 22:01:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7EC0F378E2 for ; Sat, 10 Mar 2018 22:01:49 +0000 (UTC) (envelope-from dab@freebsd.org) Received: from qproxy5-pub.mail.unifiedlayer.com (qproxy5-pub.mail.unifiedlayer.com [69.89.21.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 859E285A71 for ; Sat, 10 Mar 2018 22:01:49 +0000 (UTC) (envelope-from dab@freebsd.org) Received: from CMOut01 (unknown [10.0.90.82]) by qproxy5.mail.unifiedlayer.com (Postfix) with ESMTP id C426B6AC97 for ; Sat, 10 Mar 2018 15:01:46 -0700 (MST) Received: from host305.hostmonster.com ([74.220.215.105]) by CMOut01 with id LN1i1x00v2H155E01N1ljb; Sat, 10 Mar 2018 15:01:46 -0700 X-Authority-Analysis: v=2.2 cv=ft6sXBwf c=1 sm=1 tr=0 a=oRSXaeV14bi+UgmAP6q2Hg==:117 a=oRSXaeV14bi+UgmAP6q2Hg==:17 a=IkcTkHD0fZMA:10 a=v2DPQv5-lfwA:10 a=6I5d2MoRAAAA:8 a=TlQAbdF0yEK7xw9wynIA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 Received: from d192-24-6-24.try.wideopenwest.com ([24.192.24.6]:51616 helo=[192.168.1.122]) by host305.hostmonster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1eumYf-002ICK-UL; Sat, 10 Mar 2018 15:01:41 -0700 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs From: David Bright In-Reply-To: <20180310161701.GA73335@raichu> Date: Sat, 10 Mar 2018 17:01:40 -0500 Cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201801151925.w0FJPCKA019434@repo.freebsd.org> <20180309220940.GG6174@raichu> <1520634689.84937.74.camel@freebsd.org> <20180310161701.GA73335@raichu> To: Mark Johnston X-Mailer: Apple Mail (2.3445.5.20) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host305.hostmonster.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-BWhitelist: no X-Source-IP: 24.192.24.6 X-Exim-ID: 1eumYf-002ICK-UL X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: d192-24-6-24.try.wideopenwest.com ([192.168.1.122]) [24.192.24.6]:51616 X-Source-Auth: david@bright-family.net X-Email-Count: 2 X-Source-Cap: YnJpZ2h0ZmE7YnJpZ2h0ZmE7aG9zdDMwNS5ob3N0bW9uc3Rlci5jb20= X-Local-Domain: no X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 22:01:50 -0000 With regard to: fsck_y_flags=3D"-T ffs:-R -T ufs:-R" # Additional = flags for fsck -y I don=E2=80=99t know how, but I completely missed the -T option for fsck = when I was investigating this issue. That would be very useful, although = I wanted my solution to be applicable to file systems other than = ffs/ufs. With regard to the fsck_ffs behavior being a regression because formerly = the FS would be mounted successfully: That was not my experience. What I observed was that the =E2=80=9Cfsck = -y=E2=80=9D would give the =E2=80=9Cplease re-run=E2=80=9D message, exit = with 0 status so the boot would continue, the subsequent mount would = fail because the filesystem was not clean, and *then* the boot would = stop and drop to single user. --=20 David Bright dab@FreeBSD.org From owner-svn-src-all@freebsd.org Sat Mar 10 22:07:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78337F3805E; Sat, 10 Mar 2018 22:07:58 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F20885DDF; Sat, 10 Mar 2018 22:07:58 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14CF913A82; Sat, 10 Mar 2018 22:07:58 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2AM7vYa093820; Sat, 10 Mar 2018 22:07:57 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2AM7vKk093818; Sat, 10 Mar 2018 22:07:57 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803102207.w2AM7vKk093818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 10 Mar 2018 22:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330745 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 22:07:58 -0000 Author: ian Date: Sat Mar 10 22:07:57 2018 New Revision: 330745 URL: https://svnweb.freebsd.org/changeset/base/330745 Log: Make root mount timeout logic work for filesystems other than ufs. The vfs.mountroot.timeout tunable and .timeout directive in a mount.conf(5) file allow specifying a wait timeout for the device(s) hosting the root filesystem to become usable. The current mechanism for waiting for devices and detecting their availability can't be used for zfs-hosted filesystems. See the comment #20 in the PR for some expanded detail on these points. This change adds retry logic to the actual root filesystem mount. That is, insted of relying on device availability using device name lookups, it uses the kernel_mount() call itself to detect whether the filesystem can be mounted, and loops until it succeeds or the configured timeout is exceeded. These changes are based on the patch attached to the PR, but it's rewritten enough that all mistakes belong to me. PR: 208882 X-MFC after: sufficient testing, and hopefully in time for 11.1 Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sat Mar 10 20:46:36 2018 (r330744) +++ head/sys/kern/vfs_mountroot.c Sat Mar 10 22:07:57 2018 (r330745) @@ -714,7 +714,7 @@ parse_mount(char **conf) char *errmsg; struct mntarg *ma; char *dev, *fs, *opts, *tok; - int error; + int delay, error, timeout; error = parse_token(conf, &tok); if (error) @@ -755,15 +755,31 @@ parse_mount(char **conf) if (error != 0) goto out; - ma = NULL; - ma = mount_arg(ma, "fstype", fs, -1); - ma = mount_arg(ma, "fspath", "/", -1); - ma = mount_arg(ma, "from", dev, -1); - ma = mount_arg(ma, "errmsg", errmsg, ERRMSGL); - ma = mount_arg(ma, "ro", NULL, 0); - ma = parse_mountroot_options(ma, opts); - error = kernel_mount(ma, MNT_ROOTFS); + delay = hz / 10; + timeout = root_mount_timeout * hz; + for (;;) { + ma = NULL; + ma = mount_arg(ma, "fstype", fs, -1); + ma = mount_arg(ma, "fspath", "/", -1); + ma = mount_arg(ma, "from", dev, -1); + ma = mount_arg(ma, "errmsg", errmsg, ERRMSGL); + ma = mount_arg(ma, "ro", NULL, 0); + ma = parse_mountroot_options(ma, opts); + + error = kernel_mount(ma, MNT_ROOTFS); + if (error == 0 || timeout <= 0) + break; + + if (root_mount_timeout * hz == timeout || + (bootverbose && timeout % hz == 0)) { + printf("Mounting from %s:%s failed with error %d; " + "retrying for %d more second%s\n", fs, dev, error, + timeout / hz, (timeout / hz > 1) ? "s" : ""); + } + pause("rmretry", delay); + timeout -= delay; + } out: if (error) { printf("Mounting from %s:%s failed with error %d", From owner-svn-src-all@freebsd.org Sat Mar 10 22:52:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2316F3BD40; Sat, 10 Mar 2018 22:52:39 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63FC787BFB; Sat, 10 Mar 2018 22:52:39 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5ED821425E; Sat, 10 Mar 2018 22:52:39 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2AMqd2a018534; Sat, 10 Mar 2018 22:52:39 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2AMqdiW018533; Sat, 10 Mar 2018 22:52:39 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803102252.w2AMqdiW018533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 10 Mar 2018 22:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330747 - head/sys/dev/usb/wlan X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/usb/wlan X-SVN-Commit-Revision: 330747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 22:52:39 -0000 Author: avos Date: Sat Mar 10 22:52:39 2018 New Revision: 330747 URL: https://svnweb.freebsd.org/changeset/base/330747 Log: run(4): drop few unused variables. Found by: Clang static analyzer Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sat Mar 10 22:47:26 2018 (r330746) +++ head/sys/dev/usb/wlan/if_run.c Sat Mar 10 22:52:39 2018 (r330747) @@ -3483,7 +3483,6 @@ run_tx_mgt(struct run_softc *sc, struct mbuf *m, struc struct rt2860_txwi *txwi; uint16_t dur; uint8_t ridx = rn->mgt_ridx; - uint8_t type; uint8_t xflags = 0; uint8_t wflags = 0; @@ -3491,8 +3490,6 @@ run_tx_mgt(struct run_softc *sc, struct mbuf *m, struc wh = mtod(m, struct ieee80211_frame *); - type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; - /* tell hardware to add timestamp for probe responses */ if ((wh->i_fc[0] & (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == @@ -3609,11 +3606,9 @@ run_tx_param(struct run_softc *sc, struct mbuf *m, str const struct ieee80211_bpf_params *params) { struct ieee80211com *ic = ni->ni_ic; - struct ieee80211_frame *wh; struct run_tx_data *data; struct rt2870_txd *txd; struct rt2860_txwi *txwi; - uint8_t type; uint8_t ridx; uint8_t rate; uint8_t opflags = 0; @@ -3623,9 +3618,6 @@ run_tx_param(struct run_softc *sc, struct mbuf *m, str RUN_LOCK_ASSERT(sc, MA_OWNED); KASSERT(params != NULL, ("no raw xmit params")); - - wh = mtod(m, struct ieee80211_frame *); - type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; rate = params->ibp_rate0; if (!ieee80211_isratevalid(ic->ic_rt, rate)) { From owner-svn-src-all@freebsd.org Sat Mar 10 22:56:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7DD3F3C149; Sat, 10 Mar 2018 22:56:14 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::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 4B87687E29; Sat, 10 Mar 2018 22:56:14 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it0-x241.google.com with SMTP id v194-v6so7088413itb.0; Sat, 10 Mar 2018 14:56:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=DyV32CBfUdom7Wkx0k660Nd98+QzjQ2x27k5XdQAyhw=; b=IKyYcRNVz9WQAUZ3gzRYXF4dPYN9T868tKZ/oBXhW/IYLxCK+KmgbIlIX0+RNOjD/y SqsmivtLxDGzX+wDlCEz/CHHTkfJ7Q2pMxuKXG01f/+OWW8o96FkScSpof7jBLNGWaoA oXmHAfYuXsjHsjknoocquwmq1pjsJiS+GO8qUmLPCO0cXNV2GPQZ2+u12kfil9HjFyE+ p9F99tYQanFYhP0UEFmssEoZ1kszXi/ChcNDEY1J2A+mKiSJMCRdXlDKWpru+T7z0t6X Y9dYXX3b7XPARPdCDsPIc1lTEd+d4/6Bcr9vVeDg2Yd4SQliYL/f+fZKpCTXvdYm8oJN Jwcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=DyV32CBfUdom7Wkx0k660Nd98+QzjQ2x27k5XdQAyhw=; b=aBotvB7JMBeqbaDTkOdLuUcJEhIigTDUsu4fFkon+csxDdQkkK7Afge2wClHKiu0TW TzLfN6ZtUp35xlr+HNJj7kPsLmRq64IsqQn2HWyYP/hy4iA9+v6SHmDDLE265HomqSMo Mu9qAxLSYKBPy354cCrcjxLPOqU18Xy06iICXEts/JYx2o7jegFezci2hQDN5dPiLaNp oIqG0Qz58Z4daZnqv9fC9ZC3oI9+KZ72T2AcUNHp5DpakuxrXDHoWUsIIK+U9rOo9C/R 4+wwO2sDqmQK8sLhhMSbKLt1SmtPFmdxO7kkIkNCX41CWZUS+QnCa6Z4DYDfrMsoT3W4 CccA== X-Gm-Message-State: AElRT7Fm/wXMgATrI/qHcS3vU1SCXx/K/nY2j4gaGQry4WoS6f1Q5rBf 6uaK+3KHTFl22jZnJgWJgHuMUg== X-Google-Smtp-Source: AG47ELtVEKkCq5YocmSn9wm+GyUbxLcDmHH9j6o4M1mw60WWKjmX4m9XtV+K2HidMKLWKlqVl+cKJQ== X-Received: by 10.36.189.129 with SMTP id x123mr3422359ite.13.1520722573329; Sat, 10 Mar 2018 14:56:13 -0800 (PST) Received: from raichu (toroon0560w-lp130-01-174-88-76-226.dsl.bell.ca. [174.88.76.226]) by smtp.gmail.com with ESMTPSA id j19sm2759836ioe.15.2018.03.10.14.56.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Mar 2018 14:56:12 -0800 (PST) Sender: Mark Johnston Date: Sat, 10 Mar 2018 17:56:10 -0500 From: Mark Johnston To: David Bright Cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs Message-ID: <20180310225610.GD73335@raichu> References: <201801151925.w0FJPCKA019434@repo.freebsd.org> <20180309220940.GG6174@raichu> <1520634689.84937.74.camel@freebsd.org> <20180310161701.GA73335@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 22:56:15 -0000 On Sat, Mar 10, 2018 at 05:01:40PM -0500, David Bright wrote: > With regard to the fsck_ffs behavior being a regression because formerly the FS would be mounted successfully: > > That was not my experience. What I observed was that the “fsck -y” would give the “please re-run” message, exit with 0 status so the boot would continue, the subsequent mount would fail because the filesystem was not clean, and *then* the boot would stop and drop to single user. I think my problem is specific to SU without journaling. The UFS code allows one to mount an unclean filesystem in that configuration since SU guarantees that on-disk metadata is consistent. A background fsck takes care of leaked inodes and data blocks. (FWIW, I'm not using journaling only because makefs(8) doesn't support the creation of SU+J filesystems.) /dev/gpt/rootfs: FREE BLK COUNT(S) WRONG IN SUPERBLK (SALVAGED) /dev/gpt/rootfs: SUMMARY INFORMATION BAD (SALVAGED) /dev/gpt/rootfs: BLK(S) MISSING IN BIT MAPS (SALVAGED) /dev/gpt/rootfs: 32664 files, 495447 used, 813272 free (176 frags, 203274 blocks, 0.0% fragmentation) ***** PLEASE RERUN FSCK ***** WARNING: /: reload pending error: blocks 192 files 3 Unknown error 16; help! ERROR: ABORTING BOOT (sending SIGTERM to parent)! Mar 10 12:47:50 init: /bin/sh on /etc/rc terminated abnormally, going to single user mode Enter full pathname of shell or RETURN for /bin/sh: # mount /dev/gpt/rootfs on / (ufs, local, read-only) devfs on /dev (devfs, local, multilabel) # mount -u -o rw / WARNING: / was not properly dismounted # echo $? 0 # mount /dev/gpt/rootfs on / (ufs, local, soft-updates) devfs on /dev (devfs, local, multilabel) From owner-svn-src-all@freebsd.org Sat Mar 10 23:16:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37E6EF3E8A2; Sat, 10 Mar 2018 23:16:26 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8A7D6AD1E; Sat, 10 Mar 2018 23:16:25 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D39AA14616; Sat, 10 Mar 2018 23:16:25 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ANGPoU033336; Sat, 10 Mar 2018 23:16:25 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ANGOLV033320; Sat, 10 Mar 2018 23:16:24 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803102316.w2ANGOLV033320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 10 Mar 2018 23:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330749 - in head/sys: dev/usb/wlan modules/usb/rum modules/usb/run modules/usb/uath modules/usb/upgt modules/usb/ural modules/usb/urtw modules/usb/zyd X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys: dev/usb/wlan modules/usb/rum modules/usb/run modules/usb/uath modules/usb/upgt modules/usb/ural modules/usb/urtw modules/usb/zyd X-SVN-Commit-Revision: 330749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 23:16:26 -0000 Author: avos Date: Sat Mar 10 23:16:24 2018 New Revision: 330749 URL: https://svnweb.freebsd.org/changeset/base/330749 Log: usb/wlan/*: properly include "opt_wlan.h" into all drivers Without it driver cannot be loaded when wlan(4) module is built with 'options IEEE80211_DEBUG_REFCNT'. Modified: head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_zyd.c head/sys/modules/usb/rum/Makefile head/sys/modules/usb/run/Makefile head/sys/modules/usb/uath/Makefile head/sys/modules/usb/upgt/Makefile head/sys/modules/usb/ural/Makefile head/sys/modules/usb/urtw/Makefile head/sys/modules/usb/zyd/Makefile Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/dev/usb/wlan/if_rum.c Sat Mar 10 23:16:24 2018 (r330749) @@ -27,6 +27,8 @@ __FBSDID("$FreeBSD$"); * http://www.ralinktech.com.tw/ */ +#include "opt_wlan.h" + #include #include #include Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/dev/usb/wlan/if_run.c Sat Mar 10 23:16:24 2018 (r330749) @@ -25,6 +25,8 @@ __FBSDID("$FreeBSD$"); * http://www.ralinktech.com/ */ +#include "opt_wlan.h" + #include #include #include Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/dev/usb/wlan/if_uath.c Sat Mar 10 23:16:24 2018 (r330749) @@ -67,6 +67,9 @@ __FBSDID("$FreeBSD$"); * for these devices does not work in this way and so does not work * with this driver. */ + +#include "opt_wlan.h" + #include #include #include Modified: head/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- head/sys/dev/usb/wlan/if_upgt.c Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/dev/usb/wlan/if_upgt.c Sat Mar 10 23:16:24 2018 (r330749) @@ -17,6 +17,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "opt_wlan.h" + #include #include #include Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/dev/usb/wlan/if_ural.c Sat Mar 10 23:16:24 2018 (r330749) @@ -28,6 +28,8 @@ __FBSDID("$FreeBSD$"); * http://www.ralinktech.com/ */ +#include "opt_wlan.h" + #include #include #include Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/dev/usb/wlan/if_urtw.c Sat Mar 10 23:16:24 2018 (r330749) @@ -16,6 +16,9 @@ #include __FBSDID("$FreeBSD$"); + +#include "opt_wlan.h" + #include #include #include Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/dev/usb/wlan/if_zyd.c Sat Mar 10 23:16:24 2018 (r330749) @@ -26,6 +26,8 @@ __FBSDID("$FreeBSD$"); * ZyDAS ZD1211/ZD1211B USB WLAN driver. */ +#include "opt_wlan.h" + #include #include #include Modified: head/sys/modules/usb/rum/Makefile ============================================================================== --- head/sys/modules/usb/rum/Makefile Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/modules/usb/rum/Makefile Sat Mar 10 23:16:24 2018 (r330749) @@ -30,7 +30,7 @@ S= ${SRCTOP}/sys .PATH: $S/dev/usb/wlan KMOD= if_rum -SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ - if_rum.c +SRCS= opt_bus.h opt_usb.h opt_wlan.h device_if.h bus_if.h usb_if.h \ + usbdevs.h if_rum.c .include Modified: head/sys/modules/usb/run/Makefile ============================================================================== --- head/sys/modules/usb/run/Makefile Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/modules/usb/run/Makefile Sat Mar 10 23:16:24 2018 (r330749) @@ -30,7 +30,7 @@ S= ${SRCTOP}/sys .PATH: $S/dev/usb/wlan KMOD= if_run -SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ - if_run.c +SRCS= opt_bus.h opt_usb.h opt_wlan.h device_if.h bus_if.h usb_if.h \ + usbdevs.h if_run.c .include Modified: head/sys/modules/usb/uath/Makefile ============================================================================== --- head/sys/modules/usb/uath/Makefile Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/modules/usb/uath/Makefile Sat Mar 10 23:16:24 2018 (r330749) @@ -5,6 +5,6 @@ KMOD = if_uath SRCS = if_uath.c if_uathvar.h if_uathreg.h \ bus_if.h device_if.h \ - opt_bus.h opt_usb.h usb_if.h usbdevs.h + opt_bus.h opt_usb.h opt_wlan.h usb_if.h usbdevs.h .include Modified: head/sys/modules/usb/upgt/Makefile ============================================================================== --- head/sys/modules/usb/upgt/Makefile Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/modules/usb/upgt/Makefile Sat Mar 10 23:16:24 2018 (r330749) @@ -5,6 +5,6 @@ KMOD = if_upgt SRCS = if_upgt.c if_upgtvar.h \ bus_if.h device_if.h \ - opt_bus.h opt_usb.h usb_if.h usbdevs.h + opt_bus.h opt_usb.h opt_wlan.h usb_if.h usbdevs.h .include Modified: head/sys/modules/usb/ural/Makefile ============================================================================== --- head/sys/modules/usb/ural/Makefile Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/modules/usb/ural/Makefile Sat Mar 10 23:16:24 2018 (r330749) @@ -30,7 +30,7 @@ S= ${SRCTOP}/sys .PATH: $S/dev/usb/wlan KMOD= if_ural -SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ - if_ural.c +SRCS= opt_bus.h opt_usb.h opt_wlan.h device_if.h bus_if.h usb_if.h \ + usbdevs.h if_ural.c .include Modified: head/sys/modules/usb/urtw/Makefile ============================================================================== --- head/sys/modules/usb/urtw/Makefile Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/modules/usb/urtw/Makefile Sat Mar 10 23:16:24 2018 (r330749) @@ -5,6 +5,6 @@ KMOD = if_urtw SRCS = if_urtw.c if_urtwreg.h if_urtwvar.h \ bus_if.h device_if.h \ - opt_bus.h opt_usb.h usb_if.h usbdevs.h + opt_bus.h opt_usb.h opt_wlan.h usb_if.h usbdevs.h .include Modified: head/sys/modules/usb/zyd/Makefile ============================================================================== --- head/sys/modules/usb/zyd/Makefile Sat Mar 10 23:04:03 2018 (r330748) +++ head/sys/modules/usb/zyd/Makefile Sat Mar 10 23:16:24 2018 (r330749) @@ -30,7 +30,7 @@ S= ${SRCTOP}/sys .PATH: $S/dev/usb/wlan KMOD= if_zyd -SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ - if_zyd.c if_zydreg.h if_zydfw.h +SRCS= opt_bus.h opt_usb.h opt_wlan.h device_if.h bus_if.h usb_if.h \ + usbdevs.h if_zyd.c if_zydreg.h if_zydfw.h .include From owner-svn-src-all@freebsd.org Sat Mar 10 23:47:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4584F41458; Sat, 10 Mar 2018 23:47:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5726C6C34C; Sat, 10 Mar 2018 23:47:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 521C514B0B; Sat, 10 Mar 2018 23:47:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ANl4PR048292; Sat, 10 Mar 2018 23:47:04 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ANl45n048290; Sat, 10 Mar 2018 23:47:04 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803102347.w2ANl45n048290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 10 Mar 2018 23:47:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330750 - in head/sys/dev/rtwn: rtl8188e rtl8192c X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev/rtwn: rtl8188e rtl8192c X-SVN-Commit-Revision: 330750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 23:47:04 -0000 Author: avos Date: Sat Mar 10 23:47:03 2018 New Revision: 330750 URL: https://svnweb.freebsd.org/changeset/base/330750 Log: rtwn(4): reset Tx power values before calling get_txpower() for RTL8192C / RTL8188E (like it is done for other chipsets). Modified: head/sys/dev/rtwn/rtl8188e/r88e_chan.c head/sys/dev/rtwn/rtl8192c/r92c_chan.c Modified: head/sys/dev/rtwn/rtl8188e/r88e_chan.c ============================================================================== --- head/sys/dev/rtwn/rtl8188e/r88e_chan.c Sat Mar 10 23:16:24 2018 (r330749) +++ head/sys/dev/rtwn/rtl8188e/r88e_chan.c Sat Mar 10 23:47:03 2018 (r330750) @@ -104,8 +104,6 @@ r88e_get_txpower(struct rtwn_softc *sc, int chain, max_mcs = RTWN_RIDX_HT_MCS(sc->ntxchains * 8 - 1); KASSERT(max_mcs <= RTWN_RIDX_COUNT, ("increase ridx limit\n")); - memset(power, 0, max_mcs * sizeof(power[0])); - /* Compute per-CCK rate Tx power. */ cckpow = rt->cck_tx_pwr[group]; for (ridx = RTWN_RIDX_CCK1; ridx <= RTWN_RIDX_CCK11; ridx++) { Modified: head/sys/dev/rtwn/rtl8192c/r92c_chan.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_chan.c Sat Mar 10 23:16:24 2018 (r330749) +++ head/sys/dev/rtwn/rtl8192c/r92c_chan.c Sat Mar 10 23:47:03 2018 (r330750) @@ -102,7 +102,6 @@ r92c_get_txpower(struct rtwn_softc *sc, int chain, max_mcs = RTWN_RIDX_HT_MCS(sc->ntxchains * 8 - 1); KASSERT(max_mcs <= RTWN_RIDX_COUNT, ("increase ridx limit\n")); - memset(power, 0, max_mcs * sizeof(power[0])); if (rs->regulatory == 0) { for (ridx = RTWN_RIDX_CCK1; ridx <= RTWN_RIDX_CCK11; ridx++) power[ridx] = base[chain].pwr[0][ridx]; @@ -225,6 +224,7 @@ r92c_set_txpower(struct rtwn_softc *sc, struct ieee802 int i; for (i = 0; i < sc->ntxchains; i++) { + memset(power, 0, sizeof(power)); /* Compute per-rate Tx power values. */ rtwn_r92c_get_txpower(sc, i, c, power); #ifdef RTWN_DEBUG