From owner-svn-src-stable-11@freebsd.org Mon Mar 25 17:04:15 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D1F1546179; Mon, 25 Mar 2019 17:04:15 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25C7775A3E; Mon, 25 Mar 2019 17:04:15 +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 00C34ACB5; Mon, 25 Mar 2019 17:04:15 +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 x2PH4EaG059467; Mon, 25 Mar 2019 17:04:14 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PH4EQ5059466; Mon, 25 Mar 2019 17:04:14 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903251704.x2PH4EQ5059466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Mon, 25 Mar 2019 17:04: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: r345507 - stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Group: stable-11 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini X-SVN-Commit-Revision: 345507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 25C7775A3E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:04:15 -0000 Author: dab Date: Mon Mar 25 17:04:14 2019 New Revision: 345507 URL: https://svnweb.freebsd.org/changeset/base/345507 Log: MFC r345009: Fix a scribbler in the PMS driver. The ESGL bit was left uninitialized when executing the REPORT LUNS ioctl. This could allow a zeroed data buffer to be treated as a scatter/gather list. The firmware would eventually walk past the end of the data buffer, potentially find what looked like a valid address/length pair, and write the result to semi-random memory. Obtained from: Dell EMC Isilon Sponsored by: Dell EMC Isilon Modified: stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c ============================================================================== --- stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:03:39 2019 (r345506) +++ stable/11/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c Mon Mar 25 17:04:14 2019 (r345507) @@ -1874,7 +1874,9 @@ tiNumOfLunIOCTLreq( agSSPFrame->dataLength = REPORT_LUN_LEN; agSSPFrame->agSgl.len = sizeof(agsaSSPCmdInfoUnit_t); - + agSSPFrame->agSgl.extReserved = 0; + CLEAR_ESGL_EXTEND(agSSPFrame->agSgl.extReserved); + status = saSSPStart(agRoot, agIORequest, 0, agDevHandle, agRequestType,agSASRequestBody,agNULL, &ossaSSPIoctlCompleted); if(status != AGSA_RC_SUCCESS) From owner-svn-src-stable-11@freebsd.org Mon Mar 25 17:45:49 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1827154778B; Mon, 25 Mar 2019 17:45:49 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42445778B7; Mon, 25 Mar 2019 17:45:49 +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 1EC4BB3A6; Mon, 25 Mar 2019 17:45:49 +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 x2PHjnfE085166; Mon, 25 Mar 2019 17:45:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2PHjmIs085163; Mon, 25 Mar 2019 17:45:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201903251745.x2PHjmIs085163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 25 Mar 2019 17:45: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: r345509 - in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable: 11/share/examples/etc 11/share/mk 12/share/examples/etc 12/share/mk X-SVN-Commit-Revision: 345509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 42445778B7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 17:45:49 -0000 Author: jkim Date: Mon Mar 25 17:45:47 2019 New Revision: 345509 URL: https://svnweb.freebsd.org/changeset/base/345509 Log: MFC: r345387 Catch up with Clang 7.0. Modified: stable/11/share/examples/etc/make.conf stable/11/share/mk/bsd.cpu.mk Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/share/examples/etc/make.conf stable/12/share/mk/bsd.cpu.mk Directory Properties: stable/12/ (props changed) Modified: stable/11/share/examples/etc/make.conf ============================================================================== --- stable/11/share/examples/etc/make.conf Mon Mar 25 17:04:33 2019 (r345508) +++ stable/11/share/examples/etc/make.conf Mon Mar 25 17:45:47 2019 (r345509) @@ -45,7 +45,8 @@ # Additionally the following CPU types are recognized by clang: # Intel x86 architecture (for both amd64 and i386): # (AMD CPUs) znver1, bdver4, bdver3, bdver2, bdver1, btver2, btver1 -# (Intel CPUs) cannonlake, knm, skylake-avx512, knl, goldmont, +# (Intel CPUs) tremont, goldmont-plus, icelake-server, icelake-client, +# cannonlake, knm, skylake-avx512, knl, goldmont, # skylake, broadwell, haswell, ivybridge, # sandybridge, westmere, nehalem, silvermont, bonnell # Modified: stable/11/share/mk/bsd.cpu.mk ============================================================================== --- stable/11/share/mk/bsd.cpu.mk Mon Mar 25 17:04:33 2019 (r345508) +++ stable/11/share/mk/bsd.cpu.mk Mon Mar 25 17:45:47 2019 (r345509) @@ -31,6 +31,8 @@ MACHINE_CPU = ultrasparc . if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "barcelona" CPUTYPE = amdfam10 +. elif ${CPUTYPE} == "skx" +CPUTYPE = skylake-avx512 . elif ${CPUTYPE} == "core-avx2" CPUTYPE = haswell . elif ${CPUTYPE} == "core-avx-i" @@ -202,7 +204,8 @@ MACHINE_CPU = 3dnow mmx k6 k5 i586 MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" MACHINE_CPU = k5 i586 -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -210,7 +213,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 s MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "penryn" @@ -265,7 +269,8 @@ MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow -. elif ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ +. elif ${CPUTYPE} == "icelake-server" || ${CPUTYPE} == "icelake-client" || \ + ${CPUTYPE} == "cannonlake" || ${CPUTYPE} == "knm" || \ ${CPUTYPE} == "skylake-avx512" || ${CPUTYPE} == "knl" MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "skylake" || ${CPUTYPE} == "broadwell" || \ @@ -273,7 +278,8 @@ MACHINE_CPU = avx512 avx2 avx sse42 sse41 ssse3 sse3 MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "ivybridge" || ${CPUTYPE} == "sandybridge" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 -. elif ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ +. elif ${CPUTYPE} == "tremont" || ${CPUTYPE} == "goldmont-plus" || \ + ${CPUTYPE} == "goldmont" || ${CPUTYPE} == "westmere" || \ ${CPUTYPE} == "nehalem" || ${CPUTYPE} == "silvermont" MACHINE_CPU = sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "penryn" From owner-svn-src-stable-11@freebsd.org Tue Mar 26 11:01:31 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AC37154CC79; Tue, 26 Mar 2019 11:01:31 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABE858B897; Tue, 26 Mar 2019 11:01:30 +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 839D71EB98; Tue, 26 Mar 2019 11:01:30 +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 x2QB1Ugc048048; Tue, 26 Mar 2019 11:01:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QB1UFW048047; Tue, 26 Mar 2019 11:01:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903261101.x2QB1UFW048047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 26 Mar 2019 11:01: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: r345529 - in stable/11: . share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: . share/man/man4 X-SVN-Commit-Revision: 345529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ABE858B897 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 11:01:31 -0000 Author: kib Date: Tue Mar 26 11:01:29 2019 New Revision: 345529 URL: https://svnweb.freebsd.org/changeset/base/345529 Log: MFC r345442: Add UPDATING note for geom_uzip(4)/xz, and bump geom_uzip(4) man page date. Modified: stable/11/UPDATING stable/11/share/man/man4/geom_uzip.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Tue Mar 26 10:58:29 2019 (r345528) +++ stable/11/UPDATING Tue Mar 26 11:01:29 2019 (r345529) @@ -16,6 +16,11 @@ 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. +20190226: + geom_uzip(4) depends on the new module xz. If geom_uzip is statically + compiled into your custom kernel, add 'device xz' statement to the + kernel config. + 20190220: Co-existance for Forth and Lua interpreters in bootloaders has now been merged to ease testing of lualoader. LOADER_DEFAULT_INTERP, documented Modified: stable/11/share/man/man4/geom_uzip.4 ============================================================================== --- stable/11/share/man/man4/geom_uzip.4 Tue Mar 26 10:58:29 2019 (r345528) +++ stable/11/share/man/man4/geom_uzip.4 Tue Mar 26 11:01:29 2019 (r345529) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 9, 2006 +.Dd February 26, 2019 .Dt GEOM_UZIP 4 .Os .Sh NAME From owner-svn-src-stable-11@freebsd.org Tue Mar 26 13:35:24 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F6721552A30; Tue, 26 Mar 2019 13:35:24 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 434DD6AE28; Tue, 26 Mar 2019 13:35:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29AFC20705; Tue, 26 Mar 2019 13:35:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2QDZNCe030831; Tue, 26 Mar 2019 13:35:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDZN90030830; Tue, 26 Mar 2019 13:35:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261335.x2QDZN90030830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:35: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: r345532 - stable/11/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 345532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 434DD6AE28 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:35:24 -0000 Author: hselasky Date: Tue Mar 26 13:35:23 2019 New Revision: 345532 URL: https://svnweb.freebsd.org/changeset/base/345532 Log: MFC r344919: Don't hold state lock while detaching network device instance in mlx4en(4). It can happen during shutdown that the lock will recurse when the mlx4en(4) instance is part of a lagg interface. Call ether_ifdetach() unlocked. Backtrace: panic(): _sx_xlock_hard: recursed on non-recursive sx &mdev->state_lock _sx_xlock_hard() _sx_xlock() mlx4_en_ioctl() if_setlladdr() lagg_port_destroy() lagg_port_ifdetach() if_detach() mlx4_en_destroy_netdev() mlx4_en_remove() mlx4_remove_device() mlx4_unregister_device() mlx4_unload_one() mlx4_shutdown() linux_pci_shutdown() bus_generic_shutdown() Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:33:36 2019 (r345531) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:35:23 2019 (r345532) @@ -1777,11 +1777,8 @@ void mlx4_en_destroy_netdev(struct net_device *dev) EVENTHANDLER_DEREGISTER(vlan_unconfig, priv->vlan_detach); /* Unregister device - this will close the port if it was up */ - if (priv->registered) { - mutex_lock(&mdev->state_lock); + if (priv->registered) ether_ifdetach(dev); - mutex_unlock(&mdev->state_lock); - } mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); From owner-svn-src-stable-11@freebsd.org Tue Mar 26 13:38:50 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5247155300A; Tue, 26 Mar 2019 13:38: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 592D06B3A4; Tue, 26 Mar 2019 13:38: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 319D720708; Tue, 26 Mar 2019 13:38: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 x2QDco4r031122; Tue, 26 Mar 2019 13:38:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDcoU4031121; Tue, 26 Mar 2019 13:38:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261338.x2QDcoU4031121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:38: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: r345534 - stable/11/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 345534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 592D06B3A4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:38:50 -0000 Author: hselasky Date: Tue Mar 26 13:38:49 2019 New Revision: 345534 URL: https://svnweb.freebsd.org/changeset/base/345534 Log: MFC r344920: Teardown ifnet after stopping port in the mlx4en(4) driver. mlx4_en_stop_port() calls mlx4_en_put_qp() which can refer the link level address of the network interface, which in turn will be freed by the network interface detach function. Make sure the port is stopped before detaching the network interface. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:37:56 2019 (r345533) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue Mar 26 13:38:49 2019 (r345534) @@ -1776,13 +1776,13 @@ void mlx4_en_destroy_netdev(struct net_device *dev) if (priv->vlan_detach != NULL) EVENTHANDLER_DEREGISTER(vlan_unconfig, priv->vlan_detach); - /* Unregister device - this will close the port if it was up */ - if (priv->registered) - ether_ifdetach(dev); - mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); mutex_unlock(&mdev->state_lock); + + /* Unregister device - this will close the port if it was up */ + if (priv->registered) + ether_ifdetach(dev); if (priv->allocated) mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); From owner-svn-src-stable-11@freebsd.org Tue Mar 26 13:41:29 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAB931553326; Tue, 26 Mar 2019 13:41: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 803816B967; Tue, 26 Mar 2019 13:41: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 3E8BA20755; Tue, 26 Mar 2019 13:41: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 x2QDfSP9033125; Tue, 26 Mar 2019 13:41:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDfSUq033124; Tue, 26 Mar 2019 13:41:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261341.x2QDfSUq033124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:41: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: r345536 - stable/11/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 345536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 803816B967 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:41:29 -0000 Author: hselasky Date: Tue Mar 26 13:41:27 2019 New Revision: 345536 URL: https://svnweb.freebsd.org/changeset/base/345536 Log: MFC r345010: Improve support for switching to and from command polling mode in mlx4core. Make sure the enter and leave polling routines can be called multiple times with same setting. Ignore setting polling or event mode twice. This fixes a deadlock during shutdown if polling mode was already selected. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Tue Mar 26 13:40:33 2019 (r345535) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_cmd.c Tue Mar 26 13:41:27 2019 (r345536) @@ -2490,6 +2490,7 @@ int mlx4_cmd_init(struct mlx4_dev *dev) init_rwsem(&priv->cmd.switch_sem); mutex_init(&priv->cmd.slave_cmd_mutex); sema_init(&priv->cmd.poll_sem, 1); + sema_init(&priv->cmd.event_sem, 0); priv->cmd.use_events = 0; priv->cmd.toggle = 1; priv->cmd.initialized = 1; @@ -2617,8 +2618,10 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) { struct mlx4_priv *priv = mlx4_priv(dev); int i; - int err = 0; + if (priv->cmd.use_events != 0) + return 0; + priv->cmd.context = kmalloc(priv->cmd.max_cmds * sizeof (struct mlx4_cmd_context), GFP_KERNEL); @@ -2639,7 +2642,8 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) priv->cmd.context[priv->cmd.max_cmds - 1].next = -1; priv->cmd.free_head = 0; - sema_init(&priv->cmd.event_sem, priv->cmd.max_cmds); + for (i = 0; i != priv->cmd.max_cmds; i++) + up(&priv->cmd.event_sem); for (priv->cmd.token_mask = 1; priv->cmd.token_mask < priv->cmd.max_cmds; @@ -2651,7 +2655,7 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev) priv->cmd.use_events = 1; up_write(&priv->cmd.switch_sem); - return err; + return 0; } /* @@ -2662,6 +2666,9 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev) struct mlx4_priv *priv = mlx4_priv(dev); int i; + if (priv->cmd.use_events == 0) + return; + down_write(&priv->cmd.switch_sem); priv->cmd.use_events = 0; @@ -2669,6 +2676,7 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev) down(&priv->cmd.event_sem); kfree(priv->cmd.context); + priv->cmd.context = NULL; up(&priv->cmd.poll_sem); up_write(&priv->cmd.switch_sem); @@ -2740,11 +2748,11 @@ void mlx4_cmd_wake_completions(struct mlx4_dev *dev) int i; spin_lock(&priv->cmd.context_lock); - if (priv->cmd.context) { + if (priv->cmd.context != NULL) { for (i = 0; i < priv->cmd.max_cmds; ++i) { context = &priv->cmd.context[i]; context->fw_status = CMD_STAT_INTERNAL_ERR; - context->result = + context->result = mlx4_status_to_errno(CMD_STAT_INTERNAL_ERR); complete(&context->done); } From owner-svn-src-stable-11@freebsd.org Tue Mar 26 13:43:33 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 061F51553481; Tue, 26 Mar 2019 13:43: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9543C6BD08; Tue, 26 Mar 2019 13:43: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 76465208AE; Tue, 26 Mar 2019 13:43: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 x2QDhW2b036300; Tue, 26 Mar 2019 13:43:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDhWi2036299; Tue, 26 Mar 2019 13:43:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261343.x2QDhWi2036299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:43: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: r345538 - stable/11/sys/dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_core X-SVN-Commit-Revision: 345538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9543C6BD08 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:43:33 -0000 Author: hselasky Date: Tue Mar 26 13:43:32 2019 New Revision: 345538 URL: https://svnweb.freebsd.org/changeset/base/345538 Log: MFC r345011: Eliminate useless warning message when reading sysctl node in mlx4core. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Tue Mar 26 13:42:44 2019 (r345537) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4_main.c Tue Mar 26 13:43:32 2019 (r345538) @@ -1236,9 +1236,6 @@ static ssize_t show_port_ib_mtu(struct device *dev, port_mtu_attr); struct mlx4_dev *mdev = info->dev; - if (mdev->caps.port_type[info->port] == MLX4_PORT_TYPE_ETH) - mlx4_warn(mdev, "port level mtu is only used for IB ports\n"); - sprintf(buf, "%d\n", ibta_mtu_to_int(mdev->caps.port_ib_mtu[info->port])); return strlen(buf); From owner-svn-src-stable-11@freebsd.org Tue Mar 26 13:46:01 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C64A1553605; Tue, 26 Mar 2019 13:46:01 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF2B26BFF8; Tue, 26 Mar 2019 13:46: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 8A829208B1; Tue, 26 Mar 2019 13:46: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 x2QDk0lh036563; Tue, 26 Mar 2019 13:46:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDk0YY036562; Tue, 26 Mar 2019 13:46:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261346.x2QDk0YY036562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:46: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: r345540 - stable/11/lib/libusb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/lib/libusb X-SVN-Commit-Revision: 345540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF2B26BFF8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:46:01 -0000 Author: hselasky Date: Tue Mar 26 13:46:00 2019 New Revision: 345540 URL: https://svnweb.freebsd.org/changeset/base/345540 Log: MFC r344795: Fix typos in libusb. Found by: Denis Ahrens Sponsored by: Mellanox Technologies Modified: stable/11/lib/libusb/libusb10.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libusb/libusb10.c ============================================================================== --- stable/11/lib/libusb/libusb10.c Tue Mar 26 13:45:11 2019 (r345539) +++ stable/11/lib/libusb/libusb10.c Tue Mar 26 13:46:00 2019 (r345540) @@ -537,7 +537,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u if (ctx == NULL) return (NULL); /* be NULL safe */ - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid enter"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid enter"); if ((i = libusb_get_device_list(ctx, &devs)) < 0) return (NULL); @@ -561,7 +561,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u } libusb_free_device_list(devs, 1); - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid leave"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid leave"); return (pdev); } From owner-svn-src-stable-11@freebsd.org Tue Mar 26 13:49:46 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06E141553926; Tue, 26 Mar 2019 13:49:46 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FA346C50D; Tue, 26 Mar 2019 13:49: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 77C92208B7; Tue, 26 Mar 2019 13:49: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 x2QDnjYr036911; Tue, 26 Mar 2019 13:49:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDnjRL036910; Tue, 26 Mar 2019 13:49:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261349.x2QDnjRL036910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:49: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: r345543 - in stable/11/sys/dev/usb: . quirk X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev/usb: . quirk X-SVN-Commit-Revision: 345543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9FA346C50D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:49:46 -0000 Author: hselasky Date: Tue Mar 26 13:49:44 2019 New Revision: 345543 URL: https://svnweb.freebsd.org/changeset/base/345543 Log: MFC r343352: Add USB quirk. Submitted by: Gary Jennejohn Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/11/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:48:59 2019 (r345542) +++ stable/11/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:49:44 2019 (r345543) @@ -246,6 +246,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(IOMEGA, ZIP100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */ + USB_QUIRK(JMICRON, JMS566, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(JMICRON, JMS567, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Tue Mar 26 13:48:59 2019 (r345542) +++ stable/11/sys/dev/usb/usbdevs Tue Mar 26 13:49:44 2019 (r345543) @@ -2553,6 +2553,7 @@ product JATON EDA 0x5704 Ethernet product JETI SPC1201 0x04b2 FTDI compatible adapter /* JMicron products */ +product JMICRON JMS566 0x3569 USB to SATA 3.0Gb/s bridge product JMICRON JMS567 0x0567 USB to SATA 6.0Gb/s bridge product JMICRON JM20336 0x2336 USB to SATA Bridge product JMICRON JM20337 0x2338 USB to ATA/ATAPI Bridge From owner-svn-src-stable-11@freebsd.org Tue Mar 26 13:52:48 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82E9D1553C35; Tue, 26 Mar 2019 13:52:48 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 257F66CAC6; Tue, 26 Mar 2019 13:52:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E442B20A5B; Tue, 26 Mar 2019 13:52:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2QDqlol041947; Tue, 26 Mar 2019 13:52:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QDqlO9041943; Tue, 26 Mar 2019 13:52:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201903261352.x2QDqlO9041943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Mar 2019 13:52: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: r345545 - in stable/11/sys/dev: sound/usb usb usb/quirk X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/dev: sound/usb usb usb/quirk X-SVN-Commit-Revision: 345545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 257F66CAC6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 13:52:48 -0000 Author: hselasky Date: Tue Mar 26 13:52:46 2019 New Revision: 345545 URL: https://svnweb.freebsd.org/changeset/base/345545 Log: MFC r342961: snd_uaudio: Add quirks for Edirol UA-25EX in advanced driver mode. Extend the vendor class USB audio quirk to cover devices without the USB audio control descriptor. PR: 234794 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/sound/usb/uaudio.c stable/11/sys/dev/sound/usb/uaudioreg.h stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/11/sys/dev/sound/usb/uaudio.c Tue Mar 26 13:52:01 2019 (r345544) +++ stable/11/sys/dev/sound/usb/uaudio.c Tue Mar 26 13:52:46 2019 (r345545) @@ -1743,7 +1743,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == AS_GENERAL) && (asid.v1 == NULL)) { @@ -1759,7 +1759,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str } } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_INTERFACE) && (desc->bDescriptorSubtype == FORMAT_TYPE) && (asf1d.v1 == NULL)) { @@ -1798,7 +1798,7 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, str continue; } } - if ((acdp != NULL) && + if ((acdp != NULL || sc->sc_uq_au_vendor_class != 0) && (desc->bDescriptorType == UDESC_CS_ENDPOINT) && (desc->bDescriptorSubtype == AS_GENERAL) && (sed.v1 == NULL)) { Modified: stable/11/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/11/sys/dev/sound/usb/uaudioreg.h Tue Mar 26 13:52:01 2019 (r345544) +++ stable/11/sys/dev/sound/usb/uaudioreg.h Tue Mar 26 13:52:46 2019 (r345545) @@ -34,7 +34,7 @@ #ifndef _UAUDIOREG_H_ #define _UAUDIOREG_H_ -#define UAUDIO_VERSION 0x0100 +#define UAUDIO_VERSION_10 0x0100 #define UAUDIO_VERSION_20 0x0200 #define UAUDIO_VERSION_30 0x0300 Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/11/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:52:01 2019 (r345544) +++ stable/11/sys/dev/usb/quirk/usb_quirk.c Tue Mar 26 13:52:46 2019 (r345545) @@ -530,6 +530,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(CMEDIA, CM6206, 0x0000, 0xffff, UQ_AU_SET_SPDIF_CM6206), USB_QUIRK(PLOYTEC, SPL_CRIMSON_1, 0x0000, 0xffff, UQ_CFG_INDEX_1), + USB_QUIRK(ROLAND, UA25EX_AD, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), /* * Quirks for manufacturers which USB devices does not respond Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Tue Mar 26 13:52:01 2019 (r345544) +++ stable/11/sys/dev/usb/usbdevs Tue Mar 26 13:52:46 2019 (r345545) @@ -3888,6 +3888,8 @@ product ROLAND SD20 0x0027 SD-20 MIDI Synth product ROLAND SD80 0x0029 SD-80 MIDI Synth product ROLAND UA700 0x002b UA-700 Audio I/F product ROLAND PCR300 0x0033 EDIROL PCR-300 MIDI I/F +product ROLAND UA25EX_AD 0x00e6 EDIROL UA-25EX (Advanced Driver) +product ROLAND UA25EX_CC 0x00e7 EDIROL UA-25EX (Class Compliant) /* Rockfire products */ product ROCKFIRE GAMEPAD 0x2033 gamepad 203USB From owner-svn-src-stable-11@freebsd.org Tue Mar 26 20:47:32 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0D10155F278; Tue, 26 Mar 2019 20:47:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8315C85E47; Tue, 26 Mar 2019 20:47:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B4482504E; Tue, 26 Mar 2019 20:47:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2QKlVIN058409; Tue, 26 Mar 2019 20:47:31 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QKlVVi058407; Tue, 26 Mar 2019 20:47:31 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903262047.x2QKlVVi058407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 26 Mar 2019 20:47: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: r345556 - stable/11/bin/sh X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/11/bin/sh X-SVN-Commit-Revision: 345556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8315C85E47 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 20:47:32 -0000 Author: jilles Date: Tue Mar 26 20:47:30 2019 New Revision: 345556 URL: https://svnweb.freebsd.org/changeset/base/345556 Log: MFC r327475: sh: Move various structs from jobs.h to jobs.c These implementation details of jobs.c need not be exposed. PR: 224270 Modified: stable/11/bin/sh/jobs.c stable/11/bin/sh/jobs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/jobs.c ============================================================================== --- stable/11/bin/sh/jobs.c Tue Mar 26 20:44:02 2019 (r345555) +++ stable/11/bin/sh/jobs.c Tue Mar 26 20:47:30 2019 (r345556) @@ -75,6 +75,42 @@ __FBSDID("$FreeBSD$"); #include "builtins.h" +/* + * A job structure contains information about a job. A job is either a + * single process or a set of processes contained in a pipeline. In the + * latter case, pidlist will be non-NULL, and will point to a -1 terminated + * array of pids. + */ + +struct procstat { + pid_t pid; /* process id */ + int status; /* status flags (defined above) */ + char *cmd; /* text of command being run */ +}; + + +/* states */ +#define JOBSTOPPED 1 /* all procs are stopped */ +#define JOBDONE 2 /* all procs are completed */ + + +struct job { + struct procstat ps0; /* status of process */ + struct procstat *ps; /* status or processes when more than one */ + short nprocs; /* number of processes */ + pid_t pgrp; /* process group of this job */ + char state; /* true if job is finished */ + char used; /* true if this entry is in used */ + char changed; /* true if status has changed */ + char foreground; /* true if running in the foreground */ + char remembered; /* true if $! referenced */ +#if JOBS + char jobctl; /* job running under job control */ + struct job *next; /* job used after this one */ +#endif +}; + + static struct job *jobtab; /* array of jobs */ static int njobs; /* size of array */ static pid_t backgndpid = -1; /* pid of last background process */ Modified: stable/11/bin/sh/jobs.h ============================================================================== --- stable/11/bin/sh/jobs.h Tue Mar 26 20:44:02 2019 (r345555) +++ stable/11/bin/sh/jobs.h Tue Mar 26 20:47:30 2019 (r345556) @@ -40,40 +40,7 @@ #include /* for sig_atomic_t */ -/* - * A job structure contains information about a job. A job is either a - * single process or a set of processes contained in a pipeline. In the - * latter case, pidlist will be non-NULL, and will point to a -1 terminated - * array of pids. - */ - -struct procstat { - pid_t pid; /* process id */ - int status; /* status flags (defined above) */ - char *cmd; /* text of command being run */ -}; - - -/* states */ -#define JOBSTOPPED 1 /* all procs are stopped */ -#define JOBDONE 2 /* all procs are completed */ - - -struct job { - struct procstat ps0; /* status of process */ - struct procstat *ps; /* status or processes when more than one */ - short nprocs; /* number of processes */ - pid_t pgrp; /* process group of this job */ - char state; /* true if job is finished */ - char used; /* true if this entry is in used */ - char changed; /* true if status has changed */ - char foreground; /* true if running in the foreground */ - char remembered; /* true if $! referenced */ -#if JOBS - char jobctl; /* job running under job control */ - struct job *next; /* job used after this one */ -#endif -}; +struct job; enum { SHOWJOBS_DEFAULT, /* job number, status, command */ From owner-svn-src-stable-11@freebsd.org Tue Mar 26 21:30:27 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E17F155FDA9; Tue, 26 Mar 2019 21:30:27 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 111418745E; Tue, 26 Mar 2019 21:30:27 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEC952574F; Tue, 26 Mar 2019 21:30:26 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2QLUQR7079664; Tue, 26 Mar 2019 21:30:26 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QLUQWE079663; Tue, 26 Mar 2019 21:30:26 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903262130.x2QLUQWE079663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 26 Mar 2019 21:30: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: r345559 - stable/11/bin/sh X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/11/bin/sh X-SVN-Commit-Revision: 345559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 111418745E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 21:30:27 -0000 Author: jilles Date: Tue Mar 26 21:30:26 2019 New Revision: 345559 URL: https://svnweb.freebsd.org/changeset/base/345559 Log: MFC r328818: sh: Refactor job status printing, preparing for -o pipefail and similar No functional change is intended. PR: 224270 Modified: stable/11/bin/sh/jobs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/jobs.c ============================================================================== --- stable/11/bin/sh/jobs.c Tue Mar 26 21:20:42 2019 (r345558) +++ stable/11/bin/sh/jobs.c Tue Mar 26 21:30:26 2019 (r345559) @@ -362,7 +362,7 @@ showjob(struct job *jp, int mode) const char *statestr, *coredump; struct procstat *ps; struct job *j; - int col, curr, i, jobno, prev, procno; + int col, curr, i, jobno, prev, procno, status; char c; procno = (mode == SHOWJOBS_PGIDS) ? 1 : jp->nprocs; @@ -376,11 +376,12 @@ showjob(struct job *jp, int mode) } #endif coredump = ""; - ps = jp->ps + jp->nprocs - 1; + status = jp->ps[jp->nprocs - 1].status; if (jp->state == 0) { statestr = "Running"; #if JOBS } else if (jp->state == JOBSTOPPED) { + ps = jp->ps + jp->nprocs - 1; while (!WIFSTOPPED(ps->status) && ps > jp->ps) ps--; if (WIFSTOPPED(ps->status)) @@ -391,20 +392,20 @@ showjob(struct job *jp, int mode) if (statestr == NULL) statestr = "Suspended"; #endif - } else if (WIFEXITED(ps->status)) { - if (WEXITSTATUS(ps->status) == 0) + } else if (WIFEXITED(status)) { + if (WEXITSTATUS(status) == 0) statestr = "Done"; else { fmtstr(statebuf, sizeof(statebuf), "Done(%d)", - WEXITSTATUS(ps->status)); + WEXITSTATUS(status)); statestr = statebuf; } } else { - i = WTERMSIG(ps->status); + i = WTERMSIG(status); statestr = strsignal(i); if (statestr == NULL) statestr = "Unknown signal"; - if (WCOREDUMP(ps->status)) + if (WCOREDUMP(status)) coredump = " (core dumped)"; } From owner-svn-src-stable-11@freebsd.org Tue Mar 26 22:34:10 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8F6C15620AB; Tue, 26 Mar 2019 22:34:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 584E289FA3; Tue, 26 Mar 2019 22:34:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30AC526322; Tue, 26 Mar 2019 22:34:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2QMY9BQ016351; Tue, 26 Mar 2019 22:34:09 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2QMY7iG016340; Tue, 26 Mar 2019 22:34:07 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903262234.x2QMY7iG016340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 26 Mar 2019 22:34: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: r345561 - in stable/11/bin/sh: . tests/execution X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in stable/11/bin/sh: . tests/execution X-SVN-Commit-Revision: 345561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 584E289FA3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 22:34:11 -0000 Author: jilles Date: Tue Mar 26 22:34:07 2019 New Revision: 345561 URL: https://svnweb.freebsd.org/changeset/base/345561 Log: MFC r344502: sh: Add set -o pipefail The pipefail option allows checking the exit status of all commands in a pipeline more easily, at a limited cost of complexity in sh itself. It works similarly to the option in bash, ksh93 and mksh. Like ksh93 and unlike bash and mksh, the state of the option is saved when a pipeline is started. Therefore, even in the case of commands like A | B & a later change of the option does not change the exit status, the same way (A | B) & works. Since SIGPIPE is not handled specially, more work in the script is required for a proper exit status for pipelines containing commands such as head that may terminate successfully without reading all input. This can be something like ( cmd1 r=$? if [ "$r" -gt 128 ] && [ "$(kill -l "$r")" = PIPE ]; then exit 0 else exit "$r" fi ) | head PR: 224270 Relnotes: yes Added: stable/11/bin/sh/tests/execution/pipefail1.0 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail1.0 stable/11/bin/sh/tests/execution/pipefail2.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail2.42 stable/11/bin/sh/tests/execution/pipefail3.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail3.42 stable/11/bin/sh/tests/execution/pipefail4.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail4.42 stable/11/bin/sh/tests/execution/pipefail5.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail5.42 stable/11/bin/sh/tests/execution/pipefail6.42 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail6.42 stable/11/bin/sh/tests/execution/pipefail7.0 - copied unchanged from r344502, head/bin/sh/tests/execution/pipefail7.0 Modified: stable/11/bin/sh/jobs.c stable/11/bin/sh/options.h stable/11/bin/sh/sh.1 stable/11/bin/sh/tests/execution/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/jobs.c ============================================================================== --- stable/11/bin/sh/jobs.c Tue Mar 26 22:14:50 2019 (r345560) +++ stable/11/bin/sh/jobs.c Tue Mar 26 22:34:07 2019 (r345561) @@ -104,6 +104,7 @@ struct job { char changed; /* true if status has changed */ char foreground; /* true if running in the foreground */ char remembered; /* true if $! referenced */ + char pipefail; /* pass any non-zero status */ #if JOBS char jobctl; /* job running under job control */ struct job *next; /* job used after this one */ @@ -143,6 +144,7 @@ static void setcurjob(struct job *); static void deljob(struct job *); static struct job *getcurjob(struct job *); #endif +static int getjobstatus(const struct job *); static void printjobcmd(struct job *); static void showjob(struct job *, int); @@ -340,6 +342,20 @@ jobscmd(int argc __unused, char *argv[] __unused) return (0); } +static int getjobstatus(const struct job *jp) +{ + int i, status; + + if (!jp->pipefail) + return (jp->ps[jp->nprocs - 1].status); + for (i = jp->nprocs - 1; i >= 0; i--) { + status = jp->ps[i].status; + if (status != 0) + return (status); + } + return (0); +} + static void printjobcmd(struct job *jp) { @@ -376,7 +392,7 @@ showjob(struct job *jp, int mode) } #endif coredump = ""; - status = jp->ps[jp->nprocs - 1].status; + status = getjobstatus(jp); if (jp->state == 0) { statestr = "Running"; #if JOBS @@ -555,7 +571,7 @@ waitcmdloop(struct job *job) do { if (job != NULL) { if (job->state == JOBDONE) { - status = job->ps[job->nprocs - 1].status; + status = getjobstatus(job); if (WIFEXITED(status)) retval = WEXITSTATUS(status); else @@ -780,6 +796,7 @@ makejob(union node *node __unused, int nprocs) jp->nprocs = 0; jp->foreground = 0; jp->remembered = 0; + jp->pipefail = pipefailflag; #if JOBS jp->jobctl = jobctl; jp->next = NULL; @@ -1075,7 +1092,7 @@ waitforjob(struct job *jp, int *origstatus) if (jp->state == JOBSTOPPED) setcurjob(jp); #endif - status = jp->ps[jp->nprocs - 1].status; + status = getjobstatus(jp); if (origstatus != NULL) *origstatus = status; /* convert to 8 bits */ Modified: stable/11/bin/sh/options.h ============================================================================== --- stable/11/bin/sh/options.h Tue Mar 26 22:14:50 2019 (r345560) +++ stable/11/bin/sh/options.h Tue Mar 26 22:34:07 2019 (r345561) @@ -65,9 +65,10 @@ struct shparam { #define Pflag optval[17] #define hflag optval[18] #define nologflag optval[19] +#define pipefailflag optval[20] #define NSHORTOPTS 19 -#define NOPTS 20 +#define NOPTS 21 extern char optval[NOPTS]; extern const char optletter[NSHORTOPTS]; @@ -95,6 +96,7 @@ static const unsigned char optname[] = "\010physical" "\010trackall" "\005nolog" + "\010pipefail" ; #endif Modified: stable/11/bin/sh/sh.1 ============================================================================== --- stable/11/bin/sh/sh.1 Tue Mar 26 22:14:50 2019 (r345560) +++ stable/11/bin/sh/sh.1 Tue Mar 26 22:34:07 2019 (r345561) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd May 30, 2016 +.Dd February 24, 2019 .Dt SH 1 .Os .Sh NAME @@ -348,6 +348,18 @@ Another do-nothing option for .Tn POSIX compliance. It only has a long name. +.It Li pipefail +Change the exit status of a pipeline to the last non-zero exit status of +any command in the pipeline, if any. +Since an exit due to +.Dv SIGPIPE +counts as a non-zero exit status, +this option may cause non-zero exit status for successful pipelines +if a command such as +.Xr head 1 +in the pipeline terminates with status 0 without reading its +input completely. +This option only has a long name. .El .Pp The @@ -865,12 +877,15 @@ If the keyword .Ic !\& does not precede the pipeline, the exit status is the exit status of the last command specified -in the pipeline. +in the pipeline if the +.Cm pipefail +option is not set or all commands returned zero, +or the last non-zero exit status of any command in the pipeline otherwise. Otherwise, the exit status is the logical -NOT of the exit status of the last command. +NOT of that exit status. That is, if -the last command returns zero, the exit status is 1; if -the last command returns greater than zero, the exit status +that status is zero, the exit status is 1; if +that status is greater than zero, the exit status is zero. .Pp Because pipeline assignment of standard input or standard Modified: stable/11/bin/sh/tests/execution/Makefile ============================================================================== --- stable/11/bin/sh/tests/execution/Makefile Tue Mar 26 22:14:50 2019 (r345560) +++ stable/11/bin/sh/tests/execution/Makefile Tue Mar 26 22:34:07 2019 (r345561) @@ -30,6 +30,13 @@ ${PACKAGE}FILES+= killed2.0 ${PACKAGE}FILES+= not1.0 ${PACKAGE}FILES+= not2.0 ${PACKAGE}FILES+= path1.0 +${PACKAGE}FILES+= pipefail1.0 +${PACKAGE}FILES+= pipefail2.42 +${PACKAGE}FILES+= pipefail3.42 +${PACKAGE}FILES+= pipefail4.42 +${PACKAGE}FILES+= pipefail5.42 +${PACKAGE}FILES+= pipefail6.42 +${PACKAGE}FILES+= pipefail7.0 ${PACKAGE}FILES+= redir1.0 ${PACKAGE}FILES+= redir2.0 ${PACKAGE}FILES+= redir3.0 Copied: stable/11/bin/sh/tests/execution/pipefail1.0 (from r344502, head/bin/sh/tests/execution/pipefail1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail1.0 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail1.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +: && : | : && : | : | : && : | : | : | : Copied: stable/11/bin/sh/tests/execution/pipefail2.42 (from r344502, head/bin/sh/tests/execution/pipefail2.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail2.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail2.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : Copied: stable/11/bin/sh/tests/execution/pipefail3.42 (from r344502, head/bin/sh/tests/execution/pipefail3.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail3.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail3.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +: | (exit 42) Copied: stable/11/bin/sh/tests/execution/pipefail4.42 (from r344502, head/bin/sh/tests/execution/pipefail4.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail4.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail4.42) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -o pipefail +(exit 43) | (exit 42) Copied: stable/11/bin/sh/tests/execution/pipefail5.42 (from r344502, head/bin/sh/tests/execution/pipefail5.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail5.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail5.42) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : & +wait %+ Copied: stable/11/bin/sh/tests/execution/pipefail6.42 (from r344502, head/bin/sh/tests/execution/pipefail6.42) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail6.42 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail6.42) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +set -o pipefail +(exit 42) | : & +set +o pipefail +wait %+ Copied: stable/11/bin/sh/tests/execution/pipefail7.0 (from r344502, head/bin/sh/tests/execution/pipefail7.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/execution/pipefail7.0 Tue Mar 26 22:34:07 2019 (r345561, copy of r344502, head/bin/sh/tests/execution/pipefail7.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +(exit 42) | : & +set -o pipefail +wait %+ From owner-svn-src-stable-11@freebsd.org Wed Mar 27 08:56:00 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E8F515489F7; Wed, 27 Mar 2019 08:56:00 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E53B6C2BA; Wed, 27 Mar 2019 08:56:00 +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 E750A4F71; Wed, 27 Mar 2019 08:55:59 +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 x2R8txa9040142; Wed, 27 Mar 2019 08:55:59 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2R8txnK040141; Wed, 27 Mar 2019 08:55:59 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903270855.x2R8txnK040141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 27 Mar 2019 08:55: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: r345569 - in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.bin/lockf 11/usr.bin/lockf 12/usr.bin/lockf X-SVN-Commit-Revision: 345569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E53B6C2BA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 08:56:00 -0000 Author: avos Date: Wed Mar 27 08:55:59 2019 New Revision: 345569 URL: https://svnweb.freebsd.org/changeset/base/345569 Log: MFC r345318: lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not exist Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation. Was checked with a command from PR 210770: lockf -n /tmp/doesnotexist echo; echo $? PR: 210770 Modified: stable/11/usr.bin/lockf/lockf.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/lockf/lockf.c stable/12/usr.bin/lockf/lockf.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/usr.bin/lockf/lockf.c ============================================================================== --- stable/11/usr.bin/lockf/lockf.c Wed Mar 27 08:02:55 2019 (r345568) +++ stable/11/usr.bin/lockf/lockf.c Wed Mar 27 08:55:59 2019 (r345569) @@ -174,6 +174,8 @@ acquire_lock(const char *name, int flags) if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); + else if (errno == ENOENT && (flags & O_CREAT) == 0) + err(EX_UNAVAILABLE, "%s", name); err(EX_CANTCREAT, "cannot open %s", name); } return (fd); From owner-svn-src-stable-11@freebsd.org Wed Mar 27 09:18:35 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B02E21549F8D; Wed, 27 Mar 2019 09:18:35 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F7EC6D2D2; Wed, 27 Mar 2019 09:18:35 +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 1DF3F52D5; Wed, 27 Mar 2019 09:18:35 +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 x2R9IYHG051215; Wed, 27 Mar 2019 09:18:34 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2R9IYOn051214; Wed, 27 Mar 2019 09:18:34 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903270918.x2R9IYOn051214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 27 Mar 2019 09:18:34 +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: r345570 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan X-SVN-Commit-Revision: 345570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F7EC6D2D2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 09:18:36 -0000 Author: avos Date: Wed Mar 27 09:18:34 2019 New Revision: 345570 URL: https://svnweb.freebsd.org/changeset/base/345570 Log: MFC r344994: urtw(4): add promiscuous mode callback Also, pass control frames to the host while in MONITOR mode and / or when promiscuous mode is enabled. Was tested with Netgear WG111 v3 (RTL8187B), STA / MONITOR modes. Modified: stable/11/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_urtw.c Wed Mar 27 08:55:59 2019 (r345569) +++ stable/11/sys/dev/usb/wlan/if_urtw.c Wed Mar 27 09:18:34 2019 (r345570) @@ -661,6 +661,7 @@ static void urtw_scan_end(struct ieee80211com *); static void urtw_getradiocaps(struct ieee80211com *, int, int *, struct ieee80211_channel[]); static void urtw_set_channel(struct ieee80211com *); +static void urtw_update_promisc(struct ieee80211com *); static void urtw_update_mcast(struct ieee80211com *); static int urtw_tx_start(struct urtw_softc *, struct ieee80211_node *, struct mbuf *, @@ -888,6 +889,7 @@ urtw_attach(device_t dev) ic->ic_updateslot = urtw_updateslot; ic->ic_vap_create = urtw_vap_create; ic->ic_vap_delete = urtw_vap_delete; + ic->ic_update_promisc = urtw_update_promisc; ic->ic_update_mcast = urtw_update_mcast; ic->ic_parent = urtw_parent; ic->ic_transmit = urtw_transmit; @@ -1623,6 +1625,17 @@ fail: } static void +urtw_update_promisc(struct ieee80211com *ic) +{ + struct urtw_softc *sc = ic->ic_softc; + + URTW_LOCK(sc); + if (sc->sc_flags & URTW_RUNNING) + urtw_rx_setconf(sc); + URTW_UNLOCK(sc); +} + +static void urtw_update_mcast(struct ieee80211com *ic) { @@ -3882,7 +3895,6 @@ urtw_rx_setconf(struct urtw_softc *sc) if (sc->sc_flags & URTW_RTL8187B) { data = data | URTW_RX_FILTER_MNG | URTW_RX_FILTER_DATA | URTW_RX_FILTER_MCAST | URTW_RX_FILTER_BCAST | - URTW_RX_FILTER_NICMAC | URTW_RX_CHECK_BSSID | URTW_RX_FIFO_THRESHOLD_NONE | URTW_MAX_RX_DMA_2048 | URTW_RX_AUTORESETPHY | URTW_RCR_ONLYERLPKT; @@ -3897,19 +3909,21 @@ urtw_rx_setconf(struct urtw_softc *sc) if (sc->sc_crcmon == 1 && ic->ic_opmode == IEEE80211_M_MONITOR) data = data | URTW_RX_FILTER_CRCERR; - if (ic->ic_opmode == IEEE80211_M_MONITOR || - ic->ic_promisc > 0 || ic->ic_allmulti > 0) { - data = data | URTW_RX_FILTER_ALLMAC; - } else { - data = data | URTW_RX_FILTER_NICMAC; - data = data | URTW_RX_CHECK_BSSID; - } - data = data &~ URTW_RX_FIFO_THRESHOLD_MASK; data = data | URTW_RX_FIFO_THRESHOLD_NONE | URTW_RX_AUTORESETPHY; data = data &~ URTW_MAX_RX_DMA_MASK; data = data | URTW_MAX_RX_DMA_2048 | URTW_RCR_ONLYERLPKT; + } + + /* XXX allmulti should not be checked here... */ + if (ic->ic_opmode == IEEE80211_M_MONITOR || + ic->ic_promisc > 0 || ic->ic_allmulti > 0) { + data = data | URTW_RX_FILTER_CTL; + data = data | URTW_RX_FILTER_ALLMAC; + } else { + data = data | URTW_RX_FILTER_NICMAC; + data = data | URTW_RX_CHECK_BSSID; } urtw_write32_m(sc, URTW_RX, data); From owner-svn-src-stable-11@freebsd.org Wed Mar 27 11:03:08 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EDDC154C94B; Wed, 27 Mar 2019 11:03:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EA827059F; Wed, 27 Mar 2019 11:03:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2108F656B; Wed, 27 Mar 2019 11:03:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RB37et008284; Wed, 27 Mar 2019 11:03:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RB375S008283; Wed, 27 Mar 2019 11:03:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903271103.x2RB375S008283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Mar 2019 11:03: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: r345572 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 345572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3EA827059F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 11:03:08 -0000 Author: kib Date: Wed Mar 27 11:03:07 2019 New Revision: 345572 URL: https://svnweb.freebsd.org/changeset/base/345572 Log: MFC r345324: vm_fault_copy_entry: accept invalid source pages. Modified: stable/11/sys/vm/vm_fault.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_fault.c ============================================================================== --- stable/11/sys/vm/vm_fault.c Wed Mar 27 10:58:37 2019 (r345571) +++ stable/11/sys/vm/vm_fault.c Wed Mar 27 11:03:07 2019 (r345572) @@ -1705,8 +1705,7 @@ again: } pmap_copy_page(src_m, dst_m); VM_OBJECT_RUNLOCK(object); - dst_m->valid = VM_PAGE_BITS_ALL; - dst_m->dirty = VM_PAGE_BITS_ALL; + dst_m->dirty = dst_m->valid = src_m->valid; } else { dst_m = src_m; if (vm_page_sleep_if_busy(dst_m, "fltupg")) @@ -1719,8 +1718,6 @@ again: */ break; vm_page_xbusy(dst_m); - KASSERT(dst_m->valid == VM_PAGE_BITS_ALL, - ("invalid dst page %p", dst_m)); } VM_OBJECT_WUNLOCK(dst_object); @@ -1728,9 +1725,18 @@ again: * Enter it in the pmap. If a wired, copy-on-write * mapping is being replaced by a write-enabled * mapping, then wire that new mapping. + * + * The page can be invalid if the user called + * msync(MS_INVALIDATE) or truncated the backing vnode + * or shared memory object. In this case, do not + * insert it into pmap, but still do the copy so that + * all copies of the wired map entry have similar + * backing pages. */ - pmap_enter(dst_map->pmap, vaddr, dst_m, prot, - access | (upgrade ? PMAP_ENTER_WIRED : 0), 0); + if (dst_m->valid == VM_PAGE_BITS_ALL) { + pmap_enter(dst_map->pmap, vaddr, dst_m, prot, + access | (upgrade ? PMAP_ENTER_WIRED : 0), 0); + } /* * Mark it no longer busy, and put it on the active list. From owner-svn-src-stable-11@freebsd.org Wed Mar 27 19:17:43 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB21C1557B44; Wed, 27 Mar 2019 19:17:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5148889741; Wed, 27 Mar 2019 19:17:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A1C8B8F6; Wed, 27 Mar 2019 19:17:43 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJHgii065368; Wed, 27 Mar 2019 19:17:42 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJHgEB065367; Wed, 27 Mar 2019 19:17:42 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201903271917.x2RJHgEB065367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Wed, 27 Mar 2019 19:17: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: r345590 - stable/11/sys/x86/isa X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/x86/isa X-SVN-Commit-Revision: 345590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5148889741 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:17:43 -0000 Author: wulf Date: Wed Mar 27 19:17:42 2019 New Revision: 345590 URL: https://svnweb.freebsd.org/changeset/base/345590 Log: MFC: r344982, r345022 atrtc(4): install ACPI RTC/CMOS operation region handler FreeBSD base system does not provide an ACPI handler for the PC/AT RTC/CMOS device with PnP ID PNP0B00; on some HP laptops, the absence of this handler causes suspend/resume and poweroff(8) to hang or fail [1], [2]. On these laptops EC _REG method queries the RTC date/time registers via ACPI before suspending/powering off. The handler should be registered before acpi_ec driver is loaded. This change adds handler to access CMOS RTC operation region described in section 9.15 of ACPI-6.2 specification [3]. It is installed only for ACPI version of atrtc(4) so it should not affect old ACPI-less i386 systems. It is possible to disable the handler with loader tunable: debug.acpi.disabled=atrtc Informational debugging printf can be enabled by setting hw.acpi.verbose=1 in loader.conf [1] https://wiki.freebsd.org/Laptops/HP_Envy_6Z-1100 [2] https://wiki.freebsd.org/Laptops/HP_Notebook_15-af104ur [3] https://uefi.org/sites/default/files/resources/ACPI_6_2.pdf PR: 207419, 213039 Submitted by: Anthony Jenkins Reviewed by: ian Discussed on: acpi@, 2013-2015, several threads Differential Revision: https://reviews.freebsd.org/D19314 Modified: stable/11/sys/x86/isa/atrtc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/isa/atrtc.c ============================================================================== --- stable/11/sys/x86/isa/atrtc.c Wed Mar 27 19:16:03 2019 (r345589) +++ stable/11/sys/x86/isa/atrtc.c Wed Mar 27 19:17:42 2019 (r345590) @@ -30,6 +30,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" #include "opt_isa.h" #include @@ -52,6 +53,12 @@ __FBSDID("$FreeBSD$"); #endif #include #include "clock_if.h" +#ifdef DEV_ACPI +#include +#include +#include +#include +#endif /* * atrtc_lock protects low-level access to individual hardware registers. @@ -70,6 +77,11 @@ static int rtc_reg = -1; static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; static u_char rtc_statusb = RTCSB_24HR; +#ifdef DEV_ACPI +#define _COMPONENT ACPI_TIMER +ACPI_MODULE_NAME("ATRTC") +#endif + /* * RTC support routines */ @@ -185,6 +197,9 @@ struct atrtc_softc { struct resource *intr_res; void *intr_handler; struct eventtimer et; +#ifdef DEV_ACPI + ACPI_HANDLE acpi_handle; +#endif }; static int @@ -239,7 +254,145 @@ rtc_intr(void *arg) return(flag ? FILTER_HANDLED : FILTER_STRAY); } +#ifdef DEV_ACPI /* + * ACPI RTC CMOS address space handler + */ +#define ATRTC_LAST_REG 0x40 + +static void +rtcin_region(int reg, void *buf, int len) +{ + u_char *ptr = buf; + + /* Drop lock after each IO as intr and settime have greater priority */ + while (len-- > 0) + *ptr++ = rtcin(reg++) & 0xff; +} + +static void +rtcout_region(int reg, const void *buf, int len) +{ + const u_char *ptr = buf; + + while (len-- > 0) + writertc(reg++, *ptr++); +} + +static bool +atrtc_check_cmos_access(bool is_read, ACPI_PHYSICAL_ADDRESS addr, UINT32 len) +{ + + /* Block address space wrapping on out-of-bound access */ + if (addr >= ATRTC_LAST_REG || addr + len > ATRTC_LAST_REG) + return (false); + + if (is_read) { + /* Reading 0x0C will muck with interrupts */ + if (addr <= RTC_INTR && addr + len > RTC_INTR) + return (false); + } else { + /* + * Allow single-byte writes to alarm registers and + * multi-byte writes to addr >= 0x30, else deny. + */ + if (!((len == 1 && (addr == RTC_SECALRM || + addr == RTC_MINALRM || + addr == RTC_HRSALRM)) || + addr >= 0x30)) + return (false); + } + return (true); +} + +static ACPI_STATUS +atrtc_acpi_cmos_handler(UINT32 func, ACPI_PHYSICAL_ADDRESS addr, + UINT32 bitwidth, UINT64 *value, void *context, void *region_context) +{ + device_t dev = context; + UINT32 bytewidth = howmany(bitwidth, 8); + bool is_read = func == ACPI_READ; + + /* ACPICA is very verbose on CMOS handler failures, so we, too */ +#define CMOS_HANDLER_ERR(fmt, ...) \ + device_printf(dev, "ACPI [SystemCMOS] handler: " fmt, ##__VA_ARGS__) + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + if (value == NULL) { + CMOS_HANDLER_ERR("NULL parameter\n"); + return (AE_BAD_PARAMETER); + } + if (bitwidth == 0 || (bitwidth & 0x07) != 0) { + CMOS_HANDLER_ERR("Invalid bitwidth: %u\n", bitwidth); + return (AE_BAD_PARAMETER); + } + if (!atrtc_check_cmos_access(is_read, addr, bytewidth)) { + CMOS_HANDLER_ERR("%s access rejected: addr=%#04jx, len=%u\n", + is_read ? "Read" : "Write", (uintmax_t)addr, bytewidth); + return (AE_BAD_PARAMETER); + } + + switch (func) { + case ACPI_READ: + rtcin_region(addr, value, bytewidth); + break; + case ACPI_WRITE: + rtcout_region(addr, value, bytewidth); + break; + default: + CMOS_HANDLER_ERR("Invalid function: %u\n", func); + return (AE_BAD_PARAMETER); + } + + ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), + "ACPI RTC CMOS %s access: addr=%#04x, len=%u, val=%*D\n", + is_read ? "read" : "write", (unsigned)addr, bytewidth, + bytewidth, value, " "); + + return (AE_OK); +} + +static int +atrtc_reg_acpi_cmos_handler(device_t dev) +{ + struct atrtc_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + /* Don't handle address space events if driver is disabled. */ + if (acpi_disabled("atrtc")) + return (ENXIO); + + sc->acpi_handle = acpi_get_handle(dev); + if (sc->acpi_handle == NULL || + ACPI_FAILURE(AcpiInstallAddressSpaceHandler(sc->acpi_handle, + ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler, NULL, dev))) { + sc->acpi_handle = NULL; + device_printf(dev, + "Can't register ACPI CMOS address space handler\n"); + return (ENXIO); + } + + return (0); +} + +static int +atrtc_unreg_acpi_cmos_handler(device_t dev) +{ + struct atrtc_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + if (sc->acpi_handle != NULL) + AcpiRemoveAddressSpaceHandler(sc->acpi_handle, + ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler); + + return (0); +} +#endif /* DEV_ACPI */ + +/* * Attach to the ISA PnP descriptors for the timer and realtime clock. */ static struct isa_pnp_id atrtc_ids[] = { @@ -311,6 +464,37 @@ atrtc_attach(device_t dev) } static int +atrtc_isa_attach(device_t dev) +{ + + return (atrtc_attach(dev)); +} + +#ifdef DEV_ACPI +static int +atrtc_acpi_attach(device_t dev) +{ + int ret; + + ret = atrtc_attach(dev); + if (ret) + return (ret); + + (void)atrtc_reg_acpi_cmos_handler(dev); + + return (0); +} + +static int +atrtc_acpi_detach(device_t dev) +{ + + (void)atrtc_unreg_acpi_cmos_handler(dev); + return (0); +} +#endif /* DEV_ACPI */ + +static int atrtc_resume(device_t dev) { @@ -396,10 +580,10 @@ atrtc_gettime(device_t dev, struct timespec *ts) return (clock_bcd_to_ts(&bct, ts, false)); } -static device_method_t atrtc_methods[] = { +static device_method_t atrtc_isa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atrtc_probe), - DEVMETHOD(device_attach, atrtc_attach), + DEVMETHOD(device_attach, atrtc_isa_attach), DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), @@ -413,13 +597,38 @@ static device_method_t atrtc_methods[] = { { 0, 0 } }; -static driver_t atrtc_driver = { +static driver_t atrtc_isa_driver = { "atrtc", - atrtc_methods, + atrtc_isa_methods, sizeof(struct atrtc_softc), }; +#ifdef DEV_ACPI +static device_method_t atrtc_acpi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, atrtc_probe), + DEVMETHOD(device_attach, atrtc_acpi_attach), + DEVMETHOD(device_detach, atrtc_acpi_detach), + /* XXX stop statclock? */ + DEVMETHOD(device_resume, atrtc_resume), + + /* clock interface */ + DEVMETHOD(clock_gettime, atrtc_gettime), + DEVMETHOD(clock_settime, atrtc_settime), + + { 0, 0 } +}; + +static driver_t atrtc_acpi_driver = { + "atrtc", + atrtc_acpi_methods, + sizeof(struct atrtc_softc), +}; +#endif /* DEV_ACPI */ + static devclass_t atrtc_devclass; -DRIVER_MODULE(atrtc, isa, atrtc_driver, atrtc_devclass, 0, 0); -DRIVER_MODULE(atrtc, acpi, atrtc_driver, atrtc_devclass, 0, 0); +DRIVER_MODULE(atrtc, isa, atrtc_isa_driver, atrtc_devclass, 0, 0); +#ifdef DEV_ACPI +DRIVER_MODULE(atrtc, acpi, atrtc_acpi_driver, atrtc_devclass, 0, 0); +#endif From owner-svn-src-stable-11@freebsd.org Wed Mar 27 19:59:37 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90389155986F; Wed, 27 Mar 2019 19:59:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E0B68CA73; Wed, 27 Mar 2019 19:59:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01953C1AA; Wed, 27 Mar 2019 19:59:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RJxaBT089161; Wed, 27 Mar 2019 19:59:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RJxadZ089160; Wed, 27 Mar 2019 19:59:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903271959.x2RJxadZ089160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 27 Mar 2019 19:59:36 +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: r345600 - stable/11/share/man/man8 X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/share/man/man8 X-SVN-Commit-Revision: 345600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E0B68CA73 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 19:59:37 -0000 Author: ngie Date: Wed Mar 27 19:59:36 2019 New Revision: 345600 URL: https://svnweb.freebsd.org/changeset/base/345600 Log: MFC r344066: Add rc.resume(8) alias for rc(8) to fix the manpage cross references This issue was noticed when running `make manlint` as part of MFCing r342597 to ^/stable/11: ``` $ make -C share/man/man8 rc.8lint mandoc -Tascii -Tlint rc.8 mandoc: rc.8:548:6: STYLE: referenced manual not found: Xr rc.resume 8 $ ``` This is a followup commit to r339818. Differential Revision: https://reviews.freebsd.org/D19547 Modified: stable/11/share/man/man8/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man8/Makefile ============================================================================== --- stable/11/share/man/man8/Makefile Wed Mar 27 19:47:21 2019 (r345599) +++ stable/11/share/man/man8/Makefile Wed Mar 27 19:59:36 2019 (r345600) @@ -24,6 +24,7 @@ MLINKS= \ rc.8 rc.local.8 \ rc.8 rc.network.8 \ rc.8 rc.pccard.8 \ + rc.8 rc.resume.8 \ rc.8 rc.serial.8 \ rc.8 rc.shutdown.8 From owner-svn-src-stable-11@freebsd.org Wed Mar 27 22:09:36 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66056155D0AF; Wed, 27 Mar 2019 22:09:36 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A5596B860; Wed, 27 Mar 2019 22:09:36 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7084D7E0; Wed, 27 Mar 2019 22:09:35 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2RM9ZFb062621; Wed, 27 Mar 2019 22:09:35 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2RM9ZAp062619; Wed, 27 Mar 2019 22:09:35 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201903272209.x2RM9ZAp062619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 27 Mar 2019 22:09: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: r345617 - stable/11/bin/sh X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/11/bin/sh X-SVN-Commit-Revision: 345617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0A5596B860 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 22:09:36 -0000 Author: jilles Date: Wed Mar 27 22:09:35 2019 New Revision: 345617 URL: https://svnweb.freebsd.org/changeset/base/345617 Log: MFC r344306: sh: Send normal output from bind builtin to stdout PR: 233343 Modified: stable/11/bin/sh/histedit.c stable/11/bin/sh/output.c stable/11/bin/sh/output.h Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/histedit.c ============================================================================== --- stable/11/bin/sh/histedit.c Wed Mar 27 22:05:57 2019 (r345616) +++ stable/11/bin/sh/histedit.c Wed Mar 27 22:09:35 2019 (r345617) @@ -474,10 +474,31 @@ str_to_event(const char *str, int last) int bindcmd(int argc, char **argv) { + int ret; + FILE *old; + FILE *out; if (el == NULL) error("line editing is disabled"); - return (el_parse(el, argc, __DECONST(const char **, argv))); + + INTOFF; + + out = out1fp(); + if (out == NULL) + error("Out of space"); + + el_get(el, EL_GETFP, 1, &old); + el_set(el, EL_SETFP, 1, out); + + ret = el_parse(el, argc, __DECONST(const char **, argv)); + + el_set(el, EL_SETFP, 1, old); + + fclose(out); + + INTON; + + return ret; } #else Modified: stable/11/bin/sh/output.c ============================================================================== --- stable/11/bin/sh/output.c Wed Mar 27 22:05:57 2019 (r345616) +++ stable/11/bin/sh/output.c Wed Mar 27 22:09:35 2019 (r345617) @@ -345,6 +345,12 @@ doformat(struct output *dest, const char *f, va_list a } } +FILE * +out1fp(void) +{ + return fwopen(out1, doformat_wr); +} + /* * Version of write which resumes after a signal is caught. */ Modified: stable/11/bin/sh/output.h ============================================================================== --- stable/11/bin/sh/output.h Wed Mar 27 22:05:57 2019 (r345616) +++ stable/11/bin/sh/output.h Wed Mar 27 22:09:35 2019 (r345617) @@ -37,6 +37,7 @@ #include #include +#include struct output { char *nextc; @@ -73,6 +74,7 @@ void out1fmt(const char *, ...) __printflike(1, 2); void out2fmt_flush(const char *, ...) __printflike(1, 2); void fmtstr(char *, int, const char *, ...) __printflike(3, 4); void doformat(struct output *, const char *, va_list) __printflike(2, 0); +FILE *out1fp(void); int xwrite(int, const char *, int); #define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c))) From owner-svn-src-stable-11@freebsd.org Thu Mar 28 06:10:43 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB0FB154CA3D; Thu, 28 Mar 2019 06:10:42 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 903CC86BB6; Thu, 28 Mar 2019 06:10:42 +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 6BFD71AF6F; Thu, 28 Mar 2019 06:10:42 +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 x2S6Agrl021887; Thu, 28 Mar 2019 06:10:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S6Ag27021886; Thu, 28 Mar 2019 06:10:42 GMT (envelope-from np@FreeBSD.org) Message-Id: <201903280610.x2S6Ag27021886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 28 Mar 2019 06:10: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: r345629 - stable/11/sys/dev/cxgbe/common X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/11/sys/dev/cxgbe/common X-SVN-Commit-Revision: 345629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 903CC86BB6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 06:10:43 -0000 Author: np Date: Thu Mar 28 06:10:41 2019 New Revision: 345629 URL: https://svnweb.freebsd.org/changeset/base/345629 Log: MFC r329788 (by jhb@): Bring in additional constants and message fields for TLS-related messages. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/common/t4_msg.h stable/11/sys/dev/cxgbe/common/t4_tcb.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_msg.h Thu Mar 28 03:48:51 2019 (r345628) +++ stable/11/sys/dev/cxgbe/common/t4_msg.h Thu Mar 28 06:10:41 2019 (r345629) @@ -3102,7 +3102,8 @@ struct cpl_rx_mps_pkt { struct cpl_tx_tls_sfo { __be32 op_to_seg_len; __be32 pld_len; - __be64 rsvd; + __be32 type_protover; + __be32 r1_lo; __be32 seqno_numivs; __be32 ivgen_hdrlen; __be64 scmd1; @@ -3126,15 +3127,28 @@ struct cpl_tx_tls_sfo { #define V_CPL_TX_TLS_SFO_CPL_LEN(x) ((x) << S_CPL_TX_TLS_SFO_CPL_LEN) #define G_CPL_TX_TLS_SFO_CPL_LEN(x) \ (((x) >> S_CPL_TX_TLS_SFO_CPL_LEN) & M_CPL_TX_TLS_SFO_CPL_LEN) + #define S_CPL_TX_TLS_SFO_SEG_LEN 0 #define M_CPL_TX_TLS_SFO_SEG_LEN 0xffff #define V_CPL_TX_TLS_SFO_SEG_LEN(x) ((x) << S_CPL_TX_TLS_SFO_SEG_LEN) #define G_CPL_TX_TLS_SFO_SEG_LEN(x) \ (((x) >> S_CPL_TX_TLS_SFO_SEG_LEN) & M_CPL_TX_TLS_SFO_SEG_LEN) +#define S_CPL_TX_TLS_SFO_TYPE 24 +#define M_CPL_TX_TLS_SFO_TYPE 0xff +#define V_CPL_TX_TLS_SFO_TYPE(x) ((x) << S_CPL_TX_TLS_SFO_TYPE) +#define G_CPL_TX_TLS_SFO_TYPE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_TYPE) & M_CPL_TX_TLS_SFO_TYPE) + +#define S_CPL_TX_TLS_SFO_PROTOVER 8 +#define M_CPL_TX_TLS_SFO_PROTOVER 0xffff +#define V_CPL_TX_TLS_SFO_PROTOVER(x) ((x) << S_CPL_TX_TLS_SFO_PROTOVER) +#define G_CPL_TX_TLS_SFO_PROTOVER(x) \ + (((x) >> S_CPL_TX_TLS_SFO_PROTOVER) & M_CPL_TX_TLS_SFO_PROTOVER) + struct cpl_tls_data { RSS_HDR - __be32 op_tid; + union opcode_tid ot; __be32 length_pkd; __be32 seq; __be32 r1; @@ -3160,7 +3174,7 @@ struct cpl_tls_data { struct cpl_rx_tls_cmp { RSS_HDR - __be32 op_tid; + union opcode_tid ot; __be32 pdulength_length; __be32 seq; __be32 ddp_report; Modified: stable/11/sys/dev/cxgbe/common/t4_tcb.h ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_tcb.h Thu Mar 28 03:48:51 2019 (r345628) +++ stable/11/sys/dev/cxgbe/common/t4_tcb.h Thu Mar 28 06:10:41 2019 (r345629) @@ -495,6 +495,54 @@ #define M_TCB_RX_DDP_BUF1_TAG 0xffffffffULL #define V_TCB_RX_DDP_BUF1_TAG(x) ((x) << S_TCB_RX_DDP_BUF1_TAG) +/* 855:832 */ +#define W_TCB_RX_TLS_BUF_OFFSET 26 +#define S_TCB_RX_TLS_BUF_OFFSET 0 +#define M_TCB_RX_TLS_BUF_OFFSET 0xffffffULL +#define V_TCB_RX_TLS_BUF_OFFSET(x) ((x) << S_TCB_RX_TLS_BUF_OFFSET) + +/* 876:856 */ +#define W_TCB_RX_TLS_BUF_LEN 26 +#define S_TCB_RX_TLS_BUF_LEN 24 +#define M_TCB_RX_TLS_BUF_LEN 0xffffffULL +#define V_TCB_RX_TLS_BUF_LEN(x) ((__u64)(x) << S_TCB_RX_TLS_BUF_LEN) + +/* 895:880 */ +#define W_TCB_RX_TLS_FLAGS 26 +#define S_TCB_RX_TLS_FLAGS 48 +#define M_TCB_RX_TLS_FLAGS 0xffffULL +#define V_TCB_RX_TLS_FLAGS(x) ((__u64)(x) << S_TCB_RX_TLS_FLAGS) + +/* 959:896 */ +#define W_TCB_TLS_SEQ 28 +#define S_TCB_TLS_SEQ 0 +#define M_TCB_TLS_SEQ 0xffffffffffffffffULL +#define V_TCB_TLS_SEQ(x) ((__u64)(x) << S_TCB_TLS_SEQ) + +/* 991:960 */ +#define W_TCB_RX_TLS_BUF_TAG 30 +#define S_TCB_RX_TLS_BUF_TAG 0 +#define M_TCB_RX_TLS_BUF_TAG 0xffffffffULL +#define V_TCB_RX_TLS_BUF_TAG(x) ((x) << S_TCB_RX_TLS_BUF_TAG) + +/* 1023:992 */ +#define W_TCB_RX_TLS_KEY_TAG 31 +#define S_TCB_RX_TLS_KEY_TAG 0 +#define M_TCB_RX_TLS_KEY_TAG 0xffffffffULL +#define V_TCB_RX_TLS_KEY_TAG(x) ((x) << S_TCB_RX_TLS_KEY_TAG) + +#define S_TF_TLS_KEY_SIZE 7 +#define V_TF_TLS_KEY_SIZE(x) ((x) << S_TF_TLS_KEY_SIZE) + +#define S_TF_TLS_CONTROL 2 +#define V_TF_TLS_CONTROL(x) ((x) << S_TF_TLS_CONTROL) + +#define S_TF_TLS_ACTIVE 1 +#define V_TF_TLS_ACTIVE(x) ((x) << S_TF_TLS_ACTIVE) + +#define S_TF_TLS_ENABLE 0 +#define V_TF_TLS_ENABLE(x) ((x) << S_TF_TLS_ENABLE) + #define S_TF_MIGRATING 0 #define V_TF_MIGRATING(x) ((x) << S_TF_MIGRATING) From owner-svn-src-stable-11@freebsd.org Thu Mar 28 09:18:24 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FCD61553ABD; Thu, 28 Mar 2019 09:18: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3AF58D822; Thu, 28 Mar 2019 09:18: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 BF81D1D05B; Thu, 28 Mar 2019 09:18: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 x2S9IN7w019111; Thu, 28 Mar 2019 09:18:23 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S9IMRQ019104; Thu, 28 Mar 2019 09:18:22 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903280918.x2S9IMRQ019104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 28 Mar 2019 09:18: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: r345635 - in stable/11: share/man/man9 sys/dev/ath sys/dev/usb/wlan X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/dev/ath sys/dev/usb/wlan X-SVN-Commit-Revision: 345635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E3AF58D822 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 09:18:24 -0000 Author: avos Date: Thu Mar 28 09:18:22 2019 New Revision: 345635 URL: https://svnweb.freebsd.org/changeset/base/345635 Log: MFC r306049: net80211: remove IEEE80211_RADIOTAP_TSFT field from transmit definitions. This field may be used for received frames only. Modified: stable/11/share/man/man9/ieee80211_radiotap.9 stable/11/sys/dev/ath/if_ath_tx.c stable/11/sys/dev/ath/if_athioctl.h stable/11/sys/dev/usb/wlan/if_rum.c stable/11/sys/dev/usb/wlan/if_rumvar.h stable/11/sys/dev/usb/wlan/if_run.c stable/11/sys/dev/usb/wlan/if_runvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/ieee80211_radiotap.9 ============================================================================== --- stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:18:22 2019 (r345635) @@ -263,7 +263,6 @@ struct wi_rx_radiotap_header { and transmit definitions for the Atheros driver: .Bd -literal -offset indent #define ATH_TX_RADIOTAP_PRESENT ( \\ - (1 << IEEE80211_RADIOTAP_TSFT) | \\ (1 << IEEE80211_RADIOTAP_FLAGS) | \\ (1 << IEEE80211_RADIOTAP_RATE) | \\ (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \\ @@ -273,7 +272,6 @@ and transmit definitions for the Atheros driver: struct ath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - uint64_t wt_tsf; uint8_t wt_flags; uint8_t wt_rate; uint8_t wt_txpower; Modified: stable/11/sys/dev/ath/if_ath_tx.c ============================================================================== --- stable/11/sys/dev/ath/if_ath_tx.c Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/ath/if_ath_tx.c Thu Mar 28 09:18:22 2019 (r345635) @@ -1527,7 +1527,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8 struct ath_buf *bf, struct mbuf *m0, struct ath_txq *txq) { struct ieee80211vap *vap = ni->ni_vap; - struct ath_hal *ah = sc->sc_ah; struct ieee80211com *ic = &sc->sc_ic; const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; int error, iswep, ismcast, isfrag, ismrr; @@ -1783,9 +1782,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8 sc->sc_hwmap[rix].ieeerate, -1); if (ieee80211_radiotap_active_vap(vap)) { - u_int64_t tsf = ath_hal_gettsf64(ah); - - sc->sc_tx_th.wt_tsf = htole64(tsf); sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags; if (iswep) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; @@ -2066,7 +2062,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021 const struct ieee80211_bpf_params *params) { struct ieee80211com *ic = &sc->sc_ic; - struct ath_hal *ah = sc->sc_ah; struct ieee80211vap *vap = ni->ni_vap; int error, ismcast, ismrr; int keyix, hdrlen, pktlen, try0, txantenna; @@ -2201,9 +2196,6 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee8021 sc->sc_hwmap[rix].ieeerate, -1); if (ieee80211_radiotap_active_vap(vap)) { - u_int64_t tsf = ath_hal_gettsf64(ah); - - sc->sc_tx_th.wt_tsf = htole64(tsf); sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags; if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; Modified: stable/11/sys/dev/ath/if_athioctl.h ============================================================================== --- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019 (r345635) @@ -374,7 +374,6 @@ struct ath_rx_radiotap_header { } __packed; #define ATH_TX_RADIOTAP_PRESENT ( \ - (1 << IEEE80211_RADIOTAP_TSFT) | \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \ @@ -384,7 +383,6 @@ struct ath_rx_radiotap_header { struct ath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - u_int64_t wt_tsf; u_int8_t wt_flags; u_int8_t wt_rate; u_int8_t wt_txpower; Modified: stable/11/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/usb/wlan/if_rum.c Thu Mar 28 09:18:22 2019 (r345635) @@ -1075,7 +1075,6 @@ tr_setup: tap->wt_flags = 0; tap->wt_rate = data->rate; - rum_get_tsf(sc, &tap->wt_tsf); tap->wt_antenna = sc->tx_ant; ieee80211_radiotap_tx(vap, m); Modified: stable/11/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:18:22 2019 (r345635) @@ -44,7 +44,6 @@ struct rum_rx_radiotap_header { struct rum_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - uint64_t wt_tsf; uint8_t wt_flags; uint8_t wt_rate; uint16_t wt_chan_freq; @@ -53,8 +52,7 @@ struct rum_tx_radiotap_header { } __packed __aligned(8); #define RT2573_TX_RADIOTAP_PRESENT \ - ((1 << IEEE80211_RADIOTAP_TSFT) | \ - (1 << IEEE80211_RADIOTAP_FLAGS) | \ + ((1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) | \ (1 << IEEE80211_RADIOTAP_ANTENNA)) Modified: stable/11/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:18:22 2019 (r345635) @@ -3096,7 +3096,6 @@ tr_setup: (struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd)); tap->wt_flags = 0; tap->wt_rate = rt2860_rates[data->ridx].rate; - run_get_tsf(sc, &tap->wt_tsf); tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_hwqueue = index; Modified: stable/11/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:16:00 2019 (r345634) +++ stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:18:22 2019 (r345635) @@ -66,7 +66,6 @@ struct run_rx_radiotap_header { struct run_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; - uint64_t wt_tsf; uint8_t wt_flags; uint8_t wt_rate; uint16_t wt_chan_freq; @@ -77,8 +76,7 @@ struct run_tx_radiotap_header { #define IEEE80211_RADIOTAP_HWQUEUE 15 #define RUN_TX_RADIOTAP_PRESENT \ - (1 << IEEE80211_RADIOTAP_TSFT | \ - 1 << IEEE80211_RADIOTAP_FLAGS | \ + (1 << IEEE80211_RADIOTAP_FLAGS | \ 1 << IEEE80211_RADIOTAP_RATE | \ 1 << IEEE80211_RADIOTAP_CHANNEL | \ 1 << IEEE80211_RADIOTAP_HWQUEUE) From owner-svn-src-stable-11@freebsd.org Thu Mar 28 09:50:34 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 068AB1555312; Thu, 28 Mar 2019 09:50:34 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD47E8F055; Thu, 28 Mar 2019 09:50:33 +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 89FBD1D5F5; Thu, 28 Mar 2019 09:50:33 +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 x2S9oXkE034717; Thu, 28 Mar 2019 09:50:33 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2S9oQ5m034681; Thu, 28 Mar 2019 09:50:26 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903280950.x2S9oQ5m034681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 28 Mar 2019 09:50: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: r345636 - in stable/11: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn... X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn sys/dev/urtwn sys/dev/us... X-SVN-Commit-Revision: 345636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AD47E8F055 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 09:50:34 -0000 Author: avos Date: Thu Mar 28 09:50:25 2019 New Revision: 345636 URL: https://svnweb.freebsd.org/changeset/base/345636 Log: MFC r344990: Fix ieee80211_radiotap(9) usage in wireless drivers: - Alignment issues: * Add missing __packed attributes + padding across all drivers; in most places there was an assumption that padding will be always minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) - padding was just missing. * Add __aligned(8) attribute for all Rx radiotap headers since they can contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so just drop the attribute here. Refresh ieee80211_radiotap(9) man page accordingly. - Since net80211 automatically updates channel frequency / flags in ieee80211_radiotap_chan_change() drop duplicate setup for these fields in drivers. Modified: stable/11/share/man/man9/ieee80211_radiotap.9 stable/11/sys/dev/ath/if_athioctl.h stable/11/sys/dev/bwi/if_bwi.c stable/11/sys/dev/bwi/if_bwivar.h stable/11/sys/dev/bwn/if_bwn.c stable/11/sys/dev/bwn/if_bwnvar.h stable/11/sys/dev/ipw/if_ipwvar.h stable/11/sys/dev/iwi/if_iwivar.h stable/11/sys/dev/iwm/if_iwmvar.h stable/11/sys/dev/iwn/if_iwn.c stable/11/sys/dev/iwn/if_iwnvar.h stable/11/sys/dev/malo/if_maloioctl.h stable/11/sys/dev/mwl/if_mwlioctl.h stable/11/sys/dev/otus/if_otus.c stable/11/sys/dev/otus/if_otusreg.h stable/11/sys/dev/ral/rt2560var.h stable/11/sys/dev/ral/rt2661var.h stable/11/sys/dev/ral/rt2860var.h stable/11/sys/dev/rtwn/if_rtwn.c stable/11/sys/dev/rtwn/if_rtwnreg.h stable/11/sys/dev/urtwn/if_urtwn.c stable/11/sys/dev/urtwn/if_urtwnvar.h stable/11/sys/dev/usb/wlan/if_rsu.c stable/11/sys/dev/usb/wlan/if_rsureg.h stable/11/sys/dev/usb/wlan/if_rumvar.h stable/11/sys/dev/usb/wlan/if_run.c stable/11/sys/dev/usb/wlan/if_runvar.h stable/11/sys/dev/usb/wlan/if_uathvar.h stable/11/sys/dev/usb/wlan/if_upgtvar.h stable/11/sys/dev/usb/wlan/if_uralvar.h stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_urtwvar.h stable/11/sys/dev/usb/wlan/if_zydreg.h stable/11/sys/dev/wi/if_wireg.h stable/11/sys/dev/wpi/if_wpivar.h stable/11/sys/dev/wtap/if_wtapioctl.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/ieee80211_radiotap.9 ============================================================================== --- stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/share/man/man9/ieee80211_radiotap.9 Thu Mar 28 09:50:25 2019 (r345636) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2009 +.Dd March 28, 2019 .Dt IEEE80211_RADIOTAP 9 .Os .Sh NAME @@ -257,7 +257,7 @@ struct wi_rx_radiotap_header { uint16_t wr_chan_flags; uint8_t wr_antsignal; uint8_t wr_antnoise; -} __packed; +} __packed __aligned(8); .Ed .Pp and transmit definitions for the Atheros driver: Modified: stable/11/sys/dev/ath/if_athioctl.h ============================================================================== --- stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ath/if_athioctl.h Thu Mar 28 09:50:25 2019 (r345636) @@ -371,7 +371,7 @@ struct ath_rx_radiotap_header { */ struct ath_radiotap_vendor_hdr wr_v; #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ -} __packed; +} __packed __aligned(8); #define ATH_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/11/sys/dev/bwi/if_bwi.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/bwi/if_bwi.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1727,15 +1727,6 @@ bwi_set_channel(struct ieee80211com *ic) bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0); sc->sc_rates = ieee80211_get_ratetable(c); - - /* - * Setup radio tap channel freq and flags - */ - sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = - htole16(c->ic_freq); - sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = - htole16(c->ic_flags & 0xffff); - BWI_UNLOCK(sc); } Modified: stable/11/sys/dev/bwi/if_bwivar.h ============================================================================== --- stable/11/sys/dev/bwi/if_bwivar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/bwi/if_bwivar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -511,7 +511,7 @@ struct bwi_tx_radiotap_hdr { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define BWI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -531,7 +531,7 @@ struct bwi_rx_radiotap_hdr { int8_t wr_antsignal; int8_t wr_antnoise; /* TODO: sq */ -}; +} __packed __aligned(8); struct bwi_vap { struct ieee80211vap bv_vap; Modified: stable/11/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/11/sys/dev/bwn/if_bwn.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/bwn/if_bwn.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1831,14 +1831,6 @@ bwn_set_channel(struct ieee80211com *ic) bwn_mac_enable(mac); fail: - /* - * Setup radio tap channel freq and flags - */ - sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq = - htole16(ic->ic_curchan->ic_freq); - sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags = - htole16(ic->ic_curchan->ic_flags & 0xffff); - BWN_UNLOCK(sc); } Modified: stable/11/sys/dev/bwn/if_bwnvar.h ============================================================================== --- stable/11/sys/dev/bwn/if_bwnvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/bwn/if_bwnvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -565,7 +565,7 @@ struct bwn_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define BWN_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -583,7 +583,7 @@ struct bwn_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; struct bwn_stats { int32_t rtsfail; Modified: stable/11/sys/dev/ipw/if_ipwvar.h ============================================================================== --- stable/11/sys/dev/ipw/if_ipwvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ipw/if_ipwvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -55,11 +55,12 @@ struct ipw_soft_buf { struct ipw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; uint8_t wr_flags; + uint8_t wr_pad; uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_antsignal; int8_t wr_antnoise; -}; +} __packed __aligned(8); #define IPW_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -70,9 +71,10 @@ struct ipw_rx_radiotap_header { struct ipw_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define IPW_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/iwi/if_iwivar.h ============================================================================== --- stable/11/sys/dev/iwi/if_iwivar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/iwi/if_iwivar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -36,7 +36,7 @@ struct iwi_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define IWI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -49,9 +49,10 @@ struct iwi_rx_radiotap_header { struct iwi_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -}; +} __packed; #define IWI_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/iwm/if_iwmvar.h ============================================================================== --- stable/11/sys/dev/iwm/if_iwmvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/iwm/if_iwmvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -113,7 +113,7 @@ struct iwm_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; -} __packed; +} __packed __aligned(8); #define IWM_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: stable/11/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/11/sys/dev/iwn/if_iwn.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/iwn/if_iwn.c Thu Mar 28 09:50:25 2019 (r345636) @@ -8892,18 +8892,12 @@ iwn_scan_end(struct ieee80211com *ic) static void iwn_set_channel(struct ieee80211com *ic) { - const struct ieee80211_channel *c = ic->ic_curchan; struct iwn_softc *sc = ic->ic_softc; int error; DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__); IWN_LOCK(sc); - sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); - sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); - sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); - sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); - /* * Only need to set the channel in Monitor mode. AP scanning and auth * are already taken care of by their respective firmware commands. Modified: stable/11/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/11/sys/dev/iwn/if_iwnvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/iwn/if_iwnvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -62,7 +62,7 @@ struct iwn_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; -} __packed; +} __packed __aligned(8); #define IWN_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: stable/11/sys/dev/malo/if_maloioctl.h ============================================================================== --- stable/11/sys/dev/malo/if_maloioctl.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/malo/if_maloioctl.h Thu Mar 28 09:50:25 2019 (r345636) @@ -91,7 +91,7 @@ struct malo_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define MALO_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -109,6 +109,6 @@ struct malo_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; #endif /* _DEV_MALO_MVIOCTL_H */ Modified: stable/11/sys/dev/mwl/if_mwlioctl.h ============================================================================== --- stable/11/sys/dev/mwl/if_mwlioctl.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/mwl/if_mwlioctl.h Thu Mar 28 09:50:25 2019 (r345636) @@ -113,7 +113,7 @@ struct mwl_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -}; +} __packed __aligned(8); #define MWL_TX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -131,6 +131,6 @@ struct mwl_tx_radiotap_header { u_int16_t wt_chan_flags; u_int8_t wt_txpower; u_int8_t wt_antenna; -}; +} __packed; #endif /* _DEV_MWL_MVIOCTL_H */ Modified: stable/11/sys/dev/otus/if_otus.c ============================================================================== --- stable/11/sys/dev/otus/if_otus.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/otus/if_otus.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1670,8 +1670,6 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, in struct mbuf mb; tap->wr_flags = 0; - tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags); tap->wr_antsignal = tail->rssi; tap->wr_rate = 2; /* In case it can't be found below. */ switch (tail->status & AR_RX_STATUS_MT_MASK) { Modified: stable/11/sys/dev/otus/if_otusreg.h ============================================================================== --- stable/11/sys/dev/otus/if_otusreg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/otus/if_otusreg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -900,7 +900,7 @@ struct otus_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; uint8_t wr_antsignal; -} __packed; +} __packed __aligned(8); #define OTUS_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: stable/11/sys/dev/ral/rt2560var.h ============================================================================== --- stable/11/sys/dev/ral/rt2560var.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ral/rt2560var.h Thu Mar 28 09:50:25 2019 (r345636) @@ -27,7 +27,7 @@ struct rt2560_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define RT2560_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -45,7 +45,7 @@ struct rt2560_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -}; +} __packed; #define RT2560_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/ral/rt2661var.h ============================================================================== --- stable/11/sys/dev/ral/rt2661var.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ral/rt2661var.h Thu Mar 28 09:50:25 2019 (r345636) @@ -42,7 +42,7 @@ struct rt2661_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RT2661_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/ral/rt2860var.h ============================================================================== --- stable/11/sys/dev/ral/rt2860var.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/ral/rt2860var.h Thu Mar 28 09:50:25 2019 (r345636) @@ -55,7 +55,7 @@ struct rt2860_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RT2860_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/rtwn/if_rtwn.c ============================================================================== --- stable/11/sys/dev/rtwn/if_rtwn.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/rtwn/if_rtwn.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1540,8 +1540,6 @@ rtwn_rx_frame(struct rtwn_softc *sc, struct r92c_rx_de tap->wr_rate = 0x80 | (rate - 12); } tap->wr_dbm_antsignal = rssi; - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); } RTWN_UNLOCK(sc); @@ -1734,8 +1732,6 @@ rtwn_tx(struct rtwn_softc *sc, struct mbuf *m, struct struct rtwn_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); ieee80211_radiotap_tx(vap, m); } Modified: stable/11/sys/dev/rtwn/if_rtwnreg.h ============================================================================== --- stable/11/sys/dev/rtwn/if_rtwnreg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/rtwn/if_rtwnreg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -1217,7 +1217,7 @@ struct rtwn_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; uint8_t wr_dbm_antsignal; -} __packed; +} __packed __aligned(8); #define RTWN_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ @@ -1228,6 +1228,7 @@ struct rtwn_rx_radiotap_header { struct rtwn_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; } __packed; Modified: stable/11/sys/dev/urtwn/if_urtwn.c ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwn.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/urtwn/if_urtwn.c Thu Mar 28 09:50:25 2019 (r345636) @@ -4841,10 +4841,6 @@ urtwn_set_channel(struct ieee80211com *ic) urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink); } urtwn_set_chan(sc, c, NULL); - sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq); - sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags); - sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq); - sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags); URTWN_UNLOCK(sc); } Modified: stable/11/sys/dev/urtwn/if_urtwnvar.h ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwnvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/urtwn/if_urtwnvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -55,9 +55,10 @@ struct urtwn_rx_radiotap_header { struct urtwn_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define URTWN_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: stable/11/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsu.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_rsu.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1830,8 +1830,6 @@ rsu_rx_frame(struct rsu_softc *sc, uint8_t *buf, int p #endif /* XXX not nice */ tap->wr_dbm_antsignal = rsu_hwrssi_to_rssi(sc, sc->sc_currssi); - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); } return (m); @@ -2117,7 +2115,6 @@ static int rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, struct rsu_data *data) { - struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; @@ -2229,8 +2226,6 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no struct rsu_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); ieee80211_radiotap_tx(vap, m0); } Modified: stable/11/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsureg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_rsureg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -689,9 +689,10 @@ struct rsu_rx_radiotap_header { struct rsu_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define RSU_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: stable/11/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_rumvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -49,7 +49,7 @@ struct rum_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -} __packed __aligned(8); +} __packed; #define RT2573_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_run.c Thu Mar 28 09:50:25 2019 (r345636) @@ -2830,8 +2830,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin uint16_t phy; tap->wr_flags = 0; - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wr_antsignal = rssi; tap->wr_antenna = ant; tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant); @@ -3096,8 +3094,6 @@ tr_setup: (struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd)); tap->wt_flags = 0; tap->wt_rate = rt2860_rates[data->ridx].rate; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_hwqueue = index; if (le16toh(txwi->phy) & RT2860_PHY_SHPRE) tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; Modified: stable/11/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_runvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -71,7 +71,7 @@ struct run_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_hwqueue; -} __packed __aligned(8); +} __packed; #define IEEE80211_RADIOTAP_HWQUEUE 15 Modified: stable/11/sys/dev/usb/wlan/if_uathvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_uathvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_uathvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -67,9 +67,10 @@ struct uath_rx_radiotap_header { struct uath_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define UATH_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_upgtvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_upgtvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_upgtvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -394,7 +394,7 @@ struct upgt_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define UPGT_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_uralvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_uralvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_uralvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -51,7 +51,7 @@ struct ural_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -} __packed __aligned(8); +} __packed; #define RAL_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_urtw.c Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_urtw.c Thu Mar 28 09:50:25 2019 (r345636) @@ -1686,11 +1686,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ if (ieee80211_radiotap_active_vap(vap)) { struct urtw_tx_radiotap_header *tap = &sc->sc_txtap; - /* XXX Are variables correct? */ tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); - ieee80211_radiotap_tx(vap, m0); } @@ -3995,9 +3991,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da if (ieee80211_radiotap_active(ic)) { struct urtw_rx_radiotap_header *tap = &sc->sc_rxtap; - /* XXX Are variables correct? */ - tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); + tap->wr_flags = 0; tap->wr_dbm_antsignal = (int8_t)rssi; } Modified: stable/11/sys/dev/usb/wlan/if_urtwvar.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_urtwvar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_urtwvar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -56,6 +56,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead; struct urtw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; uint8_t wr_flags; + uint8_t wr_pad; uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; @@ -69,9 +70,10 @@ struct urtw_rx_radiotap_header { struct urtw_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; uint8_t wt_flags; + uint8_t wt_pad; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define URTW_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/usb/wlan/if_zydreg.h ============================================================================== --- stable/11/sys/dev/usb/wlan/if_zydreg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/usb/wlan/if_zydreg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -1200,7 +1200,7 @@ struct zyd_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed __aligned(8); +} __packed; #define ZYD_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: stable/11/sys/dev/wi/if_wireg.h ============================================================================== --- stable/11/sys/dev/wi/if_wireg.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/wi/if_wireg.h Thu Mar 28 09:50:25 2019 (r345636) @@ -707,7 +707,7 @@ struct wi_rx_radiotap_header { u_int16_t wr_chan_flags; u_int8_t wr_antsignal; u_int8_t wr_antnoise; -}; +} __packed __aligned(8); #define WI_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -720,5 +720,5 @@ struct wi_tx_radiotap_header { u_int8_t wt_rate; u_int16_t wt_chan_freq; u_int16_t wt_chan_flags; -}; +} __packed; #endif /* IEEE80211_RADIOTAP_F_CFP */ Modified: stable/11/sys/dev/wpi/if_wpivar.h ============================================================================== --- stable/11/sys/dev/wpi/if_wpivar.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/wpi/if_wpivar.h Thu Mar 28 09:50:25 2019 (r345636) @@ -26,7 +26,7 @@ struct wpi_rx_radiotap_header { int8_t wr_dbm_antsignal; int8_t wr_dbm_antnoise; uint8_t wr_antenna; -} __packed; +} __packed __aligned(8); #define WPI_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ Modified: stable/11/sys/dev/wtap/if_wtapioctl.h ============================================================================== --- stable/11/sys/dev/wtap/if_wtapioctl.h Thu Mar 28 09:18:22 2019 (r345635) +++ stable/11/sys/dev/wtap/if_wtapioctl.h Thu Mar 28 09:50:25 2019 (r345636) @@ -157,7 +157,7 @@ struct wtap_rx_radiotap_header { u_int8_t wr_chan_ieee; int8_t wr_chan_maxpow; #endif -} __packed; +} __packed __aligned(8); #define WTAP_TX_RADIOTAP_PRESENT ( \ 0) @@ -165,7 +165,6 @@ struct wtap_rx_radiotap_header { struct wtap_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; #if 0 - u_int64_t wt_tsf; u_int8_t wt_flags; u_int8_t wt_rate; u_int8_t wt_txpower; From owner-svn-src-stable-11@freebsd.org Thu Mar 28 13:44:19 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70B12155D975; Thu, 28 Mar 2019 13:44:19 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F3A271EE5; Thu, 28 Mar 2019 13:44:19 +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 E26661FF3C; Thu, 28 Mar 2019 13:44:18 +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 x2SDiIqm060377; Thu, 28 Mar 2019 13:44:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2SDiIIL060376; Thu, 28 Mar 2019 13:44:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903281344.x2SDiIIL060376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Mar 2019 13:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r345642 - stable/11/sys/fs/nullfs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/fs/nullfs X-SVN-Commit-Revision: 345642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F3A271EE5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 13:44:19 -0000 Author: kib Date: Thu Mar 28 13:44:18 2019 New Revision: 345642 URL: https://svnweb.freebsd.org/changeset/base/345642 Log: MFC r345376: nullfs: fix unmounts when filesystem is active. Modified: stable/11/sys/fs/nullfs/null_vfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/11/sys/fs/nullfs/null_vfsops.c Thu Mar 28 13:42:37 2019 (r345641) +++ stable/11/sys/fs/nullfs/null_vfsops.c Thu Mar 28 13:44:18 2019 (r345642) @@ -236,7 +236,7 @@ nullfs_unmount(mp, mntflags) { struct null_mount *mntdata; struct mount *ump; - int error, flags; + int error, flags, rootrefs; NULLFSDEBUG("nullfs_unmount: mp = %p\n", (void *)mp); @@ -245,10 +245,20 @@ nullfs_unmount(mp, mntflags) else flags = 0; - /* There is 1 extra root vnode reference (nullm_rootvp). */ - error = vflush(mp, 1, flags, curthread); - if (error) - return (error); + for (rootrefs = 1;; rootrefs = 0) { + /* There is 1 extra root vnode reference (nullm_rootvp). */ + error = vflush(mp, rootrefs, flags, curthread); + if (error) + return (error); + MNT_ILOCK(mp); + if (mp->mnt_nvnodelistsize == 0) { + MNT_IUNLOCK(mp); + break; + } + MNT_IUNLOCK(mp); + if ((mntflags & MNT_FORCE) == 0) + return (EBUSY); + } /* * Finally, throw away the null_mount structure From owner-svn-src-stable-11@freebsd.org Thu Mar 28 23:43:41 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2148A154EF38; Thu, 28 Mar 2019 23:43:41 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C23A16ADFA; Thu, 28 Mar 2019 23:43:40 +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 84715267FF; Thu, 28 Mar 2019 23:43:40 +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 x2SNhefw079323; Thu, 28 Mar 2019 23:43:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2SNhcKH079312; Thu, 28 Mar 2019 23:43:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903282343.x2SNhcKH079312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Mar 2019 23:43: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: r345664 - in stable/11/sys: dev/cxgbe dev/cxgbe/crypto dev/cxgbe/cxgbei dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/11/sys: dev/cxgbe dev/cxgbe/crypto dev/cxgbe/cxgbei dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom X-SVN-Commit-Revision: 345664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C23A16ADFA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 23:43:41 -0000 Author: jhb Date: Thu Mar 28 23:43:38 2019 New Revision: 345664 URL: https://svnweb.freebsd.org/changeset/base/345664 Log: MFC 330040,330041,330079,330884,330946,330947,331649,333068,333810,337722, 340466,340468,340469,340473: Add TOE-based TLS offload. Note that this requires a modified OpenSSL library. 330040: Fetch TLS key parameters from the firmware. The parameters describe how much of the adapter's memory is reserved for storing TLS keys. The 'meminfo' sysctl now lists this region of adapter memory as 'TLS keys' if present. 330041: Move ccr_aes_getdeckey() from ccr(4) to the cxgbe(4) driver. This routine will also be used by the TOE module to manage TLS keys. 330079: Move #include for rijndael.h out of x86-specific region. The #include was added inside of the conditional by accident and the lack of it broke non-x86 builds. 330884: Support for TLS offload of TOE connections on T6 adapters. The TOE engine in Chelsio T6 adapters supports offloading of TLS encryption and TCP segmentation for offloaded connections. Sockets using TLS are required to use a set of custom socket options to upload RX and TX keys to the NIC and to enable RX processing. Currently these socket options are implemented as TCP options in the vendor specific range. A patched OpenSSL library will be made available in a port / package for use with the TLS TOE support. TOE sockets can either offload both transmit and reception of TLS records or just transmit. TLS offload (both RX and TX) is enabled by setting the dev.t6nex..tls sysctl to 1 and requires TOE to be enabled on the relevant interface. Transmit offload can be used on any "normal" or TLS TOE socket by using the custom socket option to program a transmit key. This permits most TOE sockets to transparently offload TLS when applications use a patched SSL library (e.g. using LD_LIBRARY_PATH to request use of a patched OpenSSL library). Receive offload can only be used with TOE sockets using the TLS mode. The dev.t6nex.0.toe.tls_rx_ports sysctl can be set to a list of TCP port numbers. Any connection with either a local or remote port number in that list will be created as a TLS socket rather than a plain TOE socket. Note that although this sysctl accepts an arbitrary list of port numbers, the sysctl(8) tool is only able to set sysctl nodes to a single value. A TLS socket will hang without receiving data if used by an application that is not using a patched SSL library. Thus, the tls_rx_ports node should be used with care. For a server mostly concerned with offloading TLS transmit, this node is not needed as plain TOE sockets will fall back to software crypto when using an unpatched SSL library. New per-interface statistics nodes are added giving counts of TLS packets and payload bytes (payload bytes do not include TLS headers or authentication tags/MACs) offloaded via the TOE engine, e.g.: dev.cc.0.stats.rx_tls_octets: 149 dev.cc.0.stats.rx_tls_records: 13 dev.cc.0.stats.tx_tls_octets: 26501823 dev.cc.0.stats.tx_tls_records: 1620 TLS transmit work requests are constructed by a new variant of t4_push_frames() called t4_push_tls_records() in tom/t4_tls.c. TLS transmit work requests require a buffer containing IVs. If the IVs are too large to fit into the work request, a separate buffer is allocated when constructing a work request. This buffer is associated with the transmit descriptor and freed when the descriptor is ACKed by the adapter. Received TLS frames use two new CPL messages. The first message is a CPL_TLS_DATA containing the decryped payload of a single TLS record. The handler places the mbuf containing the received payload on an mbufq in the TOE pcb. The second message is a CPL_RX_TLS_CMP message which includes a copy of the TLS header and indicates if there were any errors. The handler for this message places the TLS header into the socket buffer followed by the saved mbuf with the payload data. Both of these handlers are contained in tom/t4_tls.c. A few routines were exposed from t4_cpl_io.c for use by t4_tls.c including send_rx_credits(), a new send_rx_modulate(), and t4_close_conn(). TLS keys for both transmit and receive are stored in onboard memory in the NIC in the "TLS keys" memory region. In some cases a TLS socket can hang with pending data available in the NIC that is not delivered to the host. As a workaround, TLS sockets are more aggressive about sending CPL_RX_DATA_ACK messages anytime that any data is read from a TLS socket. In addition, a fallback timer will periodically send CPL_RX_DATA_ACK messages to the NIC for connections that are still in the handshake phase. Once the connection has finished the handshake and programmed RX keys via the socket option, the timer is stopped. A new function select_ulp_mode() is used to determine what sub-mode a given TOE socket should use (plain TOE, DDP, or TLS). The existing set_tcpddp_ulp_mode() function has been renamed to set_ulp_mode() and handles initialization of TLS-specific state when necessary in addition to DDP-specific state. Since TLS sockets do not receive individual TCP segments but always receive full TLS records, they can receive more data than is available in the current window (e.g. if a 16k TLS record is received but the socket buffer is itself 16k). To cope with this, just drop the window to 0 when this happens, but track the overage and "eat" the overage as it is read from the socket buffer not opening the window (or adding rx_credits) for the overage bytes. 330946: Remove TLS-related inlines from t4_tom.h to fix iw_cxgbe(4) build. - Remove the one use of is_tls_offload() and the function. AIO special handling only needs to be disabled when a TOE socket is actively doing TLS offload on transmit. The TOE socket's mode (which affects receive operation) doesn't matter, so remove the check for the socket's mode and only check if a TOE socket has TLS transmit keys configured to determine if an AIO write request should fall back to the normal socket handling instead of the TOE fast path. - Move can_tls_offload() into t4_tls.c. It is not used in critical paths, so inlining isn't that important. Change return type to bool while here. 330947: Fix the check for an empty send socket buffer on a TOE TLS socket. Compare sbavail() with the cached sb_off of already-sent data instead of always comparing with zero. This will correctly close the connection and send the FIN if the socket buffer contains some previously-sent data but no unsent data. 331649: Use the offload transmit queue to set flags on TLS connections. Requests to modify the state of TLS connections need to be sent on the same queue as TLS record transmit requests to ensure ordering. However, in order to use the offload transmit queue in t4_set_tcb_field(), the function needs to be updated to do proper flow control / credit management when queueing a request to an offload queue. This required passing a pointer to the toepcb itself to this function, so while here remove the 'tid' and 'iqid' parameters and obtain those values from the toepcb in t4_set_tcb_field() itself. 333068: Use the correct key address when renegotiating the transmit key. Previously, get_keyid() was returning the address of the receive key instead of the transmit key when renegotiating the transmit key. This could either hang the card (if a connection was only offloading TLS TX and thus had a receive key address of -1) or cause the connection to fail by overwriting the wrong key (if both RX and TX TLS were offloaded). 333810: Be more robust against garbage input on a TOE TLS TX socket. If a socket is closed or shutdown and a partial record (or what appears to be a partial record) is waiting in the socket buffer, discard the partial record and close the connection rather than waiting forever for the rest of the record. 337722: Whitespace nit in t4_tom.h 340466: Move the TLS key map into the adapter softc so non-TOE code can use it. 340468: Change the quantum for TLS key addresses to 32 bytes. The addresses passed when reading and writing keys are always shifted right by 5 as the memory locations are addressed in 32-byte chunks, so the quantum needs to be 32, not 8. 340469: Remove bogus roundup2() of the key programming work request header. The key context is always placed immediately after the work request header. The total work request length has to be rounded up by 16 however. 340473: Restore the header to fix build of cxgbe(4) TOM. vmem's are not just used for TLS memory in TOM and the #include actually predates the TLS code so should not have been removed when the TLS vmem moved in r340466. Sponsored by: Chelsio Communications Added: stable/11/sys/dev/cxgbe/tom/t4_tls.c - copied, changed from r330884, head/sys/dev/cxgbe/tom/t4_tls.c stable/11/sys/dev/cxgbe/tom/t4_tls.h - copied unchanged from r330884, head/sys/dev/cxgbe/tom/t4_tls.h Modified: stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/crypto/t4_crypto.c stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt stable/11/sys/dev/cxgbe/offload.h stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/tom/t4_connect.c stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c stable/11/sys/dev/cxgbe/tom/t4_ddp.c stable/11/sys/dev/cxgbe/tom/t4_listen.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h stable/11/sys/modules/cxgbe/tom/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/11/sys/dev/cxgbe/adapter.h Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/adapter.h Thu Mar 28 23:43:38 2019 (r345664) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -297,6 +298,10 @@ struct port_info { struct port_stats stats; u_int tnl_cong_drops; u_int tx_parse_error; + u_long tx_tls_records; + u_long tx_tls_octets; + u_long rx_tls_records; + u_long rx_tls_octets; struct callout tick; }; @@ -805,6 +810,7 @@ struct adapter { void *ccr_softc; /* (struct ccr_softc *) */ struct l2t_data *l2t; /* L2 table */ struct tid_info tids; + vmem_t *key_map; uint8_t doorbells; int offload_map; /* ports with IFCAP_TOE enabled */ @@ -1091,6 +1097,7 @@ void t4_os_link_changed(struct port_info *); void t4_iterate(void (*)(struct adapter *, void *), void *); void t4_init_devnames(struct adapter *); void t4_add_adapter(struct adapter *); +void t4_aes_getdeckey(void *, const void *, unsigned int); int t4_detach_common(device_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int t4_map_bars_0_and_4(struct adapter *); Modified: stable/11/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- stable/11/sys/dev/cxgbe/crypto/t4_crypto.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/crypto/t4_crypto.c Thu Mar 28 23:43:38 2019 (r345664) @@ -1815,46 +1815,7 @@ ccr_aes_check_keylen(int alg, int klen) return (0); } -/* - * Borrowed from cesa_prep_aes_key(). We should perhaps have a public - * function to generate this instead. - * - * NB: The crypto engine wants the words in the decryption key in reverse - * order. - */ static void -ccr_aes_getdeckey(void *dec_key, const void *enc_key, unsigned int kbits) -{ - uint32_t ek[4 * (RIJNDAEL_MAXNR + 1)]; - uint32_t *dkey; - int i; - - rijndaelKeySetupEnc(ek, enc_key, kbits); - dkey = dec_key; - dkey += (kbits / 8) / 4; - - switch (kbits) { - case 128: - for (i = 0; i < 4; i++) - *--dkey = htobe32(ek[4 * 10 + i]); - break; - case 192: - for (i = 0; i < 2; i++) - *--dkey = htobe32(ek[4 * 11 + 2 + i]); - for (i = 0; i < 4; i++) - *--dkey = htobe32(ek[4 * 12 + i]); - break; - case 256: - for (i = 0; i < 4; i++) - *--dkey = htobe32(ek[4 * 13 + i]); - for (i = 0; i < 4; i++) - *--dkey = htobe32(ek[4 * 14 + i]); - break; - } - MPASS(dkey == dec_key); -} - -static void ccr_aes_setkey(struct ccr_session *s, int alg, const void *key, int klen) { unsigned int ck_size, iopad_size, kctx_flits, kctx_len, kbits, mk_size; @@ -1883,7 +1844,7 @@ ccr_aes_setkey(struct ccr_session *s, int alg, const v switch (alg) { case CRYPTO_AES_CBC: case CRYPTO_AES_XTS: - ccr_aes_getdeckey(s->blkcipher.deckey, key, kbits); + t4_aes_getdeckey(s->blkcipher.deckey, key, kbits); break; } Modified: stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c ============================================================================== --- stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Thu Mar 28 23:43:38 2019 (r345664) @@ -595,9 +595,9 @@ set_ulp_mode_iscsi(struct adapter *sc, struct toepcb * CTR4(KTR_CXGBE, "%s: tid %u, ULP_MODE_ISCSI, CRC hdr=%d data=%d", __func__, toep->tid, hcrc, dcrc); - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_ULP_TYPE, + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_ULP_TYPE, V_TCB_ULP_TYPE(M_TCB_ULP_TYPE) | V_TCB_ULP_RAW(M_TCB_ULP_RAW), val, - 0, 0, toep->ofld_rxq->iq.abs_id); + 0, 0); } /* Modified: stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt ============================================================================== --- stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/firmware/t6fw_cfg.txt Thu Mar 28 23:43:38 2019 (r345664) @@ -163,10 +163,12 @@ nserver = 512 nhpfilter = 0 nhash = 16384 - protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, crypto_lookaside + protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, tlskeys, crypto_lookaside tp_l2t = 4096 tp_ddp = 2 tp_ddp_iscsi = 2 + tp_tls_key = 3 + tp_tls_mxrxsize = 17408 # 16384 + 1024, governs max rx data, pm max xfer len, rx coalesce sizes tp_stag = 2 tp_pbl = 5 tp_rq = 7 @@ -273,7 +275,7 @@ [fini] version = 0x1 - checksum = 0x7191019f + checksum = 0x9e8952d2 # # $FreeBSD$ # Modified: stable/11/sys/dev/cxgbe/offload.h ============================================================================== --- stable/11/sys/dev/cxgbe/offload.h Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/offload.h Thu Mar 28 23:43:38 2019 (r345664) @@ -124,6 +124,7 @@ struct t4_virt_res { /* virtualiz struct t4_range srq; struct t4_range ocq; struct t4_range l2t; + struct t4_range key; }; enum { @@ -148,6 +149,9 @@ struct tom_tunables { int sndbuf; int ddp; int rx_coalesce; + int tls; + int *tls_rx_ports; + int num_tls_rx_ports; int tx_align; int tx_zcopy; }; Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/t4_main.c Thu Mar 28 23:43:38 2019 (r345664) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include #ifdef DDB #include #include @@ -667,6 +668,7 @@ static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); static int sysctl_tc_params(SYSCTL_HANDLER_ARGS); #endif #ifdef TCP_OFFLOAD +static int sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS); static int sysctl_tp_tick(SYSCTL_HANDLER_ARGS); static int sysctl_tp_dack_timer(SYSCTL_HANDLER_ARGS); static int sysctl_tp_timer(SYSCTL_HANDLER_ARGS); @@ -1215,6 +1217,9 @@ t4_attach(device_t dev) t4_init_l2t(sc, M_WAITOK); t4_init_tx_sched(sc); + if (sc->vres.key.size != 0) + sc->key_map = vmem_create("T4TLS key map", sc->vres.key.start, + sc->vres.key.size, 32, 0, M_FIRSTFIT | M_WAITOK); /* * Second pass over the ports. This time we know the number of rx and @@ -1499,6 +1504,8 @@ t4_detach_common(device_t dev) if (sc->l2t) t4_free_l2t(sc->l2t); + if (sc->key_map) + vmem_destroy(sc->key_map); #ifdef TCP_OFFLOAD free(sc->sge.ofld_rxq, M_CXGBE); @@ -1515,6 +1522,7 @@ t4_detach_common(device_t dev) free(sc->sge.iqmap, M_CXGBE); free(sc->sge.eqmap, M_CXGBE); free(sc->tids.ftid_tab, M_CXGBE); + free(sc->tt.tls_rx_ports, M_CXGBE); t4_destroy_dma_tag(sc); if (mtx_initialized(&sc->sc_lock)) { sx_xlock(&t4_list_lock); @@ -3981,6 +3989,18 @@ get_params__post_init(struct adapter *sc) sc->vres.iscsi.start = val[0]; sc->vres.iscsi.size = val[1] - val[0] + 1; } + if (sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS) { + param[0] = FW_PARAM_PFVF(TLS_START); + param[1] = FW_PARAM_PFVF(TLS_END); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query TLS parameters: %d.\n", rc); + return (rc); + } + sc->vres.key.start = val[0]; + sc->vres.key.size = val[1] - val[0] + 1; + } t4_init_sge_params(sc); @@ -5780,6 +5800,14 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_coalesce", CTLFLAG_RW, &sc->tt.rx_coalesce, 0, "receive coalescing"); + sc->tt.tls = 0; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tls", CTLFLAG_RW, + &sc->tt.tls, 0, "Inline TLS allowed"); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tls_rx_ports", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, sysctl_tls_rx_ports, + "I", "TCP ports that use inline TLS+TOE RX"); + sc->tt.tx_align = 1; SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align", CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align payload"); @@ -6183,6 +6211,19 @@ cxgbe_sysctls(struct port_info *pi) "# of buffer-group 3 truncated packets"); #undef SYSCTL_ADD_T4_PORTSTAT + + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_records", + CTLFLAG_RD, &pi->tx_tls_records, + "# of TLS records transmitted"); + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_octets", + CTLFLAG_RD, &pi->tx_tls_octets, + "# of payload octets in transmitted TLS records"); + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_records", + CTLFLAG_RD, &pi->rx_tls_records, + "# of TLS records received"); + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_octets", + CTLFLAG_RD, &pi->rx_tls_octets, + "# of payload octets in received TLS records"); } static int @@ -7443,7 +7484,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) "TDDP region:", "TPT region:", "STAG region:", "RQ region:", "RQUDP region:", "PBL region:", "TXPBL region:", "DBVFIFO region:", "ULPRX state:", "ULPTX state:", - "On-chip queues:" + "On-chip queues:", "TLS keys:", }; struct mem_desc avail[4]; struct mem_desc mem[nitems(region) + 3]; /* up to 3 holes */ @@ -7583,6 +7624,13 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) md->idx = nitems(region); /* hide it */ md++; + md->base = sc->vres.key.start; + if (sc->vres.key.size) + md->limit = md->base + sc->vres.key.size - 1; + else + md->idx = nitems(region); /* hide it */ + md++; + /* add any address-space holes, there can be up to 3 */ for (n = 0; n < i - 1; n++) if (avail[n].limit < avail[n + 1].base) @@ -8674,6 +8722,68 @@ done: #endif #ifdef TCP_OFFLOAD +static int +sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int *old_ports, *new_ports; + int i, new_count, rc; + + if (req->newptr == NULL && req->oldptr == NULL) + return (SYSCTL_OUT(req, NULL, imax(sc->tt.num_tls_rx_ports, 1) * + sizeof(sc->tt.tls_rx_ports[0]))); + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4tlsrx"); + if (rc) + return (rc); + + if (sc->tt.num_tls_rx_ports == 0) { + i = -1; + rc = SYSCTL_OUT(req, &i, sizeof(i)); + } else + rc = SYSCTL_OUT(req, sc->tt.tls_rx_ports, + sc->tt.num_tls_rx_ports * sizeof(sc->tt.tls_rx_ports[0])); + if (rc == 0 && req->newptr != NULL) { + new_count = req->newlen / sizeof(new_ports[0]); + new_ports = malloc(new_count * sizeof(new_ports[0]), M_CXGBE, + M_WAITOK); + rc = SYSCTL_IN(req, new_ports, new_count * + sizeof(new_ports[0])); + if (rc) + goto err; + + /* Allow setting to a single '-1' to clear the list. */ + if (new_count == 1 && new_ports[0] == -1) { + ADAPTER_LOCK(sc); + old_ports = sc->tt.tls_rx_ports; + sc->tt.tls_rx_ports = NULL; + sc->tt.num_tls_rx_ports = 0; + ADAPTER_UNLOCK(sc); + free(old_ports, M_CXGBE); + } else { + for (i = 0; i < new_count; i++) { + if (new_ports[i] < 1 || + new_ports[i] > IPPORT_MAX) { + rc = EINVAL; + goto err; + } + } + + ADAPTER_LOCK(sc); + old_ports = sc->tt.tls_rx_ports; + sc->tt.tls_rx_ports = new_ports; + sc->tt.num_tls_rx_ports = new_count; + ADAPTER_UNLOCK(sc); + free(old_ports, M_CXGBE); + new_ports = NULL; + } + err: + free(new_ports, M_CXGBE); + } + end_synchronized_op(sc, 0); + return (rc); +} + static void unit_conv(char *buf, size_t len, u_int val, u_int factor) { @@ -10628,6 +10738,44 @@ DB_FUNC(tcb, db_show_t4tcb, db_t4_table, CS_OWN, NULL) t4_dump_tcb(device_get_softc(dev), tid); } #endif + +/* + * Borrowed from cesa_prep_aes_key(). + * + * NB: The crypto engine wants the words in the decryption key in reverse + * order. + */ +void +t4_aes_getdeckey(void *dec_key, const void *enc_key, unsigned int kbits) +{ + uint32_t ek[4 * (RIJNDAEL_MAXNR + 1)]; + uint32_t *dkey; + int i; + + rijndaelKeySetupEnc(ek, enc_key, kbits); + dkey = dec_key; + dkey += (kbits / 8) / 4; + + switch (kbits) { + case 128: + for (i = 0; i < 4; i++) + *--dkey = htobe32(ek[4 * 10 + i]); + break; + case 192: + for (i = 0; i < 2; i++) + *--dkey = htobe32(ek[4 * 11 + 2 + i]); + for (i = 0; i < 4; i++) + *--dkey = htobe32(ek[4 * 12 + i]); + break; + case 256: + for (i = 0; i < 4; i++) + *--dkey = htobe32(ek[4 * 13 + i]); + for (i = 0; i < 4; i++) + *--dkey = htobe32(ek[4 * 14 + i]); + break; + } + MPASS(dkey == dec_key); +} static struct sx mlu; /* mod load unload */ SX_SYSINIT(cxgbe_mlu, &mlu, "cxgbe mod load/unload"); Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_connect.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/tom/t4_connect.c Thu Mar 28 23:43:38 2019 (r345664) @@ -140,6 +140,10 @@ do_act_establish(struct sge_iq *iq, const struct rss_h } make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); + + if (toep->ulp_mode == ULP_MODE_TLS) + tls_establish(toep); + done: INP_WUNLOCK(inp); CURVNET_RESTORE(); @@ -266,6 +270,11 @@ calc_opt2a(struct socket *so, struct toepcb *toep) if (toep->ulp_mode == ULP_MODE_TCPDDP) opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; #endif + if (toep->ulp_mode == ULP_MODE_TLS) { + opt2 |= F_RX_FC_VALID; + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_RX_FC_DISABLE; + } return (htobe32(opt2)); } @@ -376,10 +385,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); toep->vnet = so->so_vnet; - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) - set_tcpddp_ulp_mode(toep); - else - toep->ulp_mode = ULP_MODE_NONE; + set_ulp_mode(toep, select_ulp_mode(so, sc)); SOCKBUF_LOCK(&so->so_rcv); /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ toep->rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ); Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Mar 28 23:43:38 2019 (r345664) @@ -82,9 +82,6 @@ VNET_DECLARE(int, tcp_autorcvbuf_inc); VNET_DECLARE(int, tcp_autorcvbuf_max); #define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) -#define IS_AIOTX_MBUF(m) \ - ((m)->m_flags & M_EXT && (m)->m_ext.ext_flags & EXT_FLAG_AIOTX) - static void t4_aiotx_cancel(struct kaiocb *job); static void t4_aiotx_queue_toep(struct toepcb *toep); @@ -115,7 +112,7 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par { struct wrqe *wr; struct fw_flowc_wr *flowc; - unsigned int nparams = ftxp ? 8 : 6, flowclen; + unsigned int nparams, flowclen, paramidx; struct vi_info *vi = toep->vi; struct port_info *pi = vi->pi; struct adapter *sc = pi->adapter; @@ -125,6 +122,15 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT), ("%s: flowc for tid %u sent already", __func__, toep->tid)); + if (ftxp != NULL) + nparams = 8; + else + nparams = 6; + if (toep->ulp_mode == ULP_MODE_TLS) + nparams++; + if (toep->tls.fcplenmax != 0) + nparams++; + flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq); @@ -140,39 +146,45 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) | V_FW_WR_FLOWID(toep->tid)); - flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; - flowc->mnemval[0].val = htobe32(pfvf); - flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; - flowc->mnemval[1].val = htobe32(pi->tx_chan); - flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; - flowc->mnemval[2].val = htobe32(pi->tx_chan); - flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; - flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id); +#define FLOWC_PARAM(__m, __v) \ + do { \ + flowc->mnemval[paramidx].mnemonic = FW_FLOWC_MNEM_##__m; \ + flowc->mnemval[paramidx].val = htobe32(__v); \ + paramidx++; \ + } while (0) + + paramidx = 0; + + FLOWC_PARAM(PFNVFN, pfvf); + FLOWC_PARAM(CH, pi->tx_chan); + FLOWC_PARAM(PORT, pi->tx_chan); + FLOWC_PARAM(IQID, toep->ofld_rxq->iq.abs_id); if (ftxp) { uint32_t sndbuf = min(ftxp->snd_space, sc->tt.sndbuf); - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDNXT; - flowc->mnemval[4].val = htobe32(ftxp->snd_nxt); - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_RCVNXT; - flowc->mnemval[5].val = htobe32(ftxp->rcv_nxt); - flowc->mnemval[6].mnemonic = FW_FLOWC_MNEM_SNDBUF; - flowc->mnemval[6].val = htobe32(sndbuf); - flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS; - flowc->mnemval[7].val = htobe32(ftxp->mss); + FLOWC_PARAM(SNDNXT, ftxp->snd_nxt); + FLOWC_PARAM(RCVNXT, ftxp->rcv_nxt); + FLOWC_PARAM(SNDBUF, sndbuf); + FLOWC_PARAM(MSS, ftxp->mss); CTR6(KTR_CXGBE, "%s: tid %u, mss %u, sndbuf %u, snd_nxt 0x%x, rcv_nxt 0x%x", __func__, toep->tid, ftxp->mss, sndbuf, ftxp->snd_nxt, ftxp->rcv_nxt); } else { - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; - flowc->mnemval[4].val = htobe32(512); - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; - flowc->mnemval[5].val = htobe32(512); + FLOWC_PARAM(SNDBUF, 512); + FLOWC_PARAM(MSS, 512); CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); } + if (toep->ulp_mode == ULP_MODE_TLS) + FLOWC_PARAM(ULP_MODE, toep->ulp_mode); + if (toep->tls.fcplenmax != 0) + FLOWC_PARAM(TXDATAPLEN_MAX, toep->tls.fcplenmax); +#undef FLOWC_PARAM + KASSERT(paramidx == nparams, ("nparams mismatch")); + txsd->tx_credits = howmany(flowclen, 16); txsd->plen = 0; KASSERT(toep->tx_credits >= txsd->tx_credits && toep->txsd_avail > 0, @@ -360,7 +372,7 @@ make_established(struct toepcb *toep, uint32_t snd_isn soisconnected(so); } -static int +int send_rx_credits(struct adapter *sc, struct toepcb *toep, int credits) { struct wrqe *wr; @@ -382,6 +394,23 @@ send_rx_credits(struct adapter *sc, struct toepcb *toe } void +send_rx_modulate(struct adapter *sc, struct toepcb *toep) +{ + struct wrqe *wr; + struct cpl_rx_data_ack *req; + + wr = alloc_wrqe(sizeof(*req), toep->ctrlq); + if (wr == NULL) + return; + req = wrtod(wr); + + INIT_TP_WR_MIT_CPL(req, CPL_RX_DATA_ACK, toep->tid); + req->credit_dack = htobe32(F_RX_MODULATE_RX); + + t4_wrq_tx(sc, wr); +} + +void t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) { struct adapter *sc = tod->tod_softc; @@ -398,8 +427,18 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) ("%s: sb %p has more data (%d) than last time (%d).", __func__, sb, sbused(sb), toep->sb_cc)); - toep->rx_credits += toep->sb_cc - sbused(sb); + credits = toep->sb_cc - sbused(sb); toep->sb_cc = sbused(sb); + if (toep->ulp_mode == ULP_MODE_TLS) { + if (toep->tls.rcv_over >= credits) { + toep->tls.rcv_over -= credits; + credits = 0; + } else { + credits -= toep->tls.rcv_over; + toep->tls.rcv_over = 0; + } + } + toep->rx_credits += credits; if (toep->rx_credits > 0 && (tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 || @@ -410,7 +449,8 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) toep->rx_credits -= credits; tp->rcv_wnd += credits; tp->rcv_adv += credits; - } + } else if (toep->flags & TPF_FORCE_CREDITS) + send_rx_modulate(sc, toep); } void @@ -428,8 +468,8 @@ t4_rcvd(struct toedev *tod, struct tcpcb *tp) /* * Close a connection by sending a CPL_CLOSE_CON_REQ message. */ -static int -close_conn(struct adapter *sc, struct toepcb *toep) +int +t4_close_conn(struct adapter *sc, struct toepcb *toep) { struct wrqe *wr; struct cpl_close_con_req *req; @@ -630,6 +670,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep KASSERT(toep->ulp_mode == ULP_MODE_NONE || toep->ulp_mode == ULP_MODE_TCPDDP || + toep->ulp_mode == ULP_MODE_TLS || toep->ulp_mode == ULP_MODE_RDMA, ("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep)); @@ -836,7 +877,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep /* Send a FIN if requested, but only if there's no more data to send */ if (m == NULL && toep->flags & TPF_SEND_FIN) - close_conn(sc, toep); + t4_close_conn(sc, toep); } static inline void @@ -1028,7 +1069,7 @@ t4_push_pdus(struct adapter *sc, struct toepcb *toep, /* Send a FIN if requested, but only if there are no more PDUs to send */ if (mbufq_first(pduq) == NULL && toep->flags & TPF_SEND_FIN) - close_conn(sc, toep); + t4_close_conn(sc, toep); } int @@ -1047,6 +1088,8 @@ t4_tod_output(struct toedev *tod, struct tcpcb *tp) if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, 0); + else if (tls_tx_key(toep)) + t4_push_tls_records(sc, toep, 0); else t4_push_frames(sc, toep, 0); @@ -1071,6 +1114,8 @@ t4_send_fin(struct toedev *tod, struct tcpcb *tp) if (tp->t_state >= TCPS_ESTABLISHED) { if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, 0); + else if (tls_tx_key(toep)) + t4_push_tls_records(sc, toep, 0); else t4_push_frames(sc, toep, 0); } @@ -1703,6 +1748,10 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header credits -= txsd->tx_credits; toep->tx_credits += txsd->tx_credits; plen += txsd->plen; + if (txsd->iv_buffer) { + free(txsd->iv_buffer, M_CXGBE); + txsd->iv_buffer = NULL; + } txsd++; toep->txsd_avail++; KASSERT(toep->txsd_avail <= toep->txsd_total, @@ -1728,6 +1777,8 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header CURVNET_SET(toep->vnet); if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, plen); + else if (tls_tx_key(toep)) + t4_push_tls_records(sc, toep, plen); else t4_push_frames(sc, toep, plen); CURVNET_RESTORE(); @@ -1757,6 +1808,12 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header tid, plen); #endif sbdrop_locked(sb, plen); + if (tls_tx_key(toep)) { + struct tls_ofld_info *tls_ofld = &toep->tls; + + MPASS(tls_ofld->sb_off >= plen); + tls_ofld->sb_off -= plen; + } if (!TAILQ_EMPTY(&toep->aiotx_jobq)) t4_aiotx_queue_toep(toep); sowwakeup_locked(so); /* unlocks so_snd */ @@ -1808,14 +1865,14 @@ do_set_tcb_rpl(struct sge_iq *iq, const struct rss_hea } void -t4_set_tcb_field(struct adapter *sc, struct sge_wrq *wrq, int tid, - uint16_t word, uint64_t mask, uint64_t val, int reply, int cookie, int iqid) +t4_set_tcb_field(struct adapter *sc, struct sge_wrq *wrq, struct toepcb *toep, + uint16_t word, uint64_t mask, uint64_t val, int reply, int cookie) { struct wrqe *wr; struct cpl_set_tcb_field *req; + struct ofld_tx_sdesc *txsd; MPASS((cookie & ~M_COOKIE) == 0); - MPASS((iqid & ~M_QUEUENO) == 0); wr = alloc_wrqe(sizeof(*req), wrq); if (wr == NULL) { @@ -1824,13 +1881,26 @@ t4_set_tcb_field(struct adapter *sc, struct sge_wrq *w } req = wrtod(wr); - INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, tid); - req->reply_ctrl = htobe16(V_QUEUENO(iqid)); + INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, toep->tid); + req->reply_ctrl = htobe16(V_QUEUENO(toep->ofld_rxq->iq.abs_id)); if (reply == 0) req->reply_ctrl |= htobe16(F_NO_REPLY); req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(cookie)); req->mask = htobe64(mask); req->val = htobe64(val); + if ((wrq->eq.flags & EQ_TYPEMASK) == EQ_OFLD) { + txsd = &toep->txsd[toep->txsd_pidx]; + txsd->tx_credits = howmany(sizeof(*req), 16); + txsd->plen = 0; + KASSERT(toep->tx_credits >= txsd->tx_credits && + toep->txsd_avail > 0, + ("%s: not enough credits (%d)", __func__, + toep->tx_credits)); + toep->tx_credits -= txsd->tx_credits; + if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) + toep->txsd_pidx = 0; + toep->txsd_avail--; + } t4_wrq_tx(sc, wr); } @@ -2229,6 +2299,9 @@ t4_aio_queue_aiotx(struct socket *so, struct kaiocb *j return (EOPNOTSUPP); if (!sc->tt.tx_zcopy) + return (EOPNOTSUPP); + + if (tls_tx_key(toep)) return (EOPNOTSUPP); SOCKBUF_LOCK(&so->so_snd); Modified: stable/11/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/tom/t4_ddp.c Thu Mar 28 23:43:38 2019 (r345664) @@ -816,14 +816,13 @@ enable_ddp(struct adapter *sc, struct toepcb *toep) DDP_ASSERT_LOCKED(toep); toep->ddp.flags |= DDP_SC_REQ; - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_RX_DDP_FLAGS, + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_RX_DDP_FLAGS, V_TF_DDP_OFF(1) | V_TF_DDP_INDICATE_OUT(1) | V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1) | V_TF_DDP_BUF0_VALID(1) | V_TF_DDP_BUF1_VALID(1), - V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1), 0, 0, - toep->ofld_rxq->iq.abs_id); - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, W_TCB_T_FLAGS, - V_TF_RCV_COALESCE_ENABLE(1), 0, 0, 0, toep->ofld_rxq->iq.abs_id); + V_TF_DDP_BUF0_INDICATE(1) | V_TF_DDP_BUF1_INDICATE(1), 0, 0); + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_T_FLAGS, + V_TF_RCV_COALESCE_ENABLE(1), 0, 0, 0); } static int @@ -1873,10 +1872,9 @@ t4_aio_cancel_active(struct kaiocb *job) */ valid_flag = i == 0 ? V_TF_DDP_BUF0_VALID(1) : V_TF_DDP_BUF1_VALID(1); - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_RX_DDP_FLAGS, valid_flag, 0, 1, - i + DDP_BUF0_INVALIDATED, - toep->ofld_rxq->iq.abs_id); + i + DDP_BUF0_INVALIDATED); toep->ddp.db[i].cancel_pending = 1; CTR2(KTR_CXGBE, "%s: request %p marked pending", __func__, job); Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_listen.c Thu Mar 28 22:19:09 2019 (r345663) +++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Thu Mar 28 23:43:38 2019 (r345664) @@ -1054,6 +1054,11 @@ calc_opt2p(struct adapter *sc, struct port_info *pi, i if (ulp_mode == ULP_MODE_TCPDDP) opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; #endif + if (ulp_mode == ULP_MODE_TLS) { + opt2 |= F_RX_FC_VALID; + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_RX_FC_DISABLE; + } return htobe32(opt2); } @@ -1344,11 +1349,15 @@ found: INIT_TP_WR_MIT_CPL(rpl5, CPL_PASS_ACCEPT_RPL, tid); } - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) { - ulp_mode = ULP_MODE_TCPDDP; + ulp_mode = select_ulp_mode(so, sc); + switch (ulp_mode) { + case ULP_MODE_TCPDDP: synqe->flags |= TPF_SYNQE_TCPDDP; - } else - ulp_mode = ULP_MODE_NONE; + break; + case ULP_MODE_TLS: + synqe->flags |= TPF_SYNQE_TLS; + break; + } rpl->opt0 = calc_opt0(so, vi, e, mtu_idx, rscale, rx_credits, ulp_mode); rpl->opt2 = calc_opt2p(sc, pi, rxqid, &cpl->tcpopt, &th, ulp_mode); @@ -1404,8 +1413,8 @@ found: REJECT_PASS_ACCEPT(); } - CTR5(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK", - __func__, stid, tid, lctx, synqe); + CTR6(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK mode %d", + __func__, stid, tid, lctx, synqe, ulp_mode); INP_WLOCK(inp); synqe->flags |= TPF_SYNQE_HAS_L2TE; @@ -1554,9 +1563,11 @@ reset: toep->tid = tid; toep->l2te = &sc->l2t->l2tab[synqe->l2e_idx]; if (synqe->flags & TPF_SYNQE_TCPDDP) - set_tcpddp_ulp_mode(toep); + set_ulp_mode(toep, ULP_MODE_TCPDDP); + else if (synqe->flags & TPF_SYNQE_TLS) + set_ulp_mode(toep, ULP_MODE_TLS); else - toep->ulp_mode = ULP_MODE_NONE; + set_ulp_mode(toep, ULP_MODE_NONE); /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ toep->rx_credits = synqe->rcv_bufsize; Copied and modified: stable/11/sys/dev/cxgbe/tom/t4_tls.c (from r330884, head/sys/dev/cxgbe/tom/t4_tls.c) ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tls.c Tue Mar 13 23:05:51 2018 (r330884, copy source) +++ stable/11/sys/dev/cxgbe/tom/t4_tls.c Thu Mar 28 23:43:38 2019 (r345664) @@ -48,6 +48,19 @@ __FBSDID("$FreeBSD$"); #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" +VNET_DECLARE(int, tcp_do_autosndbuf); +#define V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) +VNET_DECLARE(int, tcp_autosndbuf_inc); +#define V_tcp_autosndbuf_inc VNET(tcp_autosndbuf_inc) +VNET_DECLARE(int, tcp_autosndbuf_max); +#define V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max) +VNET_DECLARE(int, tcp_do_autorcvbuf); +#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) +VNET_DECLARE(int, tcp_autorcvbuf_inc); +#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc) +VNET_DECLARE(int, tcp_autorcvbuf_max); +#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) + /* * The TCP sequence number of a CPL_TLS_DATA mbuf is saved here while * the mbuf is in the ulp_pdu_reclaimq. @@ -68,11 +81,17 @@ t4_set_tls_tcb_field(struct toepcb *toep, uint16_t wor { struct adapter *sc = td_adapter(toep->td); - t4_set_tcb_field(sc, toep->ctrlq, toep->tid, word, mask, val, 0, 0, - toep->ofld_rxq->iq.abs_id); + t4_set_tcb_field(sc, toep->ofld_txq, toep, word, mask, val, 0, 0); } /* TLS and DTLS common routines */ +bool +can_tls_offload(struct adapter *sc) +{ + + return (sc->tt.tls && sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS); +} + int tls_tx_key(struct toepcb *toep) { @@ -423,32 +442,13 @@ prepare_txkey_wr(struct tls_keyctx *kwr, struct tls_ke } /* TLS Key memory management */ -int -tls_init_kmap(struct adapter *sc, struct tom_data *td) -{ - - td->key_map = vmem_create("T4TLS key map", sc->vres.key.start, - sc->vres.key.size, 8, 0, M_FIRSTFIT | M_NOWAIT); - if (td->key_map == NULL) - return (ENOMEM); - return (0); -} - -void -tls_free_kmap(struct tom_data *td) -{ - - if (td->key_map != NULL) - vmem_destroy(td->key_map); -} - static int get_new_keyid(struct toepcb *toep, struct tls_key_context *k_ctx) { - struct tom_data *td = toep->td; + struct adapter *sc = td_adapter(toep->td); vmem_addr_t addr; - if (vmem_alloc(td->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT, + if (vmem_alloc(sc->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT, &addr) != 0) return (-1); @@ -458,9 +458,9 @@ get_new_keyid(struct toepcb *toep, struct tls_key_cont static void free_keyid(struct toepcb *toep, int keyid) { - struct tom_data *td = toep->td; + struct adapter *sc = td_adapter(toep->td); - vmem_free(td->key_map, keyid, TLS_KEY_CONTEXT_SZ); + vmem_free(sc->key_map, keyid, TLS_KEY_CONTEXT_SZ); } static void @@ -482,7 +482,7 @@ static int get_keyid(struct tls_ofld_info *tls_ofld, unsigned int ops) { return (ops & KEY_WRITE_RX ? tls_ofld->rx_key_addr : - ((ops & KEY_WRITE_TX) ? tls_ofld->rx_key_addr : -1)); + ((ops & KEY_WRITE_TX) ? tls_ofld->tx_key_addr : -1)); } static int @@ -505,9 +505,9 @@ tls_program_key_id(struct toepcb *toep, struct tls_key struct tls_key_req *kwr; struct tls_keyctx *kctx; - kwrlen = roundup2(sizeof(*kwr), 16); + kwrlen = sizeof(*kwr); kctxlen = roundup2(sizeof(*kctx), 32); - len = kwrlen + kctxlen; + len = roundup2(kwrlen + kctxlen, 16); if (toep->txsd_avail == 0) return (EAGAIN); @@ -549,7 +549,6 @@ tls_program_key_id(struct toepcb *toep, struct tls_key kwr->sc_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM)); kwr->sc_len = htobe32(kctxlen); - /* XXX: This assumes that kwrlen == sizeof(*kwr). */ kctx = (struct tls_keyctx *)(kwr + 1); memset(kctx, 0, kctxlen); @@ -1168,7 +1167,8 @@ t4_push_tls_records(struct adapter *sc, struct toepcb * Send a FIN if requested, but only if there's no * more data to send. */ - if (sbavail(sb) == 0 && toep->flags & TPF_SEND_FIN) { + if (sbavail(sb) == tls_ofld->sb_off && + toep->flags & TPF_SEND_FIN) { if (sowwakeup) sowwakeup_locked(so); else @@ -1182,17 +1182,23 @@ t4_push_tls_records(struct adapter *sc, struct toepcb /* * A full TLS header is not yet queued, stop * for now until more data is added to the - * socket buffer. + * socket buffer. However, if the connection + * has been closed, we will never get the rest + * of the header so just discard the partial + * header and close the connection. */ #ifdef VERBOSE_TRACES - CTR4(KTR_CXGBE, "%s: tid %d sbavail %d sb_off %d", - __func__, toep->tid, sbavail(sb), tls_ofld->sb_off); + CTR5(KTR_CXGBE, "%s: tid %d sbavail %d sb_off %d%s", + __func__, toep->tid, sbavail(sb), tls_ofld->sb_off, + toep->flags & TPF_SEND_FIN ? "" : " SEND_FIN"); #endif if (sowwakeup) sowwakeup_locked(so); else SOCKBUF_UNLOCK(sb); SOCKBUF_UNLOCK_ASSERT(sb); + if (toep->flags & TPF_SEND_FIN) + t4_close_conn(sc, toep); return; } @@ -1209,19 +1215,25 @@ t4_push_tls_records(struct adapter *sc, struct toepcb /* * The full TLS record is not yet queued, stop * for now until more data is added to the - * socket buffer. + * socket buffer. However, if the connection + * has been closed, we will never get the rest + * of the record so just discard the partial + * record and close the connection. */ #ifdef VERBOSE_TRACES - CTR5(KTR_CXGBE, - "%s: tid %d sbavail %d sb_off %d plen %d", + CTR6(KTR_CXGBE, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-11@freebsd.org Fri Mar 29 00:04:51 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A790154F754; Fri, 29 Mar 2019 00:04:51 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D50406B980; Fri, 29 Mar 2019 00:04:50 +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 9C44E26B65; Fri, 29 Mar 2019 00:04:50 +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 x2T04oet090052; Fri, 29 Mar 2019 00:04:50 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T04oKO090051; Fri, 29 Mar 2019 00:04:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903290004.x2T04oKO090051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 29 Mar 2019 00:04: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: r345665 - stable/11/sys/arm/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/sys/arm/conf X-SVN-Commit-Revision: 345665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D50406B980 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 00:04:51 -0000 Author: jhb Date: Fri Mar 29 00:04:50 2019 New Revision: 345665 URL: https://svnweb.freebsd.org/changeset/base/345665 Log: MFC 318562: Exclude ccr(4) from arm LINT since it excludes cxgbe(4). Modified: stable/11/sys/arm/conf/NOTES Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/conf/NOTES ============================================================================== --- stable/11/sys/arm/conf/NOTES Thu Mar 28 23:43:38 2019 (r345664) +++ stable/11/sys/arm/conf/NOTES Fri Mar 29 00:04:50 2019 (r345665) @@ -77,6 +77,7 @@ nodevice snake_saver nodevice star_saver nodevice warp_saver +nodevice ccr nodevice cxgbe nodevice cxgbev nodevice snd_cmi From owner-svn-src-stable-11@freebsd.org Fri Mar 29 01:16:39 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC5C61551337; Fri, 29 Mar 2019 01:16:39 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 600206D959; Fri, 29 Mar 2019 01:16:39 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C34527783; Fri, 29 Mar 2019 01:16:39 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1Gdkt026827; Fri, 29 Mar 2019 01:16:39 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1GcSx026825; Fri, 29 Mar 2019 01:16:38 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903290116.x2T1GcSx026825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 29 Mar 2019 01:16: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: r345667 - in stable/11/sys: kern ufs/ffs X-SVN-Group: stable-11 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in stable/11/sys: kern ufs/ffs X-SVN-Commit-Revision: 345667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 600206D959 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 01:16:40 -0000 Author: mckusick Date: Fri Mar 29 01:16:38 2019 New Revision: 345667 URL: https://svnweb.freebsd.org/changeset/base/345667 Log: MFC of 343536, 345077, and 345352 Collectively fixing ffs_truncate3 and dangling dependencies panics when using ACLs. Sponsored by: Netflix Modified: stable/11/sys/kern/vfs_bio.c stable/11/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Fri Mar 29 01:15:37 2019 (r345666) +++ stable/11/sys/kern/vfs_bio.c Fri Mar 29 01:16:38 2019 (r345667) @@ -4479,6 +4479,8 @@ b_io_dismiss(struct buf *bp, int ioflag, bool release) if ((ioflag & IO_DIRECT) != 0) bp->b_flags |= B_DIRECT; + if ((ioflag & IO_EXT) != 0) + bp->b_xflags |= BX_ALTDATA; if ((ioflag & (IO_VMIO | IO_DIRECT)) != 0 && LIST_EMPTY(&bp->b_dep)) { bp->b_flags |= B_RELBUF; if ((ioflag & IO_NOREUSE) != 0) Modified: stable/11/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_softdep.c Fri Mar 29 01:15:37 2019 (r345666) +++ stable/11/sys/ufs/ffs/ffs_softdep.c Fri Mar 29 01:16:38 2019 (r345667) @@ -13902,6 +13902,8 @@ softdep_bp_to_mp(bp) if (LIST_EMPTY(&bp->b_dep)) return (NULL); vp = bp->b_vp; + KASSERT(vp != NULL, + ("%s, buffer with dependencies lacks vnode", __func__)); /* * The ump mount point is stable after we get a correct @@ -13911,17 +13913,33 @@ softdep_bp_to_mp(bp) * workitem might be freed while dereferenced. */ retry: - if (vp->v_type == VCHR) { + switch (vp->v_type) { + case VCHR: VI_LOCK(vp); mp = vp->v_type == VCHR ? vp->v_rdev->si_mountpt : NULL; VI_UNLOCK(vp); if (mp == NULL) goto retry; - } else if (vp->v_type == VREG || vp->v_type == VDIR || - vp->v_type == VLNK) { + break; + case VREG: + case VDIR: + case VLNK: + case VFIFO: + case VSOCK: mp = vp->v_mount; - } else { - return (NULL); + break; + case VBLK: + vn_printf(vp, "softdep_bp_to_mp: unexpected block device\n"); + /* FALLTHROUGH */ + case VNON: + case VBAD: + case VMARKER: + mp = NULL; + break; + default: + vn_printf(vp, "unknown vnode type"); + mp = NULL; + break; } return (VFSTOUFS(mp)); } From owner-svn-src-stable-11@freebsd.org Fri Mar 29 01:32:25 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5456F1551CEE; Fri, 29 Mar 2019 01:32:25 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB2AB6E424; Fri, 29 Mar 2019 01:32:24 +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 C6B7B27AC8; Fri, 29 Mar 2019 01:32:24 +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 x2T1WO4h037511; Fri, 29 Mar 2019 01:32:24 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1WO8J037510; Fri, 29 Mar 2019 01:32:24 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201903290132.x2T1WO8J037510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Fri, 29 Mar 2019 01:32: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: r345668 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 345668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EB2AB6E424 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 01:32:25 -0000 Author: rpokala Date: Fri Mar 29 01:32:24 2019 New Revision: 345668 URL: https://svnweb.freebsd.org/changeset/base/345668 Log: MFC r339683: Remove redundant redeclaration of netmap_vp_reg(). This should unbreak sparc64 and powerpc LINT builds. -- While this does fix that error, powerpc.LINT, powerpc.LINT64, and -- sparc64.LINT are broken in stable/11 for other reasons. --rpokala Sponsored by: Panasas Modified: stable/11/sys/dev/netmap/netmap_bdg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap_bdg.h ============================================================================== --- stable/11/sys/dev/netmap/netmap_bdg.h Fri Mar 29 01:16:38 2019 (r345667) +++ stable/11/sys/dev/netmap/netmap_bdg.h Fri Mar 29 01:32:24 2019 (r345668) @@ -177,7 +177,6 @@ struct nm_bridge *nm_find_bridge(const char *name, int int netmap_bdg_free(struct nm_bridge *b); void netmap_bdg_detach_common(struct nm_bridge *b, int hw, int sw); int netmap_vp_bdg_ctl(struct nmreq_header *hdr, struct netmap_adapter *na); -int netmap_vp_reg(struct netmap_adapter *na, int onoff); int netmap_bwrap_reg(struct netmap_adapter *, int onoff); int netmap_vp_reg(struct netmap_adapter *na, int onoff); int netmap_vp_rxsync(struct netmap_kring *kring, int flags); From owner-svn-src-stable-11@freebsd.org Fri Mar 29 01:40:48 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 512CB1552106; Fri, 29 Mar 2019 01:40:48 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 022386E8CB; Fri, 29 Mar 2019 01:40:48 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D14C727C0C; Fri, 29 Mar 2019 01:40:47 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2T1elvU038752; Fri, 29 Mar 2019 01:40:47 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2T1eir7038737; Fri, 29 Mar 2019 01:40:44 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201903290140.x2T1eir7038737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 29 Mar 2019 01:40:44 +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: r345670 - stable/11/contrib/tzdata X-SVN-Group: stable-11 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/11/contrib/tzdata X-SVN-Commit-Revision: 345670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 022386E8CB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 01:40:48 -0000 Author: philip Date: Fri Mar 29 01:40:44 2019 New Revision: 345670 URL: https://svnweb.freebsd.org/changeset/base/345670 Log: MFC r345524: Import tzdata 2019a Modified: stable/11/contrib/tzdata/Makefile stable/11/contrib/tzdata/NEWS stable/11/contrib/tzdata/README stable/11/contrib/tzdata/africa stable/11/contrib/tzdata/asia stable/11/contrib/tzdata/backward stable/11/contrib/tzdata/backzone stable/11/contrib/tzdata/etcetera stable/11/contrib/tzdata/europe stable/11/contrib/tzdata/leap-seconds.list stable/11/contrib/tzdata/leapseconds stable/11/contrib/tzdata/northamerica stable/11/contrib/tzdata/theory.html stable/11/contrib/tzdata/version Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/tzdata/Makefile ============================================================================== --- stable/11/contrib/tzdata/Makefile Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/Makefile Fri Mar 29 01:40:44 2019 (r345670) @@ -12,7 +12,10 @@ VERSION= unknown # Email address for bug reports. BUGEMAIL= tz@iana.org -# Choose source data features. To get new features right away, use: +# DATAFORM selects the data format. +# Available formats represent essentially the same data, albeit +# possibly with minor discrepancies that users are not likely to notice. +# To get new features and the best data right away, use: # DATAFORM= vanguard # To wait a while before using new features, to give downstream users # time to upgrade zic (the default), use: @@ -33,11 +36,11 @@ DATAFORM= main LOCALTIME= GMT # If you want something other than Eastern United States time as a template -# for handling POSIX-style timezone environment variables, +# for handling ruleless POSIX-style timezone environment variables, # change the line below (after finding the timezone you want in the # one of the $(TDATA) source files, or adding it to a source file). -# When a POSIX-style environment variable is handled, the rules in the -# template file are used to determine "spring forward" and "fall back" days and +# A ruleless environment setting like TZ='CST6CDT' uses the rules in the +# template file to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. # Alternatively, if you discover you've got the wrong timezone, you can just @@ -46,7 +49,6 @@ LOCALTIME= GMT # Use the command # make zonenames # to get a list of the values you can use for POSIXRULES. -# If you want POSIX compatibility, use "America/New_York". POSIXRULES= America/New_York @@ -113,8 +115,8 @@ TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TI TIME_T_ALTERNATIVES_HEAD = int64_t TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t -# What kind of TZif data files to generate. -# (TZif is the binary time zone data format that zic generates.) +# What kind of TZif data files to generate. (TZif is the binary time +# zone data format that zic generates; see Internet RFC 8536.) # If you want only POSIX time, with time values interpreted as # seconds since the epoch (not counting leap seconds), use # REDO= posix_only @@ -360,6 +362,9 @@ LEAPSECONDS= zic= ./zic ZIC= $(zic) $(ZFLAGS) +# To shrink the size of installed TZif files, +# append "-r @N" to omit data before N-seconds-after-the-Epoch. +# See the zic man page for more about -r. ZFLAGS= # How to use zic to install TZif files. @@ -491,7 +496,8 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.t COMMON= calendars CONTRIBUTING LICENSE Makefile \ NEWS README theory.html version WEB_PAGES= tz-art.html tz-how-to.html tz-link.html -CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html +CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ + check_tz-how-to.html check_tz-link.html DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) PRIMARY_YDATA= africa antarctica asia australasia \ europe northamerica southamerica @@ -804,9 +810,10 @@ check_tzs: $(TZS) $(TZS_NEW) touch $@ check_web: $(CHECK_WEB_PAGES) +check_theory.html: theory.html check_tz-art.html: tz-art.html check_tz-link.html: tz-link.html -check_tz-art.html check_tz-link.html: +check_theory.html check_tz-art.html check_tz-link.html: $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ test ! -s $@.out || { cat $@.out; exit 1; } @@ -840,11 +847,13 @@ check_zishrink_posix check_zishrink_right: \ touch $@ clean_misc: + rm -fr check_*.dir rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ check_* core typecheck_* \ date tzselect version.h zdump zic yearistype libtz.a clean: clean_misc - rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW) + rm -fr *.dir tzdb-*/ + rm -f *.zi $(TZS_NEW) maintainer-clean: clean @echo 'This command is intended for maintainers to use; it' Modified: stable/11/contrib/tzdata/NEWS ============================================================================== --- stable/11/contrib/tzdata/NEWS Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/NEWS Fri Mar 29 01:40:44 2019 (r345670) @@ -1,5 +1,53 @@ News for the tz database +Release 20198 - 2019-03-25 22:01:33 -0700 + + Briefly: + Palestine "springs forward" on 2019-03-30 instead of 2019-03-23. + Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00. + + Changes to past and future timestamps + + Palestine will not start DST until 2019-03-30, instead of 2019-03-23 as + previously predicted. Adjust our prediction by guessing that spring + transitions will be between 24 and 30 March, which matches recent practice + since 2016. (Thanks to Even Scharning and Tim Parenti.) + + Metlakatla ended its observance of Pacific standard time, + rejoining Alaska Time, on 2019-01-20 at 02:00. (Thanks to Ryan + Stanley and Tim Parenti.) + + Changes to past timestamps + + Israel observed DST in 1980 (08-02/09-13) and 1984 (05-05/08-25). + (Thanks to Alois Treindl and Isaac Starkman.) + + Changes to time zone abbreviations + + Etc/UCT is now a backward-compatibility link to Etc/UTC, instead + of being a separate zone that generates the abbreviation "UCT", + which nowadays is typically a typo. (Problem reported by Isiah + Meadows.) + + Changes to code + + zic now has an -r option to limit the time range of output data. + For example, 'zic -r @1000000000' limits the output data to + timestamps starting 1000000000 seconds after the Epoch. + This helps shrink output size and can be useful for applications + not needing the full timestamp history, such as TZDIST truncation; + see Internet RFC 8536 section 5.1. (Inspired by a feature request + from Christopher Wong, helped along by bug reports from Wong and + from Tim Parenti.) + + Changes to documentation + + Mention Internet RFC 8536 (February 2019), which documents TZif. + + tz-link.html now cites tzdata-meta + . + + Release 2018i - 2018-12-30 11:05:43 -0800 Briefly: @@ -400,8 +448,9 @@ Release 2018d - 2018-03-22 07:05:46 -0700 downstream parsers do not support it. * The build procedure constructs three files vanguard.zi, main.zi, - and rearguard.zi, one for each format. The files represent the - same data as closely as the formats allow. These three files + and rearguard.zi, one for each format. Although the files + represent essentially the same data, they may have minor + discrepancies that users are not likely to notice. The files are intended for downstream data consumers and are not installed. Zoneinfo parsers that do not support negative SAVE values should start using rearguard.zi, so that they will be unaffected Modified: stable/11/contrib/tzdata/README ============================================================================== --- stable/11/contrib/tzdata/README Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/README Fri Mar 29 01:40:44 2019 (r345670) @@ -1,7 +1,7 @@ README for the tz distribution -"What time is it?" -- Richard Deacon as The King -"Any time you want it to be." -- Frank Baxter as The Scientist +"Where do I set the hands of the clock?" -- Les Tremayne as The King +"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist (from the Bell System film "About Time") The Time Zone Database (called tz, tzdb or zoneinfo) contains code and Modified: stable/11/contrib/tzdata/africa ============================================================================== --- stable/11/contrib/tzdata/africa Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/africa Fri Mar 29 01:40:44 2019 (r345670) @@ -364,6 +364,11 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # See Africa/Lagos. # Eritrea +# See Africa/Nairobi. + +# Eswatini (formerly Swaziland) +# See Africa/Johannesburg. + # Ethiopia # See Africa/Nairobi. # @@ -1188,7 +1193,7 @@ Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 1:30 - SAST 1903 Mar 2:00 SA SAST Link Africa/Johannesburg Africa/Maseru # Lesotho -Link Africa/Johannesburg Africa/Mbabane # Swaziland +Link Africa/Johannesburg Africa/Mbabane # Eswatini # # Marion and Prince Edward Is # scientific station since 1947 @@ -1229,9 +1234,6 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931 Zone Africa/Juba 2:06:28 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT - -# Swaziland -# See Africa/Johannesburg. # Tanzania # See Africa/Nairobi. Modified: stable/11/contrib/tzdata/asia ============================================================================== --- stable/11/contrib/tzdata/asia Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/asia Fri Mar 29 01:40:44 2019 (r345670) @@ -1620,6 +1620,24 @@ Rule Zion 1974 only - Jul 7 0:00 1:00 D Rule Zion 1974 only - Oct 13 0:00 0 S Rule Zion 1975 only - Apr 20 0:00 1:00 D Rule Zion 1975 only - Aug 31 0:00 0 S + +# From Alois Treindl (2019-03-06): +# http://www.moin.gov.il/Documents/שעון קיץ/clock-50-years-7-2014.pdf +# From Isaac Starkman (2019-03-06): +# Summer time was in that period in 1980 and 1984, see +# https://www.ynet.co.il/articles/0,7340,L-3951073,00.html +# You can of course read it in translation. +# I checked the local newspapers for that years. +# It started on midnight and end at 01.00 am. +# From Paul Eggert (2019-03-06): +# Also see this thread about the moin.gov.il URL: +# https://mm.icann.org/pipermail/tz/2018-November/027194.html +Rule Zion 1980 only - Aug 2 0:00 1:00 D +Rule Zion 1980 only - Sep 13 1:00 0 S +Rule Zion 1984 only - May 5 0:00 1:00 D +Rule Zion 1984 only - Aug 25 1:00 0 S + +# From Shanks & Pottenger: Rule Zion 1985 only - Apr 14 0:00 1:00 D Rule Zion 1985 only - Sep 15 0:00 0 S Rule Zion 1986 only - May 18 0:00 1:00 D @@ -3071,9 +3089,15 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # the official website, though the decree did not specify the exact # time of the time shift. # http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817 + +# From Even Scharning (2019-03-23): +# DST in Palestine will start on 30 March this year, not 23 March as the time +# zone database predicted. +# https://ramallah.news/post/123610 # -# From Paul Eggert (2018-03-16): -# For 2016 on, predict spring transitions on March's fourth Saturday at 01:00. +# From Tim Parenti (2019-03-23): +# Combining this with the rules observed since 2016, adjust our spring +# transition guess to Mar Sat>=24. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -3104,7 +3128,7 @@ Rule Palestine 2012 only - Sep 21 1:00 0 - Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - Rule Palestine 2014 2015 - Oct Fri>=21 0:00 0 - Rule Palestine 2015 only - Mar lastFri 24:00 1:00 S -Rule Palestine 2016 max - Mar Sat>=22 1:00 1:00 S +Rule Palestine 2016 max - Mar Sat>=24 1:00 1:00 S Rule Palestine 2016 max - Oct lastSat 1:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -3595,6 +3619,18 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1 7:00 - +07 1959 Dec 31 23:00 8:00 - +08 1975 Jun 13 7:00 - +07 + +# From Paul Eggert (2019-02-19): +# +# The Ho Chi Minh entry suffices for most purposes as it agrees with all of +# Vietnam since 1975-06-13. Presumably clocks often changed in south Vietnam +# in the early 1970s as locations changed hands during the war; however the +# details are unknown and would likely be too voluminous for this database. +# +# For timestamps in north Vietnam back to 1970 (the tzdb cutoff), +# use Asia/Bangkok; see the VN entries in the file zone1970.tab. +# For timestamps before 1970, see Asia/Hanoi in the file 'backzone'. + # Yemen # See Asia/Riyadh. Modified: stable/11/contrib/tzdata/backward ============================================================================== --- stable/11/contrib/tzdata/backward Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/backward Fri Mar 29 01:40:44 2019 (r345670) @@ -77,6 +77,7 @@ Link Pacific/Easter Chile/EasterIsland Link America/Havana Cuba Link Africa/Cairo Egypt Link Europe/Dublin Eire +Link Etc/UTC Etc/UCT Link Europe/London Europe/Belfast Link Europe/Chisinau Europe/Tiraspol Link Europe/London GB @@ -111,7 +112,7 @@ Link Asia/Taipei ROC Link Asia/Seoul ROK Link Asia/Singapore Singapore Link Europe/Istanbul Turkey -Link Etc/UCT UCT +Link Etc/UTC UCT Link America/Anchorage US/Alaska Link America/Adak US/Aleutian Link America/Phoenix US/Arizona Modified: stable/11/contrib/tzdata/backzone ============================================================================== --- stable/11/contrib/tzdata/backzone Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/backzone Fri Mar 29 01:40:44 2019 (r345670) @@ -204,7 +204,7 @@ Zone Africa/Maseru 1:50:00 - LMT 1903 Mar 2:00 1:00 SAST 1944 Mar 19 2:00 2:00 - SAST -# Swaziland +# Eswatini (formerly Swaziland) Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar 2:00 - SAST @@ -625,7 +625,7 @@ Zone Europe/Sarajevo 1:13:40 - LMT 1884 1:00 - CET 1982 Nov 27 1:00 EU CE%sT -# Macedonia +# North Macedonia Zone Europe/Skopje 1:25:44 - LMT 1884 1:00 - CET 1941 Apr 18 23:00 1:00 C-Eur CE%sT 1945 May 8 2:00s Modified: stable/11/contrib/tzdata/etcetera ============================================================================== --- stable/11/contrib/tzdata/etcetera Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/etcetera Fri Mar 29 01:40:44 2019 (r345670) @@ -19,7 +19,6 @@ Zone Etc/GMT 0 - GMT Zone Etc/UTC 0 - UTC -Zone Etc/UCT 0 - UCT # The following link uses older naming conventions, # but it belongs here, not in the file 'backward', Modified: stable/11/contrib/tzdata/europe ============================================================================== --- stable/11/contrib/tzdata/europe Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/europe Fri Mar 29 01:40:44 2019 (r345670) @@ -1855,7 +1855,7 @@ Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun 1:00 Belgium CE%sT 1977 1:00 EU CE%sT -# Macedonia +# North Macedonia # See Europe/Belgrade. # Malta @@ -3359,7 +3359,7 @@ Zone Europe/Belgrade 1:22:00 - LMT 1884 Link Europe/Belgrade Europe/Ljubljana # Slovenia Link Europe/Belgrade Europe/Podgorica # Montenegro Link Europe/Belgrade Europe/Sarajevo # Bosnia and Herzegovina -Link Europe/Belgrade Europe/Skopje # Macedonia +Link Europe/Belgrade Europe/Skopje # North Macedonia Link Europe/Belgrade Europe/Zagreb # Croatia # Slovakia Modified: stable/11/contrib/tzdata/leap-seconds.list ============================================================================== --- stable/11/contrib/tzdata/leap-seconds.list Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/leap-seconds.list Fri Mar 29 01:40:44 2019 (r345670) @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C56 -# File expires on: 28 June 2019 +# Updated through IERS Bulletin C57 +# File expires on: 28 December 2019 # -#@ 3770668800 +#@ 3786480000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h 62ca19f6 96a4ae0a 3708451c 9f8693f4 016604eb +#h 83c68138 d3650221 07dbbbcd 11fcc859 ced1106a Modified: stable/11/contrib/tzdata/leapseconds ============================================================================== --- stable/11/contrib/tzdata/leapseconds Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/leapseconds Fri Mar 29 01:40:44 2019 (r345670) @@ -63,7 +63,7 @@ Leap 2016 Dec 31 23:59:60 + S # POSIX timestamps for the data in this file: #updated 1467936000 -#expires 1561680000 +#expires 1577491200 -# Updated through IERS Bulletin C56 -# File expires on: 28 June 2019 +# Updated through IERS Bulletin C57 +# File expires on: 28 December 2019 Modified: stable/11/contrib/tzdata/northamerica ============================================================================== --- stable/11/contrib/tzdata/northamerica Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/northamerica Fri Mar 29 01:40:44 2019 (r345670) @@ -609,6 +609,15 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12 # In a 2018-12-11 special election, Metlakatla voted to go back to # Alaska time (including daylight saving time) starting next year. # https://www.krbd.org/2018/12/12/metlakatla-to-follow-alaska-standard-time-allow-liquor-sales/ +# +# From Ryan Stanley (2019-01-11): +# The community will be changing back on the 20th of this month... +# From Tim Parenti (2019-01-11): +# Per an announcement on the Metlakatla community's official Facebook page, the +# "fall back" will be on Sunday 2019-01-20 at 02:00: +# https://www.facebook.com/141055983004923/photos/607150969728753/ +# So they won't be waiting for Alaska to join them on 2019-03-10, but will +# rather change their clocks twice in seven weeks. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Juneau 15:02:19 - LMT 1867 Oct 19 15:33:32 @@ -637,7 +646,7 @@ Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 19 15 -8:00 US P%sT 1983 Oct 30 2:00 -8:00 - PST 2015 Nov 1 2:00 -9:00 US AK%sT 2018 Nov 4 2:00 - -8:00 - PST 2019 Mar Sun>=8 3:00 + -8:00 - PST 2019 Jan 20 2:00 -9:00 US AK%sT Zone America/Yakutat 14:41:05 - LMT 1867 Oct 19 15:12:18 -9:18:55 - LMT 1900 Aug 20 12:00 Modified: stable/11/contrib/tzdata/theory.html ============================================================================== --- stable/11/contrib/tzdata/theory.html Fri Mar 29 01:39:20 2019 (r345669) +++ stable/11/contrib/tzdata/theory.html Fri Mar 29 01:40:44 2019 (r345670) @@ -15,7 +15,7 @@
  • Scope of the tz database
  • -
  • Names of timezones
  • +
  • Timezone identifiers
  • Time zone abbreviations
  • Accuracy of the tz database
  • @@ -107,9 +107,9 @@ It does not always make sense to talk about a timezone
    -

    Names of timezones

    +

    Timezone identifiers

    -Each timezone has a unique name. +Each timezone has a name that uniquely identifies the timezone. Inexperienced users are not expected to select these names unaided. Distributors should provide documentation and/or a simple selection interface that explains each name via a map or via descriptive text like @@ -142,10 +142,12 @@ among the following goals:

  • Be robust in the presence of political changes. - For example, names of countries are ordinarily not used, to avoid + For example, names are typically not tied to countries, to avoid incompatibilities when countries change their name (e.g., - Zaire→Congo) or when locations change countries (e.g., Hong + Swaziland→Eswatini) or when locations change countries (e.g., Hong Kong from UK colony to China). + There is no requirement that every country or national + capital must have a timezone name.
  • Be portable to a wide variety of implementations. @@ -215,19 +217,18 @@ in decreasing order of importance: do not need locations, since local time is not defined there.
  • - There should typically be at least one name for each ISO - 3166-1 officially assigned two-letter code for an inhabited - country or territory. -
  • -
  • If all the clocks in a timezone have agreed since 1970, do not bother to include more than one timezone even if some of the clocks disagreed before 1970. Otherwise these tables would become annoyingly large.
  • + If boundaries between regions are fluid, such as during a war or + insurrection, do not bother to create a new timezone merely + because of yet another boundary change. This helps prevent table + bloat and simplifies maintenance. +
  • +
  • If a name is ambiguous, use a less ambiguous alternative; e.g., many cities are named San José and Georgetown, so prefer America/Costa_Rica to @@ -299,29 +300,23 @@ in decreasing order of importance:

-The file 'zone1970.tab' lists geographical locations used -to name timezones. -It is intended to be an exhaustive list of names for geographic -regions as described above; this is a subset of the timezones in the data. -Although a 'zone1970.tab' location's -longitude -corresponds to -its local mean -time (LMT) offset with one hour for every 15° -east longitude, this relationship is not exact. +Guidelines have evolved with time, and names following old versions of +this guideline might not follow the current version. When guidelines +have changed, old names continue to be supported. Guideline changes +have included the following:

-

-Older versions of this package used a different naming scheme, -and these older names are still supported. +

    +
  • +Older versions of this package used a different naming scheme. See the file 'backward' for most of these older names (e.g., 'US/Eastern' instead of 'America/New_York'). The other old-fashioned names still supported are 'WET', 'CET', 'MET', and 'EET' (see the file 'europe'). -

    +
  • -

    +

  • Older versions of this package defined legacy names that are incompatible with the first guideline of location names, but which are still supported. @@ -332,6 +327,31 @@ Also, the file 'backward' defines the leg and the file 'northamerica' defines the legacy names 'EST5EDT', 'CST6CDT', 'MST7MDT', and 'PST8PDT'. +
  • + +
  • +Older versions of this guideline said that +there should typically be at least one name for each ISO +3166-1 officially assigned two-letter code for an inhabited +country or territory. +This old guideline has been dropped, as it was not needed to handle +timestamps correctly and it increased maintenance burden. +
  • +
+ +

+The file 'zone1970.tab' lists geographical locations used +to name timezones. +It is intended to be an exhaustive list of names for geographic +regions as described above; this is a subset of the timezones in the data. +Although a 'zone1970.tab' location's +longitude +corresponds to +its local mean +time (LMT) offset with one hour for every 15° +east longitude, this relationship is not exact.

@@ -983,7 +1003,9 @@ an older zic. constrained to be a string containing abbreviations and numeric data as described above. The file's format is TZif, - a timezone information format that contains binary data. + a timezone information format that contains binary data; see + Internet + RFC 8536. The daylight saving time rules to be used for a particular timezone are encoded in the TZif file; the format of the file allows US, @@ -1166,7 +1188,7 @@ The tz code and data supply