From owner-svn-src-head@freebsd.org Sun Jul 2 01:05:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B23BD96966; Sun, 2 Jul 2017 01:05:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A793788B3; Sun, 2 Jul 2017 01:05:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6215Gsr012719; Sun, 2 Jul 2017 01:05:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6215GJO012718; Sun, 2 Jul 2017 01:05:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201707020105.v6215GJO012718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 2 Jul 2017 01:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320561 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 01:05:17 -0000 Author: mjg Date: Sun Jul 2 01:05:16 2017 New Revision: 320561 URL: https://svnweb.freebsd.org/changeset/base/320561 Log: rwlock: perform the typically false td_rw_rlocks check later Check if the lock is available first instead. MFC after: 1 week Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sat Jul 1 23:39:49 2017 (r320560) +++ head/sys/kern/kern_rwlock.c Sun Jul 2 01:05:16 2017 (r320561) @@ -372,9 +372,8 @@ _rw_wunlock_cookie(volatile uintptr_t *c, const char * * prioritizes writers before readers. */ #define RW_CAN_READ(td, _rw) \ - (((td)->td_rw_rlocks && (_rw) & RW_LOCK_READ) || ((_rw) & \ - (RW_LOCK_READ | RW_LOCK_WRITE_WAITERS | RW_LOCK_WRITE_SPINNER)) == \ - RW_LOCK_READ) + (((_rw) & (RW_LOCK_READ | RW_LOCK_WRITE_WAITERS | RW_LOCK_WRITE_SPINNER)) ==\ + RW_LOCK_READ || ((td)->td_rw_rlocks && (_rw) & RW_LOCK_READ)) static bool __always_inline __rw_rlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp, From owner-svn-src-head@freebsd.org Sun Jul 2 03:14:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAAE7D9B35A; Sun, 2 Jul 2017 03:14:26 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75E147D040; Sun, 2 Jul 2017 03:14:25 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 5A5761316E; Sun, 2 Jul 2017 03:14:24 +0000 (UTC) Subject: Re: svn commit: r320555 - head/usr.sbin/diskinfo To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201707012134.v61LYvFc026064@repo.freebsd.org> From: Allan Jude Message-ID: <6cf43bd9-6160-7540-0477-af36ad769e3d@freebsd.org> Date: Sat, 1 Jul 2017 23:14:20 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201707012134.v61LYvFc026064@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Maq5QiGTdENjjqCqMxC8qXTKTVSLEi5Oa" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 03:14:26 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Maq5QiGTdENjjqCqMxC8qXTKTVSLEi5Oa Content-Type: multipart/mixed; boundary="jL6GhRhV3mbd2UXoGfUteTL8pNvRbWgut"; protected-headers="v1" From: Allan Jude To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <6cf43bd9-6160-7540-0477-af36ad769e3d@freebsd.org> Subject: Re: svn commit: r320555 - head/usr.sbin/diskinfo References: <201707012134.v61LYvFc026064@repo.freebsd.org> In-Reply-To: <201707012134.v61LYvFc026064@repo.freebsd.org> --jL6GhRhV3mbd2UXoGfUteTL8pNvRbWgut Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2017-07-01 17:34, Allan Jude wrote: > Author: allanjude > Date: Sat Jul 1 21:34:57 2017 > New Revision: 320555 > URL: https://svnweb.freebsd.org/changeset/base/320555 >=20 > Log: > Add -s (serial) and -p (physpath) to diskinfo > =20 > Return the bare requested information, intended for scripting. > =20 > The serial number of a SAS/SCSI device can be returned with > 'camcontrol inquiry disk -S', but there is no similar switch for SATA= =2E > =20 > This provides a way to get this information from both SAS and SATA di= sks > =20 > the -s and -p flags are mutually exclusive, and cannot be used with a= ny > other flags. > =20 > Reviewed by: rpokala, wblock > MFC after: 1 month > Sponsored by: ScaleEngine Inc. > Differential Revision: https://reviews.freebsd.org/D7828 >=20 Relnotes: yes --=20 Allan Jude --jL6GhRhV3mbd2UXoGfUteTL8pNvRbWgut-- --Maq5QiGTdENjjqCqMxC8qXTKTVSLEi5Oa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJZWGUPAAoJEBmVNT4SmAt+uAEQAN5khjQftLhbqyu8EWY3YK9H 7Wwqj8IOqENONSrbCBnLxBb33H7DT69U0ERxBYfAp/Pzw0RnVFXUz/JPJ54ks/d8 B73wWWh/LXc51lieraZvY2DHTtQf21js/n28FGnaHvRNo4EeAJcT07WpHJSY+gDp /pG9oM6lCFEjhO7+db1n4WpY1cvaoUZrU25Cro4oSONkv02YW5jGaT8mZ9+3MDKh mi/JnazUmxMNZglORVxPKVH43X5my4NZyytd7aoTOAoZKNDhxCNKKZWMvyc52+pl fepnTPVH8KDSZ2uPY268mDg65w7iGzzK4NPekTSPlPfhl+3C57pwLjlPhMVWg1kE QBz9TRUQ76iusloLRc6y0EGzJrgecOvYOP6Rc1RkEc3g30/hU5v9Y7SnJ69bNLOo SRz6vVzJrHe+eGRDM+Vnasm8VY3rDH5vdVcIJQ/9Ji2SpwmBv1PIaMusyqqLtN+V 6W7r+hswGPUACWn8UJm+miMVd8ZUvM/zOoIRYXGwyL2EwPjuZ6/yfbEgXKJSUFfP OX1xQLSNCt9xtinxAF0TfBKUmi10Otnvhj1t1LUrwjfCl/uOUNdq9SkpqDEaMXfB AMZ22HKKz19WV8QjgdJ/31rKOHrzssPpH0FJUO5QdMpuhdyr7bzWAUnvEOVfQOt1 wR9jCNzrTQsXDWnJm6ob =W2cl -----END PGP SIGNATURE----- --Maq5QiGTdENjjqCqMxC8qXTKTVSLEi5Oa-- From owner-svn-src-head@freebsd.org Sun Jul 2 05:40:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C811D9E30D; Sun, 2 Jul 2017 05:40:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49E5080E3B; Sun, 2 Jul 2017 05:40:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v625eMRk024190; Sun, 2 Jul 2017 05:40:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v625eMQZ024189; Sun, 2 Jul 2017 05:40:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707020540.v625eMQZ024189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 2 Jul 2017 05:40:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320570 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 320570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 05:40:23 -0000 Author: kib Date: Sun Jul 2 05:40:22 2017 New Revision: 320570 URL: https://svnweb.freebsd.org/changeset/base/320570 Log: Correct signatures of several pthreads stubs. Most important, use a correct signature for the __pthread_cleanup_push_imp() stub, which was incorrectly generated with two-args variant. The pthread_cleanup_info pointer was corrupted in the forwarded call to the real libthr implementation, visible on PowerPC and possibly ARM. [1] Found and tested by: Mark Millard [1] Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/gen/_pthread_stubs.c Modified: head/lib/libc/gen/_pthread_stubs.c ============================================================================== --- head/lib/libc/gen/_pthread_stubs.c Sun Jul 2 04:22:37 2017 (r320569) +++ head/lib/libc/gen/_pthread_stubs.c Sun Jul 2 05:40:22 2017 (r320570) @@ -279,10 +279,11 @@ STUB_FUNC2(pthread_kill, PJT_KILL, int, void *, int) STUB_FUNC2(pthread_setcancelstate, PJT_SETCANCELSTATE, int, int, void *) STUB_FUNC2(pthread_setcanceltype, PJT_SETCANCELTYPE, int, int, void *) STUB_FUNC(pthread_testcancel, PJT_TESTCANCEL, void) -STUB_FUNC1(__pthread_cleanup_pop_imp, PJT_CLEANUP_POP_IMP, int, int) -STUB_FUNC2(__pthread_cleanup_push_imp, PJT_CLEANUP_PUSH_IMP, void, void*, void *); -STUB_FUNC1(_pthread_cancel_enter, PJT_CANCEL_ENTER, int, int) -STUB_FUNC1(_pthread_cancel_leave, PJT_CANCEL_LEAVE, int, int) +STUB_FUNC1(__pthread_cleanup_pop_imp, PJT_CLEANUP_POP_IMP, void, int) +STUB_FUNC3(__pthread_cleanup_push_imp, PJT_CLEANUP_PUSH_IMP, void, void *, + void *, void *); +STUB_FUNC1(_pthread_cancel_enter, PJT_CANCEL_ENTER, void, int) +STUB_FUNC1(_pthread_cancel_leave, PJT_CANCEL_LEAVE, void, int) static int stub_zero(void) From owner-svn-src-head@freebsd.org Sun Jul 2 07:43:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B205D9FB43 for ; Sun, 2 Jul 2017 07:43:09 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-15.reflexion.net [208.70.210.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB5B68399E for ; Sun, 2 Jul 2017 07:43:08 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 5212 invoked from network); 2 Jul 2017 07:43:06 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 2 Jul 2017 07:43:06 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.1) with SMTP; Sun, 02 Jul 2017 03:43:06 -0400 (EDT) Received: (qmail 18902 invoked from network); 2 Jul 2017 07:43:06 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 2 Jul 2017 07:43:06 -0000 Received: from [192.168.1.114] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id EE7E5EC893D; Sun, 2 Jul 2017 00:43:05 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: BROKEN: svn commit: r320528 - in head/sys: amd64/include arm/arm arm/include arm64/arm64 arm64/include dev/aac dev/aacraid dev/bnxt dev/cxgb dev/cxgb/ulp/iw_cxgb dev/hyperv/storvsc dev/mfi dev/tsec dev/xdm... Message-Id: <6991DEC2-6E7B-40A3-B384-D5BC19E2A2F5@dsl-only.net> Date: Sun, 2 Jul 2017 00:43:05 -0700 To: jah@FreeBSD.org, svn-src-head@freebsd.org, FreeBSD Current X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 07:43:09 -0000 I attempted to jump from head -r320482 to -r320570 for amd64 but the kernel build fails with massive numbers of things like: I'll note that, for example, aac_disk.o was rebuilt: --- all_subdir_aac --- Building = /usr/obj/amd64_clang/amd64.amd64/usr/src/sys/GENERIC-NODBG/modules/usr/src= /sys/modules/aac/aac_disk.o before the below happened. --- kernel.full --- aac_disk.o: In function `aac_disk_dump': /usr/src/sys/dev/aac/aac_disk.c:253: undefined reference to = `bus_dmamap_create' /usr/src/sys/dev/aac/aac_disk.c:301: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/aac/aac_disk.c:314: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/aac/aac_disk.c:317: undefined reference to = `_bus_dmamap_unload' adv_pci.o: In function `adv_pci_attach': /usr/src/sys/dev/advansys/adv_pci.c:225: undefined reference to = `bus_dmamem_alloc' . . . --- kernel.full --- advansys.o: In function `adv_destroy_ccb_info': /usr/src/sys/dev/advansys/advansys.c:596: undefined reference to = `bus_dmamap_destroy' advansys.o: In function `adv_free': /usr/src/sys/dev/advansys/advansys.c:696: undefined reference to = `_bus_dmamap_unload' /usr/src/sys/dev/advansys/advansys.c:699: undefined reference to = `bus_dmamem_free' advansys.o: In function `adv_done': /usr/src/sys/dev/advansys/advansys.c:1093: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/advansys/advansys.c:1094: undefined reference to = `_bus_dmamap_unload' advansys.o: In function `adv_attach': /usr/src/sys/dev/advansys/advansys.c:1335: undefined reference to = `bus_dmamem_alloc' advansys.o: In function `adv_alloc_ccb_info': /usr/src/sys/dev/advansys/advansys.c:580: undefined reference to = `bus_dmamap_create' advansys.o: In function `adv_execute_ccb': /usr/src/sys/dev/advansys/advansys.c:532: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/advansys/advansys.c:545: undefined reference to = `_bus_dmamap_unload' /usr/src/sys/dev/advansys/advansys.c:556: undefined reference to = `_bus_dmamap_unload' . . . (huge amount omitted) . . . --- kernel.full --- if_vmx.o: In function `vmxnet3_alloc_txq_data': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1243: undefined reference to = `bus_dmamap_create' if_vmx.o: In function `vmxnet3_alloc_rxq_data': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1366: undefined reference to = `bus_dmamap_create' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1376: undefined reference to = `bus_dmamap_create' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1366: undefined reference to = `bus_dmamap_create' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1376: undefined reference to = `bus_dmamap_create' if_vmx.o: In function `vmxnet3_free_rxq_data': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1412: undefined reference to = `bus_dmamap_destroy' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1420: undefined reference to = `bus_dmamap_destroy' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1412: undefined reference to = `bus_dmamap_destroy' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1420: undefined reference to = `bus_dmamap_destroy' if_vmx.o: In function `vmxnet3_free_txq_data': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1276: undefined reference to = `bus_dmamap_destroy' if_vmx.o: In function `vmxnet3_txq_unload_mbuf': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2798: undefined reference to = `_bus_dmamap_unload' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2798: undefined reference to = `_bus_dmamap_unload' if_vmx.o: In function `vmxnet3_dma_malloc': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3871: undefined reference to = `bus_dmamem_alloc' if_vmx.o: In function `vmxnet3_dma_free': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3900: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3902: undefined reference to = `_bus_dmamap_unload' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3906: undefined reference to = `bus_dmamem_free' if_vmx.o: In function `vmxnet3_txstop': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2358: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2360: undefined reference to = `_bus_dmamap_unload' if_vmx.o: In function `vmxnet3_rxstop': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2388: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2390: undefined reference to = `_bus_dmamap_unload' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2388: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2390: undefined reference to = `_bus_dmamap_unload' if_vmx.o: In function `vmxnet3_newbuf': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1959: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1960: undefined reference to = `_bus_dmamap_unload' if_vmx.o: In function `vmxnet3_txq_eof': /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1866: undefined reference to = `_bus_dmamap_sync' /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1868: undefined reference to = `_bus_dmamap_unload' isci.o: In function `isci_allocate_dma_buffer': /usr/src/sys/dev/isci/isci.c:424: undefined reference to = `bus_dmamem_alloc' isci_io_request.o: In function `isci_io_request_complete': =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Sun Jul 2 08:51:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1138ADA0E0C for ; Sun, 2 Jul 2017 08:51:49 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-15.reflexion.net [208.70.210.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFDBD10C for ; Sun, 2 Jul 2017 08:51:47 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 23003 invoked from network); 2 Jul 2017 08:51:46 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 2 Jul 2017 08:51:46 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.40.1) with SMTP; Sun, 02 Jul 2017 04:51:46 -0400 (EDT) Received: (qmail 23402 invoked from network); 2 Jul 2017 08:51:46 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 2 Jul 2017 08:51:46 -0000 Received: from [192.168.1.114] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 9ED33EC7C08; Sun, 2 Jul 2017 01:51:45 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: META MODE BROKEN: svn commit: r320528 - in head/sys: amd64/include arm/arm arm/include arm64/arm64 arm64/include dev/aac dev/aacraid dev/bnxt dev/cxgb dev/cxgb/ulp/iw_cxgb dev/hyperv/storvsc dev/mfi dev/tsec dev/xdm... Date: Sun, 2 Jul 2017 01:51:44 -0700 References: <6991DEC2-6E7B-40A3-B384-D5BC19E2A2F5@dsl-only.net> To: Bryan Drewery , jah@FreeBSD.org, svn-src-head@freebsd.org, FreeBSD Current In-Reply-To: <6991DEC2-6E7B-40A3-B384-D5BC19E2A2F5@dsl-only.net> Message-Id: <6FC21EFE-2873-4EE4-81C7-DD9CEAD036B5@dsl-only.net> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 08:51:49 -0000 [Turns out META_MODE did not update /usr/include/machine/* .] On 2017-Jul-2, at 12:43 AM, Mark Millard wrote: > I attempted to jump from head -r320482 to -r320570 for amd64 > but the kernel build fails with massive numbers of things like: >=20 >=20 > I'll note that, for example, aac_disk.o was rebuilt: >=20 > --- all_subdir_aac --- > Building = /usr/obj/amd64_clang/amd64.amd64/usr/src/sys/GENERIC-NODBG/modules/usr/src= /sys/modules/aac/aac_disk.o >=20 > before the below happened. >=20 >=20 > --- kernel.full --- > aac_disk.o: In function `aac_disk_dump': > /usr/src/sys/dev/aac/aac_disk.c:253: undefined reference to = `bus_dmamap_create' > /usr/src/sys/dev/aac/aac_disk.c:301: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/aac/aac_disk.c:314: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/aac/aac_disk.c:317: undefined reference to = `_bus_dmamap_unload' > adv_pci.o: In function `adv_pci_attach': > /usr/src/sys/dev/advansys/adv_pci.c:225: undefined reference to = `bus_dmamem_alloc' > . . . > --- kernel.full --- > advansys.o: In function `adv_destroy_ccb_info': > /usr/src/sys/dev/advansys/advansys.c:596: undefined reference to = `bus_dmamap_destroy' > advansys.o: In function `adv_free': > /usr/src/sys/dev/advansys/advansys.c:696: undefined reference to = `_bus_dmamap_unload' > /usr/src/sys/dev/advansys/advansys.c:699: undefined reference to = `bus_dmamem_free' > advansys.o: In function `adv_done': > /usr/src/sys/dev/advansys/advansys.c:1093: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/advansys/advansys.c:1094: undefined reference to = `_bus_dmamap_unload' > advansys.o: In function `adv_attach': > /usr/src/sys/dev/advansys/advansys.c:1335: undefined reference to = `bus_dmamem_alloc' > advansys.o: In function `adv_alloc_ccb_info': > /usr/src/sys/dev/advansys/advansys.c:580: undefined reference to = `bus_dmamap_create' > advansys.o: In function `adv_execute_ccb': > /usr/src/sys/dev/advansys/advansys.c:532: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/advansys/advansys.c:545: undefined reference to = `_bus_dmamap_unload' > /usr/src/sys/dev/advansys/advansys.c:556: undefined reference to = `_bus_dmamap_unload' > . . . (huge amount omitted) . . . > --- kernel.full --- > if_vmx.o: In function `vmxnet3_alloc_txq_data': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1243: undefined reference to = `bus_dmamap_create' > if_vmx.o: In function `vmxnet3_alloc_rxq_data': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1366: undefined reference to = `bus_dmamap_create' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1376: undefined reference to = `bus_dmamap_create' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1366: undefined reference to = `bus_dmamap_create' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1376: undefined reference to = `bus_dmamap_create' > if_vmx.o: In function `vmxnet3_free_rxq_data': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1412: undefined reference to = `bus_dmamap_destroy' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1420: undefined reference to = `bus_dmamap_destroy' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1412: undefined reference to = `bus_dmamap_destroy' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1420: undefined reference to = `bus_dmamap_destroy' > if_vmx.o: In function `vmxnet3_free_txq_data': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1276: undefined reference to = `bus_dmamap_destroy' > if_vmx.o: In function `vmxnet3_txq_unload_mbuf': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2798: undefined reference to = `_bus_dmamap_unload' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2798: undefined reference to = `_bus_dmamap_unload' > if_vmx.o: In function `vmxnet3_dma_malloc': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3871: undefined reference to = `bus_dmamem_alloc' > if_vmx.o: In function `vmxnet3_dma_free': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3900: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3902: undefined reference to = `_bus_dmamap_unload' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3906: undefined reference to = `bus_dmamem_free' > if_vmx.o: In function `vmxnet3_txstop': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2358: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2360: undefined reference to = `_bus_dmamap_unload' > if_vmx.o: In function `vmxnet3_rxstop': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2388: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2390: undefined reference to = `_bus_dmamap_unload' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2388: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2390: undefined reference to = `_bus_dmamap_unload' > if_vmx.o: In function `vmxnet3_newbuf': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1959: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1960: undefined reference to = `_bus_dmamap_unload' > if_vmx.o: In function `vmxnet3_txq_eof': > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1866: undefined reference to = `_bus_dmamap_sync' > /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1868: undefined reference to = `_bus_dmamap_unload' > isci.o: In function `isci_allocate_dma_buffer': > /usr/src/sys/dev/isci/isci.c:424: undefined reference to = `bus_dmamem_alloc' > isci_io_request.o: In function `isci_io_request_complete': Looks like this is the result of /usr/include/machine/* (such as bus_dma.h ) not having been updated appropriately by META_MODE to match: /usr/src/sys/amd64/include/bus_dma.h # diff -u /usr/include/machine/bus_dma.h = /usr/src/sys/amd64/include/bus_dma.h --- /usr/include/machine/bus_dma.h 2017-03-23 11:14:59.000000000 = -0700 +++ /usr/src/sys/amd64/include/bus_dma.h 2017-07-01 = 23:58:19.756701000 -0700 @@ -23,12 +23,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY = OF * SUCH DAMAGE. * - * $FreeBSD: head/sys/amd64/include/bus_dma.h 148275 2005-07-22 = 04:03:25Z obrien $ + * $FreeBSD: head/sys/amd64/include/bus_dma.h 320528 2017-07-01 = 05:35:29Z jah $ */ =20 #ifndef _AMD64_BUS_DMA_H_ #define _AMD64_BUS_DMA_H_ =20 -#include +#include =20 =20 #endif /* _AMD64_BUS_DMA_H_ */ # ls -lTt /usr/include/machine/ total 417 -r--r--r-- 1 root wheel 7509 Jun 14 00:43:43 2017 vmparam.h -r--r--r-- 1 root wheel 3390 Jun 14 00:43:43 2017 proc.h -r--r--r-- 1 root wheel 8687 May 3 02:46:12 2017 pcpu.h -r--r--r-- 1 root wheel 2661 May 3 02:46:12 2017 counter.h -r--r--r-- 1 root wheel 22692 May 3 02:46:12 2017 atomic.h -r--r--r-- 1 root wheel 2935 Apr 15 00:24:33 2017 db_machdep.h -r--r--r-- 1 root wheel 154 Mar 23 11:14:59 2017 _align.h -r--r--r-- 1 root wheel 1837 Mar 23 11:14:59 2017 _bus.h -r--r--r-- 1 root wheel 160 Mar 23 11:14:59 2017 _inttypes.h -r--r--r-- 1 root wheel 156 Mar 23 11:14:59 2017 _limits.h -r--r--r-- 1 root wheel 156 Mar 23 11:14:59 2017 _stdint.h -r--r--r-- 1 root wheel 154 Mar 23 11:14:59 2017 _types.h . . . =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Sun Jul 2 08:52:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FE51DA0E73; Sun, 2 Jul 2017 08:52:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF72E284; Sun, 2 Jul 2017 08:52:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v628q9bY005957; Sun, 2 Jul 2017 08:52:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v628q9Ci005956; Sun, 2 Jul 2017 08:52:09 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707020852.v628q9Ci005956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 2 Jul 2017 08:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320571 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 320571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 08:52:10 -0000 Author: andrew Date: Sun Jul 2 08:52:08 2017 New Revision: 320571 URL: https://svnweb.freebsd.org/changeset/base/320571 Log: In the arm64 pmap_remove, when removing a full superpage there is no need to demote it to 512 pages, then remove each of these. We can just remove the l2 map directly. This is what the intel pmaps already do. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Sun Jul 2 05:40:22 2017 (r320570) +++ head/sys/arm64/arm64/pmap.c Sun Jul 2 08:52:08 2017 (r320571) @@ -270,8 +270,10 @@ static pt_entry_t *pmap_demote_l2_locked(pmap_t pmap, static pt_entry_t *pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t va); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); +static int pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, + pd_entry_t l1e, struct spglist *free, struct rwlock **lockp); static int pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_t sva, - pd_entry_t ptepde, struct spglist *free, struct rwlock **lockp); + pd_entry_t l2e, struct spglist *free, struct rwlock **lockp); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m, struct rwlock **lockp); @@ -280,7 +282,8 @@ static vm_page_t _pmap_alloc_l3(pmap_t pmap, vm_pindex static void _pmap_unwire_l3(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free); -static int pmap_unuse_l3(pmap_t, vm_offset_t, pd_entry_t, struct spglist *); +static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, struct spglist *); +static __inline vm_page_t pmap_remove_pt_page(pmap_t pmap, vm_offset_t va); /* * These load the old table data and store the new value. @@ -1373,11 +1376,11 @@ _pmap_unwire_l3(pmap_t pmap, vm_offset_t va, vm_page_t } /* - * After removing an l3 entry, this routine is used to + * After removing a page table entry, this routine is used to * conditionally free the page, and manage the hold/wire counts. */ static int -pmap_unuse_l3(pmap_t pmap, vm_offset_t va, pd_entry_t ptepde, +pmap_unuse_pt(pmap_t pmap, vm_offset_t va, pd_entry_t ptepde, struct spglist *free) { vm_page_t mpte; @@ -1873,7 +1876,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l } } pc->pc_map[field] |= 1UL << bit; - pmap_unuse_l3(pmap, va, pmap_load(pde), &free); + pmap_unuse_pt(pmap, va, pmap_load(pde), &free); freed++; } } @@ -2231,6 +2234,55 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, } /* + * pmap_remove_l2: do the things to unmap a level 2 superpage in a process + */ +static int +pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, + pd_entry_t l1e, struct spglist *free, struct rwlock **lockp) +{ + struct md_page *pvh; + pt_entry_t old_l2; + vm_offset_t eva, va; + vm_page_t m, ml3; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT((sva & L2_OFFSET) == 0, ("pmap_remove_l2: sva is not aligned")); + old_l2 = pmap_load_clear(l2); + pmap_invalidate_range(pmap, sva, sva + L2_SIZE); + if (old_l2 & ATTR_SW_WIRED) + pmap->pm_stats.wired_count -= L2_SIZE / PAGE_SIZE; + pmap_resident_count_dec(pmap, L2_SIZE / PAGE_SIZE); + if (old_l2 & ATTR_SW_MANAGED) { + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, old_l2 & ~ATTR_MASK); + pvh = pa_to_pvh(old_l2 & ~ATTR_MASK); + pmap_pvh_free(pvh, pmap, sva); + eva = sva + L2_SIZE; + for (va = sva, m = PHYS_TO_VM_PAGE(old_l2 & ~ATTR_MASK); + va < eva; va += PAGE_SIZE, m++) { + if (pmap_page_dirty(old_l2)) + vm_page_dirty(m); + if (old_l2 & ATTR_AF) + vm_page_aflag_set(m, PGA_REFERENCED); + if (TAILQ_EMPTY(&m->md.pv_list) && + TAILQ_EMPTY(&pvh->pv_list)) + vm_page_aflag_clear(m, PGA_WRITEABLE); + } + } + KASSERT(pmap != kernel_pmap, + ("Attempting to remove an l2 kernel page")); + ml3 = pmap_remove_pt_page(pmap, sva); + if (ml3 != NULL) { + pmap_resident_count_dec(pmap, 1); + KASSERT(ml3->wire_count == NL3PG, + ("pmap_remove_pages: l3 page wire count error")); + ml3->wire_count = 0; + pmap_add_delayed_free_list(ml3, free, FALSE); + atomic_subtract_int(&vm_cnt.v_wire_count, 1); + } + return (pmap_unuse_pt(pmap, sva, l1e, free)); +} + +/* * pmap_remove_l3: do the things to unmap a page in a process */ static int @@ -2262,7 +2314,7 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_ vm_page_aflag_clear(m, PGA_WRITEABLE); } } - return (pmap_unuse_l3(pmap, va, l2e, free)); + return (pmap_unuse_pt(pmap, va, l2e, free)); } /* @@ -2328,10 +2380,13 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t l3_paddr = pmap_load(l2); if ((l3_paddr & ATTR_DESCR_MASK) == L2_BLOCK) { - /* TODO: Add pmap_remove_l2 */ - if (pmap_demote_l2_locked(pmap, l2, sva & ~L2_OFFSET, - &lock) == NULL) + if (sva + L2_SIZE == va_next && eva >= va_next) { + pmap_remove_l2(pmap, l2, sva, pmap_load(l1), + &free, &lock); continue; + } else if (pmap_demote_l2_locked(pmap, l2, + sva &~L2_OFFSET, &lock) == NULL) + continue; l3_paddr = pmap_load(l2); } @@ -2474,7 +2529,7 @@ retry: */ if (pmap_page_dirty(tpte)) vm_page_dirty(m); - pmap_unuse_l3(pmap, pv->pv_va, tpde, &free); + pmap_unuse_pt(pmap, pv->pv_va, tpde, &free); TAILQ_REMOVE(&m->md.pv_list, pv, pv_next); m->md.pv_gen++; free_pv_entry(pmap, pv); @@ -3664,7 +3719,7 @@ pmap_remove_pages(pmap_t pmap) } break; } - pmap_unuse_l3(pmap, pv->pv_va, pmap_load(pde), + pmap_unuse_pt(pmap, pv->pv_va, pmap_load(pde), &free); freed++; } From owner-svn-src-head@freebsd.org Sun Jul 2 09:30:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98C70DA1925 for ; Sun, 2 Jul 2017 09:30:36 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-15.reflexion.net [208.70.210.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50B2F11FD for ; Sun, 2 Jul 2017 09:30:35 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 17418 invoked from network); 2 Jul 2017 09:34:51 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 2 Jul 2017 09:34:51 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.40.1) with SMTP; Sun, 02 Jul 2017 05:30:34 -0400 (EDT) Received: (qmail 14382 invoked from network); 2 Jul 2017 09:30:34 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 2 Jul 2017 09:30:34 -0000 Received: from [192.168.1.114] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id B38ABEC7C08; Sun, 2 Jul 2017 02:30:33 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: BROKEN: svn commit: r320528 - in head/sys: amd64/include arm/arm arm/include arm64/arm64 arm64/include dev/aac dev/aacraid dev/bnxt dev/cxgb dev/cxgb/ulp/iw_cxgb dev/hyperv/storvsc dev/mfi dev/tsec dev/xdm... Date: Sun, 2 Jul 2017 02:30:33 -0700 References: <6991DEC2-6E7B-40A3-B384-D5BC19E2A2F5@dsl-only.net> <6FC21EFE-2873-4EE4-81C7-DD9CEAD036B5@dsl-only.net> To: Bryan Drewery , jah@FreeBSD.org, svn-src-head@freebsd.org, FreeBSD Current In-Reply-To: <6FC21EFE-2873-4EE4-81C7-DD9CEAD036B5@dsl-only.net> Message-Id: <0A511C6E-A688-43AF-9D6D-FE79B2A79831@dsl-only.net> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 09:30:36 -0000 [On second thought: the build should not be depending on /usr/include/machine/* . And using installworld to indirectly update /usr/include/machine/* did not fix the problem by itself. I still had to also delete /usr/obj/amd64_clang/amd64.amd64/usr/src/sys/* in order for buildkernel to work.] On 2017-Jul-2, at 1:51 AM, Mark Millard wrote: > [Turns out META_MODE did not update /usr/include/machine/* .] >=20 > On 2017-Jul-2, at 12:43 AM, Mark Millard = wrote: >=20 >> I attempted to jump from head -r320482 to -r320570 for amd64 >> but the kernel build fails with massive numbers of things like: >>=20 >>=20 >> I'll note that, for example, aac_disk.o was rebuilt: >>=20 >> --- all_subdir_aac --- >> Building = /usr/obj/amd64_clang/amd64.amd64/usr/src/sys/GENERIC-NODBG/modules/usr/src= /sys/modules/aac/aac_disk.o >>=20 >> before the below happened. >>=20 >>=20 >> --- kernel.full --- >> aac_disk.o: In function `aac_disk_dump': >> /usr/src/sys/dev/aac/aac_disk.c:253: undefined reference to = `bus_dmamap_create' >> /usr/src/sys/dev/aac/aac_disk.c:301: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/aac/aac_disk.c:314: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/aac/aac_disk.c:317: undefined reference to = `_bus_dmamap_unload' >> adv_pci.o: In function `adv_pci_attach': >> /usr/src/sys/dev/advansys/adv_pci.c:225: undefined reference to = `bus_dmamem_alloc' >> . . . >> --- kernel.full --- >> advansys.o: In function `adv_destroy_ccb_info': >> /usr/src/sys/dev/advansys/advansys.c:596: undefined reference to = `bus_dmamap_destroy' >> advansys.o: In function `adv_free': >> /usr/src/sys/dev/advansys/advansys.c:696: undefined reference to = `_bus_dmamap_unload' >> /usr/src/sys/dev/advansys/advansys.c:699: undefined reference to = `bus_dmamem_free' >> advansys.o: In function `adv_done': >> /usr/src/sys/dev/advansys/advansys.c:1093: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/advansys/advansys.c:1094: undefined reference to = `_bus_dmamap_unload' >> advansys.o: In function `adv_attach': >> /usr/src/sys/dev/advansys/advansys.c:1335: undefined reference to = `bus_dmamem_alloc' >> advansys.o: In function `adv_alloc_ccb_info': >> /usr/src/sys/dev/advansys/advansys.c:580: undefined reference to = `bus_dmamap_create' >> advansys.o: In function `adv_execute_ccb': >> /usr/src/sys/dev/advansys/advansys.c:532: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/advansys/advansys.c:545: undefined reference to = `_bus_dmamap_unload' >> /usr/src/sys/dev/advansys/advansys.c:556: undefined reference to = `_bus_dmamap_unload' >> . . . (huge amount omitted) . . . >> --- kernel.full --- >> if_vmx.o: In function `vmxnet3_alloc_txq_data': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1243: undefined reference to = `bus_dmamap_create' >> if_vmx.o: In function `vmxnet3_alloc_rxq_data': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1366: undefined reference to = `bus_dmamap_create' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1376: undefined reference to = `bus_dmamap_create' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1366: undefined reference to = `bus_dmamap_create' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1376: undefined reference to = `bus_dmamap_create' >> if_vmx.o: In function `vmxnet3_free_rxq_data': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1412: undefined reference to = `bus_dmamap_destroy' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1420: undefined reference to = `bus_dmamap_destroy' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1412: undefined reference to = `bus_dmamap_destroy' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1420: undefined reference to = `bus_dmamap_destroy' >> if_vmx.o: In function `vmxnet3_free_txq_data': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1276: undefined reference to = `bus_dmamap_destroy' >> if_vmx.o: In function `vmxnet3_txq_unload_mbuf': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2798: undefined reference to = `_bus_dmamap_unload' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2798: undefined reference to = `_bus_dmamap_unload' >> if_vmx.o: In function `vmxnet3_dma_malloc': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3871: undefined reference to = `bus_dmamem_alloc' >> if_vmx.o: In function `vmxnet3_dma_free': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3900: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3902: undefined reference to = `_bus_dmamap_unload' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:3906: undefined reference to = `bus_dmamem_free' >> if_vmx.o: In function `vmxnet3_txstop': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2358: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2360: undefined reference to = `_bus_dmamap_unload' >> if_vmx.o: In function `vmxnet3_rxstop': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2388: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2390: undefined reference to = `_bus_dmamap_unload' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2388: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:2390: undefined reference to = `_bus_dmamap_unload' >> if_vmx.o: In function `vmxnet3_newbuf': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1959: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1960: undefined reference to = `_bus_dmamap_unload' >> if_vmx.o: In function `vmxnet3_txq_eof': >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1866: undefined reference to = `_bus_dmamap_sync' >> /usr/src/sys/dev/vmware/vmxnet3/if_vmx.c:1868: undefined reference to = `_bus_dmamap_unload' >> isci.o: In function `isci_allocate_dma_buffer': >> /usr/src/sys/dev/isci/isci.c:424: undefined reference to = `bus_dmamem_alloc' >> isci_io_request.o: In function `isci_io_request_complete': >=20 >=20 > Looks like this is the result of >=20 > /usr/include/machine/* (such as bus_dma.h ) >=20 > not having been updated appropriately by > META_MODE to match: >=20 > /usr/src/sys/amd64/include/bus_dma.h >=20 >=20 > # diff -u /usr/include/machine/bus_dma.h = /usr/src/sys/amd64/include/bus_dma.h > --- /usr/include/machine/bus_dma.h 2017-03-23 11:14:59.000000000 = -0700 > +++ /usr/src/sys/amd64/include/bus_dma.h 2017-07-01 = 23:58:19.756701000 -0700 > @@ -23,12 +23,12 @@ > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY = OF > * SUCH DAMAGE. > * > - * $FreeBSD: head/sys/amd64/include/bus_dma.h 148275 2005-07-22 = 04:03:25Z obrien $ > + * $FreeBSD: head/sys/amd64/include/bus_dma.h 320528 2017-07-01 = 05:35:29Z jah $ > */ >=20 > #ifndef _AMD64_BUS_DMA_H_ > #define _AMD64_BUS_DMA_H_ >=20 > -#include > +#include =20 >=20 > #endif /* _AMD64_BUS_DMA_H_ */ >=20 >=20 > # ls -lTt /usr/include/machine/ > total 417 > -r--r--r-- 1 root wheel 7509 Jun 14 00:43:43 2017 vmparam.h > -r--r--r-- 1 root wheel 3390 Jun 14 00:43:43 2017 proc.h > -r--r--r-- 1 root wheel 8687 May 3 02:46:12 2017 pcpu.h > -r--r--r-- 1 root wheel 2661 May 3 02:46:12 2017 counter.h > -r--r--r-- 1 root wheel 22692 May 3 02:46:12 2017 atomic.h > -r--r--r-- 1 root wheel 2935 Apr 15 00:24:33 2017 db_machdep.h > -r--r--r-- 1 root wheel 154 Mar 23 11:14:59 2017 _align.h > -r--r--r-- 1 root wheel 1837 Mar 23 11:14:59 2017 _bus.h > -r--r--r-- 1 root wheel 160 Mar 23 11:14:59 2017 _inttypes.h > -r--r--r-- 1 root wheel 156 Mar 23 11:14:59 2017 _limits.h > -r--r--r-- 1 root wheel 156 Mar 23 11:14:59 2017 _stdint.h > -r--r--r-- 1 root wheel 154 Mar 23 11:14:59 2017 _types.h > . . . Updating /usr/include/machine/* and then buildkernel did not update the likes of: = /usr/obj/amd64_clang/amd64.amd64/usr/src/sys/GENERIC-NODBG/modules/usr/src= /sys/modules/aac/aac_disk.o again so the problem stayed. Then deleting /usr/obj/amd64_clang/amd64.amd64/usr/src/sys/* and doing buildkernel finally did manage to build correctly. Remember that the original buildkernel attempt did rebuild: = /usr/obj/amd64_clang/amd64.amd64/usr/src/sys/GENERIC-NODBG/modules/usr/src= /sys/modules/aac/aac_disk.o but the result was bad for linking it (as an example). It appears that I needed both steps to get a good build: A) Update /usr/include/machine/* . (I did a full installworld.) B) Delete /usr/obj/amd64_clang/amd64.amd64/usr/src/sys/* . [Note: I force the path to have amd64.amd64/ : it is not a cross build.] So there may be two problems: A) An apparent need for /usr/include/machine/* to be up to date. (Unless installworld had other side-effects that contributed.) B) Lack of rebuilding the likes of: = /usr/obj/amd64_clang/amd64.amd64/usr/src/sys/GENERIC-NODBG/modules/usr/src= /sys/modules/aac/aac_disk.o once (A) was dealt with. (But I deleted more than just the long list if failing .o's in order to force rebuilds.) =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Sun Jul 2 13:31:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD0DBDA5BE4; Sun, 2 Jul 2017 13:31:12 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7213D66E99; Sun, 2 Jul 2017 13:31:12 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x22a.google.com with SMTP id m84so45093487ita.0; Sun, 02 Jul 2017 06:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=V2+1xe9jL7MFgQLQgkYCZyrKqIZo7vfAcdgahrEqtVY=; b=EUT8YWS+fwbo7ee7cjyyH8358BUfwvlKTZ5tlsK4A+vYlZFBz+hGBZDekQDxLCOset AqXf6EC4UX/uNotI9YylPPKTJ60RYK55+jTmxzyofq9CE8sQ9FvMw8f07dL6kxWZNPcp ZsjSPReyn76L5DGGiaSv6p98fbJ3FcWh/rNeRJ/RSXPuiTeAlqpvRsVVOrFBVq69UyIB KTT2aIVIXooU1txThjQzu11dQnfd+T2Jm3VrjjXW8Dux8QpcKVtcxb39a6BiowB+TC6K QUm4UR69mBY1lUAvxQHYnzT1Fcnmbx/cxq04dwL/Hj6FwuMIOwhmjJi79Pa4VUOcI7fg Mm9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=V2+1xe9jL7MFgQLQgkYCZyrKqIZo7vfAcdgahrEqtVY=; b=hOfdwZcSfsbf2Aw/qE/Q0UzwUgFiNLGW+s3Ts+PQ9eY/umrT7OM+hdT8OYeVVeSxj9 /9/757/dFqEPGFn5z2VwTJgXxrvCeekHiEWd6o+oDVqqbwCfsuCsJnGDrz7J8R0oEAsx J6uGyF4OaAwS9amdbS9KnuS4fEHTJB/lR9dBPBjxQ4zb5JC+mrruPLFuNL4KePzCdnKU /HUgfYU4NyQt3q6lWlMTTzVOd0SJJ29UAS2/NsIwd5VHZJcHQsHBmNZcMJUn0eL48/PR ET+BiIyryfdKD7Q3OZwswJFAlpvTN5DgbTY8PVBtGEl0mlp5jEWKGPka5w+qSY0XlcMt pgBA== X-Gm-Message-State: AIVw1124HtpIxDXtB1NUOJZKDgWficXpLEQzYC0dKdAC9KFO6ZkssHRy V48pu2n07Rc9hRDWDezo60vNvMGy2BV4NMk= X-Received: by 10.36.10.16 with SMTP id 16mr4503624itw.7.1499002271568; Sun, 02 Jul 2017 06:31:11 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.10.85 with HTTP; Sun, 2 Jul 2017 06:30:51 -0700 (PDT) In-Reply-To: <201706211820.v5LIKHo5061797@repo.freebsd.org> References: <201706211820.v5LIKHo5061797@repo.freebsd.org> From: Ed Maste Date: Sun, 2 Jul 2017 09:30:51 -0400 X-Google-Sender-Auth: 3ZG02nyxRIyUbjEqfKQgUxbUINE Message-ID: Subject: Re: svn commit: r320196 - in head/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core dev/mlx5/mlx5_core To: Mark Johnston Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 13:31:12 -0000 On 21 June 2017 at 14:20, Mark Johnston wrote: > Author: markj > Date: Wed Jun 21 18:20:17 2017 > New Revision: 320196 > URL: https://svnweb.freebsd.org/changeset/base/320196 > > Log: > Update io-mapping.h in the LinuxKPI. sparc64 LINT kernel is failing with: In file included from /scratch/tmp/emaste/freebsd/sys/dev/mlx5/mlx5_core/mlx5_main.c:36: /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io-mapping.h: In function 'io_mapping_init_wc': /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io-mapping.h:57: error: 'VM_MEMATTR_WRITE_COMBINING' undeclared (first use in this function) /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io-mapping.h:57: error: (Each undeclared identifier is reported only once /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io-mapping.h:57: error: for each function it appears in.) *** [mlx5_main.o] Error code 1 From owner-svn-src-head@freebsd.org Sun Jul 2 13:39:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E01ADA5EAB; Sun, 2 Jul 2017 13:39:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CA2F67426; Sun, 2 Jul 2017 13:39:06 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 7F49C25D37C2; Sun, 2 Jul 2017 13:39:03 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 668C5D1F7FE; Sun, 2 Jul 2017 13:39:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id JQUoVkgwaY5B; Sun, 2 Jul 2017 13:38:56 +0000 (UTC) Received: from [10.9.29.255] (unknown [IPv6:fde9:577b:c1a9:f001::2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 0E640D1F7DF; Sun, 2 Jul 2017 13:38:52 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Ed Maste" Cc: "Mark Johnston" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r320196 - in head/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core dev/mlx5/mlx5_core Date: Sun, 02 Jul 2017 13:38:49 +0000 Message-ID: <17A8C598-54C2-4794-96D0-9A4D980B1934@lists.zabbadoz.net> In-Reply-To: References: <201706211820.v5LIKHo5061797@repo.freebsd.org> MIME-Version: 1.0 X-Mailer: MailMate (2.0BETAr6086) Content-Type: text/plain; format=flowed; markup=markdown Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 13:39:07 -0000 On 2 Jul 2017, at 13:30, Ed Maste wrote: > On 21 June 2017 at 14:20, Mark Johnston wrote: >> Author: markj >> Date: Wed Jun 21 18:20:17 2017 >> New Revision: 320196 >> URL: https://svnweb.freebsd.org/changeset/base/320196 >> >> Log: >> Update io-mapping.h in the LinuxKPI. > > sparc64 LINT kernel is failing with: > > In file included from > /scratch/tmp/emaste/freebsd/sys/dev/mlx5/mlx5_core/mlx5_main.c:36: > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io= -mapping.h: > In function 'io_mapping_init_wc': > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io= -mapping.h:57: > error: 'VM_MEMATTR_WRITE_COMBINING' undeclared (first use in this > function) > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io= -mapping.h:57: > error: (Each undeclared identifier is reported only once > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io= -mapping.h:57: > error: for each function it appears in.) > *** [mlx5_main.o] Error code 1 and so is arm.LINT: 21 1 warning generated. 22 In file included from = /tank/users/bz/head.svn/sys/dev/mlx5/mlx5_core/mlx5_main.c:36: 23 = /tank/users/bz/head.svn/sys/compat/linuxkpi/common/include/linux/io-mappi= ng.h:57:18: = error: use of undeclared identifier 'VM_MEMATTR_WRITE_COMBINING' 24 mapping->attr =3D VM_MEMATTR_WRITE_COMBINING; 25 ^ 26 1 error generated. 27 --- mlx5_main.o --- 28 *** [mlx5_main.o] Error code 1 From owner-svn-src-head@freebsd.org Sun Jul 2 14:59:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13546DA784C; Sun, 2 Jul 2017 14:59:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E33B56A916; Sun, 2 Jul 2017 14:59:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v62ExgMv053438; Sun, 2 Jul 2017 14:59:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v62ExgV4053436; Sun, 2 Jul 2017 14:59:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707021459.v62ExgV4053436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 2 Jul 2017 14:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320574 - head/sys/dev/isp X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/isp X-SVN-Commit-Revision: 320574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 14:59:43 -0000 Author: mav Date: Sun Jul 2 14:59:41 2017 New Revision: 320574 URL: https://svnweb.freebsd.org/changeset/base/320574 Log: Slightly unify SNS requests for post- and pre-24xx. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Jul 2 11:48:07 2017 (r320573) +++ head/sys/dev/isp/isp.c Sun Jul 2 14:59:41 2017 (r320574) @@ -117,13 +117,11 @@ static uint64_t isp_get_wwn(ispsoftc_t *, int, int, in static int isp_fclink_test(ispsoftc_t *, int, int); static int isp_pdb_sync(ispsoftc_t *, int); static int isp_scan_loop(ispsoftc_t *, int); -static int isp_gid_ft_sns(ispsoftc_t *, int); -static int isp_gid_ft_ct_passthru(ispsoftc_t *, int); +static int isp_gid_ft(ispsoftc_t *, int); static int isp_scan_fabric(ispsoftc_t *, int); static int isp_login_device(ispsoftc_t *, int, uint32_t, isp_pdb_t *, uint16_t *); static int isp_send_change_request(ispsoftc_t *, int); static int isp_register_fc4_type(ispsoftc_t *, int); -static int isp_register_fc4_type_24xx(ispsoftc_t *, int); static int isp_register_fc4_features_24xx(ispsoftc_t *, int); static int isp_register_port_name_24xx(ispsoftc_t *, int); static int isp_register_node_name_24xx(ispsoftc_t *, int); @@ -3042,7 +3040,7 @@ isp_fclink_test(ispsoftc_t *isp, int chan, int usdelay if (IS_24XX(isp)) { fcp->isp_fabric_params = mbs.param[7]; fcp->isp_sns_hdl = NPH_SNS_ID; - r = isp_register_fc4_type_24xx(isp, chan); + r = isp_register_fc4_type(isp, chan); if (fcp->isp_loopstate < LOOP_TESTING_LINK) goto abort; if (r != 0) @@ -3417,40 +3415,17 @@ abort: #define NGENT ((GIDLEN - 16) >> 2) static int -isp_gid_ft_sns(ispsoftc_t *isp, int chan) +isp_ct_sns(ispsoftc_t *isp, int chan, uint32_t cmd_bcnt, uint32_t rsp_bcnt) { - union { - sns_gid_ft_req_t _x; - uint8_t _y[SNS_GID_FT_REQ_SIZE]; - } un; fcparam *fcp = FCPARAM(isp, chan); - sns_gid_ft_req_t *rq = &un._x; - uint8_t *scp = fcp->isp_scratch; mbreg_t mbs; - isp_prt(isp, ISP_LOGDEBUG0, "Chan %d requesting GID_FT via SNS", chan); - if (FC_SCRATCH_ACQUIRE(isp, chan)) { - isp_prt(isp, ISP_LOGERR, sacq); - return (-1); - } + if (isp->isp_dblev & ISP_LOGDEBUG1) + isp_print_bytes(isp, "CT SNS request", cmd_bcnt, fcp->isp_scratch); + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, cmd_bcnt, chan); - ISP_MEMZERO(rq, SNS_GID_FT_REQ_SIZE); - rq->snscb_rblen = GIDLEN >> 1; - rq->snscb_addr[RQRSP_ADDR0015] = DMA_WD0(fcp->isp_scdma); - rq->snscb_addr[RQRSP_ADDR1631] = DMA_WD1(fcp->isp_scdma); - rq->snscb_addr[RQRSP_ADDR3247] = DMA_WD2(fcp->isp_scdma); - rq->snscb_addr[RQRSP_ADDR4863] = DMA_WD3(fcp->isp_scdma); - rq->snscb_sblen = 6; - rq->snscb_cmd = SNS_GID_FT; - rq->snscb_mword_div_2 = NGENT; - rq->snscb_fc4_type = FC4_SCSI; - - isp_put_gid_ft_request(isp, rq, (sns_gid_ft_req_t *)scp); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, SNS_GID_FT_REQ_SIZE, chan); - MBSINIT(&mbs, MBOX_SEND_SNS, MBLOGALL, 10000000); - mbs.param[0] = MBOX_SEND_SNS; - mbs.param[1] = SNS_GID_FT_REQ_SIZE >> 1; + mbs.param[1] = cmd_bcnt >> 1; mbs.param[2] = DMA_WD1(fcp->isp_scdma); mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); @@ -3463,12 +3438,10 @@ isp_gid_ft_sns(ispsoftc_t *isp, int chan) return (-1); } } - MEMORYBARRIER(isp, SYNC_SFORCPU, 0, GIDLEN, chan); + + MEMORYBARRIER(isp, SYNC_SFORCPU, 0, rsp_bcnt, chan); if (isp->isp_dblev & ISP_LOGDEBUG1) - isp_print_bytes(isp, "CT response", GIDLEN, scp); - isp_get_gid_ft_response(isp, (sns_gid_ft_rsp_t *)scp, - (sns_gid_ft_rsp_t *)fcp->isp_scanscratch, NGENT); - FC_SCRATCH_RELEASE(isp, chan); + isp_print_bytes(isp, "CT response", rsp_bcnt, fcp->isp_scratch); return (0); } @@ -3480,6 +3453,9 @@ isp_ct_passthru(ispsoftc_t *isp, int chan, uint32_t cm void *reqp; uint8_t resp[QENTRY_LEN]; + if (isp->isp_dblev & ISP_LOGDEBUG1) + isp_print_bytes(isp, "CT request", cmd_bcnt, fcp->isp_scratch); + /* * Build a Passthrough IOCB in memory. */ @@ -3538,47 +3514,63 @@ isp_ct_passthru(ispsoftc_t *isp, int chan, uint32_t cm return (-1); } + if (isp->isp_dblev & ISP_LOGDEBUG1) + isp_print_bytes(isp, "CT response", rsp_bcnt, fcp->isp_scratch); + return (0); } static int -isp_gid_ft_ct_passthru(ispsoftc_t *isp, int chan) +isp_gid_ft(ispsoftc_t *isp, int chan) { fcparam *fcp = FCPARAM(isp, chan); ct_hdr_t ct; + sns_gid_ft_req_t rq; uint32_t *rp; uint8_t *scp = fcp->isp_scratch; - isp_prt(isp, ISP_LOGDEBUG0, "Chan %d requesting GID_FT via CT", chan); + isp_prt(isp, ISP_LOGDEBUG0, "Chan %d requesting GID_FT", chan); if (FC_SCRATCH_ACQUIRE(isp, chan)) { isp_prt(isp, ISP_LOGERR, sacq); return (-1); } - /* - * Build the CT header and command in memory. - */ - ISP_MEMZERO(&ct, sizeof (ct)); - ct.ct_revision = CT_REVISION; - ct.ct_fcs_type = CT_FC_TYPE_FC; - ct.ct_fcs_subtype = CT_FC_SUBTYPE_NS; - ct.ct_cmd_resp = SNS_GID_FT; - ct.ct_bcnt_resid = (GIDLEN - 16) >> 2; - isp_put_ct_hdr(isp, &ct, (ct_hdr_t *)scp); - rp = (uint32_t *) &scp[sizeof(ct)]; - ISP_IOZPUT_32(isp, FC4_SCSI, rp); - if (isp->isp_dblev & ISP_LOGDEBUG1) { - isp_print_bytes(isp, "CT request", - sizeof(ct) + sizeof(uint32_t), scp); - } + if (IS_24XX(isp)) { + /* Build the CT command and execute via pass-through. */ + ISP_MEMZERO(&ct, sizeof (ct)); + ct.ct_revision = CT_REVISION; + ct.ct_fcs_type = CT_FC_TYPE_FC; + ct.ct_fcs_subtype = CT_FC_SUBTYPE_NS; + ct.ct_cmd_resp = SNS_GID_FT; + ct.ct_bcnt_resid = (GIDLEN - 16) >> 2; + isp_put_ct_hdr(isp, &ct, (ct_hdr_t *)scp); + rp = (uint32_t *) &scp[sizeof(ct)]; + ISP_IOZPUT_32(isp, FC4_SCSI, rp); - if (isp_ct_passthru(isp, chan, sizeof(ct) + sizeof(uint32_t), GIDLEN)) { - FC_SCRATCH_RELEASE(isp, chan); - return (-1); + if (isp_ct_passthru(isp, chan, sizeof(ct) + sizeof(uint32_t), GIDLEN)) { + FC_SCRATCH_RELEASE(isp, chan); + return (-1); + } + } else { + /* Build the SNS request and execute via firmware. */ + ISP_MEMZERO(&rq, SNS_GID_FT_REQ_SIZE); + rq.snscb_rblen = GIDLEN >> 1; + rq.snscb_addr[RQRSP_ADDR0015] = DMA_WD0(fcp->isp_scdma); + rq.snscb_addr[RQRSP_ADDR1631] = DMA_WD1(fcp->isp_scdma); + rq.snscb_addr[RQRSP_ADDR3247] = DMA_WD2(fcp->isp_scdma); + rq.snscb_addr[RQRSP_ADDR4863] = DMA_WD3(fcp->isp_scdma); + rq.snscb_sblen = 6; + rq.snscb_cmd = SNS_GID_FT; + rq.snscb_mword_div_2 = NGENT; + rq.snscb_fc4_type = FC4_SCSI; + isp_put_gid_ft_request(isp, &rq, (sns_gid_ft_req_t *)scp); + + if (isp_ct_sns(isp, chan, sizeof(rq), NGENT)) { + FC_SCRATCH_RELEASE(isp, chan); + return (-1); + } } - if (isp->isp_dblev & ISP_LOGDEBUG1) - isp_print_bytes(isp, "CT response", GIDLEN, scp); isp_get_gid_ft_response(isp, (sns_gid_ft_rsp_t *)scp, (sns_gid_ft_rsp_t *)fcp->isp_scanscratch, NGENT); FC_SCRATCH_RELEASE(isp, chan); @@ -3635,10 +3627,7 @@ fail: } /* Get list of port IDs from SNS. */ - if (IS_24XX(isp)) - r = isp_gid_ft_ct_passthru(isp, chan); - else - r = isp_gid_ft_sns(isp, chan); + r = isp_gid_ft(isp, chan); if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) goto abort; if (r > 0) { @@ -3918,50 +3907,10 @@ static int isp_register_fc4_type(ispsoftc_t *isp, int chan) { fcparam *fcp = FCPARAM(isp, chan); + rft_id_t rp; + ct_hdr_t *ct = &rp.rftid_hdr; uint8_t local[SNS_RFT_ID_REQ_SIZE]; sns_screq_t *reqp = (sns_screq_t *) local; - mbreg_t mbs; - - ISP_MEMZERO((void *) reqp, SNS_RFT_ID_REQ_SIZE); - reqp->snscb_rblen = SNS_RFT_ID_RESP_SIZE >> 1; - reqp->snscb_addr[RQRSP_ADDR0015] = DMA_WD0(fcp->isp_scdma + 0x100); - reqp->snscb_addr[RQRSP_ADDR1631] = DMA_WD1(fcp->isp_scdma + 0x100); - reqp->snscb_addr[RQRSP_ADDR3247] = DMA_WD2(fcp->isp_scdma + 0x100); - reqp->snscb_addr[RQRSP_ADDR4863] = DMA_WD3(fcp->isp_scdma + 0x100); - reqp->snscb_sblen = 22; - reqp->snscb_data[0] = SNS_RFT_ID; - reqp->snscb_data[4] = fcp->isp_portid & 0xffff; - reqp->snscb_data[5] = (fcp->isp_portid >> 16) & 0xff; - reqp->snscb_data[6] = (1 << FC4_SCSI); - if (FC_SCRATCH_ACQUIRE(isp, chan)) { - isp_prt(isp, ISP_LOGERR, sacq); - return (-1); - } - isp_put_sns_request(isp, reqp, (sns_screq_t *) fcp->isp_scratch); - MBSINIT(&mbs, MBOX_SEND_SNS, MBLOGALL, 1000000); - mbs.param[1] = SNS_RFT_ID_REQ_SIZE >> 1; - mbs.param[2] = DMA_WD1(fcp->isp_scdma); - mbs.param[3] = DMA_WD0(fcp->isp_scdma); - mbs.param[6] = DMA_WD3(fcp->isp_scdma); - mbs.param[7] = DMA_WD2(fcp->isp_scdma); - MEMORYBARRIER(isp, SYNC_SFORDEV, 0, SNS_RFT_ID_REQ_SIZE, chan); - isp_mboxcmd(isp, &mbs); - FC_SCRATCH_RELEASE(isp, chan); - if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { - return (0); - } else { - isp_prt(isp, ISP_LOGWARN, "Chan %d Register FC4 Type: 0x%x", - chan, mbs.param[0]); - return (-1); - } -} - -static int -isp_register_fc4_type_24xx(ispsoftc_t *isp, int chan) -{ - fcparam *fcp = FCPARAM(isp, chan); - ct_hdr_t *ct; - rft_id_t rp; uint8_t *scp = fcp->isp_scratch; if (FC_SCRATCH_ACQUIRE(isp, chan)) { @@ -3969,27 +3918,43 @@ isp_register_fc4_type_24xx(ispsoftc_t *isp, int chan) return (-1); } - /* - * Build the CT header and command in memory. - */ - ISP_MEMZERO(&rp, sizeof(rp)); - ct = &rp.rftid_hdr; - ct->ct_revision = CT_REVISION; - ct->ct_fcs_type = CT_FC_TYPE_FC; - ct->ct_fcs_subtype = CT_FC_SUBTYPE_NS; - ct->ct_cmd_resp = SNS_RFT_ID; - ct->ct_bcnt_resid = (sizeof (rft_id_t) - sizeof (ct_hdr_t)) >> 2; - rp.rftid_portid[0] = fcp->isp_portid >> 16; - rp.rftid_portid[1] = fcp->isp_portid >> 8; - rp.rftid_portid[2] = fcp->isp_portid; - rp.rftid_fc4types[FC4_SCSI >> 5] = 1 << (FC4_SCSI & 0x1f); - isp_put_rft_id(isp, &rp, (rft_id_t *)scp); - if (isp->isp_dblev & ISP_LOGDEBUG1) - isp_print_bytes(isp, "CT request", sizeof(rft_id_t), scp); + if (IS_24XX(isp)) { + /* Build the CT command and execute via pass-through. */ + ISP_MEMZERO(&rp, sizeof(rp)); + ct->ct_revision = CT_REVISION; + ct->ct_fcs_type = CT_FC_TYPE_FC; + ct->ct_fcs_subtype = CT_FC_SUBTYPE_NS; + ct->ct_cmd_resp = SNS_RFT_ID; + ct->ct_bcnt_resid = (sizeof (rft_id_t) - sizeof (ct_hdr_t)) >> 2; + rp.rftid_portid[0] = fcp->isp_portid >> 16; + rp.rftid_portid[1] = fcp->isp_portid >> 8; + rp.rftid_portid[2] = fcp->isp_portid; + rp.rftid_fc4types[FC4_SCSI >> 5] = 1 << (FC4_SCSI & 0x1f); + isp_put_rft_id(isp, &rp, (rft_id_t *)scp); - if (isp_ct_passthru(isp, chan, sizeof(rft_id_t), sizeof(ct_hdr_t))) { - FC_SCRATCH_RELEASE(isp, chan); - return (-1); + if (isp_ct_passthru(isp, chan, sizeof(rft_id_t), sizeof(ct_hdr_t))) { + FC_SCRATCH_RELEASE(isp, chan); + return (-1); + } + } else { + /* Build the SNS request and execute via firmware. */ + ISP_MEMZERO((void *) reqp, SNS_RFT_ID_REQ_SIZE); + reqp->snscb_rblen = sizeof (ct_hdr_t) >> 1; + reqp->snscb_addr[RQRSP_ADDR0015] = DMA_WD0(fcp->isp_scdma); + reqp->snscb_addr[RQRSP_ADDR1631] = DMA_WD1(fcp->isp_scdma); + reqp->snscb_addr[RQRSP_ADDR3247] = DMA_WD2(fcp->isp_scdma); + reqp->snscb_addr[RQRSP_ADDR4863] = DMA_WD3(fcp->isp_scdma); + reqp->snscb_sblen = 22; + reqp->snscb_data[0] = SNS_RFT_ID; + reqp->snscb_data[4] = fcp->isp_portid & 0xffff; + reqp->snscb_data[5] = (fcp->isp_portid >> 16) & 0xff; + reqp->snscb_data[6] = (1 << FC4_SCSI); + isp_put_sns_request(isp, reqp, (sns_screq_t *)scp); + + if (isp_ct_sns(isp, chan, SNS_RFT_ID_REQ_SIZE, sizeof(ct_hdr_t))) { + FC_SCRATCH_RELEASE(isp, chan); + return (-1); + } } isp_get_ct_hdr(isp, (ct_hdr_t *) scp, ct); @@ -4105,8 +4070,6 @@ isp_register_port_name_24xx(ispsoftc_t *isp, int chan) len += rp.rspnid_length; ct->ct_bcnt_resid = (len - sizeof(ct_hdr_t)) >> 2; isp_put_rspn_id(isp, &rp, (rspn_id_t *)scp); - if (isp->isp_dblev & ISP_LOGDEBUG1) - isp_print_bytes(isp, "CT request", len, scp); if (isp_ct_passthru(isp, chan, len, sizeof(ct_hdr_t))) { FC_SCRATCH_RELEASE(isp, chan); @@ -4163,8 +4126,6 @@ isp_register_node_name_24xx(ispsoftc_t *isp, int chan) len += rp.rsnnnn_length; ct->ct_bcnt_resid = (len - sizeof(ct_hdr_t)) >> 2; isp_put_rsnn_nn(isp, &rp, (rsnn_nn_t *)scp); - if (isp->isp_dblev & ISP_LOGDEBUG1) - isp_print_bytes(isp, "CT request", len, scp); if (isp_ct_passthru(isp, chan, len, sizeof(ct_hdr_t))) { FC_SCRATCH_RELEASE(isp, chan); Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Sun Jul 2 11:48:07 2017 (r320573) +++ head/sys/dev/isp/ispmbox.h Sun Jul 2 14:59:41 2017 (r320574) @@ -1553,6 +1553,7 @@ typedef struct { #define SNS_GNN_ID 0x113 #define SNS_GFF_ID 0x11F #define SNS_GID_FT 0x171 +#define SNS_GID_PT 0x1A1 #define SNS_RFT_ID 0x217 #define SNS_RSPN_ID 0x218 #define SNS_RFF_ID 0x21F @@ -1667,7 +1668,6 @@ typedef struct { } snscb_ports[1]; } sns_gid_ft_rsp_t; #define SNS_GID_FT_RESP_SIZE(x) ((sizeof (sns_gid_ft_rsp_t)) + ((x - 1) << 2)) -#define SNS_RFT_ID_RESP_SIZE (sizeof (ct_hdr_t)) /* * Other Misc Structures From owner-svn-src-head@freebsd.org Sun Jul 2 15:08:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94F85DA7AA5; Sun, 2 Jul 2017 15:08:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 579DD6AD36; Sun, 2 Jul 2017 15:08:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v62F8WLE057545; Sun, 2 Jul 2017 15:08:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v62F8WPL057544; Sun, 2 Jul 2017 15:08:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707021508.v62F8WPL057544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 2 Jul 2017 15:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320575 - head/sys/dev/isp X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/isp X-SVN-Commit-Revision: 320575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 15:08:33 -0000 Author: mav Date: Sun Jul 2 15:08:32 2017 New Revision: 320575 URL: https://svnweb.freebsd.org/changeset/base/320575 Log: Move comment respecting previous commit. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Jul 2 14:59:41 2017 (r320574) +++ head/sys/dev/isp/isp.c Sun Jul 2 15:08:32 2017 (r320575) @@ -3401,19 +3401,6 @@ abort: return (0); } -/* - * Scan the fabric for devices and add them to our port database. - * - * Use the GID_FT command to get all Port IDs for FC4 SCSI devices it knows. - * - * For 2100-23XX cards, we use the SNS mailbox command to pass simple name - * server commands to the switch management server via the QLogic f/w. - * - * For the 24XX and above card, we use CT Pass-through IOCB. - */ -#define GIDLEN ISP_FC_SCRLEN -#define NGENT ((GIDLEN - 16) >> 2) - static int isp_ct_sns(ispsoftc_t *isp, int chan, uint32_t cmd_bcnt, uint32_t rsp_bcnt) { @@ -3519,6 +3506,19 @@ isp_ct_passthru(ispsoftc_t *isp, int chan, uint32_t cm return (0); } + +/* + * Scan the fabric for devices and add them to our port database. + * + * Use the GID_FT command to get all Port IDs for FC4 SCSI devices it knows. + * + * For 2100-23XX cards, we use the SNS mailbox command to pass simple name + * server commands to the switch management server via the QLogic f/w. + * + * For the 24XX and above card, we use CT Pass-through IOCB. + */ +#define GIDLEN ISP_FC_SCRLEN +#define NGENT ((GIDLEN - 16) >> 2) static int isp_gid_ft(ispsoftc_t *isp, int chan) From owner-svn-src-head@freebsd.org Sun Jul 2 16:20:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C116DA8B23; Sun, 2 Jul 2017 16:20:51 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDC456FB56; Sun, 2 Jul 2017 16:20:50 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v62GKoMT087417; Sun, 2 Jul 2017 16:20:50 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v62GKoak087416; Sun, 2 Jul 2017 16:20:50 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201707021620.v62GKoak087416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 2 Jul 2017 16:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320576 - head/usr.sbin/diskinfo X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/diskinfo X-SVN-Commit-Revision: 320576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 16:20:51 -0000 Author: allanjude Date: Sun Jul 2 16:20:49 2017 New Revision: 320576 URL: https://svnweb.freebsd.org/changeset/base/320576 Log: diskinfo(8): correct typo in man page Reported by: N.J. Mann Modified: head/usr.sbin/diskinfo/diskinfo.8 Modified: head/usr.sbin/diskinfo/diskinfo.8 ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.8 Sun Jul 2 15:08:32 2017 (r320575) +++ head/usr.sbin/diskinfo/diskinfo.8 Sun Jul 2 16:20:49 2017 (r320576) @@ -61,7 +61,7 @@ Perform a simple IOPS benchmark. .It Fl p Return the physical path of the disk. This is a string that identifies the physical path to the disk in the -storage enclsoure. +storage enclosure. .It Fl s Return the disk serial number .It Fl t @@ -79,7 +79,7 @@ Return the disk ident, usually the serial number. .It Fl p Return the physical path of the disk. This is a string that identifies the physical path to the disk in the -storage enclsoure. +storage enclosure. .El .Sh HISTORY The From owner-svn-src-head@freebsd.org Sun Jul 2 19:13:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21225DAB736; Sun, 2 Jul 2017 19:13:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E049C73E80; Sun, 2 Jul 2017 19:13:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v62JD1Un060029; Sun, 2 Jul 2017 19:13:01 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v62JD1fh060028; Sun, 2 Jul 2017 19:13:01 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201707021913.v62JD1fh060028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 2 Jul 2017 19:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320577 - head/sys/dev/sdhci X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/sdhci X-SVN-Commit-Revision: 320577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 19:13:03 -0000 Author: marius Date: Sun Jul 2 19:13:01 2017 New Revision: 320577 URL: https://svnweb.freebsd.org/changeset/base/320577 Log: Retry up to 20 ms to enable bus power as at least with some Intel SDHCI/eMMC controllers the first attempt after a D3 to D0 transition, i. e. when the firmware has put the devices into D3 state before, can fail. Modified: head/sys/dev/sdhci/sdhci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sun Jul 2 16:20:49 2017 (r320576) +++ head/sys/dev/sdhci/sdhci.c Sun Jul 2 19:13:01 2017 (r320577) @@ -366,6 +366,7 @@ sdhci_set_clock(struct sdhci_slot *slot, uint32_t cloc static void sdhci_set_power(struct sdhci_slot *slot, u_char power) { + int i; uint8_t pwr; if (slot->power == power) @@ -394,9 +395,20 @@ sdhci_set_power(struct sdhci_slot *slot, u_char power) break; } WR1(slot, SDHCI_POWER_CONTROL, pwr); - /* Turn on the power. */ + /* + * Turn on VDD1 power. Note that at least some Intel controllers can + * fail to enable bus power on the first try after transiting from D3 + * to D0, so we give them up to 20 ms. + */ pwr |= SDHCI_POWER_ON; - WR1(slot, SDHCI_POWER_CONTROL, pwr); + for (i = 0; i < 20; i++) { + WR1(slot, SDHCI_POWER_CONTROL, pwr); + if (RD1(slot, SDHCI_POWER_CONTROL) & SDHCI_POWER_ON) + break; + DELAY(100); + } + if (!(RD1(slot, SDHCI_POWER_CONTROL) & SDHCI_POWER_ON)) + slot_printf(slot, "Bus power failed to enable"); if (slot->quirks & SDHCI_QUIRK_INTEL_POWER_UP_RESET) { WR1(slot, SDHCI_POWER_CONTROL, pwr | 0x10); From owner-svn-src-head@freebsd.org Sun Jul 2 20:47:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD06CDACB55; Sun, 2 Jul 2017 20:47:26 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 932E775EBC; Sun, 2 Jul 2017 20:47:26 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v62KlPoQ096584; Sun, 2 Jul 2017 20:47:25 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v62KlPq5096582; Sun, 2 Jul 2017 20:47:25 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201707022047.v62KlPq5096582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 2 Jul 2017 20:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320578 - head/sys/fs/ext2fs X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/sys/fs/ext2fs X-SVN-Commit-Revision: 320578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 20:47:26 -0000 Author: pfg Date: Sun Jul 2 20:47:25 2017 New Revision: 320578 URL: https://svnweb.freebsd.org/changeset/base/320578 Log: ext2fs: be more verbose about unsupported ext2fs features. It is useful to know exactly what features may be lacking when trying to mount ext4 filesystems. Submitted by: Fedor Uporov Differential Revision: https://reviews.freebsd.org/D11208 Modified: head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2fs.h Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Sun Jul 2 19:13:01 2017 (r320577) +++ head/sys/fs/ext2fs/ext2_vfsops.c Sun Jul 2 20:47:25 2017 (r320578) @@ -279,6 +279,7 @@ ext2_mount(struct mount *mp) static int ext2_check_sb_compat(struct ext2fs *es, struct cdev *dev, int ronly) { + uint32_t i, mask; if (es->e2fs_magic != E2FS_MAGIC) { printf("ext2fs: %s: wrong magic number %#x (expected %#x)\n", @@ -286,17 +287,29 @@ ext2_check_sb_compat(struct ext2fs *es, struct cdev *d return (1); } if (es->e2fs_rev > E2FS_REV0) { - if (es->e2fs_features_incompat & ~(EXT2F_INCOMPAT_SUPP | - EXT4F_RO_INCOMPAT_SUPP)) { - printf( -"WARNING: mount of %s denied due to unsupported optional features\n", - devtoname(dev)); + mask = es->e2fs_features_incompat & ~(EXT2F_INCOMPAT_SUPP | + EXT4F_RO_INCOMPAT_SUPP); + if (mask) { + printf("WARNING: mount of %s denied due to " + "unsupported optional features:\n", devtoname(dev)); + for (i = 0; + i < sizeof(incompat)/sizeof(struct ext2_feature); + i++) + if (mask & incompat[i].mask) + printf("%s ", incompat[i].name); + printf("\n"); return (1); } - if (!ronly && - (es->e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP)) { + mask = es->e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP; + if (!ronly && mask) { printf("WARNING: R/W mount of %s denied due to " - "unsupported optional features\n", devtoname(dev)); + "unsupported optional features:\n", devtoname(dev)); + for (i = 0; + i < sizeof(ro_compat)/sizeof(struct ext2_feature); + i++) + if (mask & ro_compat[i].mask) + printf("%s ", ro_compat[i].name); + printf("\n"); return (1); } } Modified: head/sys/fs/ext2fs/ext2fs.h ============================================================================== --- head/sys/fs/ext2fs/ext2fs.h Sun Jul 2 19:13:01 2017 (r320577) +++ head/sys/fs/ext2fs/ext2fs.h Sun Jul 2 20:47:25 2017 (r320578) @@ -203,10 +203,13 @@ struct csum { * compatible/incompatible features */ #define EXT2F_COMPAT_PREALLOC 0x0001 +#define EXT2F_COMPAT_IMAGIC_INODES 0x0002 #define EXT2F_COMPAT_HASJOURNAL 0x0004 #define EXT2F_COMPAT_EXT_ATTR 0x0008 #define EXT2F_COMPAT_RESIZE 0x0010 #define EXT2F_COMPAT_DIRHASHINDEX 0x0020 +#define EXT2F_COMPAT_LAZY_BG 0x0040 +#define EXT2F_COMPAT_EXCLUDE_BITMAP 0x0100 #define EXT2F_COMPAT_SPARSESUPER2 0x0200 #define EXT2F_ROCOMPAT_SPARSESUPER 0x0001 @@ -216,15 +219,18 @@ struct csum { #define EXT2F_ROCOMPAT_GDT_CSUM 0x0010 #define EXT2F_ROCOMPAT_DIR_NLINK 0x0020 #define EXT2F_ROCOMPAT_EXTRA_ISIZE 0x0040 +#define EXT2F_ROCOMPAT_HAS_SNAPSHOT 0x0080 #define EXT2F_ROCOMPAT_QUOTA 0x0100 #define EXT2F_ROCOMPAT_BIGALLOC 0x0200 #define EXT2F_ROCOMPAT_METADATA_CKSUM 0x0400 +#define EXT2F_ROCOMPAT_REPLICA 0x0800 #define EXT2F_ROCOMPAT_READONLY 0x1000 #define EXT2F_ROCOMPAT_PROJECT 0x2000 #define EXT2F_INCOMPAT_COMP 0x0001 #define EXT2F_INCOMPAT_FTYPE 0x0002 #define EXT2F_INCOMPAT_RECOVER 0x0004 +#define EXT2F_INCOMPAT_JOURNAL_DEV 0x0008 #define EXT2F_INCOMPAT_META_BG 0x0010 #define EXT2F_INCOMPAT_EXTENTS 0x0040 #define EXT2F_INCOMPAT_64BIT 0x0080 @@ -236,6 +242,58 @@ struct csum { #define EXT2F_INCOMPAT_LARGEDIR 0x4000 #define EXT2F_INCOMPAT_INLINE_DATA 0x8000 #define EXT2F_INCOMPAT_ENCRYPT 0x10000 + +struct ext2_feature +{ + int mask; + const char *name; +}; + +static const struct ext2_feature compat[] = { + { EXT2F_COMPAT_PREALLOC, "dir_prealloc" }, + { EXT2F_COMPAT_IMAGIC_INODES, "imagic_inodes" }, + { EXT2F_COMPAT_HASJOURNAL, "has_journal" }, + { EXT2F_COMPAT_EXT_ATTR, "ext_attr" }, + { EXT2F_COMPAT_RESIZE, "resize_inode" }, + { EXT2F_COMPAT_DIRHASHINDEX, "dir_index" }, + { EXT2F_COMPAT_EXCLUDE_BITMAP, "snapshot_bitmap" }, + { EXT2F_COMPAT_SPARSESUPER2, "sparse_super2" } +}; + +static const struct ext2_feature ro_compat[] = { + { EXT2F_ROCOMPAT_SPARSESUPER, "sparse_super" }, + { EXT2F_ROCOMPAT_LARGEFILE, "large_file" }, + { EXT2F_ROCOMPAT_BTREE_DIR, "btree_dir" }, + { EXT2F_ROCOMPAT_HUGE_FILE, "huge_file" }, + { EXT2F_ROCOMPAT_GDT_CSUM, "uninit_groups" }, + { EXT2F_ROCOMPAT_DIR_NLINK, "dir_nlink" }, + { EXT2F_ROCOMPAT_EXTRA_ISIZE, "extra_isize" }, + { EXT2F_ROCOMPAT_HAS_SNAPSHOT, "snapshot" }, + { EXT2F_ROCOMPAT_QUOTA, "quota" }, + { EXT2F_ROCOMPAT_BIGALLOC, "bigalloc" }, + { EXT2F_ROCOMPAT_METADATA_CKSUM, "metadata_csum" }, + { EXT2F_ROCOMPAT_REPLICA, "replica" }, + { EXT2F_ROCOMPAT_READONLY, "ro" }, + { EXT2F_ROCOMPAT_PROJECT, "project" } +}; + +static const struct ext2_feature incompat[] = { + { EXT2F_INCOMPAT_COMP, "compression" }, + { EXT2F_INCOMPAT_FTYPE, "filetype" }, + { EXT2F_INCOMPAT_RECOVER, "needs_recovery" }, + { EXT2F_INCOMPAT_JOURNAL_DEV, "journal_dev" }, + { EXT2F_INCOMPAT_META_BG, "meta_bg" }, + { EXT2F_INCOMPAT_EXTENTS, "extents" }, + { EXT2F_INCOMPAT_64BIT, "64bit" }, + { EXT2F_INCOMPAT_MMP, "mmp" }, + { EXT2F_INCOMPAT_FLEX_BG, "flex_bg" }, + { EXT2F_INCOMPAT_EA_INODE, "ea_inode" }, + { EXT2F_INCOMPAT_DIRDATA, "dirdata" }, + { EXT2F_INCOMPAT_CSUM_SEED, "metadata_csum_seed" }, + { EXT2F_INCOMPAT_LARGEDIR, "large_dir" }, + { EXT2F_INCOMPAT_INLINE_DATA, "inline_data" }, + { EXT2F_INCOMPAT_ENCRYPT, "encrypt" } +}; /* * Features supported in this implementation From owner-svn-src-head@freebsd.org Sun Jul 2 21:00:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3566DACF01; Sun, 2 Jul 2017 21:00:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B02B176578; Sun, 2 Jul 2017 21:00:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v62L0UWS001254; Sun, 2 Jul 2017 21:00:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v62L0Ume001253; Sun, 2 Jul 2017 21:00:30 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201707022100.v62L0Ume001253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 2 Jul 2017 21:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320579 - head/usr.bin/patch X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/usr.bin/patch X-SVN-Commit-Revision: 320579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 21:00:32 -0000 Author: pfg Date: Sun Jul 2 21:00:30 2017 New Revision: 320579 URL: https://svnweb.freebsd.org/changeset/base/320579 Log: patch(1): add support for git generated diffs. Sometimes patches coming from other places have extra a/ and b/ directories prepended to filenames. Obtained from: OpenBSD (CVS rev. 1.57, 1.58) Modified: head/usr.bin/patch/pch.c Modified: head/usr.bin/patch/pch.c ============================================================================== --- head/usr.bin/patch/pch.c Sun Jul 2 20:47:25 2017 (r320578) +++ head/usr.bin/patch/pch.c Sun Jul 2 21:00:30 2017 (r320579) @@ -264,6 +264,7 @@ intuit_diff_type(void) char *s, *t; int indent, retval; struct file_name names[MAX_FILE]; + int piece_of_git = 0; memset(names, 0, sizeof(names)); ok_to_create_file = false; @@ -308,14 +309,20 @@ intuit_diff_type(void) if (!stars_last_line && strnEQ(s, "*** ", 4)) names[OLD_FILE].path = fetchname(s + 4, &names[OLD_FILE].exists, strippath); - else if (strnEQ(s, "--- ", 4)) - names[NEW_FILE].path = fetchname(s + 4, + else if (strnEQ(s, "--- ", 4)) { + size_t off = 4; + if (piece_of_git && strippath == 957) + off = 6; + names[NEW_FILE].path = fetchname(s + off, &names[NEW_FILE].exists, strippath); - else if (strnEQ(s, "+++ ", 4)) + } else if (strnEQ(s, "+++ ", 4)) { /* pretend it is the old name */ - names[OLD_FILE].path = fetchname(s + 4, + size_t off = 4; + if (piece_of_git && strippath == 957) + off = 6; + names[OLD_FILE].path = fetchname(s + off, &names[OLD_FILE].exists, strippath); - else if (strnEQ(s, "Index:", 6)) + } else if (strnEQ(s, "Index:", 6)) names[INDEX_FILE].path = fetchname(s + 6, &names[INDEX_FILE].exists, strippath); else if (strnEQ(s, "Prereq:", 7)) { @@ -330,6 +337,9 @@ intuit_diff_type(void) free(revision); revision = NULL; } + } else if (strnEQ(s, "diff --git a/", 13)) { + /* Git-style diffs. */ + piece_of_git = 1; } else if (strnEQ(s, "==== ", 5)) { /* Perforce-style diffs. */ if ((t = strstr(s + 5, " - ")) != NULL) From owner-svn-src-head@freebsd.org Sun Jul 2 21:03:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9E4FDAD69A; Sun, 2 Jul 2017 21:03:55 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7258976F18; Sun, 2 Jul 2017 21:03:55 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x22c.google.com with SMTP id m68so80223763ith.1; Sun, 02 Jul 2017 14:03:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=UCMcCAQMuvfyoCKSfmm9HtMgb84vRdaLxaDnMY5fBfI=; b=as2sD0lL74TTYu9x1hz0emTX4ki4lopxrGtamV17YoasBtt9kJRMxLjUp0lgSyN12M veWkM6SAzSpaHtZKvSakcKwEbG2omZcL0Fen72BC+tuPHUCaVhW4WphIDt/CcLpf7EfO bjZs5SMoQHcNLHstgxXGwPVjjdpeut7Ar6g3LErLY/fZMzj7NICJzcqMHdonWhkNRjXX tsOS6U522hGZuE0RQULWXq0PZA3gg3TX6+Oyu1J8kXyIELc6OpvRa3P9HIBvWzfI7ezv DyMLZltNkIL1j5bMcUfmV8p5EAwn2czh8gI6cBOv88GGc/piqKtGRW3KCU8OMUNOon+p wITw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=UCMcCAQMuvfyoCKSfmm9HtMgb84vRdaLxaDnMY5fBfI=; b=dWVCPY8tmW1nFBu6yfXL1jflnUEgSfL0gxFKgjhtL+OxQwW5+IrkGbXmGcMvNJHUtx ro8gp9L/nCT5cBdLm7V7akgLn9PtzAiwzKbyxbRe6H0pzihfDEAF8QztJ4ktnF3uorA1 ESEDUAABNP10SpTCwdMVhUYhU3OLkABP/QV7gbS7gy/cEi8Rz8uOhUtzDo7wsHpfKxNz lZ1As4z1qdKRdz7eRPsRnoF+w1fm9WXeFjur8HvTzviCmNQaREFOQHp3Ak0Z1dEl1xTt DWOaQdImLh2/OZxM58ayhfndAfbNOrhd0RzH299o7ZGl5iJuxkMTNj0I8y8BvV8GgBif nxJQ== X-Gm-Message-State: AKS2vOx3w8AG3bryFP2Oik6aiEj2XEA17/AzD3envxQuaC1mpSEYEFDO /ArzImP/ilOdo7VIRMvtNlxsSd+Ydy0oEEE= X-Received: by 10.36.43.198 with SMTP id h189mr29853266ita.19.1499029434738; Sun, 02 Jul 2017 14:03:54 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.10.85 with HTTP; Sun, 2 Jul 2017 14:03:34 -0700 (PDT) In-Reply-To: <201706160044.v5G0iNbg063006@repo.freebsd.org> References: <201706160044.v5G0iNbg063006@repo.freebsd.org> From: Ed Maste Date: Sun, 2 Jul 2017 17:03:34 -0400 X-Google-Sender-Auth: KGCmfeZEaks6SXC0LHm3HZ39Ltk Message-ID: Subject: Re: svn commit: r319994 - head/sys/mips/conf To: Adrian Chadd Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 21:03:55 -0000 On 15 June 2017 at 20:44, Adrian Chadd wrote: > Author: adrian > Date: Fri Jun 16 00:44:23 2017 > New Revision: 319994 > URL: https://svnweb.freebsd.org/changeset/base/319994 > > Log: > [ar71xx] migrate all of the duplicate configuration out into a shared config file. After this commit, AR71XX_BASE, QCA953X_BASE, and RSPRO_STANDALONE fail with: --- all_subdir_hwpmc_mips24k --- {standard input}: Assembler messages: {standard input}:168: Error: illegal operands `mtc0 $17,$25,1' {standard input}:203: Error: illegal operands `mtc0 $17,$25,3' {standard input}:311: Error: illegal operands `mfc0 $2,$25,1' {standard input}:348: Error: illegal operands `mfc0 $2,$25,3' *** [hwpmc_mips24k.o] Error code 1 From owner-svn-src-head@freebsd.org Sun Jul 2 21:51:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A6E1DADF52 for ; Sun, 2 Jul 2017 21:51:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1537A78006 for ; Sun, 2 Jul 2017 21:51:32 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 942e0956-5f70-11e7-b2f5-7fbc454a3a22 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 942e0956-5f70-11e7-b2f5-7fbc454a3a22; Sun, 02 Jul 2017 21:51:19 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v62LpIPv006872; Sun, 2 Jul 2017 15:51:18 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1499032278.86861.92.camel@freebsd.org> Subject: Re: svn commit: r320577 - head/sys/dev/sdhci From: Ian Lepore To: Marius Strobl , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 02 Jul 2017 15:51:18 -0600 In-Reply-To: <201707021913.v62JD1fh060028@repo.freebsd.org> References: <201707021913.v62JD1fh060028@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 21:51:33 -0000 On Sun, 2017-07-02 at 19:13 +0000, Marius Strobl wrote: > Author: marius > Date: Sun Jul  2 19:13:01 2017 > New Revision: 320577 > URL: https://svnweb.freebsd.org/changeset/base/320577 > > Log: >   Retry up to 20 ms to enable bus power as at least with some Intel >   SDHCI/eMMC controllers the first attempt after a D3 to D0 > transition, >   i. e. when the firmware has put the devices into D3 state before, >   can fail. > > Modified: >   head/sys/dev/sdhci/sdhci.c > > Modified: head/sys/dev/sdhci/sdhci.c > ===================================================================== > ========= > --- head/sys/dev/sdhci/sdhci.c Sun Jul  2 16:20:49 2017 > (r320576) > +++ head/sys/dev/sdhci/sdhci.c Sun Jul  2 19:13:01 2017 > (r320577) > @@ -366,6 +366,7 @@ sdhci_set_clock(struct sdhci_slot *slot, uint32_t > cloc >  static void >  sdhci_set_power(struct sdhci_slot *slot, u_char power) >  { > + int i; >   uint8_t pwr; >   >   if (slot->power == power) > @@ -394,9 +395,20 @@ sdhci_set_power(struct sdhci_slot *slot, u_char > power) >   break; >   } >   WR1(slot, SDHCI_POWER_CONTROL, pwr); > - /* Turn on the power. */ > + /* > +  * Turn on VDD1 power.  Note that at least some Intel > controllers can > +  * fail to enable bus power on the first try after > transiting from D3 > +  * to D0, so we give them up to 20 ms. > +  */ >   pwr |= SDHCI_POWER_ON; > - WR1(slot, SDHCI_POWER_CONTROL, pwr); > + for (i = 0; i < 20; i++) { > + WR1(slot, SDHCI_POWER_CONTROL, pwr); > + if (RD1(slot, SDHCI_POWER_CONTROL) & SDHCI_POWER_ON) > + break; > + DELAY(100); > + } The comment says 20ms, but the code says 2ms. -- Ian > + if (!(RD1(slot, SDHCI_POWER_CONTROL) & SDHCI_POWER_ON)) > + slot_printf(slot, "Bus power failed to enable"); >   >   if (slot->quirks & SDHCI_QUIRK_INTEL_POWER_UP_RESET) { >   WR1(slot, SDHCI_POWER_CONTROL, pwr | 0x10); > From owner-svn-src-head@freebsd.org Mon Jul 3 00:16:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF2269B2AA1; Mon, 3 Jul 2017 00:16:16 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7045C7B451; Mon, 3 Jul 2017 00:16:15 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v630GElH044007; Sun, 2 Jul 2017 17:16:14 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v630GE3Z044006; Sun, 2 Jul 2017 17:16:14 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201707030016.v630GE3Z044006@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320577 - head/sys/dev/sdhci In-Reply-To: <201707021913.v62JD1fh060028@repo.freebsd.org> To: Marius Strobl Date: Sun, 2 Jul 2017 17:16:14 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 00:16:16 -0000 > Author: marius > Date: Sun Jul 2 19:13:01 2017 > New Revision: 320577 > URL: https://svnweb.freebsd.org/changeset/base/320577 > > Log: > Retry up to 20 ms to enable bus power as at least with some Intel ^^^^^^^ > SDHCI/eMMC controllers the first attempt after a D3 to D0 transition, > i. e. when the firmware has put the devices into D3 state before, > can fail. > > Modified: > head/sys/dev/sdhci/sdhci.c > > Modified: head/sys/dev/sdhci/sdhci.c > ============================================================================== > --- head/sys/dev/sdhci/sdhci.c Sun Jul 2 16:20:49 2017 (r320576) > +++ head/sys/dev/sdhci/sdhci.c Sun Jul 2 19:13:01 2017 (r320577) > @@ -366,6 +366,7 @@ sdhci_set_clock(struct sdhci_slot *slot, uint32_t cloc > static void > sdhci_set_power(struct sdhci_slot *slot, u_char power) > { > + int i; > uint8_t pwr; > > if (slot->power == power) > @@ -394,9 +395,20 @@ sdhci_set_power(struct sdhci_slot *slot, u_char power) > break; > } > WR1(slot, SDHCI_POWER_CONTROL, pwr); > - /* Turn on the power. */ > + /* > + * Turn on VDD1 power. Note that at least some Intel controllers can > + * fail to enable bus power on the first try after transiting from D3 > + * to D0, so we give them up to 20 ms. ^^^^^^^ > + */ > pwr |= SDHCI_POWER_ON; > - WR1(slot, SDHCI_POWER_CONTROL, pwr); > + for (i = 0; i < 20; i++) { ^^^ > + WR1(slot, SDHCI_POWER_CONTROL, pwr); > + if (RD1(slot, SDHCI_POWER_CONTROL) & SDHCI_POWER_ON) > + break; > + DELAY(100); ^^^^^ 20 x 100uS == 2mS, not 20ms. Please correct the loop, DELAY or the comments. > + } > + if (!(RD1(slot, SDHCI_POWER_CONTROL) & SDHCI_POWER_ON)) > + slot_printf(slot, "Bus power failed to enable"); > > if (slot->quirks & SDHCI_QUIRK_INTEL_POWER_UP_RESET) { > WR1(slot, SDHCI_POWER_CONTROL, pwr | 0x10); > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Jul 3 02:01:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69DCE9DB4BF; Mon, 3 Jul 2017 02:01:17 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38E357D39E; Mon, 3 Jul 2017 02:01:17 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6321G5B026300; Mon, 3 Jul 2017 02:01:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6321G4l026299; Mon, 3 Jul 2017 02:01:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707030201.v6321G4l026299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 3 Jul 2017 02:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320580 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 320580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 02:01:17 -0000 Author: markj Date: Mon Jul 3 02:01:16 2017 New Revision: 320580 URL: https://svnweb.freebsd.org/changeset/base/320580 Log: Let io_mapping_init_wc() fall back to an uncacheable mapping. This allows usage of the function on architectures that don't support write-combining. Reported by: bz, emaste X-MFC With: r320196 Modified: head/sys/compat/linuxkpi/common/include/linux/io-mapping.h Modified: head/sys/compat/linuxkpi/common/include/linux/io-mapping.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/io-mapping.h Sun Jul 2 21:00:30 2017 (r320579) +++ head/sys/compat/linuxkpi/common/include/linux/io-mapping.h Mon Jul 3 02:01:16 2017 (r320580) @@ -53,8 +53,13 @@ io_mapping_init_wc(struct io_mapping *mapping, resourc mapping->base = base; mapping->size = size; +#ifdef VM_MEMATTR_WRITE_COMBINING mapping->mem = ioremap_wc(base, size); mapping->attr = VM_MEMATTR_WRITE_COMBINING; +#else + mapping->mem = ioremap_nocache(base, size); + mapping->attr = VM_MEMATTR_UNCACHEABLE; +#endif return (mapping); } From owner-svn-src-head@freebsd.org Mon Jul 3 02:02:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75C2F9DB531; Mon, 3 Jul 2017 02:02:39 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x233.google.com (mail-pf0-x233.google.com [IPv6:2607:f8b0:400e:c00::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C4BC7D6C7; Mon, 3 Jul 2017 02:02:39 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x233.google.com with SMTP id q86so92338389pfl.3; Sun, 02 Jul 2017 19:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TnFJ0einKyQzm/yPC0ME+QVtZXTdOzZd9H5+RsKavBs=; b=M4GcxozD5rw0wbwvvmA32bf9s4GrAmKyfKrinPRnSJeG86vS0zUcStk3B+KJNZkJXG Y4+9SmBdYyL7DCvuoE8o59Tm8+7PF0dd6o3Dq4EfAXf9eUu8wutX9gm69+r3g58q+3p1 q5saGetCd6vdkcgdh8Xn82N6Qxw1GyGCa328xL2Zlu4bdjUwLnvlsGLBUtu3wyH2MAyT tExlDjLSa0MXvc9CP3sHfmB19HzwhMJh1OSr4Sgu57TtxHp++8NhGcKn8iYhhg1Ye1D2 pZDtFrDaoagWnrSLUJbiEW1sdcyuSDyet1YX8yDeReU5D6L0dwcSsu3vazIY76adF1+m oTXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=TnFJ0einKyQzm/yPC0ME+QVtZXTdOzZd9H5+RsKavBs=; b=f0cdN0EBzqezGdbZ8uW9x8C+KuCoeLVcO1vkLC5V23Rf2fM1y2NXAvbvDrccsx4kQs 1HipM2QLsbX1xbsclRHoYmyXgWpuSnHwits1FEODmQSXsXcO4LMNJFQ6RqF898dOARxo xnsTKO23eSiIe7TxnVzlRDp4XprDdaSBcfmW+XJPXa3VBSxE6ScxqlSm+49NZJwQOXgW srj5RaPkEMh4XqJROG2sQ6116vJr2yOY+QC/fYF73r0qoFHCqXZCAe5YtgfR/jBq9yk3 j+ujYrmylHK30LFBZ5mjKeG4wpQqVGXyoiPJU5TJHC8QgdhSPc/IPx9BkVoZ+9rBob2U 69dg== X-Gm-Message-State: AIVw111Nmj/hd9qlMhM0O/iv2+yQ/l7Z+jud6/V8e7PdVat7Ixnb2vZw QnX5OlVXjkIetPZ6 X-Received: by 10.99.188.18 with SMTP id q18mr7912132pge.79.1499047358586; Sun, 02 Jul 2017 19:02:38 -0700 (PDT) Received: from raichu ([2604:4080:1102:0:ca60:ff:fe9d:3963]) by smtp.gmail.com with ESMTPSA id w190sm37284630pgb.30.2017.07.02.19.02.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Jul 2017 19:02:37 -0700 (PDT) Sender: Mark Johnston Date: Sun, 2 Jul 2017 19:02:36 -0700 From: Mark Johnston To: "Bjoern A. Zeeb" Cc: Ed Maste , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r320196 - in head/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core dev/mlx5/mlx5_core Message-ID: <20170703020236.GB63131@raichu> References: <201706211820.v5LIKHo5061797@repo.freebsd.org> <17A8C598-54C2-4794-96D0-9A4D980B1934@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17A8C598-54C2-4794-96D0-9A4D980B1934@lists.zabbadoz.net> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 02:02:39 -0000 On Sun, Jul 02, 2017 at 01:38:49PM +0000, Bjoern A. Zeeb wrote: > On 2 Jul 2017, at 13:30, Ed Maste wrote: > > > On 21 June 2017 at 14:20, Mark Johnston wrote: > >> Author: markj > >> Date: Wed Jun 21 18:20:17 2017 > >> New Revision: 320196 > >> URL: https://svnweb.freebsd.org/changeset/base/320196 > >> > >> Log: > >> Update io-mapping.h in the LinuxKPI. > > > > sparc64 LINT kernel is failing with: > > > > In file included from > > /scratch/tmp/emaste/freebsd/sys/dev/mlx5/mlx5_core/mlx5_main.c:36: > > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io-mapping.h: > > In function 'io_mapping_init_wc': > > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io-mapping.h:57: > > error: 'VM_MEMATTR_WRITE_COMBINING' undeclared (first use in this > > function) > > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io-mapping.h:57: > > error: (Each undeclared identifier is reported only once > > /scratch/tmp/emaste/freebsd/sys/compat/linuxkpi/common/include/linux/io-mapping.h:57: > > error: for each function it appears in.) > > *** [mlx5_main.o] Error code 1 > > > and so is arm.LINT: This should be addressed by r320580, sorry for the breakage. From owner-svn-src-head@freebsd.org Mon Jul 3 02:53:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83B6A9DC16F; Mon, 3 Jul 2017 02:53:04 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-pg0-f50.google.com (mail-pg0-f50.google.com [74.125.83.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F1E97EA2D; Mon, 3 Jul 2017 02:53:04 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-pg0-f50.google.com with SMTP id k14so12104718pgr.0; Sun, 02 Jul 2017 19:53:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=rJHkEmrudPVrfwQj1Oh6IzAGAKT2AKaa4yq7IynEAeU=; b=k2CVCtltk4aVuO/MTnWAnxPAUjrTvMuGscaxDJjluUIiix37V/BHnpehZj7e3PBOu5 axH1HOXjfA+JlpORCEJWiIiOeb1g1zNYaw/3NDxGnt8st8RhNKEz9w6oy8K+s1FgJZYi akQ4cR0s/66Giaimqj4W4iJ+BrHTT9Lw8D9Ds5Qre24cftx9i6RaNyVAyaJs/4KsDPTr Q0g1rkBm1MoOlDPhl8DPU3I8wZ0WG4tc1pnd9xCVLhevut5CJ5XxoAtlzR4hmTcpsuAK Y/ALdL9AEzPUNb9TArvbY+Vc5htDmN6SMJB4GqY5s8MChza9PLmWqORZA40It0dHGzQQ IOjg== X-Gm-Message-State: AIVw1112ReZuHR2Y0Qb4+/7xfKUl8PzWL/In9Ise+VEQPTAqKT/i+sgb QCS2pll5ybmO0A08vaM= X-Received: by 10.98.103.18 with SMTP id b18mr7732553pfc.171.1499050383135; Sun, 02 Jul 2017 19:53:03 -0700 (PDT) Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com. [74.125.83.44]) by smtp.gmail.com with ESMTPSA id s88sm28373669pfk.16.2017.07.02.19.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Jul 2017 19:53:03 -0700 (PDT) Received: by mail-pg0-f44.google.com with SMTP id u62so87843482pgb.3; Sun, 02 Jul 2017 19:53:03 -0700 (PDT) X-Received: by 10.98.200.27 with SMTP id z27mr7664563pff.136.1499050382845; Sun, 02 Jul 2017 19:53:02 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.100.163.172 with HTTP; Sun, 2 Jul 2017 19:53:02 -0700 (PDT) In-Reply-To: <201707022100.v62L0Ume001253@repo.freebsd.org> References: <201707022100.v62L0Ume001253@repo.freebsd.org> From: Conrad Meyer Date: Sun, 2 Jul 2017 19:53:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r320579 - head/usr.bin/patch To: "Pedro F. Giffuni" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 02:53:04 -0000 Hi Pedro, Does this change the behavior of 'patch -p1' (for example) with 'git diff' generated diffs? So patches that could be applied with -p1 before now need to be applied with -p0? Or is this a different mode of patch? If so, that's a somewhat surprising change in behavior. Does GNU patch have the same behavior? Thanks, Conrad On Sun, Jul 2, 2017 at 2:00 PM, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Jul 2 21:00:30 2017 > New Revision: 320579 > URL: https://svnweb.freebsd.org/changeset/base/320579 > > Log: > patch(1): add support for git generated diffs. > > Sometimes patches coming from other places have extra a/ and b/ > directories prepended to filenames. > > Obtained from: OpenBSD (CVS rev. 1.57, 1.58) > > Modified: > head/usr.bin/patch/pch.c > > Modified: head/usr.bin/patch/pch.c > ============================================================================== > --- head/usr.bin/patch/pch.c Sun Jul 2 20:47:25 2017 (r320578) > +++ head/usr.bin/patch/pch.c Sun Jul 2 21:00:30 2017 (r320579) > @@ -264,6 +264,7 @@ intuit_diff_type(void) > char *s, *t; > int indent, retval; > struct file_name names[MAX_FILE]; > + int piece_of_git = 0; > > memset(names, 0, sizeof(names)); > ok_to_create_file = false; > @@ -308,14 +309,20 @@ intuit_diff_type(void) > if (!stars_last_line && strnEQ(s, "*** ", 4)) > names[OLD_FILE].path = fetchname(s + 4, > &names[OLD_FILE].exists, strippath); > - else if (strnEQ(s, "--- ", 4)) > - names[NEW_FILE].path = fetchname(s + 4, > + else if (strnEQ(s, "--- ", 4)) { > + size_t off = 4; > + if (piece_of_git && strippath == 957) > + off = 6; > + names[NEW_FILE].path = fetchname(s + off, > &names[NEW_FILE].exists, strippath); > - else if (strnEQ(s, "+++ ", 4)) > + } else if (strnEQ(s, "+++ ", 4)) { > /* pretend it is the old name */ > - names[OLD_FILE].path = fetchname(s + 4, > + size_t off = 4; > + if (piece_of_git && strippath == 957) > + off = 6; > + names[OLD_FILE].path = fetchname(s + off, > &names[OLD_FILE].exists, strippath); > - else if (strnEQ(s, "Index:", 6)) > + } else if (strnEQ(s, "Index:", 6)) > names[INDEX_FILE].path = fetchname(s + 6, > &names[INDEX_FILE].exists, strippath); > else if (strnEQ(s, "Prereq:", 7)) { > @@ -330,6 +337,9 @@ intuit_diff_type(void) > free(revision); > revision = NULL; > } > + } else if (strnEQ(s, "diff --git a/", 13)) { > + /* Git-style diffs. */ > + piece_of_git = 1; > } else if (strnEQ(s, "==== ", 5)) { > /* Perforce-style diffs. */ > if ((t = strstr(s + 5, " - ")) != NULL) > From owner-svn-src-head@freebsd.org Mon Jul 3 10:24:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 874AC9E34F0; Mon, 3 Jul 2017 10:24:50 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 496BC6692F; Mon, 3 Jul 2017 10:24:50 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63AOnRO036089; Mon, 3 Jul 2017 10:24:49 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63AOnkp036085; Mon, 3 Jul 2017 10:24:49 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707031024.v63AOnkp036085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Mon, 3 Jul 2017 10:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320595 - in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Commit-Revision: 320595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 10:24:50 -0000 Author: dchagin Date: Mon Jul 3 10:24:49 2017 New Revision: 320595 URL: https://svnweb.freebsd.org/changeset/base/320595 Log: Add support for musl consumers to the Linuxulator. PR: 213809 Submitted by: Yonas Yanfa Reported by: Yonas Yanfa MFC after: 1 week Relnotes: yes Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Mon Jul 3 10:10:04 2017 (r320594) +++ head/sys/amd64/linux/linux_sysvec.c Mon Jul 3 10:24:49 2017 (r320595) @@ -923,9 +923,22 @@ static Elf64_Brandinfo linux_glibc2brandshort = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; +static Elf64_Brandinfo linux_muslbrand = { + .brand = ELFOSABI_LINUX, + .machine = EM_X86_64, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-musl-x86_64.so.1", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .brand_note = &linux64_brandnote, + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE +}; + Elf64_Brandinfo *linux_brandlist[] = { &linux_glibc2brand, &linux_glibc2brandshort, + &linux_muslbrand, NULL }; Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Mon Jul 3 10:10:04 2017 (r320594) +++ head/sys/amd64/linux32/linux32_sysvec.c Mon Jul 3 10:24:49 2017 (r320595) @@ -1141,9 +1141,22 @@ static Elf32_Brandinfo linux_glibc2brand = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; +static Elf32_Brandinfo linux_muslbrand = { + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-musl-i386.so.1", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .brand_note = &linux32_brandnote, + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE +}; + Elf32_Brandinfo *linux_brandlist[] = { &linux_brand, &linux_glibc2brand, + &linux_muslbrand, NULL }; Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Mon Jul 3 10:10:04 2017 (r320594) +++ head/sys/i386/linux/linux_sysvec.c Mon Jul 3 10:24:49 2017 (r320595) @@ -1120,9 +1120,22 @@ static Elf32_Brandinfo linux_glibc2brand = { .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; +static Elf32_Brandinfo linux_muslbrand = { + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-musl-i386.so.1", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .brand_note = &linux_brandnote, + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE +}; + Elf32_Brandinfo *linux_brandlist[] = { &linux_brand, &linux_glibc2brand, + &linux_muslbrand, NULL }; From owner-svn-src-head@freebsd.org Mon Jul 3 13:53:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 604789E7505 for ; Mon, 3 Jul 2017 13:53:26 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x22f.google.com (mail-yb0-x22f.google.com [IPv6:2607:f8b0:4002:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21CD07158C for ; Mon, 3 Jul 2017 13:53:25 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x22f.google.com with SMTP id v197so29746219ybv.3 for ; Mon, 03 Jul 2017 06:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zOkv7/DRNI01JI3NCbG7rfr6mxHMzipvRUeYNOpfGgc=; b=VJgpzZe7EKjJvQhFkwdQsNchd3W3kexipZt7RavaNqdf34ABCzSlWLEFy9fqGxF8iX swkQ5fTu714b1Wq3kHS3ssaqHd2f4cYSl1JoUIi41IicyY3QENkXKQJ1DG3SsBhV8PRN 2jCDcu3+a4uSMwqntyJ8q0t8v+BoSYaw5j6s94g2xY78ejQtKWekWjvkZ2UhQd8USqaE ipMO0YN/0bX4mDimu8ajrrrx9OPqM5SLsVuFcWRzhO+CvK4Z1GkHmlxZfuvRyBIMWcqj zrvJiXSeArMaAP1rLblSHt/Yp46NzNbFRsV2jbDQvOZlayUxgtMeaxbTsqVEc0VViIcU CjHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zOkv7/DRNI01JI3NCbG7rfr6mxHMzipvRUeYNOpfGgc=; b=mg0eugALr8G1wbjTcbNmvC03JC/l61kgNis7Q5cQkrTRno7rz4AGP6sxo9PJA8TF/l Aiy7F1khrSOj6npmuDtDPwV0dJLU/lLGSEsbyhzaz8y8e9mgKZgTA4RZxYdG/s4aTKeZ 8RXNIWP/tRk1JbtKXhcrVzgFAKbF9y+Rz7JmBGgGdm79eKTe0G8tNBV6w/XQL0y/deXi xTgH05mYCi2GFQtfVgpv0le1zFD4uYwolErX6h0XlzHsKLlhyw2yhuCjrqIcjXqszJt1 9uNSV7o5OEuWsv8YEWNJKnMYFjbZDu6zxTE84lgitzTOR4wdCLDOd8mzK8hdrB7DDExe HCSg== X-Gm-Message-State: AKS2vOwN+KnRK7pFwFpxMRRYXicT9GuV3Uvz1E4caXpn03Vklehdg3cf q6cUo62RXTOvSxO6yrddmwzCmy4yd6ck X-Received: by 10.37.88.8 with SMTP id m8mr27195285ybb.86.1499090004671; Mon, 03 Jul 2017 06:53:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.216.142 with HTTP; Mon, 3 Jul 2017 06:52:54 -0700 (PDT) In-Reply-To: <201707031024.v63AOnkp036085@repo.freebsd.org> References: <201707031024.v63AOnkp036085@repo.freebsd.org> From: Ed Schouten Date: Mon, 3 Jul 2017 15:52:54 +0200 Message-ID: Subject: Re: svn commit: r320595 - in head/sys: amd64/linux amd64/linux32 i386/linux To: Dmitry Chagin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 13:53:26 -0000 Hi there, 2017-07-03 12:24 GMT+02:00 Dmitry Chagin : > + .compat_3_brand = "Linux", I suspect that you can safely remove this line. It's only intended to match a field in ELF headers that is/was BSD specific. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-head@freebsd.org Mon Jul 3 14:31:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFE839E7DB6; Mon, 3 Jul 2017 14:31:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBF7D72604; Mon, 3 Jul 2017 14:31:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63EVcGr040661; Mon, 3 Jul 2017 14:31:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63EVcUN040660; Mon, 3 Jul 2017 14:31:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707031431.v63EVcUN040660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 3 Jul 2017 14:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320599 - head/release/scripts X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/scripts X-SVN-Commit-Revision: 320599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 14:31:40 -0000 Author: gjb Date: Mon Jul 3 14:31:38 2017 New Revision: 320599 URL: https://svnweb.freebsd.org/changeset/base/320599 Log: Fix Vagrant image upload after recent API changes. - Update ATLAS_UPLOAD_URL to avoid various regular expressions from failing to match due to redirections. - Use ATLAS_UPLOAD_URL throughout the script. - Adjust several regular expression patterns. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/atlas-upload.sh Modified: head/release/scripts/atlas-upload.sh ============================================================================== --- head/release/scripts/atlas-upload.sh Mon Jul 3 13:46:58 2017 (r320598) +++ head/release/scripts/atlas-upload.sh Mon Jul 3 14:31:38 2017 (r320599) @@ -27,7 +27,7 @@ # ATLAS_API_URL='' -ATLAS_UPLOAD_URL='https://binstore.hashicorp.com' +ATLAS_UPLOAD_URL='https://app.vagrantup.com' DESCRIPTION="FreeBSD Snapshot Build" usage() { @@ -76,7 +76,7 @@ main () { fi # Check to see if the box exists or create it - BOXRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}?access_token=${KEY}") + BOXRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}?access_token=${KEY}") if [ $? != 0 ]; then echo "Failed to connect to the API" exit 2; @@ -84,26 +84,26 @@ main () { echo $BOXRESULT | grep "\"name\":\"${BOX}\"" > /dev/null if [ $? != 0 ]; then echo "Creating box: ${BOX}" - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/boxes -X POST -d "box[name]=${BOX}" -d "access_token=${KEY}" > /dev/null - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[is_private]=false" -d "access_token=${KEY}" > /dev/null - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[description]='${DESCRIPTION}'" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/boxes -X POST -d "box[name]=${BOX}" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[is_private]=false" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[description]='${DESCRIPTION}'" -d "access_token=${KEY}" > /dev/null else echo "Box already exists" fi # Check to see if the version exists or create it - VERSIONRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}?access_token=${KEY}") + VERSIONRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}?access_token=${KEY}") if [ $? != 0 ]; then echo "Failed to connect to the API" exit 2; fi - echo $VERSIONRESULT | grep "\"version\":\"${VERSION}\"" > /dev/null + echo $VERSIONRESULT | grep "version/${VERSION}" > /dev/null if [ $? != 0 ]; then echo "Creating version: ${VERSION}" - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/versions -X POST -d "version[version]=${VERSION}" -d "access_token=${KEY}" > /dev/null - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION} -X PUT -d "version[description]=${DESCRIPTION}" -d "access_token=${KEY}" > /dev/null - VERSIONRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}?access_token=${KEY}") - echo $VERSIONRESULT | grep "\"version\":\"${VERSION}\"" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/versions -X POST -d "version[version]=${VERSION}" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION} -X PUT -d "version[description]=${DESCRIPTION}" -d "access_token=${KEY}" > /dev/null + VERSIONRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}?access_token=${KEY}") + echo $VERSIONRESULT | grep "version/${VERSION}" > /dev/null if [ $? != 0 ]; then echo "Failed to create version" exit 2 @@ -113,37 +113,37 @@ main () { fi # Check to see if the provider exists or create it - PROVIDERRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") + PROVIDERRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") if [ $? != 0 ]; then echo "Failed to connect to the API" exit 2; fi - echo $PROVIDERRESULT | grep "\"name\":\"${PROVIDER}\"" > /dev/null + echo $PROVIDERRESULT | grep "provider/${PROVIDER}" > /dev/null if [ $? != 0 ]; then echo "Creating provider: ${PROVIDER}" - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/providers -X POST -d "provider[name]=${PROVIDER}" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/providers -X POST -d "provider[name]=${PROVIDER}" -d "access_token=${KEY}" > /dev/null else echo "Provider already exists" fi # Request an upload token - TOKENRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}/upload?access_token=${KEY}") + TOKENRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}/upload?access_token=${KEY}") if [ $? != 0 ]; then echo "Failed to get the token from the API" exit 2; fi - echo ${TOKENRESULT} | grep -E "\"(token|upload_path)\":" > /dev/null + echo ${TOKENRESULT} | grep -E "upload_path" > /dev/null if [ $? != 0 ]; then echo "No token found from the API" exit 2 else TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/.*upload_path":"//' -e 's/}$//g' -e 's/"//g') echo "Uploading to Atlas" - UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${TOKEN}) + UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} "${TOKEN}") # Validate the Upload echo "Validating" - VALIDRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") + VALIDRESULT=$(/usr/local/bin/curl -s "${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*"hosted"://' -e 's/,.*$//') if [ ! -z ${TOKEN} -a "${HOSTED_TOKEN}" != "true" ]; then echo "Upload failed, try again." @@ -152,7 +152,7 @@ main () { # Release the version echo "Releasing ${VERSION} of ${BOX} in Atlas" - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/release -X PUT -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s ${ATLAS_UPLOAD_URL}/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/release -X PUT -d "access_token=${KEY}" > /dev/null fi } From owner-svn-src-head@freebsd.org Mon Jul 3 15:42:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBC129E9483 for ; Mon, 3 Jul 2017 15:42:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm10-vm0.bullet.mail.ne1.yahoo.com (nm10-vm0.bullet.mail.ne1.yahoo.com [98.138.91.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87B5E75002 for ; Mon, 3 Jul 2017 15:42:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1499096537; bh=qKJVkMhV0ERaE09WKG6Ab0HzhkNm+EDtSuE4QQwnlX8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=mC8lt6kHy/jMzoIwGFoj8KGSeH4CI6GQU//9rH6eV5ijAqi6ls/5dvhUUuevVtHCTYSglfgzcrQ0qYt8abpGrNykPhsQxf6DAe7zsQRLc0tVe5795/LRD4VLUa0xC37kPVPJPYO3CWKqOpAfhBQ2dY3cNnyvgVQEbxKR5ZjNuUmuMrlESS240/qfHZOSeXTDmOFhc0D0Xa6weR6XOq1aZmfXt8+Lx/DttAYtY5TOtJDJ+Rv6PEPu/pDmdh8X1z6VZjCmq0+TjLJJ2VI1YxUnt7YCMQOfjd1x2v4kcawod3QVqzpSvnvFocl1HAuH3cileOgwbuFGss1qrqJkTPDmaA== Received: from [98.138.226.177] by nm10.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jul 2017 15:42:17 -0000 Received: from [98.138.84.47] by tm12.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jul 2017 15:42:17 -0000 Received: from [127.0.0.1] by smtp115.mail.ne1.yahoo.com with NNFMP; 03 Jul 2017 15:42:17 -0000 X-Yahoo-Newman-Id: 170243.98318.bm@smtp115.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: WdFjRgUVM1kLPuw95KNN4jau9362NUU.mh4HFmFX2cYs2kp 3BfzsAr1ckzxyWruThjzrb0w7U17QMG6bfzTLiCeP3Vb4V_RQ47dS30MCdB2 wZWJ7ipS8.KvU6aJdEeehprhaxfUg81WQgxeHRkUdN_s2yFy4XKbh95vWcUL 1yiDC_6O24rDHljb5gG2pFaab.grxKEssTqH5SlKuMF9FqAeWPe.515KWGbB T.890je9vRXApK1__kuuSC.lDXBKqDAUJ10Lc89aFBc4FeKkK1mxcbow3B7L ET4KhpLdDxmFFWX7HHJhE.Lw7KdYhDLfwqFUs.HFRvguKlTvpztfaLtFTU.G PitBOMV.64RrpTNIm1a_lxxNJ.n.SVRUj2SfBMHQ1dMxRJtsdU6q7qC4LIOS kGDo1mfBtigoyEjdBQjtoo9orvT9K_O42fvFA4soxYJjVN3gN8NjIIBqAwEi .nekrHc4z0c_dOGy1US7oOnYw6HdSmKe.iAFSh80wWn7QLQ6_kfD7tGcafvP JlK7lh6lgi7m.CT.gWAo- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r320579 - head/usr.bin/patch To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201707022100.v62L0Ume001253@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: Date: Mon, 3 Jul 2017 10:42:15 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 15:42:24 -0000 Hello; On 07/02/17 21:53, Conrad Meyer wrote: > Hi Pedro, > > Does this change the behavior of 'patch -p1' (for example) with 'git > diff' generated diffs? So patches that could be applied with -p1 > before now need to be applied with -p0? Or is this a different mode > of patch? Thanks for pointing this out. This doesn't change the meaning of the patch level so previous behavior is not affected. In fact using patch -p1 still patches the file. The behavior is consistent with some incipient path detection we have on CVS files. No problem AFAICT. > If so, that's a somewhat surprising change in behavior. Does GNU > patch have the same behavior? I did some testing on {g}patch. GNU patch indeed has a different behavior and requires -p1 on such diffs. IMHO, the (new) BSD patch behavior is somewhat more natural in the sense that no one asked git to add a prefix to the path so it makes sense to ignore it. Recent GNU patch does support many git-specific features that we don't. Pedro. > Thanks, > Conrad > > On Sun, Jul 2, 2017 at 2:00 PM, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Sun Jul 2 21:00:30 2017 >> New Revision: 320579 >> URL: https://svnweb.freebsd.org/changeset/base/320579 >> >> Log: >> patch(1): add support for git generated diffs. >> >> Sometimes patches coming from other places have extra a/ and b/ >> directories prepended to filenames. >> >> Obtained from: OpenBSD (CVS rev. 1.57, 1.58) >> >> Modified: >> head/usr.bin/patch/pch.c >> >> Modified: head/usr.bin/patch/pch.c >> ============================================================================== >> --- head/usr.bin/patch/pch.c Sun Jul 2 20:47:25 2017 (r320578) >> +++ head/usr.bin/patch/pch.c Sun Jul 2 21:00:30 2017 (r320579) >> @@ -264,6 +264,7 @@ intuit_diff_type(void) >> char *s, *t; >> int indent, retval; >> struct file_name names[MAX_FILE]; >> + int piece_of_git = 0; >> >> memset(names, 0, sizeof(names)); >> ok_to_create_file = false; >> @@ -308,14 +309,20 @@ intuit_diff_type(void) >> if (!stars_last_line && strnEQ(s, "*** ", 4)) >> names[OLD_FILE].path = fetchname(s + 4, >> &names[OLD_FILE].exists, strippath); >> - else if (strnEQ(s, "--- ", 4)) >> - names[NEW_FILE].path = fetchname(s + 4, >> + else if (strnEQ(s, "--- ", 4)) { >> + size_t off = 4; >> + if (piece_of_git && strippath == 957) >> + off = 6; >> + names[NEW_FILE].path = fetchname(s + off, >> &names[NEW_FILE].exists, strippath); >> - else if (strnEQ(s, "+++ ", 4)) >> + } else if (strnEQ(s, "+++ ", 4)) { >> /* pretend it is the old name */ >> - names[OLD_FILE].path = fetchname(s + 4, >> + size_t off = 4; >> + if (piece_of_git && strippath == 957) >> + off = 6; >> + names[OLD_FILE].path = fetchname(s + off, >> &names[OLD_FILE].exists, strippath); >> - else if (strnEQ(s, "Index:", 6)) >> + } else if (strnEQ(s, "Index:", 6)) >> names[INDEX_FILE].path = fetchname(s + 6, >> &names[INDEX_FILE].exists, strippath); >> else if (strnEQ(s, "Prereq:", 7)) { >> @@ -330,6 +337,9 @@ intuit_diff_type(void) >> free(revision); >> revision = NULL; >> } >> + } else if (strnEQ(s, "diff --git a/", 13)) { >> + /* Git-style diffs. */ >> + piece_of_git = 1; >> } else if (strnEQ(s, "==== ", 5)) { >> /* Perforce-style diffs. */ >> if ((t = strstr(s + 5, " - ")) != NULL) >> From owner-svn-src-head@freebsd.org Mon Jul 3 15:54:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 316259E9831; Mon, 3 Jul 2017 15:54:46 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F223D757AD; Mon, 3 Jul 2017 15:54:45 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63Fsj7l074072; Mon, 3 Jul 2017 15:54:45 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63Fsjvg074071; Mon, 3 Jul 2017 15:54:45 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201707031554.v63Fsjvg074071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 3 Jul 2017 15:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320603 - head/bin/ed X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/bin/ed X-SVN-Commit-Revision: 320603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 15:54:46 -0000 Author: pfg Date: Mon Jul 3 15:54:44 2017 New Revision: 320603 URL: https://svnweb.freebsd.org/changeset/base/320603 Log: ed(1): Allow the omission of one address in (.,.) and (.;.) address ranges With this patch, ",n" is an abbreviation for "1,n", ";n" abbreviates ".;n". The "n," and "n;" variants mean "n,n" and "n;n", respectively. Also, piping to a shell command does not count as a save, so don't reset the modified flag. Obtained from: OpenBSD (CVS Rev. 1.58, 1.59) Modified: head/bin/ed/main.c Modified: head/bin/ed/main.c ============================================================================== --- head/bin/ed/main.c Mon Jul 3 15:34:21 2017 (r320602) +++ head/bin/ed/main.c Mon Jul 3 15:54:44 2017 (r320603) @@ -350,7 +350,8 @@ next_addr(void) ibufp++; addr_cnt++; second_addr = (c == ';') ? current_addr : 1; - addr = addr_last; + if ((addr = next_addr()) < 0) + addr = addr_last; break; } /* FALLTHROUGH */ @@ -809,7 +810,7 @@ exec_command(void) if ((addr = write_file(*fnp ? fnp : old_filename, (c == 'W') ? "a" : "w", first_addr, second_addr)) < 0) return ERR; - else if (addr == addr_last) + else if (addr == addr_last && *fnp != '!') modified = 0; else if (modified && !scripted && n == 'q') gflag = EMOD; From owner-svn-src-head@freebsd.org Mon Jul 3 15:56:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12AEF9E98A3; Mon, 3 Jul 2017 15:56:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0FF375902; Mon, 3 Jul 2017 15:56:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63Fukvr074212; Mon, 3 Jul 2017 15:56:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63Fuj4O074204; Mon, 3 Jul 2017 15:56:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707031556.v63Fuj4O074204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 3 Jul 2017 15:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320604 - in head: share/man/man4 sys/dev/isp X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/isp X-SVN-Commit-Revision: 320604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 15:56:47 -0000 Author: mav Date: Mon Jul 3 15:56:45 2017 New Revision: 320604 URL: https://svnweb.freebsd.org/changeset/base/320604 Log: Switch fabric scans from GID_FT to GID_PT+GFF_ID/GFT_ID. Instead of using GID_FT SNS request to get list of registered FCP ports, use GID_PT to get list of all Nx_Ports, and then use GFF_ID and/or GFT_ID requests to find whether they are FCP and target capable. The problem with old approach is that GID_FT does not report ports without FC-4 type registered. In particular it was impossible to boot OS from FreeBSD FC target using QLogic FC BIOS, since one does not register FC-4 type even on new cards and so ignored by old code as incompatible. As a side bonus this allows initiator to skip pointless logins to other initiators by fetching that information from SNS instead. In case some switches do not implement GFF_ID/GFT_ID correctly, add sysctls to disable that functionality. I handled broken GFF_ID of my Brocade 200E, but there may be other switches with different bugs. Linux also uses GID_PT, but GFF_ID is disabled by default there, and GFT_ID is not supported. Sponsored by: iXsystems, Inc. Modified: head/share/man/man4/isp.4 head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_library.h head/sys/dev/isp/ispmbox.h head/sys/dev/isp/ispvar.h Modified: head/share/man/man4/isp.4 ============================================================================== --- head/share/man/man4/isp.4 Mon Jul 3 15:54:44 2017 (r320603) +++ head/share/man/man4/isp.4 Mon Jul 3 15:56:45 2017 (r320604) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009-2015 Alexander Motin +.\" Copyright (c) 2009-2017 Alexander Motin .\" Copyright (c) 2006 Marcus Alves Grando .\" Copyright (c) 1998-2001 Matthew Jacob, for NASA/Ames Research Center .\" @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2016 +.Dd July 3, 2017 .Dt ISP 4 .Os .Sh NAME @@ -221,6 +221,15 @@ This value says how long to wait for devices to reappe disappear due to loop or fabric events. While this timeout is running, I/O to those devices will simply be held. +.It Va dev.isp.N.use_gff_id +.It Va dev.isp.N.use_gft_id +Setting those options to 0 allows to disable use of GFF_ID and GFT_ID SNS +requests during FC fabric scan. +It may be useful if switch does not implement them correctly, +preventing some devices from being found. +Disabling them may cause unneeded logins to ports not supporting target role +or even FCP at all. +The default is 1 (enabled). .It Va dev.isp.N.wwnn This is the readonly World Wide Node Name value for this port. .It Va dev.isp.N.wwpn @@ -239,7 +248,7 @@ The driver was written by .An Matthew Jacob originally for NetBSD at NASA/Ames Research Center. -Some later improvement was done by +Later improvement was done by .An Alexander Motin Aq Mt mav@FreeBSD.org . .Sh BUGS The driver currently ignores some NVRAM settings. Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Mon Jul 3 15:54:44 2017 (r320603) +++ head/sys/dev/isp/isp.c Mon Jul 3 15:56:45 2017 (r320604) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2009-2017 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -117,7 +118,7 @@ static uint64_t isp_get_wwn(ispsoftc_t *, int, int, in static int isp_fclink_test(ispsoftc_t *, int, int); static int isp_pdb_sync(ispsoftc_t *, int); static int isp_scan_loop(ispsoftc_t *, int); -static int isp_gid_ft(ispsoftc_t *, int); +static int isp_gid_pt(ispsoftc_t *, int); static int isp_scan_fabric(ispsoftc_t *, int); static int isp_login_device(ispsoftc_t *, int, uint32_t, isp_pdb_t *, uint16_t *); static int isp_send_change_request(ispsoftc_t *, int); @@ -3496,7 +3497,7 @@ isp_ct_passthru(ispsoftc_t *isp, int chan, uint32_t cm isp_get_ct_pt(isp, (isp_ct_pt_t *)resp, &pt); if (pt.ctp_status && pt.ctp_status != RQCS_DATA_UNDERRUN) { isp_prt(isp, ISP_LOGWARN, - "Chan %d GID_FT CT Passthrough returned 0x%x", + "Chan %d CT pass-through returned 0x%x", chan, pt.ctp_status); return (-1); } @@ -3510,7 +3511,8 @@ isp_ct_passthru(ispsoftc_t *isp, int chan, uint32_t cm /* * Scan the fabric for devices and add them to our port database. * - * Use the GID_FT command to get all Port IDs for FC4 SCSI devices it knows. + * Use the GID_PT command to get list of all Nx_Port IDs SNS knows. + * Use GFF_ID and GFT_ID to check port type (FCP) and features (target). * * For 2100-23XX cards, we use the SNS mailbox command to pass simple name * server commands to the switch management server via the QLogic f/w. @@ -3521,15 +3523,14 @@ isp_ct_passthru(ispsoftc_t *isp, int chan, uint32_t cm #define NGENT ((GIDLEN - 16) >> 2) static int -isp_gid_ft(ispsoftc_t *isp, int chan) +isp_gid_pt(ispsoftc_t *isp, int chan) { fcparam *fcp = FCPARAM(isp, chan); ct_hdr_t ct; - sns_gid_ft_req_t rq; - uint32_t *rp; + sns_gid_pt_req_t rq; uint8_t *scp = fcp->isp_scratch; - isp_prt(isp, ISP_LOGDEBUG0, "Chan %d requesting GID_FT", chan); + isp_prt(isp, ISP_LOGDEBUG0, "Chan %d requesting GID_PT", chan); if (FC_SCRATCH_ACQUIRE(isp, chan)) { isp_prt(isp, ISP_LOGERR, sacq); return (-1); @@ -3541,11 +3542,13 @@ isp_gid_ft(ispsoftc_t *isp, int chan) ct.ct_revision = CT_REVISION; ct.ct_fcs_type = CT_FC_TYPE_FC; ct.ct_fcs_subtype = CT_FC_SUBTYPE_NS; - ct.ct_cmd_resp = SNS_GID_FT; + ct.ct_cmd_resp = SNS_GID_PT; ct.ct_bcnt_resid = (GIDLEN - 16) >> 2; isp_put_ct_hdr(isp, &ct, (ct_hdr_t *)scp); - rp = (uint32_t *) &scp[sizeof(ct)]; - ISP_IOZPUT_32(isp, FC4_SCSI, rp); + scp[sizeof(ct)] = 0x7f; /* Port Type = Nx_Port */ + scp[sizeof(ct)+1] = 0; /* Domain_ID = any */ + scp[sizeof(ct)+2] = 0; /* Area_ID = any */ + scp[sizeof(ct)+3] = 0; /* Flags = no Area_ID */ if (isp_ct_passthru(isp, chan, sizeof(ct) + sizeof(uint32_t), GIDLEN)) { FC_SCRATCH_RELEASE(isp, chan); @@ -3553,17 +3556,20 @@ isp_gid_ft(ispsoftc_t *isp, int chan) } } else { /* Build the SNS request and execute via firmware. */ - ISP_MEMZERO(&rq, SNS_GID_FT_REQ_SIZE); + ISP_MEMZERO(&rq, SNS_GID_PT_REQ_SIZE); rq.snscb_rblen = GIDLEN >> 1; rq.snscb_addr[RQRSP_ADDR0015] = DMA_WD0(fcp->isp_scdma); rq.snscb_addr[RQRSP_ADDR1631] = DMA_WD1(fcp->isp_scdma); rq.snscb_addr[RQRSP_ADDR3247] = DMA_WD2(fcp->isp_scdma); rq.snscb_addr[RQRSP_ADDR4863] = DMA_WD3(fcp->isp_scdma); rq.snscb_sblen = 6; - rq.snscb_cmd = SNS_GID_FT; + rq.snscb_cmd = SNS_GID_PT; rq.snscb_mword_div_2 = NGENT; - rq.snscb_fc4_type = FC4_SCSI; - isp_put_gid_ft_request(isp, &rq, (sns_gid_ft_req_t *)scp); + rq.snscb_port_type = 0x7f; /* Port Type = Nx_Port */ + rq.snscb_domain = 0; /* Domain_ID = any */ + rq.snscb_area = 0; /* Area_ID = any */ + rq.snscb_flags = 0; /* Flags = no Area_ID */ + isp_put_gid_pt_request(isp, &rq, (sns_gid_pt_req_t *)scp); if (isp_ct_sns(isp, chan, sizeof(rq), NGENT)) { FC_SCRATCH_RELEASE(isp, chan); @@ -3571,13 +3577,147 @@ isp_gid_ft(ispsoftc_t *isp, int chan) } } - isp_get_gid_ft_response(isp, (sns_gid_ft_rsp_t *)scp, - (sns_gid_ft_rsp_t *)fcp->isp_scanscratch, NGENT); + isp_get_gid_xx_response(isp, (sns_gid_xx_rsp_t *)scp, + (sns_gid_xx_rsp_t *)fcp->isp_scanscratch, NGENT); FC_SCRATCH_RELEASE(isp, chan); return (0); } static int +isp_gff_id(ispsoftc_t *isp, int chan, uint32_t portid) +{ + fcparam *fcp = FCPARAM(isp, chan); + ct_hdr_t ct; + uint32_t *rp; + uint8_t *scp = fcp->isp_scratch; + sns_gff_id_rsp_t rsp; + int i, res = -1; + + if (!fcp->isp_use_gff_id) /* User may block GFF_ID use. */ + return (res); + + if (!IS_24XX(isp)) /* Old chips can't request GFF_ID. */ + return (res); + + isp_prt(isp, ISP_LOGDEBUG0, "Chan %d requesting GFF_ID", chan); + if (FC_SCRATCH_ACQUIRE(isp, chan)) { + isp_prt(isp, ISP_LOGERR, sacq); + return (res); + } + + /* Build the CT command and execute via pass-through. */ + ISP_MEMZERO(&ct, sizeof (ct)); + ct.ct_revision = CT_REVISION; + ct.ct_fcs_type = CT_FC_TYPE_FC; + ct.ct_fcs_subtype = CT_FC_SUBTYPE_NS; + ct.ct_cmd_resp = SNS_GFF_ID; + ct.ct_bcnt_resid = (SNS_GFF_ID_RESP_SIZE - sizeof(ct)) / 4; + isp_put_ct_hdr(isp, &ct, (ct_hdr_t *)scp); + rp = (uint32_t *) &scp[sizeof(ct)]; + ISP_IOZPUT_32(isp, portid, rp); + + if (isp_ct_passthru(isp, chan, sizeof(ct) + sizeof(uint32_t), + SNS_GFF_ID_RESP_SIZE)) { + FC_SCRATCH_RELEASE(isp, chan); + return (res); + } + + isp_get_gff_id_response(isp, (sns_gff_id_rsp_t *)scp, &rsp); + if (rsp.snscb_cthdr.ct_cmd_resp == LS_ACC) { + for (i = 0; i < 32; i++) { + if (rsp.snscb_fc4_features[i] != 0) { + res = 0; + break; + } + } + if (((rsp.snscb_fc4_features[FC4_SCSI / 8] >> + ((FC4_SCSI % 8) * 4)) & 0x01) != 0) + res = 1; + /* Workaround for broken Brocade firmware. */ + if (((ISP_SWAP32(isp, rsp.snscb_fc4_features[FC4_SCSI / 8]) >> + ((FC4_SCSI % 8) * 4)) & 0x01) != 0) + res = 1; + } + FC_SCRATCH_RELEASE(isp, chan); + isp_prt(isp, ISP_LOGDEBUG0, "Chan %d GFF_ID result is %d", chan, res); + return (res); +} + +static int +isp_gft_id(ispsoftc_t *isp, int chan, uint32_t portid) +{ + fcparam *fcp = FCPARAM(isp, chan); + ct_hdr_t ct; + sns_gxx_id_req_t rq; + uint32_t *rp; + uint8_t *scp = fcp->isp_scratch; + sns_gft_id_rsp_t rsp; + int i, res = -1; + + if (!fcp->isp_use_gft_id) /* User may block GFT_ID use. */ + return (res); + + isp_prt(isp, ISP_LOGDEBUG0, "Chan %d requesting GFT_ID", chan); + if (FC_SCRATCH_ACQUIRE(isp, chan)) { + isp_prt(isp, ISP_LOGERR, sacq); + return (res); + } + + if (IS_24XX(isp)) { + /* Build the CT command and execute via pass-through. */ + ISP_MEMZERO(&ct, sizeof (ct)); + ct.ct_revision = CT_REVISION; + ct.ct_fcs_type = CT_FC_TYPE_FC; + ct.ct_fcs_subtype = CT_FC_SUBTYPE_NS; + ct.ct_cmd_resp = SNS_GFT_ID; + ct.ct_bcnt_resid = (SNS_GFT_ID_RESP_SIZE - sizeof(ct)) / 4; + isp_put_ct_hdr(isp, &ct, (ct_hdr_t *)scp); + rp = (uint32_t *) &scp[sizeof(ct)]; + ISP_IOZPUT_32(isp, portid, rp); + + if (isp_ct_passthru(isp, chan, sizeof(ct) + sizeof(uint32_t), + SNS_GFT_ID_RESP_SIZE)) { + FC_SCRATCH_RELEASE(isp, chan); + return (res); + } + } else { + /* Build the SNS request and execute via firmware. */ + ISP_MEMZERO(&rq, SNS_GXX_ID_REQ_SIZE); + rq.snscb_rblen = SNS_GFT_ID_RESP_SIZE >> 1; + rq.snscb_addr[RQRSP_ADDR0015] = DMA_WD0(fcp->isp_scdma); + rq.snscb_addr[RQRSP_ADDR1631] = DMA_WD1(fcp->isp_scdma); + rq.snscb_addr[RQRSP_ADDR3247] = DMA_WD2(fcp->isp_scdma); + rq.snscb_addr[RQRSP_ADDR4863] = DMA_WD3(fcp->isp_scdma); + rq.snscb_sblen = 6; + rq.snscb_cmd = SNS_GFT_ID; + rq.snscb_mword_div_2 = (SNS_GFT_ID_RESP_SIZE - sizeof(ct)) / 4; + rq.snscb_portid = portid; + isp_put_gxx_id_request(isp, &rq, (sns_gxx_id_req_t *)scp); + + if (isp_ct_sns(isp, chan, sizeof(rq), SNS_GFT_ID_RESP_SIZE)) { + FC_SCRATCH_RELEASE(isp, chan); + return (res); + } + } + + isp_get_gft_id_response(isp, (sns_gft_id_rsp_t *)scp, &rsp); + if (rsp.snscb_cthdr.ct_cmd_resp == LS_ACC) { + for (i = 0; i < 8; i++) { + if (rsp.snscb_fc4_types[i] != 0) { + res = 0; + break; + } + } + if (((rsp.snscb_fc4_types[FC4_SCSI / 32] >> + (FC4_SCSI % 32)) & 0x01) != 0) + res = 1; + } + FC_SCRATCH_RELEASE(isp, chan); + isp_prt(isp, ISP_LOGDEBUG0, "Chan %d GFT_ID result is %d", chan, res); + return (res); +} + +static int isp_scan_fabric(ispsoftc_t *isp, int chan) { fcparam *fcp = FCPARAM(isp, chan); @@ -3586,7 +3726,7 @@ isp_scan_fabric(ispsoftc_t *isp, int chan) uint16_t nphdl; isp_pdb_t pdb; int portidx, portlim, r; - sns_gid_ft_rsp_t *rs; + sns_gid_xx_rsp_t *rs; if (fcp->isp_loopstate < LOOP_LSCAN_DONE) return (-1); @@ -3627,7 +3767,7 @@ fail: } /* Get list of port IDs from SNS. */ - r = isp_gid_ft(isp, chan); + r = isp_gid_pt(isp, chan); if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) goto abort; if (r > 0) { @@ -3638,7 +3778,7 @@ fail: return (-1); } - rs = (sns_gid_ft_rsp_t *) fcp->isp_scanscratch; + rs = (sns_gid_xx_rsp_t *) fcp->isp_scanscratch; if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) goto abort; if (rs->snscb_cthdr.ct_cmd_resp != LS_ACC) { @@ -3648,7 +3788,7 @@ fail: } else { level = ISP_LOGWARN; } - isp_prt(isp, level, "Chan %d Fabric Nameserver rejected GID_FT" + isp_prt(isp, level, "Chan %d Fabric Nameserver rejected GID_PT" " (Reason=0x%x Expl=0x%x)", chan, rs->snscb_cthdr.ct_reason, rs->snscb_cthdr.ct_explanation); @@ -3777,6 +3917,20 @@ relogin: if ((fcp->role & ISP_ROLE_INITIATOR) == 0) { isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Port 0x%06x is not logged in", chan, portid); + continue; + } + + r = isp_gff_id(isp, chan, portid); + if (r == 0) { + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Port 0x%06x is not an FCP target", chan, portid); + continue; + } + if (r < 0) + r = isp_gft_id(isp, chan, portid); + if (r == 0) { + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Port 0x%06x is not FCP", chan, portid); continue; } Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Mon Jul 3 15:54:44 2017 (r320603) +++ head/sys/dev/isp/isp_freebsd.c Mon Jul 3 15:56:45 2017 (r320604) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2009-2017 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -169,6 +170,8 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq fc->path = path; fc->isp = isp; fc->ready = 1; + fcp->isp_use_gft_id = 1; + fcp->isp_use_gff_id = 1; callout_init_mtx(&fc->gdt, &isp->isp_lock, 0); TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc); @@ -235,6 +238,12 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "topo", CTLFLAG_RD, &fcp->isp_topo, 0, "Connection topology"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "use_gft_id", CTLFLAG_RWTUN, &fcp->isp_use_gft_id, 0, + "Use GFT_ID during fabric scan"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "use_gff_id", CTLFLAG_RWTUN, &fcp->isp_use_gff_id, 0, + "Use GFF_ID during fabric scan"); } return (0); } Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Mon Jul 3 15:54:44 2017 (r320603) +++ head/sys/dev/isp/isp_library.c Mon Jul 3 15:56:45 2017 (r320604) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2009-2017 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -1742,7 +1743,7 @@ isp_put_gid_ft_request(ispsoftc_t *isp, sns_gid_ft_req } void -isp_put_gxn_id_request(ispsoftc_t *isp, sns_gxn_id_req_t *src, sns_gxn_id_req_t *dst) +isp_put_gid_pt_request(ispsoftc_t *isp, sns_gid_pt_req_t *src, sns_gid_pt_req_t *dst) { ISP_IOXPUT_16(isp, src->snscb_rblen, &dst->snscb_rblen); ISP_IOXPUT_16(isp, src->snscb_reserved0, &dst->snscb_reserved0); @@ -1753,48 +1754,46 @@ isp_put_gxn_id_request(ispsoftc_t *isp, sns_gxn_id_req ISP_IOXPUT_16(isp, src->snscb_sblen, &dst->snscb_sblen); ISP_IOXPUT_16(isp, src->snscb_reserved1, &dst->snscb_reserved1); ISP_IOXPUT_16(isp, src->snscb_cmd, &dst->snscb_cmd); - ISP_IOXPUT_16(isp, src->snscb_reserved2, &dst->snscb_reserved2); + ISP_IOXPUT_16(isp, src->snscb_mword_div_2, &dst->snscb_mword_div_2); ISP_IOXPUT_32(isp, src->snscb_reserved3, &dst->snscb_reserved3); - ISP_IOXPUT_32(isp, src->snscb_portid, &dst->snscb_portid); + ISP_IOXPUT_8(isp, src->snscb_port_type, &dst->snscb_port_type); + ISP_IOXPUT_8(isp, src->snscb_domain, &dst->snscb_domain); + ISP_IOXPUT_8(isp, src->snscb_area, &dst->snscb_area); + ISP_IOXPUT_8(isp, src->snscb_flags, &dst->snscb_flags); } -/* - * Generic SNS response - not particularly useful since the per-command data - * isn't always 16 bit words. - */ void -isp_get_sns_response(ispsoftc_t *isp, sns_scrsp_t *src, sns_scrsp_t *dst, int nwords) +isp_put_gxx_id_request(ispsoftc_t *isp, sns_gxx_id_req_t *src, sns_gxx_id_req_t *dst) { - int i; - isp_get_ct_hdr(isp, &src->snscb_cthdr, &dst->snscb_cthdr); - ISP_IOXGET_8(isp, &src->snscb_port_type, dst->snscb_port_type); - for (i = 0; i < 3; i++) { - ISP_IOXGET_8(isp, &src->snscb_port_id[i], - dst->snscb_port_id[i]); - } - for (i = 0; i < 8; i++) { - ISP_IOXGET_8(isp, &src->snscb_portname[i], - dst->snscb_portname[i]); - } - for (i = 0; i < nwords; i++) { - ISP_IOXGET_16(isp, &src->snscb_data[i], dst->snscb_data[i]); - } + ISP_IOXPUT_16(isp, src->snscb_rblen, &dst->snscb_rblen); + ISP_IOXPUT_16(isp, src->snscb_reserved0, &dst->snscb_reserved0); + ISP_IOXPUT_16(isp, src->snscb_addr[0], &dst->snscb_addr[0]); + ISP_IOXPUT_16(isp, src->snscb_addr[1], &dst->snscb_addr[1]); + ISP_IOXPUT_16(isp, src->snscb_addr[2], &dst->snscb_addr[2]); + ISP_IOXPUT_16(isp, src->snscb_addr[3], &dst->snscb_addr[3]); + ISP_IOXPUT_16(isp, src->snscb_sblen, &dst->snscb_sblen); + ISP_IOXPUT_16(isp, src->snscb_reserved1, &dst->snscb_reserved1); + ISP_IOXPUT_16(isp, src->snscb_cmd, &dst->snscb_cmd); + ISP_IOXPUT_16(isp, src->snscb_mword_div_2, &dst->snscb_mword_div_2); + ISP_IOXPUT_32(isp, src->snscb_reserved3, &dst->snscb_reserved3); + ISP_IOXPUT_32(isp, src->snscb_portid, &dst->snscb_portid); } void -isp_get_gid_ft_response(ispsoftc_t *isp, sns_gid_ft_rsp_t *src, sns_gid_ft_rsp_t *dst, int nwords) +isp_get_gid_xx_response(ispsoftc_t *isp, sns_gid_xx_rsp_t *src, sns_gid_xx_rsp_t *dst, int nwords) { - int i; + int i, j; + isp_get_ct_hdr(isp, &src->snscb_cthdr, &dst->snscb_cthdr); for (i = 0; i < nwords; i++) { - int j; - ISP_IOXGET_8(isp, &src->snscb_ports[i].control, dst->snscb_ports[i].control); + ISP_IOZGET_8(isp, &src->snscb_ports[i].control, + dst->snscb_ports[i].control); for (j = 0; j < 3; j++) { - ISP_IOXGET_8(isp, &src->snscb_ports[i].portid[j], dst->snscb_ports[i].portid[j]); + ISP_IOZGET_8(isp, &src->snscb_ports[i].portid[j], + dst->snscb_ports[i].portid[j]); } - if (dst->snscb_ports[i].control & 0x80) { + if (dst->snscb_ports[i].control & 0x80) break; - } } } @@ -1802,9 +1801,21 @@ void isp_get_gxn_id_response(ispsoftc_t *isp, sns_gxn_id_rsp_t *src, sns_gxn_id_rsp_t *dst) { int i; + isp_get_ct_hdr(isp, &src->snscb_cthdr, &dst->snscb_cthdr); + for (i = 0; i < 8; i++) + ISP_IOZGET_8(isp, &src->snscb_wwn[i], dst->snscb_wwn[i]); +} + +void +isp_get_gft_id_response(ispsoftc_t *isp, sns_gft_id_rsp_t *src, sns_gft_id_rsp_t *dst) +{ + int i; + + isp_get_ct_hdr(isp, &src->snscb_cthdr, &dst->snscb_cthdr); for (i = 0; i < 8; i++) { - ISP_IOXGET_8(isp, &src->snscb_wwn[i], dst->snscb_wwn[i]); + ISP_IOZGET_32(isp, &src->snscb_fc4_types[i], + dst->snscb_fc4_types[i]); } } @@ -1812,9 +1823,11 @@ void isp_get_gff_id_response(ispsoftc_t *isp, sns_gff_id_rsp_t *src, sns_gff_id_rsp_t *dst) { int i; + isp_get_ct_hdr(isp, &src->snscb_cthdr, &dst->snscb_cthdr); for (i = 0; i < 32; i++) { - ISP_IOXGET_32(isp, &src->snscb_fc4_features[i], dst->snscb_fc4_features[i]); + ISP_IOZGET_32(isp, &src->snscb_fc4_features[i], + dst->snscb_fc4_features[i]); } } @@ -1823,42 +1836,42 @@ isp_get_ga_nxt_response(ispsoftc_t *isp, sns_ga_nxt_rs { int i; isp_get_ct_hdr(isp, &src->snscb_cthdr, &dst->snscb_cthdr); - ISP_IOXGET_8(isp, &src->snscb_port_type, dst->snscb_port_type); + ISP_IOZGET_8(isp, &src->snscb_port_type, dst->snscb_port_type); for (i = 0; i < 3; i++) { - ISP_IOXGET_8(isp, &src->snscb_port_id[i], dst->snscb_port_id[i]); + ISP_IOZGET_8(isp, &src->snscb_port_id[i], dst->snscb_port_id[i]); } for (i = 0; i < 8; i++) { - ISP_IOXGET_8(isp, &src->snscb_portname[i], dst->snscb_portname[i]); + ISP_IOZGET_8(isp, &src->snscb_portname[i], dst->snscb_portname[i]); } - ISP_IOXGET_8(isp, &src->snscb_pnlen, dst->snscb_pnlen); + ISP_IOZGET_8(isp, &src->snscb_pnlen, dst->snscb_pnlen); for (i = 0; i < 255; i++) { - ISP_IOXGET_8(isp, &src->snscb_pname[i], dst->snscb_pname[i]); + ISP_IOZGET_8(isp, &src->snscb_pname[i], dst->snscb_pname[i]); } for (i = 0; i < 8; i++) { - ISP_IOXGET_8(isp, &src->snscb_nodename[i], dst->snscb_nodename[i]); + ISP_IOZGET_8(isp, &src->snscb_nodename[i], dst->snscb_nodename[i]); } - ISP_IOXGET_8(isp, &src->snscb_nnlen, dst->snscb_nnlen); + ISP_IOZGET_8(isp, &src->snscb_nnlen, dst->snscb_nnlen); for (i = 0; i < 255; i++) { - ISP_IOXGET_8(isp, &src->snscb_nname[i], dst->snscb_nname[i]); + ISP_IOZGET_8(isp, &src->snscb_nname[i], dst->snscb_nname[i]); } for (i = 0; i < 8; i++) { - ISP_IOXGET_8(isp, &src->snscb_ipassoc[i], dst->snscb_ipassoc[i]); + ISP_IOZGET_8(isp, &src->snscb_ipassoc[i], dst->snscb_ipassoc[i]); } for (i = 0; i < 16; i++) { - ISP_IOXGET_8(isp, &src->snscb_ipaddr[i], dst->snscb_ipaddr[i]); + ISP_IOZGET_8(isp, &src->snscb_ipaddr[i], dst->snscb_ipaddr[i]); } for (i = 0; i < 4; i++) { - ISP_IOXGET_8(isp, &src->snscb_svc_class[i], dst->snscb_svc_class[i]); + ISP_IOZGET_8(isp, &src->snscb_svc_class[i], dst->snscb_svc_class[i]); } for (i = 0; i < 32; i++) { - ISP_IOXGET_8(isp, &src->snscb_fc4_types[i], dst->snscb_fc4_types[i]); + ISP_IOZGET_8(isp, &src->snscb_fc4_types[i], dst->snscb_fc4_types[i]); } for (i = 0; i < 8; i++) { - ISP_IOXGET_8(isp, &src->snscb_fpname[i], dst->snscb_fpname[i]); + ISP_IOZGET_8(isp, &src->snscb_fpname[i], dst->snscb_fpname[i]); } - ISP_IOXGET_8(isp, &src->snscb_reserved, dst->snscb_reserved); + ISP_IOZGET_8(isp, &src->snscb_reserved, dst->snscb_reserved); for (i = 0; i < 3; i++) { - ISP_IOXGET_8(isp, &src->snscb_hardaddr[i], dst->snscb_hardaddr[i]); + ISP_IOZGET_8(isp, &src->snscb_hardaddr[i], dst->snscb_hardaddr[i]); } } Modified: head/sys/dev/isp/isp_library.h ============================================================================== --- head/sys/dev/isp/isp_library.h Mon Jul 3 15:54:44 2017 (r320603) +++ head/sys/dev/isp/isp_library.h Mon Jul 3 15:56:45 2017 (r320604) @@ -1,5 +1,6 @@ /* $FreeBSD$ */ /*- + * Copyright (c) 2009-2017 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -127,10 +128,11 @@ void isp_put_ct_pt(ispsoftc_t *isp, isp_ct_pt_t *, isp void isp_put_ms(ispsoftc_t *isp, isp_ms_t *, isp_ms_t *); void isp_put_sns_request(ispsoftc_t *, sns_screq_t *, sns_screq_t *); void isp_put_gid_ft_request(ispsoftc_t *, sns_gid_ft_req_t *, sns_gid_ft_req_t *); -void isp_put_gxn_id_request(ispsoftc_t *, sns_gxn_id_req_t *, sns_gxn_id_req_t *); -void isp_get_sns_response(ispsoftc_t *, sns_scrsp_t *, sns_scrsp_t *, int); -void isp_get_gid_ft_response(ispsoftc_t *, sns_gid_ft_rsp_t *, sns_gid_ft_rsp_t *, int); +void isp_put_gid_pt_request(ispsoftc_t *, sns_gid_pt_req_t *, sns_gid_pt_req_t *); +void isp_put_gxx_id_request(ispsoftc_t *, sns_gxx_id_req_t *, sns_gxx_id_req_t *); +void isp_get_gid_xx_response(ispsoftc_t *, sns_gid_xx_rsp_t *, sns_gid_xx_rsp_t *, int); void isp_get_gxn_id_response(ispsoftc_t *, sns_gxn_id_rsp_t *, sns_gxn_id_rsp_t *); +void isp_get_gft_id_response(ispsoftc_t *, sns_gft_id_rsp_t *, sns_gft_id_rsp_t *); void isp_get_gff_id_response(ispsoftc_t *, sns_gff_id_rsp_t *, sns_gff_id_rsp_t *); void isp_get_ga_nxt_response(ispsoftc_t *, sns_ga_nxt_rsp_t *, sns_ga_nxt_rsp_t *); void isp_get_els(ispsoftc_t *, els_t *, els_t *); Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Mon Jul 3 15:54:44 2017 (r320603) +++ head/sys/dev/isp/ispmbox.h Mon Jul 3 15:56:45 2017 (r320604) @@ -1,5 +1,6 @@ /* $FreeBSD$ */ /*- + * Copyright (c) 2009-2017 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -1551,6 +1552,7 @@ typedef struct { #define SNS_GA_NXT 0x100 #define SNS_GPN_ID 0x112 #define SNS_GNN_ID 0x113 +#define SNS_GFT_ID 0x117 #define SNS_GFF_ID 0x11F #define SNS_GID_FT 0x171 #define SNS_GID_PT 0x1A1 @@ -1580,18 +1582,18 @@ typedef struct { } sns_ga_nxt_req_t; #define SNS_GA_NXT_REQ_SIZE (sizeof (sns_ga_nxt_req_t)) -typedef struct { +typedef struct { /* Used for GFT_ID, GFF_ID, etc. */ uint16_t snscb_rblen; /* response buffer length (words) */ uint16_t snscb_reserved0; uint16_t snscb_addr[4]; /* response buffer address */ uint16_t snscb_sblen; /* subcommand buffer length (words) */ uint16_t snscb_reserved1; uint16_t snscb_cmd; - uint16_t snscb_reserved2; + uint16_t snscb_mword_div_2; uint32_t snscb_reserved3; uint32_t snscb_portid; -} sns_gxn_id_req_t; -#define SNS_GXN_ID_REQ_SIZE (sizeof (sns_gxn_id_req_t)) +} sns_gxx_id_req_t; +#define SNS_GXX_ID_REQ_SIZE (sizeof (sns_gxx_id_req_t)) typedef struct { uint16_t snscb_rblen; /* response buffer length (words) */ @@ -1613,6 +1615,22 @@ typedef struct { uint16_t snscb_sblen; /* subcommand buffer length (words) */ uint16_t snscb_reserved1; uint16_t snscb_cmd; + uint16_t snscb_mword_div_2; + uint32_t snscb_reserved3; + uint8_t snscb_port_type; + uint8_t snscb_domain; + uint8_t snscb_area; + uint8_t snscb_flags; +} sns_gid_pt_req_t; +#define SNS_GID_PT_REQ_SIZE (sizeof (sns_gid_pt_req_t)) + +typedef struct { + uint16_t snscb_rblen; /* response buffer length (words) */ + uint16_t snscb_reserved0; + uint16_t snscb_addr[4]; /* response buffer address */ + uint16_t snscb_sblen; /* subcommand buffer length (words) */ + uint16_t snscb_reserved1; + uint16_t snscb_cmd; uint16_t snscb_reserved2; uint32_t snscb_reserved3; uint32_t snscb_port; @@ -1656,18 +1674,24 @@ typedef struct { typedef struct { ct_hdr_t snscb_cthdr; + uint32_t snscb_fc4_types[8]; +} sns_gft_id_rsp_t; +#define SNS_GFT_ID_RESP_SIZE (sizeof (sns_gft_id_rsp_t)) + +typedef struct { + ct_hdr_t snscb_cthdr; uint32_t snscb_fc4_features[32]; } sns_gff_id_rsp_t; #define SNS_GFF_ID_RESP_SIZE (sizeof (sns_gff_id_rsp_t)) -typedef struct { +typedef struct { /* Used for GID_FT, GID_PT, etc. */ ct_hdr_t snscb_cthdr; struct { uint8_t control; uint8_t portid[3]; } snscb_ports[1]; -} sns_gid_ft_rsp_t; -#define SNS_GID_FT_RESP_SIZE(x) ((sizeof (sns_gid_ft_rsp_t)) + ((x - 1) << 2)) +} sns_gid_xx_rsp_t; +#define SNS_GID_XX_RESP_SIZE(x) ((sizeof (sns_gid_xx_rsp_t)) + ((x - 1) << 2)) /* * Other Misc Structures Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Mon Jul 3 15:54:44 2017 (r320603) +++ head/sys/dev/isp/ispvar.h Mon Jul 3 15:56:45 2017 (r320604) @@ -1,5 +1,6 @@ /* $FreeBSD$ */ /*- + * Copyright (c) 2009-2017 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -446,6 +447,8 @@ typedef struct { uint16_t isp_login_hdl; /* Logging in handle */ uint8_t isp_retry_delay; uint8_t isp_retry_count; + int isp_use_gft_id; /* Use GFT_ID */ + int isp_use_gff_id; /* Use GFF_ID */ /* * Current active WWNN/WWPN From owner-svn-src-head@freebsd.org Mon Jul 3 18:02:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3847F9EC3DB; Mon, 3 Jul 2017 18:02:00 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01CCF7A0A7; Mon, 3 Jul 2017 18:01:59 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63I1xk6029079; Mon, 3 Jul 2017 18:01:59 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63I1xCf029077; Mon, 3 Jul 2017 18:01:59 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201707031801.v63I1xCf029077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 3 Jul 2017 18:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320606 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 320606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 18:02:00 -0000 Author: manu Date: Mon Jul 3 18:01:58 2017 New Revision: 320606 URL: https://svnweb.freebsd.org/changeset/base/320606 Log: arm: gic: Change GIC_DEBUG_SPURIOUS to TUNABLE On armv6 default to 1 if INVARIANTS is set On arm64 always default to 0 Discussed with: andrew, ian, mmel Modified: head/sys/arm/arm/gic.c head/sys/arm/arm/gic.h Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Mon Jul 3 16:40:05 2017 (r320605) +++ head/sys/arm/arm/gic.c Mon Jul 3 18:01:58 2017 (r320606) @@ -145,6 +145,14 @@ static struct resource_spec arm_gic_spec[] = { { -1, 0 } }; + +#if defined(__arm__) && defined(INVARIANTS) +static int gic_debug_spurious = 1; +#else +static int gic_debug_spurious = 0; +#endif +TUNABLE_INT("hw.gic.debug_spurious", &gic_debug_spurious); + static u_int arm_gic_map[MAXCPU]; static struct arm_gic_softc *gic_sc = NULL; @@ -671,11 +679,10 @@ arm_gic_intr(void *arg) */ if (irq >= sc->nirqs) { -#ifdef GIC_DEBUG_SPURIOUS - device_printf(sc->gic_dev, - "Spurious interrupt detected: last irq: %d on CPU%d\n", - sc->last_irq[PCPU_GET(cpuid)], PCPU_GET(cpuid)); -#endif + if (gic_debug_spurious) + device_printf(sc->gic_dev, + "Spurious interrupt detected: last irq: %d on CPU%d\n", + sc->last_irq[PCPU_GET(cpuid)], PCPU_GET(cpuid)); return (FILTER_HANDLED); } @@ -700,9 +707,8 @@ dispatch_irq: #endif } -#ifdef GIC_DEBUG_SPURIOUS - sc->last_irq[PCPU_GET(cpuid)] = irq; -#endif + if (gic_debug_spurious) + sc->last_irq[PCPU_GET(cpuid)] = irq; if ((gi->gi_flags & GI_FLAG_EARLY_EOI) == GI_FLAG_EARLY_EOI) gic_c_write_4(sc, GICC_EOIR, irq_active_reg); Modified: head/sys/arm/arm/gic.h ============================================================================== --- head/sys/arm/arm/gic.h Mon Jul 3 16:40:05 2017 (r320605) +++ head/sys/arm/arm/gic.h Mon Jul 3 18:01:58 2017 (r320606) @@ -39,8 +39,6 @@ #ifndef _ARM_GIC_H_ #define _ARM_GIC_H_ -#define GIC_DEBUG_SPURIOUS - #define GIC_FIRST_SGI 0 /* Irqs 0-15 are SGIs/IPIs. */ #define GIC_LAST_SGI 15 #define GIC_FIRST_PPI 16 /* Irqs 16-31 are private (per */ @@ -70,9 +68,7 @@ struct arm_gic_softc { struct mtx mutex; uint32_t nirqs; uint32_t typer; -#ifdef GIC_DEBUG_SPURIOUS uint32_t last_irq[MAXCPU]; -#endif #ifdef INTRNG uint32_t gic_iidr; From owner-svn-src-head@freebsd.org Mon Jul 3 18:17:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B17269EC8C0; Mon, 3 Jul 2017 18:17:28 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 919A07AA62; Mon, 3 Jul 2017 18:17:28 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id D411210795; Mon, 3 Jul 2017 18:17:27 +0000 (UTC) Date: Mon, 3 Jul 2017 18:17:27 +0000 From: Alexey Dokuchaev To: Pedro Giffuni Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r320579 - head/usr.bin/patch Message-ID: <20170703181727.GA99316@FreeBSD.org> References: <201707022100.v62L0Ume001253@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 18:17:28 -0000 On Mon, Jul 03, 2017 at 10:42:15AM -0500, Pedro Giffuni wrote: > On 07/02/17 21:53, Conrad Meyer wrote: > > Does this change the behavior of 'patch -p1' (for example) with 'git > > diff' generated diffs? So patches that could be applied with -p1 > > before now need to be applied with -p0? Or is this a different mode > > of patch? > > IMHO, the (new) BSD patch behavior is somewhat more natural in the sense > that no one asked git to add a prefix to the path so it makes sense to > ignore it. But -p1 already solves the problem; why add any ad-hoc handling to some particular program that tends to generate patches whatever the way it does? ./danfe From owner-svn-src-head@freebsd.org Mon Jul 3 18:23:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA29F9ECBB2; Mon, 3 Jul 2017 18:23:36 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B29E37B0CD; Mon, 3 Jul 2017 18:23:36 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63INa5O037625; Mon, 3 Jul 2017 18:23:36 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63INZXm037620; Mon, 3 Jul 2017 18:23:35 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201707031823.v63INZXm037620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 3 Jul 2017 18:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320609 - in head/sys: dev/bnxt net X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: in head/sys: dev/bnxt net X-SVN-Commit-Revision: 320609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 18:23:37 -0000 Author: sbruno Date: Mon Jul 3 18:23:35 2017 New Revision: 320609 URL: https://svnweb.freebsd.org/changeset/base/320609 Log: bnxt(4) Enable LRO support, redux iflib - reset fl-ifl_fragidx to 0 on iflib_fl_bufs_free(). This caused the panic in em/igb when adding it to a bridge device. iflib - Handle out of order packet delivery from hardware in support of LRO Out of order updates to rxd's is fixed in r315217. However, it is not completely fixed. While refilling the buffers, iflib is not considering the out of order descriptors. Hence, it is refilling sequentially. "idx" variable in _iflib_fl_refill routine is incremented sequentially. By doing refilling sequentially, it will override the SGEs that are *IN USE* by other connections. Fix is to maintain a bitmap of rx descriptors and differentiate the used one with unused one and refill only at the unused indices. This patch also fixes a few bugs in bnxt, related to the same feature. Submitted by: bhargava.marreddy@broadcom.com Reviewed by: venkatkumar.duvvuru@broadcom.com shurd Differential Revision: https://reviews.freebsd.org/D10681 Modified: head/sys/dev/bnxt/bnxt.h head/sys/dev/bnxt/bnxt_hwrm.c head/sys/dev/bnxt/bnxt_txrx.c head/sys/dev/bnxt/if_bnxt.c head/sys/net/iflib.c Modified: head/sys/dev/bnxt/bnxt.h ============================================================================== --- head/sys/dev/bnxt/bnxt.h Mon Jul 3 18:20:45 2017 (r320608) +++ head/sys/dev/bnxt/bnxt.h Mon Jul 3 18:23:35 2017 (r320609) @@ -438,6 +438,7 @@ struct bnxt_ring { uint32_t ring_size; /* Must be a power of two */ uint16_t id; /* Logical ID */ uint16_t phys_id; + struct bnxt_full_tpa_start *tpa_start; }; struct bnxt_cp_ring { @@ -564,7 +565,6 @@ struct bnxt_softc { struct sysctl_ctx_list hw_stats; struct sysctl_oid *hw_stats_oid; - struct bnxt_full_tpa_start *tpa_start; struct bnxt_ver_info *ver_info; struct bnxt_nvram_info *nvm_info; bool wol; Modified: head/sys/dev/bnxt/bnxt_hwrm.c ============================================================================== --- head/sys/dev/bnxt/bnxt_hwrm.c Mon Jul 3 18:20:45 2017 (r320608) +++ head/sys/dev/bnxt/bnxt_hwrm.c Mon Jul 3 18:23:35 2017 (r320609) @@ -935,7 +935,7 @@ bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, struc /* TODO: Calculate this based on ring size? */ req.max_agg_segs = htole16(3); /* Base this in the allocated TPA start size... */ - req.max_aggs = htole16(2); + req.max_aggs = htole16(7); /* * TODO: max_agg_timer? * req.mag_agg_timer = htole32(XXX); Modified: head/sys/dev/bnxt/bnxt_txrx.c ============================================================================== --- head/sys/dev/bnxt/bnxt_txrx.c Mon Jul 3 18:20:45 2017 (r320608) +++ head/sys/dev/bnxt/bnxt_txrx.c Mon Jul 3 18:23:35 2017 (r320609) @@ -264,6 +264,7 @@ bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru) uint8_t flid; uint64_t *paddrs; caddr_t *vaddrs; + qidx_t *frag_idxs; rxqid = iru->iru_qsidx; count = iru->iru_count; @@ -272,6 +273,7 @@ bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru) flid = iru->iru_flidx; vaddrs = iru->iru_vaddrs; paddrs = iru->iru_paddrs; + frag_idxs = iru->iru_idxs; if (flid == 0) { rx_ring = &softc->rx_rings[rxqid]; @@ -287,8 +289,8 @@ bnxt_isc_rxd_refill(void *sc, if_rxd_update_t iru) rxbd[pidx].flags_type = htole16(type); rxbd[pidx].len = htole16(len); /* No need to byte-swap the opaque value */ - rxbd[pidx].opaque = ((rxqid & 0xff) << 24) | (flid << 16) - | pidx; + rxbd[pidx].opaque = (((rxqid & 0xff) << 24) | (flid << 16) + | (frag_idxs[i])); rxbd[pidx].addr = htole64(paddrs[i]); if (++pidx == rx_ring->ring_size) pidx = 0; @@ -329,7 +331,6 @@ bnxt_isc_rxd_available(void *sc, uint16_t rxqid, qidx_ struct bnxt_softc *softc = (struct bnxt_softc *)sc; struct bnxt_cp_ring *cpr = &softc->rx_cp_rings[rxqid]; struct rx_pkt_cmpl *rcp; - struct rx_tpa_start_cmpl *rtpa; struct rx_tpa_end_cmpl *rtpae; struct cmpl_base *cmp = (struct cmpl_base *)cpr->ring.vaddr; int avail = 0; @@ -338,7 +339,6 @@ bnxt_isc_rxd_available(void *sc, uint16_t rxqid, qidx_ uint8_t ags; int i; uint16_t type; - uint8_t agg_id; for (;;) { NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); @@ -388,18 +388,11 @@ bnxt_isc_rxd_available(void *sc, uint16_t rxqid, qidx_ avail++; break; case CMPL_BASE_TYPE_RX_TPA_START: - rtpa = (void *)&cmp[cons]; - agg_id = (rtpa->agg_id & - RX_TPA_START_CMPL_AGG_ID_MASK) >> - RX_TPA_START_CMPL_AGG_ID_SFT; - softc->tpa_start[agg_id].low = *rtpa; NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); CMPL_PREFETCH_NEXT(cpr, cons); if (!CMP_VALID(&cmp[cons], v_bit)) goto cmpl_invalid; - softc->tpa_start[agg_id].high = - ((struct rx_tpa_start_cmpl_hi *)cmp)[cons]; break; case CMPL_BASE_TYPE_RX_AGG: break; @@ -549,7 +542,7 @@ bnxt_pkt_get_tpa(struct bnxt_softc *softc, if_rxd_info /* Get the agg_id */ agg_id = (agend->agg_id & RX_TPA_END_CMPL_AGG_ID_MASK) >> RX_TPA_END_CMPL_AGG_ID_SFT; - tpas = &softc->tpa_start[agg_id]; + tpas = &(softc->rx_rings[ri->iri_qsidx].tpa_start[agg_id]); /* Extract from the first 16-byte BD */ if (le16toh(tpas->low.flags_type) & RX_TPA_START_CMPL_FLAGS_RSS_VALID) { @@ -563,8 +556,8 @@ bnxt_pkt_get_tpa(struct bnxt_softc *softc, if_rxd_info RX_TPA_END_CMPL_AGG_BUFS_SFT; ri->iri_nfrags = ags + 1; /* No need to byte-swap the opaque value */ - ri->iri_frags[0].irf_flid = (tpas->low.opaque >> 16) & 0xff; - ri->iri_frags[0].irf_idx = tpas->low.opaque & 0xffff; + ri->iri_frags[0].irf_flid = ((tpas->low.opaque >> 16) & 0xff); + ri->iri_frags[0].irf_idx = (tpas->low.opaque & 0xffff); ri->iri_frags[0].irf_len = le16toh(tpas->low.len); ri->iri_len = le16toh(tpas->low.len); @@ -600,8 +593,8 @@ bnxt_pkt_get_tpa(struct bnxt_softc *softc, if_rxd_info acp = &((struct rx_abuf_cmpl *)cpr->ring.vaddr)[cpr->cons]; /* No need to byte-swap the opaque value */ - ri->iri_frags[i].irf_flid = (acp->opaque >> 16) & 0xff; - ri->iri_frags[i].irf_idx = acp->opaque & 0xffff; + ri->iri_frags[i].irf_flid = ((acp->opaque >> 16) & 0xff); + ri->iri_frags[i].irf_idx = (acp->opaque & 0xffff); ri->iri_frags[i].irf_len = le16toh(acp->len); ri->iri_len += le16toh(acp->len); } @@ -609,8 +602,8 @@ bnxt_pkt_get_tpa(struct bnxt_softc *softc, if_rxd_info /* And finally, the empty BD at the end... */ ri->iri_nfrags++; /* No need to byte-swap the opaque value */ - ri->iri_frags[i].irf_flid = (agend->opaque >> 16) % 0xff; - ri->iri_frags[i].irf_idx = agend->opaque & 0xffff; + ri->iri_frags[i].irf_flid = ((agend->opaque >> 16) & 0xff); + ri->iri_frags[i].irf_idx = (agend->opaque & 0xffff); ri->iri_frags[i].irf_len = le16toh(agend->len); ri->iri_len += le16toh(agend->len); @@ -623,9 +616,12 @@ bnxt_isc_rxd_pkt_get(void *sc, if_rxd_info_t ri) { struct bnxt_softc *softc = (struct bnxt_softc *)sc; struct bnxt_cp_ring *cpr = &softc->rx_cp_rings[ri->iri_qsidx]; + struct cmpl_base *cmp_q = (struct cmpl_base *)cpr->ring.vaddr; struct cmpl_base *cmp; + struct rx_tpa_start_cmpl *rtpa; uint16_t flags_type; uint16_t type; + uint8_t agg_id; for (;;) { NEXT_CP_CONS_V(&cpr->ring, cpr->cons, cpr->v_bit); @@ -642,9 +638,18 @@ bnxt_isc_rxd_pkt_get(void *sc, if_rxd_info_t ri) case CMPL_BASE_TYPE_RX_TPA_END: return bnxt_pkt_get_tpa(softc, ri, cpr, flags_type); case CMPL_BASE_TYPE_RX_TPA_START: + rtpa = (void *)&cmp_q[cpr->cons]; + agg_id = (rtpa->agg_id & + RX_TPA_START_CMPL_AGG_ID_MASK) >> + RX_TPA_START_CMPL_AGG_ID_SFT; + softc->rx_rings[ri->iri_qsidx].tpa_start[agg_id].low = *rtpa; + NEXT_CP_CONS_V(&cpr->ring, cpr->cons, cpr->v_bit); ri->iri_cidx = RING_NEXT(&cpr->ring, ri->iri_cidx); CMPL_PREFETCH_NEXT(cpr, cpr->cons); + + softc->rx_rings[ri->iri_qsidx].tpa_start[agg_id].high = + ((struct rx_tpa_start_cmpl_hi *)cmp_q)[cpr->cons]; break; default: device_printf(softc->dev, Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Mon Jul 3 18:20:45 2017 (r320608) +++ head/sys/dev/bnxt/if_bnxt.c Mon Jul 3 18:23:35 2017 (r320609) @@ -506,6 +506,17 @@ bnxt_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, softc->rx_rings[i].vaddr = vaddrs[i * nrxqs + 1]; softc->rx_rings[i].paddr = paddrs[i * nrxqs + 1]; + /* Allocate the TPA start buffer */ + softc->rx_rings[i].tpa_start = malloc(sizeof(struct bnxt_full_tpa_start) * + (RX_TPA_START_CMPL_AGG_ID_MASK >> RX_TPA_START_CMPL_AGG_ID_SFT), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (softc->rx_rings[i].tpa_start == NULL) { + rc = -ENOMEM; + device_printf(softc->dev, + "Unable to allocate space for TPA\n"); + goto tpa_alloc_fail; + } + /* Allocate the AG ring */ softc->ag_rings[i].phys_id = (uint16_t)HWRM_NA_SIGNATURE; softc->ag_rings[i].softc = softc; @@ -571,7 +582,10 @@ rss_grp_alloc_fail: iflib_dma_free(&softc->vnic_info.rss_hash_key_tbl); rss_hash_alloc_fail: iflib_dma_free(&softc->vnic_info.mc_list); +tpa_alloc_fail: mc_list_alloc_fail: + for (i = i - 1; i >= 0; i--) + free(softc->rx_rings[i].tpa_start, M_DEVBUF); iflib_dma_free(&softc->rx_stats); hw_stats_alloc_fail: free(softc->grp_info, M_DEVBUF); @@ -635,16 +649,6 @@ bnxt_attach_pre(if_ctx_t ctx) if (rc) goto dma_fail; - /* Allocate the TPA start buffer */ - softc->tpa_start = malloc(sizeof(struct bnxt_full_tpa_start) * - (RX_TPA_START_CMPL_AGG_ID_MASK >> RX_TPA_START_CMPL_AGG_ID_SFT), - M_DEVBUF, M_NOWAIT | M_ZERO); - if (softc->tpa_start == NULL) { - rc = ENOMEM; - device_printf(softc->dev, - "Unable to allocate space for TPA\n"); - goto tpa_failed; - } /* Get firmware version and compare with driver */ softc->ver_info = malloc(sizeof(struct bnxt_ver_info), @@ -814,8 +818,6 @@ nvm_alloc_fail: ver_fail: free(softc->ver_info, M_DEVBUF); ver_alloc_fail: - free(softc->tpa_start, M_DEVBUF); -tpa_failed: bnxt_free_hwrm_dma_mem(softc); dma_fail: BNXT_HWRM_LOCK_DESTROY(softc); @@ -877,7 +879,8 @@ bnxt_detach(if_ctx_t ctx) SLIST_FOREACH_SAFE(tag, &softc->vnic_info.vlan_tags, next, tmp) free(tag, M_DEVBUF); iflib_dma_free(&softc->def_cp_ring_mem); - free(softc->tpa_start, M_DEVBUF); + for (i = 0; i < softc->nrxqsets; i++) + free(softc->rx_rings[i].tpa_start, M_DEVBUF); free(softc->ver_info, M_DEVBUF); free(softc->nvm_info, M_DEVBUF); @@ -1009,14 +1012,17 @@ bnxt_init(if_ctx_t ctx) if (rc) goto fail; -#ifdef notyet - /* Enable LRO/TPA/GRO */ + /* + * Enable LRO/TPA/GRO + * TBD: + * Enable / Disable HW_LRO based on + * ifconfig lro / ifconfig -lro setting + */ rc = bnxt_hwrm_vnic_tpa_cfg(softc, &softc->vnic_info, (if_getcapenable(iflib_get_ifp(ctx)) & IFCAP_LRO) ? HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA : 0); if (rc) goto fail; -#endif for (i = 0; i < softc->ntxqsets; i++) { /* Allocate the statistics context */ Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Jul 3 18:20:45 2017 (r320608) +++ head/sys/net/iflib.c Mon Jul 3 18:23:35 2017 (r320609) @@ -93,6 +93,7 @@ __FBSDID("$FreeBSD$"); #include #endif +#include /* * enable accounting of every mbuf as it comes in to and goes out of * iflib's software descriptor references @@ -381,6 +382,8 @@ struct iflib_fl { #endif /* implicit pad */ + bitstr_t *ifl_rx_bitmap; + qidx_t ifl_fragidx; /* constant */ qidx_t ifl_size; uint16_t ifl_buf_size; @@ -1797,7 +1800,8 @@ static void _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int count) { struct mbuf *m; - int idx, pidx = fl->ifl_pidx; + int idx, frag_idx = fl->ifl_fragidx; + int pidx = fl->ifl_pidx; caddr_t cl, *sd_cl; struct mbuf **sd_m; uint8_t *sd_flags; @@ -1840,8 +1844,11 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun * * If the cluster is still set then we know a minimum sized packet was received */ - if ((cl = sd_cl[idx]) == NULL) { - if ((cl = sd_cl[idx] = m_cljget(NULL, M_NOWAIT, fl->ifl_buf_size)) == NULL) + bit_ffc_at(fl->ifl_rx_bitmap, frag_idx, fl->ifl_size, &frag_idx); + if ((frag_idx < 0) || (frag_idx >= fl->ifl_size)) + bit_ffc(fl->ifl_rx_bitmap, fl->ifl_size, &frag_idx); + if ((cl = sd_cl[frag_idx]) == NULL) { + if ((cl = sd_cl[frag_idx] = m_cljget(NULL, M_NOWAIT, fl->ifl_buf_size)) == NULL) break; #if MEMORY_LOGGING fl->ifl_cl_enqueued++; @@ -1867,10 +1874,11 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun cb_arg.error = 0; q = fl->ifl_rxq; MPASS(sd_map != NULL); - MPASS(sd_map[idx] != NULL); - err = bus_dmamap_load(fl->ifl_desc_tag, sd_map[idx], + MPASS(sd_map[frag_idx] != NULL); + err = bus_dmamap_load(fl->ifl_desc_tag, sd_map[frag_idx], cl, fl->ifl_buf_size, _rxq_refill_cb, &cb_arg, 0); - bus_dmamap_sync(fl->ifl_desc_tag, sd_map[idx], BUS_DMASYNC_PREREAD); + bus_dmamap_sync(fl->ifl_desc_tag, sd_map[frag_idx], + BUS_DMASYNC_PREREAD); if (err != 0 || cb_arg.error) { /* @@ -1884,12 +1892,13 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun } bus_addr = cb_arg.seg.ds_addr; } - sd_flags[idx] |= RX_SW_DESC_INUSE; + bit_set(fl->ifl_rx_bitmap, frag_idx); + sd_flags[frag_idx] |= RX_SW_DESC_INUSE; - MPASS(sd_m[idx] == NULL); - sd_cl[idx] = cl; - sd_m[idx] = m; - fl->ifl_rxd_idxs[i] = idx; + MPASS(sd_m[frag_idx] == NULL); + sd_cl[frag_idx] = cl; + sd_m[frag_idx] = m; + fl->ifl_rxd_idxs[i] = frag_idx; fl->ifl_bus_addrs[i] = bus_addr; fl->ifl_vm_addrs[i] = cl; fl->ifl_credits++; @@ -1905,8 +1914,8 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun ctx->isc_rxd_refill(ctx->ifc_softc, &iru); i = 0; pidx = idx; + fl->ifl_pidx = idx; } - fl->ifl_pidx = idx; } done: @@ -1920,6 +1929,7 @@ done: bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); ctx->isc_rxd_flush(ctx->ifc_softc, fl->ifl_rxq->ifr_id, fl->ifl_id, pidx); + fl->ifl_fragidx = frag_idx; } static __inline void @@ -1983,7 +1993,7 @@ iflib_fl_bufs_free(iflib_fl_t fl) /* * Reset free list values */ - fl->ifl_credits = fl->ifl_cidx = fl->ifl_pidx = fl->ifl_gen = 0;; + fl->ifl_credits = fl->ifl_cidx = fl->ifl_pidx = fl->ifl_gen = fl->ifl_fragidx = 0; bzero(idi->idi_vaddr, idi->idi_size); } @@ -1999,6 +2009,7 @@ iflib_fl_setup(iflib_fl_t fl) if_ctx_t ctx = rxq->ifr_ctx; if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; + bit_nclear(fl->ifl_rx_bitmap, 0, fl->ifl_size); /* ** Free current RX buffer structs and their mbufs */ @@ -2348,6 +2359,7 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, int if (map != NULL) bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + bit_clear(fl->ifl_rx_bitmap, cidx); } static struct mbuf * @@ -4243,8 +4255,9 @@ iflib_device_deregister(if_ctx_t ctx) iflib_txq_t txq; iflib_rxq_t rxq; device_t dev = ctx->ifc_dev; - int i; + int i, j; struct taskqgroup *tqg; + iflib_fl_t fl; /* Make sure VLANS are not using driver */ if (if_vlantrunkinuse(ifp)) { @@ -4279,6 +4292,10 @@ iflib_device_deregister(if_ctx_t ctx) for (i = 0, rxq = ctx->ifc_rxqs; i < NRXQSETS(ctx); i++, rxq++) { if (rxq->ifr_task.gt_uniq != NULL) taskqgroup_detach(tqg, &rxq->ifr_task); + + for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) + free(fl->ifl_rx_bitmap, M_IFLIB); + } tqg = qgroup_if_config_tqg; if (ctx->ifc_admin_task.gt_uniq != NULL) @@ -4672,6 +4689,9 @@ iflib_queues_alloc(if_ctx_t ctx) err = ENOMEM; goto err_rx_desc; } + + for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) + fl->ifl_rx_bitmap = bit_alloc(fl->ifl_size, M_IFLIB, M_WAITOK|M_ZERO); } /* TXQs */ From owner-svn-src-head@freebsd.org Mon Jul 3 18:37:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFD0D9ED12E for ; Mon, 3 Jul 2017 18:37:49 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm17-vm6.bullet.mail.ne1.yahoo.com (nm17-vm6.bullet.mail.ne1.yahoo.com [98.138.91.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 974CB7BD28 for ; Mon, 3 Jul 2017 18:37:49 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1499106926; bh=dPzRn06/WdaSmPI/UOrQCAvXz6t5e6bCjvQgIGt24tQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=ibFO6UWn9hjQC+DU++xtNlm4pdhpSRRZsp2kqG8D9mYn5AkD/83Bm4YMmjfms9whkyKalO2iKB14JRI1hwzx5LI1V/hmr/rpGW8XjdjKE64Nbw5Y3HEtexA3P4QU+yemNzJbGBAK9lDxmVPaIG+8bDnQ/J6AL/SMaYflXoC57BbxQZpxoIvDR0OpN720R6j0tFu0+RTkokii6DOCePKpgD8jNgkjcNIR6BzfJVes7CCGt8KhF+srfXNXBCtV2vsVrNnzzRUMnMd/wISWPGFXGVleq4o5s/8+tJ3VclespH81h9ejUmQppf/5Z8VnyRVKEIVEDUjKK6nX7ADRp+Onyw== Received: from [98.138.100.112] by nm17.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jul 2017 18:35:26 -0000 Received: from [98.138.84.45] by tm103.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jul 2017 18:35:26 -0000 Received: from [127.0.0.1] by smtp113.mail.ne1.yahoo.com with NNFMP; 03 Jul 2017 18:35:26 -0000 X-Yahoo-Newman-Id: 971848.85011.bm@smtp113.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: jGUQSOgVM1lss2VQRMVN3Er0OcPmaiCuSxY20DxD7qKCrDw qzD5TL7r2is44ioW9fuSX4J_38Q3KyNfw3sBw6hink4eY50gw3m_ejaOohho 3lz1uczOQStYCsH71oQE8tBmhIYT6CAD7PDpF3Bh4qPuRJMeA1uqCCAMhXzo nmgcDRrrS0UjqC76LxW9enkyt2UfOumNsd5uNae_HOXA9amJndKC3LRkzqyc AvBB3qkePFNJlvUqmAwA3jouP6e.tOeKEgTX.JaESETzG4LwuwTX14B5t1J8 G6dREURoyY4SgNL8TcGOMvwSLHDTdlaVnncjSMsoSWIC5HaIoW_PYjbLWyMs bJcZvy5WSZ0q2AtDbwbjkk6amq7sizPFqIQRgRLTO56Tw_7eIzS.rU9HYXhO Q68C.BMS266vojm4DD7U_8XsKAYbTr4JnFqItAzMSZlEcaXgjIxw1iG8OI6m QyegZOcDPm171wZZzrdeeJCHm6gj4G8PuL61arC7U8YPmDjLqALQTMcsy2pp s.p6AAnvATaDd86nC_Ks- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r320579 - head/usr.bin/patch To: Alexey Dokuchaev Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201707022100.v62L0Ume001253@repo.freebsd.org> <20170703181727.GA99316@FreeBSD.org> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: Date: Mon, 3 Jul 2017 13:35:25 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170703181727.GA99316@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 18:37:49 -0000 On 7/3/2017 1:17 PM, Alexey Dokuchaev wrote: > On Mon, Jul 03, 2017 at 10:42:15AM -0500, Pedro Giffuni wrote: >> On 07/02/17 21:53, Conrad Meyer wrote: >>> Does this change the behavior of 'patch -p1' (for example) with 'git >>> diff' generated diffs? So patches that could be applied with -p1 >>> before now need to be applied with -p0? Or is this a different mode >>> of patch? >> IMHO, the (new) BSD patch behavior is somewhat more natural in the sense >> that no one asked git to add a prefix to the path so it makes sense to >> ignore it. > But -p1 already solves the problem; why add any ad-hoc handling to some > particular program that tends to generate patches whatever the way it > does? The behavior only applies to git diffs. Pedro. From owner-svn-src-head@freebsd.org Mon Jul 3 19:14:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 734D49EDE11; Mon, 3 Jul 2017 19:14:57 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 538287D7B2; Mon, 3 Jul 2017 19:14:57 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id AF90911F74; Mon, 3 Jul 2017 19:14:56 +0000 (UTC) Date: Mon, 3 Jul 2017 19:14:56 +0000 From: Alexey Dokuchaev To: Pedro Giffuni Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r320579 - head/usr.bin/patch Message-ID: <20170703191456.GB99316@FreeBSD.org> References: <201707022100.v62L0Ume001253@repo.freebsd.org> <20170703181727.GA99316@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 19:14:57 -0000 On Mon, Jul 03, 2017 at 01:35:25PM -0500, Pedro Giffuni wrote: > On 7/3/2017 1:17 PM, Alexey Dokuchaev wrote: > > On Mon, Jul 03, 2017 at 10:42:15AM -0500, Pedro Giffuni wrote: > >> On 07/02/17 21:53, Conrad Meyer wrote: > >>> Does this change the behavior of 'patch -p1' (for example) with 'git > >>> diff' generated diffs? So patches that could be applied with -p1 > >>> before now need to be applied with -p0? Or is this a different mode > >>> of patch? > >> > >> IMHO, the (new) BSD patch behavior is somewhat more natural in the sense > >> that no one asked git to add a prefix to the path so it makes sense to > >> ignore it. > > > > But -p1 already solves the problem; why add any ad-hoc handling to some > > particular program that tends to generate patches whatever the way it > > does? > > The behavior only applies to git diffs. But -p1 already solves the problem in a generic way. What good is to add specific code to make it git-or-next-cool-kid-on-the-block-aware? ./danfe From owner-svn-src-head@freebsd.org Mon Jul 3 19:23:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78BFD9EDFF6; Mon, 3 Jul 2017 19:23:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42A4A7DCB2; Mon, 3 Jul 2017 19:23:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63JNjbu063541; Mon, 3 Jul 2017 19:23:45 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63JNjmw063540; Mon, 3 Jul 2017 19:23:45 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201707031923.v63JNjmw063540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 3 Jul 2017 19:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320611 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 320611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 19:23:46 -0000 Author: sbruno Date: Mon Jul 3 19:23:45 2017 New Revision: 320611 URL: https://svnweb.freebsd.org/changeset/base/320611 Log: iflib - flib_busdma_load_mbuf_sg used isc_tx_maxsize as max semgent size. Submitted by: krzysztof.galazka@intel.com Differential Revision: https://reviews.freebsd.org/D11403 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Jul 3 18:42:26 2017 (r320610) +++ head/sys/net/iflib.c Mon Jul 3 19:23:45 2017 (r320611) @@ -2892,7 +2892,7 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag if_ctx_t ctx; if_shared_ctx_t sctx; if_softc_ctx_t scctx; - int i, next, pidx, err, maxsegsz, ntxd, count; + int i, next, pidx, err, ntxd, count; struct mbuf *m, *tmp, **ifsd_m; m = *m0; @@ -2935,13 +2935,17 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag m = m->m_next; } while (m != NULL); } else { - int buflen, sgsize, max_sgsize; + int buflen, sgsize, maxsegsz, max_sgsize; vm_offset_t vaddr; vm_paddr_t curaddr; count = i = 0; - maxsegsz = sctx->isc_tx_maxsize; m = *m0; + if (m->m_pkthdr.csum_flags & CSUM_TSO) + maxsegsz = scctx->isc_tx_tso_segsize_max; + else + maxsegsz = sctx->isc_tx_maxsegsize; + do { if (__predict_false(m->m_len <= 0)) { tmp = m; From owner-svn-src-head@freebsd.org Mon Jul 3 19:25:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CAEF9EE0BE for ; Mon, 3 Jul 2017 19:25:28 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm24-vm4.bullet.mail.ne1.yahoo.com (nm24-vm4.bullet.mail.ne1.yahoo.com [98.138.91.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 552537DEEE for ; Mon, 3 Jul 2017 19:25:28 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1499109818; bh=+RcEqIkJXUvUC+RfvaFyah4QEKXjLjFJaXi0SyvOHqo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=Dy4No3v3zrm8/HuSQpGvhUpTMK4lRLPUbEVVq7YITP8gU2wrZIb17ZiLyYp/NX6ry33LJt86/mtUx0H4pf9UlId+MbFhVZ9KBJfeTUjRo9JK+LH0cZzPmZ5gcKwOiLsRTuDoXrBcNHlOYtRo/MfN1mGjdG8uJIcmRJBzVYYDPXAN6lB38hT0woAoEBi9A8MPoEjzq+L86YxzSYuQsFXiS6XbTC6nhWJCpNlgokAUUs0NYYck3kPVL3jaWFvYSJCgc2tVfmX1vEsHs2jIvqWBWyLrPn1BBQLiblV0zbi4sqrz1rA9R5dz7NSCbE4dQaVawDEv7Vj9ZT6IYRlIEZe21A== Received: from [98.138.100.118] by nm24.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jul 2017 19:23:38 -0000 Received: from [98.138.84.45] by tm109.bullet.mail.ne1.yahoo.com with NNFMP; 03 Jul 2017 19:23:38 -0000 Received: from [127.0.0.1] by smtp113.mail.ne1.yahoo.com with NNFMP; 03 Jul 2017 19:23:38 -0000 X-Yahoo-Newman-Id: 138853.74875.bm@smtp113.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 92yFD3sVM1lwpLiimPKmv0eLTjrhPs8rlkjgTSoiVhQxJXc fR9T1LES3RTVXlDCdNrlgIhoqwIQvSCG9thRYOmqEMysMqHTwtzVp1.vTBL7 FNEpjcVLKaEYIcJtdje12S9XQxl_4mY3X2NQrFu4B9foVBXOy4qEcHPzAbIr M3twxQFs9OOwa3VJyX0_70v4s_tnNvuvbBc0l7Z320gOPF1KK0vl4K2hmjv5 qtcdzDhgiymjfd2PLMsm22mJwB29o0rjoW4JT2LPJizmlx_vB77dRx2lWjmw QsvYv02dqYisX_v2BssPat0mLunKgyzGOi_azgUj3iEnXliryoQD9LMN65VS q0MaZXQi2ML_jlOSfTYMZlfcnLSuBnuLG09zmEboJR4ij0HYQGOsFtBym3HU NIt1PHlCwXmNDhJ2MUeYGEdQrMaYLrYy9HzvF_qgT4zIZQOaDuKcN2omrP9U aYsBn9vCJWwVxQizGLoiDnxCaCDKmQlVQJPqAdx2DyYDt0BVnrmMiY.VwuXP U1RlXMUA_w60rpdF3gTI- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r320579 - head/usr.bin/patch To: Alexey Dokuchaev Cc: cem@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201707022100.v62L0Ume001253@repo.freebsd.org> <20170703181727.GA99316@FreeBSD.org> <20170703191456.GB99316@FreeBSD.org> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <9424d169-aff1-7a9f-f435-88422305db8d@FreeBSD.org> Date: Mon, 3 Jul 2017 14:23:36 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170703191456.GB99316@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 19:25:28 -0000 On 7/3/2017 2:14 PM, Alexey Dokuchaev wrote: > On Mon, Jul 03, 2017 at 01:35:25PM -0500, Pedro Giffuni wrote: >> On 7/3/2017 1:17 PM, Alexey Dokuchaev wrote: >>> On Mon, Jul 03, 2017 at 10:42:15AM -0500, Pedro Giffuni wrote: >>>> On 07/02/17 21:53, Conrad Meyer wrote: >>>>> Does this change the behavior of 'patch -p1' (for example) with 'git >>>>> diff' generated diffs? So patches that could be applied with -p1 >>>>> before now need to be applied with -p0? Or is this a different mode >>>>> of patch? >>>> IMHO, the (new) BSD patch behavior is somewhat more natural in the sense >>>> that no one asked git to add a prefix to the path so it makes sense to >>>> ignore it. >>> But -p1 already solves the problem; why add any ad-hoc handling to some >>> particular program that tends to generate patches whatever the way it >>> does? >> The behavior only applies to git diffs. > But -p1 already solves the problem in a generic way. What good is to add > specific code to make it git-or-next-cool-kid-on-the-block-aware? Yes, it's good: it saves me time while merging github patches from OpenBSD and NetBSD. Feel free to keep using -p1. Pedro. From owner-svn-src-head@freebsd.org Mon Jul 3 19:30:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD95B9EE369; Mon, 3 Jul 2017 19:30:04 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D7807E3BA; Mon, 3 Jul 2017 19:30:04 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63JU36n064125; Mon, 3 Jul 2017 19:30:03 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63JU3DO064120; Mon, 3 Jul 2017 19:30:03 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201707031930.v63JU3DO064120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 3 Jul 2017 19:30:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320612 - in head/sys: arm/allwinner arm/allwinner/clkng conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/allwinner/clkng conf X-SVN-Commit-Revision: 320612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 19:30:04 -0000 Author: manu Date: Mon Jul 3 19:30:03 2017 New Revision: 320612 URL: https://svnweb.freebsd.org/changeset/base/320612 Log: allwinner: Add A64 ccung support Upstream DTS for A64 SoC doesn't provide a /clocks node as Linux switched to ccu-ng This commit adds the necessary bits to boot on pine64 with latest DTS from upstream. USB is not working for now and some node aren't present in the DTS (like the PMU, Power Management Unit). Tested on: Pine64 Added: head/sys/arm/allwinner/clkng/ccu_a64.c (contents, props changed) head/sys/arm/allwinner/clkng/ccu_a64.h (contents, props changed) Modified: head/sys/arm/allwinner/a10_mmc.c head/sys/arm/allwinner/clkng/aw_ccung.c head/sys/conf/files.arm64 Modified: head/sys/arm/allwinner/a10_mmc.c ============================================================================== --- head/sys/arm/allwinner/a10_mmc.c Mon Jul 3 19:23:45 2017 (r320611) +++ head/sys/arm/allwinner/a10_mmc.c Mon Jul 3 19:30:03 2017 (r320612) @@ -65,6 +65,7 @@ static struct ofw_compat_data compat_data[] = { {"allwinner,sun4i-a10-mmc", 1}, {"allwinner,sun5i-a13-mmc", 1}, {"allwinner,sun7i-a20-mmc", 1}, + {"allwinner,sun50i-a64-mmc", 1}, {NULL, 0} }; Modified: head/sys/arm/allwinner/clkng/aw_ccung.c ============================================================================== --- head/sys/arm/allwinner/clkng/aw_ccung.c Mon Jul 3 19:23:45 2017 (r320611) +++ head/sys/arm/allwinner/clkng/aw_ccung.c Mon Jul 3 19:30:03 2017 (r320612) @@ -54,10 +54,18 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __aarch64__ +#include "opt_soc.h" +#endif + #if defined(SOC_ALLWINNER_A31) #include #endif +#if defined(SOC_ALLWINNER_A64) +#include +#endif + #if defined(SOC_ALLWINNER_H3) #include #endif @@ -78,6 +86,10 @@ static struct resource_spec aw_ccung_spec[] = { #define A31_CCU 2 #endif +#if defined(SOC_ALLWINNER_A64) +#define A64_CCU 2 +#endif + static struct ofw_compat_data compat_data[] = { #if defined(SOC_ALLWINNER_H3) { "allwinner,sun8i-h3-ccu", H3_CCU }, @@ -85,6 +97,9 @@ static struct ofw_compat_data compat_data[] = { #if defined(SOC_ALLWINNER_A31) { "allwinner,sun6i-a31-ccu", A31_CCU }, #endif +#if defined(SOC_ALLWINNER_A64) + { "allwinner,sun50i-a64-ccu", A64_CCU }, +#endif {NULL, 0 } }; @@ -261,7 +276,7 @@ aw_ccung_init_clocks(struct aw_ccung_softc *sc) sc->clk_init[i].default_freq, 0 , 0); if (error != 0) { device_printf(sc->dev, - "Cannot set frequency for %s to %llu\n", + "Cannot set frequency for %s to %ju\n", sc->clk_init[i].name, sc->clk_init[i].default_freq); continue; @@ -309,6 +324,11 @@ aw_ccung_attach(device_t dev) #if defined(SOC_ALLWINNER_A31) case A31_CCU: ccu_a31_register_clocks(sc); + break; +#endif +#if defined(SOC_ALLWINNER_A64) + case A64_CCU: + ccu_a64_register_clocks(sc); break; #endif } Added: head/sys/arm/allwinner/clkng/ccu_a64.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/clkng/ccu_a64.c Mon Jul 3 19:30:03 2017 (r320612) @@ -0,0 +1,743 @@ +/*- + * Copyright (c) 2017 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "ccu_a64.h" + +static struct aw_ccung_reset a64_ccu_resets[] = { + CCU_RESET(A64_RST_USB_PHY0, 0x0cc, 0) + CCU_RESET(A64_RST_USB_PHY1, 0x0cc, 1) + CCU_RESET(A64_RST_USB_HSIC, 0x0cc, 2) + + CCU_RESET(A64_RST_BUS_MIPI_DSI, 0x2c0, 1) + CCU_RESET(A64_RST_BUS_CE, 0x2c0, 5) + CCU_RESET(A64_RST_BUS_DMA, 0x2c0, 6) + CCU_RESET(A64_RST_BUS_MMC0, 0x2c0, 8) + CCU_RESET(A64_RST_BUS_MMC1, 0x2c0, 9) + CCU_RESET(A64_RST_BUS_MMC2, 0x2c0, 10) + CCU_RESET(A64_RST_BUS_NAND, 0x2c0, 13) + CCU_RESET(A64_RST_BUS_DRAM, 0x2c0, 14) + CCU_RESET(A64_RST_BUS_EMAC, 0x2c0, 17) + CCU_RESET(A64_RST_BUS_TS, 0x2c0, 18) + CCU_RESET(A64_RST_BUS_HSTIMER, 0x2c0, 19) + CCU_RESET(A64_RST_BUS_SPI0, 0x2c0, 20) + CCU_RESET(A64_RST_BUS_SPI1, 0x2c0, 21) + CCU_RESET(A64_RST_BUS_OTG, 0x2c0, 23) + CCU_RESET(A64_RST_BUS_EHCI0, 0x2c0, 24) + CCU_RESET(A64_RST_BUS_EHCI1, 0x2c0, 25) + CCU_RESET(A64_RST_BUS_OHCI0, 0x2c0, 26) + CCU_RESET(A64_RST_BUS_OHCI1, 0x2c0, 27) + + CCU_RESET(A64_RST_BUS_VE, 0x2c4, 0) + CCU_RESET(A64_RST_BUS_TCON0, 0x2c4, 3) + CCU_RESET(A64_RST_BUS_TCON1, 0x2c4, 4) + CCU_RESET(A64_RST_BUS_DEINTERLACE, 0x2c4, 5) + CCU_RESET(A64_RST_BUS_CSI, 0x2c4, 8) + CCU_RESET(A64_RST_BUS_HDMI0, 0x2c4, 10) + CCU_RESET(A64_RST_BUS_HDMI1, 0x2c4, 11) + CCU_RESET(A64_RST_BUS_DE, 0x2c4, 12) + CCU_RESET(A64_RST_BUS_GPU, 0x2c4, 20) + CCU_RESET(A64_RST_BUS_MSGBOX, 0x2c4, 21) + CCU_RESET(A64_RST_BUS_SPINLOCK, 0x2c4, 22) + CCU_RESET(A64_RST_BUS_DBG, 0x2c4, 31) + + CCU_RESET(A64_RST_BUS_LVDS, 0x2C8, 31) + + CCU_RESET(A64_RST_BUS_CODEC, 0x2D0, 0) + CCU_RESET(A64_RST_BUS_SPDIF, 0x2D0, 1) + CCU_RESET(A64_RST_BUS_THS, 0x2D0, 8) + CCU_RESET(A64_RST_BUS_I2S0, 0x2D0, 12) + CCU_RESET(A64_RST_BUS_I2S1, 0x2D0, 13) + CCU_RESET(A64_RST_BUS_I2S2, 0x2D0, 14) + + CCU_RESET(A64_RST_BUS_I2C0, 0x2D8, 0) + CCU_RESET(A64_RST_BUS_I2C1, 0x2D8, 1) + CCU_RESET(A64_RST_BUS_I2C2, 0x2D8, 2) + CCU_RESET(A64_RST_BUS_SCR, 0x2D8, 5) + CCU_RESET(A64_RST_BUS_UART0, 0x2D8, 16) + CCU_RESET(A64_RST_BUS_UART1, 0x2D8, 17) + CCU_RESET(A64_RST_BUS_UART2, 0x2D8, 18) + CCU_RESET(A64_RST_BUS_UART3, 0x2D8, 19) + CCU_RESET(A64_RST_BUS_UART4, 0x2D8, 20) +}; + +static struct aw_ccung_gate a64_ccu_gates[] = { + CCU_GATE(A64_CLK_BUS_MIPI_DSI, "bus-mipi-dsi", "ahb1", 0x60, 1) + CCU_GATE(A64_CLK_BUS_CE, "bus-ce", "ahb1", 0x60, 5) + CCU_GATE(A64_CLK_BUS_DMA, "bus-dma", "ahb1", 0x60, 6) + CCU_GATE(A64_CLK_BUS_MMC0, "bus-mmc0", "ahb1", 0x60, 8) + CCU_GATE(A64_CLK_BUS_MMC1, "bus-mmc1", "ahb1", 0x60, 9) + CCU_GATE(A64_CLK_BUS_MMC2, "bus-mmc2", "ahb1", 0x60, 10) + CCU_GATE(A64_CLK_BUS_NAND, "bus-nand", "ahb1", 0x60, 13) + CCU_GATE(A64_CLK_BUS_DRAM, "bus-dram", "ahb1", 0x60, 14) + CCU_GATE(A64_CLK_BUS_EMAC, "bus-emac", "ahb2", 0x60, 16) + CCU_GATE(A64_CLK_BUS_TS, "bus-ts", "ahb1", 0x60, 18) + CCU_GATE(A64_CLK_BUS_HSTIMER, "bus-hstimer", "ahb1", 0x60, 19) + CCU_GATE(A64_CLK_BUS_SPI0, "bus-spi0", "ahb1", 0x60, 20) + CCU_GATE(A64_CLK_BUS_SPI1, "bus-spi1", "ahb1", 0x60, 21) + CCU_GATE(A64_CLK_BUS_OTG, "bus-otg", "ahb1", 0x60, 23) + CCU_GATE(A64_CLK_BUS_EHCI0, "bus-ehci0", "ahb1", 0x60, 24) + CCU_GATE(A64_CLK_BUS_EHCI1, "bus-ehci1", "ahb2", 0x60, 25) + CCU_GATE(A64_CLK_BUS_OHCI0, "bus-ohci0", "ahb1", 0x60, 26) + CCU_GATE(A64_CLK_BUS_OHCI1, "bus-ohci1", "ahb2", 0x60, 27) + + CCU_GATE(A64_CLK_BUS_VE, "bus-ve", "ahb1", 0x64, 0) + CCU_GATE(A64_CLK_BUS_TCON0, "bus-tcon0", "ahb1", 0x64, 3) + CCU_GATE(A64_CLK_BUS_TCON1, "bus-tcon1", "ahb1", 0x64, 4) + CCU_GATE(A64_CLK_BUS_DEINTERLACE, "bus-deinterlace", "ahb1", 0x64, 5) + CCU_GATE(A64_CLK_BUS_CSI, "bus-csi", "ahb1", 0x64, 8) + CCU_GATE(A64_CLK_BUS_HDMI, "bus-hdmi", "ahb1", 0x64, 11) + CCU_GATE(A64_CLK_BUS_DE, "bus-de", "ahb1", 0x64, 12) + CCU_GATE(A64_CLK_BUS_GPU, "bus-gpu", "ahb1", 0x64, 20) + CCU_GATE(A64_CLK_BUS_MSGBOX, "bus-msgbox", "ahb1", 0x64, 21) + CCU_GATE(A64_CLK_BUS_SPINLOCK, "bus-spinlock", "ahb1", 0x64, 22) + + CCU_GATE(A64_CLK_BUS_CODEC, "bus-codec", "apb1", 0x68, 0) + CCU_GATE(A64_CLK_BUS_SPDIF, "bus-spdif", "apb1", 0x68, 1) + CCU_GATE(A64_CLK_BUS_PIO, "bus-pio", "apb1", 0x68, 5) + CCU_GATE(A64_CLK_BUS_THS, "bus-ths", "apb1", 0x68, 8) + CCU_GATE(A64_CLK_BUS_I2S0, "bus-i2s0", "apb1", 0x68, 12) + CCU_GATE(A64_CLK_BUS_I2S1, "bus-i2s1", "apb1", 0x68, 13) + CCU_GATE(A64_CLK_BUS_I2S2, "bus-i2s2", "apb1", 0x68, 14) + + CCU_GATE(A64_CLK_BUS_I2C0, "bus-i2c0", "apb2", 0x6C, 0) + CCU_GATE(A64_CLK_BUS_I2C1, "bus-i2c1", "apb2", 0x6C, 1) + CCU_GATE(A64_CLK_BUS_I2C2, "bus-i2c2", "apb2", 0x6C, 2) + CCU_GATE(A64_CLK_BUS_SCR, "bus-src", "apb2", 0x6C, 5) + CCU_GATE(A64_CLK_BUS_UART0, "bus-uart0", "apb2", 0x6C, 16) + CCU_GATE(A64_CLK_BUS_UART1, "bus-uart1", "apb2", 0x6C, 17) + CCU_GATE(A64_CLK_BUS_UART2, "bus-uart2", "apb2", 0x6C, 18) + CCU_GATE(A64_CLK_BUS_UART3, "bus-uart3", "apb2", 0x6C, 19) + CCU_GATE(A64_CLK_BUS_UART4, "bus-uart4", "apb2", 0x6C, 20) + + CCU_GATE(A64_CLK_BUS_DBG, "bus-dbg", "ahb1", 0x70, 7) + + CCU_GATE(A64_CLK_USB_PHY0, "usb-phy0", "osc24M", 0xcc, 8) + CCU_GATE(A64_CLK_USB_PHY1, "usb-phy1", "osc24M", 0xcc, 9) + CCU_GATE(A64_CLK_USB_HSIC, "usb-hsic", "pll_hsic", 0xcc, 10) + CCU_GATE(A64_CLK_USB_HSIC_12M, "usb-hsic-12M", "osc12M", 0xcc, 11) + CCU_GATE(A64_CLK_USB_OHCI0, "usb-ohci0", "osc12M", 0xcc, 16) + CCU_GATE(A64_CLK_USB_OHCI1, "usb-ohci1", "usb-ohci0", 0xcc, 17) + + CCU_GATE(A64_CLK_DRAM_VE, "dram-ve", "dram", 0x100, 0) + CCU_GATE(A64_CLK_DRAM_CSI, "dram-csi", "dram", 0x100, 1) + CCU_GATE(A64_CLK_DRAM_DEINTERLACE, "dram-deinterlace", "dram", 0x100, 2) + CCU_GATE(A64_CLK_DRAM_TS, "dram-ts", "dram", 0x100, 3) + + CCU_GATE(A64_CLK_CSI_MISC, "csi-misc", "osc24M", 0x130, 31) + + CCU_GATE(A64_CLK_AC_DIG_4X, "ac-dig-4x", "pll_audio-4x", 0x140, 30) + CCU_GATE(A64_CLK_AC_DIG, "ac-dig", "pll_audio", 0x140, 31) + + CCU_GATE(A64_CLK_AVS, "avs", "osc24M", 0x144, 31) + + CCU_GATE(A64_CLK_HDMI_DDC, "hdmi-ddc", "osc24M", 0x154, 31) +}; + +static const char *osc12m_parents[] = {"osc24M"}; +FIXED_CLK(osc12m_clk, + A64_CLK_OSC_12M, /* id */ + "osc12M", /* name */ + osc12m_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ + +static const char *pll_cpux_parents[] = {"osc24M"}; +NKMP_CLK(pll_cpux_clk, + A64_CLK_PLL_CPUX, /* id */ + "pll_cpux", pll_cpux_parents, /* name, parents */ + 0x00, /* offset */ + 8, 5, 0, 0, /* n factor */ + 4, 2, 0, 0, /* k factor */ + 0, 2, 0, 0, /* m factor */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* p factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK | AW_CLK_SCALE_CHANGE); /* flags */ + +static const char *pll_audio_parents[] = {"osc24M"}; +NKMP_CLK(pll_audio_clk, + A64_CLK_PLL_AUDIO, /* id */ + "pll_audio", pll_audio_parents, /* name, parents */ + 0x08, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* k factor (fake) */ + 0, 5, 0, 0, /* m factor */ + 16, 4, 0, 0, /* p factor */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +static const char *pll_audio_mult_parents[] = {"pll_audio"}; +FIXED_CLK(pll_audio_2x_clk, + A64_CLK_PLL_AUDIO_2X, /* id */ + "pll_audio-2x", /* name */ + pll_audio_mult_parents, /* parent */ + 0, /* freq */ + 2, /* mult */ + 1, /* div */ + 0); /* flags */ +FIXED_CLK(pll_audio_4x_clk, + A64_CLK_PLL_AUDIO_4X, /* id */ + "pll_audio-4x", /* name */ + pll_audio_mult_parents, /* parent */ + 0, /* freq */ + 4, /* mult */ + 1, /* div */ + 0); /* flags */ +FIXED_CLK(pll_audio_8x_clk, + A64_CLK_PLL_AUDIO_8X, /* id */ + "pll_audio-8x", /* name */ + pll_audio_mult_parents, /* parent */ + 0, /* freq */ + 8, /* mult */ + 1, /* div */ + 0); /* flags */ + +static const char *pll_video0_parents[] = {"osc24M"}; +NM_CLK_WITH_FRAC(pll_video0_clk, + A64_CLK_PLL_VIDEO0, /* id */ + "pll_video0", pll_video0_parents, /* name, parents */ + 0x10, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 31, 28, 1000, /* gate, lock, lock retries */ + AW_CLK_HAS_LOCK, /* flags */ + 270000000, 297000000, /* freq0, freq1 */ + 24, 25); /* mode sel, freq sel */ + +static const char *pll_ve_parents[] = {"osc24M"}; +NM_CLK_WITH_FRAC(pll_ve_clk, + A64_CLK_PLL_VE, /* id */ + "pll_ve", pll_ve_parents, /* name, parents */ + 0x18, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 31, 28, 1000, /* gate, lock, lock retries */ + AW_CLK_HAS_LOCK, /* flags */ + 270000000, 297000000, /* freq0, freq1 */ + 24, 25); /* mode sel, freq sel */ + +static const char *pll_ddr0_parents[] = {"osc24M"}; +NKMP_CLK_WITH_UPDATE(pll_ddr0_clk, + A64_CLK_PLL_DDR0, /* id */ + "pll_ddr0", pll_ddr0_parents, /* name, parents */ + 0x20, /* offset */ + 8, 5, 0, 0, /* n factor */ + 4, 2, 0, 0, /* k factor */ + 0, 2, 0, 0, /* m factor */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* p factor (fake) */ + 31, /* gate */ + 28, 1000, /* lock */ + 20, /* update */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +static const char *pll_periph0_2x_parents[] = {"osc24M"}; +static const char *pll_periph0_parents[] = {"pll_periph0_2x"}; +NKMP_CLK(pll_periph0_2x_clk, + A64_CLK_PLL_PERIPH0_2X, /* id */ + "pll_periph0_2x", pll_periph0_2x_parents, /* name, parents */ + 0x28, /* offset */ + 8, 5, 0, 0, /* n factor */ + 4, 2, 0, 0, /* k factor */ + 0, 0, 2, AW_CLK_FACTOR_FIXED, /* m factor (fake) */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* p factor (fake) */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ +FIXED_CLK(pll_periph0_clk, + A64_CLK_PLL_PERIPH0, /* id */ + "pll_periph0", /* name */ + pll_periph0_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ + +static const char *pll_periph1_2x_parents[] = {"osc24M"}; +static const char *pll_periph1_parents[] = {"pll_periph1_2x"}; +NKMP_CLK(pll_periph1_2x_clk, + A64_CLK_PLL_PERIPH1_2X, /* id */ + "pll_periph1_2x", pll_periph1_2x_parents, /* name, parents */ + 0x2C, /* offset */ + 8, 5, 0, 0, /* n factor */ + 4, 2, 0, 0, /* k factor */ + 0, 0, 2, AW_CLK_FACTOR_FIXED, /* m factor (fake) */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* p factor (fake) */ + 31, /* gate */ + 28, 1000, /* lock */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ +FIXED_CLK(pll_periph1_clk, + A64_CLK_PLL_PERIPH1, /* id */ + "pll_periph1", /* name */ + pll_periph1_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 2, /* div */ + 0); /* flags */ + +static const char *pll_video1_parents[] = {"osc24M"}; +NM_CLK_WITH_FRAC(pll_video1_clk, + A64_CLK_PLL_VIDEO1, /* id */ + "pll_video1", pll_video1_parents, /* name, parents */ + 0x30, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 31, 28, 1000, /* gate, lock, lock retries */ + AW_CLK_HAS_LOCK, /* flags */ + 270000000, 297000000, /* freq0, freq1 */ + 24, 25); /* mode sel, freq sel */ + +static const char *pll_gpu_parents[] = {"osc24M"}; +NM_CLK_WITH_FRAC(pll_gpu_clk, + A64_CLK_PLL_GPU, /* id */ + "pll_gpu", pll_gpu_parents, /* name, parents */ + 0x38, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 31, 28, 1000, /* gate, lock, lock retries */ + AW_CLK_HAS_LOCK, /* flags */ + 270000000, 297000000, /* freq0, freq1 */ + 24, 25); /* mode sel, freq sel */ + +/* PLL MIPI is missing */ + +static const char *pll_hsic_parents[] = {"osc24M"}; +NM_CLK_WITH_FRAC(pll_hsic_clk, + A64_CLK_PLL_HSIC, /* id */ + "pll_hsic", pll_hsic_parents, /* name, parents */ + 0x44, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 31, 28, 1000, /* gate, lock, lock retries */ + AW_CLK_HAS_LOCK, /* flags */ + 270000000, 297000000, /* freq0, freq1 */ + 24, 25); /* mode sel, freq sel */ + +static const char *pll_de_parents[] = {"osc24M"}; +NM_CLK_WITH_FRAC(pll_de_clk, + A64_CLK_PLL_DE, /* id */ + "pll_de", pll_de_parents, /* name, parents */ + 0x48, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 31, 28, 1000, /* gate, lock, lock retries */ + AW_CLK_HAS_LOCK, /* flags */ + 270000000, 297000000, /* freq0, freq1 */ + 24, 25); /* mode sel, freq sel */ + +static const char *pll_ddr1_parents[] = {"osc24M"}; +NKMP_CLK_WITH_UPDATE(pll_ddr1_clk, + A64_CLK_PLL_DDR1, /* id */ + "pll_ddr1", pll_ddr1_parents, /* name, parents */ + 0x4C, /* offset */ + 8, 7, 0, 0, /* n factor */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* k factor (fake) */ + 0, 2, 0, 0, /* m factor */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* p factor (fake) */ + 31, /* gate */ + 28, 1000, /* lock */ + 20, /* update */ + AW_CLK_HAS_GATE | AW_CLK_HAS_LOCK); /* flags */ + +static const char *cpux_parents[] = {"osc32k", "osc24M", "pll_cpux"}; +MUX_CLK(cpux_clk, + A64_CLK_CPUX, /* id */ + "cpux", cpux_parents, /* name, parents */ + 0x50, 16, 2); /* offset, shift, width */ + +static const char *axi_parents[] = {"cpux"}; +DIV_CLK(axi_clk, + A64_CLK_AXI, /* id */ + "axi", axi_parents, /* name, parents */ + 0x50, /* offset */ + 0, 2, /* shift, width */ + 0, NULL); /* flags, div table */ + +static const char *apb_parents[] = {"cpux"}; +DIV_CLK(apb_clk, + A64_CLK_APB, /* id */ + "apb", apb_parents, /* name, parents */ + 0x50, /* offset */ + 8, 2, /* shift, width */ + 0, NULL); /* flags, div table */ + +static const char *ahb1_parents[] = {"osc32k", "osc24M", "axi", "pll_periph0"}; +PREDIV_CLK(ahb1_clk, A64_CLK_AHB1, /* id */ + "ahb1", ahb1_parents, /* name, parents */ + 0x54, /* offset */ + 12, 2, /* mux */ + 4, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* div */ + 6, 2, 0, AW_CLK_FACTOR_HAS_COND, /* prediv */ + 12, 2, 3); /* prediv condition */ + +static const char *apb1_parents[] = {"ahb1"}; +static struct clk_div_table apb1_div_table[] = { + { .value = 0, .divider = 2, }, + { .value = 1, .divider = 2, }, + { .value = 2, .divider = 4, }, + { .value = 3, .divider = 8, }, + { }, +}; +DIV_CLK(apb1_clk, + A64_CLK_APB1, /* id */ + "apb1", apb1_parents, /* name, parents */ + 0x54, /* offset */ + 8, 2, /* shift, width */ + CLK_DIV_WITH_TABLE, /* flags */ + apb1_div_table); /* div table */ + +static const char *apb2_parents[] = {"osc32k", "osc24M", "pll_periph0_2x", "pll_periph0_2x"}; +NM_CLK(apb2_clk, + A64_CLK_APB2, /* id */ + "apb2", apb2_parents, /* name, parents */ + 0x58, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 2, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX); + +static const char *ahb2_parents[] = {"ahb1", "pll_periph0"}; +PREDIV_CLK(ahb2_clk, A64_CLK_AHB2, /* id */ + "ahb2", ahb2_parents, /* name, parents */ + 0x5c, /* offset */ + 0, 2, /* mux */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* div */ + 0, 0, 2, AW_CLK_FACTOR_HAS_COND | AW_CLK_FACTOR_FIXED, /* prediv */ + 0, 2, 1); /* prediv condition */ + +static const char *mod_parents[] = {"osc24M", "pll_periph0_2x", "pll_periph1_2x"}; +NM_CLK(nand_clk, + A64_CLK_NAND, "nand", mod_parents, /* id, name, parents */ + 0x80, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX); /* flags */ + +NM_CLK(mmc0_clk, + A64_CLK_MMC0, "mmc0", mod_parents, /* id, name, parents */ + 0x88, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +NM_CLK(mmc1_clk, + A64_CLK_MMC1, "mmc1", mod_parents, /* id, name, parents */ + 0x8c, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +NM_CLK(mmc2_clk, + A64_CLK_MMC2, "mmc2", mod_parents, /* id, name, parents */ + 0x90, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *ts_parents[] = {"osc24M", "pll_periph0"}; +NM_CLK(ts_clk, + A64_CLK_TS, "ts", ts_parents, /* id, name, parents */ + 0x98, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX); /* flags */ + +NM_CLK(ce_clk, + A64_CLK_CE, "ce", mod_parents, /* id, name, parents */ + 0x9C, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX); /* flags */ + +NM_CLK(spi0_clk, + A64_CLK_SPI0, "spi0", mod_parents, /* id, name, parents */ + 0xA0, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +NM_CLK(spi1_clk, + A64_CLK_SPI1, "spi1", mod_parents, /* id, name, parents */ + 0xA4, /* offset */ + 16, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX | + AW_CLK_REPARENT); /* flags */ + +static const char *i2s_parents[] = {"pll_audio-8x", "pll_audio-4x", "pll_audio-2x", "pll_audio"}; +MUX_CLK(i2s0mux_clk, + 0, "i2s0mux", i2s_parents, /* id, name, parents */ + 0xb0, 16, 2); /* offset, mux shift, mux width */ +MUX_CLK(i2s1mux_clk, + 0, "i2s1mux", i2s_parents, /* id, name, parents */ + 0xb4, 16, 2); /* offset, mux shift, mux width */ +MUX_CLK(i2s2mux_clk, + 0, "i2s2mux", i2s_parents, /* id, name, parents */ + 0xb8, 16, 2); /* offset, mux shift, mux width */ + +static const char *spdif_parents[] = {"pll_audio"}; +NM_CLK(spdif_clk, + A64_CLK_SPDIF, "spdif", spdif_parents, /* id, name, parents */ + 0xC0, /* offset */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* n factor (fake); */ + 0, 4, 0, 0, /* m factor */ + 0, 0, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE); /* flags */ + +/* USBPHY clk sel */ + +/* DRAM needs update bit */ +static const char *dram_parents[] = {"pll_ddr0", "pll_ddr1"}; +NM_CLK(dram_clk, + A64_CLK_DRAM, "dram", dram_parents, /* id, name, parents */ + 0xF4, /* offset */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* n factor (fake) */ + 0, 2, 0, 0, /* m factor */ + 20, 2, /* mux */ + 0, /* gate */ + AW_CLK_HAS_MUX); /* flags */ + +static const char *de_parents[] = {"pll_periph0_2x", "pll_de"}; +NM_CLK(de_clk, + A64_CLK_DE, "de", de_parents, /* id, name, parents */ + 0x104, /* offset */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* n factor (fake) */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_HAS_GATE); /* flags */ + +/* TCON0/1 Needs mux table */ + +static const char *deinterlace_parents[] = {"pll_periph0", "pll_periph1"}; +NM_CLK(deinterlace_clk, + A64_CLK_DEINTERLACE, "deinterlace", deinterlace_parents, /* id, name, parents */ + 0x124, /* offset */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* n factor (fake) */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_HAS_GATE); /* flags */ + +static const char *csi_sclk_parents[] = {"pll_periph0", "pll_periph1"}; +NM_CLK(csi_sclk_clk, + A64_CLK_CSI_SCLK, "csi-sclk", csi_sclk_parents, /* id, name, parents */ + 0x134, /* offset */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* n factor (fake) */ + 16, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_HAS_GATE); /* flags */ + +static const char *csi_mclk_parents[] = {"osc24M", "pll_video0", "pll_periph1"}; +NM_CLK(csi_mclk_clk, + A64_CLK_CSI_MCLK, "csi-mclk", csi_mclk_parents, /* id, name, parents */ + 0x134, /* offset */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* n factor (fake) */ + 0, 4, 0, 0, /* m factor */ + 8, 2, /* mux */ + 15, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_HAS_GATE); /* flags */ + +static const char *ve_parents[] = {"pll_ve"}; +NM_CLK(ve_clk, + A64_CLK_VE, "ve", ve_parents, /* id, name, parents */ + 0x13C, /* offset */ + 16, 3, 0, 0, /* n factor */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* m factor (fake) */ + 0, 0, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE); /* flags */ + +static const char *hdmi_parents[] = {"pll_video0"}; +NM_CLK(hdmi_clk, + A64_CLK_HDMI, "hdmi", hdmi_parents, /* id, name, parents */ + 0x150, /* offset */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* n factor (fake) */ + 0, 4, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_HAS_GATE); /* flags */ + +static const char *mbus_parents[] = {"osc24M", "pll_periph0_2x", "pll_ddr0"}; +NM_CLK(mbus_clk, + A64_CLK_MBUS, "mbus", mbus_parents, /* id, name, parents */ + 0x15C, /* offset */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* n factor (fake) */ + 0, 3, 0, 0, /* m factor */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_HAS_GATE); /* flags */ + +static const char *gpu_parents[] = {"pll_gpu"}; +NM_CLK(gpu_clk, + A64_CLK_GPU, "gpu", gpu_parents, /* id, name, parents */ + 0x1A0, /* offset */ + 0, 2, 0, 0, /* n factor */ + 0, 0, 1, AW_CLK_FACTOR_FIXED, /* m factor (fake) */ + 0, 0, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE); /* flags */ + +static struct aw_clk_nkmp_def *nkmp_clks[] = { + &pll_cpux_clk, + &pll_audio_clk, + &pll_periph0_2x_clk, + &pll_periph1_2x_clk, + &pll_ddr0_clk, + &pll_ddr1_clk, +}; + +static struct aw_clk_nm_def *nm_clks[] = { + &pll_video0_clk, + &pll_video1_clk, + &pll_ve_clk, + &pll_gpu_clk, + &pll_de_clk, + &pll_hsic_clk, + &apb2_clk, + &nand_clk, + &mmc0_clk, + &mmc1_clk, + &mmc2_clk, + &ts_clk, + &ce_clk, + &spi0_clk, + &spi1_clk, + &spdif_clk, + &dram_clk, + &de_clk, + &deinterlace_clk, + &csi_sclk_clk, + &csi_mclk_clk, + &ve_clk, + &hdmi_clk, + &mbus_clk, + &gpu_clk, +}; + +static struct aw_clk_prediv_mux_def *prediv_mux_clks[] = { + &ahb1_clk, + &ahb2_clk, +}; + +static struct clk_mux_def *mux_clks[] = { + &cpux_clk, + &i2s0mux_clk, + &i2s1mux_clk, + &i2s2mux_clk, +}; + +static struct clk_div_def *div_clks[] = { + &axi_clk, + &apb1_clk, + &apb_clk, +}; + +static struct clk_fixed_def *fixed_factor_clks[] = { + &osc12m_clk, + &pll_periph0_clk, + &pll_periph1_clk, + &pll_audio_2x_clk, + &pll_audio_4x_clk, + &pll_audio_8x_clk, +}; + +static struct aw_clk_init init_clks[] = { + {"ahb1", "pll_periph0", 0, false}, + {"ahb2", "pll_periph0", 0, false}, + {"dram", "pll_ddr", 0, false}, +}; + +void +ccu_a64_register_clocks(struct aw_ccung_softc *sc) +{ + int i; + + sc->resets = a64_ccu_resets; + sc->nresets = nitems(a64_ccu_resets); + sc->gates = a64_ccu_gates; + sc->ngates = nitems(a64_ccu_gates); + sc->clk_init = init_clks; + sc->n_clk_init = nitems(init_clks); + + for (i = 0; i < nitems(nkmp_clks); i++) + aw_clk_nkmp_register(sc->clkdom, nkmp_clks[i]); + for (i = 0; i < nitems(nm_clks); i++) + aw_clk_nm_register(sc->clkdom, nm_clks[i]); + for (i = 0; i < nitems(prediv_mux_clks); i++) + aw_clk_prediv_mux_register(sc->clkdom, prediv_mux_clks[i]); + + for (i = 0; i < nitems(mux_clks); i++) + clknode_mux_register(sc->clkdom, mux_clks[i]); + for (i = 0; i < nitems(div_clks); i++) + clknode_div_register(sc->clkdom, div_clks[i]); + for (i = 0; i < nitems(fixed_factor_clks); i++) + clknode_fixed_register(sc->clkdom, fixed_factor_clks[i]); +} Added: head/sys/arm/allwinner/clkng/ccu_a64.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/clkng/ccu_a64.h Mon Jul 3 19:30:03 2017 (r320612) @@ -0,0 +1,204 @@ +/*- + * Copyright (c) 2017 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __CCU_A64_H__ +#define __CCU_A64_H__ + +#define A64_RST_USB_PHY0 0 +#define A64_RST_USB_PHY1 1 +#define A64_RST_USB_HSIC 2 +#define A64_RST_DRAM 3 +#define A64_RST_MBUS 4 +#define A64_RST_BUS_MIPI_DSI 5 +#define A64_RST_BUS_CE 6 +#define A64_RST_BUS_DMA 7 +#define A64_RST_BUS_MMC0 8 +#define A64_RST_BUS_MMC1 9 +#define A64_RST_BUS_MMC2 10 +#define A64_RST_BUS_NAND 11 +#define A64_RST_BUS_DRAM 12 +#define A64_RST_BUS_EMAC 13 +#define A64_RST_BUS_TS 14 +#define A64_RST_BUS_HSTIMER 15 +#define A64_RST_BUS_SPI0 16 +#define A64_RST_BUS_SPI1 17 +#define A64_RST_BUS_OTG 18 +#define A64_RST_BUS_EHCI0 19 +#define A64_RST_BUS_EHCI1 20 +#define A64_RST_BUS_OHCI0 21 +#define A64_RST_BUS_OHCI1 22 +#define A64_RST_BUS_VE 23 +#define A64_RST_BUS_TCON0 24 +#define A64_RST_BUS_TCON1 25 +#define A64_RST_BUS_DEINTERLACE 26 +#define A64_RST_BUS_CSI 27 +#define A64_RST_BUS_HDMI0 28 +#define A64_RST_BUS_HDMI1 29 +#define A64_RST_BUS_DE 30 +#define A64_RST_BUS_GPU 31 +#define A64_RST_BUS_MSGBOX 32 +#define A64_RST_BUS_SPINLOCK 33 +#define A64_RST_BUS_DBG 34 +#define A64_RST_BUS_LVDS 35 +#define A64_RST_BUS_CODEC 36 +#define A64_RST_BUS_SPDIF 37 +#define A64_RST_BUS_THS 38 +#define A64_RST_BUS_I2S0 39 +#define A64_RST_BUS_I2S1 40 +#define A64_RST_BUS_I2S2 41 +#define A64_RST_BUS_I2C0 42 +#define A64_RST_BUS_I2C1 43 +#define A64_RST_BUS_I2C2 44 +#define A64_RST_BUS_SCR 45 +#define A64_RST_BUS_UART0 46 +#define A64_RST_BUS_UART1 47 +#define A64_RST_BUS_UART2 48 +#define A64_RST_BUS_UART3 49 +#define A64_RST_BUS_UART4 50 + +#define A64_CLK_OSC_12M 0 +#define A64_CLK_PLL_CPUX 1 +#define A64_CLK_PLL_AUDIO_BASE 2 +#define A64_CLK_PLL_AUDIO 3 +#define A64_CLK_PLL_AUDIO_2X 4 +#define A64_CLK_PLL_AUDIO_4X 5 +#define A64_CLK_PLL_AUDIO_8X 6 +#define A64_CLK_PLL_VIDEO0 7 +#define A64_CLK_PLL_VIDEO0_2X 8 +#define A64_CLK_PLL_VE 9 +#define A64_CLK_PLL_DDR0 10 +#define A64_CLK_PLL_PERIPH0 11 +#define A64_CLK_PLL_PERIPH0_2X 12 +#define A64_CLK_PLL_PERIPH1 13 +#define A64_CLK_PLL_PERIPH1_2X 14 +#define A64_CLK_PLL_VIDEO1 15 +#define A64_CLK_PLL_GPU 16 +#define A64_CLK_PLL_MIPI 17 +#define A64_CLK_PLL_HSIC 18 +#define A64_CLK_PLL_DE 19 +#define A64_CLK_PLL_DDR1 20 +#define A64_CLK_CPUX 21 +#define A64_CLK_AXI 22 +#define A64_CLK_APB 23 +#define A64_CLK_AHB1 24 +#define A64_CLK_APB1 25 +#define A64_CLK_APB2 26 +#define A64_CLK_AHB2 27 +#define A64_CLK_BUS_MIPI_DSI 28 +#define A64_CLK_BUS_CE 29 +#define A64_CLK_BUS_DMA 30 +#define A64_CLK_BUS_MMC0 31 +#define A64_CLK_BUS_MMC1 32 +#define A64_CLK_BUS_MMC2 33 +#define A64_CLK_BUS_NAND 34 +#define A64_CLK_BUS_DRAM 35 +#define A64_CLK_BUS_EMAC 36 +#define A64_CLK_BUS_TS 37 +#define A64_CLK_BUS_HSTIMER 38 +#define A64_CLK_BUS_SPI0 39 +#define A64_CLK_BUS_SPI1 40 +#define A64_CLK_BUS_OTG 41 +#define A64_CLK_BUS_EHCI0 42 +#define A64_CLK_BUS_EHCI1 43 +#define A64_CLK_BUS_OHCI0 44 +#define A64_CLK_BUS_OHCI1 45 +#define A64_CLK_BUS_VE 46 +#define A64_CLK_BUS_TCON0 47 +#define A64_CLK_BUS_TCON1 48 +#define A64_CLK_BUS_DEINTERLACE 49 +#define A64_CLK_BUS_CSI 50 +#define A64_CLK_BUS_HDMI 51 +#define A64_CLK_BUS_DE 52 +#define A64_CLK_BUS_GPU 53 +#define A64_CLK_BUS_MSGBOX 54 +#define A64_CLK_BUS_SPINLOCK 55 +#define A64_CLK_BUS_CODEC 56 +#define A64_CLK_BUS_SPDIF 57 +#define A64_CLK_BUS_PIO 58 +#define A64_CLK_BUS_THS 59 +#define A64_CLK_BUS_I2S0 60 +#define A64_CLK_BUS_I2S1 61 +#define A64_CLK_BUS_I2S2 62 +#define A64_CLK_BUS_I2C0 63 +#define A64_CLK_BUS_I2C1 64 +#define A64_CLK_BUS_I2C2 65 +#define A64_CLK_BUS_SCR 66 +#define A64_CLK_BUS_UART0 67 +#define A64_CLK_BUS_UART1 68 +#define A64_CLK_BUS_UART2 69 +#define A64_CLK_BUS_UART3 70 +#define A64_CLK_BUS_UART4 71 +#define A64_CLK_BUS_DBG 72 +#define A64_CLK_THS 73 +#define A64_CLK_NAND 74 +#define A64_CLK_MMC0 75 +#define A64_CLK_MMC1 76 +#define A64_CLK_MMC2 77 +#define A64_CLK_TS 78 +#define A64_CLK_CE 79 +#define A64_CLK_SPI0 80 +#define A64_CLK_SPI1 81 +#define A64_CLK_I2S0 82 +#define A64_CLK_I2S1 83 +#define A64_CLK_I2S2 84 +#define A64_CLK_SPDIF 85 +#define A64_CLK_USB_PHY0 86 +#define A64_CLK_USB_PHY1 87 +#define A64_CLK_USB_HSIC 88 +#define A64_CLK_USB_HSIC_12M 89 +#define A64_CLK_USB_OHCI0_12M 90 +#define A64_CLK_USB_OHCI0 91 +#define A64_CLK_USB_OHCI1_12M 92 +#define A64_CLK_USB_OHCI1 93 +#define A64_CLK_DRAM 94 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Jul 3 19:33:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2E6D9EE5FD; Mon, 3 Jul 2017 19:33:51 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CEC87EA28; Mon, 3 Jul 2017 19:33:51 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63JXomD068404; Mon, 3 Jul 2017 19:33:50 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63JXoxe068401; Mon, 3 Jul 2017 19:33:50 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201707031933.v63JXoxe068401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 3 Jul 2017 19:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320613 - in head/sys: amd64/conf conf i386/conf X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: in head/sys: amd64/conf conf i386/conf X-SVN-Commit-Revision: 320613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 19:33:51 -0000 Author: sbruno Date: Mon Jul 3 19:33:50 2017 New Revision: 320613 URL: https://svnweb.freebsd.org/changeset/base/320613 Log: Garbage collect kernel option TWA_FLASH_FIRMWARE Submitted by: kevin.bowling0kev009.com Differential Revision: https://reviews.freebsd.org/D11387 Modified: head/sys/amd64/conf/NOTES head/sys/conf/options head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Mon Jul 3 19:30:03 2017 (r320612) +++ head/sys/amd64/conf/NOTES Mon Jul 3 19:33:50 2017 (r320613) @@ -414,7 +414,6 @@ device arcmsr # Areca SATA II RAID # The driver is implemented as a SIM, and so, needs the CAM infrastructure. # options TWA_DEBUG # 0-10; 10 prints the most messages. -options TWA_FLASH_FIRMWARE # firmware image bundled when defined. device twa # 3ware 9000 series PATA/SATA RAID # Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Jul 3 19:30:03 2017 (r320612) +++ head/sys/conf/options Mon Jul 3 19:33:50 2017 (r320613) @@ -45,7 +45,6 @@ AHD_REG_PRETTY_PRINT opt_aic79xx.h ADW_ALLOW_MEMIO opt_adw.h TWA_DEBUG opt_twa.h -TWA_FLASH_FIRMWARE opt_twa.h # Debugging options. ALT_BREAK_TO_DEBUGGER opt_kdb.h Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Mon Jul 3 19:30:03 2017 (r320612) +++ head/sys/i386/conf/NOTES Mon Jul 3 19:33:50 2017 (r320613) @@ -673,7 +673,6 @@ device arcmsr # Areca SATA II RAID # The driver is implemented as a SIM, and so, needs the CAM infrastructure. # options TWA_DEBUG # 0-10; 10 prints the most messages. -options TWA_FLASH_FIRMWARE # firmware image bundled when defined. device twa # 3ware 9000 series PATA/SATA RAID # From owner-svn-src-head@freebsd.org Mon Jul 3 19:40:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EA6F9EE68D; Mon, 3 Jul 2017 19:40:00 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D19E17EBC8; Mon, 3 Jul 2017 19:39:59 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63Jdxdx068788; Mon, 3 Jul 2017 19:39:59 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63JdxuU068787; Mon, 3 Jul 2017 19:39:59 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201707031939.v63JdxuU068787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 3 Jul 2017 19:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320614 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 320614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 19:40:00 -0000 Author: sbruno Date: Mon Jul 3 19:39:58 2017 New Revision: 320614 URL: https://svnweb.freebsd.org/changeset/base/320614 Log: Add a sysctl to toggle the use of the sockets LOWAT when calculating auto window growth Submitted by: j@nitrology.com (Jason Wolfe) Reviewed by: gnn hiren Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D11016 Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Jul 3 19:33:50 2017 (r320613) +++ head/sys/netinet/tcp_output.c Mon Jul 3 19:39:58 2017 (r320614) @@ -130,6 +130,12 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, sendbuf_max, CTLFL &VNET_NAME(tcp_autosndbuf_max), 0, "Max size of automatic send buffer"); +VNET_DEFINE(int, tcp_sendbuf_auto_lowat) = 0; +#define V_tcp_sendbuf_auto_lowat VNET(tcp_sendbuf_auto_lowat) +SYSCTL_INT(_net_inet_tcp, OID_AUTO, sendbuf_auto_lowat, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_sendbuf_auto_lowat), 0, + "Modify threshold for auto send buffer growth to account for SO_SNDLOWAT"); + /* * Make sure that either retransmit or persist timer is set for SYN, FIN and * non-ACK. @@ -521,8 +527,12 @@ after_sack_rexmit: * XXXGL: should there be used sbused() or sbavail()? */ if (V_tcp_do_autosndbuf && so->so_snd.sb_flags & SB_AUTOSIZE) { - if ((tp->snd_wnd / 4 * 5) >= so->so_snd.sb_hiwat && - sbused(&so->so_snd) >= (so->so_snd.sb_hiwat / 8 * 7) && + int autosndbuf_mod = 0; + if (V_tcp_sendbuf_auto_lowat) + autosndbuf_mod = so->so_snd.sb_lowat; + + if ((tp->snd_wnd / 4 * 5) >= so->so_snd.sb_hiwat - autosndbuf_mod && + sbused(&so->so_snd) >= (so->so_snd.sb_hiwat / 8 * 7) - autosndbuf_mod && sbused(&so->so_snd) < V_tcp_autosndbuf_max && sendwin >= (sbused(&so->so_snd) - (tp->snd_nxt - tp->snd_una))) { From owner-svn-src-head@freebsd.org Mon Jul 3 19:49:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 261D19EE9C2; Mon, 3 Jul 2017 19:49:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8CF97F288; Mon, 3 Jul 2017 19:49:26 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63JnQTp072986; Mon, 3 Jul 2017 19:49:26 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63JnQ5c072985; Mon, 3 Jul 2017 19:49:26 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201707031949.v63JnQ5c072985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 3 Jul 2017 19:49:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320616 - head/contrib/libpcap/bpf/net X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/contrib/libpcap/bpf/net X-SVN-Commit-Revision: 320616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 19:49:27 -0000 Author: sbruno Date: Mon Jul 3 19:49:25 2017 New Revision: 320616 URL: https://svnweb.freebsd.org/changeset/base/320616 Log: Clear clang warning: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] Submitted by: Aaron Prieger Reviewed by: dim Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D11166 Modified: head/contrib/libpcap/bpf/net/bpf_filter.c Modified: head/contrib/libpcap/bpf/net/bpf_filter.c ============================================================================== --- head/contrib/libpcap/bpf/net/bpf_filter.c Mon Jul 3 19:46:12 2017 (r320615) +++ head/contrib/libpcap/bpf/net/bpf_filter.c Mon Jul 3 19:49:25 2017 (r320616) @@ -61,7 +61,12 @@ #include #include -#define SOLARIS (defined(sun) && (defined(__SVR4) || defined(__svr4__))) +#if (defined(sun) && (defined(__SVR4) || defined(__svr4__))) +#define SOLARIS 1 +#else +#define SOLARIS 0 +#endif + #if defined(__hpux) || SOLARIS # include # include From owner-svn-src-head@freebsd.org Mon Jul 3 20:37:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54DDA9EFA20; Mon, 3 Jul 2017 20:37:00 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 212D88102A; Mon, 3 Jul 2017 20:37:00 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63KaxmK093260; Mon, 3 Jul 2017 20:36:59 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63KaxCD093258; Mon, 3 Jul 2017 20:36:59 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201707032036.v63KaxCD093258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 3 Jul 2017 20:36:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320618 - head/etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/etc/rc.d X-SVN-Commit-Revision: 320618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 20:37:00 -0000 Author: kp Date: Mon Jul 3 20:36:58 2017 New Revision: 320618 URL: https://svnweb.freebsd.org/changeset/base/320618 Log: Allow rtadvd and bsnmpd to run in vnet jails Both of these tools are usable in vnet jails, so allow them to run there. PR: 220431, 220432 Submitted by: olivier@freebsd.org Modified: head/etc/rc.d/bsnmpd head/etc/rc.d/rtadvd Modified: head/etc/rc.d/bsnmpd ============================================================================== --- head/etc/rc.d/bsnmpd Mon Jul 3 20:12:31 2017 (r320617) +++ head/etc/rc.d/bsnmpd Mon Jul 3 20:36:58 2017 (r320618) @@ -5,7 +5,7 @@ # PROVIDE: bsnmpd # REQUIRE: NETWORKING syslogd -# KEYWORD: nojail shutdown +# KEYWORD: nojailvnet shutdown . /etc/rc.subr Modified: head/etc/rc.d/rtadvd ============================================================================== --- head/etc/rc.d/rtadvd Mon Jul 3 20:12:31 2017 (r320617) +++ head/etc/rc.d/rtadvd Mon Jul 3 20:36:58 2017 (r320618) @@ -6,7 +6,7 @@ # PROVIDE: rtadvd # REQUIRE: DAEMON # BEFORE: LOGIN -# KEYWORD: nojail shutdown +# KEYWORD: nojailvnet shutdown . /etc/rc.subr . /etc/network.subr From owner-svn-src-head@freebsd.org Mon Jul 3 20:44:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDB2C9EFCD9; Mon, 3 Jul 2017 20:44:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA33E816D1; Mon, 3 Jul 2017 20:44:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63Ki1LK098754; Mon, 3 Jul 2017 20:44:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63Ki1BY098753; Mon, 3 Jul 2017 20:44:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707032044.v63Ki1BY098753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 3 Jul 2017 20:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320619 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 20:44:03 -0000 Author: kib Date: Mon Jul 3 20:44:01 2017 New Revision: 320619 URL: https://svnweb.freebsd.org/changeset/base/320619 Log: Resolve confusion between different error code spaces. The vm_map_fixed() and vm_map_stack() VM functions return Mach error codes. Convert them into errno values before returning result from exec_new_vmspace(). While there, modernize the comment and do minor style adjustments. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Mon Jul 3 20:36:58 2017 (r320618) +++ head/sys/kern/kern_exec.c Mon Jul 3 20:44:01 2017 (r320619) @@ -1054,9 +1054,9 @@ exec_unmap_first_page(struct image_params *imgp) } /* - * Destroy old address space, and allocate a new stack - * The new stack is only SGROWSIZ large because it is grown - * automatically in trap.c. + * Destroy old address space, and allocate a new stack. + * The new stack is only sgrowsiz large because it is grown + * automatically on a page fault. */ int exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) @@ -1112,9 +1112,9 @@ exec_new_vmspace(struct image_params *imgp, struct sys VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_READ | VM_PROT_EXECUTE, MAP_INHERIT_SHARE | MAP_ACC_NO_CHARGE); - if (error) { + if (error != KERN_SUCCESS) { vm_object_deallocate(obj); - return (error); + return (vm_mmap_to_errno(error)); } } @@ -1138,10 +1138,9 @@ exec_new_vmspace(struct image_params *imgp, struct sys stack_addr = sv->sv_usrstack - ssiz; error = vm_map_stack(map, stack_addr, (vm_size_t)ssiz, obj != NULL && imgp->stack_prot != 0 ? imgp->stack_prot : - sv->sv_stackprot, - VM_PROT_ALL, MAP_STACK_GROWS_DOWN); - if (error) - return (error); + sv->sv_stackprot, VM_PROT_ALL, MAP_STACK_GROWS_DOWN); + if (error != KERN_SUCCESS) + return (vm_mmap_to_errno(error)); /* * vm_ssize and vm_maxsaddr are somewhat antiquated concepts, but they From owner-svn-src-head@freebsd.org Mon Jul 3 20:47:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CF349EFD4D; Mon, 3 Jul 2017 20:47:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C36FB8184E; Mon, 3 Jul 2017 20:47:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63KlWTZ098982; Mon, 3 Jul 2017 20:47:32 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63KlWSF098981; Mon, 3 Jul 2017 20:47:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201707032047.v63KlWSF098981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 3 Jul 2017 20:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320620 - head/sys/dev/sdhci X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/sdhci X-SVN-Commit-Revision: 320620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 20:47:34 -0000 Author: marius Date: Mon Jul 3 20:47:32 2017 New Revision: 320620 URL: https://svnweb.freebsd.org/changeset/base/320620 Log: Correct a typo in the comment part of r320577, later on copied into the commit message; as actually implemented, the intent is to retry up to 2 ms for controllers to enable bus power. Noticed by: ian@, rgrimes@ Additional note: Among others, the problem addressed by r320577 is the APL32 ("Storage Controllers May Not Be Power Gated") erratum. Hopefully, along with r318282, r320577 works around the remaining problems seen with Intel Apollo Lake eMMC and SDXC controllers. Modified: head/sys/dev/sdhci/sdhci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Mon Jul 3 20:44:01 2017 (r320619) +++ head/sys/dev/sdhci/sdhci.c Mon Jul 3 20:47:32 2017 (r320620) @@ -398,7 +398,7 @@ sdhci_set_power(struct sdhci_slot *slot, u_char power) /* * Turn on VDD1 power. Note that at least some Intel controllers can * fail to enable bus power on the first try after transiting from D3 - * to D0, so we give them up to 20 ms. + * to D0, so we give them up to 2 ms. */ pwr |= SDHCI_POWER_ON; for (i = 0; i < 20; i++) { From owner-svn-src-head@freebsd.org Mon Jul 3 23:28:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39A609F1937; Mon, 3 Jul 2017 23:28:01 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2551323; Mon, 3 Jul 2017 23:28:00 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63NS0gI066381; Mon, 3 Jul 2017 23:28:00 GMT (envelope-from jasone@FreeBSD.org) Received: (from jasone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63NRwHd066357; Mon, 3 Jul 2017 23:27:58 GMT (envelope-from jasone@FreeBSD.org) Message-Id: <201707032327.v63NRwHd066357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jasone set sender to jasone@FreeBSD.org using -f From: Jason Evans Date: Mon, 3 Jul 2017 23:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320623 - in head/contrib/jemalloc: . doc include/jemalloc include/jemalloc/internal src X-SVN-Group: head X-SVN-Commit-Author: jasone X-SVN-Commit-Paths: in head/contrib/jemalloc: . doc include/jemalloc include/jemalloc/internal src X-SVN-Commit-Revision: 320623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 23:28:01 -0000 Author: jasone Date: Mon Jul 3 23:27:57 2017 New Revision: 320623 URL: https://svnweb.freebsd.org/changeset/base/320623 Log: Update jemalloc to 5.0.1. Modified: head/contrib/jemalloc/ChangeLog head/contrib/jemalloc/VERSION head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h head/contrib/jemalloc/include/jemalloc/internal/background_thread_inlines.h head/contrib/jemalloc/include/jemalloc/internal/base_externs.h head/contrib/jemalloc/include/jemalloc/internal/ctl.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h head/contrib/jemalloc/include/jemalloc/internal/tcache_externs.h head/contrib/jemalloc/include/jemalloc/internal/tsd.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/src/arena.c head/contrib/jemalloc/src/background_thread.c head/contrib/jemalloc/src/base.c head/contrib/jemalloc/src/ctl.c head/contrib/jemalloc/src/extent.c head/contrib/jemalloc/src/jemalloc.c head/contrib/jemalloc/src/prof.c head/contrib/jemalloc/src/tcache.c head/contrib/jemalloc/src/tsd.c Modified: head/contrib/jemalloc/ChangeLog ============================================================================== --- head/contrib/jemalloc/ChangeLog Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/ChangeLog Mon Jul 3 23:27:57 2017 (r320623) @@ -4,6 +4,41 @@ brevity. Much more detail can be found in the git rev https://github.com/jemalloc/jemalloc +* 5.0.1 (July 1, 2017) + + This bugfix release fixes several issues, most of which are obscure enough + that typical applications are not impacted. + + Bug fixes: + - Update decay->nunpurged before purging, in order to avoid potential update + races and subsequent incorrect purging volume. (@interwq) + - Only abort on dlsym(3) error if the failure impacts an enabled feature (lazy + locking and/or background threads). This mitigates an initialization + failure bug for which we still do not have a clear reproduction test case. + (@interwq) + - Modify tsd management so that it neither crashes nor leaks if a thread's + only allocation activity is to call free() after TLS destructors have been + executed. This behavior was observed when operating with GNU libc, and is + unlikely to be an issue with other libc implementations. (@interwq) + - Mask signals during background thread creation. This prevents signals from + being inadvertently delivered to background threads. (@jasone, + @davidtgoldblatt, @interwq) + - Avoid inactivity checks within background threads, in order to prevent + recursive mutex acquisition. (@interwq) + - Fix extent_grow_retained() to use the specified hooks when the + arena..extent_hooks mallctl is used to override the default hooks. + (@interwq) + - Add missing reentrancy support for custom extent hooks which allocate. + (@interwq) + - Post-fork(2), re-initialize the list of tcaches associated with each arena + to contain no tcaches except the forking thread's. (@interwq) + - Add missing post-fork(2) mutex reinitialization for extent_grow_mtx. This + fixes potential deadlocks after fork(2). (@interwq) + - Enforce minimum autoconf version (currently 2.68), since 2.63 is known to + generate corrupt configure scripts. (@jasone) + - Ensure that the configured page size (--with-lg-page) is no larger than the + configured huge page size (--with-lg-hugepage). (@jasone) + * 5.0.0 (June 13, 2017) Unlike all previous jemalloc releases, this release does not use naturally Modified: head/contrib/jemalloc/VERSION ============================================================================== --- head/contrib/jemalloc/VERSION Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/VERSION Mon Jul 3 23:27:57 2017 (r320623) @@ -1 +1 @@ -5.0.0-4-g84f6c2cae0fb1399377ef6aea9368444c4987cc6 +5.0.1-0-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/doc/jemalloc.3 Mon Jul 3 23:27:57 2017 (r320623) @@ -2,12 +2,12 @@ .\" Title: JEMALLOC .\" Author: Jason Evans .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 06/29/2017 +.\" Date: 07/01/2017 .\" Manual: User Manual -.\" Source: jemalloc 5.0.0-4-g84f6c2cae0fb1399377ef6aea9368444c4987cc6 +.\" Source: jemalloc 5.0.1-0-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb .\" Language: English .\" -.TH "JEMALLOC" "3" "06/29/2017" "jemalloc 5.0.0-4-g84f6c2cae0fb" "User Manual" +.TH "JEMALLOC" "3" "07/01/2017" "jemalloc 5.0.1-0-g896ed3a8b3f4" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 5\&.0\&.0\-4\-g84f6c2cae0fb1399377ef6aea9368444c4987cc6\&. More information can be found at the +This manual describes jemalloc 5\&.0\&.1\-0\-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: Modified: head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h Mon Jul 3 23:27:57 2017 (r320623) @@ -90,6 +90,7 @@ void arena_prefork3(tsdn_t *tsdn, arena_t *arena); void arena_prefork4(tsdn_t *tsdn, arena_t *arena); void arena_prefork5(tsdn_t *tsdn, arena_t *arena); void arena_prefork6(tsdn_t *tsdn, arena_t *arena); +void arena_prefork7(tsdn_t *tsdn, arena_t *arena); void arena_postfork_parent(tsdn_t *tsdn, arena_t *arena); void arena_postfork_child(tsdn_t *tsdn, arena_t *arena); Modified: head/contrib/jemalloc/include/jemalloc/internal/background_thread_inlines.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/background_thread_inlines.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/background_thread_inlines.h Mon Jul 3 23:27:57 2017 (r320623) @@ -41,8 +41,9 @@ background_thread_indefinite_sleep(background_thread_i } JEMALLOC_ALWAYS_INLINE void -arena_background_thread_inactivity_check(tsdn_t *tsdn, arena_t *arena) { - if (!background_thread_enabled()) { +arena_background_thread_inactivity_check(tsdn_t *tsdn, arena_t *arena, + bool is_background_thread) { + if (!background_thread_enabled() || is_background_thread) { return; } background_thread_info_t *info = Modified: head/contrib/jemalloc/include/jemalloc/internal/base_externs.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/base_externs.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/base_externs.h Mon Jul 3 23:27:57 2017 (r320623) @@ -3,7 +3,7 @@ base_t *b0get(void); base_t *base_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks); -void base_delete(base_t *base); +void base_delete(tsdn_t *tsdn, base_t *base); extent_hooks_t *base_extent_hooks_get(base_t *base); extent_hooks_t *base_extent_hooks_set(base_t *base, extent_hooks_t *extent_hooks); Modified: head/contrib/jemalloc/include/jemalloc/internal/ctl.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/ctl.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/ctl.h Mon Jul 3 23:27:57 2017 (r320623) @@ -91,8 +91,7 @@ typedef struct ctl_arenas_s { int ctl_byname(tsd_t *tsd, const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen); -int ctl_nametomib(tsdn_t *tsdn, const char *name, size_t *mibp, - size_t *miblenp); +int ctl_nametomib(tsd_t *tsd, const char *name, size_t *mibp, size_t *miblenp); int ctl_bymib(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen); Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h Mon Jul 3 23:27:57 2017 (r320623) @@ -25,6 +25,7 @@ # include # endif # include +# include # ifdef JEMALLOC_OS_UNFAIR_LOCK # include # endif Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Mon Jul 3 23:27:57 2017 (r320623) @@ -99,6 +99,9 @@ /* Defined if pthread_atfork(3) is available. */ #define JEMALLOC_HAVE_PTHREAD_ATFORK +/* Defined if pthread_setname_np(3) is available. */ +/* #undef JEMALLOC_HAVE_PTHREAD_SETNAME_NP */ + /* * Defined if clock_gettime(CLOCK_MONOTONIC_COARSE, ...) is available. */ Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h Mon Jul 3 23:27:57 2017 (r320623) @@ -146,7 +146,10 @@ tcache_get(tsd_t *tsd) { } static inline void -pre_reentrancy(tsd_t *tsd) { +pre_reentrancy(tsd_t *tsd, arena_t *arena) { + /* arena is the current context. Reentry from a0 is not allowed. */ + assert(arena != arena_get(tsd_tsdn(tsd), 0, false)); + bool fast = tsd_fast(tsd); ++*tsd_reentrancy_levelp_get(tsd); if (fast) { Modified: head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h Mon Jul 3 23:27:57 2017 (r320623) @@ -69,6 +69,7 @@ #define arena_prefork4 JEMALLOC_N(arena_prefork4) #define arena_prefork5 JEMALLOC_N(arena_prefork5) #define arena_prefork6 JEMALLOC_N(arena_prefork6) +#define arena_prefork7 JEMALLOC_N(arena_prefork7) #define arena_prof_promote JEMALLOC_N(arena_prof_promote) #define arena_ralloc JEMALLOC_N(arena_ralloc) #define arena_ralloc_no_move JEMALLOC_N(arena_ralloc_no_move) Modified: head/contrib/jemalloc/include/jemalloc/internal/tcache_externs.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/tcache_externs.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/tcache_externs.h Mon Jul 3 23:27:57 2017 (r320623) @@ -48,7 +48,7 @@ void tcache_arena_associate(tsdn_t *tsdn, tcache_t *tc void tcache_prefork(tsdn_t *tsdn); void tcache_postfork_parent(tsdn_t *tsdn); void tcache_postfork_child(tsdn_t *tsdn); -void tcache_flush(void); +void tcache_flush(tsd_t *tsd); bool tsd_tcache_data_init(tsd_t *tsd); bool tsd_tcache_enabled_data_init(tsd_t *tsd); Modified: head/contrib/jemalloc/include/jemalloc/internal/tsd.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/tsd.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/internal/tsd.h Mon Jul 3 23:27:57 2017 (r320623) @@ -99,9 +99,10 @@ enum { tsd_state_nominal_slow = 1, /* Initialized but on slow path. */ /* the above 2 nominal states should be lower values. */ tsd_state_nominal_max = 1, /* used for comparison only. */ - tsd_state_purgatory = 2, - tsd_state_reincarnated = 3, - tsd_state_uninitialized = 4 + tsd_state_minimal_initialized = 2, + tsd_state_purgatory = 3, + tsd_state_reincarnated = 4, + tsd_state_uninitialized = 5 }; /* Manually limit tsd_state_t to a single byte. */ @@ -190,7 +191,8 @@ JEMALLOC_ALWAYS_INLINE t * \ tsd_##n##p_get(tsd_t *tsd) { \ assert(tsd->state == tsd_state_nominal || \ tsd->state == tsd_state_nominal_slow || \ - tsd->state == tsd_state_reincarnated); \ + tsd->state == tsd_state_reincarnated || \ + tsd->state == tsd_state_minimal_initialized); \ return tsd_##n##p_get_unsafe(tsd); \ } MALLOC_TSD @@ -225,7 +227,8 @@ MALLOC_TSD #define O(n, t, nt) \ JEMALLOC_ALWAYS_INLINE void \ tsd_##n##_set(tsd_t *tsd, t val) { \ - assert(tsd->state != tsd_state_reincarnated); \ + assert(tsd->state != tsd_state_reincarnated && \ + tsd->state != tsd_state_minimal_initialized); \ *tsd_##n##p_get(tsd) = val; \ } MALLOC_TSD @@ -248,7 +251,7 @@ tsd_fast(tsd_t *tsd) { } JEMALLOC_ALWAYS_INLINE tsd_t * -tsd_fetch_impl(bool init, bool internal) { +tsd_fetch_impl(bool init, bool minimal) { tsd_t *tsd = tsd_get(init); if (!init && tsd_get_allocates() && tsd == NULL) { @@ -257,7 +260,7 @@ tsd_fetch_impl(bool init, bool internal) { assert(tsd != NULL); if (unlikely(tsd->state != tsd_state_nominal)) { - return tsd_fetch_slow(tsd, internal); + return tsd_fetch_slow(tsd, minimal); } assert(tsd_fast(tsd)); tsd_assert_fast(tsd); @@ -265,9 +268,20 @@ tsd_fetch_impl(bool init, bool internal) { return tsd; } +/* Get a minimal TSD that requires no cleanup. See comments in free(). */ JEMALLOC_ALWAYS_INLINE tsd_t * -tsd_internal_fetch(void) { +tsd_fetch_min(void) { return tsd_fetch_impl(true, true); +} + +/* For internal background threads use only. */ +JEMALLOC_ALWAYS_INLINE tsd_t * +tsd_internal_fetch(void) { + tsd_t *tsd = tsd_fetch_min(); + /* Use reincarnated state to prevent full initialization. */ + tsd->state = tsd_state_reincarnated; + + return tsd; } JEMALLOC_ALWAYS_INLINE tsd_t * Modified: head/contrib/jemalloc/include/jemalloc/jemalloc.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/jemalloc.h Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/include/jemalloc/jemalloc.h Mon Jul 3 23:27:57 2017 (r320623) @@ -87,12 +87,12 @@ extern "C" { #include #include -#define JEMALLOC_VERSION "5.0.0-4-g84f6c2cae0fb1399377ef6aea9368444c4987cc6" +#define JEMALLOC_VERSION "5.0.1-0-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb" #define JEMALLOC_VERSION_MAJOR 5 #define JEMALLOC_VERSION_MINOR 0 -#define JEMALLOC_VERSION_BUGFIX 0 -#define JEMALLOC_VERSION_NREV 4 -#define JEMALLOC_VERSION_GID "84f6c2cae0fb1399377ef6aea9368444c4987cc6" +#define JEMALLOC_VERSION_BUGFIX 1 +#define JEMALLOC_VERSION_NREV 0 +#define JEMALLOC_VERSION_GID "896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb" #define MALLOCX_LG_ALIGN(la) ((int)(la)) #if LG_SIZEOF_PTR == 2 Modified: head/contrib/jemalloc/src/arena.c ============================================================================== --- head/contrib/jemalloc/src/arena.c Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/src/arena.c Mon Jul 3 23:27:57 2017 (r320623) @@ -61,7 +61,8 @@ const uint64_t h_steps[SMOOTHSTEP_NSTEPS] = { */ static void arena_decay_to_limit(tsdn_t *tsdn, arena_t *arena, - arena_decay_t *decay, extents_t *extents, bool all, size_t npages_limit); + arena_decay_t *decay, extents_t *extents, bool all, size_t npages_limit, + bool is_background_thread); static bool arena_decay_dirty(tsdn_t *tsdn, arena_t *arena, bool is_background_thread, bool all); static void arena_dalloc_bin_slab(tsdn_t *tsdn, arena_t *arena, extent_t *slab, @@ -378,7 +379,7 @@ arena_extents_dirty_dalloc(tsdn_t *tsdn, arena_t *aren if (arena_dirty_decay_ms_get(arena) == 0) { arena_decay_dirty(tsdn, arena, false, true); } else { - arena_background_thread_inactivity_check(tsdn, arena); + arena_background_thread_inactivity_check(tsdn, arena, false); } } @@ -687,10 +688,11 @@ arena_decay_backlog_update(arena_decay_t *decay, uint6 static void arena_decay_try_purge(tsdn_t *tsdn, arena_t *arena, arena_decay_t *decay, - extents_t *extents, size_t current_npages, size_t npages_limit) { + extents_t *extents, size_t current_npages, size_t npages_limit, + bool is_background_thread) { if (current_npages > npages_limit) { arena_decay_to_limit(tsdn, arena, decay, extents, false, - npages_limit); + npages_limit, is_background_thread); } } @@ -720,7 +722,7 @@ arena_decay_epoch_advance_helper(arena_decay_t *decay, static void arena_decay_epoch_advance(tsdn_t *tsdn, arena_t *arena, arena_decay_t *decay, - extents_t *extents, const nstime_t *time, bool purge) { + extents_t *extents, const nstime_t *time, bool is_background_thread) { size_t current_npages = extents_npages_get(extents); arena_decay_epoch_advance_helper(decay, time, current_npages); @@ -728,9 +730,10 @@ arena_decay_epoch_advance(tsdn_t *tsdn, arena_t *arena /* We may unlock decay->mtx when try_purge(). Finish logging first. */ decay->nunpurged = (npages_limit > current_npages) ? npages_limit : current_npages; - if (purge) { + + if (!background_thread_enabled() || is_background_thread) { arena_decay_try_purge(tsdn, arena, decay, extents, - current_npages, npages_limit); + current_npages, npages_limit, is_background_thread); } } @@ -795,7 +798,7 @@ arena_maybe_decay(tsdn_t *tsdn, arena_t *arena, arena_ if (decay_ms <= 0) { if (decay_ms == 0) { arena_decay_to_limit(tsdn, arena, decay, extents, false, - 0); + 0, is_background_thread); } return false; } @@ -830,14 +833,13 @@ arena_maybe_decay(tsdn_t *tsdn, arena_t *arena, arena_ */ bool advance_epoch = arena_decay_deadline_reached(decay, &time); if (advance_epoch) { - bool should_purge = is_background_thread || - !background_thread_enabled(); arena_decay_epoch_advance(tsdn, arena, decay, extents, &time, - should_purge); + is_background_thread); } else if (is_background_thread) { arena_decay_try_purge(tsdn, arena, decay, extents, extents_npages_get(extents), - arena_decay_backlog_npages_limit(decay)); + arena_decay_backlog_npages_limit(decay), + is_background_thread); } return advance_epoch; @@ -916,7 +918,7 @@ arena_stash_decayed(tsdn_t *tsdn, arena_t *arena, static size_t arena_decay_stashed(tsdn_t *tsdn, arena_t *arena, extent_hooks_t **r_extent_hooks, arena_decay_t *decay, extents_t *extents, - bool all, extent_list_t *decay_extents) { + bool all, extent_list_t *decay_extents, bool is_background_thread) { UNUSED size_t nmadvise, nunmapped; size_t npurged; @@ -946,7 +948,7 @@ arena_decay_stashed(tsdn_t *tsdn, arena_t *arena, extents_dalloc(tsdn, arena, r_extent_hooks, &arena->extents_muzzy, extent); arena_background_thread_inactivity_check(tsdn, - arena); + arena, is_background_thread); break; } /* Fall through. */ @@ -985,7 +987,8 @@ arena_decay_stashed(tsdn_t *tsdn, arena_t *arena, */ static void arena_decay_to_limit(tsdn_t *tsdn, arena_t *arena, arena_decay_t *decay, - extents_t *extents, bool all, size_t npages_limit) { + extents_t *extents, bool all, size_t npages_limit, + bool is_background_thread) { witness_assert_depth_to_rank(tsdn_witness_tsdp_get(tsdn), WITNESS_RANK_CORE, 1); malloc_mutex_assert_owner(tsdn, &decay->mtx); @@ -1005,7 +1008,8 @@ arena_decay_to_limit(tsdn_t *tsdn, arena_t *arena, are npages_limit, &decay_extents); if (npurge != 0) { UNUSED size_t npurged = arena_decay_stashed(tsdn, arena, - &extent_hooks, decay, extents, all, &decay_extents); + &extent_hooks, decay, extents, all, &decay_extents, + is_background_thread); assert(npurged == npurge); } @@ -1018,7 +1022,8 @@ arena_decay_impl(tsdn_t *tsdn, arena_t *arena, arena_d extents_t *extents, bool is_background_thread, bool all) { if (all) { malloc_mutex_lock(tsdn, &decay->mtx); - arena_decay_to_limit(tsdn, arena, decay, extents, all, 0); + arena_decay_to_limit(tsdn, arena, decay, extents, all, 0, + is_background_thread); malloc_mutex_unlock(tsdn, &decay->mtx); return false; @@ -1252,7 +1257,7 @@ arena_destroy(tsd_t *tsd, arena_t *arena) { * Destroy the base allocator, which manages all metadata ever mapped by * this arena. */ - base_delete(arena->base); + base_delete(tsd_tsdn(tsd), arena->base); } static extent_t * @@ -2046,7 +2051,7 @@ arena_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t * * is done enough that we should have tsd. */ assert(!tsdn_null(tsdn)); - pre_reentrancy(tsdn_tsd(tsdn)); + pre_reentrancy(tsdn_tsd(tsdn), arena); if (hooks_arena_new_hook) { hooks_arena_new_hook(); } @@ -2056,7 +2061,7 @@ arena_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t * return arena; label_error: if (ind != 0) { - base_delete(base); + base_delete(tsdn, base); } return NULL; } @@ -2082,28 +2087,33 @@ arena_prefork1(tsdn_t *tsdn, arena_t *arena) { void arena_prefork2(tsdn_t *tsdn, arena_t *arena) { + malloc_mutex_prefork(tsdn, &arena->extent_grow_mtx); +} + +void +arena_prefork3(tsdn_t *tsdn, arena_t *arena) { extents_prefork(tsdn, &arena->extents_dirty); extents_prefork(tsdn, &arena->extents_muzzy); extents_prefork(tsdn, &arena->extents_retained); } void -arena_prefork3(tsdn_t *tsdn, arena_t *arena) { +arena_prefork4(tsdn_t *tsdn, arena_t *arena) { malloc_mutex_prefork(tsdn, &arena->extent_avail_mtx); } void -arena_prefork4(tsdn_t *tsdn, arena_t *arena) { +arena_prefork5(tsdn_t *tsdn, arena_t *arena) { base_prefork(tsdn, arena->base); } void -arena_prefork5(tsdn_t *tsdn, arena_t *arena) { +arena_prefork6(tsdn_t *tsdn, arena_t *arena) { malloc_mutex_prefork(tsdn, &arena->large_mtx); } void -arena_prefork6(tsdn_t *tsdn, arena_t *arena) { +arena_prefork7(tsdn_t *tsdn, arena_t *arena) { for (unsigned i = 0; i < NBINS; i++) { malloc_mutex_prefork(tsdn, &arena->bins[i].lock); } @@ -2122,6 +2132,7 @@ arena_postfork_parent(tsdn_t *tsdn, arena_t *arena) { extents_postfork_parent(tsdn, &arena->extents_dirty); extents_postfork_parent(tsdn, &arena->extents_muzzy); extents_postfork_parent(tsdn, &arena->extents_retained); + malloc_mutex_postfork_parent(tsdn, &arena->extent_grow_mtx); malloc_mutex_postfork_parent(tsdn, &arena->decay_dirty.mtx); malloc_mutex_postfork_parent(tsdn, &arena->decay_muzzy.mtx); if (config_stats) { @@ -2133,6 +2144,23 @@ void arena_postfork_child(tsdn_t *tsdn, arena_t *arena) { unsigned i; + atomic_store_u(&arena->nthreads[0], 0, ATOMIC_RELAXED); + atomic_store_u(&arena->nthreads[1], 0, ATOMIC_RELAXED); + if (tsd_arena_get(tsdn_tsd(tsdn)) == arena) { + arena_nthreads_inc(arena, false); + } + if (tsd_iarena_get(tsdn_tsd(tsdn)) == arena) { + arena_nthreads_inc(arena, true); + } + if (config_stats) { + ql_new(&arena->tcache_ql); + tcache_t *tcache = tcache_get(tsdn_tsd(tsdn)); + if (tcache != NULL && tcache->arena == arena) { + ql_elm_new(tcache, link); + ql_tail_insert(&arena->tcache_ql, tcache, link); + } + } + for (i = 0; i < NBINS; i++) { malloc_mutex_postfork_child(tsdn, &arena->bins[i].lock); } @@ -2142,6 +2170,7 @@ arena_postfork_child(tsdn_t *tsdn, arena_t *arena) { extents_postfork_child(tsdn, &arena->extents_dirty); extents_postfork_child(tsdn, &arena->extents_muzzy); extents_postfork_child(tsdn, &arena->extents_retained); + malloc_mutex_postfork_child(tsdn, &arena->extent_grow_mtx); malloc_mutex_postfork_child(tsdn, &arena->decay_dirty.mtx); malloc_mutex_postfork_child(tsdn, &arena->decay_muzzy.mtx); if (config_stats) { Modified: head/contrib/jemalloc/src/background_thread.c ============================================================================== --- head/contrib/jemalloc/src/background_thread.c Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/src/background_thread.c Mon Jul 3 23:27:57 2017 (r320623) @@ -316,7 +316,7 @@ background_threads_disable_single(tsd_t *tsd, backgrou &background_thread_lock); } - pre_reentrancy(tsd); + pre_reentrancy(tsd, NULL); malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx); bool has_thread; assert(info->state != background_thread_paused); @@ -347,6 +347,38 @@ background_threads_disable_single(tsd_t *tsd, backgrou static void *background_thread_entry(void *ind_arg); +static int +background_thread_create_signals_masked(pthread_t *thread, + const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg) { + /* + * Mask signals during thread creation so that the thread inherits + * an empty signal set. + */ + sigset_t set; + sigfillset(&set); + sigset_t oldset; + int mask_err = pthread_sigmask(SIG_SETMASK, &set, &oldset); + if (mask_err != 0) { + return mask_err; + } + int create_err = pthread_create_wrapper(thread, attr, start_routine, + arg); + /* + * Restore the signal mask. Failure to restore the signal mask here + * changes program behavior. + */ + int restore_err = pthread_sigmask(SIG_SETMASK, &oldset, NULL); + if (restore_err != 0) { + malloc_printf(": background thread creation " + "failed (%d), and signal mask restoration failed " + "(%d)\n", create_err, restore_err); + if (opt_abort) { + abort(); + } + } + return create_err; +} + static void check_background_thread_creation(tsd_t *tsd, unsigned *n_created, bool *created_threads) { @@ -376,9 +408,9 @@ label_restart: */ malloc_mutex_unlock(tsd_tsdn(tsd), &background_thread_lock); - pre_reentrancy(tsd); - int err = pthread_create_wrapper(&info->thread, NULL, - background_thread_entry, (void *)(uintptr_t)i); + pre_reentrancy(tsd, NULL); + int err = background_thread_create_signals_masked(&info->thread, + NULL, background_thread_entry, (void *)(uintptr_t)i); post_reentrancy(tsd); if (err == 0) { @@ -467,7 +499,9 @@ static void * background_thread_entry(void *ind_arg) { unsigned thread_ind = (unsigned)(uintptr_t)ind_arg; assert(thread_ind < ncpus); - +#ifdef JEMALLOC_HAVE_PTHREAD_SETNAME_NP + pthread_setname_np(pthread_self(), "jemalloc_bg_thd"); +#endif if (opt_percpu_arena != percpu_arena_disabled) { set_current_thread_affinity((int)thread_ind); } @@ -523,12 +557,12 @@ background_thread_create(tsd_t *tsd, unsigned arena_in return false; } - pre_reentrancy(tsd); + pre_reentrancy(tsd, NULL); /* * To avoid complications (besides reentrancy), create internal * background threads with the underlying pthread_create. */ - int err = pthread_create_wrapper(&info->thread, NULL, + int err = background_thread_create_signals_masked(&info->thread, NULL, background_thread_entry, (void *)thread_ind); post_reentrancy(tsd); Modified: head/contrib/jemalloc/src/base.c ============================================================================== --- head/contrib/jemalloc/src/base.c Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/src/base.c Mon Jul 3 23:27:57 2017 (r320623) @@ -15,7 +15,7 @@ static base_t *b0; /******************************************************************************/ static void * -base_map(extent_hooks_t *extent_hooks, unsigned ind, size_t size) { +base_map(tsdn_t *tsdn, extent_hooks_t *extent_hooks, unsigned ind, size_t size) { void *addr; bool zero = true; bool commit = true; @@ -25,15 +25,19 @@ base_map(extent_hooks_t *extent_hooks, unsigned ind, s if (extent_hooks == &extent_hooks_default) { addr = extent_alloc_mmap(NULL, size, PAGE, &zero, &commit); } else { + /* No arena context as we are creating new arenas. */ + tsd_t *tsd = tsdn_null(tsdn) ? tsd_fetch() : tsdn_tsd(tsdn); + pre_reentrancy(tsd, NULL); addr = extent_hooks->alloc(extent_hooks, NULL, size, PAGE, &zero, &commit, ind); + post_reentrancy(tsd); } return addr; } static void -base_unmap(extent_hooks_t *extent_hooks, unsigned ind, void *addr, +base_unmap(tsdn_t *tsdn, extent_hooks_t *extent_hooks, unsigned ind, void *addr, size_t size) { /* * Cascade through dalloc, decommit, purge_forced, and purge_lazy, @@ -61,27 +65,32 @@ base_unmap(extent_hooks_t *extent_hooks, unsigned ind, /* Nothing worked. This should never happen. */ not_reached(); } else { + tsd_t *tsd = tsdn_null(tsdn) ? tsd_fetch() : tsdn_tsd(tsdn); + pre_reentrancy(tsd, NULL); if (extent_hooks->dalloc != NULL && !extent_hooks->dalloc(extent_hooks, addr, size, true, ind)) { - return; + goto label_done; } if (extent_hooks->decommit != NULL && !extent_hooks->decommit(extent_hooks, addr, size, 0, size, ind)) { - return; + goto label_done; } if (extent_hooks->purge_forced != NULL && !extent_hooks->purge_forced(extent_hooks, addr, size, 0, size, ind)) { - return; + goto label_done; } if (extent_hooks->purge_lazy != NULL && !extent_hooks->purge_lazy(extent_hooks, addr, size, 0, size, ind)) { - return; + goto label_done; } /* Nothing worked. That's the application's problem. */ + label_done: + post_reentrancy(tsd); + return; } } @@ -157,7 +166,7 @@ base_extent_bump_alloc(tsdn_t *tsdn, base_t *base, ext * On success a pointer to the initialized base_block_t header is returned. */ static base_block_t * -base_block_alloc(extent_hooks_t *extent_hooks, unsigned ind, +base_block_alloc(tsdn_t *tsdn, extent_hooks_t *extent_hooks, unsigned ind, pszind_t *pind_last, size_t *extent_sn_next, size_t size, size_t alignment) { alignment = ALIGNMENT_CEILING(alignment, QUANTUM); @@ -179,7 +188,7 @@ base_block_alloc(extent_hooks_t *extent_hooks, unsigne size_t next_block_size = HUGEPAGE_CEILING(sz_pind2sz(pind_next)); size_t block_size = (min_block_size > next_block_size) ? min_block_size : next_block_size; - base_block_t *block = (base_block_t *)base_map(extent_hooks, ind, + base_block_t *block = (base_block_t *)base_map(tsdn, extent_hooks, ind, block_size); if (block == NULL) { return NULL; @@ -207,8 +216,9 @@ base_extent_alloc(tsdn_t *tsdn, base_t *base, size_t s * called. */ malloc_mutex_unlock(tsdn, &base->mtx); - base_block_t *block = base_block_alloc(extent_hooks, base_ind_get(base), - &base->pind_last, &base->extent_sn_next, size, alignment); + base_block_t *block = base_block_alloc(tsdn, extent_hooks, + base_ind_get(base), &base->pind_last, &base->extent_sn_next, size, + alignment); malloc_mutex_lock(tsdn, &base->mtx); if (block == NULL) { return NULL; @@ -234,8 +244,8 @@ base_t * base_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks) { pszind_t pind_last = 0; size_t extent_sn_next = 0; - base_block_t *block = base_block_alloc(extent_hooks, ind, &pind_last, - &extent_sn_next, sizeof(base_t), QUANTUM); + base_block_t *block = base_block_alloc(tsdn, extent_hooks, ind, + &pind_last, &extent_sn_next, sizeof(base_t), QUANTUM); if (block == NULL) { return NULL; } @@ -249,7 +259,7 @@ base_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *e atomic_store_p(&base->extent_hooks, extent_hooks, ATOMIC_RELAXED); if (malloc_mutex_init(&base->mtx, "base", WITNESS_RANK_BASE, malloc_mutex_rank_exclusive)) { - base_unmap(extent_hooks, ind, block, block->size); + base_unmap(tsdn, extent_hooks, ind, block, block->size); return NULL; } base->pind_last = pind_last; @@ -272,13 +282,13 @@ base_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *e } void -base_delete(base_t *base) { +base_delete(tsdn_t *tsdn, base_t *base) { extent_hooks_t *extent_hooks = base_extent_hooks_get(base); base_block_t *next = base->blocks; do { base_block_t *block = next; next = block->next; - base_unmap(extent_hooks, base_ind_get(base), block, + base_unmap(tsdn, extent_hooks, base_ind_get(base), block, block->size); } while (next != NULL); } Modified: head/contrib/jemalloc/src/ctl.c ============================================================================== --- head/contrib/jemalloc/src/ctl.c Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/src/ctl.c Mon Jul 3 23:27:57 2017 (r320623) @@ -622,7 +622,7 @@ arenas_i2a(size_t i) { } static ctl_arena_t * -arenas_i_impl(tsdn_t *tsdn, size_t i, bool compat, bool init) { +arenas_i_impl(tsd_t *tsd, size_t i, bool compat, bool init) { ctl_arena_t *ret; assert(!compat || !init); @@ -635,15 +635,15 @@ arenas_i_impl(tsdn_t *tsdn, size_t i, bool compat, boo ctl_arena_stats_t astats; }; struct container_s *cont = - (struct container_s *)base_alloc(tsdn, b0get(), - sizeof(struct container_s), QUANTUM); + (struct container_s *)base_alloc(tsd_tsdn(tsd), + b0get(), sizeof(struct container_s), QUANTUM); if (cont == NULL) { return NULL; } ret = &cont->ctl_arena; ret->astats = &cont->astats; } else { - ret = (ctl_arena_t *)base_alloc(tsdn, b0get(), + ret = (ctl_arena_t *)base_alloc(tsd_tsdn(tsd), b0get(), sizeof(ctl_arena_t), QUANTUM); if (ret == NULL) { return NULL; @@ -659,7 +659,7 @@ arenas_i_impl(tsdn_t *tsdn, size_t i, bool compat, boo static ctl_arena_t * arenas_i(size_t i) { - ctl_arena_t *ret = arenas_i_impl(TSDN_NULL, i, true, false); + ctl_arena_t *ret = arenas_i_impl(tsd_fetch(), i, true, false); assert(ret != NULL); return ret; } @@ -863,7 +863,7 @@ ctl_arena_refresh(tsdn_t *tsdn, arena_t *arena, ctl_ar } static unsigned -ctl_arena_init(tsdn_t *tsdn, extent_hooks_t *extent_hooks) { +ctl_arena_init(tsd_t *tsd, extent_hooks_t *extent_hooks) { unsigned arena_ind; ctl_arena_t *ctl_arena; @@ -876,12 +876,12 @@ ctl_arena_init(tsdn_t *tsdn, extent_hooks_t *extent_ho } /* Trigger stats allocation. */ - if (arenas_i_impl(tsdn, arena_ind, false, true) == NULL) { + if (arenas_i_impl(tsd, arena_ind, false, true) == NULL) { return UINT_MAX; } /* Initialize new arena. */ - if (arena_init(tsdn, arena_ind, extent_hooks) == NULL) { + if (arena_init(tsd_tsdn(tsd), arena_ind, extent_hooks) == NULL) { return UINT_MAX; } @@ -975,8 +975,9 @@ ctl_refresh(tsdn_t *tsdn) { } static bool -ctl_init(tsdn_t *tsdn) { +ctl_init(tsd_t *tsd) { bool ret; + tsdn_t *tsdn = tsd_tsdn(tsd); malloc_mutex_lock(tsdn, &ctl_mtx); if (!ctl_initialized) { @@ -1010,14 +1011,14 @@ ctl_init(tsdn_t *tsdn) { * here rather than doing it lazily elsewhere, in order * to limit when OOM-caused errors can occur. */ - if ((ctl_sarena = arenas_i_impl(tsdn, MALLCTL_ARENAS_ALL, false, + if ((ctl_sarena = arenas_i_impl(tsd, MALLCTL_ARENAS_ALL, false, true)) == NULL) { ret = true; goto label_return; } ctl_sarena->initialized = true; - if ((ctl_darena = arenas_i_impl(tsdn, MALLCTL_ARENAS_DESTROYED, + if ((ctl_darena = arenas_i_impl(tsd, MALLCTL_ARENAS_DESTROYED, false, true)) == NULL) { ret = true; goto label_return; @@ -1031,7 +1032,7 @@ ctl_init(tsdn_t *tsdn) { ctl_arenas->narenas = narenas_total_get(); for (i = 0; i < ctl_arenas->narenas; i++) { - if (arenas_i_impl(tsdn, i, false, true) == NULL) { + if (arenas_i_impl(tsd, i, false, true) == NULL) { ret = true; goto label_return; } @@ -1156,7 +1157,7 @@ ctl_byname(tsd_t *tsd, const char *name, void *oldp, s size_t mib[CTL_MAX_DEPTH]; const ctl_named_node_t *node; - if (!ctl_initialized && ctl_init(tsd_tsdn(tsd))) { + if (!ctl_initialized && ctl_init(tsd)) { ret = EAGAIN; goto label_return; } @@ -1180,15 +1181,15 @@ label_return: } int -ctl_nametomib(tsdn_t *tsdn, const char *name, size_t *mibp, size_t *miblenp) { +ctl_nametomib(tsd_t *tsd, const char *name, size_t *mibp, size_t *miblenp) { int ret; - if (!ctl_initialized && ctl_init(tsdn)) { + if (!ctl_initialized && ctl_init(tsd)) { ret = EAGAIN; goto label_return; } - ret = ctl_lookup(tsdn, name, NULL, mibp, miblenp); + ret = ctl_lookup(tsd_tsdn(tsd), name, NULL, mibp, miblenp); label_return: return(ret); } @@ -1200,7 +1201,7 @@ ctl_bymib(tsd_t *tsd, const size_t *mib, size_t miblen const ctl_named_node_t *node; size_t i; - if (!ctl_initialized && ctl_init(tsd_tsdn(tsd))) { + if (!ctl_initialized && ctl_init(tsd)) { ret = EAGAIN; goto label_return; } @@ -1696,7 +1697,7 @@ thread_tcache_flush_ctl(tsd_t *tsd, const size_t *mib, READONLY(); WRITEONLY(); - tcache_flush(); + tcache_flush(tsd); ret = 0; label_return: @@ -1970,7 +1971,7 @@ arena_reset_finish_background_thread(tsd_t *tsd, unsig unsigned ind = arena_ind % ncpus; background_thread_info_t *info = &background_thread_info[ind]; - assert(info->state = background_thread_paused); + assert(info->state == background_thread_paused); malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx); info->state = background_thread_started; malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx); @@ -2312,8 +2313,7 @@ arenas_create_ctl(tsd_t *tsd, const size_t *mib, size_ extent_hooks = (extent_hooks_t *)&extent_hooks_default; WRITE(extent_hooks, extent_hooks_t *); - if ((arena_ind = ctl_arena_init(tsd_tsdn(tsd), extent_hooks)) == - UINT_MAX) { + if ((arena_ind = ctl_arena_init(tsd, extent_hooks)) == UINT_MAX) { ret = EAGAIN; goto label_return; } Modified: head/contrib/jemalloc/src/extent.c ============================================================================== --- head/contrib/jemalloc/src/extent.c Mon Jul 3 22:21:44 2017 (r320622) +++ head/contrib/jemalloc/src/extent.c Mon Jul 3 23:27:57 2017 (r320623) @@ -1025,6 +1025,18 @@ extent_alloc_default(extent_hooks_t *extent_hooks, voi alignment, zero, commit); } +static void +extent_hook_pre_reentrancy(tsdn_t *tsdn, arena_t *arena) { + tsd_t *tsd = tsdn_null(tsdn) ? tsd_fetch() : tsdn_tsd(tsdn); + pre_reentrancy(tsd, arena); +} + +static void +extent_hook_post_reentrancy(tsdn_t *tsdn) { + tsd_t *tsd = tsdn_null(tsdn) ? tsd_fetch() : tsdn_tsd(tsdn); + post_reentrancy(tsd); +} + /* * If virtual memory is retained, create increasingly larger extents from which * to split requested extents in order to limit the total number of disjoint @@ -1073,9 +1085,11 @@ extent_grow_retained(tsdn_t *tsdn, arena_t *arena, &zeroed, &committed, (dss_prec_t)atomic_load_u( &arena->dss_prec, ATOMIC_RELAXED)); } else { + extent_hook_pre_reentrancy(tsdn, arena); ptr = (*r_extent_hooks)->alloc(*r_extent_hooks, NULL, alloc_size, PAGE, &zeroed, &committed, arena_ind_get(arena)); + extent_hook_post_reentrancy(tsdn); } extent_init(extent, arena, ptr, alloc_size, false, NSIZES, @@ -1247,8 +1261,10 @@ extent_alloc_wrapper_hard(tsdn_t *tsdn, arena_t *arena addr = extent_alloc_default_impl(tsdn, arena, new_addr, esize, alignment, zero, commit); } else { + extent_hook_pre_reentrancy(tsdn, arena); addr = (*r_extent_hooks)->alloc(*r_extent_hooks, new_addr, esize, alignment, zero, commit, arena_ind_get(arena)); + extent_hook_post_reentrancy(tsdn); } if (addr == NULL) { extent_dalloc(tsdn, arena, extent); @@ -1486,10 +1502,12 @@ extent_dalloc_wrapper_try(tsdn_t *tsdn, arena_t *arena err = extent_dalloc_default_impl(extent_base_get(extent), extent_size_get(extent)); } else { + extent_hook_pre_reentrancy(tsdn, arena); err = ((*r_extent_hooks)->dalloc == NULL || (*r_extent_hooks)->dalloc(*r_extent_hooks, extent_base_get(extent), extent_size_get(extent), extent_committed_get(extent), arena_ind_get(arena))); + extent_hook_post_reentrancy(tsdn); } if (!err) { @@ -1515,6 +1533,9 @@ extent_dalloc_wrapper(tsdn_t *tsdn, arena_t *arena, } extent_reregister(tsdn, extent); + if (*r_extent_hooks != &extent_hooks_default) { + extent_hook_pre_reentrancy(tsdn, arena); + } /* Try to decommit; purge if that fails. */ bool zeroed; if (!extent_committed_get(extent)) { @@ -1536,6 +1557,9 @@ extent_dalloc_wrapper(tsdn_t *tsdn, arena_t *arena, } else { zeroed = false; } + if (*r_extent_hooks != &extent_hooks_default) { + extent_hook_post_reentrancy(tsdn); + } extent_zeroed_set(extent, zeroed); if (config_prof) { @@ -1579,9 +1603,11 @@ extent_destroy_wrapper(tsdn_t *tsdn, arena_t *arena, extent_destroy_default_impl(extent_base_get(extent), extent_size_get(extent)); } else if ((*r_extent_hooks)->destroy != NULL) { + extent_hook_pre_reentrancy(tsdn, arena); (*r_extent_hooks)->destroy(*r_extent_hooks, extent_base_get(extent), extent_size_get(extent), extent_committed_get(extent), arena_ind_get(arena)); + extent_hook_post_reentrancy(tsdn); } extent_dalloc(tsdn, arena, extent); @@ -1602,9 +1628,15 @@ extent_commit_impl(tsdn_t *tsdn, arena_t *arena, WITNESS_RANK_CORE, growing_retained ? 1 : 0); extent_hooks_assure_initialized(arena, r_extent_hooks); + if (*r_extent_hooks != &extent_hooks_default) { + extent_hook_pre_reentrancy(tsdn, arena); + } bool err = ((*r_extent_hooks)->commit == NULL || (*r_extent_hooks)->commit(*r_extent_hooks, extent_base_get(extent), extent_size_get(extent), offset, length, arena_ind_get(arena))); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Jul 3 23:54:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ADFC9F1F0A; Mon, 3 Jul 2017 23:54:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 172E41228; Mon, 3 Jul 2017 23:54:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63Nsdw3078763; Mon, 3 Jul 2017 23:54:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63NsdJl078762; Mon, 3 Jul 2017 23:54:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707032354.v63NsdJl078762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 3 Jul 2017 23:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320624 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 320624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 23:54:41 -0000 Author: markj Date: Mon Jul 3 23:54:39 2017 New Revision: 320624 URL: https://svnweb.freebsd.org/changeset/base/320624 Log: Fix a few issues with the lockstat provider man page. - Address most of the post-commit comments on D11128.[1] - Reference the man pages for the lock types supported by the provider. - Add a BUGS section. - Eliminate some redundancy by describing similar probes in the same paragraph. - Fix several inaccuracies, particularly in the probe argument descriptions. Submitted by: wblock [1] MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D11293 Modified: head/share/man/man4/dtrace_lockstat.4 Modified: head/share/man/man4/dtrace_lockstat.4 ============================================================================== --- head/share/man/man4/dtrace_lockstat.4 Mon Jul 3 23:27:57 2017 (r320623) +++ head/share/man/man4/dtrace_lockstat.4 Mon Jul 3 23:54:39 2017 (r320624) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 11, 2017 +.Dd July 3, 2017 .Dt DTRACE_LOCKSTAT 4 .Os .Sh NAME @@ -54,198 +54,247 @@ .Sh DESCRIPTION The DTrace .Nm lockstat -provider allows the tracing of events related to locking on FreeBSD. +provider allows the tracing of events related to locking on +.Fx . .Pp The .Nm lockstat -provider contains DTrace probe for inspecting the kernel's lock +provider contains DTrace probes for inspecting the kernel's lock state transitions. -Tracepoints exist for several types of kernel -locking primitives, including mutexes, spin, reader-writer, -and shared exclusive locks. -An attempt has been made to provide a regular and easy to understand -interface to the +Probes exist for the +.Xr mutex 9 , +.Xr rwlock 9 +and +.Xr sx 9 +lock types. +The +.Xr lockstat 1 +utility can be used to collect and display data collected from the .Nm lockstat provider. -Each type of lock has an +Each type of lock has .Fn acquire and .Fn release -probe which exposes the lock structure that is being operated upon. +probes which expose the lock structure being operated upon, +as well as probes which fire when a thread contends with other threads +for ownership of a lock. .Pp -Whenever an MTX_DEF mutex is acquired the -.Fn lockstat:::adaptive-acquire -probe fires. -The only argument is a pointer to the lock structure which describes -the lock that is being acquired. -.Pp The +.Fn lockstat:::adaptive-acquire +and .Fn lockstat:::adaptive-release -probe fires whenever an adaptive lock is released. +probes fire when an +.Dv MTX_DEF +.Xr mutex 9 +is acquired and released, respectively. The only argument is a pointer to the lock structure which describes -the lock that is being released. +the lock being acquired or released. .Pp The .Fn lockstat:::adaptive-spin -probe fires when an adaptive lock is acquired. +probe fires when a thread spins while waiting for a +.Dv MTX_DEF +.Xr mutex 9 +to be released by another thread. The first argument is a pointer to the lock structure that describes the lock and the second argument is the amount of time, -in nanoseconds, -that the mutex spent spinning. -.Pp +in nanoseconds, that the mutex spent spinning. The .Fn lockstat:::adaptive-block -probe fires whenever thread takes itself off of the CPU -while trying to acquire the lock. +probe fires when a thread takes itself off the CPU while trying to acquire an +.Dv MTX_DEF +.Xr mutex 9 +that is owned by another thread. The first argument is a pointer to the lock structure that describes the lock and the second argument is the length of time, -in nanoseconds, -that the waiting thread was blocked. +in nanoseconds, that the waiting thread was blocked. The .Fn lockstat:::adaptive-block -probe fires only after the lock has been successfully acquired, -after the adaptive-acquire probe fires. -.Pp -Whenever a spin mutex is acquired the -.Fn lockstat:::spin-acquire +and +.Fn lockstat:::adaptive-spin +probes fire only after the lock has been successfully acquired, +and in particular, after the +.Fn lockstat:::adaptive-acquire probe fires. -The only argument is a pointer to the lock structure which describes -the lock that is being acquired. .Pp The +.Fn lockstat:::spin-acquire +and .Fn lockstat:::spin-release -probe fires whenever a spin mutex is released. +probes fire when a +.Dv MTX_SPIN +.Xr mutex 9 +is acquired and released, respectively. The only argument is a pointer to the lock structure which describes -the lock that is being released. +the lock being acquired or released. .Pp The .Fn lockstat:::spin-spin -probe fires when a thread stops spinning waiting for a spin mutex. +probe fires when a thread spins while waiting for a +.Dv MTX_SPIN +.Xr mutex 9 +to be released by another thread. The first argument is a pointer to the lock structure that describes the lock and the second argument is the length of the time spent spinning, in nanoseconds. -.Pp -Whenever a reader-writer lock is acquired the -.Fn lockstat:::rw-acquire +The +.Fn lockstat:::spin-spin +probe fires only after the lock has been successfully acquired, +and in particular, after the +.Fn lockstat:::spin-acquire probe fires. -The only argument is a pointer to the structure which describes -the lock that is being acquired. .Pp The +.Fn lockstat:::rw-acquire +and .Fn lockstat:::rw-release -probe fires whenever a reader-writer lock is released. +probes fire when a +.Xr rwlock 9 +is acquired and released, respectively. +The first argument is a pointer to the structure which describes +the lock being acquired. +The second argument is +.Dv 0 +if the lock is being acquired or released as a writer, and +.Dv 1 +if it is being acquired or released as a reader. .Pp The .Fn lockstat:::rw-block -probe fires whenever a thread removes itself from the CPU while -waiting to acquire the lock. -The first argument is a pointer to the lock structure that describes -the lock and the second argument is the length of time, -in nanoseconds, -that the waiting thread was blocked. -The third argument is 1 if the thread was were spinning while -trying to acquire a read lock, -otherwise it will be 0 indicating that we were spinning for the write lock. -The fourth argument is 1 if we were waiting for a reader to release the lock, -otherwise it will be 0 indicating that we were waiting for a writer -to release the lock. -The fifth argument is the number of readers that held the lock when -we started spinning; in particular, argument 5 is non-zero only -if the fourth argument is 1. -.Pp +probe fires when a thread removes itself from the CPU while +waiting to acquire a +.Xr rwlock 9 . The .Fn lockstat:::rw-spin -probe fires when a reader-writer lock takes itself off the CPU -while waiting for the lock. +probe fires when a thread spins while waiting to acquire a +.Xr rwlock 9 . +Both probes take the same set of arguments. The first argument is a pointer to the lock structure that describes -the lock and the second argument returns an integer count of the -number of spins that were completed. +the lock. +The second argument is the length of time, in nanoseconds, +that the waiting thread was off the CPU or spinning for the lock. +The third argument is +.Dv 0 +if the thread is attempting to acquire the lock as a writer, and +.Dv 1 +if the thread is attempting to acquire the lock as a reader. +The fourth argument is +.Dv 0 +if the thread is waiting for a writer to release the lock, and +.Dv 1 +if the thread is waiting for a reader to release the lock. +The fifth argument is the number of readers that held the lock when +the thread first attempted to acquire the lock. +This argument will be +.Dv 0 +if the fourth argument is +.Dv 0 . .Pp The .Fn lockstat:::rw-upgrade -probe fires whenever a thread tries to upgrade a lock from a +probe fires when a thread successfully upgrades a held +.Xr rwlock 9 read lock to a write lock. -The only argument is a pointer to the structure which describes -the lock that is being acquired. -.Pp +The .Fn lockstat:::rw-downgrade -probe fires whenever a thread tries downgrades a lock from a -read and write lock to a read lock. +probe first when a thread downgrades a held +.Xr rwlock 9 +write lock to a read lock. The only argument is a pointer to the structure which describes -the lock that is being acquired. +the lock being acquired. .Pp -Whenever a shared-exclusive lock is acquired the -.Fn lockstat:::sx-acquire -probe fires. -The only argument is a pointer to the structure which describes -the lock that is being acquired. -.Pp The +.Fn lockstat:::sx-acquire +and .Fn lockstat:::sx-release -probe fires whenever an adaptive lock is released. -The only argument is a pointer to the lock structure which describes -the lock that is being released. +probes fire when a +.Xr sx 9 +is acquired and released, respectively. +The first argument is a pointer to the structure which describes +the lock being acquired. +The second argument is +.Dv 0 +if the shared lock is being acquired or released, and +.Dv 1 +if the exclusive lock is being acquired or released. .Pp The .Fn lockstat:::sx-block -probe fires whenever a thread takes itself off the CPU while -waiting for the lock. -The first argument is a pointer to the structure that describes -the lock and the second argument is the length of time, -in nanoseconds, -that the waiting thread was blocked. -The third argument is 1 if the thread was were spinning while -trying to acquire a read lock, -otherwise it will be 0 indicating that we were spinning for the write lock. -The fourth argument is 1 if we were waiting for a reader to release the lock, -otherwise it will be 0 indicating that we were waiting for a writer -to release the lock. -The fifth argument is the number of readers that held the lock when -we started spinning; in particular, argument 5 is non-zero only -if the fourth argument is 1. -.Pp +probe fires when a thread takes itself off the CPU while +waiting to acquire a +.Xr sx 9 . The .Fn lockstat:::sx-spin -probe fires when a thread takes itself off of the CPU while -waiting for the lock. -The first argument is a pointer to the structure that describes -the lock and the second argument returns an integer count of the -number of spins that were completed. +probe first when a thread spins while waiting to acquire a +.Xr sx 9 . +Both probes take the same set of arguments. +The first argument is a pointer to the lock structure that describes +the lock. +The second argument is the length of time, in nanoseconds, +that the waiting thread was off the CPU or spinning for the lock. +The third argument is +.Dv 0 +if the thread is attempting to acquire the lock as a writer, and +.Dv 1 +if the thread is attempting to acquire the lock as a reader. +The fourth argument is +.Dv 0 +if the thread is waiting for a writer to release the lock, and +.Dv 1 +if the thread is waiting for a reader to release the lock. +The fifth argument is the number of readers that held the lock when +the thread first attempted to acquire the lock. +This argument will be +.Dv 0 +if the fourth argument is +.Dv 0 . .Pp The .Fn lockstat:::sx-upgrade -probe fires whenever a thread tries to upgrade a lock from a -shared lock to a shared-exclusive lock. +probe fires when a thread successfully upgrades a held +.Xr sx 9 +shared lock to an exclusive lock. The only argument is a pointer to the structure which describes -the lock that is being upgraded. -.Pp +the lock being acquired. The .Fn lockstat:::sx-downgrade -probe fires whenever a thread downgrades a lock from a -shared-exclusive lock to a shared lock. -The only argument is a pointer to the structure which describes -the lock that is being downgraded. +probe fires when a thread downgrades a held +.Xr sx 9 +exclusive lock to a shared lock. .Pp The .Fn lockstat:::thread-spin -probe fires whenever a thread spins on a spin lock. +probe fires when a thread spins on a thread lock, which is a specialized +.Dv MTX_SPIN +.Xr mutex 9 . The first argument is a pointer to the structure that describes the lock and the second argument is the length of time, -in nanoseconds, -that the thread was spinning. +in nanoseconds, that the thread was spinning. .Sh SEE ALSO .Xr dtrace 1 , .Xr lockstat 1 , .Xr locking 9 , -.Xr SDT 9 +.Xr mutex 9 , +.Xr rwlock 9 , +.Xr SDT 9 , +.Xr sx 9 .Sh HISTORY The .Nm lockstat -provider first appeared in OpenSolaris. -The FreeBSD implementation of the +provider first appeared in Solaris. +The +.Fx +implementation of the .Nm lockstat provider first appeared in .Fx 9. .Sh AUTHORS This manual page was written by .An George V. Neville-Neil Aq Mt gnn@FreeBSD.org . +.Sh BUGS +Probes for +.Xr lockmgr 9 +and +.Xr rmlock 9 +locks have not yet been added. From owner-svn-src-head@freebsd.org Mon Jul 3 23:59:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 751779F210F; Mon, 3 Jul 2017 23:59:12 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39F8B13C2; Mon, 3 Jul 2017 23:59:12 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63NxBFq079002; Mon, 3 Jul 2017 23:59:11 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63NxBc1079001; Mon, 3 Jul 2017 23:59:11 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201707032359.v63NxBc1079001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Mon, 3 Jul 2017 23:59:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320625 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: zbb X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 320625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 23:59:12 -0000 Author: zbb Date: Mon Jul 3 23:59:11 2017 New Revision: 320625 URL: https://svnweb.freebsd.org/changeset/base/320625 Log: Add missing lock upon initialization of the interface Lack of this lock was causing crash if down was called in parallel with the initialization routine. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Mon Jul 3 23:54:39 2017 (r320624) +++ head/sys/dev/ena/ena.c Mon Jul 3 23:59:11 2017 (r320625) @@ -2276,8 +2276,11 @@ ena_init(void *arg) { struct ena_adapter *adapter = (struct ena_adapter *)arg; - if (adapter->up == false) + if (adapter->up == false) { + sx_xlock(&adapter->ioctl_sx); ena_up(adapter); + sx_unlock(&adapter->ioctl_sx); + } return; } From owner-svn-src-head@freebsd.org Tue Jul 4 00:00:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A78979F2197; Tue, 4 Jul 2017 00:00:43 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7482115CA; Tue, 4 Jul 2017 00:00:43 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6400g9W079154; Tue, 4 Jul 2017 00:00:42 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6400gaA079153; Tue, 4 Jul 2017 00:00:42 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201707040000.v6400gaA079153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 4 Jul 2017 00:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320626 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: zbb X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 320626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 00:00:43 -0000 Author: zbb Date: Tue Jul 4 00:00:42 2017 New Revision: 320626 URL: https://svnweb.freebsd.org/changeset/base/320626 Log: Acquire locks before calling drbr_flush() It is required to hold lock that is associated with buffer ring before flushing drbr. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Mon Jul 3 23:59:11 2017 (r320625) +++ head/sys/dev/ena/ena.c Tue Jul 4 00:00:42 2017 (r320626) @@ -642,7 +642,9 @@ ena_setup_tx_resources(struct ena_adapter *adapter, in tx_ring->next_to_clean = 0; /* Make sure that drbr is empty */ + ENA_RING_MTX_LOCK(tx_ring); drbr_flush(adapter->ifp, tx_ring->br); + ENA_RING_MTX_UNLOCK(tx_ring); /* ... and create the buffer DMA maps */ for (i = 0; i < tx_ring->ring_size; i++) { @@ -709,11 +711,11 @@ ena_free_tx_resources(struct ena_adapter *adapter, int taskqueue_free(tx_ring->enqueue_tq); + ENA_RING_MTX_LOCK(tx_ring); /* Flush buffer ring, */ drbr_flush(adapter->ifp, tx_ring->br); /* Free buffer DMA maps, */ - ENA_RING_MTX_LOCK(tx_ring); for (int i = 0; i < tx_ring->ring_size; i++) { m_freem(tx_ring->tx_buffer_info[i].mbuf); tx_ring->tx_buffer_info[i].mbuf = NULL; From owner-svn-src-head@freebsd.org Tue Jul 4 00:02:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA59E9F232B; Tue, 4 Jul 2017 00:02:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7792D1831; Tue, 4 Jul 2017 00:02:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64026oK082758; Tue, 4 Jul 2017 00:02:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64026ll082757; Tue, 4 Jul 2017 00:02:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707040002.v64026ll082757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 4 Jul 2017 00:02:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320627 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 320627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 00:02:07 -0000 Author: markj Date: Tue Jul 4 00:02:06 2017 New Revision: 320627 URL: https://svnweb.freebsd.org/changeset/base/320627 Log: Hold the PCI device list lock when removing an element. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Jul 4 00:00:42 2017 (r320626) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Jul 4 00:02:06 2017 (r320627) @@ -254,7 +254,9 @@ pci_unregister_driver(struct pci_driver *pdrv) bus = devclass_find("pci"); + spin_lock(&pci_lock); list_del(&pdrv->links); + spin_unlock(&pci_lock); mtx_lock(&Giant); if (bus != NULL) devclass_delete_driver(bus, &pdrv->driver); From owner-svn-src-head@freebsd.org Tue Jul 4 00:02:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15B1F9F2399; Tue, 4 Jul 2017 00:02:30 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D972B1AF2; Tue, 4 Jul 2017 00:02:29 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6402TeJ082814; Tue, 4 Jul 2017 00:02:29 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6402T3T082813; Tue, 4 Jul 2017 00:02:29 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201707040002.v6402T3T082813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 4 Jul 2017 00:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320628 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: zbb X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 320628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 00:02:30 -0000 Author: zbb Date: Tue Jul 4 00:02:28 2017 New Revision: 320628 URL: https://svnweb.freebsd.org/changeset/base/320628 Log: Unmask all IO irqs after driver state is set as running If driver left MSI-x handlling routine because interface was put down, it is not unmasking IRQs, so any requesting interrupt will be awaiting for unmasking. On ena_up() routine all interrupts are being unmasked and any awaiting interrupt will be handled right away. If handler was executed before driver state was set as running, handling routine is being ended immediately, leaving IO irqs for given queue masked. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue Jul 4 00:02:06 2017 (r320627) +++ head/sys/dev/ena/ena.c Tue Jul 4 00:02:28 2017 (r320628) @@ -2097,7 +2097,6 @@ ena_up_complete(struct ena_adapter *adapter) ena_change_mtu(adapter->ifp, adapter->ifp->if_mtu); ena_refill_all_rx_bufs(adapter); - ena_unmask_all_io_irqs(adapter); return (0); } @@ -2170,6 +2169,8 @@ ena_up(struct ena_adapter *adapter) taskqueue_enqueue(adapter->stats_tq, &adapter->stats_task); adapter->up = true; + + ena_unmask_all_io_irqs(adapter); } return (0); From owner-svn-src-head@freebsd.org Tue Jul 4 00:04:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 256269F240C; Tue, 4 Jul 2017 00:04:33 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E896E1CA2; Tue, 4 Jul 2017 00:04:32 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6404Wio082925; Tue, 4 Jul 2017 00:04:32 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6404WDG082924; Tue, 4 Jul 2017 00:04:32 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201707040004.v6404WDG082924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 4 Jul 2017 00:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320629 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: zbb X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 320629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 00:04:33 -0000 Author: zbb Date: Tue Jul 4 00:04:31 2017 New Revision: 320629 URL: https://svnweb.freebsd.org/changeset/base/320629 Log: Call drbr_advance() before leaving TX routine If drbr_advance() is not called before doing cleanup and packet is already enqueued for sending (tx_info is holding pointer to mbuf), then mbuf is cleaned both in drbr_flush() and in cleanup routine, when all mbufs hold by tx_buffer_info are being released. This causes panic, because mbuf is released twice. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue Jul 4 00:02:28 2017 (r320628) +++ head/sys/dev/ena/ena.c Tue Jul 4 00:04:31 2017 (r320629) @@ -2805,10 +2805,11 @@ ena_start_xmit(struct ena_ring *tx_ring) break; } + drbr_advance(adapter->ifp, tx_ring->br); + if ((adapter->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - drbr_advance(adapter->ifp, tx_ring->br); acum_pkts++; BPF_MTAP(adapter->ifp, mbuf); From owner-svn-src-head@freebsd.org Tue Jul 4 00:06:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4475E9F2488; Tue, 4 Jul 2017 00:06:58 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 119061DFB; Tue, 4 Jul 2017 00:06:57 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6406vTx083049; Tue, 4 Jul 2017 00:06:57 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6406vqA083048; Tue, 4 Jul 2017 00:06:57 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201707040006.v6406vqA083048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 4 Jul 2017 00:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320630 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: zbb X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 320630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 00:06:58 -0000 Author: zbb Date: Tue Jul 4 00:06:56 2017 New Revision: 320630 URL: https://svnweb.freebsd.org/changeset/base/320630 Log: Remove RX mtx from ENA driver RX lock is no longer required. There can only be one RX cleanup task running at a time, RX cleanup cannot be executed if interface is not yet initialized and ena_down() will not free any RX resources if any io interrupt is being handled - RX cleanup task is only called from an interrupt handler. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue Jul 4 00:04:31 2017 (r320629) +++ head/sys/dev/ena/ena.c Tue Jul 4 00:06:56 2017 (r320630) @@ -476,7 +476,6 @@ ena_init_io_rings(struct ena_adapter *adapter) device_get_nameunit(adapter->pdev), i); mtx_init(&txr->ring_mtx, txr->mtx_name, NULL, MTX_DEF); - mtx_init(&rxr->ring_mtx, rxr->mtx_name, NULL, MTX_DEF); que = &adapter->que[i]; que->adapter = adapter; @@ -509,7 +508,6 @@ ena_free_io_ring_resources(struct ena_adapter *adapter sizeof(rxr->rx_stats)); mtx_destroy(&txr->ring_mtx); - mtx_destroy(&rxr->ring_mtx); drbr_free(txr->br, M_DEVBUF); @@ -947,10 +945,8 @@ ena_alloc_rx_mbuf(struct ena_adapter *adapter, if (rx_info->mbuf != NULL) return (0); - ENA_RING_MTX_LOCK(rx_ring); /* Get mbuf using UMA allocator */ rx_info->mbuf = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM16BYTES); - ENA_RING_MTX_UNLOCK(rx_ring); if (!rx_info->mbuf) { counter_u64_add(rx_ring->rx_stats.mbuf_alloc_fail, 1); From owner-svn-src-head@freebsd.org Tue Jul 4 00:08:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCE1B9F2501; Tue, 4 Jul 2017 00:08:48 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98B4F1F6F; Tue, 4 Jul 2017 00:08:48 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6408l9v083149; Tue, 4 Jul 2017 00:08:47 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6408lvq083147; Tue, 4 Jul 2017 00:08:47 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201707040008.v6408lvq083147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 4 Jul 2017 00:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320631 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: zbb X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 320631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 00:08:48 -0000 Author: zbb Date: Tue Jul 4 00:08:47 2017 New Revision: 320631 URL: https://svnweb.freebsd.org/changeset/base/320631 Log: Fix creation of dma tags and TSO settings TSO settings were not reflecting real HW capabilities. DMA tags were created with wrong window - high address was the same as low, so excluding window was not working. Capabilities of TX dma transaction were not set properly - TSO max size had been increased and size of one segment had been adjusted. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Modified: head/sys/dev/ena/ena.c head/sys/dev/ena/ena.h Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue Jul 4 00:06:56 2017 (r320630) +++ head/sys/dev/ena/ena.c Tue Jul 4 00:08:47 2017 (r320631) @@ -226,16 +226,16 @@ ena_dma_alloc(device_t dmadev, bus_size_t size, if (dma_space_addr == 0) dma_space_addr = BUS_SPACE_MAXADDR; error = bus_dma_tag_create(bus_get_dma_tag(dmadev), /* parent */ - 8, 0, /* alignment, bounds */ - dma_space_addr, /* lowaddr */ - dma_space_addr, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - maxsize, /* maxsize */ - 1, /* nsegments */ - maxsize, /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ - NULL, /* lockfunc */ - NULL, /* lockarg */ + 8, 0, /* alignment, bounds */ + dma_space_addr, /* lowaddr of exclusion window */ + BUS_SPACE_MAXADDR,/* highaddr of exclusion window */ + NULL, NULL, /* filter, filterarg */ + maxsize, /* maxsize */ + 1, /* nsegments */ + maxsize, /* maxsegsize */ + BUS_DMA_ALLOCNOW, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockarg */ &dma->tag); if (error) { device_printf(dmadev, @@ -530,16 +530,16 @@ ena_setup_tx_dma_tag(struct ena_adapter *adapter) /* Create DMA tag for Tx buffers */ ret = bus_dma_tag_create(bus_get_dma_tag(adapter->pdev), - 1, 0, /* alignment, bounds */ - ENA_DMA_BIT_MASK(adapter->dma_width), /* lowaddr */ - ENA_DMA_BIT_MASK(adapter->dma_width), /* highaddr */ - NULL, NULL, /* filter, filterarg */ - ENA_TSO_MAXSIZE, /* maxsize */ - adapter->max_tx_sgl_size, /* nsegments */ - ENA_TSO_MAXSIZE, /* maxsegsize */ - 0, /* flags */ - NULL, /* lockfunc */ - NULL, /* lockfuncarg */ + 1, 0, /* alignment, bounds */ + ENA_DMA_BIT_MASK(adapter->dma_width), /* lowaddr of excl window */ + BUS_SPACE_MAXADDR, /* highaddr of excl window */ + NULL, NULL, /* filter, filterarg */ + ENA_TSO_MAXSIZE, /* maxsize */ + adapter->max_tx_sgl_size - 1, /* nsegments */ + ENA_TSO_MAXSIZE, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockfuncarg */ &adapter->tx_buf_tag); if (ret != 0) @@ -567,17 +567,17 @@ ena_setup_rx_dma_tag(struct ena_adapter *adapter) int ret; /* Create DMA tag for Rx buffers*/ - ret = bus_dma_tag_create(bus_get_dma_tag(adapter->pdev), /* parent */ - 1, 0, /* alignment, bounds */ - ENA_DMA_BIT_MASK(adapter->dma_width), /* lowaddr */ - ENA_DMA_BIT_MASK(adapter->dma_width), /* highaddr */ - NULL, NULL, /* filter, filterarg */ - MJUM16BYTES, /* maxsize */ - 1, /* nsegments */ - MJUM16BYTES, /* maxsegsize */ - 0, /* flags */ - NULL, /* lockfunc */ - NULL, /* lockarg */ + ret = bus_dma_tag_create(bus_get_dma_tag(adapter->pdev), /* parent */ + 1, 0, /* alignment, bounds */ + ENA_DMA_BIT_MASK(adapter->dma_width), /* lowaddr of excl window */ + BUS_SPACE_MAXADDR, /* highaddr of excl window */ + NULL, NULL, /* filter, filterarg */ + MJUM16BYTES, /* maxsize */ + 1, /* nsegments */ + MJUM16BYTES, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockarg */ &adapter->rx_buf_tag); if (ret != 0) @@ -2479,9 +2479,10 @@ ena_setup_ifnet(device_t pdev, struct ena_adapter *ada if_setcapabilitiesbit(ifp, caps, 0); /* TSO parameters */ - ifp->if_hw_tsomax = ENA_TSO_MAXSIZE; - ifp->if_hw_tsomaxsegcount = ENA_TSO_NSEGS; - ifp->if_hw_tsomaxsegsize = MCLBYTES; + ifp->if_hw_tsomax = ENA_TSO_MAXSIZE - + (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); + ifp->if_hw_tsomaxsegcount = adapter->max_tx_sgl_size - 1; + ifp->if_hw_tsomaxsegsize = ENA_TSO_MAXSIZE; if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); if_setcapenable(ifp, if_getcapabilities(ifp)); Modified: head/sys/dev/ena/ena.h ============================================================================== --- head/sys/dev/ena/ena.h Tue Jul 4 00:06:56 2017 (r320630) +++ head/sys/dev/ena/ena.h Tue Jul 4 00:08:47 2017 (r320631) @@ -112,7 +112,7 @@ #define TX_IRQ_INTERVAL 50 #define ENA_MAX_MTU 9216 -#define ENA_TSO_MAXSIZE PAGE_SIZE +#define ENA_TSO_MAXSIZE 65536 #define ENA_TSO_NSEGS ENA_PKT_MAX_BUFS #define ENA_RX_OFFSET NET_SKB_PAD + NET_IP_ALIGN From owner-svn-src-head@freebsd.org Tue Jul 4 00:10:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 950889F2580; Tue, 4 Jul 2017 00:10:30 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7096220C2; Tue, 4 Jul 2017 00:10:30 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v640ATYv083273; Tue, 4 Jul 2017 00:10:29 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v640ATAO083270; Tue, 4 Jul 2017 00:10:29 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201707040010.v640ATAO083270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 4 Jul 2017 00:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320632 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: zbb X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 320632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 00:10:30 -0000 Author: zbb Date: Tue Jul 4 00:10:29 2017 New Revision: 320632 URL: https://svnweb.freebsd.org/changeset/base/320632 Log: Replace mbuf defragmentation with collapse Collapse should be more effective than defragmentation. Added missing declaration of ena_check_and_collapse_mbuf(). Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon.com Inc. Modified: head/sys/dev/ena/ena.c head/sys/dev/ena/ena.h head/sys/dev/ena/ena_sysctl.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue Jul 4 00:08:47 2017 (r320631) +++ head/sys/dev/ena/ena.c Tue Jul 4 00:10:29 2017 (r320632) @@ -156,6 +156,8 @@ static void ena_update_hwassist(struct ena_adapter *); static int ena_setup_ifnet(device_t, struct ena_adapter *, struct ena_com_dev_get_features_ctx *); static void ena_tx_csum(struct ena_com_tx_ctx *, struct mbuf *); +static int ena_check_and_collapse_mbuf(struct ena_ring *tx_ring, + struct mbuf **mbuf); static int ena_xmit_mbuf(struct ena_ring *, struct mbuf **); static void ena_start_xmit(struct ena_ring *); static int ena_mq_start(if_t, struct mbuf *); @@ -2623,10 +2625,10 @@ ena_tx_csum(struct ena_com_tx_ctx *ena_tx_ctx, struct } static int -ena_check_and_defragment_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) +ena_check_and_collapse_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) { struct ena_adapter *adapter; - struct mbuf *defrag_mbuf; + struct mbuf *collapsed_mbuf; int num_frags; adapter = tx_ring->adapter; @@ -2635,16 +2637,17 @@ ena_check_and_defragment_mbuf(struct ena_ring *tx_ring /* One segment must be reserved for configuration descriptor. */ if (num_frags < adapter->max_tx_sgl_size) return (0); - counter_u64_add(tx_ring->tx_stats.defragment, 1); + counter_u64_add(tx_ring->tx_stats.collapse, 1); - defrag_mbuf = m_defrag(*mbuf, M_NOWAIT); - if (defrag_mbuf == NULL) { - counter_u64_add(tx_ring->tx_stats.defragment_err, 1); + collapsed_mbuf = m_collapse(*mbuf, M_NOWAIT, + adapter->max_tx_sgl_size - 1); + if (collapsed_mbuf == NULL) { + counter_u64_add(tx_ring->tx_stats.collapse_err, 1); return (ENOMEM); } - /* If mbuf was defragmented succesfully, original mbuf is released. */ - *mbuf = defrag_mbuf; + /* If mbuf was collapsed succesfully, original mbuf is released. */ + *mbuf = collapsed_mbuf; return (0); } @@ -2675,10 +2678,10 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf ** ENA_ASSERT(*mbuf, "mbuf is NULL\n"); - rc = ena_check_and_defragment_mbuf(tx_ring, mbuf); + rc = ena_check_and_collapse_mbuf(tx_ring, mbuf); if (rc) { ena_trace(ENA_WARNING, - "Failed to defragment mbuf! err: %d", rc); + "Failed to collapse mbuf! err: %d", rc); return (rc); } Modified: head/sys/dev/ena/ena.h ============================================================================== --- head/sys/dev/ena/ena.h Tue Jul 4 00:08:47 2017 (r320631) +++ head/sys/dev/ena/ena.h Tue Jul 4 00:10:29 2017 (r320632) @@ -226,8 +226,8 @@ struct ena_stats_tx { counter_u64_t doorbells; counter_u64_t missing_tx_comp; counter_u64_t bad_req_id; - counter_u64_t defragment; - counter_u64_t defragment_err; + counter_u64_t collapse; + counter_u64_t collapse_err; }; struct ena_stats_rx { Modified: head/sys/dev/ena/ena_sysctl.c ============================================================================== --- head/sys/dev/ena/ena_sysctl.c Tue Jul 4 00:08:47 2017 (r320631) +++ head/sys/dev/ena/ena_sysctl.c Tue Jul 4 00:10:29 2017 (r320632) @@ -156,13 +156,13 @@ ena_sysctl_add_stats(struct ena_adapter *adapter) "stops", CTLFLAG_RD, &tx_stats->queue_stop, "Queue stops"); SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, - "defragmentations", CTLFLAG_RD, - &tx_stats->defragment, - "Mbuf defragmentations"); + "mbuf_collapses", CTLFLAG_RD, + &tx_stats->collapse, + "Mbuf collapse count"); SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, - "defragmentation_err", CTLFLAG_RD, - &tx_stats->defragment_err, - "Mbuf defragmentation failures"); + "mbuf_collapse_err", CTLFLAG_RD, + &tx_stats->collapse_err, + "Mbuf collapse failures"); /* RX specific stats */ rx_node = SYSCTL_ADD_NODE(ctx, queue_list, OID_AUTO, From owner-svn-src-head@freebsd.org Tue Jul 4 00:30:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EB389F2876; Tue, 4 Jul 2017 00:30:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1ED1028AD; Tue, 4 Jul 2017 00:30:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v640UmtB093584; Tue, 4 Jul 2017 00:30:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v640UmHO093582; Tue, 4 Jul 2017 00:30:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707040030.v640UmHO093582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 4 Jul 2017 00:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320633 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 320633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 00:30:49 -0000 Author: markj Date: Tue Jul 4 00:30:48 2017 New Revision: 320633 URL: https://svnweb.freebsd.org/changeset/base/320633 Log: Rename the "driver" field to "bsddriver" to avoid a name collision. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jul 4 00:10:29 2017 (r320632) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jul 4 00:30:48 2017 (r320633) @@ -175,7 +175,7 @@ struct pci_driver { int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ int (*resume) (struct pci_dev *dev); /* Device woken up */ void (*shutdown) (struct pci_dev *dev); /* Device shutdown */ - driver_t driver; + driver_t bsddriver; devclass_t bsdclass; const struct pci_error_handlers *err_handler; }; Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Jul 4 00:10:29 2017 (r320632) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Jul 4 00:30:48 2017 (r320633) @@ -108,7 +108,7 @@ linux_pci_probe(device_t dev) if ((pdrv = linux_pci_find(dev, &id)) == NULL) return (ENXIO); - if (device_get_driver(dev) != &pdrv->driver) + if (device_get_driver(dev) != &pdrv->bsddriver) return (ENXIO); device_set_desc(dev, pdrv->name); return (0); @@ -235,13 +235,14 @@ pci_register_driver(struct pci_driver *pdrv) spin_lock(&pci_lock); list_add(&pdrv->links, &pci_drivers); spin_unlock(&pci_lock); - pdrv->driver.name = pdrv->name; - pdrv->driver.methods = pci_methods; - pdrv->driver.size = sizeof(struct pci_dev); + pdrv->bsddriver.name = pdrv->name; + pdrv->bsddriver.methods = pci_methods; + pdrv->bsddriver.size = sizeof(struct pci_dev); + mtx_lock(&Giant); if (bus != NULL) { - error = devclass_add_driver(bus, &pdrv->driver, BUS_PASS_DEFAULT, - &pdrv->bsdclass); + error = devclass_add_driver(bus, &pdrv->bsddriver, + BUS_PASS_DEFAULT, &pdrv->bsdclass); } mtx_unlock(&Giant); return (-error); @@ -259,7 +260,7 @@ pci_unregister_driver(struct pci_driver *pdrv) spin_unlock(&pci_lock); mtx_lock(&Giant); if (bus != NULL) - devclass_delete_driver(bus, &pdrv->driver); + devclass_delete_driver(bus, &pdrv->bsddriver); mtx_unlock(&Giant); } From owner-svn-src-head@freebsd.org Tue Jul 4 00:48:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6072F9F31A3; Tue, 4 Jul 2017 00:48:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D2DF336F; Tue, 4 Jul 2017 00:48:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v640moYV099763; Tue, 4 Jul 2017 00:48:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v640moPq099762; Tue, 4 Jul 2017 00:48:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707040048.v640moPq099762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 4 Jul 2017 00:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320634 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 320634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 00:48:51 -0000 Author: markj Date: Tue Jul 4 00:48:50 2017 New Revision: 320634 URL: https://svnweb.freebsd.org/changeset/base/320634 Log: Add some PCI class definitions. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jul 4 00:30:48 2017 (r320633) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jul 4 00:48:50 2017 (r320634) @@ -63,6 +63,13 @@ struct pci_device_id { }; #define MODULE_DEVICE_TABLE(bus, table) + +#define PCI_BASE_CLASS_DISPLAY 0x03 +#define PCI_CLASS_DISPLAY_VGA 0x0300 +#define PCI_CLASS_DISPLAY_OTHER 0x0380 +#define PCI_BASE_CLASS_BRIDGE 0x06 +#define PCI_CLASS_BRIDGE_ISA 0x0601 + #define PCI_ANY_ID (-1) #define PCI_VENDOR_ID_APPLE 0x106b #define PCI_VENDOR_ID_ASUSTEK 0x1043 From owner-svn-src-head@freebsd.org Tue Jul 4 01:05:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1E9F9F35A7; Tue, 4 Jul 2017 01:05:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0E003AFC; Tue, 4 Jul 2017 01:05:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6415Kpl008105; Tue, 4 Jul 2017 01:05:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6415KWo008103; Tue, 4 Jul 2017 01:05:20 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707040105.v6415KWo008103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 4 Jul 2017 01:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320635 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 320635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 01:05:22 -0000 Author: markj Date: Tue Jul 4 01:05:20 2017 New Revision: 320635 URL: https://svnweb.freebsd.org/changeset/base/320635 Log: Add a field for the class code to struct pci_driver. Fill out some previously uninitialized fields as well. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jul 4 00:48:50 2017 (r320634) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jul 4 01:05:20 2017 (r320635) @@ -56,8 +56,9 @@ struct pci_device_id { uint32_t vendor; uint32_t device; - uint32_t subvendor; + uint32_t subvendor; uint32_t subdevice; + uint32_t class; uint32_t class_mask; uintptr_t driver_data; }; @@ -202,7 +203,8 @@ struct pci_dev { uint16_t vendor; unsigned int irq; unsigned int devfn; - u8 revision; + uint32_t class; + uint8_t revision; }; static inline struct resource_list_entry * Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Jul 4 00:48:50 2017 (r320634) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Jul 4 01:05:20 2017 (r320635) @@ -129,8 +129,11 @@ linux_pci_attach(device_t dev) pdev->dev.parent = &linux_root_device; pdev->dev.bsddev = dev; INIT_LIST_HEAD(&pdev->dev.irqents); + pdev->devfn = PCI_DEVFN(pci_get_slot(dev), pci_get_function(dev)); pdev->device = id->device; pdev->vendor = id->vendor; + pdev->class = pci_get_class(dev); + pdev->revision = pci_get_revid(dev); pdev->dev.dma_mask = &pdev->dma_mask; pdev->pdrv = pdrv; kobject_init(&pdev->dev.kobj, &linux_dev_ktype); From owner-svn-src-head@freebsd.org Tue Jul 4 01:23:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 098719F3A6A; Tue, 4 Jul 2017 01:23:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C9B464446; Tue, 4 Jul 2017 01:23:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v641Nahh016335; Tue, 4 Jul 2017 01:23:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v641NaVE016333; Tue, 4 Jul 2017 01:23:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707040123.v641NaVE016333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 4 Jul 2017 01:23:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320636 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 320636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 01:23:38 -0000 Author: markj Date: Tue Jul 4 01:23:36 2017 New Revision: 320636 URL: https://svnweb.freebsd.org/changeset/base/320636 Log: Add some auxiliary types for device driver support. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/device.h head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/device.h Tue Jul 4 01:05:20 2017 (r320635) +++ head/sys/compat/linuxkpi/common/include/linux/device.h Tue Jul 4 01:23:36 2017 (r320636) @@ -79,6 +79,15 @@ struct dev_pm_ops { int (*runtime_idle)(struct device *dev); }; +struct device_driver { + const char *name; + const struct dev_pm_ops *pm; +}; + +struct device_type { + const char *name; +}; + struct device { struct device *parent; struct list_head irqents; @@ -91,6 +100,8 @@ struct device { * done somewhere else. */ bool bsddev_attached_here; + struct device_driver *driver; + struct device_type *type; dev_t devt; struct class *class; void (*release)(struct device *dev); Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jul 4 01:05:20 2017 (r320635) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Tue Jul 4 01:23:36 2017 (r320636) @@ -185,7 +185,8 @@ struct pci_driver { void (*shutdown) (struct pci_dev *dev); /* Device shutdown */ driver_t bsddriver; devclass_t bsdclass; - const struct pci_error_handlers *err_handler; + struct device_driver driver; + const struct pci_error_handlers *err_handler; }; extern struct list_head pci_drivers; From owner-svn-src-head@freebsd.org Tue Jul 4 07:07:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9042D87151; Tue, 4 Jul 2017 07:07:09 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FD59700E7; Tue, 4 Jul 2017 07:07:09 +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 v64778oj058246; Tue, 4 Jul 2017 07:07:08 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64778xj058240; Tue, 4 Jul 2017 07:07:08 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201707040707.v64778xj058240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 4 Jul 2017 07:07:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320640 - in head/sys/dev/rtwn: . usb X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev/rtwn: . usb X-SVN-Commit-Revision: 320640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 07:07:09 -0000 Author: avos Date: Tue Jul 4 07:07:08 2017 New Revision: 320640 URL: https://svnweb.freebsd.org/changeset/base/320640 Log: rtwn_usb: reject too long (>16K) mbufs. While here move RTWN_TXBUFSZ constant from common to USB specific code (it's not used anywhere else). Modified: head/sys/dev/rtwn/if_rtwnvar.h head/sys/dev/rtwn/usb/rtwn_usb_attach.c head/sys/dev/rtwn/usb/rtwn_usb_ep.c head/sys/dev/rtwn/usb/rtwn_usb_tx.c head/sys/dev/rtwn/usb/rtwn_usb_var.h Modified: head/sys/dev/rtwn/if_rtwnvar.h ============================================================================== --- head/sys/dev/rtwn/if_rtwnvar.h Tue Jul 4 05:37:58 2017 (r320639) +++ head/sys/dev/rtwn/if_rtwnvar.h Tue Jul 4 07:07:08 2017 (r320640) @@ -25,8 +25,6 @@ #define RTWN_TX_DESC_SIZE 64 -#define RTWN_TXBUFSZ (16 * 1024) - #define RTWN_BCN_MAX_SIZE 512 #define RTWN_CAM_ENTRY_LIMIT 64 Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.c Tue Jul 4 05:37:58 2017 (r320639) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.c Tue Jul 4 07:07:08 2017 (r320640) @@ -155,7 +155,7 @@ rtwn_usb_alloc_tx_list(struct rtwn_softc *sc) int error, i; error = rtwn_usb_alloc_list(sc, uc->uc_tx, RTWN_USB_TX_LIST_COUNT, - RTWN_TXBUFSZ); + RTWN_USB_TXBUFSZ); if (error != 0) return (error); Modified: head/sys/dev/rtwn/usb/rtwn_usb_ep.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_ep.c Tue Jul 4 05:37:58 2017 (r320639) +++ head/sys/dev/rtwn/usb/rtwn_usb_ep.c Tue Jul 4 07:07:08 2017 (r320640) @@ -73,7 +73,7 @@ static const struct usb_config rtwn_config_common[RTWN .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .bufsize = RTWN_TXBUFSZ, + .bufsize = RTWN_USB_TXBUFSZ, .flags = { .ext_buffer = 1, .pipe_bof = 1, @@ -86,7 +86,7 @@ static const struct usb_config rtwn_config_common[RTWN .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .bufsize = RTWN_TXBUFSZ, + .bufsize = RTWN_USB_TXBUFSZ, .flags = { .ext_buffer = 1, .pipe_bof = 1, @@ -99,7 +99,7 @@ static const struct usb_config rtwn_config_common[RTWN .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .bufsize = RTWN_TXBUFSZ, + .bufsize = RTWN_USB_TXBUFSZ, .flags = { .ext_buffer = 1, .pipe_bof = 1, @@ -112,7 +112,7 @@ static const struct usb_config rtwn_config_common[RTWN .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .bufsize = RTWN_TXBUFSZ, + .bufsize = RTWN_USB_TXBUFSZ, .flags = { .ext_buffer = 1, .pipe_bof = 1, Modified: head/sys/dev/rtwn/usb/rtwn_usb_tx.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_tx.c Tue Jul 4 05:37:58 2017 (r320639) +++ head/sys/dev/rtwn/usb/rtwn_usb_tx.c Tue Jul 4 07:07:08 2017 (r320640) @@ -233,6 +233,9 @@ rtwn_usb_tx_start(struct rtwn_softc *sc, struct ieee80 RTWN_ASSERT_LOCKED(sc); + if (m->m_pkthdr.len + sc->txdesc_len > RTWN_USB_TXBUFSZ) + return (EINVAL); + data = rtwn_usb_getbuf(uc); if (data == NULL) return (ENOBUFS); Modified: head/sys/dev/rtwn/usb/rtwn_usb_var.h ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_var.h Tue Jul 4 05:37:58 2017 (r320639) +++ head/sys/dev/rtwn/usb/rtwn_usb_var.h Tue Jul 4 07:07:08 2017 (r320640) @@ -21,6 +21,8 @@ #ifndef RTWN_USBVAR_H #define RTWN_USBVAR_H +#define RTWN_USB_TXBUFSZ (16 * 1024) + #define RTWN_IFACE_INDEX 0 #define RTWN_USB_RX_LIST_COUNT 1 From owner-svn-src-head@freebsd.org Tue Jul 4 07:53:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFF33D87EE4; Tue, 4 Jul 2017 07:53:22 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B437F7150D; Tue, 4 Jul 2017 07:53:22 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6C60E26081F; Tue, 4 Jul 2017 09:53:19 +0200 (CEST) Subject: Re: svn commit: r319722 - in head: sys/cam/ctl sys/dev/iscsi sys/kern sys/netgraph sys/netgraph/bluetooth/socket sys/netinet sys/ofed/drivers/infiniband/core sys/ofed/drivers/infiniband/ulp/sdp sys/rpc... To: Gleb Smirnoff , Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude References: <201706082130.v58LUY0j095589@repo.freebsd.org> <20170625074914.GU50023@FreeBSD.org> From: Hans Petter Selasky Message-ID: Date: Tue, 4 Jul 2017 09:51:11 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170625074914.GU50023@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 07:53:23 -0000 On 06/25/17 09:49, Gleb Smirnoff wrote: > Conrad, > > this should be fixed by r320324. Sorry for inconvenience. > Hi Gleb, There is a long thread here about panics on 32-bit platforms when INVARIANTS is enabled: Can you have a look? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220358 --HPS From owner-svn-src-head@freebsd.org Tue Jul 4 09:42:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DCCFD8C21B; Tue, 4 Jul 2017 09:42:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 446EE75031; Tue, 4 Jul 2017 09:42:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6ECD826081F; Tue, 4 Jul 2017 11:42:56 +0200 (CEST) Subject: Re: svn commit: r319722 - in head: sys/cam/ctl sys/dev/iscsi sys/kern sys/netgraph sys/netgraph/bluetooth/socket sys/netinet sys/ofed/drivers/infiniband/core sys/ofed/drivers/infiniband/ulp/sdp sys/rpc... From: Hans Petter Selasky To: Gleb Smirnoff , Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Allan Jude References: <201706082130.v58LUY0j095589@repo.freebsd.org> <20170625074914.GU50023@FreeBSD.org> Message-ID: <50cf6c83-13e5-68d8-301e-fa0cfbef15fb@selasky.org> Date: Tue, 4 Jul 2017 11:40:48 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 09:42:58 -0000 On 07/04/17 09:51, Hans Petter Selasky wrote: > On 06/25/17 09:49, Gleb Smirnoff wrote: >> Conrad, >> >> this should be fixed by r320324. Sorry for inconvenience. >> > > Hi Gleb, > > There is a long thread here about panics on 32-bit platforms when > INVARIANTS is enabled: > > Can you have a look? > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220358 > Issue solved: https://reviews.freebsd.org/D11475 --HPS From owner-svn-src-head@freebsd.org Tue Jul 4 10:32:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB5BFD8D540; Tue, 4 Jul 2017 10:32:06 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from heemeyer.club (heemeyer.club [108.61.204.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C5CE765B2; Tue, 4 Jul 2017 10:32:05 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from mordor.heemeyer.club (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.2/8.15.1) with ESMTPS id v64AECIl023267 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Jul 2017 10:14:15 GMT (envelope-from dchagin@mordor.heemeyer.club) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be mordor.heemeyer.club Received: from mordor.heemeyer.club (localhost [127.0.0.1]) by mordor.heemeyer.club (8.15.2/8.15.1) with ESMTPS id v64AE8MM039672 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Jul 2017 13:14:08 +0300 (MSK) (envelope-from dchagin@mordor.heemeyer.club) Received: (from dchagin@localhost) by mordor.heemeyer.club (8.15.2/8.15.2/Submit) id v64AE5Mn039670; Tue, 4 Jul 2017 13:14:05 +0300 (MSK) (envelope-from dchagin) Date: Tue, 4 Jul 2017 13:14:04 +0300 From: Chagin Dmitry To: Ed Schouten Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320595 - in head/sys: amd64/linux amd64/linux32 i386/linux Message-ID: <20170704101404.GA39629@mordor.heemeyer.club> References: <201707031024.v63AOnkp036085@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 10:32:06 -0000 On Mon, Jul 03, 2017 at 03:52:54PM +0200, Ed Schouten wrote: > Hi there, > > 2017-07-03 12:24 GMT+02:00 Dmitry Chagin : > > + .compat_3_brand = "Linux", > > I suspect that you can safely remove this line. It's only intended to > match a field in ELF headers that is/was BSD specific. > hi, as far as i understand, this is an old style branding aka brandelf -t Linux xxx which is used if executable does not contain .note section. From owner-svn-src-head@freebsd.org Tue Jul 4 12:17:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA16DD9036E; Tue, 4 Jul 2017 12:17:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9837A79430; Tue, 4 Jul 2017 12:17:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64CHnCh092180; Tue, 4 Jul 2017 12:17:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64CHnA2092178; Tue, 4 Jul 2017 12:17:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707041217.v64CHnA2092178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 4 Jul 2017 12:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320642 - in head/sys/arm: conf versatile X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: conf versatile X-SVN-Commit-Revision: 320642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 12:17:50 -0000 Author: andrew Date: Tue Jul 4 12:17:49 2017 New Revision: 320642 URL: https://svnweb.freebsd.org/changeset/base/320642 Log: Teach VERSATILEPB about PLATFORM. This will help move it into the GENERIC kernel configuration. Modified: head/sys/arm/conf/VERSATILEPB head/sys/arm/versatile/versatile_machdep.c Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Tue Jul 4 10:54:08 2017 (r320641) +++ head/sys/arm/conf/VERSATILEPB Tue Jul 4 12:17:49 2017 (r320642) @@ -69,6 +69,7 @@ device md device random # Entropy device options INTRNG +options PLATFORM # Flattened Device Tree options FDT # Configure using FDT/DTB data Modified: head/sys/arm/versatile/versatile_machdep.c ============================================================================== --- head/sys/arm/versatile/versatile_machdep.c Tue Jul 4 10:54:08 2017 (r320641) +++ head/sys/arm/versatile/versatile_machdep.c Tue Jul 4 12:17:49 2017 (r320642) @@ -49,34 +49,21 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include +#include "platform_if.h" + /* Start of address space used for bootstrap map */ #define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000 -vm_offset_t -platform_lastaddr(void) +static vm_offset_t +versatile_lastaddr(platform_t plat) { return (DEVMAP_BOOTSTRAP_MAP_START); } -void -platform_probe_and_attach(void) -{ - -} - -void -platform_gpio_init(void) -{ -} - -void -platform_late_init(void) -{ -} - #define FDT_DEVMAP_MAX (2) /* FIXME */ static struct devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, }, @@ -87,8 +74,8 @@ static struct devmap_entry fdt_devmap[FDT_DEVMAP_MAX] /* * Construct devmap table with DT-derived config data. */ -int -platform_devmap_init(void) +static int +versatile_devmap_init(platform_t plat) { int i = 0; fdt_devmap[i].pd_va = 0xf0100000; @@ -99,10 +86,18 @@ platform_devmap_init(void) return (0); } -void -cpu_reset(void) +static void +versatile_cpu_reset(platform_t plat) { printf("cpu_reset\n"); while (1); } +static platform_method_t versatile_methods[] = { + PLATFORMMETHOD(platform_lastaddr, versatile_lastaddr), + PLATFORMMETHOD(platform_devmap_init, versatile_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, versatile_cpu_reset), + + PLATFORMMETHOD_END, +}; +FDT_PLATFORM_DEF(versatile, "versatile", 0, "arm,versatile-pb", 1); From owner-svn-src-head@freebsd.org Tue Jul 4 12:26:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A1DCD9079A; Tue, 4 Jul 2017 12:26:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35DC9799BB; Tue, 4 Jul 2017 12:26:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64CQmBs096062; Tue, 4 Jul 2017 12:26:48 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64CQmT9096057; Tue, 4 Jul 2017 12:26:48 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707041226.v64CQmT9096057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 4 Jul 2017 12:26:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320643 - in head/sys/arm: annapurna/alpine conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: annapurna/alpine conf X-SVN-Commit-Revision: 320643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 12:26:49 -0000 Author: andrew Date: Tue Jul 4 12:26:47 2017 New Revision: 320643 URL: https://svnweb.freebsd.org/changeset/base/320643 Log: Add PLATFORM and PLATFORM_SMP support to the ALPINE kernel configuration. This will help move it to be part of GENERIC. Added: head/sys/arm/annapurna/alpine/alpine_mp.h (contents, props changed) Modified: head/sys/arm/annapurna/alpine/alpine_common.c head/sys/arm/annapurna/alpine/alpine_machdep.c head/sys/arm/annapurna/alpine/alpine_machdep_mp.c head/sys/arm/conf/ALPINE Modified: head/sys/arm/annapurna/alpine/alpine_common.c ============================================================================== --- head/sys/arm/annapurna/alpine/alpine_common.c Tue Jul 4 12:17:49 2017 (r320642) +++ head/sys/arm/annapurna/alpine/alpine_common.c Tue Jul 4 12:26:47 2017 (r320643) @@ -43,97 +43,10 @@ __FBSDID("$FreeBSD$"); #include #include -#define WDTLOAD 0x000 -#define LOAD_MIN 0x00000001 -#define LOAD_MAX 0xFFFFFFFF -#define WDTVALUE 0x004 -#define WDTCONTROL 0x008 -/* control register masks */ -#define INT_ENABLE (1 << 0) -#define RESET_ENABLE (1 << 1) -#define WDTLOCK 0xC00 -#define UNLOCK 0x1ACCE551 -#define LOCK 0x00000001 - -extern bus_addr_t al_devmap_pa; - -static int alpine_get_wdt_base(uint32_t *pbase, uint32_t *psize); +#ifndef INTRNG static int alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt, int *trig, int *pol); -int alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size); - -int alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size) -{ - phandle_t node; - - if ((node = OF_finddevice("/")) == 0) - return (ENXIO); - - if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0) - return (ENXIO); - - return fdt_get_range(node, 0, pa, size); -} - -static int -alpine_get_wdt_base(uint32_t *pbase, uint32_t *psize) -{ - phandle_t node; - u_long base = 0; - u_long size = 0; - - if (pbase == NULL || psize == NULL) - return (EINVAL); - - if ((node = OF_finddevice("/")) == -1) - return (EFAULT); - - if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0) - return (EFAULT); - - if ((node = - fdt_find_compatible(node, "arm,sp805", 1)) == 0) - return (EFAULT); - - if (fdt_regsize(node, &base, &size)) - return (EFAULT); - - *pbase = base; - *psize = size; - - return (0); -} - -void -cpu_reset(void) -{ - uint32_t wdbase, wdsize; - bus_addr_t wdbaddr; - int ret; - - ret = alpine_get_wdt_base(&wdbase, &wdsize); - if (ret) { - printf("Unable to get WDT base, do power down manually..."); - goto infinite; - } - - ret = bus_space_map(fdtbus_bs_tag, al_devmap_pa + wdbase, - wdsize, 0, &wdbaddr); - if (ret) { - printf("Unable to map WDT base, do power down manually..."); - goto infinite; - } - - bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOCK, UNLOCK); - bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOAD, LOAD_MIN); - bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTCONTROL, INT_ENABLE | RESET_ENABLE); - -infinite: - while (1) {} -} - -#ifndef INTRNG static int alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt, int *trig, int *pol) Modified: head/sys/arm/annapurna/alpine/alpine_machdep.c ============================================================================== --- head/sys/arm/annapurna/alpine/alpine_machdep.c Tue Jul 4 12:17:49 2017 (r320642) +++ head/sys/arm/annapurna/alpine/alpine_machdep.c Tue Jul 4 12:26:47 2017 (r320643) @@ -26,66 +26,137 @@ * */ +#include "opt_ddb.h" +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include #include #include -#include /* For trapframe_t, used in */ -#include -#include #include +#include -#include "opt_ddb.h" -#include "opt_platform.h" +#include +#include -#define DEVMAP_MAX_VA_ADDRESS 0xF0000000 +#include + +#include "platform_if.h" + +#define WDTLOAD 0x000 +#define LOAD_MIN 0x00000001 +#define LOAD_MAX 0xFFFFFFFF +#define WDTVALUE 0x004 +#define WDTCONTROL 0x008 +/* control register masks */ +#define INT_ENABLE (1 << 0) +#define RESET_ENABLE (1 << 1) +#define WDTLOCK 0xC00 +#define UNLOCK 0x1ACCE551 +#define LOCK 0x00000001 + bus_addr_t al_devmap_pa; bus_addr_t al_devmap_size; -int alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size); - -vm_offset_t -platform_lastaddr(void) +static int +alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size) { + phandle_t node; - return (DEVMAP_MAX_VA_ADDRESS); -} + if ((node = OF_finddevice("/")) == 0) + return (ENXIO); -void -platform_probe_and_attach(void) -{ + if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0) + return (ENXIO); + return fdt_get_range(node, 0, pa, size); } -void -platform_gpio_init(void) +static int +alpine_get_wdt_base(uint32_t *pbase, uint32_t *psize) { + phandle_t node; + u_long base = 0; + u_long size = 0; -} + if (pbase == NULL || psize == NULL) + return (EINVAL); -void -platform_late_init(void) -{ + if ((node = OF_finddevice("/")) == -1) + return (EFAULT); + if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0) + return (EFAULT); + + if ((node = + fdt_find_compatible(node, "arm,sp805", 1)) == 0) + return (EFAULT); + + if (fdt_regsize(node, &base, &size)) + return (EFAULT); + + *pbase = base; + *psize = size; + + return (0); } /* * Construct devmap table with DT-derived config data. */ -int -platform_devmap_init(void) +static int +alpine_devmap_init(platform_t plat) { alpine_get_devmap_base(&al_devmap_pa, &al_devmap_size); devmap_add_entry(al_devmap_pa, al_devmap_size); return (0); } + +static void +alpine_cpu_reset(platform_t plat) +{ + uint32_t wdbase, wdsize; + bus_addr_t wdbaddr; + int ret; + + ret = alpine_get_wdt_base(&wdbase, &wdsize); + if (ret) { + printf("Unable to get WDT base, do power down manually..."); + goto infinite; + } + + ret = bus_space_map(fdtbus_bs_tag, al_devmap_pa + wdbase, + wdsize, 0, &wdbaddr); + if (ret) { + printf("Unable to map WDT base, do power down manually..."); + goto infinite; + } + + bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOCK, UNLOCK); + bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOAD, LOAD_MIN); + bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTCONTROL, + INT_ENABLE | RESET_ENABLE); + +infinite: + while (1) {} +} + +static platform_method_t alpine_methods[] = { + PLATFORMMETHOD(platform_devmap_init, alpine_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, alpine_cpu_reset), + +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, alpine_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, alpine_mp_setmaxid), +#endif + PLATFORMMETHOD_END, +}; +FDT_PLATFORM_DEF(alpine, "alpine", 0, "annapurna,alpine", 200); Modified: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c ============================================================================== --- head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Tue Jul 4 12:17:49 2017 (r320642) +++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Tue Jul 4 12:26:47 2017 (r320643) @@ -43,12 +43,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include + #define AL_CPU_RESUME_WATERMARK_REG 0x00 #define AL_CPU_RESUME_FLAGS_REG 0x04 #define AL_CPU_RESUME_PCPU_RADDR_REG(cpu) (0x08 + 0x04 + 8*(cpu)) @@ -112,7 +115,7 @@ platform_mp_get_core_cnt(void) } void -platform_mp_setmaxid(void) +alpine_mp_setmaxid(platform_t plat) { mp_ncpus = platform_mp_get_core_cnt(); @@ -172,7 +175,7 @@ alpine_get_nb_base(u_long *pbase, u_long *psize) } void -platform_mp_start_ap(void) +alpine_mp_start_ap(platform_t plat) { uint32_t physaddr; vm_offset_t vaddr; Added: head/sys/arm/annapurna/alpine/alpine_mp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/annapurna/alpine/alpine_mp.h Tue Jul 4 12:26:47 2017 (r320643) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2017 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _ANNAPURNA_ALPINE_MP_H_ +#define _ANNAPURNA_ALPINE_MP_H_ + +void alpine_mp_start_ap(platform_t plat); +void alpine_mp_setmaxid(platform_t plat); + +#endif /* _ANNAPURNA_ALPINE_MP_H_ */ Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Tue Jul 4 12:17:49 2017 (r320642) +++ head/sys/arm/conf/ALPINE Tue Jul 4 12:26:47 2017 (r320643) @@ -27,6 +27,8 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options SMP # Enable multiple cores +options PLATFORM +options PLATFORM_SMP # Interrupt controller device gic From owner-svn-src-head@freebsd.org Tue Jul 4 15:44:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F8E2D946B8; Tue, 4 Jul 2017 15:44:32 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BE4E7EECB; Tue, 4 Jul 2017 15:44:31 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64FiVUU078762; Tue, 4 Jul 2017 15:44:31 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64FiU3k078754; Tue, 4 Jul 2017 15:44:30 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201707041544.v64FiU3k078754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 4 Jul 2017 15:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320644 - in head: bin/rcp libexec/rlogind libexec/rshd usr.bin/rlogin usr.bin/rsh usr.bin/ruptime usr.bin/rwho usr.sbin/rwhod X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: in head: bin/rcp libexec/rlogind libexec/rshd usr.bin/rlogin usr.bin/rsh usr.bin/ruptime usr.bin/rwho usr.sbin/rwhod X-SVN-Commit-Revision: 320644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 15:44:32 -0000 Author: allanjude Date: Tue Jul 4 15:44:30 2017 New Revision: 320644 URL: https://svnweb.freebsd.org/changeset/base/320644 Log: Add deprecation notices for all rcmd tools Submitted by: bcr Reviewed by: emaste, bapt, jhl MFC after: immediate Relnotes: yes Differential Revision: https://reviews.freebsd.org/D11471 Modified: head/bin/rcp/rcp.1 head/libexec/rlogind/rlogind.8 head/libexec/rshd/rshd.8 head/usr.bin/rlogin/rlogin.1 head/usr.bin/rsh/rsh.1 head/usr.bin/ruptime/ruptime.1 head/usr.bin/rwho/rwho.1 head/usr.sbin/rwhod/rwhod.8 Modified: head/bin/rcp/rcp.1 ============================================================================== --- head/bin/rcp/rcp.1 Tue Jul 4 12:26:47 2017 (r320643) +++ head/bin/rcp/rcp.1 Tue Jul 4 15:44:30 2017 (r320644) @@ -29,7 +29,7 @@ .\" @(#)rcp.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd October 16, 2002 +.Dd July 3, 2017 .Dt RCP 1 .Os .Sh NAME @@ -43,6 +43,15 @@ .Op Fl 46pr .Ar .Ar directory +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: head/libexec/rlogind/rlogind.8 ============================================================================== --- head/libexec/rlogind/rlogind.8 Tue Jul 4 12:26:47 2017 (r320643) +++ head/libexec/rlogind/rlogind.8 Tue Jul 4 15:44:30 2017 (r320644) @@ -28,7 +28,7 @@ .\" @(#)rlogind.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 9, 2005 +.Dd July 3, 2017 .Dt RLOGIND 8 .Os .Sh NAME @@ -37,6 +37,15 @@ .Sh SYNOPSIS .Nm .Op Fl Daln +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: head/libexec/rshd/rshd.8 ============================================================================== --- head/libexec/rshd/rshd.8 Tue Jul 4 12:26:47 2017 (r320643) +++ head/libexec/rshd/rshd.8 Tue Jul 4 15:44:30 2017 (r320644) @@ -28,7 +28,7 @@ .\" @(#)rshd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd July 3, 2017 .Dt RSHD 8 .Os .Sh NAME @@ -37,6 +37,15 @@ .Sh SYNOPSIS .Nm .Op Fl aDLln +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: head/usr.bin/rlogin/rlogin.1 ============================================================================== --- head/usr.bin/rlogin/rlogin.1 Tue Jul 4 12:26:47 2017 (r320643) +++ head/usr.bin/rlogin/rlogin.1 Tue Jul 4 15:44:30 2017 (r320644) @@ -28,7 +28,7 @@ .\" @(#)rlogin.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd September 26, 2003 +.Dd July 3, 2017 .Dt RLOGIN 1 .Os .Sh NAME @@ -41,6 +41,15 @@ .Op Fl i Ar localname .Op Fl l Ar username .Ar host +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: head/usr.bin/rsh/rsh.1 ============================================================================== --- head/usr.bin/rsh/rsh.1 Tue Jul 4 12:26:47 2017 (r320643) +++ head/usr.bin/rsh/rsh.1 Tue Jul 4 15:44:30 2017 (r320644) @@ -28,7 +28,7 @@ .\" @(#)rsh.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd October 16, 2002 +.Dd July 3, 2017 .Dt RSH 1 .Os .Sh NAME @@ -41,6 +41,15 @@ .Op Fl t Ar timeout .Ar host .Op command +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: head/usr.bin/ruptime/ruptime.1 ============================================================================== --- head/usr.bin/ruptime/ruptime.1 Tue Jul 4 12:26:47 2017 (r320643) +++ head/usr.bin/ruptime/ruptime.1 Tue Jul 4 15:44:30 2017 (r320644) @@ -28,7 +28,7 @@ .\" @(#)ruptime.1 8.2 (Berkeley) 4/5/94 .\" $FreeBSD$ .\" -.Dd March 1, 2003 +.Dd July 3, 2017 .Dt RUPTIME 1 .Os .Sh NAME @@ -38,6 +38,15 @@ .Nm .Op Fl alrtu .Op Ar host ... +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: head/usr.bin/rwho/rwho.1 ============================================================================== --- head/usr.bin/rwho/rwho.1 Tue Jul 4 12:26:47 2017 (r320643) +++ head/usr.bin/rwho/rwho.1 Tue Jul 4 15:44:30 2017 (r320644) @@ -28,7 +28,7 @@ .\" @(#)rwho.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd July 3, 2017 .Dt RWHO 1 .Os .Sh NAME @@ -37,6 +37,15 @@ .Sh SYNOPSIS .Nm .Op Fl a +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: head/usr.sbin/rwhod/rwhod.8 ============================================================================== --- head/usr.sbin/rwhod/rwhod.8 Tue Jul 4 12:26:47 2017 (r320643) +++ head/usr.sbin/rwhod/rwhod.8 Tue Jul 4 15:44:30 2017 (r320644) @@ -28,7 +28,7 @@ .\" @(#)rwhod.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd January 21, 2010 +.Dd July 3, 2017 .Dt RWHOD 8 .Os .Sh NAME @@ -40,6 +40,15 @@ .Op Fl p .Op Fl l .Op Fl m Op Ar ttl +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm From owner-svn-src-head@freebsd.org Tue Jul 4 16:52:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA34ED95C79; Tue, 4 Jul 2017 16:52:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96FEF80AE2; Tue, 4 Jul 2017 16:52:57 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64GquGl007316; Tue, 4 Jul 2017 16:52:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64Gqtfg007302; Tue, 4 Jul 2017 16:52:55 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707041652.v64Gqtfg007302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 4 Jul 2017 16:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320647 - in head/sys: arm/arm arm/conf conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm/arm arm/conf conf X-SVN-Commit-Revision: 320647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 16:52:57 -0000 Author: andrew Date: Tue Jul 4 16:52:55 2017 New Revision: 320647 URL: https://svnweb.freebsd.org/changeset/base/320647 Log: Remove PLATFORM_SMP. It's unneeded as all configs with both PLATFORM and SMP use it so we can switch to the combination of these as the check. Modified: head/sys/arm/arm/platform.c head/sys/arm/conf/ALPINE head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/GENERIC head/sys/arm/conf/IMX6 head/sys/arm/conf/PANDABOARD head/sys/arm/conf/RK3188 head/sys/arm/conf/RPI2 head/sys/arm/conf/SOCFPGA head/sys/arm/conf/TEGRA124 head/sys/arm/conf/VIRT head/sys/arm/conf/ZEDBOARD head/sys/conf/options.arm Modified: head/sys/arm/arm/platform.c ============================================================================== --- head/sys/arm/arm/platform.c Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/arm/platform.c Tue Jul 4 16:52:55 2017 (r320647) @@ -218,7 +218,7 @@ platform_delay(int usec, void *arg __unused) } #endif -#if defined(SMP) && defined(PLATFORM_SMP) +#if defined(SMP) void platform_mp_setmaxid(void) { Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/ALPINE Tue Jul 4 16:52:55 2017 (r320647) @@ -28,7 +28,6 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options SMP # Enable multiple cores options PLATFORM -options PLATFORM_SMP # Interrupt controller device gic Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/EXYNOS5.common Tue Jul 4 16:52:55 2017 (r320647) @@ -23,7 +23,6 @@ makeoptions WERROR="-Werror" include "std.armv6" options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC -options PLATFORM_SMP options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/GENERIC Tue Jul 4 16:52:55 2017 (r320647) @@ -62,7 +62,6 @@ options SOC_OMAP4 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM -options PLATFORM_SMP options MULTIDELAY options LINUX_BOOT_ABI Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/IMX6 Tue Jul 4 16:52:55 2017 (r320647) @@ -30,7 +30,6 @@ options SCHED_ULE # ULE scheduler #options NFSD # Network Filesystem Server options INCLUDE_CONFIG_FILE # Include this file in kernel options PLATFORM -options PLATFORM_SMP options SMP # Enable multiple cores options MULTIDELAY Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/PANDABOARD Tue Jul 4 16:52:55 2017 (r320647) @@ -34,7 +34,6 @@ makeoptions MODULES_EXTRA=dtb/omap4 options SCHED_ULE # ULE scheduler options PLATFORM -options PLATFORM_SMP options SMP # Enable multiple cores # NFS root from boopt/dhcp Modified: head/sys/arm/conf/RK3188 ============================================================================== --- head/sys/arm/conf/RK3188 Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/RK3188 Tue Jul 4 16:52:55 2017 (r320647) @@ -28,7 +28,6 @@ options SOC_ROCKCHIP_RK3188 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM -options PLATFORM_SMP options MULTIDELAY # Root mount from MMC/SD card Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/RPI2 Tue Jul 4 16:52:55 2017 (r320647) @@ -31,7 +31,6 @@ options INTRNG options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM -options PLATFORM_SMP options MULTIDELAY # NFS root from boopt/dhcp Modified: head/sys/arm/conf/SOCFPGA ============================================================================== --- head/sys/arm/conf/SOCFPGA Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/SOCFPGA Tue Jul 4 16:52:55 2017 (r320647) @@ -28,7 +28,6 @@ makeoptions WERROR="-Werror" options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC -options PLATFORM_SMP options SMP # Enable multiple cores options MULTIDELAY Modified: head/sys/arm/conf/TEGRA124 ============================================================================== --- head/sys/arm/conf/TEGRA124 Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/TEGRA124 Tue Jul 4 16:52:55 2017 (r320647) @@ -25,7 +25,6 @@ ident TEGRA124 options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC -options PLATFORM_SMP options MULTIDELAY options SMP # Enable multiple cores options LINUX_BOOT_ABI Modified: head/sys/arm/conf/VIRT ============================================================================== --- head/sys/arm/conf/VIRT Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/VIRT Tue Jul 4 16:52:55 2017 (r320647) @@ -25,7 +25,6 @@ include "../qemu/std.virt" options SCHED_ULE # ULE scheduler options PLATFORM -options PLATFORM_SMP options SMP # Enable multiple cores options MULTIDELAY Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/arm/conf/ZEDBOARD Tue Jul 4 16:52:55 2017 (r320647) @@ -28,7 +28,6 @@ makeoptions MODULES_EXTRA="dtb/zynq" options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC -options PLATFORM_SMP #options NFSSD # Network Filesystem Server options SMP # Enable multiple cores Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Tue Jul 4 15:53:54 2017 (r320646) +++ head/sys/conf/options.arm Tue Jul 4 16:52:55 2017 (r320647) @@ -38,7 +38,6 @@ MULTIDELAY opt_global.h NKPT2PG opt_pmap.h PHYSADDR opt_global.h PLATFORM opt_global.h -PLATFORM_SMP opt_global.h SOCDEV_PA opt_global.h SOCDEV_VA opt_global.h PV_STATS opt_pmap.h From owner-svn-src-head@freebsd.org Tue Jul 4 17:15:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EC4FD96231; Tue, 4 Jul 2017 17:15:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CFFC813AF; Tue, 4 Jul 2017 17:15:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64HFOp6015456; Tue, 4 Jul 2017 17:15:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64HFO7u015453; Tue, 4 Jul 2017 17:15:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707041715.v64HFO7u015453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 4 Jul 2017 17:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320648 - in head/sys/arm: freescale/vybrid samsung/exynos xilinx X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: freescale/vybrid samsung/exynos xilinx X-SVN-Commit-Revision: 320648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 17:15:25 -0000 Author: andrew Date: Tue Jul 4 17:15:23 2017 New Revision: 320648 URL: https://svnweb.freebsd.org/changeset/base/320648 Log: Add a delay count to the last few places. This will help make MULTIDELAY a requirement on armv6 with PLATFORM. Modified: head/sys/arm/freescale/vybrid/vf_machdep.c head/sys/arm/samsung/exynos/exynos5_machdep.c head/sys/arm/xilinx/zy7_machdep.c Modified: head/sys/arm/freescale/vybrid/vf_machdep.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_machdep.c Tue Jul 4 16:52:55 2017 (r320647) +++ head/sys/arm/freescale/vybrid/vf_machdep.c Tue Jul 4 17:15:23 2017 (r320648) @@ -83,4 +83,4 @@ static platform_method_t vf_methods[] = { PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(vf, "vybrid", 0, "freescale,vybrid", 0); +FDT_PLATFORM_DEF(vf, "vybrid", 0, "freescale,vybrid", 200); Modified: head/sys/arm/samsung/exynos/exynos5_machdep.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_machdep.c Tue Jul 4 16:52:55 2017 (r320647) +++ head/sys/arm/samsung/exynos/exynos5_machdep.c Tue Jul 4 17:15:23 2017 (r320648) @@ -91,4 +91,4 @@ static platform_method_t exynos5_methods[] = { PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(exynos5, "exynos5", 0, "samsung,exynos5", 0); +FDT_PLATFORM_DEF(exynos5, "exynos5", 0, "samsung,exynos5", 200); Modified: head/sys/arm/xilinx/zy7_machdep.c ============================================================================== --- head/sys/arm/xilinx/zy7_machdep.c Tue Jul 4 16:52:55 2017 (r320647) +++ head/sys/arm/xilinx/zy7_machdep.c Tue Jul 4 17:15:23 2017 (r320648) @@ -96,4 +96,4 @@ static platform_method_t zynq7_methods[] = { PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(zynq7, "zynq7", 0, "xlnx,zynq-7000", 0); +FDT_PLATFORM_DEF(zynq7, "zynq7", 0, "xlnx,zynq-7000", 200); From owner-svn-src-head@freebsd.org Tue Jul 4 18:04:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5B30D973A6; Tue, 4 Jul 2017 18:04:45 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B010782E59; Tue, 4 Jul 2017 18:04:45 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64I4iuK036393; Tue, 4 Jul 2017 18:04:44 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64I4iDF036392; Tue, 4 Jul 2017 18:04:44 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201707041804.v64I4iDF036392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 4 Jul 2017 18:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320650 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 320650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 18:04:45 -0000 Author: tuexen Date: Tue Jul 4 18:04:44 2017 New Revision: 320650 URL: https://svnweb.freebsd.org/changeset/base/320650 Log: Don't hold if refcount on an stcb when it is not needed. This improves the consistency with other parts of the code. Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue Jul 4 17:32:51 2017 (r320649) +++ head/sys/netinet/sctp_input.c Tue Jul 4 18:04:44 2017 (r320650) @@ -2149,23 +2149,23 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in * cookie was in flight. Only recourse is to abort the * association. */ - atomic_add_int(&stcb->asoc.refcnt, 1); op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); sctp_abort_association(inp, (struct sctp_tcb *)NULL, m, iphlen, src, dst, sh, op_err, mflowtype, mflowid, vrf_id, port); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_18); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif - atomic_subtract_int(&stcb->asoc.refcnt, 1); return (NULL); } /* process the INIT-ACK info (my info) */ @@ -2186,36 +2186,36 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in else retval = 0; if (retval < 0) { - atomic_add_int(&stcb->asoc.refcnt, 1); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_19); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif - atomic_subtract_int(&stcb->asoc.refcnt, 1); return (NULL); } /* load all addresses */ if (sctp_load_addresses_from_init(stcb, m, init_offset + sizeof(struct sctp_init_chunk), initack_offset, src, dst, init_src, port)) { - atomic_add_int(&stcb->asoc.refcnt, 1); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_20); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif - atomic_subtract_int(&stcb->asoc.refcnt, 1); return (NULL); } /* @@ -2234,18 +2234,18 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in /* auth HMAC failed, dump the assoc and packet */ SCTPDBG(SCTP_DEBUG_AUTH1, "COOKIE-ECHO: AUTH failed\n"); - atomic_add_int(&stcb->asoc.refcnt, 1); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_21); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif - atomic_subtract_int(&stcb->asoc.refcnt, 1); return (NULL); } else { /* remaining chunks checked... good to go */ @@ -2295,18 +2295,18 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in break; #endif default: - atomic_add_int(&stcb->asoc.refcnt, 1); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_22); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif - atomic_subtract_int(&stcb->asoc.refcnt, 1); return (NULL); } From owner-svn-src-head@freebsd.org Tue Jul 4 18:07:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B015D97474; Tue, 4 Jul 2017 18:07:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E987182FBF; Tue, 4 Jul 2017 18:07:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64I79b5036524; Tue, 4 Jul 2017 18:07:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64I794i036517; Tue, 4 Jul 2017 18:07:09 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707041807.v64I794i036517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 4 Jul 2017 18:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320651 - in head/sys/arm: conf freescale/imx ti/am335x versatile X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: conf freescale/imx ti/am335x versatile X-SVN-Commit-Revision: 320651 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 18:07:11 -0000 Author: andrew Date: Tue Jul 4 18:07:09 2017 New Revision: 320651 URL: https://svnweb.freebsd.org/changeset/base/320651 Log: Move the simple armv6 only timer drivers to require MULTIDELAY to help move all armv6 configs it. Modified: head/sys/arm/conf/ALPINE head/sys/arm/conf/VERSATILEPB head/sys/arm/freescale/imx/imx_epit.c head/sys/arm/freescale/imx/imx_gpt.c head/sys/arm/ti/am335x/am335x_dmtimer.c head/sys/arm/versatile/sp804.c Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Tue Jul 4 18:04:44 2017 (r320650) +++ head/sys/arm/conf/ALPINE Tue Jul 4 18:07:09 2017 (r320651) @@ -28,6 +28,7 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options SMP # Enable multiple cores options PLATFORM +options MULTIDELAY # Interrupt controller device gic Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Tue Jul 4 18:04:44 2017 (r320650) +++ head/sys/arm/conf/VERSATILEPB Tue Jul 4 18:07:09 2017 (r320651) @@ -70,6 +70,7 @@ device random # Entropy device options INTRNG options PLATFORM +options MULTIDELAY # Flattened Device Tree options FDT # Configure using FDT/DTB data Modified: head/sys/arm/freescale/imx/imx_epit.c ============================================================================== --- head/sys/arm/freescale/imx/imx_epit.c Tue Jul 4 18:04:44 2017 (r320650) +++ head/sys/arm/freescale/imx/imx_epit.c Tue Jul 4 18:07:09 2017 (r320651) @@ -106,11 +106,6 @@ struct epit_softc { bool oneshot; }; -#ifndef MULTIDELAY -/* Global softc pointer for use in DELAY(). */ -static struct epit_softc *epit_sc; -#endif - /* * Probe data. For some reason, the standard linux dts files don't have * compatible properties on the epit devices (other properties are missing too, @@ -218,11 +213,8 @@ epit_tc_attach(struct epit_softc *sc) tc_init(&sc->tc); /* We are the DELAY() implementation. */ -#ifdef MULTIDELAY arm_set_delay(epit_do_delay, sc); -#else - epit_sc = sc; -#endif + return (0); } @@ -497,32 +489,3 @@ static devclass_t epit_devclass; EARLY_DRIVER_MODULE(imx_epit, simplebus, epit_driver, epit_devclass, 0, 0, BUS_PASS_TIMER); - -#ifndef MULTIDELAY - -/* - * Hand-calibrated delay-loop counter. This was calibrated on an i.MX6 running - * at 792mhz. It will delay a bit too long on slower processors -- that's - * better than not delaying long enough. In practice this is unlikely to get - * used much since the clock driver is one of the first to start up, and once - * we're attached the delay loop switches to using the timer hardware. - */ -static const int epit_delay_count = 78; - -void -DELAY(int usec) -{ - uint64_t ticks; - - /* If the timer hardware is not accessible, just use a loop. */ - if (epit_sc == NULL) { - while (usec-- > 0) - for (ticks = 0; ticks < epit_delay_count; ++ticks) - cpufunc_nullop(); - return; - } else { - epit_do_delay(usec, epit_sc); - } -} - -#endif Modified: head/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpt.c Tue Jul 4 18:04:44 2017 (r320650) +++ head/sys/arm/freescale/imx/imx_gpt.c Tue Jul 4 18:07:09 2017 (r320651) @@ -40,9 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef MULTIDELAY #include /* For arm_set_delay */ -#endif #include #include @@ -92,20 +90,6 @@ struct imx_gpt_softc { struct eventtimer et; }; -#ifndef MULTIDELAY -/* Global softc pointer for use in DELAY(). */ -static struct imx_gpt_softc *imx_gpt_sc; - -/* - * Hand-calibrated delay-loop counter. This was calibrated on an i.MX6 running - * at 792mhz. It will delay a bit too long on slower processors -- that's - * better than not delaying long enough. In practice this is unlikely to get - * used much since the clock driver is one of the first to start up, and once - * we're attached the delay loop switches to using the timer hardware. - */ -static const int imx_gpt_delay_count = 78; -#endif - /* Try to divide down an available fast clock to this frequency. */ #define TARGET_FREQUENCY 1000000000 @@ -293,11 +277,7 @@ imx_gpt_attach(device_t dev) /* If this is the first unit, store the softc for use in DELAY. */ if (device_get_unit(dev) == 0) { -#ifdef MULTIDELAY arm_set_delay(imx_gpt_do_delay, sc); -#else - imx_gpt_sc = sc; -#endif } return (0); @@ -441,21 +421,3 @@ imx_gpt_do_delay(int usec, void *arg) curcnt += 1ULL << 32; } } - -#ifndef MULTIDELAY -void -DELAY(int usec) -{ - uint64_t ticks; - - /* If the timer hardware is not accessible, just use a loop. */ - if (imx_gpt_sc == NULL) { - while (usec-- > 0) - for (ticks = 0; ticks < imx_gpt_delay_count; ++ticks) - cpufunc_nullop(); - return; - } else - imx_gpt_do_delay(usec, imx_gpt_sc); - -} -#endif Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_dmtimer.c Tue Jul 4 18:04:44 2017 (r320650) +++ head/sys/arm/ti/am335x/am335x_dmtimer.c Tue Jul 4 18:07:09 2017 (r320651) @@ -38,9 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef MULTIDELAY #include /* For arm_set_delay */ -#endif #include #include @@ -241,9 +239,7 @@ am335x_dmtimer_tc_init(struct am335x_dmtimer_softc *sc am335x_dmtimer_tc_sc = sc; tc_init(&sc->func.tc); -#ifdef MULTIDELAY arm_set_delay(am335x_dmtimer_delay, sc); -#endif return (0); } @@ -360,20 +356,3 @@ am335x_dmtimer_delay(int usec, void *arg) first = last; } } - -#ifndef MULTIDELAY -void -DELAY(int usec) -{ - int32_t counts; - - if (am335x_dmtimer_tc_sc == NULL) { - for (; usec > 0; usec--) - for (counts = 200; counts > 0; counts--) - /* Prevent gcc from optimizing out the loop */ - cpufunc_nullop(); - return; - } else - am335x_dmtimer_delay(usec, am335x_dmtimer_tc_sc); -} -#endif Modified: head/sys/arm/versatile/sp804.c ============================================================================== --- head/sys/arm/versatile/sp804.c Tue Jul 4 18:04:44 2017 (r320650) +++ head/sys/arm/versatile/sp804.c Tue Jul 4 18:07:09 2017 (r320651) @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include + #include #include #include @@ -42,9 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef MULTIDELAY #include /* For arm_set_delay */ -#endif #include #include @@ -292,9 +290,7 @@ sp804_timer_attach(device_t dev) (sp804_timer_tc_read_4(SP804_PRIMECELL_ID0 + i*4) & 0xff); } -#ifdef MULTIDELAY arm_set_delay(sp804_timer_delay, sc); -#endif device_printf(dev, "PrimeCell ID: %08x\n", id); @@ -343,35 +339,3 @@ sp804_timer_delay(int usec, void *arg) first = last; } } - -#ifndef MULTIDELAY -void -DELAY(int usec) -{ - int32_t counts; - device_t timer_dev; - struct sp804_timer_softc *sc; - int timer_initialized = 0; - - timer_dev = devclass_get_device(sp804_timer_devclass, 0); - - if (timer_dev) { - sc = device_get_softc(timer_dev); - - if (sc) - timer_initialized = sc->timer_initialized; - } - - if (!timer_initialized) { - /* - * Timer is not initialized yet - */ - for (; usec > 0; usec--) - for (counts = 200; counts > 0; counts--) - /* Prevent gcc from optimizing out the loop */ - cpufunc_nullop(); - } else { - sp804_timer_delay(usec, sc); - } -} -#endif From owner-svn-src-head@freebsd.org Tue Jul 4 18:23:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E62A8D97855; Tue, 4 Jul 2017 18:23:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B56398368E; Tue, 4 Jul 2017 18:23:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64INH7Z044161; Tue, 4 Jul 2017 18:23:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64INHFF044160; Tue, 4 Jul 2017 18:23:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201707041823.v64INHFF044160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 4 Jul 2017 18:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320652 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 18:23:19 -0000 Author: hselasky Date: Tue Jul 4 18:23:17 2017 New Revision: 320652 URL: https://svnweb.freebsd.org/changeset/base/320652 Log: After r319722 two fields were left uninitialized when transforming a socket structure into a listening socket. This resulted in an invalid instruction fault for all 32-bit platforms. When INVARIANTS is set the union where the two uninitialized fields reside gets properly zeroed. This patch ensures the two uninitialized fields are zeroed when INVARIANTS is undefined. For 64-bit platforms this issue was not visible because so->sol_upcall which is uninitialized overlaps with so->so_rcv.sb_state which is already zero during soalloc(); For 32-bit platforms this issue was visible and resulted in an invalid instruction fault, because so->sol_upcall overlaps with so->so_rcv.sb_sel which is always initialized to a valid data pointer during soalloc(). Verifying the offset locations mentioned above are identical is left as an exercise to the reader. PR: 220452 PR: 220358 Reviewed by: ae (network), gallatin Differential Revision: https://reviews.freebsd.org/D11475 Sponsored by: Mellanox Technologies Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Jul 4 18:07:09 2017 (r320651) +++ head/sys/kern/uipc_socket.c Tue Jul 4 18:23:17 2017 (r320652) @@ -858,6 +858,9 @@ solisten_proto(struct socket *so, int backlog) so->sol_accept_filter_arg = NULL; so->sol_accept_filter_str = NULL; + so->sol_upcall = NULL; + so->sol_upcallarg = NULL; + so->so_options |= SO_ACCEPTCONN; listening: From owner-svn-src-head@freebsd.org Tue Jul 4 18:24:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFFBED979A9; Tue, 4 Jul 2017 18:24:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D306838F0; Tue, 4 Jul 2017 18:24:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64IOoYR044276; Tue, 4 Jul 2017 18:24:50 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64IOoeN044275; Tue, 4 Jul 2017 18:24:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201707041824.v64IOoeN044275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 4 Jul 2017 18:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320653 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 320653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 18:24:51 -0000 Author: tuexen Date: Tue Jul 4 18:24:50 2017 New Revision: 320653 URL: https://svnweb.freebsd.org/changeset/base/320653 Log: Move to open state after plausibility checks. When doing this too early, the MIB counters go wrong. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue Jul 4 18:23:17 2017 (r320652) +++ head/sys/netinet/sctp_input.c Tue Jul 4 18:24:50 2017 (r320653) @@ -2252,17 +2252,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in stcb->asoc.authenticated = 1; } } - /* update current state */ - SCTPDBG(SCTP_DEBUG_INPUT2, "moving to OPEN state\n"); - SCTP_SET_STATE(asoc, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, asoc->primary_destination); - } - sctp_stop_all_cookie_timers(stcb); - SCTP_STAT_INCR_COUNTER32(sctps_passiveestab); - SCTP_STAT_INCR_GAUGE32(sctps_currestab); - /* * if we're doing ASCONFs, check to see if we have any new local * addresses that need to get added to the peer (eg. addresses @@ -2309,6 +2298,17 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in #endif return (NULL); } + + /* update current state */ + SCTPDBG(SCTP_DEBUG_INPUT2, "moving to OPEN state\n"); + SCTP_SET_STATE(asoc, SCTP_STATE_OPEN); + if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, + stcb->sctp_ep, stcb, asoc->primary_destination); + } + sctp_stop_all_cookie_timers(stcb); + SCTP_STAT_INCR_COUNTER32(sctps_passiveestab); + SCTP_STAT_INCR_GAUGE32(sctps_currestab); /* set up to notify upper layer */ *notification = SCTP_NOTIFY_ASSOC_UP; From owner-svn-src-head@freebsd.org Tue Jul 4 18:38:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40800D98211; Tue, 4 Jul 2017 18:38:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DE6884468; Tue, 4 Jul 2017 18:38:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64IcZVC049813; Tue, 4 Jul 2017 18:38:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64IcYsN049811; Tue, 4 Jul 2017 18:38:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707041838.v64IcYsN049811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 4 Jul 2017 18:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320655 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 320655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 18:38:36 -0000 Author: ian Date: Tue Jul 4 18:38:34 2017 New Revision: 320655 URL: https://svnweb.freebsd.org/changeset/base/320655 Log: Add a driver for the imx6 on-chip realtime clock. This driver is standard rather than optional because it can always provide time after a reboot, but it will only provide time after a power cycle if battery power is supplied to the chip's SNVS power domain. Added: head/sys/arm/freescale/imx/imx6_snvs.c (contents, props changed) Modified: head/sys/arm/freescale/imx/files.imx6 Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Tue Jul 4 18:36:02 2017 (r320654) +++ head/sys/arm/freescale/imx/files.imx6 Tue Jul 4 18:38:34 2017 (r320655) @@ -14,6 +14,7 @@ arm/freescale/imx/imx6_ccm.c standard arm/freescale/imx/imx6_machdep.c standard arm/freescale/imx/imx6_mp.c optional smp arm/freescale/imx/imx6_pl310.c standard +arm/freescale/imx/imx6_snvs.c standard arm/freescale/imx/imx6_src.c standard arm/freescale/imx/imx_epit.c standard arm/freescale/imx/imx_iomux.c standard Added: head/sys/arm/freescale/imx/imx6_snvs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_snvs.c Tue Jul 4 18:38:34 2017 (r320655) @@ -0,0 +1,228 @@ +/*- + * Copyright (c) 2017 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Driver for imx6 Secure Non-Volatile Storage system, which really means "all + * the stuff that's powered by a battery when main power is off". This includes + * realtime clock, tamper monitor, and power-management functions. Currently + * this driver provides only realtime clock support. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "clock_if.h" + +#define SNVS_LPCR 0x38 /* Control register */ +#define LPCR_LPCALB_VAL_SHIFT 10 /* Calibration shift */ +#define LPCR_LPCALB_VAL_MASK 0x1f /* Calibration mask */ +#define LPCR_LPCALB_EN (1u << 8) /* Calibration enable */ +#define LPCR_SRTC_ENV (1u << 0) /* RTC enabled/valid */ + +#define SNVS_LPSRTCMR 0x50 /* Counter MSB */ +#define SNVS_LPSRTCLR 0x54 /* Counter LSB */ + +#define RTC_RESOLUTION_US (1000000 / 32768) /* 32khz clock */ + +/* + * The RTC is a 47-bit counter clocked at 32KHz and organized as a 32.15 + * fixed-point binary value. Shifting by SBT_LSB bits translates between + * counter and sbintime values. + */ +#define RTC_BITS 47 +#define SBT_BITS 64 +#define SBT_LSB (SBT_BITS - RTC_BITS) + +struct snvs_softc { + device_t dev; + struct resource * memres; + uint32_t lpcr; +}; + +static struct ofw_compat_data compat_data[] = { + {"fsl,sec-v4.0-mon", true}, + {NULL, false} +}; + +static inline uint32_t +RD4(struct snvs_softc *sc, bus_size_t offset) +{ + + return (bus_read_4(sc->memres, offset)); +} + +static inline void +WR4(struct snvs_softc *sc, bus_size_t offset, uint32_t value) +{ + + bus_write_4(sc->memres, offset, value); +} + +static void +snvs_rtc_enable(struct snvs_softc *sc, bool enable) +{ + uint32_t enbit; + + if (enable) + sc->lpcr |= LPCR_SRTC_ENV; + else + sc->lpcr &= ~LPCR_SRTC_ENV; + WR4(sc, SNVS_LPCR, sc->lpcr); + + /* Wait for the hardware to achieve the requested state. */ + enbit = sc->lpcr & LPCR_SRTC_ENV; + while ((RD4(sc, SNVS_LPCR) & LPCR_SRTC_ENV) != enbit) + continue; +} + +static int +snvs_gettime(device_t dev, struct timespec *ts) +{ + struct snvs_softc *sc; + sbintime_t counter1, counter2; + + sc = device_get_softc(dev); + + /* If the clock is not enabled and valid, we can't help. */ + if (!(RD4(sc, SNVS_LPCR) & LPCR_SRTC_ENV)) { + return (EINVAL); + } + + /* + * The counter is clocked asynchronously to cpu accesses; read and + * assemble the pieces of the counter until we get the same value twice. + * The counter is 47 bits, organized as a 32.15 binary fixed-point + * value. If we shift it up to the high order part of a 64-bit word it + * turns into an sbintime. + */ + do { + counter1 = (uint64_t)RD4(sc, SNVS_LPSRTCMR) << (SBT_LSB + 32); + counter1 |= (uint64_t)RD4(sc, SNVS_LPSRTCLR) << (SBT_LSB); + counter2 = (uint64_t)RD4(sc, SNVS_LPSRTCMR) << (SBT_LSB + 32); + counter2 |= (uint64_t)RD4(sc, SNVS_LPSRTCLR) << (SBT_LSB); + } while (counter1 != counter2); + + *ts = sbttots(counter1); + + return (0); +} + +static int +snvs_settime(device_t dev, struct timespec *unused) +{ + struct snvs_softc *sc; + struct bintime bt; + sbintime_t sbt; + + sc = device_get_softc(dev); + + /* + * Ignore the inaccurate time passed in from the common clock code and + * obtain a time worthy of our 30us accuracy. + */ + bintime(&bt); + bt.sec -= utc_offset(); + sbt = bttosbt(bt); + + /* + * It takes two clock cycles for the counter to start after setting the + * enable bit, so add two SBT_LSBs to what we're about to set. + */ + sbt += 2 << SBT_LSB; + snvs_rtc_enable(sc, false); + WR4(sc, SNVS_LPSRTCMR, (uint32_t)(sbt >> (SBT_LSB + 32))); + WR4(sc, SNVS_LPSRTCLR, (uint32_t)(sbt >> (SBT_LSB))); + snvs_rtc_enable(sc, true); + + return (0); +} + +static int +snvs_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "i.MX6 SNVS RTC"); + return (BUS_PROBE_DEFAULT); +} + +static int +snvs_attach(device_t dev) +{ + struct snvs_softc *sc; + int rid; + + sc = device_get_softc(dev); + sc->dev = dev; + + rid = 0; + sc->memres = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->memres == NULL) { + device_printf(sc->dev, "could not allocate registers\n"); + return (ENXIO); + } + + clock_register(sc->dev, RTC_RESOLUTION_US); + + return (0); +} + +static device_method_t snvs_methods[] = { + DEVMETHOD(device_probe, snvs_probe), + DEVMETHOD(device_attach, snvs_attach), + + /* clock_if methods */ + DEVMETHOD(clock_gettime, snvs_gettime), + DEVMETHOD(clock_settime, snvs_settime), + + DEVMETHOD_END +}; + +static driver_t snvs_driver = { + "snvs", + snvs_methods, + sizeof(struct snvs_softc), +}; + +static devclass_t snvs_devclass; + +DRIVER_MODULE(snvs, simplebus, snvs_driver, snvs_devclass, 0, 0); From owner-svn-src-head@freebsd.org Tue Jul 4 18:44:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0F78D984D2; Tue, 4 Jul 2017 18:44:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFA6C84BEF; Tue, 4 Jul 2017 18:44:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64IiEdw053587; Tue, 4 Jul 2017 18:44:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64IiEFg053586; Tue, 4 Jul 2017 18:44:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707041844.v64IiEFg053586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 4 Jul 2017 18:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320656 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 320656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 18:44:16 -0000 Author: markj Date: Tue Jul 4 18:44:14 2017 New Revision: 320656 URL: https://svnweb.freebsd.org/changeset/base/320656 Log: Invoke suspend/resume methods from the driver pmops if available. Obtained from: kmacy (original version) MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Jul 4 18:38:34 2017 (r320655) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Tue Jul 4 18:44:14 2017 (r320656) @@ -183,32 +183,47 @@ linux_pci_detach(device_t dev) static int linux_pci_suspend(device_t dev) { + const struct dev_pm_ops *pmops; struct pm_message pm = { }; struct pci_dev *pdev; - int err; + int error; + error = 0; linux_set_current(curthread); pdev = device_get_softc(dev); + pmops = pdev->pdrv->driver.pm; + if (pdev->pdrv->suspend != NULL) - err = -pdev->pdrv->suspend(pdev, pm); - else - err = 0; - return (err); + error = -pdev->pdrv->suspend(pdev, pm); + else if (pmops != NULL && pmops->suspend != NULL) { + error = -pmops->suspend(&pdev->dev); + if (error == 0 && pmops->suspend_late != NULL) + error = -pmops->suspend_late(&pdev->dev); + } + return (error); } static int linux_pci_resume(device_t dev) { + const struct dev_pm_ops *pmops; struct pci_dev *pdev; - int err; + int error; + error = 0; linux_set_current(curthread); pdev = device_get_softc(dev); + pmops = pdev->pdrv->driver.pm; + if (pdev->pdrv->resume != NULL) - err = -pdev->pdrv->resume(pdev); - else - err = 0; - return (err); + error = -pdev->pdrv->resume(pdev); + else if (pmops != NULL && pmops->resume != NULL) { + if (pmops->resume_early != NULL) + error = -pmops->resume_early(&pdev->dev); + if (error == 0 && pmops->resume != NULL) + error = -pmops->resume(&pdev->dev); + } + return (error); } static int @@ -266,4 +281,3 @@ pci_unregister_driver(struct pci_driver *pdrv) devclass_delete_driver(bus, &pdrv->bsddriver); mtx_unlock(&Giant); } - From owner-svn-src-head@freebsd.org Tue Jul 4 18:48:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE79FD9860F; Tue, 4 Jul 2017 18:48:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8316E84DB7; Tue, 4 Jul 2017 18:48:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64Im8Y4053757; Tue, 4 Jul 2017 18:48:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64Im81m053754; Tue, 4 Jul 2017 18:48:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707041848.v64Im81m053754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 4 Jul 2017 18:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320657 - in head: etc/mtree lib/libcam sys/cam X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: etc/mtree lib/libcam sys/cam X-SVN-Commit-Revision: 320657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 18:48:09 -0000 Author: emaste Date: Tue Jul 4 18:48:08 2017 New Revision: 320657 URL: https://svnweb.freebsd.org/changeset/base/320657 Log: cam: EOL whitespace cleanup and line wrapping changes NFC. This cleanup simplifies diffs for review of the MMC-CAM work. Submitted by: kibab Modified: head/etc/mtree/BSD.include.dist head/lib/libcam/Makefile head/sys/cam/cam_ccb.h Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Tue Jul 4 18:44:14 2017 (r320656) +++ head/etc/mtree/BSD.include.dist Tue Jul 4 18:48:08 2017 (r320657) @@ -234,7 +234,7 @@ gssapi .. infiniband - complib + complib .. iba .. Modified: head/lib/libcam/Makefile ============================================================================== --- head/lib/libcam/Makefile Tue Jul 4 18:44:14 2017 (r320656) +++ head/lib/libcam/Makefile Tue Jul 4 18:48:08 2017 (r320657) @@ -36,8 +36,9 @@ MLINKS+= cam.3 cam_open_device.3 \ cam_cdbparse.3 csio_encode_visit.3 \ cam_cdbparse.3 buff_encode_visit.3 -.PATH: ${SRCTOP}/sys/cam/scsi ${SRCTOP}/sys/cam/ata \ - ${SRCTOP}/sys/cam +.PATH: ${SRCTOP}/sys/cam \ + ${SRCTOP}/sys/cam/ata \ + ${SRCTOP}/sys/cam/scsi CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Tue Jul 4 18:44:14 2017 (r320656) +++ head/sys/cam/cam_ccb.h Tue Jul 4 18:48:08 2017 (r320657) @@ -330,8 +330,8 @@ typedef struct { struct ccb_hdr { cam_pinfo pinfo; /* Info for priority scheduling */ - camq_entry xpt_links; /* For chaining in the XPT layer */ - camq_entry sim_links; /* For chaining in the SIM layer */ + camq_entry xpt_links; /* For chaining in the XPT layer */ + camq_entry sim_links; /* For chaining in the SIM layer */ camq_entry periph_links; /* For chaining in the type driver */ u_int32_t retry_count; void (*cbfcnp)(struct cam_periph *, union ccb *); @@ -367,7 +367,7 @@ struct ccb_getdev { /* Device Statistics CCB */ struct ccb_getdevstats { struct ccb_hdr ccb_h; - int dev_openings; /* Space left for more work on device*/ + int dev_openings; /* Space left for more work on device*/ int dev_active; /* Transactions running on the device */ int allocated; /* CCBs allocated for the device */ int queued; /* CCBs queued to be sent to the device */ @@ -441,7 +441,7 @@ struct device_match_pattern { union { struct scsi_static_inquiry_pattern inq_pat; struct device_id_match_pattern devid_pat; - } data; + } data; }; typedef enum { @@ -541,7 +541,7 @@ typedef enum { struct ccb_dm_cookie { void *bus; - void *target; + void *target; void *device; void *periph; void *pdrv; @@ -724,7 +724,7 @@ struct ccb_scsiio { u_int8_t *req_map; /* Ptr to mapping info */ u_int8_t *data_ptr; /* Ptr to the data buf/SG list */ u_int32_t dxfer_len; /* Data transfer length */ - /* Autosense storage */ + /* Autosense storage */ struct scsi_sense_data sense_data; u_int8_t sense_len; /* Number of bytes to autosense */ u_int8_t cdb_len; /* Number of bytes for the CDB */ @@ -863,7 +863,7 @@ struct ac_device_changed { /* Set Asynchronous Callback CCB */ struct ccb_setasync { struct ccb_hdr ccb_h; - u_int32_t event_enable; /* Async Event enables */ + u_int32_t event_enable; /* Async Event enables */ ac_callback_t *callback; void *callback_arg; }; @@ -1040,7 +1040,7 @@ struct ccb_calc_geometry { struct ccb_hdr ccb_h; u_int32_t block_size; u_int64_t volume_size; - u_int32_t cylinders; + u_int32_t cylinders; u_int8_t heads; u_int8_t secs_per_track; }; @@ -1262,8 +1262,8 @@ union ccb { struct ccb_getdevstats cgds; struct ccb_dev_match cdm; struct ccb_trans_settings cts; - struct ccb_calc_geometry ccg; - struct ccb_sim_knob knob; + struct ccb_calc_geometry ccg; + struct ccb_sim_knob knob; struct ccb_abort cab; struct ccb_resetbus crb; struct ccb_resetdev crd; @@ -1320,7 +1320,7 @@ cam_fill_ataio(struct ccb_ataio *ataio, u_int32_t retr u_int32_t timeout); static __inline void -cam_fill_smpio(struct ccb_smpio *smpio, uint32_t retries, +cam_fill_smpio(struct ccb_smpio *smpio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint32_t flags, uint8_t *smp_request, int smp_request_len, uint8_t *smp_response, int smp_response_len, @@ -1337,7 +1337,7 @@ cam_fill_csio(struct ccb_scsiio *csio, u_int32_t retri csio->ccb_h.func_code = XPT_SCSI_IO; csio->ccb_h.flags = flags; csio->ccb_h.xflags = 0; - csio->ccb_h.retry_count = retries; + csio->ccb_h.retry_count = retries; csio->ccb_h.cbfcnp = cbfcnp; csio->ccb_h.timeout = timeout; csio->data_ptr = data_ptr; @@ -1360,7 +1360,7 @@ cam_fill_ctio(struct ccb_scsiio *csio, u_int32_t retri csio->ccb_h.func_code = XPT_CONT_TARGET_IO; csio->ccb_h.flags = flags; csio->ccb_h.xflags = 0; - csio->ccb_h.retry_count = retries; + csio->ccb_h.retry_count = retries; csio->ccb_h.cbfcnp = cbfcnp; csio->ccb_h.timeout = timeout; csio->data_ptr = data_ptr; @@ -1389,7 +1389,7 @@ cam_fill_ataio(struct ccb_ataio *ataio, u_int32_t retr } static __inline void -cam_fill_smpio(struct ccb_smpio *smpio, uint32_t retries, +cam_fill_smpio(struct ccb_smpio *smpio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint32_t flags, uint8_t *smp_request, int smp_request_len, uint8_t *smp_response, int smp_response_len, From owner-svn-src-head@freebsd.org Tue Jul 4 20:19:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74B96D9A44E; Tue, 4 Jul 2017 20:19:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41F9B2AD2; Tue, 4 Jul 2017 20:19:37 +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 v64KJak9090533; Tue, 4 Jul 2017 20:19:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64KJatG090532; Tue, 4 Jul 2017 20:19:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707042019.v64KJatG090532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 4 Jul 2017 20:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320658 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 320658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 20:19:37 -0000 Author: kib Date: Tue Jul 4 20:19:36 2017 New Revision: 320658 URL: https://svnweb.freebsd.org/changeset/base/320658 Log: When reporting undefined symbol, note the version, if specified. Use the standard syntax of name@version, I do not expect a confusion due to unlikely possibility of the name containing the '@' character. Requested by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Tue Jul 4 18:48:08 2017 (r320657) +++ head/libexec/rtld-elf/rtld.c Tue Jul 4 20:19:36 2017 (r320658) @@ -1659,6 +1659,7 @@ find_symdef(unsigned long symnum, const Obj_Entry *ref const Elf_Sym *ref; const Elf_Sym *def; const Obj_Entry *defobj; + const Ver_Entry *ve; SymLook req; const char *name; int res; @@ -1678,6 +1679,7 @@ find_symdef(unsigned long symnum, const Obj_Entry *ref name = refobj->strtab + ref->st_name; def = NULL; defobj = NULL; + ve = NULL; /* * We don't have to do a full scale lookup if the symbol is local. @@ -1694,7 +1696,7 @@ find_symdef(unsigned long symnum, const Obj_Entry *ref } symlook_init(&req, name); req.flags = flags; - req.ventry = fetch_ventry(refobj, symnum); + ve = req.ventry = fetch_ventry(refobj, symnum); req.lockstate = lockstate; res = symlook_default(&req, refobj); if (res == 0) { @@ -1724,7 +1726,8 @@ find_symdef(unsigned long symnum, const Obj_Entry *ref } } else { if (refobj != &obj_rtld) - _rtld_error("%s: Undefined symbol \"%s\"", refobj->path, name); + _rtld_error("%s: Undefined symbol \"%s%s%s\"", refobj->path, name, + ve != NULL ? "@" : "", ve != NULL ? ve->name : ""); } return def; } @@ -3489,7 +3492,8 @@ do_dlsym(void *handle, const char *name, void *retaddr return (sym); } - _rtld_error("Undefined symbol \"%s\"", name); + _rtld_error("Undefined symbol \"%s%s%s\"", name, ve != NULL ? "@" : "", + ve != NULL ? ve->name : ""); lock_release(rtld_bind_lock, &lockstate); LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name); return NULL; From owner-svn-src-head@freebsd.org Tue Jul 4 22:20:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3A58D9BF6E; Tue, 4 Jul 2017 22:20:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2746652EC; Tue, 4 Jul 2017 22:20:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64MKUou039220; Tue, 4 Jul 2017 22:20:30 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64MKU77039219; Tue, 4 Jul 2017 22:20:30 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707042220.v64MKU77039219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 4 Jul 2017 22:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320659 - head/usr.sbin/nfsuserd X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/usr.sbin/nfsuserd X-SVN-Commit-Revision: 320659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 22:20:32 -0000 Author: rmacklem Date: Tue Jul 4 22:20:30 2017 New Revision: 320659 URL: https://svnweb.freebsd.org/changeset/base/320659 Log: Add a Bugs section that indicates that the nfsuserd doesn't work when jails are being used on the system. It is hoped that the patches in PR#205193 will someday get tested/debugged so that they can be committed to fix this. This is a content change. PR: 205193 MFC after: 2 weeks Modified: head/usr.sbin/nfsuserd/nfsuserd.8 Modified: head/usr.sbin/nfsuserd/nfsuserd.8 ============================================================================== --- head/usr.sbin/nfsuserd/nfsuserd.8 Tue Jul 4 20:19:36 2017 (r320658) +++ head/usr.sbin/nfsuserd/nfsuserd.8 Tue Jul 4 22:20:30 2017 (r320659) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 21, 2017 +.Dd July 4, 2017 .Dt NFSUSERD 8 .Os .Sh NAME @@ -126,3 +126,9 @@ those requests fail and the library functions don't re and .Xr passwd 5 for more information on how the databases are accessed. +.Pp +Since the kernel communicates with the +.Nm +daemon via an upcall that uses the IP address 127.0.0.1, it does not work correctly when +.Xr jail 8 +are used and can crash the system. From owner-svn-src-head@freebsd.org Wed Jul 5 02:20:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EEEED9FB6D; Wed, 5 Jul 2017 02:20:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6C06E4F6; Wed, 5 Jul 2017 02:20:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v652K3Ew036970; Wed, 5 Jul 2017 02:20:03 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v652K3dh036969; Wed, 5 Jul 2017 02:20:03 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201707050220.v652K3dh036969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 5 Jul 2017 02:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320662 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 320662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 02:20:04 -0000 Author: jhibbits Date: Wed Jul 5 02:20:03 2017 New Revision: 320662 URL: https://svnweb.freebsd.org/changeset/base/320662 Log: Remove an obsolete comment This has been wrong for well over a year, we support the full 36-bit (or more) PA space. Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Tue Jul 4 23:04:29 2017 (r320661) +++ head/sys/powerpc/booke/pmap.c Wed Jul 5 02:20:03 2017 (r320662) @@ -3850,7 +3850,6 @@ tlb1_read_entry(tlb_entry_t *entry, unsigned int slot) /* * Write given entry to TLB1 hardware. - * Use 32 bit pa, clear 4 high-order bits of RPN (mas7). */ static void tlb1_write_entry(tlb_entry_t *e, unsigned int idx) From owner-svn-src-head@freebsd.org Wed Jul 5 02:58:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FABDDA0533; Wed, 5 Jul 2017 02:58:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E6206F487; Wed, 5 Jul 2017 02:58:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v652wk4Z053211; Wed, 5 Jul 2017 02:58:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v652wkhl053210; Wed, 5 Jul 2017 02:58:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707050258.v652wkhl053210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 5 Jul 2017 02:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320663 - head/lib/libelftc X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libelftc X-SVN-Commit-Revision: 320663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 02:58:47 -0000 Author: emaste Date: Wed Jul 5 02:58:46 2017 New Revision: 320663 URL: https://svnweb.freebsd.org/changeset/base/320663 Log: libelftc: bump version, tracking import in r320343 Modified: head/lib/libelftc/elftc_version.c Modified: head/lib/libelftc/elftc_version.c ============================================================================== --- head/lib/libelftc/elftc_version.c Wed Jul 5 02:20:03 2017 (r320662) +++ head/lib/libelftc/elftc_version.c Wed Jul 5 02:58:46 2017 (r320663) @@ -6,5 +6,5 @@ const char * elftc_version(void) { - return "elftoolchain r3520M"; + return "elftoolchain r3561M"; } From owner-svn-src-head@freebsd.org Wed Jul 5 05:06:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38538DA1D5D; Wed, 5 Jul 2017 05:06:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B56857212B; Wed, 5 Jul 2017 05:06:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v6556buo011783 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 5 Jul 2017 08:06:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v6556buo011783 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v6556biN011782; Wed, 5 Jul 2017 08:06:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 5 Jul 2017 08:06:37 +0300 From: Konstantin Belousov To: Rick Macklem Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320659 - head/usr.sbin/nfsuserd Message-ID: <20170705050637.GT1935@kib.kiev.ua> References: <201707042220.v64MKU77039219@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201707042220.v64MKU77039219@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 05:06:45 -0000 On Tue, Jul 04, 2017 at 10:20:30PM +0000, Rick Macklem wrote: > +Since the kernel communicates with the > +.Nm > +daemon via an upcall that uses the IP address 127.0.0.1, it does not work correctly when > +.Xr jail 8 > +are used and can crash the system. Does it indeed break when jails are used, or does it break when the daemon is started in a jail ? From owner-svn-src-head@freebsd.org Wed Jul 5 05:18:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03932DA2098 for ; Wed, 5 Jul 2017 05:18:30 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123]) by mx1.freebsd.org (Postfix) with ESMTP id 71A6472709 for ; Wed, 5 Jul 2017 05:18:28 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: from mail-yb0-f178.google.com ([209.85.213.178]) by mwinf5d02 with ME id gtAp1v0063rWPmR03tApX1; Wed, 05 Jul 2017 07:10:50 +0200 X-ME-Helo: mail-yb0-f178.google.com X-ME-Auth: Y29jaGFyZC1sYWJiZS5vbGl2aWVyQG9yYW5nZS5mcg== X-ME-Date: Wed, 05 Jul 2017 07:10:50 +0200 X-ME-IP: 209.85.213.178 Received: by mail-yb0-f178.google.com with SMTP id s15so34544228ybe.2; Tue, 04 Jul 2017 22:10:49 -0700 (PDT) X-Gm-Message-State: AKS2vOwMRflkRup7p/ViEoUfFoRQGx6XK6u0UpzoB4u/evHTfHGRbHYY U0PzlaugArWndPSQqfdD+BO24N+dlA== X-Received: by 10.37.77.5 with SMTP id a5mr35216683ybb.237.1499231448599; Tue, 04 Jul 2017 22:10:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.4.195 with HTTP; Tue, 4 Jul 2017 22:10:28 -0700 (PDT) In-Reply-To: <20170705050637.GT1935@kib.kiev.ua> References: <201707042220.v64MKU77039219@repo.freebsd.org> <20170705050637.GT1935@kib.kiev.ua> From: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Date: Wed, 5 Jul 2017 07:10:28 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r320659 - head/usr.sbin/nfsuserd To: Rick Macklem Cc: svn-src-head , svn-src-all , src-committers , Konstantin Belousov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 05:18:30 -0000 On Wed, Jul 5, 2017 at 7:06 AM, Konstantin Belousov wrote: > On Tue, Jul 04, 2017 at 10:20:30PM +0000, Rick Macklem wrote: > > +Since the kernel communicates with the > > +.Nm > > +daemon via an upcall that uses the IP address 127.0.0.1, it does not > work correctly when > > +.Xr jail 8 > > +are used and can crash the system. > > Does it indeed break when jails are used, or does it break when the daemo= n > is started in a jail ? > > =E2=80=8BAnd does it break on a jail/vnet too ? From owner-svn-src-head@freebsd.org Wed Jul 5 05:50:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11520DA290D; Wed, 5 Jul 2017 05:50:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1D037343D; Wed, 5 Jul 2017 05:50:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v655oa3T023874; Wed, 5 Jul 2017 05:50:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v655oaXT023872; Wed, 5 Jul 2017 05:50:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201707050550.v655oaXT023872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 5 Jul 2017 05:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320664 - in head/contrib/ipfilter: man tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/ipfilter: man tools X-SVN-Commit-Revision: 320664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 05:50:38 -0000 Author: cy Date: Wed Jul 5 05:50:36 2017 New Revision: 320664 URL: https://svnweb.freebsd.org/changeset/base/320664 Log: Document supported poollist() (ippool -l) options in usage() and in ippool.8 man page. Modified: head/contrib/ipfilter/man/ippool.8 head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/man/ippool.8 ============================================================================== --- head/contrib/ipfilter/man/ippool.8 Wed Jul 5 02:58:46 2017 (r320663) +++ head/contrib/ipfilter/man/ippool.8 Wed Jul 5 05:50:36 2017 (r320664) @@ -18,7 +18,7 @@ ippool \- user interface to the IPFilter pools -F [-dv] [-o ] [-t ] .br .B ippool --l [-dv] [-m ] [-t ] +-l [-dv] [-m ] [-t ] [-o ] [-M ] [-N ] .br .B ippool -r [-dnv] [-m ] [-o ] [-t ] -i [/] Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Wed Jul 5 02:58:46 2017 (r320663) +++ head/contrib/ipfilter/tools/ippool.c Wed Jul 5 05:50:36 2017 (r320664) @@ -79,7 +79,7 @@ usage(prog) fprintf(stderr, "\t-A [-dnv] [-m ] [-o ] [-S ] [-t ]\n"); fprintf(stderr, "\t-f [-dnuv]\n"); fprintf(stderr, "\t-F [-dv] [-o ] [-t ]\n"); - fprintf(stderr, "\t-l [-dv] [-m ] [-t ]\n"); + fprintf(stderr, "\t-l [-dv] [-m ] [-t ] [-o ] [-M ] [-N ]\n"); fprintf(stderr, "\t-r [-dnv] [-m ] [-o ] [-t type] -i [/netmask]\n"); fprintf(stderr, "\t-R [-dnv] [-m ] [-o ] [-t ]\n"); fprintf(stderr, "\t-s [-dtv] [-M ] [-N ]\n"); From owner-svn-src-head@freebsd.org Wed Jul 5 06:12:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B176DA3090; Wed, 5 Jul 2017 06:12:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37E1C73DD7; Wed, 5 Jul 2017 06:12:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v656CLbn035779; Wed, 5 Jul 2017 06:12:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v656CLKP035778; Wed, 5 Jul 2017 06:12:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201707050612.v656CLKP035778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 5 Jul 2017 06:12:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320665 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 320665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 06:12:22 -0000 Author: delphij Date: Wed Jul 5 06:12:21 2017 New Revision: 320665 URL: https://svnweb.freebsd.org/changeset/base/320665 Log: In open_binary_fd: when using buffer size for strl* and snprintf, always use >= instead of > to avoid truncation. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D11474 MFC after: 3 days Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Jul 5 05:50:36 2017 (r320664) +++ head/libexec/rtld-elf/rtld.c Wed Jul 5 06:12:21 2017 (r320665) @@ -5300,14 +5300,14 @@ open_binary_fd(const char *argv0, bool search_in_path) fd = -1; errno = ENOENT; while ((pe = strsep(&pathenv, ":")) != NULL) { - if (strlcpy(binpath, pe, sizeof(binpath)) > + if (strlcpy(binpath, pe, sizeof(binpath)) >= sizeof(binpath)) continue; if (binpath[0] != '\0' && - strlcat(binpath, "/", sizeof(binpath)) > + strlcat(binpath, "/", sizeof(binpath)) >= sizeof(binpath)) continue; - if (strlcat(binpath, argv0, sizeof(binpath)) > + if (strlcat(binpath, argv0, sizeof(binpath)) >= sizeof(binpath)) continue; fd = open(binpath, O_RDONLY | O_CLOEXEC | O_VERIFY); From owner-svn-src-head@freebsd.org Wed Jul 5 09:27:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA32ADA62F0; Wed, 5 Jul 2017 09:27:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD2D778FC1; Wed, 5 Jul 2017 09:27:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v659RILg014744; Wed, 5 Jul 2017 09:27:18 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v659RIKm014742; Wed, 5 Jul 2017 09:27:18 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707050927.v659RIKm014742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 5 Jul 2017 09:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320668 - in head/sys/arm: arm conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: arm conf X-SVN-Commit-Revision: 320668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 09:27:20 -0000 Author: andrew Date: Wed Jul 5 09:27:18 2017 New Revision: 320668 URL: https://svnweb.freebsd.org/changeset/base/320668 Log: Require the ARM Generic Timer driver is built for MULTIDELAY on 32bit arm. As this driver is also used for DELAY on arm64 we need to keep the existing DELAY code for it to use. Modified: head/sys/arm/arm/generic_timer.c head/sys/arm/conf/EXYNOS5.common Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Wed Jul 5 06:32:53 2017 (r320667) +++ head/sys/arm/arm/generic_timer.c Wed Jul 5 09:27:18 2017 (r320668) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef MULTIDELAY +#if defined(__arm__) #include /* For arm_set_delay */ #endif @@ -72,6 +72,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#if defined(__arm__) && !defined(MULTIDELAY) +#error The generic timer requires MULTIDELAY on 32bit arm +#endif + #define GT_CTRL_ENABLE (1 << 0) #define GT_CTRL_INT_MASK (1 << 1) #define GT_CTRL_INT_STAT (1 << 2) @@ -427,7 +431,7 @@ arm_tmr_attach(device_t dev) sc->et.et_priv = sc; et_register(&sc->et); -#ifdef MULTIDELAY +#if defined(__arm__) arm_set_delay(arm_tmr_do_delay, sc); #endif @@ -505,7 +509,7 @@ arm_tmr_do_delay(int usec, void *arg) } } -#ifndef MULTIDELAY +#if defined(__aarch64__) void DELAY(int usec) { Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Wed Jul 5 06:32:53 2017 (r320667) +++ head/sys/arm/conf/EXYNOS5.common Wed Jul 5 09:27:18 2017 (r320668) @@ -23,6 +23,7 @@ makeoptions WERROR="-Werror" include "std.armv6" options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC +options MULTIDELAY options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols From owner-svn-src-head@freebsd.org Wed Jul 5 10:29:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DC32DA79D0; Wed, 5 Jul 2017 10:29:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25C607B3E0; Wed, 5 Jul 2017 10:29:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65AT6Li040280; Wed, 5 Jul 2017 10:29:06 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65AT5WI040276; Wed, 5 Jul 2017 10:29:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707051029.v65AT5WI040276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 5 Jul 2017 10:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320669 - in head/sys/arm: arm conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: arm conf X-SVN-Commit-Revision: 320669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 10:29:07 -0000 Author: andrew Date: Wed Jul 5 10:29:05 2017 New Revision: 320669 URL: https://svnweb.freebsd.org/changeset/base/320669 Log: Make MULTIDELAY a requirement in the MPCore Timer driver when using PLATFORM. This will help with removing the MULTIDELAY option, enabling it when PLATFORM is enabled. Modified: head/sys/arm/arm/mpcore_timer.c head/sys/arm/conf/PANDABOARD head/sys/arm/conf/VYBRID head/sys/arm/conf/ZEDBOARD Modified: head/sys/arm/arm/mpcore_timer.c ============================================================================== --- head/sys/arm/arm/mpcore_timer.c Wed Jul 5 09:27:18 2017 (r320668) +++ head/sys/arm/arm/mpcore_timer.c Wed Jul 5 10:29:05 2017 (r320669) @@ -71,6 +71,10 @@ __FBSDID("$FreeBSD$"); #include +#if defined(PLATFORM) && !defined(MULTIDELAY) +#error The MPCore Timer driver requires MULTIDELAY when building with PLATFORM +#endif + /* Private (per-CPU) timer register map */ #define PRV_TIMER_LOAD 0x0000 #define PRV_TIMER_COUNT 0x0004 Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Wed Jul 5 09:27:18 2017 (r320668) +++ head/sys/arm/conf/PANDABOARD Wed Jul 5 10:29:05 2017 (r320669) @@ -34,6 +34,7 @@ makeoptions MODULES_EXTRA=dtb/omap4 options SCHED_ULE # ULE scheduler options PLATFORM +options MULTIDELAY options SMP # Enable multiple cores # NFS root from boopt/dhcp Modified: head/sys/arm/conf/VYBRID ============================================================================== --- head/sys/arm/conf/VYBRID Wed Jul 5 09:27:18 2017 (r320668) +++ head/sys/arm/conf/VYBRID Wed Jul 5 10:29:05 2017 (r320669) @@ -26,6 +26,7 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options PLATFORM # Platform based SoC +options MULTIDELAY #options NANDFS # NAND Filesystem #options SMP # Enable multiple cores Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Wed Jul 5 09:27:18 2017 (r320668) +++ head/sys/arm/conf/ZEDBOARD Wed Jul 5 10:29:05 2017 (r320669) @@ -28,6 +28,7 @@ makeoptions MODULES_EXTRA="dtb/zynq" options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC +options MULTIDELAY #options NFSSD # Network Filesystem Server options SMP # Enable multiple cores From owner-svn-src-head@freebsd.org Wed Jul 5 10:37:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1240DA7CB3; Wed, 5 Jul 2017 10:37:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 758E57BA02; Wed, 5 Jul 2017 10:37:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65Abbfd044375; Wed, 5 Jul 2017 10:37:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65AbbY1044371; Wed, 5 Jul 2017 10:37:37 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707051037.v65AbbY1044371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 5 Jul 2017 10:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320670 - in head: etc/root share/skel X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: etc/root share/skel X-SVN-Commit-Revision: 320670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 10:37:38 -0000 Author: trasz Date: Wed Jul 5 10:37:37 2017 New Revision: 320670 URL: https://svnweb.freebsd.org/changeset/base/320670 Log: Run "resizewin -z" from the default shell profile files. This makes the terminal work properly out of the box when logging over a serial line, which is quite important for the user experience on boards like Raspberry Pi. It doesn't affect cases where the terminal size is already non-zero, such as SSH or vt(4) sessions. Note that this doesn't handle a scenario pointed out by rgrimes@: when the terminal is resized after login, the terminal size won't get updated even after logging out and back in. Reviewed by: imp Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10642 Modified: head/etc/root/dot.login head/etc/root/dot.profile head/share/skel/dot.login head/share/skel/dot.profile Modified: head/etc/root/dot.login ============================================================================== --- head/etc/root/dot.login Wed Jul 5 10:29:05 2017 (r320669) +++ head/etc/root/dot.login Wed Jul 5 10:37:37 2017 (r320670) @@ -5,5 +5,8 @@ # see also csh(1), environ(7). # +# Query terminal size; useful for serial lines. +if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z + # Uncomment to display a random cookie each login: # if ( -x /usr/bin/fortune ) /usr/bin/fortune -s Modified: head/etc/root/dot.profile ============================================================================== --- head/etc/root/dot.profile Wed Jul 5 10:29:05 2017 (r320669) +++ head/etc/root/dot.profile Wed Jul 5 10:37:37 2017 (r320670) @@ -8,3 +8,5 @@ TERM=${TERM:-xterm} export TERM PAGER=more export PAGER + +if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi Modified: head/share/skel/dot.login ============================================================================== --- head/share/skel/dot.login Wed Jul 5 10:29:05 2017 (r320669) +++ head/share/skel/dot.login Wed Jul 5 10:37:37 2017 (r320670) @@ -5,4 +5,5 @@ # see also csh(1), environ(7). # +if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z if ( -x /usr/bin/fortune ) /usr/bin/fortune freebsd-tips Modified: head/share/skel/dot.profile ============================================================================== --- head/share/skel/dot.profile Wed Jul 5 10:29:05 2017 (r320669) +++ head/share/skel/dot.profile Wed Jul 5 10:37:37 2017 (r320670) @@ -21,4 +21,7 @@ PAGER=more; export PAGER # set ENV to a file invoked each time sh is started for interactive use. ENV=$HOME/.shrc; export ENV +# Query terminal size; useful for serial lines. +if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi + if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi From owner-svn-src-head@freebsd.org Wed Jul 5 10:43:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54D36DA7FC3; Wed, 5 Jul 2017 10:43:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 216057BF5D; Wed, 5 Jul 2017 10:43:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65AhR1A048416; Wed, 5 Jul 2017 10:43:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65AhRvf048415; Wed, 5 Jul 2017 10:43:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707051043.v65AhRvf048415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 5 Jul 2017 10:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320671 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 320671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 10:43:28 -0000 Author: trasz Date: Wed Jul 5 10:43:27 2017 New Revision: 320671 URL: https://svnweb.freebsd.org/changeset/base/320671 Log: Use more canonical .Dt for vt(4). MFC after: 2 weeks Modified: head/share/man/man4/vt.4 Modified: head/share/man/man4/vt.4 ============================================================================== --- head/share/man/man4/vt.4 Wed Jul 5 10:37:37 2017 (r320670) +++ head/share/man/man4/vt.4 Wed Jul 5 10:43:27 2017 (r320671) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd July 19, 2016 -.Dt "VIRTUAL TERMINALS" 4 +.Dt "VT" 4 .Os .Sh NAME .Nm vt From owner-svn-src-head@freebsd.org Wed Jul 5 11:58:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80486DA9474; Wed, 5 Jul 2017 11:58:59 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670051.outbound.protection.outlook.com [40.107.67.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A4097DE16; Wed, 5 Jul 2017 11:58:58 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0190.CANPRD01.PROD.OUTLOOK.COM (10.165.218.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Wed, 5 Jul 2017 11:58:56 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.1220.018; Wed, 5 Jul 2017 11:58:56 +0000 From: Rick Macklem To: =?utf-8?B?T2xpdmllciBDb2NoYXJkLUxhYmLDqQ==?= , "Rick Macklem" CC: svn-src-head , svn-src-all , src-committers , Konstantin Belousov Subject: Re: svn commit: r320659 - head/usr.sbin/nfsuserd Thread-Topic: svn commit: r320659 - head/usr.sbin/nfsuserd Thread-Index: AQHS9UyHHAWNv+gQ5UqU3c5HIHwLlqJEr28AgABwDTo= Date: Wed, 5 Jul 2017 11:58:56 +0000 Message-ID: References: <201707042220.v64MKU77039219@repo.freebsd.org> <20170705050637.GT1935@kib.kiev.ua>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTXPR01MB0190; 7:tSBAv6TAQ8hDY2cjcg3xVVA6/XNQrwMLAVl03QT0VBOfsYJkhEZmv3raphaZsx41bhP290I3wDQ1aQu7M0rH55//v0cZ/MIGS1Xs2836nOi5P2paMHJo2YkAnk1vjFgpM/A37Y0B9zGTeRfUCf+Mf01w5j8zx813Nzj+ccc37foEOdduvHiS3Qfj0Tk6Vnf7MXUW60MGdDJfv+0sqzxrUh5MOEYJLuYB6jItZV7jrW+FE7oZnkd7C9GjuQ4xwZTg+yd26wWoB8q0DftOsl53IKaL5OXvk/VnJKzaSAkfEuF01atmDxf7vjR8wH7j9cOLtoN1VY8vLoMxIq7f31MLjpqAN0bC7gLZxanPfOO5iHHBUny+sUODISOgDqvK2iSNbH3R2e4+fLUm54OtPDJ8xavTJrylmPxLgg13nu0+o7Dp8egaKVgDwL1k3bQ9wEE6zhRpxy0EAiX4IG4Vh1/eq9TlIEb62sBp3exReB/NSmQrgferaht8ZHKLnfGfbJTgzrTf191a7rKLL7PnRkEp+VGvv451YdR5rLRUH+ZasWVy9k3HOLYyErrw40ZceiuckuP8HKiSGP+BIh1iRIyRlidRf3VWnH3v99wsiwrDCocyJgXeSzktwNaVvqpFzzQdhUVISOuLKhHjsm5D5lvCdHxi8eCAYfHzZbe0ojpkRbS295YPT3FHyA8Pm12lAoCYOhJqg67EPWSeoCMl3tHU+tIPGhSbX+1Q89X8U0l2RShKOUiLm7eOR6sxG6Mqcvcs+9gA5NIxhCRxlnG4EA2Sz7gAfl8OBC59v3REZMDM5nY= x-ms-office365-filtering-correlation-id: 33818621-2cbf-4fa2-a7dd-08d4c39d36ee x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:YTXPR01MB0190; x-ms-traffictypediagnostic: YTXPR01MB0190: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(236129657087228)(265634631926514); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201702281529075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:YTXPR01MB0190; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:YTXPR01MB0190; x-forefront-prvs: 0359162B6D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39410400002)(39840400002)(39450400003)(39400400002)(24454002)(377454003)(53936002)(14454004)(39060400002)(6246003)(38730400002)(305945005)(102836003)(9686003)(53546010)(74316002)(2900100001)(7696004)(25786009)(81166006)(8676002)(6436002)(4326008)(55016002)(54906002)(6506006)(2950100002)(76176999)(189998001)(5660300001)(50986999)(33656002)(2906002)(8936002)(74482002)(478600001)(77096006)(3660700001)(229853002)(86362001)(3280700002)(54356999); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0190; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2017 11:58:56.3803 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0190 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 11:58:59 -0000 V2VsbCwgSSBrbm93IG5vdGhpbmcgYWJvdXQgamFpbHMsIHNvIEkgY2FuJ3QgYW5zd2VyIGVpdGhl ciBvZiB0aGVzZS4NCkFsbCBJIGNhbiB0ZWxsIHlvdSBpcyB0aGF0IDEyNy4wLjAuMSBubyBsb25n ZXIgd29ya3MgYXMgbG9jYWxob3N0IHdoZW4NCmphaWxzIGFyZSBydW4gZm9yIHNvbWUgc2l0dWF0 aW9ucyB3aGljaCBJIGRvbid0IHVuZGVyc3RhbmQgYW5kIHRoYXQNCmJyZWFrcyB0aGUgbmZzdXNl cmQgdXBjYWxsLiAoU29tZXRoaW5nIGFib3V0IDEyNy4wLjAuMSBiZWluZyByZXBsYWNlZA0KYnkg dGhlIGZpcnN0IElQIyBmb3IgdGhlIG5ldCBpbnRlcmZhY2Ugd2hlbiBqYWlscyBhcmUgcnVubmlu Zz8pDQoNClRoZSBwYXRjaGVzIGluIFBSIzIwNTE5MyBjaGFuZ2UgbmZzdXNlcmQgdG8gdXNlIGEg bG9jYWwgc29ja2V0LA0Kd2hpY2ggZml4ZXMgdGhpcyBwcm9ibGVtLiBIb3dldmVyLCB0aGUgb3Jp Z2luYWwgcG9zdGVyIG9mIHRoZSBQUiBoYWQNCmhhbmdzIHdoZW4gdXNpbmcgdGhlIHBhdGNoZXMg d2hpY2ggd2FzIG5ldmVyIHJlc29sdmVkIChJIGNvdWxkbid0DQpyZXByb2R1Y2UgdGhlIGhhbmcp Lg0KLS0+IEl0IGhhcyBiZWVuIGEgY291cGxlIG9mIHllYXJzLCBidXQgSSByZWNhbGwgdGhhdCB0 aGUgaGFuZyB3YXMgaW4gdGhlDQogICAgICB1bml4IHNvY2tldCBjb2RlLCBzbyBJIGJlbGlldmVk IGl0IHdhcyBjYXVzZWQgYnkgaGF2aW5nIG11dGlwbGUNCiAgICAgIHByb2Nlc3NlcyB0cnlpbmcg dG8gdXNlIHRoZSBzb2NrZXQgY29uY3VycmVudGx5Lg0KICAgICAgLS0+IFRoZSBvcmlnaW5hbCBw b3N0ZXIgbmV2ZXIgY29uZmlybWVkIGlmIHVzaW5nIGEgc2luZ2xlIGRhZW1vbg0KICAgICAgICAg ICAgYXZvaWRlZCB0aGUgaGFuZy4NCkFzIHN1Y2ggSSBhbSBzdHVjayB1bnRpbCBzb21lb25lIGNh biB0ZXN0IHRoZSBwYXRjaGVzPyByaWNrDQpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fDQpGcm9tOiBPbGl2aWVyIENvY2hhcmQtTGFiYsOpIDxvbGl2aWVyQGZyZWVic2Qu b3JnPg0KU2VudDogV2VkbmVzZGF5LCBKdWx5IDUsIDIwMTcgMToxMDoyOCBBTQ0KVG86IFJpY2sg TWFja2xlbQ0KQ2M6IHN2bi1zcmMtaGVhZDsgc3ZuLXNyYy1hbGw7IHNyYy1jb21taXR0ZXJzOyBL b25zdGFudGluIEJlbG91c292DQpTdWJqZWN0OiBSZTogc3ZuIGNvbW1pdDogcjMyMDY1OSAtIGhl YWQvdXNyLnNiaW4vbmZzdXNlcmQNCg0KT24gV2VkLCBKdWwgNSwgMjAxNyBhdCA3OjA2IEFNLCBL b25zdGFudGluIEJlbG91c292IDxrb3N0aWtiZWxAZ21haWwuY29tPG1haWx0bzprb3N0aWtiZWxA Z21haWwuY29tPj4gd3JvdGU6DQpPbiBUdWUsIEp1bCAwNCwgMjAxNyBhdCAxMDoyMDozMFBNICsw MDAwLCBSaWNrIE1hY2tsZW0gd3JvdGU6DQo+ICtTaW5jZSB0aGUga2VybmVsIGNvbW11bmljYXRl cyB3aXRoIHRoZQ0KPiArLk5tDQo+ICtkYWVtb24gdmlhIGFuIHVwY2FsbCB0aGF0IHVzZXMgdGhl IElQIGFkZHJlc3MgMTI3LjAuMC4xLCBpdCBkb2VzIG5vdCB3b3JrIGNvcnJlY3RseSB3aGVuDQo+ ICsuWHIgamFpbCA4DQo+ICthcmUgdXNlZCBhbmQgY2FuIGNyYXNoIHRoZSBzeXN0ZW0uDQoNCkRv ZXMgaXQgaW5kZWVkIGJyZWFrIHdoZW4gamFpbHMgYXJlIHVzZWQsIG9yIGRvZXMgaXQgYnJlYWsg d2hlbiB0aGUgZGFlbW9uDQppcyBzdGFydGVkIGluIGEgamFpbCA/DQoNCg0K4oCLQW5kIGRvZXMg aXQgYnJlYWsgb24gYSBqYWlsL3ZuZXQgdG9vID8NCg0K From owner-svn-src-head@freebsd.org Wed Jul 5 12:46:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D488DAAA16; Wed, 5 Jul 2017 12:46:30 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE8037F734; Wed, 5 Jul 2017 12:46:29 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [78.138.80.135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id v65CkPOt021122; Wed, 5 Jul 2017 14:46:25 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id D4A48CD5; Wed, 5 Jul 2017 14:46:24 +0200 (CEST) Message-ID: <595CDFA0.6030507@omnilan.de> Date: Wed, 05 Jul 2017 14:46:24 +0200 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Rick Macklem CC: =?UTF-8?B?T2xpdmllciBDb2NoYXJkLUxhYmLDqQ==?= , Rick Macklem , svn-src-head , Konstantin Belousov , svn-src-all , src-committers Subject: Re: svn commit: r320659 - head/usr.sbin/nfsuserd References: <201707042220.v64MKU77039219@repo.freebsd.org> <20170705050637.GT1935@kib.kiev.ua>, In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: ACL 129 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Wed, 05 Jul 2017 14:46:25 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 12:46:30 -0000 Bezüglich Rick Macklem's Nachricht vom 05.07.2017 13:58 (localtime): > Well, I know nothing about jails, so I can't answer either of these. > All I can tell you is that 127.0.0.1 no longer works as localhost when > jails are run for some situations which I don't understand and that > breaks the nfsuserd upcall. (Something about 127.0.0.1 being replaced > by the first IP# for the net interface when jails are running?) This was changed with https://svnweb.freebsd.org/changeset/base/316313 (and https://svnweb.freebsd.org/changeset/base/316328 for IPv6) if I don't confuse things here. Haven't had time to read/test NFS+jail, but it was on my "things to solve" list and the mentioned two commits made me thinking there's already a solution. -harry From owner-svn-src-head@freebsd.org Wed Jul 5 13:08:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C79B3DAADCD; Wed, 5 Jul 2017 13:08:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A311380051; Wed, 5 Jul 2017 13:08:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65D8744006333; Wed, 5 Jul 2017 13:08:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65D87Rf006329; Wed, 5 Jul 2017 13:08:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707051308.v65D87Rf006329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 5 Jul 2017 13:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320672 - in head: etc/root share/skel X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: etc/root share/skel X-SVN-Commit-Revision: 320672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 13:08:08 -0000 Author: trasz Date: Wed Jul 5 13:08:07 2017 New Revision: 320672 URL: https://svnweb.freebsd.org/changeset/base/320672 Log: Cosmetic tweaks to the default shell rc files, mostly comments. MFC after: 2 weeks Modified: head/etc/root/dot.login head/etc/root/dot.profile head/share/skel/dot.login head/share/skel/dot.profile Modified: head/etc/root/dot.login ============================================================================== --- head/etc/root/dot.login Wed Jul 5 10:43:27 2017 (r320671) +++ head/etc/root/dot.login Wed Jul 5 13:08:07 2017 (r320672) @@ -2,11 +2,11 @@ # # .login - csh login script, read by login shell, after `.cshrc' at login. # -# see also csh(1), environ(7). +# See also csh(1), environ(7). # # Query terminal size; useful for serial lines. if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z -# Uncomment to display a random cookie each login: +# Uncomment to display a random cookie on each login. # if ( -x /usr/bin/fortune ) /usr/bin/fortune -s Modified: head/etc/root/dot.profile ============================================================================== --- head/etc/root/dot.profile Wed Jul 5 10:43:27 2017 (r320671) +++ head/etc/root/dot.profile Wed Jul 5 13:08:07 2017 (r320672) @@ -9,4 +9,8 @@ export TERM PAGER=more export PAGER +# Query terminal size; useful for serial lines. if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi + +# Uncomment to display a random cookie on each login. +# if [ -x /usr/bin/resizewin ] ; then /usr/bin/fortune -s ; fi Modified: head/share/skel/dot.login ============================================================================== --- head/share/skel/dot.login Wed Jul 5 10:43:27 2017 (r320671) +++ head/share/skel/dot.login Wed Jul 5 13:08:07 2017 (r320672) @@ -2,8 +2,11 @@ # # .login - csh login script, read by login shell, after `.cshrc' at login. # -# see also csh(1), environ(7). +# See also csh(1), environ(7). # +# Query terminal size; useful for serial lines. if ( -x /usr/bin/resizewin ) /usr/bin/resizewin -z + +# Display a random cookie on each login. if ( -x /usr/bin/fortune ) /usr/bin/fortune freebsd-tips Modified: head/share/skel/dot.profile ============================================================================== --- head/share/skel/dot.profile Wed Jul 5 10:43:27 2017 (r320671) +++ head/share/skel/dot.profile Wed Jul 5 13:08:07 2017 (r320672) @@ -24,4 +24,5 @@ ENV=$HOME/.shrc; export ENV # Query terminal size; useful for serial lines. if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi +# Display a random cookie on each login. if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi From owner-svn-src-head@freebsd.org Wed Jul 5 13:13:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EB35DAB045; Wed, 5 Jul 2017 13:13:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BD5380522; Wed, 5 Jul 2017 13:13:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65DDc5K010590; Wed, 5 Jul 2017 13:13:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65DDcvh010589; Wed, 5 Jul 2017 13:13:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707051313.v65DDcvh010589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 5 Jul 2017 13:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320673 - head/lib/libgcc_s X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libgcc_s X-SVN-Commit-Revision: 320673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 13:13:39 -0000 Author: emaste Date: Wed Jul 5 13:13:38 2017 New Revision: 320673 URL: https://svnweb.freebsd.org/changeset/base/320673 Log: Sort entries in libgcc_s Version.map Modified: head/lib/libgcc_s/Version.map Modified: head/lib/libgcc_s/Version.map ============================================================================== --- head/lib/libgcc_s/Version.map Wed Jul 5 13:08:07 2017 (r320672) +++ head/lib/libgcc_s/Version.map Wed Jul 5 13:13:38 2017 (r320673) @@ -48,9 +48,9 @@ global: __moddi3; __modti3; __muldi3; + __multi3; __mulvdi3; __mulvsi3; - __multi3; __negdi2; __negti2; __negvdi2; From owner-svn-src-head@freebsd.org Wed Jul 5 13:37:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF063DAB64A; Wed, 5 Jul 2017 13:37:28 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A85A880E4C; Wed, 5 Jul 2017 13:37:28 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65DbRI3019180; Wed, 5 Jul 2017 13:37:27 GMT (envelope-from robak@FreeBSD.org) Received: (from robak@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65DbRD2019178; Wed, 5 Jul 2017 13:37:27 GMT (envelope-from robak@FreeBSD.org) Message-Id: <201707051337.v65DbRD2019178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: robak set sender to robak@FreeBSD.org using -f From: Bartek Rutkowski Date: Wed, 5 Jul 2017 13:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: robak X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 320674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 13:37:28 -0000 Author: robak (ports committer) Date: Wed Jul 5 13:37:27 2017 New Revision: 320674 URL: https://svnweb.freebsd.org/changeset/base/320674 Log: Add option to bsdinstall to disable insecure console, update stack guard option This patch adds new bsdinstall option to hardening section that allows users to change this behaviour to secure one and updates stack guard option so it would set the value of relevant sysctl to 512 (2MB) Submitted by: Bartek Rutkowski Reviewed by: adrian, bapt, emaste Approved by: bapt, emaste MFC after: 1 day Sponsored by: Pixeware LTD Differential Revision: https://reviews.freebsd.org/D9700 Modified: head/usr.sbin/bsdinstall/scripts/config head/usr.sbin/bsdinstall/scripts/hardening Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Wed Jul 5 13:13:38 2017 (r320673) +++ head/usr.sbin/bsdinstall/scripts/config Wed Jul 5 13:37:27 2017 (r320674) @@ -35,6 +35,11 @@ rm $BSDINSTALL_TMPETC/rc.conf.* cat $BSDINSTALL_CHROOT/etc/sysctl.conf $BSDINSTALL_TMPETC/sysctl.conf.* >> $BSDINSTALL_TMPETC/sysctl.conf rm $BSDINSTALL_TMPETC/sysctl.conf.* +if [ -f $BSDINSTALL_TMPTEC/ttys.hardening ]; then + cat $BSDINSTALL_TMPTEC/ttys.hardening > $BSDINSTALL_TMPTEC/ttys + rm $BSDINSTALL_TMPTEC/ttys.hardening +fi + cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf Modified: head/usr.sbin/bsdinstall/scripts/hardening ============================================================================== --- head/usr.sbin/bsdinstall/scripts/hardening Wed Jul 5 13:13:38 2017 (r320673) +++ head/usr.sbin/bsdinstall/scripts/hardening Wed Jul 5 13:37:27 2017 (r320674) @@ -42,10 +42,11 @@ FEATURES=$( dialog --backtitle "FreeBSD Installer" \ "3 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ "4 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ "5 random_pid" "Randomize the PID of newly created processes" ${random_pid:-off} \ - "6 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ + "6 stack_guard" "Set stack guard buffer size to 2MB" ${stack_guard:-off} \ "7 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ "8 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ "9 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ + "9 secure_console" "Enable console password prompt" ${secure_console:-off} \ 2>&1 1>&3 ) exec 3>&- @@ -69,7 +70,7 @@ for feature in $FEATURES; do echo kern.randompid=$(jot -r 1 9999) >> $BSDINSTALL_TMPETC/sysctl.conf.hardening fi if [ "$feature" = "stack_guard" ]; then - echo security.bsd.stack_guard_page=1 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + echo security.bsd.stack_guard_page=512 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening fi if [ "$feature" = "clear_tmp" ]; then echo 'clear_tmp_enable="YES"' >> $BSDINSTALL_TMPETC/rc.conf.hardening @@ -79,6 +80,9 @@ for feature in $FEATURES; do fi if [ "$feature" = "disable_sendmail" ]; then echo 'sendmail_enable="NONE"' >> $BSDINSTALL_TMPETC/rc.conf.hardening + fi + if [ "$feature" = "secure_console" ]; then + sed "s/unknown off secure/unknown off insecure/g" $BSDINSTALL_CHROOT/etc/ttys > $BSDINSTALL_TMPETC/ttys.hardening fi done From owner-svn-src-head@freebsd.org Wed Jul 5 15:23:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98F97DAD805; Wed, 5 Jul 2017 15:23:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D2678475E; Wed, 5 Jul 2017 15:23:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65FNUJA064023; Wed, 5 Jul 2017 15:23:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65FNUI9064021; Wed, 5 Jul 2017 15:23:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201707051523.v65FNUI9064021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 5 Jul 2017 15:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320675 - in head/gnu/usr.bin/gdb: gdb kgdb X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/gnu/usr.bin/gdb: gdb kgdb X-SVN-Commit-Revision: 320675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 15:23:31 -0000 Author: jhb Date: Wed Jul 5 15:23:30 2017 New Revision: 320675 URL: https://svnweb.freebsd.org/changeset/base/320675 Log: Add deprecation notices for gdb and kgdb. Even though gdb and kgdb may not be removed for 12.0 on some architectures, the notice is unconditional as these tools will likely be removed at some point in the future when adequate replacements are available (gdb in ports or lldb in base). Reviewed by: emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D11477 Modified: head/gnu/usr.bin/gdb/gdb/gdb.1 head/gnu/usr.bin/gdb/kgdb/kgdb.1 Modified: head/gnu/usr.bin/gdb/gdb/gdb.1 ============================================================================== --- head/gnu/usr.bin/gdb/gdb/gdb.1 Wed Jul 5 13:37:27 2017 (r320674) +++ head/gnu/usr.bin/gdb/gdb/gdb.1 Wed Jul 5 15:23:30 2017 (r320675) @@ -44,6 +44,11 @@ gdb \- The GNU Debugger .IR core \||\| procID\c \&\|]\&\|] .ad b +.SH DEPRECATION NOTICE +This version of gdb is deprecated and will be removed from future versions +of the FreeBSD base system. +A newer version of gdb is available from ports or packages +(devel/gdb). .SH DESCRIPTION The purpose of a debugger such as GDB is to allow you to see what is going on ``inside'' another program while it executes\(em\&or what another Modified: head/gnu/usr.bin/gdb/kgdb/kgdb.1 ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/kgdb.1 Wed Jul 5 13:37:27 2017 (r320674) +++ head/gnu/usr.bin/gdb/kgdb/kgdb.1 Wed Jul 5 15:23:30 2017 (r320675) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 11, 2006 +.Dd July 5, 2017 .Dt KGDB 1 .Os .Sh NAME @@ -40,6 +40,16 @@ .Op Fl d Ar crashdir .Op Fl c Ar core | Fl n Ar dumpnr | Fl r Ar device .Op Ar kernel Op Ar core +.Sh DEPRECATION NOTICE +This version of +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +A newer version of +.Nm +is available from ports or packages +(devel/gdb). .Sh DESCRIPTION The .Nm From owner-svn-src-head@freebsd.org Wed Jul 5 15:42:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A422DADC9E; Wed, 5 Jul 2017 15:42:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 367276E3; Wed, 5 Jul 2017 15:42:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65FgXpN072515; Wed, 5 Jul 2017 15:42:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65FgXpD072514; Wed, 5 Jul 2017 15:42:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707051542.v65FgXpD072514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 5 Jul 2017 15:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320678 - head/etc/root X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/etc/root X-SVN-Commit-Revision: 320678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 15:42:34 -0000 Author: trasz Date: Wed Jul 5 15:42:33 2017 New Revision: 320678 URL: https://svnweb.freebsd.org/changeset/base/320678 Log: Fix typo introduced in r320672 - check for existence of the right file. Reported by: rpokala@ MFC after: 2 weeks Modified: head/etc/root/dot.profile Modified: head/etc/root/dot.profile ============================================================================== --- head/etc/root/dot.profile Wed Jul 5 15:34:06 2017 (r320677) +++ head/etc/root/dot.profile Wed Jul 5 15:42:33 2017 (r320678) @@ -13,4 +13,4 @@ export PAGER if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi # Uncomment to display a random cookie on each login. -# if [ -x /usr/bin/resizewin ] ; then /usr/bin/fortune -s ; fi +# if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune -s ; fi From owner-svn-src-head@freebsd.org Wed Jul 5 15:43:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDE55DADD0C; Wed, 5 Jul 2017 15:43:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44F898DC; Wed, 5 Jul 2017 15:43:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v65Fhljm051607 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 5 Jul 2017 18:43:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v65Fhljm051607 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v65FhlJs051606; Wed, 5 Jul 2017 18:43:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 5 Jul 2017 18:43:47 +0300 From: Konstantin Belousov To: Rick Macklem Cc: Olivier Cochard-Labb?? , Rick Macklem , svn-src-head , svn-src-all , src-committers Subject: Re: svn commit: r320659 - head/usr.sbin/nfsuserd Message-ID: <20170705154346.GW1935@kib.kiev.ua> References: <201707042220.v64MKU77039219@repo.freebsd.org> <20170705050637.GT1935@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 15:43:52 -0000 On Wed, Jul 05, 2017 at 11:58:56AM +0000, Rick Macklem wrote: > Well, I know nothing about jails, so I can't answer either of these. > All I can tell you is that 127.0.0.1 no longer works as localhost when > jails are run for some situations which I don't understand and that > breaks the nfsuserd upcall. (Something about 127.0.0.1 being replaced > by the first IP# for the net interface when jails are running?) When a jailed process uses a local address, the address is effectively replaced by the jailed address, as you noted above. > > The patches in PR#205193 change nfsuserd to use a local socket, > which fixes this problem. However, the original poster of the PR had > hangs when using the patches which was never resolved (I couldn't > reproduce the hang). So consider the issue not reproducable and test it in wild by committing to HEAD. Ability to do such kind of experiment is one of the reasons why do we have HEAD and separate release branches. > --> It has been a couple of years, but I recall that the hang was in the > unix socket code, so I believed it was caused by having mutiple > processes trying to use the socket concurrently. > --> The original poster never confirmed if using a single daemon > avoided the hang. > As such I am stuck until someone can test the patches? rick From owner-svn-src-head@freebsd.org Wed Jul 5 16:10:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F7F1D877A3; Wed, 5 Jul 2017 16:10:31 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DE7D1AE9; Wed, 5 Jul 2017 16:10:31 +0000 (UTC) (envelope-from jtl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65GAULZ081089; Wed, 5 Jul 2017 16:10:30 GMT (envelope-from jtl@FreeBSD.org) Received: (from jtl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65GAUfY081088; Wed, 5 Jul 2017 16:10:30 GMT (envelope-from jtl@FreeBSD.org) Message-Id: <201707051610.v65GAUfY081088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jtl set sender to jtl@FreeBSD.org using -f From: "Jonathan T. Looney" Date: Wed, 5 Jul 2017 16:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320682 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: jtl X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 320682 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 16:10:31 -0000 Author: jtl Date: Wed Jul 5 16:10:30 2017 New Revision: 320682 URL: https://svnweb.freebsd.org/changeset/base/320682 Log: Don't overpromote values when calculating len in tcp_output(). sbavail() returns u_int and sendwin is a uint32_t. Therefore, min() (which operates on two u_int values) is able to correctly calculate the minimum of these two arguments. Reported by: rrs MFC after: 1 week Sponsored by: Netflix Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Wed Jul 5 15:59:52 2017 (r320681) +++ head/sys/netinet/tcp_output.c Wed Jul 5 16:10:30 2017 (r320682) @@ -386,7 +386,7 @@ after_sack_rexmit: */ if (sack_rxmit == 0) { if (sack_bytes_rxmt == 0) - len = ((int32_t)ulmin(sbavail(&so->so_snd), sendwin) - + len = ((int32_t)min(sbavail(&so->so_snd), sendwin) - off); else { int32_t cwin; From owner-svn-src-head@freebsd.org Wed Jul 5 16:20:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F39C1D87B30; Wed, 5 Jul 2017 16:20:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD18820E6; Wed, 5 Jul 2017 16:20:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65GKNeW085411; Wed, 5 Jul 2017 16:20:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65GKMmN085409; Wed, 5 Jul 2017 16:20:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707051620.v65GKMmN085409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 5 Jul 2017 16:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320683 - head/usr.sbin/diskinfo X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/usr.sbin/diskinfo X-SVN-Commit-Revision: 320683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 16:20:24 -0000 Author: mav Date: Wed Jul 5 16:20:22 2017 New Revision: 320683 URL: https://svnweb.freebsd.org/changeset/base/320683 Log: Add naive benchmark for SSDs in ZFS SLOG role. ZFS SLOGs have very specific access pattern with many cache flushes, which none of benchmarks I know can simulate. Since SSD vendors rarely specify cache flush time, this measurement can be useful to explain why some ZFS pools are slower then expected. This test writes data chunks of different size followed by cache flush, alike to what ZFS SLOG does, and measures average time. To illustrate, here is result for 6 years old SATA Intel 710 Series SSD: Synchronous random writes: 0.5 kbytes: 138.3 usec/IO = 3.5 Mbytes/s 1 kbytes: 137.7 usec/IO = 7.1 Mbytes/s 2 kbytes: 151.1 usec/IO = 12.9 Mbytes/s 4 kbytes: 158.2 usec/IO = 24.7 Mbytes/s 8 kbytes: 175.6 usec/IO = 44.5 Mbytes/s 16 kbytes: 210.1 usec/IO = 74.4 Mbytes/s 32 kbytes: 274.2 usec/IO = 114.0 Mbytes/s 64 kbytes: 416.5 usec/IO = 150.1 Mbytes/s 128 kbytes: 776.6 usec/IO = 161.0 Mbytes/s 256 kbytes: 1503.1 usec/IO = 166.3 Mbytes/s 512 kbytes: 2968.7 usec/IO = 168.4 Mbytes/s 1024 kbytes: 5866.8 usec/IO = 170.5 Mbytes/s 2048 kbytes: 11696.6 usec/IO = 171.0 Mbytes/s 4096 kbytes: 23329.6 usec/IO = 171.5 Mbytes/s 8192 kbytes: 46779.5 usec/IO = 171.0 Mbytes/s , and much newer and supposedly much faster NVMe Samsung 950 PRO SSD: Synchronous random writes: 0.5 kbytes: 2092.9 usec/IO = 0.2 Mbytes/s 1 kbytes: 2013.1 usec/IO = 0.5 Mbytes/s 2 kbytes: 2014.8 usec/IO = 1.0 Mbytes/s 4 kbytes: 2090.7 usec/IO = 1.9 Mbytes/s 8 kbytes: 2044.5 usec/IO = 3.8 Mbytes/s 16 kbytes: 2084.8 usec/IO = 7.5 Mbytes/s 32 kbytes: 2137.1 usec/IO = 14.6 Mbytes/s 64 kbytes: 2173.4 usec/IO = 28.8 Mbytes/s 128 kbytes: 2923.9 usec/IO = 42.8 Mbytes/s 256 kbytes: 3085.3 usec/IO = 81.0 Mbytes/s 512 kbytes: 3112.2 usec/IO = 160.7 Mbytes/s 1024 kbytes: 2430.6 usec/IO = 411.4 Mbytes/s 2048 kbytes: 3788.9 usec/IO = 527.9 Mbytes/s 4096 kbytes: 6198.0 usec/IO = 645.4 Mbytes/s 8192 kbytes: 10764.9 usec/IO = 743.2 Mbytes/s While the first one obviously has maximal throughput limitations, the second one has so high cache flush latency (about 2 millisecond), that it makes one almost useless in SLOG role, despite of its good throughput numbers. Power loss protection is out of scope of this test, but I suspect it can be related. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/diskinfo/diskinfo.8 head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.8 ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.8 Wed Jul 5 16:10:30 2017 (r320682) +++ head/usr.sbin/diskinfo/diskinfo.8 Wed Jul 5 16:20:22 2017 (r320683) @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Poul-Henning Kamp +.\" Copyright (c) 2017 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -28,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2017 +.Dd July 4, 2017 .Dt DISKINFO 8 .Os .Sh NAME @@ -36,7 +37,7 @@ .Nd get information about disk device .Sh SYNOPSIS .Nm -.Op Fl citv +.Op Fl citSvw .Ar disk ... .Nm .Op Fl p @@ -64,9 +65,16 @@ This is a string that identifies the physical path to storage enclosure. .It Fl s Return the disk serial number +.It Fl S +Perform synchronous random write test (ZFS SLOG test), +measuring time required to write data blocks of different size and +flush disk cache. +Blocks of more then 128KB are written with multiple parallel operations. .It Fl t Perform a simple and rather naive benchmark of the disks seek and transfer performance. +.It Fl w +Allow disruptive write tests. .El .Pp If given no arguments, the output will be a single line per specified device Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Wed Jul 5 16:10:30 2017 (r320682) +++ head/usr.sbin/diskinfo/diskinfo.c Wed Jul 5 16:20:22 2017 (r320683) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2003 Poul-Henning Kamp * Copyright (c) 2015 Spectra Logic Corporation + * Copyright (c) 2017 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -51,15 +53,16 @@ static void usage(void) { - fprintf(stderr, "usage: diskinfo [-citv] disk ...\n"); + fprintf(stderr, "usage: diskinfo [-cipsStvw] disk ...\n"); exit (1); } -static int opt_c, opt_i, opt_p, opt_s, opt_t, opt_v; +static int opt_c, opt_i, opt_p, opt_s, opt_S, opt_t, opt_v, opt_w; static void speeddisk(int fd, off_t mediasize, u_int sectorsize); static void commandtime(int fd, off_t mediasize, u_int sectorsize); static void iopsbench(int fd, off_t mediasize, u_int sectorsize); +static void slogbench(int fd, int isreg, off_t mediasize, u_int sectorsize); static int zonecheck(int fd, uint32_t *zone_mode, char *zone_str, size_t zone_str_len); @@ -71,10 +74,10 @@ main(int argc, char **argv) char buf[BUFSIZ], ident[DISK_IDENT_SIZE], physpath[MAXPATHLEN]; char zone_desc[64]; off_t mediasize, stripesize, stripeoffset; - u_int sectorsize, fwsectors, fwheads, zoned = 0; + u_int sectorsize, fwsectors, fwheads, zoned = 0, isreg; uint32_t zone_mode; - while ((ch = getopt(argc, argv, "cipstv")) != -1) { + while ((ch = getopt(argc, argv, "cipsStvw")) != -1) { switch (ch) { case 'c': opt_c = 1; @@ -90,6 +93,10 @@ main(int argc, char **argv) case 's': opt_s = 1; break; + case 'S': + opt_S = 1; + opt_v = 1; + break; case 't': opt_t = 1; opt_v = 1; @@ -97,6 +104,9 @@ main(int argc, char **argv) case 'v': opt_v = 1; break; + case 'w': + opt_w = 1; + break; default: usage(); } @@ -112,8 +122,13 @@ main(int argc, char **argv) usage(); } + if (opt_S && !opt_w) { + warnx("-S require also -w"); + usage(); + } + for (i = 0; i < argc; i++) { - fd = open(argv[i], O_RDONLY | O_DIRECT); + fd = open(argv[i], (opt_w ? O_RDWR : O_RDONLY) | O_DIRECT); if (fd < 0 && errno == ENOENT && *argv[i] != '/') { snprintf(buf, BUFSIZ, "%s%s", _PATH_DEV, argv[i]); fd = open(buf, O_RDONLY); @@ -128,7 +143,8 @@ main(int argc, char **argv) exitval = 1; goto out; } - if (S_ISREG(sb.st_mode)) { + isreg = S_ISREG(sb.st_mode); + if (isreg) { mediasize = sb.st_size; sectorsize = S_BLKSIZE; fwsectors = 0; @@ -228,16 +244,18 @@ main(int argc, char **argv) speeddisk(fd, mediasize, sectorsize); if (opt_i) iopsbench(fd, mediasize, sectorsize); + if (opt_S) + slogbench(fd, isreg, mediasize, sectorsize); out: close(fd); } exit (exitval); } +#define MAXTX (8*1024*1024) +#define MEGATX (1024*1024) +static uint8_t buf[MAXTX]; -static char sector[65536]; -static char mega[1024 * 1024]; - static void rdsect(int fd, off_t blockno, u_int sectorsize) { @@ -245,7 +263,7 @@ rdsect(int fd, off_t blockno, u_int sectorsize) if (lseek(fd, (off_t)blockno * sectorsize, SEEK_SET) == -1) err(1, "lseek"); - error = read(fd, sector, sectorsize); + error = read(fd, buf, sectorsize); if (error == -1) err(1, "read"); if (error != (int)sectorsize) @@ -257,10 +275,10 @@ rdmega(int fd) { int error; - error = read(fd, mega, sizeof(mega)); + error = read(fd, buf, MEGATX); if (error == -1) err(1, "read"); - if (error != sizeof(mega)) + if (error != MEGATX) errx(1, "disk too small for test."); } @@ -321,6 +339,16 @@ TI(double count) } static void +TS(u_int size, int count) +{ + double dt; + + dt = delta_t(); + printf("%8.1f usec/IO = %8.1f Mbytes/s\n", + dt * 1000000.0 / count, size * count / dt / (1024 * 1024)); +} + +static void speeddisk(int fd, off_t mediasize, u_int sectorsize) { int bulk, i; @@ -555,6 +583,69 @@ iopsbench(int fd, off_t mediasize, u_int sectorsize) iops(fd, mediasize, 128 * 1024); printf("\n"); +} + +#define MAXIO (128*1024) +#define MAXIOS (MAXTX / MAXIO) + +static void +parwrite(int fd, size_t size, off_t off) +{ + struct aiocb aios[MAXIOS]; + off_t o; + size_t s; + int n, error; + struct aiocb *aiop; + + for (n = 0, o = 0; size > MAXIO; n++, size -= s, o += s) { + s = (size >= MAXIO) ? MAXIO : size; + aiop = &aios[n]; + bzero(aiop, sizeof(*aiop)); + aiop->aio_buf = &buf[o]; + aiop->aio_fildes = fd; + aiop->aio_offset = off + o; + aiop->aio_nbytes = s; + error = aio_write(aiop); + if (error != 0) + err(EX_IOERR, "AIO write submit error"); + } + error = pwrite(fd, &buf[o], size, off + o); + if (error < 0) + err(EX_IOERR, "Sync write error"); + for (; n > 0; n--) { + error = aio_waitcomplete(&aiop, NULL); + if (error < 0) + err(EX_IOERR, "AIO write wait error"); + } +} + +static void +slogbench(int fd, int isreg, off_t mediasize, u_int sectorsize) +{ + off_t off; + u_int size; + int error, n, N; + + printf("Synchronous random writes:\n"); + for (size = sectorsize; size <= MAXTX; size *= 2) { + printf("\t%4.4g kbytes: ", (double)size / 1024); + N = 0; + T0(); + do { + for (n = 0; n < 250; n++) { + off = random() % (mediasize / size); + parwrite(fd, size, off * size); + if (isreg) + error = fsync(fd); + else + error = ioctl(fd, DIOCGFLUSH); + if (error < 0) + err(EX_IOERR, "Flush error"); + } + N += 250; + } while (delta_t() < 1.0); + TS(size, N); + } } static int From owner-svn-src-head@freebsd.org Wed Jul 5 16:55:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CFFED8A92D; Wed, 5 Jul 2017 16:55:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4193820; Wed, 5 Jul 2017 16:55:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65GtjbT001824; Wed, 5 Jul 2017 16:55:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65Gtj0J001823; Wed, 5 Jul 2017 16:55:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707051655.v65Gtj0J001823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 5 Jul 2017 16:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320686 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 320686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 16:55:46 -0000 Author: gjb Date: Wed Jul 5 16:55:45 2017 New Revision: 320686 URL: https://svnweb.freebsd.org/changeset/base/320686 Log: Fix the ftp-stage target for RPI3 images by loosening the constraints on the TARGET and TARGET_ARCH variables. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Wed Jul 5 16:39:29 2017 (r320685) +++ head/release/Makefile.mirrors Wed Jul 5 16:55:45 2017 (r320686) @@ -21,7 +21,7 @@ STAGE_TARGETS?= iso-images-stage .endif .if (defined(EMBEDDED_TARGET) && !empty(EMBEDDED_TARGET)) || (defined(EMBEDDEDBUILD) && !empty(EMBEDDEDBUILD)) -. if ${TARGET} == "arm" || ${EMBEDDED_TARGET} == "arm" +. if ${TARGET:Marm*} != "" || ${EMBEDDED_TARGET:Marm*} != "" EMBEDDED= 1 . endif .endif @@ -57,7 +57,7 @@ TLD?= ${FTPDIR}/releases .endif .if defined(EMBEDDED) && !empty(EMBEDDED) -. if ${TARGET} == "arm" && ${TARGET_ARCH} == "armv6" +. if ${TARGET:Marm*} != "" && (${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "aarch64") . if !defined(BOARDNAME) && empty(BOARDNAME) BOARDNAME:= ${KERNCONF} . else From owner-svn-src-head@freebsd.org Wed Jul 5 17:15:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AA06D8B3E5; Wed, 5 Jul 2017 17:15:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA7C64402; Wed, 5 Jul 2017 17:15:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v65HFFOW071991 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 5 Jul 2017 20:15:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v65HFFOW071991 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v65HFFC4071990; Wed, 5 Jul 2017 20:15:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 5 Jul 2017 20:15:15 +0300 From: Konstantin Belousov To: Bartek Rutkowski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170705171515.GY1935@kib.kiev.ua> References: <201707051337.v65DbRD2019178@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201707051337.v65DbRD2019178@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 17:15:21 -0000 On Wed, Jul 05, 2017 at 01:37:27PM +0000, Bartek Rutkowski wrote: > This patch adds new bsdinstall option to hardening section that allows users > to change this behaviour to secure one and updates stack guard option so it > would set the value of relevant sysctl to 512 (2MB) What ?! From owner-svn-src-head@freebsd.org Wed Jul 5 17:27:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD351D8B88E; Wed, 5 Jul 2017 17:27:04 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6404E64B41; Wed, 5 Jul 2017 17:27:04 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65HR3ZR014273; Wed, 5 Jul 2017 17:27:03 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65HR37w014268; Wed, 5 Jul 2017 17:27:03 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201707051727.v65HR37w014268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 5 Jul 2017 17:27:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320688 - in head/sys: conf dev/ixgbe modules/ix modules/ixv X-SVN-Group: head X-SVN-Commit-Author: erj X-SVN-Commit-Paths: in head/sys: conf dev/ixgbe modules/ix modules/ixv X-SVN-Commit-Revision: 320688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 17:27:04 -0000 Author: erj Date: Wed Jul 5 17:27:03 2017 New Revision: 320688 URL: https://svnweb.freebsd.org/changeset/base/320688 Log: ixgbe(4): Update HEAD (p3) to 3.2.12-k Includes: - Support for X550EM devices. - Support for Bypass adapters. - Flow Director code moved to separate files - SR-IOV code moved to separate files - Netmap code moved to separate files Differential Revision: https://reviews.freebsd.org/D11232 Submitted by: Jeb Cramer Reviewed by: erj@ Tested by: Jeff Pieper Sponsored by: Intel Corporation Added: head/sys/dev/ixgbe/if_bypass.c (contents, props changed) head/sys/dev/ixgbe/if_fdir.c (contents, props changed) head/sys/dev/ixgbe/if_sriov.c (contents, props changed) head/sys/dev/ixgbe/ixgbe_bypass.h (contents, props changed) head/sys/dev/ixgbe/ixgbe_fdir.h (contents, props changed) head/sys/dev/ixgbe/ixgbe_features.h (contents, props changed) head/sys/dev/ixgbe/ixgbe_netmap.c (contents, props changed) head/sys/dev/ixgbe/ixgbe_netmap.h (contents, props changed) head/sys/dev/ixgbe/ixgbe_rss.h (contents, props changed) head/sys/dev/ixgbe/ixgbe_sriov.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_82598.c head/sys/dev/ixgbe/ixgbe_82598.h head/sys/dev/ixgbe/ixgbe_82599.c head/sys/dev/ixgbe/ixgbe_82599.h head/sys/dev/ixgbe/ixgbe_api.c head/sys/dev/ixgbe/ixgbe_api.h head/sys/dev/ixgbe/ixgbe_common.c head/sys/dev/ixgbe/ixgbe_common.h head/sys/dev/ixgbe/ixgbe_dcb.c head/sys/dev/ixgbe/ixgbe_dcb.h head/sys/dev/ixgbe/ixgbe_dcb_82598.c head/sys/dev/ixgbe/ixgbe_dcb_82598.h head/sys/dev/ixgbe/ixgbe_dcb_82599.c head/sys/dev/ixgbe/ixgbe_dcb_82599.h head/sys/dev/ixgbe/ixgbe_mbx.c head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_osdep.c head/sys/dev/ixgbe/ixgbe_osdep.h head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_phy.h head/sys/dev/ixgbe/ixgbe_type.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/dev/ixgbe/ixgbe_vf.h head/sys/dev/ixgbe/ixgbe_x540.c head/sys/dev/ixgbe/ixgbe_x540.h head/sys/dev/ixgbe/ixgbe_x550.c head/sys/dev/ixgbe/ixgbe_x550.h head/sys/modules/ix/Makefile head/sys/modules/ixv/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jul 5 17:06:29 2017 (r320687) +++ head/sys/conf/files Wed Jul 5 17:27:03 2017 (r320688) @@ -2130,6 +2130,14 @@ dev/ixgbe/if_ix.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/if_ixv.c optional ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" +dev/ixgbe/if_bypass.c optional ix inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_netmap.c optional ix inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/if_fdir.c optional ix inet | ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/if_sriov.c optional ix inet | ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ix_txrx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_osdep.c optional ix inet | ixv inet \ Added: head/sys/dev/ixgbe/if_bypass.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ixgbe/if_bypass.c Wed Jul 5 17:27:03 2017 (r320688) @@ -0,0 +1,808 @@ +/****************************************************************************** + + Copyright (c) 2001-2017, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ +/*$FreeBSD$*/ + + +#include "ixgbe.h" + +/************************************************************************ + * ixgbe_bypass_mutex_enter + * + * Mutex support for the bypass feature. Using a dual lock + * to facilitate a privileged access to the watchdog update + * over other threads. + ************************************************************************/ +static void +ixgbe_bypass_mutex_enter(struct adapter *adapter) +{ + while (atomic_cmpset_int(&adapter->bypass.low, 0, 1) == 0) + usec_delay(3000); + while (atomic_cmpset_int(&adapter->bypass.high, 0, 1) == 0) + usec_delay(3000); + return; +} /* ixgbe_bypass_mutex_enter */ + +/************************************************************************ + * ixgbe_bypass_mutex_clear + ************************************************************************/ +static void +ixgbe_bypass_mutex_clear(struct adapter *adapter) +{ + while (atomic_cmpset_int(&adapter->bypass.high, 1, 0) == 0) + usec_delay(6000); + while (atomic_cmpset_int(&adapter->bypass.low, 1, 0) == 0) + usec_delay(6000); + return; +} /* ixgbe_bypass_mutex_clear */ + +/************************************************************************ + * ixgbe_bypass_wd_mutex_enter + * + * Watchdog entry is allowed to simply grab the high priority + ************************************************************************/ +static void +ixgbe_bypass_wd_mutex_enter(struct adapter *adapter) +{ + while (atomic_cmpset_int(&adapter->bypass.high, 0, 1) == 0) + usec_delay(3000); + return; +} /* ixgbe_bypass_wd_mutex_enter */ + +/************************************************************************ + * ixgbe_bypass_wd_mutex_clear + ************************************************************************/ +static void +ixgbe_bypass_wd_mutex_clear(struct adapter *adapter) +{ + while (atomic_cmpset_int(&adapter->bypass.high, 1, 0) == 0) + usec_delay(6000); + return; +} /* ixgbe_bypass_wd_mutex_clear */ + +/************************************************************************ + * ixgbe_get_bypass_time + ************************************************************************/ +static void +ixgbe_get_bypass_time(u32 *year, u32 *sec) +{ + struct timespec current; + + *year = 1970; /* time starts at 01/01/1970 */ + nanotime(¤t); + *sec = current.tv_sec; + + while(*sec > SEC_THIS_YEAR(*year)) { + *sec -= SEC_THIS_YEAR(*year); + (*year)++; + } +} /* ixgbe_get_bypass_time */ + +/************************************************************************ + * ixgbe_bp_version + * + * Display the feature version + ************************************************************************/ +static int +ixgbe_bp_version(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int version = 0; + u32 cmd; + + ixgbe_bypass_mutex_enter(adapter); + cmd = BYPASS_PAGE_CTL2 | BYPASS_WE; + cmd |= (BYPASS_EEPROM_VER_ADD << BYPASS_CTL2_OFFSET_SHIFT) & + BYPASS_CTL2_OFFSET_M; + if ((error = hw->mac.ops.bypass_rw(hw, cmd, &version) != 0)) + goto err; + msec_delay(100); + cmd &= ~BYPASS_WE; + if ((error = hw->mac.ops.bypass_rw(hw, cmd, &version) != 0)) + goto err; + ixgbe_bypass_mutex_clear(adapter); + version &= BYPASS_CTL2_DATA_M; + error = sysctl_handle_int(oidp, &version, 0, req); + return (error); +err: + ixgbe_bypass_mutex_clear(adapter); + return (error); + +} /* ixgbe_bp_version */ + +/************************************************************************ + * ixgbe_bp_set_state + * + * Show/Set the Bypass State: + * 1 = NORMAL + * 2 = BYPASS + * 3 = ISOLATE + * + * With no argument the state is displayed, + * passing a value will set it. + ************************************************************************/ +static int +ixgbe_bp_set_state(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int state = 0; + + /* Get the current state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, + BYPASS_PAGE_CTL0, &state); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + state = (state >> BYPASS_STATUS_OFF_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &state, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check new state */ + switch (state) { + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + ixgbe_bypass_mutex_enter(adapter); + if ((error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_MODE_OFF_M, state) != 0)) + goto out; + /* Set AUTO back on so FW can receive events */ + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_MODE_OFF_M, BYPASS_AUTO); +out: + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_set_state */ + +/************************************************************************ + * The following routines control the operational + * "rules" of the feature, what behavior will occur + * when particular events occur. + * Values are: + * 0 - no change for the event (NOP) + * 1 - go to Normal operation + * 2 - go to Bypass operation + * 3 - go to Isolate operation + * Calling the entry with no argument just displays + * the current rule setting. + ************************************************************************/ + +/************************************************************************ + * ixgbe_bp_timeout + * + * This is to set the Rule for the watchdog, + * not the actual watchdog timeout value. + ************************************************************************/ +static int +ixgbe_bp_timeout(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int timeout = 0; + + /* Get the current value */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &timeout); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + timeout = (timeout >> BYPASS_WDTIMEOUT_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &timeout, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (timeout) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_WDTIMEOUT_M, timeout << BYPASS_WDTIMEOUT_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_timeout */ + +/************************************************************************ + * ixgbe_bp_main_on + ************************************************************************/ +static int +ixgbe_bp_main_on(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int main_on = 0; + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_on); + main_on = (main_on >> BYPASS_MAIN_ON_SHIFT) & 0x3; + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + + error = sysctl_handle_int(oidp, &main_on, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (main_on) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_MAIN_ON_M, main_on << BYPASS_MAIN_ON_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_main_on */ + +/************************************************************************ + * ixgbe_bp_main_off + ************************************************************************/ +static int +ixgbe_bp_main_off(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int main_off = 0; + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &main_off); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + main_off = (main_off >> BYPASS_MAIN_OFF_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &main_off, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (main_off) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_MAIN_OFF_M, main_off << BYPASS_MAIN_OFF_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_main_off */ + +/************************************************************************ + * ixgbe_bp_aux_on + ************************************************************************/ +static int +ixgbe_bp_aux_on(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int aux_on = 0; + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_on); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + aux_on = (aux_on >> BYPASS_AUX_ON_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &aux_on, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (aux_on) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_AUX_ON_M, aux_on << BYPASS_AUX_ON_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_aux_on */ + +/************************************************************************ + * ixgbe_bp_aux_off + ************************************************************************/ +static int +ixgbe_bp_aux_off(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error = 0; + static int aux_off = 0; + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &aux_off); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + aux_off = (aux_off >> BYPASS_AUX_OFF_SHIFT) & 0x3; + + error = sysctl_handle_int(oidp, &aux_off, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Sanity check on the setting */ + switch (aux_off) { + case BYPASS_NOP: + case BYPASS_NORM: + case BYPASS_BYPASS: + case BYPASS_ISOLATE: + break; + default: + return (EINVAL); + } + + /* Set the new state */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, + BYPASS_AUX_OFF_M, aux_off << BYPASS_AUX_OFF_SHIFT); + ixgbe_bypass_mutex_clear(adapter); + usec_delay(6000); + return (error); +} /* ixgbe_bp_aux_off */ + +/************************************************************************ + * ixgbe_bp_wd_set - Set the Watchdog timer value + * + * Valid settings are: + * - 0 will disable the watchdog + * - 1, 2, 3, 4, 8, 16, 32 + * - anything else is invalid and will be ignored + ************************************************************************/ +static int +ixgbe_bp_wd_set(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + int error, tmp; + static int timeout = 0; + u32 mask, arg = BYPASS_PAGE_CTL0; + + /* Get the current hardware value */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL0, &tmp); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (error); + /* + * If armed keep the displayed value, + * else change the display to zero. + */ + if ((tmp & (0x1 << BYPASS_WDT_ENABLE_SHIFT)) == 0) + timeout = 0; + + error = sysctl_handle_int(oidp, &timeout, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + mask = BYPASS_WDT_ENABLE_M; + switch (timeout) { + case 0: /* disables the timer */ + break; + case 1: + arg = BYPASS_WDT_1_5 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 2: + arg = BYPASS_WDT_2 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 3: + arg = BYPASS_WDT_3 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 4: + arg = BYPASS_WDT_4 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 8: + arg = BYPASS_WDT_8 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 16: + arg = BYPASS_WDT_16 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + case 32: + arg = BYPASS_WDT_32 << BYPASS_WDT_TIME_SHIFT; + arg |= 0x1 << BYPASS_WDT_ENABLE_SHIFT; + mask |= BYPASS_WDT_VALUE_M; + break; + default: + return (EINVAL); + } + /* Set the new watchdog */ + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL0, mask, arg); + ixgbe_bypass_mutex_clear(adapter); + + return (error); +} /* ixgbe_bp_wd_set */ + +/************************************************************************ + * ixgbe_bp_wd_reset - Reset the Watchdog timer + * + * To activate this it must be called with any argument. + ************************************************************************/ +static int +ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + u32 sec, year; + int cmd, count = 0, error = 0; + int reset_wd = 0; + + error = sysctl_handle_int(oidp, &reset_wd, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + cmd = BYPASS_PAGE_CTL1 | BYPASS_WE | BYPASS_CTL1_WDT_PET; + + /* Resync the FW time while writing to CTL1 anyway */ + ixgbe_get_bypass_time(&year, &sec); + + cmd |= (sec & BYPASS_CTL1_TIME_M) | BYPASS_CTL1_VALID; + cmd |= BYPASS_CTL1_OFFTRST; + + ixgbe_bypass_wd_mutex_enter(adapter); + error = hw->mac.ops.bypass_rw(hw, cmd, &reset_wd); + + /* Read until it matches what we wrote, or we time out */ + do { + if (count++ > 10) { + error = IXGBE_BYPASS_FW_WRITE_FAILURE; + break; + } + if (hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL1, &reset_wd)) { + error = IXGBE_ERR_INVALID_ARGUMENT; + break; + } + } while (!hw->mac.ops.bypass_valid_rd(cmd, reset_wd)); + + reset_wd = 0; + ixgbe_bypass_wd_mutex_clear(adapter); + return (error); +} /* ixgbe_bp_wd_reset */ + +/************************************************************************ + * ixgbe_bp_log - Display the bypass log + * + * You must pass a non-zero arg to sysctl + ************************************************************************/ +static int +ixgbe_bp_log(SYSCTL_HANDLER_ARGS) +{ + struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; + u32 cmd, base, head; + u32 log_off, count = 0; + static int status = 0; + u8 data; + struct ixgbe_bypass_eeprom eeprom[BYPASS_MAX_LOGS]; + int i, error = 0; + + error = sysctl_handle_int(oidp, &status, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + /* Keep the log display single-threaded */ + while (atomic_cmpset_int(&adapter->bypass.log, 0, 1) == 0) + usec_delay(3000); + + ixgbe_bypass_mutex_enter(adapter); + + /* Find Current head of the log eeprom offset */ + cmd = BYPASS_PAGE_CTL2 | BYPASS_WE; + cmd |= (0x1 << BYPASS_CTL2_OFFSET_SHIFT) & BYPASS_CTL2_OFFSET_M; + error = hw->mac.ops.bypass_rw(hw, cmd, &status); + if (error) + goto unlock_err; + + /* wait for the write to stick */ + msec_delay(100); + + /* Now read the results */ + cmd &= ~BYPASS_WE; + error = hw->mac.ops.bypass_rw(hw, cmd, &status); + if (error) + goto unlock_err; + + ixgbe_bypass_mutex_clear(adapter); + + base = status & BYPASS_CTL2_DATA_M; + head = (status & BYPASS_CTL2_HEAD_M) >> BYPASS_CTL2_HEAD_SHIFT; + + /* address of the first log */ + log_off = base + (head * 5); + + /* extract all the log entries */ + while (count < BYPASS_MAX_LOGS) { + eeprom[count].logs = 0; + eeprom[count].actions = 0; + + /* Log 5 bytes store in on u32 and a u8 */ + for (i = 0; i < 4; i++) { + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rd_eep(hw, log_off + i, + &data); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (-EINVAL); + eeprom[count].logs += data << (8 * i); + } + + ixgbe_bypass_mutex_enter(adapter); + error = hw->mac.ops.bypass_rd_eep(hw, + log_off + i, &eeprom[count].actions); + ixgbe_bypass_mutex_clear(adapter); + if (error) + return (-EINVAL); + + /* Quit if not a unread log */ + if (!(eeprom[count].logs & BYPASS_LOG_CLEAR_M)) + break; + /* + * Log looks good so store the address where it's + * Unread Log bit is so we can clear it after safely + * pulling out all of the log data. + */ + eeprom[count].clear_off = log_off; + + count++; + head = head ? head - 1 : BYPASS_MAX_LOGS; + log_off = base + (head * 5); + } + + /* reverse order (oldest first) for output */ + while (count--) { + int year; + u32 mon, days, hours, min, sec; + u32 time = eeprom[count].logs & BYPASS_LOG_TIME_M; + u32 event = (eeprom[count].logs & BYPASS_LOG_EVENT_M) >> + BYPASS_LOG_EVENT_SHIFT; + u8 action = eeprom[count].actions & BYPASS_LOG_ACTION_M; + u16 day_mon[2][13] = { + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, + {0, 31, 59, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} + }; + char *event_str[] = {"unknown", "main on", "aux on", + "main off", "aux off", "WDT", "user" }; + char *action_str[] = {"ignore", "normal", "bypass", "isolate",}; + + /* verify vaild data 1 - 6 */ + if (event < BYPASS_EVENT_MAIN_ON || event > BYPASS_EVENT_USR) + event = 0; + + /* + * time is in sec's this year, so convert to something + * printable. + */ + ixgbe_get_bypass_time(&year, &sec); + days = time / SEC_PER_DAY; + for (i = 11; days < day_mon[LEAP_YR(year)][i]; i--) + continue; + mon = i + 1; /* display month as 1-12 */ + time -= (day_mon[LEAP_YR(year)][i] * SEC_PER_DAY); + days = (time / SEC_PER_DAY) + 1; /* first day is 1 */ + time %= SEC_PER_DAY; + hours = time / (60 * 60); + time %= (60 * 60); + min = time / 60; + sec = time % 60; + device_printf(adapter->dev, + "UT %02d/%02d %02d:%02d:%02d %8.8s -> %7.7s\n", + mon, days, hours, min, sec, event_str[event], + action_str[action]); + cmd = BYPASS_PAGE_CTL2 | BYPASS_WE | BYPASS_CTL2_RW; + cmd |= ((eeprom[count].clear_off + 3) + << BYPASS_CTL2_OFFSET_SHIFT) & BYPASS_CTL2_OFFSET_M; + cmd |= ((eeprom[count].logs & ~BYPASS_LOG_CLEAR_M) >> 24); + + ixgbe_bypass_mutex_enter(adapter); + + error = hw->mac.ops.bypass_rw(hw, cmd, &status); + + /* wait for the write to stick */ + msec_delay(100); + + ixgbe_bypass_mutex_clear(adapter); + + if (error) + return (-EINVAL); + } + + status = 0; /* reset */ + /* Another log command can now run */ + while (atomic_cmpset_int(&adapter->bypass.log, 1, 0) == 0) + usec_delay(3000); + return(error); + +unlock_err: + ixgbe_bypass_mutex_clear(adapter); + status = 0; /* reset */ + while (atomic_cmpset_int(&adapter->bypass.log, 1, 0) == 0) + usec_delay(3000); + return (-EINVAL); +} /* ixgbe_bp_log */ + +/************************************************************************ + * ixgbe_bypass_init - Set up infrastructure for the bypass feature + * + * Do time and sysctl initialization here. This feature is + * only enabled for the first port of a bypass adapter. + ************************************************************************/ +void +ixgbe_bypass_init(struct adapter *adapter) +{ + struct ixgbe_hw *hw = &adapter->hw; + device_t dev = adapter->dev; + struct sysctl_oid *bp_node; + struct sysctl_oid_list *bp_list; + u32 mask, value, sec, year; + + if (!(adapter->feat_cap & IXGBE_FEATURE_BYPASS)) + return; + + /* First set up time for the hardware */ + ixgbe_get_bypass_time(&year, &sec); + + mask = BYPASS_CTL1_TIME_M + | BYPASS_CTL1_VALID_M + | BYPASS_CTL1_OFFTRST_M; + + value = (sec & BYPASS_CTL1_TIME_M) + | BYPASS_CTL1_VALID + | BYPASS_CTL1_OFFTRST; + + ixgbe_bypass_mutex_enter(adapter); + hw->mac.ops.bypass_set(hw, BYPASS_PAGE_CTL1, mask, value); + ixgbe_bypass_mutex_clear(adapter); + + /* Now set up the SYSCTL infrastructure */ + + /* + * The log routine is kept separate from the other + * children so a general display command like: + * `sysctl dev.ix.0.bypass` will not show the log. + */ + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "bypass_log", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_log, "I", "Bypass Log"); + + /* All other setting are hung from the 'bypass' node */ + bp_node = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "bypass", CTLFLAG_RD, NULL, "Bypass"); + + bp_list = SYSCTL_CHILDREN(bp_node); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD, + adapter, 0, ixgbe_bp_version, "I", "Bypass Version"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_set_state, "I", "Bypass State"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_timeout, "I", "Bypass Timeout"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_main_on, "I", "Bypass Main On"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_main_off, "I", "Bypass Main Off"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_aux_on, "I", "Bypass Aux On"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_aux_off, "I", "Bypass Aux Off"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW, + adapter, 0, ixgbe_bp_wd_set, "I", "Set BP Watchdog"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, + OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR, + adapter, 0, ixgbe_bp_wd_reset, "S", "Bypass WD Reset"); + + adapter->feat_en |= IXGBE_FEATURE_BYPASS; + + return; +} /* ixgbe_bypass_init */ + Added: head/sys/dev/ixgbe/if_fdir.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ixgbe/if_fdir.c Wed Jul 5 17:27:03 2017 (r320688) @@ -0,0 +1,160 @@ +/****************************************************************************** + + Copyright (c) 2001-2017, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +******************************************************************************/ +/*$FreeBSD$*/ + +#include "ixgbe.h" + +#ifdef IXGBE_FDIR + +void +ixgbe_init_fdir(struct adapter *adapter) +{ + u32 hdrm = 32 << fdir_pballoc; + + if (!(adapter->feat_en & IXGBE_FEATURE_FDIR)) + return; + + adapter->hw.mac.ops.setup_rxpba(&adapter->hw, 0, hdrm, + PBA_STRATEGY_EQUAL); + ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc); +} /* ixgbe_init_fdir */ + +void +ixgbe_reinit_fdir(void *context, int pending) +{ + struct adapter *adapter = context; + struct ifnet *ifp = adapter->ifp; + + if (!(adapter->feat_en & IXGBE_FEATURE_FDIR)) + return; + if (adapter->fdir_reinit != 1) /* Shouldn't happen */ + return; + ixgbe_reinit_fdir_tables_82599(&adapter->hw); + adapter->fdir_reinit = 0; + /* re-enable flow director interrupts */ + IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_FLOW_DIR); + /* Restart the interface */ + ifp->if_drv_flags |= IFF_DRV_RUNNING; +} /* ixgbe_reinit_fdir */ + +/************************************************************************ + * ixgbe_atr + * + * Parse packet headers so that Flow Director can make + * a hashed filter table entry allowing traffic flows + * to be identified and kept on the same cpu. This + * would be a performance hit, but we only do it at + * IXGBE_FDIR_RATE of packets. + ************************************************************************/ +void +ixgbe_atr(struct tx_ring *txr, struct mbuf *mp) +{ + struct adapter *adapter = txr->adapter; + struct ix_queue *que; + struct ip *ip; + struct tcphdr *th; + struct udphdr *uh; + struct ether_vlan_header *eh; + union ixgbe_atr_hash_dword input = {.dword = 0}; + union ixgbe_atr_hash_dword common = {.dword = 0}; + int ehdrlen, ip_hlen; + u16 etype; + + eh = mtod(mp, struct ether_vlan_header *); + if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { + ehdrlen = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; + etype = eh->evl_proto; + } else { + ehdrlen = ETHER_HDR_LEN; + etype = eh->evl_encap_proto; + } + + /* Only handling IPv4 */ + if (etype != htons(ETHERTYPE_IP)) + return; + + ip = (struct ip *)(mp->m_data + ehdrlen); + ip_hlen = ip->ip_hl << 2; + + /* check if we're UDP or TCP */ + switch (ip->ip_p) { + case IPPROTO_TCP: + th = (struct tcphdr *)((caddr_t)ip + ip_hlen); + /* src and dst are inverted */ + common.port.dst ^= th->th_sport; + common.port.src ^= th->th_dport; + input.formatted.flow_type ^= IXGBE_ATR_FLOW_TYPE_TCPV4; + break; + case IPPROTO_UDP: + uh = (struct udphdr *)((caddr_t)ip + ip_hlen); + /* src and dst are inverted */ + common.port.dst ^= uh->uh_sport; + common.port.src ^= uh->uh_dport; + input.formatted.flow_type ^= IXGBE_ATR_FLOW_TYPE_UDPV4; + break; + default: + return; + } + + input.formatted.vlan_id = htobe16(mp->m_pkthdr.ether_vtag); + if (mp->m_pkthdr.ether_vtag) + common.flex_bytes ^= htons(ETHERTYPE_VLAN); + else + common.flex_bytes ^= etype; + common.ip ^= ip->ip_src.s_addr ^ ip->ip_dst.s_addr; + + que = &adapter->queues[txr->me]; + /* + * This assumes the Rx queue and Tx + * queue are bound to the same CPU + */ + ixgbe_fdir_add_signature_filter_82599(&adapter->hw, + input, common, que->msix); +} /* ixgbe_atr */ + +#else + +/* TASK_INIT needs this function defined regardless if it's enabled */ +void +ixgbe_reinit_fdir(void *context, int pending) +{ + UNREFERENCED_2PARAMETER(context, pending); +} /* ixgbe_reinit_fdir */ + +void +ixgbe_atr(struct tx_ring *txr, struct mbuf *mp) +{ + UNREFERENCED_2PARAMETER(txr, mp); +} /* ixgbe_atr */ + +#endif Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Wed Jul 5 17:06:29 2017 (r320687) +++ head/sys/dev/ixgbe/if_ix.c Wed Jul 5 17:27:03 2017 (r320688) @@ -1,31 +1,31 @@ /****************************************************************************** - Copyright (c) 2001-2015, Intel Corporation + Copyright (c) 2001-2017, Intel Corporation All rights reserved. - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jul 5 17:37:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87645D8BC97; Wed, 5 Jul 2017 17:37:32 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk0-x241.google.com (mail-qk0-x241.google.com [IPv6:2607:f8b0:400d:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E647651A9; Wed, 5 Jul 2017 17:37:32 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qk0-x241.google.com with SMTP id p21so32192202qke.0; Wed, 05 Jul 2017 10:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tgcxfInduShoZIUildLraVCE0rOOmilsQupm8PGTetk=; b=NGfiQgKUySEcDcGEER9EnRNopWQdqVNDJRBSFzfutrC0rHUIpHzqQ0iZuLOpvIavlD N/xY6lmU2Nk5bFHUzRLO+07pT0xINu5uPzIgrQGOs0qdMGNpB13PlTLZvSvb7U4zGWO/ jl92KpkYIkt/A3wiZArI4L/+9Py6je0SVHxgpGTZFDtHjaLVo28XPa55WzoR2tjeJIHd 5dLyIHIyBhhpKqaL/OjmxzGIvoMKUBI8ulkZj3zWGPzMaEQYyagrdAgg7iY/PAicxNtv bTl7YIeugikkbshYdrHhL7Ovb1sKGa6FaFgPPwy9EWEWgDBiflHPOOjPN4F1ELAzgI9d zmyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tgcxfInduShoZIUildLraVCE0rOOmilsQupm8PGTetk=; b=orG44HmFBPbh34mpehDzpmHBZ3HipOejfl7ypkErzMhiIx+eXba7AcVjFIxfsyYOEN rcemvViHD3o3Vu4jSrFBvIHJQ1bWzKbJNTpvnq06q8HJpvppyemOgIqshlgBc5vmDFeS g6sYWfocgDZ/EXrgPXtN3DFWMjbHcn0BoA40XIqasFa793aL6HGWO6FSGZB1HD/s273p XKbE0X0zzkuhwauNa5ux/sBh6CXjp4czg3Wwk+3kbDuekEve32MzEfsAHTDl1AhsL8Os ivsz5EJ8ny4KuUsEJ1H0tckDt1wUEJMc7h7s0gyPkQhBgoUnnscfqUgsDboBOCBIYnW+ AwAw== X-Gm-Message-State: AKS2vOxasbC3nRFyEaHx/BF7Qog3nlRhd0J4FXxF9torjcsLxREtgO59 +/ahNzDgCdhzABsosXU= X-Received: by 10.55.112.66 with SMTP id l63mr56047898qkc.56.1499276251210; Wed, 05 Jul 2017 10:37:31 -0700 (PDT) Received: from mbp-eth.home ([177.53.86.172]) by smtp.gmail.com with ESMTPSA id j7sm9808933qtb.60.2017.07.05.10.37.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 10:37:30 -0700 (PDT) Sender: Renato Botelho Subject: Re: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts To: Bartek Rutkowski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201707051337.v65DbRD2019178@repo.freebsd.org> From: Renato Botelho Message-ID: <4def0b91-f54a-2038-5fe3-9a860f3317dc@FreeBSD.org> Date: Wed, 5 Jul 2017 14:37:27 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201707051337.v65DbRD2019178@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 17:37:32 -0000 On 05/07/17 10:37, Bartek Rutkowski wrote: > Author: robak (ports committer) > Date: Wed Jul 5 13:37:27 2017 > New Revision: 320674 > URL: https://svnweb.freebsd.org/changeset/base/320674 > > Log: > Add option to bsdinstall to disable insecure console, update stack guard option > > This patch adds new bsdinstall option to hardening section that allows users > to change this behaviour to secure one and updates stack guard option so it > would set the value of relevant sysctl to 512 (2MB) > > Submitted by: Bartek Rutkowski > Reviewed by: adrian, bapt, emaste > Approved by: bapt, emaste > MFC after: 1 day > Sponsored by: Pixeware LTD > Differential Revision: https://reviews.freebsd.org/D9700 > > Modified: > head/usr.sbin/bsdinstall/scripts/config > head/usr.sbin/bsdinstall/scripts/hardening > > Modified: head/usr.sbin/bsdinstall/scripts/config > ============================================================================== > --- head/usr.sbin/bsdinstall/scripts/config Wed Jul 5 13:13:38 2017 (r320673) > +++ head/usr.sbin/bsdinstall/scripts/config Wed Jul 5 13:37:27 2017 (r320674) > @@ -35,6 +35,11 @@ rm $BSDINSTALL_TMPETC/rc.conf.* > cat $BSDINSTALL_CHROOT/etc/sysctl.conf $BSDINSTALL_TMPETC/sysctl.conf.* >> $BSDINSTALL_TMPETC/sysctl.conf > rm $BSDINSTALL_TMPETC/sysctl.conf.* > > +if [ -f $BSDINSTALL_TMPTEC/ttys.hardening ]; then > + cat $BSDINSTALL_TMPTEC/ttys.hardening > $BSDINSTALL_TMPTEC/ttys > + rm $BSDINSTALL_TMPTEC/ttys.hardening > +fi > + > cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc > > cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf > > Modified: head/usr.sbin/bsdinstall/scripts/hardening > ============================================================================== > --- head/usr.sbin/bsdinstall/scripts/hardening Wed Jul 5 13:13:38 2017 (r320673) > +++ head/usr.sbin/bsdinstall/scripts/hardening Wed Jul 5 13:37:27 2017 (r320674) > @@ -42,10 +42,11 @@ FEATURES=$( dialog --backtitle "FreeBSD Installer" \ > "3 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ > "4 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ > "5 random_pid" "Randomize the PID of newly created processes" ${random_pid:-off} \ > - "6 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ > + "6 stack_guard" "Set stack guard buffer size to 2MB" ${stack_guard:-off} \ > "7 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ > "8 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ > "9 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ > + "9 secure_console" "Enable console password prompt" ${secure_console:-off} \ There are two options '9' now -- Renato Botelho From owner-svn-src-head@freebsd.org Wed Jul 5 17:39:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C2FBD8BD39; Wed, 5 Jul 2017 17:39:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5935A65307; Wed, 5 Jul 2017 17:39:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65HdHvn018602; Wed, 5 Jul 2017 17:39:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65HdHnt018601; Wed, 5 Jul 2017 17:39:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707051739.v65HdHnt018601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 5 Jul 2017 17:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320690 - head/sys/dev/acpica/Osd X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/acpica/Osd X-SVN-Commit-Revision: 320690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 17:39:18 -0000 Author: markj Date: Wed Jul 5 17:39:17 2017 New Revision: 320690 URL: https://svnweb.freebsd.org/changeset/base/320690 Log: Defer ACPI taskqueue creation to SI_SUB_KICK_SCHEDULER. This addresses a deadlock during boot when EARLY_AP_STARTUP is configured: a taskqueue thread may call pause() with an ACPI mutex held, and thread0 may block on this mutex before configuring the eventtimer. In this case the taskqueue thread will sleep forever waiting for its callout to fire. PR: 220277 Submitted by: jhb MFC after: 3 days Modified: head/sys/dev/acpica/Osd/OsdSchedule.c Modified: head/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdSchedule.c Wed Jul 5 17:29:07 2017 (r320689) +++ head/sys/dev/acpica/Osd/OsdSchedule.c Wed Jul 5 17:39:17 2017 (r320690) @@ -128,7 +128,7 @@ acpi_taskq_init(void *arg) acpi_taskq_started = 1; } -SYSINIT(acpi_taskq, SI_SUB_CONFIGURE, SI_ORDER_SECOND, acpi_taskq_init, NULL); +SYSINIT(acpi_taskq, SI_SUB_KICK_SCHEDULER, SI_ORDER_ANY, acpi_taskq_init, NULL); /* * Bounce through this wrapper function since ACPI-CA doesn't understand From owner-svn-src-head@freebsd.org Wed Jul 5 19:24:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61D74D8F07D; Wed, 5 Jul 2017 19:24:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16F1968704; Wed, 5 Jul 2017 19:24:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65JOdqE063729; Wed, 5 Jul 2017 19:24:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65JOdTv063728; Wed, 5 Jul 2017 19:24:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201707051924.v65JOdTv063728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 5 Jul 2017 19:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320692 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 320692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 19:24:40 -0000 Author: bdrewery Date: Wed Jul 5 19:24:38 2017 New Revision: 320692 URL: https://svnweb.freebsd.org/changeset/base/320692 Log: Fix create-kernel-packages with multiple BUILDKERNELS after r320284 Submitted by: Kyle Evans Reviewed by: ngie Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jul 5 19:06:12 2017 (r320691) +++ head/Makefile.inc1 Wed Jul 5 19:24:38 2017 (r320692) @@ -1641,8 +1641,8 @@ create-kernel-packages-flavor${flavor:C,^""$,${_defaul .for _kernel in ${BUILDKERNELS:[2..-1]} .if exists(${KSTAGEDIR}/kernel.${_kernel}.meta) .for flavor in "" -debug -create-kernel-packages: create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},} -create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap .PHONY +create-kernel-packages: create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kernel} +create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kernel}: _pkgbootstrap .PHONY @cd ${KSTAGEDIR}/kernel.${_kernel} ; \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${_kernel} \ From owner-svn-src-head@freebsd.org Wed Jul 5 19:25:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3017D8F0F6; Wed, 5 Jul 2017 19:25:12 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3850568844; Wed, 5 Jul 2017 19:25:11 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65JP9PX063866; Wed, 5 Jul 2017 19:25:09 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65JP9fk063864; Wed, 5 Jul 2017 19:25:09 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201707051925.v65JP9fk063864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 5 Jul 2017 19:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320694 - head/sys/dev/qlxgbe X-SVN-Group: head X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: head/sys/dev/qlxgbe X-SVN-Commit-Revision: 320694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 19:25:12 -0000 Author: davidcs Date: Wed Jul 5 19:25:09 2017 New Revision: 320694 URL: https://svnweb.freebsd.org/changeset/base/320694 Log: Allow MTU changes without ifconfig down/up MFC after:5 days Modified: head/sys/dev/qlxgbe/ql_hw.c head/sys/dev/qlxgbe/ql_os.c Modified: head/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.c Wed Jul 5 19:24:53 2017 (r320693) +++ head/sys/dev/qlxgbe/ql_hw.c Wed Jul 5 19:25:09 2017 (r320694) @@ -2498,6 +2498,9 @@ ql_init_hw_if(qla_host_t *ha) if (qla_hw_add_all_mcast(ha)) return (-1); + if (ql_set_max_mtu(ha, ha->max_frame_size, ha->hw.rcv_cntxt_id)) + return (-1); + if (qla_config_rss(ha, ha->hw.rcv_cntxt_id)) return (-1); Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Wed Jul 5 19:24:53 2017 (r320693) +++ head/sys/dev/qlxgbe/ql_os.c Wed Jul 5 19:25:09 2017 (r320694) @@ -980,8 +980,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { - ret = ql_set_max_mtu(ha, ha->max_frame_size, - ha->hw.rcv_cntxt_id); + qla_init_locked(ha); } if (ifp->if_mtu > ETHERMTU) @@ -1014,11 +1013,9 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ret = ql_set_allmulti(ha); } } else { - qla_init_locked(ha); ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - ret = ql_set_max_mtu(ha, ha->max_frame_size, - ha->hw.rcv_cntxt_id); + qla_init_locked(ha); } } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) From owner-svn-src-head@freebsd.org Wed Jul 5 19:25:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12B97D8F110; Wed, 5 Jul 2017 19:25:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDEBE68850; Wed, 5 Jul 2017 19:25:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 8010E112F0; Wed, 5 Jul 2017 19:24:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id A702F5857; Wed, 5 Jul 2017 19:24:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id PTear1wjwZUk; Wed, 5 Jul 2017 19:24:46 +0000 (UTC) Subject: Re: svn commit: r320284 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 3537E5852 To: Ngie Cooper , Kyle Evans Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201706231826.v5NIQvYa060882@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: Date: Wed, 5 Jul 2017 12:24:44 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xd251o5edhA6703mNWa6O5R0W97Q56Cgn" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 19:25:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xd251o5edhA6703mNWa6O5R0W97Q56Cgn Content-Type: multipart/mixed; boundary="D3PX3ngAiSsVK3jl6aAndRfcOnpObNKtG"; protected-headers="v1" From: Bryan Drewery To: Ngie Cooper , Kyle Evans Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-ID: Subject: Re: svn commit: r320284 - head References: <201706231826.v5NIQvYa060882@repo.freebsd.org> In-Reply-To: --D3PX3ngAiSsVK3jl6aAndRfcOnpObNKtG Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/26/17 3:34 PM, Ngie Cooper wrote: > On Mon, Jun 26, 2017 at 12:37 PM, Kyle Evans wrote: >> Hi, >> >> This broke my setup that builds my 7 different kernels due to duplicat= e >> target errors. This seems to do what I want: >> https://files.kyle-evans.net/freebsd/fix-packages.diff =3D) >=20 > :ShipIt:! >=20 Thanks, committed. --=20 Regards, Bryan Drewery --D3PX3ngAiSsVK3jl6aAndRfcOnpObNKtG-- --xd251o5edhA6703mNWa6O5R0W97Q56Cgn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJZXTz9AAoJEDXXcbtuRpfPL7cH/0Cl6guQfvJUWY1cLxwpz561 rG+TbsRjwB0vB34A3cmAMasDtVBSrfboKMqJu2/dU9CCbsoiGV5U8SNlWnJr8dW6 Ydh2jd4WztptZ6fo1X+Q0Dl+egSf1Lgg6d7aGGECK+JtbqpYGSbH0m9iUEEsOuZ2 +pFePzr6UgINaju/XgygLI7WpLFFaf+Wn2pMr946/W72aaMFssPmAgGsNjezm/jk fKYbo51Rg+7/izpcl8sq2zi9hZZwHDrCDG5CYbqCbljH3X+i+097yuYcKtCXSzPH 1HyXXQqGrUgj726sV0ebgPHJSwAHGFN2BxQqf5vaCSl9lRBvYJym05hX1SsAd9c= =bAfL -----END PGP SIGNATURE----- --xd251o5edhA6703mNWa6O5R0W97Q56Cgn-- From owner-svn-src-head@freebsd.org Wed Jul 5 19:43:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DAA0D8FB05; Wed, 5 Jul 2017 19:43:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF2926A6A6; Wed, 5 Jul 2017 19:43:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65JhH1H071898; Wed, 5 Jul 2017 19:43:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65JhGDT071896; Wed, 5 Jul 2017 19:43:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201707051943.v65JhGDT071896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 5 Jul 2017 19:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320695 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 320695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 19:43:18 -0000 Author: bdrewery Date: Wed Jul 5 19:43:16 2017 New Revision: 320695 URL: https://svnweb.freebsd.org/changeset/base/320695 Log: Fix out-of-tree kernel builds after r320275 when bsd.linker.mk not yet installed. Submitted by: bde Modified: head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Wed Jul 5 19:25:09 2017 (r320694) +++ head/sys/conf/kern.pre.mk Wed Jul 5 19:43:16 2017 (r320695) @@ -114,7 +114,7 @@ DEFINED_PROF= ${PROF} # can override the others. CFLAGS+= ${CONF_CFLAGS} -.if ${LINKER_FEATURES:Mbuild-id} +.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} LDFLAGS+= -Wl,--build-id=sha1 .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Wed Jul 5 19:25:09 2017 (r320694) +++ head/sys/conf/kmod.mk Wed Jul 5 19:43:16 2017 (r320695) @@ -125,7 +125,7 @@ CFLAGS.gcc+= --param large-function-growth=1000 CFLAGS+= -fno-common LDFLAGS+= -d -warn-common -.if ${LINKER_FEATURES:Mbuild-id} +.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} LDFLAGS+= -Wl,--build-id=sha1 .endif From owner-svn-src-head@freebsd.org Wed Jul 5 19:47:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBF53D8FBB1; Wed, 5 Jul 2017 19:47:15 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-pg0-f54.google.com (mail-pg0-f54.google.com [74.125.83.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C421F6A827; Wed, 5 Jul 2017 19:47:15 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-pg0-f54.google.com with SMTP id k14so53487640pgr.0; Wed, 05 Jul 2017 12:47:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=QYLueW4Z6K5vDNv8CM/u1pkHy0Wo4lCENlaUdORO/24=; b=bWNRxF+JOhdLEM/htKz8bpqQ4tZ9hhB90CXJ1NAVl9j14bNVkwLtkgnMBMzflktPJC i5mzASthnuCd9A1Af1d/mHajP34Wpyvygy+9HUDelV1u9dg081ds/rOfva/Gv6RG/VIe cUG/so76Ey81TJJqZUl7WuW1p+Ns86N31uwNfwHHq+cNwLOLyZnZb3kHStk6HHfuiiwQ yCQHkjuoPcI17QmjSWiukkIhUOV4mkF7id4bv6AaSRtzWhTkoZlDfbA9vt5jAqLOHLZt vBwkg2um3+Hl9jHS/w4EPRliUwR8TfXDxhOZwYrveUmdOrAp3Sy81jYwTXXNwoBUMzs5 qogg== X-Gm-Message-State: AIVw110d1fYfZAWXtNrYOIqKRrOXtcu+yaPzh+nHhx/7+/ILFgti02Fe J4im/wKw2y1q1T5CIuk= X-Received: by 10.98.11.135 with SMTP id 7mr22028306pfl.45.1499283560251; Wed, 05 Jul 2017 12:39:20 -0700 (PDT) Received: from mail-pg0-f49.google.com (mail-pg0-f49.google.com. [74.125.83.49]) by smtp.gmail.com with ESMTPSA id w20sm17106758pgc.34.2017.07.05.12.39.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 12:39:20 -0700 (PDT) Received: by mail-pg0-f49.google.com with SMTP id u62so128976529pgb.3; Wed, 05 Jul 2017 12:39:20 -0700 (PDT) X-Received: by 10.84.130.67 with SMTP id 61mr22982772plc.192.1499283560003; Wed, 05 Jul 2017 12:39:20 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.100.163.172 with HTTP; Wed, 5 Jul 2017 12:39:19 -0700 (PDT) In-Reply-To: <201707051924.v65JOdTv063728@repo.freebsd.org> References: <201707051924.v65JOdTv063728@repo.freebsd.org> From: Conrad Meyer Date: Wed, 5 Jul 2017 12:39:19 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r320692 - head To: Bryan Drewery Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 19:47:16 -0000 On Wed, Jul 5, 2017 at 12:24 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Wed Jul 5 19:24:38 2017 > New Revision: 320692 > URL: https://svnweb.freebsd.org/changeset/base/320692 > > Log: > Fix create-kernel-packages with multiple BUILDKERNELS after r320284 > > Submitted by: Kyle Evans Now: kevans@FreeBSD.org :-) From owner-svn-src-head@freebsd.org Wed Jul 5 19:58:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0759D9012E for ; Wed, 5 Jul 2017 19:58:09 +0000 (UTC) (envelope-from r@robakdesign.com) Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EF2E6E02A for ; Wed, 5 Jul 2017 19:58:08 +0000 (UTC) (envelope-from r@robakdesign.com) Received: by mail-wr0-f196.google.com with SMTP id x23so51231356wrb.0 for ; Wed, 05 Jul 2017 12:58:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IyEwh+y2vca8xBIzw6hSSq6pV4DRVCQ12x74xBdCVqI=; b=lSgz91IgnAKER+MOoSZi8n6T3aHYbQAsmzCKmOownlByXzFKyio1h7NbYS/41RMagN fKg5sF9RyxgF5OXhVJZRQ4wQ6SuRWKlY4GgyuO071QuZDGtVCi6B6Re6LGcMdUp8buM3 rjFcUJrpBQaQlTq99SanC0+FgMj7PpfMwmia5aPYQOdXEmqo/NzbibFqPnZb1RlrS+Ka GGEVrHB/j0tHjC3NyCbt76yN9A7KNnjofsyr/SIECOPEOBhY6GleeZM6Y4tPjAbfr6YD vW9tt/vH22saQoBSKJT1zyz6rJ+JKbuQ2qGl9ji+WCTBSwb7/NAc3NIRF8NydZKxEA9u 9g1A== X-Gm-Message-State: AKS2vOz9aXff05Xhll2hg42EIb9EFdGxvqgUdJuYFMePOAG6bc94Ox4y +oFXrqeubsxvOs7p X-Received: by 10.28.207.66 with SMTP id f63mr28119855wmg.73.1499284359399; Wed, 05 Jul 2017 12:52:39 -0700 (PDT) Received: from [192.168.1.62] (host86-169-146-243.range86-169.btcentralplus.com. [86.169.146.243]) by smtp.gmail.com with ESMTPSA id b30sm14487755wra.42.2017.07.05.12.52.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 12:52:38 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts From: Bartek Rutkowski In-Reply-To: <20170705171515.GY1935@kib.kiev.ua> Date: Wed, 5 Jul 2017 20:52:37 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <82D8BE77-07D9-4207-854B-661900B7D04A@FreeBSD.org> References: <201707051337.v65DbRD2019178@repo.freebsd.org> <20170705171515.GY1935@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 19:58:09 -0000 > On 5 Jul 2017, at 18:15, Konstantin Belousov = wrote: >=20 > On Wed, Jul 05, 2017 at 01:37:27PM +0000, Bartek Rutkowski wrote: >> This patch adds new bsdinstall option to hardening section that = allows users >> to change this behaviour to secure one and updates stack guard = option so it >> would set the value of relevant sysctl to 512 (2MB) > What ?! What 'What?!'? Kind regards, Bartek Rutkowski= From owner-svn-src-head@freebsd.org Wed Jul 5 20:01:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FD1CD901E3; Wed, 5 Jul 2017 20:01:00 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0B506E1DC; Wed, 5 Jul 2017 20:00:59 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65K0x5S076373; Wed, 5 Jul 2017 20:00:59 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65K0xMf076372; Wed, 5 Jul 2017 20:00:59 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201707052000.v65K0xMf076372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 5 Jul 2017 20:00:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320696 - head/etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/etc/rc.d X-SVN-Commit-Revision: 320696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 20:01:00 -0000 Author: kp Date: Wed Jul 5 20:00:58 2017 New Revision: 320696 URL: https://svnweb.freebsd.org/changeset/base/320696 Log: Allow ipsec to run in vnet jails ipsec is usable in vnet jails, so allow it to run there. PR: 211364 Submitted by: Matthias Meyser Modified: head/etc/rc.d/ipsec Modified: head/etc/rc.d/ipsec ============================================================================== --- head/etc/rc.d/ipsec Wed Jul 5 19:43:16 2017 (r320695) +++ head/etc/rc.d/ipsec Wed Jul 5 20:00:58 2017 (r320696) @@ -6,7 +6,7 @@ # PROVIDE: ipsec # REQUIRE: FILESYSTEMS # BEFORE: DAEMON mountcritremote -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr From owner-svn-src-head@freebsd.org Wed Jul 5 20:03:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45691D904DA; Wed, 5 Jul 2017 20:03:23 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id ED9AE6E65D; Wed, 5 Jul 2017 20:03:22 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id SqW7dk8pydTIDSqW8dYMs5; Wed, 05 Jul 2017 14:03:20 -0600 X-Authority-Analysis: v=2.2 cv=UaohcOaN c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=G3gG6ho9WtcA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=wOIZE3lNVOKxxlN9Vq8A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 1BF461F4; Wed, 5 Jul 2017 13:03:19 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v65K3ICL052396; Wed, 5 Jul 2017 13:03:18 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.14.8/Submit) with ESMTP id v65K3IHn052393; Wed, 5 Jul 2017 13:03:18 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201707052003.v65K3IHn052393@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Allan Jude cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320644 - in head: bin/rcp libexec/rlogind libexec/rshd usr.bin/rlogin usr.bin/rsh usr.bin/ruptime usr.bin/rwho usr.sbin/rwhod In-Reply-To: Message from Allan Jude of "Tue, 04 Jul 2017 15:44:30 -0000." <201707041544.v64FiU3k078754@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 05 Jul 2017 13:03:18 -0700 X-CMAE-Envelope: MS4wfGdBKc0ScTZPDOLr67B3O0/9HjsZDEFWiH2wuSBs84Msoy3FfIwPcAGlEEMkAfMO0SCR3p41QNsDSiWmbYQv7eUsQETM2mdKbXHDOu3Q2iQkxl2JrAC1 HliM2oat+9Ra6ab5hMcIl4+giThY/+JC+MihEYEpZMa9k48ZT+DI4bSsEJOyDXubkqvI8JoyONxbBijXBWy8rPkZVmvJbvwX/P2nE/cM8VgM3Yr5HrhnV2JQ BsmOJrYzVQhK9sAfDWxQypVo85NHBYfyTHC99m7X3UQidT5mLRLNb2e2vPXivJHW X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 20:03:23 -0000 In message <201707041544.v64FiU3k078754@repo.freebsd.org>, Allan Jude writes: > Author: allanjude > Date: Tue Jul 4 15:44:30 2017 > New Revision: 320644 > URL: https://svnweb.freebsd.org/changeset/base/320644 > > Log: > Add deprecation notices for all rcmd tools > > Submitted by: bcr > Reviewed by: emaste, bapt, jhl > MFC after: immediate > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D11471 > > Modified: > head/bin/rcp/rcp.1 > head/libexec/rlogind/rlogind.8 > head/libexec/rshd/rshd.8 > head/usr.bin/rlogin/rlogin.1 > head/usr.bin/rsh/rsh.1 > head/usr.bin/ruptime/ruptime.1 > head/usr.bin/rwho/rwho.1 > head/usr.sbin/rwhod/rwhod.8 > I'll go ahead and create a legacy port in the same vein as rdist, uucp, and other retired FreeBSD software. My plan is to create a local git repo which can either be downloaded directly by the port and checked out into $WRKDIR directly or host it on github. The port should probably include a warning to use Kerberos or SSH instead. I haven't figured out how to clone cherrypicked bits from svn to git (though cloning a complete svn repo is easy). -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Wed Jul 5 20:06:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C32ED90726; Wed, 5 Jul 2017 20:06:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 316856E990; Wed, 5 Jul 2017 20:06:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v65K5erZ010075 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 5 Jul 2017 23:05:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v65K5erZ010075 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v65K5eVT010074; Wed, 5 Jul 2017 23:05:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 5 Jul 2017 23:05:40 +0300 From: Konstantin Belousov To: Bartek Rutkowski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts Message-ID: <20170705200540.GC1935@kib.kiev.ua> References: <201707051337.v65DbRD2019178@repo.freebsd.org> <20170705171515.GY1935@kib.kiev.ua> <82D8BE77-07D9-4207-854B-661900B7D04A@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82D8BE77-07D9-4207-854B-661900B7D04A@FreeBSD.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 20:06:52 -0000 On Wed, Jul 05, 2017 at 08:52:37PM +0100, Bartek Rutkowski wrote: > > > On 5 Jul 2017, at 18:15, Konstantin Belousov wrote: > > > > On Wed, Jul 05, 2017 at 01:37:27PM +0000, Bartek Rutkowski wrote: > >> This patch adds new bsdinstall option to hardening section that allows users > >> to change this behaviour to secure one and updates stack guard option so it > >> would set the value of relevant sysctl to 512 (2MB) > > What ?! > > What 'What?!'? This is absurd change. You are tweaking knobs which you have no idea about, and you did not tested this. From owner-svn-src-head@freebsd.org Wed Jul 5 20:09:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4552D907D5 for ; Wed, 5 Jul 2017 20:09:37 +0000 (UTC) (envelope-from r@robakdesign.com) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 923446EB10 for ; Wed, 5 Jul 2017 20:09:37 +0000 (UTC) (envelope-from r@robakdesign.com) Received: by mail-wr0-f193.google.com with SMTP id z45so51386298wrb.2 for ; Wed, 05 Jul 2017 13:09:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=CrLgdGsnkMl+G+b6ac4eklJsvgcy9EFabm7rmHLulPM=; b=CyFixZM+/ypWlZmcJbm5odnKw5zdZwrWzjqCIpNzwm/5VcvkttVJciB0zv8ASihw9L xLplN0vHd1IPDgLk6+LpntWNPNDZJTtOpUM1apvMArc3opOjAtqxG5QfEQHBqKVnEL9x YjKJEfQH+650q0ndOVzJkrz4IcNcDot39b3btLg/DfCYacXetugcIu4haicjerq5vrdX 9unDYHozSnyquQkabg17yA21ev3pKtEySpb2arsa8euBugxbSU9fC+Tg472hfR+OyfNH khyQkpemXxM/KkszpUkALGdCbILGAGFYKORsL8s+Jlu96p/+MyGfR4mY8HrUiac2dLlV nM7A== X-Gm-Message-State: AIVw1107q2p7yIZ+wb+hvN8G2va9O3iHQ6s6i3ZbGTEgIbdwacbeN2x4 7tfV624MsFsK64Qj X-Received: by 10.28.93.1 with SMTP id r1mr23358153wmb.26.1499285375220; Wed, 05 Jul 2017 13:09:35 -0700 (PDT) Received: from [192.168.1.62] (host86-169-146-243.range86-169.btcentralplus.com. [86.169.146.243]) by smtp.gmail.com with ESMTPSA id r5sm10181538wmr.9.2017.07.05.13.09.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 13:09:34 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts From: Bartek Rutkowski In-Reply-To: <20170705200540.GC1935@kib.kiev.ua> Date: Wed, 5 Jul 2017 21:09:33 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201707051337.v65DbRD2019178@repo.freebsd.org> <20170705171515.GY1935@kib.kiev.ua> <82D8BE77-07D9-4207-854B-661900B7D04A@FreeBSD.org> <20170705200540.GC1935@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 20:09:37 -0000 > On 5 Jul 2017, at 21:05, Konstantin Belousov = wrote: >=20 > On Wed, Jul 05, 2017 at 08:52:37PM +0100, Bartek Rutkowski wrote: >>=20 >>> On 5 Jul 2017, at 18:15, Konstantin Belousov = wrote: >>>=20 >>> On Wed, Jul 05, 2017 at 01:37:27PM +0000, Bartek Rutkowski wrote: >>>> This patch adds new bsdinstall option to hardening section that = allows users >>>> to change this behaviour to secure one and updates stack guard = option so it >>>> would set the value of relevant sysctl to 512 (2MB) >>> What ?! >>=20 >> What 'What?!'? >=20 > This is absurd change. You are tweaking knobs which you have no idea = about, > and you did not tested this. I welcome any constructive criticism, explanations, explanations. Feel = free to send them anytime - discussing in such tone makes you less = likely to be given proper attention. Kind regards, Bartek Rutkowski From owner-svn-src-head@freebsd.org Wed Jul 5 20:23:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C7DAD90C46 for ; Wed, 5 Jul 2017 20:23:02 +0000 (UTC) (envelope-from r@robakdesign.com) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CCC36F406 for ; Wed, 5 Jul 2017 20:23:01 +0000 (UTC) (envelope-from r@robakdesign.com) Received: by mail-wr0-f193.google.com with SMTP id 77so51291596wrb.3 for ; Wed, 05 Jul 2017 13:23:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Io1p/ZB0M/F0jW2WOMUzEZ4Sw3qhXbGXQ6DykIyuG+I=; b=R4+MQGs2H7+gdspchzpGvjyG8KMitvCSAyOaaM1A1LLgetnlO3Uwl4y13gXw5KyReU S10xPlq8zJSxl3M/9wbvqfrGtR7Czxj2IF8w2Ew9Z8YTkzyCMurx1z6oRnqVTBvqaXvM pIAE/ZylVp7jbxGmDVHwWJqNO015BdyVa1Gw6M/sQ8EiCEsbKeVKxDgZ5iFpnUhM2o7b QYQlbKt7nYjm1VcmOAVNazHATihpFFHtijNjcX3IfSTLQ9Oqv0irqvqWKcri7S9ToMXC gW+JBDlsJpo5Qir+P3Dpn1zCbgAKJzYNpowAjibZ++V0EqfGBbuOioMILENzNxjw2TBy eXZA== X-Gm-Message-State: AKS2vOzfi687Gmkqqd3uaHAikNjxWWR0fQwcJUP6KwqIlJrb2BoIcMQg 58rbOdkk0RHo5gmkC3cT8A== X-Received: by 10.223.169.145 with SMTP id b17mr25803888wrd.179.1499286180253; Wed, 05 Jul 2017 13:23:00 -0700 (PDT) Received: from [192.168.1.62] (host86-169-146-243.range86-169.btcentralplus.com. [86.169.146.243]) by smtp.gmail.com with ESMTPSA id x21sm25278620wme.24.2017.07.05.13.22.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 13:22:59 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts From: Bartek Rutkowski In-Reply-To: <4def0b91-f54a-2038-5fe3-9a860f3317dc@FreeBSD.org> Date: Wed, 5 Jul 2017 21:22:58 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201707051337.v65DbRD2019178@repo.freebsd.org> <4def0b91-f54a-2038-5fe3-9a860f3317dc@FreeBSD.org> To: Renato Botelho X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 20:23:02 -0000 > There are two options '9' now >=20 > --=20 > Renato Botelho Yes, I am aware of it, something in my merge must have go wrong. I'll = fix it first thing in the morning, because I've had a long day and I = don't want to cause any more issues. If someone else feels like = correcting it in meantime - you're more than welcome. Kind regards, Bartek Rutkowski= From owner-svn-src-head@freebsd.org Wed Jul 5 20:40:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36308D914BD; Wed, 5 Jul 2017 20:40:59 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB3B96FD7C; Wed, 5 Jul 2017 20:40:58 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v65Keu2F056279; Wed, 5 Jul 2017 13:40:56 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v65KeuRu056278; Wed, 5 Jul 2017 13:40:56 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201707052040.v65KeuRu056278@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320644 - in head: bin/rcp libexec/rlogind libexec/rshd usr.bin/rlogin usr.bin/rsh usr.bin/ruptime usr.bin/rwho usr.sbin/rwhod In-Reply-To: <201707052003.v65K3IHn052393@slippy.cwsent.com> To: Cy Schubert Date: Wed, 5 Jul 2017 13:40:56 -0700 (PDT) CC: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 20:40:59 -0000 > writes: > > Author: allanjude > > Date: Tue Jul 4 15:44:30 2017 > > New Revision: 320644 > > URL: https://svnweb.freebsd.org/changeset/base/320644 > > > > Log: > > Add deprecation notices for all rcmd tools > > > > Submitted by: bcr > > Reviewed by: emaste, bapt, jhl > > MFC after: immediate > > Relnotes: yes > > Differential Revision: https://reviews.freebsd.org/D11471 > > > > Modified: > > head/bin/rcp/rcp.1 > > head/libexec/rlogind/rlogind.8 > > head/libexec/rshd/rshd.8 > > head/usr.bin/rlogin/rlogin.1 > > head/usr.bin/rsh/rsh.1 > > head/usr.bin/ruptime/ruptime.1 > > head/usr.bin/rwho/rwho.1 > > head/usr.sbin/rwhod/rwhod.8 > > > > I'll go ahead and create a legacy port in the same vein as rdist, uucp, and > other retired FreeBSD software. > > My plan is to create a local git repo which can either be downloaded > directly by the port and checked out into $WRKDIR directly or host it on > github. > > The port should probably include a warning to use Kerberos or SSH instead. > > I haven't figured out how to clone cherrypicked bits from svn to git > (though cloning a complete svn repo is easy). I believe this has already been done in ports/*/bsdrcmds -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Wed Jul 5 21:44:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C32ED92E33; Wed, 5 Jul 2017 21:44:15 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D584B7254F; Wed, 5 Jul 2017 21:44:14 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id Ss5cdvnHWeQWUSs5ed4bRo; Wed, 05 Jul 2017 15:44:07 -0600 X-Authority-Analysis: v=2.2 cv=UpATD64B c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=G3gG6ho9WtcA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=h0YIeZOZGoobc5HQC0cA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 8F4C92F7; Wed, 5 Jul 2017 14:44:04 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v65Li4EJ014827; Wed, 5 Jul 2017 14:44:04 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.14.8/Submit) with ESMTP id v65Li4O7014824; Wed, 5 Jul 2017 14:44:04 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201707052144.v65Li4O7014824@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Cy Schubert , Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320644 - in head: bin/rcp libexec/rlogind libexec/rshd usr.bin/rlogin usr.bin/rsh usr.bin/ruptime usr.bin/rwho usr.sbin/rwhod In-Reply-To: Message from "Rodney W. Grimes" of "Wed, 05 Jul 2017 13:40:56 -0700." <201707052040.v65KeuRu056278@pdx.rh.CN85.dnsmgr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 05 Jul 2017 14:44:04 -0700 X-CMAE-Envelope: MS4wfNWnjYNB++YOSyEcAx1IZqmZK8NmRYP3Zz0y5+uEtwtj6/gmZyPSyskZSdTf4OYEV+65h4CeTbfpUK8iDrS8FOEKfbMI+wkJL7PFblXqrgrvsz4SLYZy cdyJ40M1E1fxUECKi0xeGHg39Fxfri/L3nLTTARnjFMt08mtx9jqTPaSjPcJ4XAiZt0QmRJVepk/oGIRm8Ljdi0CXbmu8Ei5q7OQrMiwTd64jcDTv3Oi9gkv YX8lJ6l1QX6snsYTtWrLhqM8z80KDOQXMRcmS7J7FjebUv1bE9gW8CFqNThAHn4iAc59QZ28i3yrZ1miz9vZnQ== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 21:44:15 -0000 In message <201707052040.v65KeuRu056278@pdx.rh.CN85.dnsmgr.net>, "Rodney W. Gri mes" writes: > > writes: > > > Author: allanjude > > > Date: Tue Jul 4 15:44:30 2017 > > > New Revision: 320644 > > > URL: https://svnweb.freebsd.org/changeset/base/320644 > > > > > > Log: > > > Add deprecation notices for all rcmd tools > > > > > > Submitted by: bcr > > > Reviewed by: emaste, bapt, jhl > > > MFC after: immediate > > > Relnotes: yes > > > Differential Revision: https://reviews.freebsd.org/D11471 > > > > > > Modified: > > > head/bin/rcp/rcp.1 > > > head/libexec/rlogind/rlogind.8 > > > head/libexec/rshd/rshd.8 > > > head/usr.bin/rlogin/rlogin.1 > > > head/usr.bin/rsh/rsh.1 > > > head/usr.bin/ruptime/ruptime.1 > > > head/usr.bin/rwho/rwho.1 > > > head/usr.sbin/rwhod/rwhod.8 > > > > > > > I'll go ahead and create a legacy port in the same vein as rdist, uucp, and > > > other retired FreeBSD software. > > > > My plan is to create a local git repo which can either be downloaded > > directly by the port and checked out into $WRKDIR directly or host it on > > github. > > > > The port should probably include a warning to use Kerberos or SSH instead. > > > > I haven't figured out how to clone cherrypicked bits from svn to git > > (though cloning a complete svn repo is easy). > > I believe this has already been done in ports/*/bsdrcmds ok, good stuff. Thanks for the update. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Thu Jul 6 00:53:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EF4AD963F2; Thu, 6 Jul 2017 00:53:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 279BF77D25; Thu, 6 Jul 2017 00:53:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v660rDIq000288; Thu, 6 Jul 2017 00:53:13 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v660rC2T000284; Thu, 6 Jul 2017 00:53:12 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707060053.v660rC2T000284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 6 Jul 2017 00:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320698 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 320698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 00:53:14 -0000 Author: rmacklem Date: Thu Jul 6 00:53:12 2017 New Revision: 320698 URL: https://svnweb.freebsd.org/changeset/base/320698 Log: Add support for AF_LOCAL socket upcalls to the nfsuserd daemon. This patch adds support for AF_LOCAL socket upcalls to an nfsuserd daemon that supports them. A future patch to the nfsuserd daemon will use AF_LOCAL sockets to avoid a problem when using upcalls to 127.0.0.1 if jails are in use. Suggested by: dfr PR: 205193 Modified: head/sys/fs/nfs/nfs_commonkrpc.c head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Thu Jul 6 00:43:43 2017 (r320697) +++ head/sys/fs/nfs/nfs_commonkrpc.c Thu Jul 6 00:53:12 2017 (r320698) @@ -199,6 +199,8 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq nconf = getnetconfigent("udp"); else nconf = getnetconfigent("tcp"); + else if (saddr->sa_family == AF_LOCAL) + nconf = getnetconfigent("local"); else if (nrp->nr_sotype == SOCK_DGRAM) nconf = getnetconfigent("udp6"); Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Thu Jul 6 00:43:43 2017 (r320697) +++ head/sys/fs/nfs/nfs_commonport.c Thu Jul 6 00:53:12 2017 (r320698) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); */ #include #include +#include #include #include #include @@ -618,11 +619,30 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, goto out; } else if (uap->flag & NFSSVC_NFSUSERDPORT) { u_short sockport; + struct sockaddr *sad; + struct sockaddr_un *sun; - error = copyin(uap->argp, (caddr_t)&sockport, - sizeof (u_short)); - if (!error) - error = nfsrv_nfsuserdport(sockport, p); + if ((uap->flag & NFSSVC_NEWSTRUCT) != 0) { + /* New nfsuserd using an AF_LOCAL socket. */ + sun = malloc(sizeof(struct sockaddr_un), M_SONAME, + M_WAITOK | M_ZERO); + error = copyinstr(uap->argp, sun->sun_path, + sizeof(sun->sun_path), NULL); + if (error != 0) { + free(sun, M_SONAME); + return (error); + } + sun->sun_family = AF_LOCAL; + sun->sun_len = SUN_LEN(sun); + sockport = 0; + sad = (struct sockaddr *)sun; + } else { + error = copyin(uap->argp, (caddr_t)&sockport, + sizeof (u_short)); + sad = NULL; + } + if (error == 0) + error = nfsrv_nfsuserdport(sad, sockport, p); } else if (uap->flag & NFSSVC_NFSUSERDDELPORT) { nfsrv_nfsuserddelport(); error = 0; Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Thu Jul 6 00:43:43 2017 (r320697) +++ head/sys/fs/nfs/nfs_commonsubs.c Thu Jul 6 00:53:12 2017 (r320698) @@ -3052,7 +3052,7 @@ nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len) * Set the port for the nfsuserd. */ APPLESTATIC int -nfsrv_nfsuserdport(u_short port, NFSPROC_T *p) +nfsrv_nfsuserdport(struct sockaddr *sad, u_short port, NFSPROC_T *p) { struct nfssockreq *rp; struct sockaddr_in *ad; @@ -3062,6 +3062,7 @@ nfsrv_nfsuserdport(u_short port, NFSPROC_T *p) if (nfsrv_nfsuserd) { NFSUNLOCKNAMEID(); error = EPERM; + NFSSOCKADDRFREE(sad); goto out; } nfsrv_nfsuserd = 1; @@ -3071,16 +3072,24 @@ nfsrv_nfsuserdport(u_short port, NFSPROC_T *p) */ rp = &nfsrv_nfsuserdsock; rp->nr_client = NULL; - rp->nr_sotype = SOCK_DGRAM; - rp->nr_soproto = IPPROTO_UDP; - rp->nr_lock = (NFSR_RESERVEDPORT | NFSR_LOCALHOST); rp->nr_cred = NULL; - NFSSOCKADDRALLOC(rp->nr_nam); - NFSSOCKADDRSIZE(rp->nr_nam, sizeof (struct sockaddr_in)); - ad = NFSSOCKADDR(rp->nr_nam, struct sockaddr_in *); - ad->sin_family = AF_INET; - ad->sin_addr.s_addr = htonl((u_int32_t)0x7f000001); /* 127.0.0.1 */ - ad->sin_port = port; + rp->nr_lock = (NFSR_RESERVEDPORT | NFSR_LOCALHOST); + if (sad != NULL) { + /* Use the AF_LOCAL socket address passed in. */ + rp->nr_sotype = SOCK_STREAM; + rp->nr_soproto = 0; + rp->nr_nam = sad; + } else { + /* Use the port# for a UDP socket (old nfsuserd). */ + rp->nr_sotype = SOCK_DGRAM; + rp->nr_soproto = IPPROTO_UDP; + NFSSOCKADDRALLOC(rp->nr_nam); + NFSSOCKADDRSIZE(rp->nr_nam, sizeof (struct sockaddr_in)); + ad = NFSSOCKADDR(rp->nr_nam, struct sockaddr_in *); + ad->sin_family = AF_INET; + ad->sin_addr.s_addr = htonl((u_int32_t)0x7f000001); + ad->sin_port = port; + } rp->nr_prog = RPCPROG_NFSUSERD; rp->nr_vers = RPCNFSUSERD_VERS; error = newnfs_connect(NULL, rp, NFSPROCCRED(p), p, 0); Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Thu Jul 6 00:43:43 2017 (r320697) +++ head/sys/fs/nfs/nfs_var.h Thu Jul 6 00:53:12 2017 (r320698) @@ -128,7 +128,7 @@ int nfsrv_checksetattr(vnode_t, struct nfsrv_descript NFSPROC_T *); int nfsrv_checkgetattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, nfsattrbit_t *, struct ucred *, NFSPROC_T *); -int nfsrv_nfsuserdport(u_short, NFSPROC_T *); +int nfsrv_nfsuserdport(struct sockaddr *, u_short, NFSPROC_T *); void nfsrv_nfsuserddelport(void); void nfsrv_throwawayallstate(NFSPROC_T *); int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *, From owner-svn-src-head@freebsd.org Thu Jul 6 04:06:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEF02D9D2D8; Thu, 6 Jul 2017 04:06:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD9E37E7B0; Thu, 6 Jul 2017 04:06:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6646PWW081143; Thu, 6 Jul 2017 04:06:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6646PFh081141; Thu, 6 Jul 2017 04:06:25 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201707060406.v6646PFh081141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 6 Jul 2017 04:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320700 - head/sys/mips/conf X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/mips/conf X-SVN-Commit-Revision: 320700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 04:06:27 -0000 Author: adrian Date: Thu Jul 6 04:06:25 2017 New Revision: 320700 URL: https://svnweb.freebsd.org/changeset/base/320700 Log: [ar71xx] Start migrating the AR934x based boards over to the new world order. This unifies the PCI hints with the AHB/NOR hint syntax. Tested: * DIR825C1, AR9344 SoC / 2x2 2G + AR9580 PCI 2x2 5G Modified: head/sys/mips/conf/AR934X_BASE.hints head/sys/mips/conf/std.AR934X Modified: head/sys/mips/conf/AR934X_BASE.hints ============================================================================== --- head/sys/mips/conf/AR934X_BASE.hints Thu Jul 6 04:03:21 2017 (r320699) +++ head/sys/mips/conf/AR934X_BASE.hints Thu Jul 6 04:06:25 2017 (r320700) @@ -9,6 +9,10 @@ hint.apb.0.at="nexus0" hint.apb.0.irq=4 +# ART calibration data mapping device +hint.ar71xx_caldata.0.at="nexus0" +hint.ar71xx_caldata.0.order=0 + # uart0 hint.uart.0.at="apb0" # NB: This isn't an ns8250 UART @@ -46,6 +50,13 @@ hint.ath.0.device_id=0x0031 # Set this to define where the ath calibration data # should be fetched from in physical memory. # hint.ath.0.eepromaddr=0x1fff1000 + +# Where the ART is - last 64k in the first 8MB of flash +#hint.ar71xx_caldata.0.map.0.ath_fixup_addr=0x1fff0000 +#hint.ar71xx_caldata.0.map.0.ath_fixup_size=16384 + +# And now tell the ath(4) driver where to look! +#hint.ath.0.eeprom_firmware="ar71xx_caldata.0.map.0.eeprom_firmware" # SPI flash hint.spi.0.at="nexus0" Modified: head/sys/mips/conf/std.AR934X ============================================================================== --- head/sys/mips/conf/std.AR934X Thu Jul 6 04:03:21 2017 (r320699) +++ head/sys/mips/conf/std.AR934X Thu Jul 6 04:06:25 2017 (r320700) @@ -51,7 +51,16 @@ options NO_FFS_SNAPSHOT # We don't require snapshot include "std.AR_MIPS_BASE" makeoptions MODULES_OVERRIDE+="hwpmc_mips24k" +# EEPROM caldata for AHB connected device +options AR71XX_ATH_EEPROM +device ar71xx_caldata +device firmware + +# Support AR9340 support in AR9300 HAL options AH_SUPPORT_AR9340 + +# Support EEPROM caldata in AHB devices +options ATH_EEPROM_FIRMWARE device pci device ar724x_pci From owner-svn-src-head@freebsd.org Thu Jul 6 04:15:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E2E4D9D70E; Thu, 6 Jul 2017 04:15:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1694D7EC5F; Thu, 6 Jul 2017 04:15:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v664FVIk085208; Thu, 6 Jul 2017 04:15:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v664FU9n085204; Thu, 6 Jul 2017 04:15:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060415.v664FU9n085204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 04:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320701 - in head: bin sbin usr.bin usr.sbin X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head: bin sbin usr.bin usr.sbin X-SVN-Commit-Revision: 320701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 04:15:32 -0000 Author: ngie Date: Thu Jul 6 04:15:30 2017 New Revision: 320701 URL: https://svnweb.freebsd.org/changeset/base/320701 Log: Remove SUBDIR ordering/uniquifying in *bin/Makefile After the addition of SUBDIR.yes, uniquifying/ordering the SUBDIRs doesn't make a whole lot of sense, and it's in effect a half measure. Ordering SUBDIR (after adding SUBDIR.yes to it) in bsd.subdir.mk is a separate change that warrants more discussion/testing, because while the SUBDIR_PARALLEL work largely fixed dependency ordering for SUBDIRs, there might be downstream FreeBSD consumers that rely on the SUBDIR ordering. MFC after: 2 months Reviewed by: bdrewery Differential Revision: D11398 Modified: head/bin/Makefile head/sbin/Makefile head/usr.bin/Makefile head/usr.sbin/Makefile Modified: head/bin/Makefile ============================================================================== --- head/bin/Makefile Thu Jul 6 04:06:25 2017 (r320700) +++ head/bin/Makefile Thu Jul 6 04:15:30 2017 (r320701) @@ -47,8 +47,6 @@ SUBDIR.${MK_TESTS}+= tests .include -SUBDIR:= ${SUBDIR:O} - SUBDIR_PARALLEL= .include Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Thu Jul 6 04:06:25 2017 (r320700) +++ head/sbin/Makefile Thu Jul 6 04:15:30 2017 (r320701) @@ -93,8 +93,6 @@ SUBDIR.${MK_TESTS}+= tests .include -SUBDIR:= ${SUBDIR:O} - SUBDIR_PARALLEL= .include Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Thu Jul 6 04:06:25 2017 (r320700) +++ head/usr.bin/Makefile Thu Jul 6 04:15:30 2017 (r320701) @@ -306,8 +306,6 @@ SUBDIR+= mkesdb_static .include -SUBDIR:= ${SUBDIR:O:u} - SUBDIR_PARALLEL= .include Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Jul 6 04:06:25 2017 (r320700) +++ head/usr.sbin/Makefile Thu Jul 6 04:15:30 2017 (r320701) @@ -218,8 +218,6 @@ SUBDIR.${MK_TESTS}+= tests .include -SUBDIR:= ${SUBDIR:O} - SUBDIR_PARALLEL= .include From owner-svn-src-head@freebsd.org Thu Jul 6 04:19:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46BA6D9D8DF; Thu, 6 Jul 2017 04:19:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2246E7EE33; Thu, 6 Jul 2017 04:19:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v664JYXW085382; Thu, 6 Jul 2017 04:19:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v664JXg7085378; Thu, 6 Jul 2017 04:19:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060419.v664JXg7085378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 04:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320702 - in head: share/mk share/zoneinfo tools/build/options X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head: share/mk share/zoneinfo tools/build/options X-SVN-Commit-Revision: 320702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 04:19:35 -0000 Author: ngie Date: Thu Jul 6 04:19:33 2017 New Revision: 320702 URL: https://svnweb.freebsd.org/changeset/base/320702 Log: Formalize LEAPSECONDS and OLDTIMEZONES in share/zoneinfo/... as `MK_ZONEINFO_LEAPSECONDS_SUPPORT == yes` and `MK_ZONEINFO_OLD_TIMEZONES_SUPPORT == yes`. Keep `LEAPSECONDS` and `OLDTIMEZONES` for backwards compatibility, but print out a warning notifying users that they should use the new variables, in an effort to migrate them to the variables. This is being done mostly for automated build tools, etc, that might rely on these variables being set. The variables will be removed in the future on ^/head, e.g., after ^/stable/12 is cut. MFC after: 1 month Relnotes: yes Reviewed by: bdrewery Differential Revision: D11376 Added: head/tools/build/options/WITH_ZONEINFO_LEAPSECONDS_SUPPORT (contents, props changed) - copied, changed from r320396, head/tools/build/options/WITHOUT_ZONEINFO head/tools/build/options/WITH_ZONEINFO_OLD_TIMEZONES_SUPPORT (contents, props changed) - copied, changed from r320396, head/tools/build/options/WITHOUT_ZONEINFO Modified: head/share/mk/src.opts.mk head/share/zoneinfo/Makefile Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Jul 6 04:15:30 2017 (r320701) +++ head/share/mk/src.opts.mk Thu Jul 6 04:19:33 2017 (r320702) @@ -190,6 +190,8 @@ __DEFAULT_NO_OPTIONS = \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN \ + ZONEINFO_LEAPSECONDS_SUPPORT \ + ZONEINFO_OLD_TIMEZONES_SUPPORT \ # @@ -385,6 +387,11 @@ MK_AUTHPF:= no .if ${MK_TESTS} == "no" MK_DTRACE_TESTS:= no +.endif + +.if ${MK_ZONEINFO} == "no" +MK_ZONEINFO_LEAPSECONDS_SUPPORT:= no +MK_ZONEINFO_OLD_TIMEZONES_SUPPORT:= no .endif .if ${MK_CROSS_COMPILER} == "no" Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Thu Jul 6 04:15:30 2017 (r320701) +++ head/share/zoneinfo/Makefile Thu Jul 6 04:19:33 2017 (r320702) @@ -28,12 +28,24 @@ # $ svn commit # Commit message: "MFV of tzdata2008X" # +.include + CLEANFILES+= yearistype CLEANDIRS+= builddir CONTRIBDIR= ${SRCTOP}/contrib/tzdata/ .PATH: ${CONTRIBDIR} .if defined(LEAPSECONDS) +.warning "Using backwards compatibility variable for LEAPSECONDS; please use WITH_ZONEINFO_LEAPSECONDS_SUPPORT instead" +MK_ZONEINFO_LEAPSECONDS_SUPPORT= yes +.endif + +.if defined(OLDTIMEZONES) +.warning "Using backwards compatibility variable for OLDTIMEZONES; please use WITH_ZONEINFO_OLD_TIMEZONES_SUPPORT instead" +MK_ZONEINFO_OLD_TIMEZONES_SUPPORT= yes +.endif + +.if ${MK_ZONEINFO_LEAPSECONDS_SUPPORT} != "no" LEAPFILE= -L ${CONTRIBDIR}leapseconds .else LEAPFILE= @@ -43,7 +55,7 @@ TZFILES= africa antarctica asia australasia etcetera e factory northamerica southamerica POSIXRULES= America/New_York -.if defined(OLDTIMEZONES) +.if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" TZFILES+= backward systemv .endif @@ -67,7 +79,7 @@ TZBUILDSUBDIRS= \ Pacific \ SystemV -.if defined(OLDTIMEZONES) +.if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil .endif Copied and modified: head/tools/build/options/WITH_ZONEINFO_LEAPSECONDS_SUPPORT (from r320396, head/tools/build/options/WITHOUT_ZONEINFO) ============================================================================== --- head/tools/build/options/WITHOUT_ZONEINFO Tue Jun 27 06:02:50 2017 (r320396, copy source) +++ head/tools/build/options/WITH_ZONEINFO_LEAPSECONDS_SUPPORT Thu Jul 6 04:19:33 2017 (r320702) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to not build the timezone database. +Set to build leapsecond information in to the timezone database. Copied and modified: head/tools/build/options/WITH_ZONEINFO_OLD_TIMEZONES_SUPPORT (from r320396, head/tools/build/options/WITHOUT_ZONEINFO) ============================================================================== --- head/tools/build/options/WITHOUT_ZONEINFO Tue Jun 27 06:02:50 2017 (r320396, copy source) +++ head/tools/build/options/WITH_ZONEINFO_OLD_TIMEZONES_SUPPORT Thu Jul 6 04:19:33 2017 (r320702) @@ -1,2 +1,3 @@ .\" $FreeBSD$ -Set to not build the timezone database. +Set to build backward compatibility timezone aliases in to the timezone +database. From owner-svn-src-head@freebsd.org Thu Jul 6 04:30:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 132D7D9DC03; Thu, 6 Jul 2017 04:30:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6ED47F317; Thu, 6 Jul 2017 04:30:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v664U6Mi089428; Thu, 6 Jul 2017 04:30:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v664U6n0089422; Thu, 6 Jul 2017 04:30:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060430.v664U6n0089422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 04:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320703 - in head: etc/mtree share/zoneinfo share/zoneinfo/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head: etc/mtree share/zoneinfo share/zoneinfo/tests X-SVN-Commit-Revision: 320703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 04:30:08 -0000 Author: ngie Date: Thu Jul 6 04:30:06 2017 New Revision: 320703 URL: https://svnweb.freebsd.org/changeset/base/320703 Log: Add tests to help verify Links functionality for .../contrib/tzdata/backwards MFC after: 1 month MFC with: r320702 Added: head/share/zoneinfo/tests/ head/share/zoneinfo/tests/Makefile (contents, props changed) head/share/zoneinfo/tests/backward_test.sh (contents, props changed) head/share/zoneinfo/tests/zoneinfo_common.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/share/zoneinfo/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Thu Jul 6 04:19:33 2017 (r320702) +++ head/etc/mtree/BSD.tests.dist Thu Jul 6 04:30:06 2017 (r320703) @@ -400,6 +400,8 @@ .. .. .. + zoneinfo + .. .. sys acl Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Thu Jul 6 04:19:33 2017 (r320702) +++ head/share/zoneinfo/Makefile Thu Jul 6 04:30:06 2017 (r320703) @@ -131,4 +131,8 @@ afterinstall: echo "Run tzsetup(8) manually to update /etc/localtime."; \ fi +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/share/zoneinfo/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/zoneinfo/tests/Makefile Thu Jul 6 04:30:06 2017 (r320703) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include + +.PATH: ${SRCTOP}/contrib/tzdata + +PACKAGE= tests + +FILESGROUPS+= TESTFILES + +.if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" +ATF_TESTS_SH+= backward_test +TESTFILES+= backward +.endif + +TESTFILES+= zoneinfo_common.sh +TESTFILESPACKAGE= ${PACKAGE} +TESTFILESDIR= ${TESTSDIR} + +.include Added: head/share/zoneinfo/tests/backward_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/zoneinfo/tests/backward_test.sh Thu Jul 6 04:30:06 2017 (r320703) @@ -0,0 +1,44 @@ +# +# Copyright (c) 2017 Ngie Cooper +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case links +links_head() +{ + atf_set "descr" "Verify Links directives in contrib/tzdata/backward" +} + +links_body() +{ + verify_Links $(atf_get_srcdir)/backward +} + +atf_init_test_cases() +{ + . "$(dirname "$0")/zoneinfo_common.sh" + + atf_add_test_case links +} Added: head/share/zoneinfo/tests/zoneinfo_common.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/zoneinfo/tests/zoneinfo_common.sh Thu Jul 6 04:30:06 2017 (r320703) @@ -0,0 +1,54 @@ +#!/bin/sh +# +# Copyright (c) 2017 Ngie Cooper +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +ZONEINFO_DIR=/usr/share/zoneinfo + +verify_Links() +{ + local zoneinfo_file + + zoneinfo_file=$1 + + awk '$1 == "Link" && NF == 3 { print $2, $3; }' < $zoneinfo_file | \ + while read src dest; do + verify_Link $src $dest + done +} + +verify_Link() +{ + local src dest + + old_path=$ZONEINFO_DIR/$src + new_path=$ZONEINFO_DIR/$dest + + atf_check test -f $new_path + atf_check test -f $old_path + + atf_check cmp $old_path $new_path +} From owner-svn-src-head@freebsd.org Thu Jul 6 04:56:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C12F9D9E0ED; Thu, 6 Jul 2017 04:56:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83B347FBF3; Thu, 6 Jul 2017 04:56:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v664uNOA001738; Thu, 6 Jul 2017 04:56:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v664uNgD001737; Thu, 6 Jul 2017 04:56:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201707060456.v664uNgD001737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 6 Jul 2017 04:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320704 - head/sys/mips/atheros X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/mips/atheros X-SVN-Commit-Revision: 320704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 04:56:24 -0000 Author: adrian Date: Thu Jul 6 04:56:23 2017 New Revision: 320704 URL: https://svnweb.freebsd.org/changeset/base/320704 Log: [ar724x] put in explicit memory barriers now that read/write register no longer implicitly do them. They were removed as part of my "fix this to actually work" a few commits ago in this file. Tested: * AP93, AR7240 + AR9280 PCI Modified: head/sys/mips/atheros/ar724x_pci.c Modified: head/sys/mips/atheros/ar724x_pci.c ============================================================================== --- head/sys/mips/atheros/ar724x_pci.c Thu Jul 6 04:30:06 2017 (r320703) +++ head/sys/mips/atheros/ar724x_pci.c Thu Jul 6 04:56:23 2017 (r320704) @@ -104,10 +104,12 @@ ar724x_pci_write(uint32_t reg, uint32_t offset, uint32 else mask = 0xffffffff; + rmb(); val = ATH_READ_REG(reg + (offset & ~3)); val &= ~(mask << shift); val |= ((data & mask) << shift); ATH_WRITE_REG(reg + (offset & ~3), val); + wmb(); dprintf("%s: %#x/%#x addr=%#x, data=%#x(%#x), bytes=%d\n", __func__, reg, reg + (offset & ~3), offset, data, val, bytes); @@ -133,6 +135,7 @@ ar724x_pci_read_config(device_t dev, u_int bus, u_int dprintf("%s: tag (%x, %x, %x) reg %d(%d)\n", __func__, bus, slot, func, reg, bytes); + rmb(); if ((bus == 0) && (slot == 0) && (func == 0)) data = ATH_READ_REG(AR724X_PCI_CFG_BASE + (reg & ~3)); else @@ -166,6 +169,9 @@ ar724x_pci_write_config(device_t dev, u_int bus, u_int * map is for this device. Without it, it'll think the memory * map is 32 bits wide, the PCI code will then end up thinking * the register window is '0' and fail to allocate resources. + * + * Note: Test on AR7241/AR7242/AR9344! Those use a WAR value of + * 0x1000ffff. */ if (reg == PCIR_BAR(0) && bytes == 4 && ar71xx_soc == AR71XX_SOC_AR7240 @@ -284,6 +290,7 @@ ar724x_pci_fixup(device_t dev, long flash_addr, int le bar0 = ar724x_pci_read_config(dev, 0, 0, 0, PCIR_BAR(0), 4); /* Write temporary BAR0 to map the NIC into a fixed location */ + /* XXX AR7240: 0xffff; 7241/7242/9344: 0x1000ffff */ ar724x_pci_write_config(dev, 0, 0, 0, PCIR_BAR(0), AR71XX_PCI_MEM_BASE, 4); @@ -299,7 +306,7 @@ ar724x_pci_fixup(device_t dev, long flash_addr, int le val |= (*cal_data++) << 16; if (bootverbose) - printf(" 0x%08x=0x%04x\n", reg, val); + printf(" 0x%08x=0x%08x\n", reg, val); /* Write eeprom fixup data to device memory */ ATH_WRITE_REG(AR71XX_PCI_MEM_BASE + reg, val); From owner-svn-src-head@freebsd.org Thu Jul 6 05:16:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DC36D9E77A; Thu, 6 Jul 2017 05:16:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C8F8804CD; Thu, 6 Jul 2017 05:16:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v665G6s3009842; Thu, 6 Jul 2017 05:16:06 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665G6tk009841; Thu, 6 Jul 2017 05:16:06 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201707060516.v665G6tk009841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 6 Jul 2017 05:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320705 - head/sys/dev/qlxgbe X-SVN-Group: head X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: head/sys/dev/qlxgbe X-SVN-Commit-Revision: 320705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 05:16:07 -0000 Author: davidcs Date: Thu Jul 6 05:16:06 2017 New Revision: 320705 URL: https://svnweb.freebsd.org/changeset/base/320705 Log: Release mtx hw_lock before calling pause() in qla_stop() and qla_error_recovery() MFC after: 5 days Modified: head/sys/dev/qlxgbe/ql_os.c Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Thu Jul 6 04:56:23 2017 (r320704) +++ head/sys/dev/qlxgbe/ql_os.c Thu Jul 6 05:16:06 2017 (r320705) @@ -1519,8 +1519,11 @@ qla_stop(qla_host_t *ha) ha->flags.qla_watchdog_pause = 1; - while (!ha->qla_watchdog_paused) + while (!ha->qla_watchdog_paused) { + QLA_UNLOCK(ha); qla_mdelay(__func__, 1); + QLA_LOCK(ha); + } ha->flags.qla_interface_up = 0; @@ -1915,7 +1918,10 @@ qla_error_recovery(void *context, int pending) if (ha->flags.qla_interface_up) { ha->hw.imd_compl = 1; + + QLA_UNLOCK(ha); qla_mdelay(__func__, 300); + QLA_LOCK(ha); ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); From owner-svn-src-head@freebsd.org Thu Jul 6 05:32:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C536DA0E7C; Thu, 6 Jul 2017 05:32:24 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 742B5819E5; Thu, 6 Jul 2017 05:32:23 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v665WMca018398; Thu, 6 Jul 2017 05:32:22 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665WMk8018397; Thu, 6 Jul 2017 05:32:22 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201707060532.v665WMk8018397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Thu, 6 Jul 2017 05:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320714 - head/sys/dev/hptmv X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/dev/hptmv X-SVN-Commit-Revision: 320714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 05:32:24 -0000 Author: rlibby Date: Thu Jul 6 05:32:22 2017 New Revision: 320714 URL: https://svnweb.freebsd.org/changeset/base/320714 Log: hptmv: avoid gcc variably-modified warning gcc produces a "variably modified X at file scope" warning for structures that use these size definitions. PR: 211540 Reviewed by: markj Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential revision: https://reviews.freebsd.org/D11416 Modified: head/sys/dev/hptmv/vdevice.h Modified: head/sys/dev/hptmv/vdevice.h ============================================================================== --- head/sys/dev/hptmv/vdevice.h Thu Jul 6 05:30:11 2017 (r320713) +++ head/sys/dev/hptmv/vdevice.h Thu Jul 6 05:32:22 2017 (r320714) @@ -77,8 +77,8 @@ typedef struct _VDevice } VDevice; -#define ARRAY_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(RaidArray)) -#define DISK_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(Device)) +#define ARRAY_VDEV_SIZE (offsetof(VDevice, u) + sizeof(RaidArray)) +#define DISK_VDEV_SIZE (offsetof(VDevice, u) + sizeof(Device)) #define Map2pVDevice(pDev) ((PVDevice)((UINT_PTR)pDev - (UINT)(UINT_PTR)&((PVDevice)0)->u.disk)) From owner-svn-src-head@freebsd.org Thu Jul 6 05:40:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B08ECDA18A9; Thu, 6 Jul 2017 05:40:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AC8A81C93; Thu, 6 Jul 2017 05:40:52 +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 v665epBo018920; Thu, 6 Jul 2017 05:40:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665epFM018919; Thu, 6 Jul 2017 05:40:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060540.v665epFM018919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 05:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320715 - head/tools/build/options X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tools/build/options X-SVN-Commit-Revision: 320715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 05:40:52 -0000 Author: ngie Date: Thu Jul 6 05:40:51 2017 New Revision: 320715 URL: https://svnweb.freebsd.org/changeset/base/320715 Log: Add WITH_RCMDS for parity with WITHOUT_RCMDS Added: head/tools/build/options/WITH_RCMDS - copied, changed from r320663, head/tools/build/options/WITHOUT_RCMDS Copied and modified: head/tools/build/options/WITH_RCMDS (from r320663, head/tools/build/options/WITHOUT_RCMDS) ============================================================================== --- head/tools/build/options/WITHOUT_RCMDS Wed Jul 5 02:58:46 2017 (r320663, copy source) +++ head/tools/build/options/WITH_RCMDS Thu Jul 6 05:40:51 2017 (r320715) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -Disable building of the +Enable building of the .Bx r-commands. This includes From owner-svn-src-head@freebsd.org Thu Jul 6 05:43:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 450C9DA212B; Thu, 6 Jul 2017 05:43:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED4D48207D; Thu, 6 Jul 2017 05:43:05 +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 v665h5EC022755; Thu, 6 Jul 2017 05:43:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v665h58B022754; Thu, 6 Jul 2017 05:43:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060543.v665h58B022754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 05:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320716 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 320716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 05:43:06 -0000 Author: ngie Date: Thu Jul 6 05:43:04 2017 New Revision: 320716 URL: https://svnweb.freebsd.org/changeset/base/320716 Log: Regenerate src.conf(5) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Jul 6 05:40:51 2017 (r320715) +++ head/share/man/man5/src.conf.5 Thu Jul 6 05:43:04 2017 (r320716) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 20, 2017 +.Dd July 5, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -764,9 +764,18 @@ by linking against libgnuregex. Set to not build .Xr gpioctl 8 as part of the base system. +.It Va WITHOUT_GPL_DTC +Set to build the BSD licensed version of the device tree compiler rather +than the GPLed one from elinux.org. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITH_GPL_DTC Set to build the GPL'd version of the device tree compiler from elinux.org, instead of the BSD licensed one. +.Pp +This is a default setting on +riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITHOUT_GSSAPI Set to not build libgssapi. .It Va WITHOUT_HAST @@ -1270,8 +1279,8 @@ by proxy. .It Va WITHOUT_RBOOTD Set to not build or install .Xr rbootd 8 . -.It Va WITHOUT_RCMDS -Disable building of the +.It Va WITH_RCMDS +Enable building of the .Bx r-commands. This includes @@ -1536,6 +1545,19 @@ protocols (usable only via 802.1X). Set to not build ZFS file system. .It Va WITHOUT_ZONEINFO Set to not build the timezone database. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_ZONEINFO_LEAPSECONDS_SUPPORT +.It +.Va WITHOUT_ZONEINFO_OLD_TIMEZONES_SUPPORT +.El +.It Va WITH_ZONEINFO_LEAPSECONDS_SUPPORT +Set to build leapsecond information in to the timezone database. +.It Va WITH_ZONEINFO_OLD_TIMEZONES_SUPPORT +Set to build backward compatibility timezone aliases in to the timezone +database. .El .Sh FILES .Bl -tag -compact -width Pa From owner-svn-src-head@freebsd.org Thu Jul 6 06:15:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF432DA4AD0; Thu, 6 Jul 2017 06:15:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB8D483585; Thu, 6 Jul 2017 06:15:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v666Fiq5035568; Thu, 6 Jul 2017 06:15:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v666Fi56035567; Thu, 6 Jul 2017 06:15:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060615.v666Fi56035567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 06:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320723 - head/usr.bin/stat/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/usr.bin/stat/tests X-SVN-Commit-Revision: 320723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 06:15:46 -0000 Author: ngie Date: Thu Jul 6 06:15:44 2017 New Revision: 320723 URL: https://svnweb.freebsd.org/changeset/base/320723 Log: Use %e instead of %d with x_output_date(..) stat -x doesn't 0-fill days so %d is inappropriate. %e is correct. MFC after: 1 week MFC with: r319841 Modified: head/usr.bin/stat/tests/stat_test.sh Modified: head/usr.bin/stat/tests/stat_test.sh ============================================================================== --- head/usr.bin/stat/tests/stat_test.sh Thu Jul 6 05:59:27 2017 (r320722) +++ head/usr.bin/stat/tests/stat_test.sh Thu Jul 6 06:15:44 2017 (r320723) @@ -165,7 +165,7 @@ t_flag_body() x_output_date() { - local date_format='%a %b %d %H:%M:%S %Y' + local date_format='%a %b %e %H:%M:%S %Y' stat -t "$date_format" "$@" } From owner-svn-src-head@freebsd.org Thu Jul 6 07:37:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 964E7DA6A4E; Thu, 6 Jul 2017 07:37:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5871D770; Thu, 6 Jul 2017 07:37:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v667b3p5068077; Thu, 6 Jul 2017 07:37:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v667b3LC068075; Thu, 6 Jul 2017 07:37:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060737.v667b3LC068075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 07:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320724 - head/usr.bin/stat/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/usr.bin/stat/tests X-SVN-Commit-Revision: 320724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 07:37:04 -0000 Author: ngie Date: Thu Jul 6 07:37:03 2017 New Revision: 320724 URL: https://svnweb.freebsd.org/changeset/base/320724 Log: :l_flag:: be more aggressive when normalizing whitespace Save output from ls -ldT and stat -l, then normalize all repeating whitespace using sed to single column spaces. This makes the test flexible with single-digit days, etc, similar to r320723. This approach is just a bit more of a hammer approach because of how the columns are ordered/spaced in both ls and stat. MFC after: 1 week MFC with: r319841 Modified: head/usr.bin/stat/tests/stat_test.sh Modified: head/usr.bin/stat/tests/stat_test.sh ============================================================================== --- head/usr.bin/stat/tests/stat_test.sh Thu Jul 6 06:15:44 2017 (r320723) +++ head/usr.bin/stat/tests/stat_test.sh Thu Jul 6 07:37:03 2017 (r320724) @@ -60,14 +60,23 @@ l_flag_body() paths="a b c d" + ls_out=ls.output + stat_out=stat.output + # NOTE: # - Even though stat -l claims to be equivalent to `ls -lT`, the # whitespace is a bit more liberal in the `ls -lT` output. # - `ls -ldT` is used to not recursively list the contents of # directories. for path in $paths; do - atf_check -o inline:"$(ls -ldT $path | sed -e 's, , ,g')\n" \ - stat -l $path + atf_check -o save:$ls_out ls -ldT $path + cat $ls_out + atf_check -o save:$stat_out stat -l $path + cat $stat_out + echo "Comparing normalized whitespace" + atf_check sed -i '' -E -e 's/[[:space:]]+/ /g' $ls_out + atf_check sed -i '' -E -e 's/[[:space:]]+/ /g' $stat_out + atf_check cmp $ls_out $stat_out done } From owner-svn-src-head@freebsd.org Thu Jul 6 07:37:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9077DA6AAE; Thu, 6 Jul 2017 07:37: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 mx1.freebsd.org (Postfix) with ESMTPS id 645258BD; Thu, 6 Jul 2017 07:37: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 v667bYwA068142; Thu, 6 Jul 2017 07:37:34 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v667bX5w068134; Thu, 6 Jul 2017 07:37:33 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201707060737.v667bX5w068134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 6 Jul 2017 07:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320725 - in head/sys/dev/rtwn: . pci usb X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev/rtwn: . pci usb X-SVN-Commit-Revision: 320725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 07:37:35 -0000 Author: avos Date: Thu Jul 6 07:37:33 2017 New Revision: 320725 URL: https://svnweb.freebsd.org/changeset/base/320725 Log: rtwn: add Rx descriptor structures for common code. Remove any chipset specific usage of Rx descriptor structure / bits from common code to prevent misuse of fields that may differ between various chipsets. Checked with: RTL8821AU in STA mode. Modified: head/sys/dev/rtwn/if_rtwn_rx.c head/sys/dev/rtwn/if_rtwnreg.h head/sys/dev/rtwn/pci/rtwn_pci_attach.c head/sys/dev/rtwn/pci/rtwn_pci_rx.c head/sys/dev/rtwn/pci/rtwn_pci_rx.h head/sys/dev/rtwn/pci/rtwn_pci_var.h head/sys/dev/rtwn/usb/rtwn_usb_rx.c Modified: head/sys/dev/rtwn/if_rtwn_rx.c ============================================================================== --- head/sys/dev/rtwn/if_rtwn_rx.c Thu Jul 6 07:37:03 2017 (r320724) +++ head/sys/dev/rtwn/if_rtwn_rx.c Thu Jul 6 07:37:33 2017 (r320725) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include void @@ -190,7 +189,8 @@ rtwn_get_tsf(struct rtwn_softc *sc, uint64_t *buf, int } static uint64_t -rtwn_extend_rx_tsf(struct rtwn_softc *sc, const struct r92c_rx_stat *stat) +rtwn_extend_rx_tsf(struct rtwn_softc *sc, + const struct rtwn_rx_stat_common *stat) { uint64_t tsft; uint32_t rxdw3, tsfl, tsfl_curr; @@ -198,7 +198,7 @@ rtwn_extend_rx_tsf(struct rtwn_softc *sc, const struct rxdw3 = le32toh(stat->rxdw3); tsfl = le32toh(stat->tsf_low); - id = MS(rxdw3, R92C_RXDW3_BSSID_FIT); + id = MS(rxdw3, RTWN_RXDW3_BSSID01_FIT); switch (id) { case 1: @@ -241,7 +241,7 @@ rtwn_rx_common(struct rtwn_softc *sc, struct mbuf *m, struct ieee80211_frame_min *wh; struct ieee80211_rx_stats rxs; struct rtwn_node *un; - struct r92c_rx_stat *stat; + struct rtwn_rx_stat_common *stat; void *physt; uint32_t rxdw0; int8_t rssi; @@ -250,10 +250,10 @@ rtwn_rx_common(struct rtwn_softc *sc, struct mbuf *m, stat = desc; rxdw0 = le32toh(stat->rxdw0); - cipher = MS(rxdw0, R92C_RXDW0_CIPHER); - infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8; - pktlen = MS(rxdw0, R92C_RXDW0_PKTLEN); - shift = MS(rxdw0, R92C_RXDW0_SHIFT); + cipher = MS(rxdw0, RTWN_RXDW0_CIPHER); + infosz = MS(rxdw0, RTWN_RXDW0_INFOSZ) * 8; + pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); + shift = MS(rxdw0, RTWN_RXDW0_SHIFT); wh = (struct ieee80211_frame_min *)(mtodo(m, shift + infosz)); if ((wh->i_fc[1] & IEEE80211_FC1_PROTECTED) && @@ -268,7 +268,7 @@ rtwn_rx_common(struct rtwn_softc *sc, struct mbuf *m, ni = NULL; un = RTWN_NODE(ni); - if (infosz != 0 && (rxdw0 & R92C_RXDW0_PHYST)) + if (infosz != 0 && (rxdw0 & RTWN_RXDW0_PHYST)) physt = (void *)mtodo(m, shift); else physt = (un != NULL) ? &un->last_physt : &sc->last_physt; @@ -284,7 +284,7 @@ rtwn_rx_common(struct rtwn_softc *sc, struct mbuf *m, /* Add some common bits. */ /* NB: should not happen. */ - if (rxdw0 & R92C_RXDW0_CRCERR) + if (rxdw0 & RTWN_RXDW0_CRCERR) rxs.c_pktflags |= IEEE80211_RX_F_FAIL_FCSCRC; rxs.r_flags |= IEEE80211_R_TSF_START; /* XXX undocumented */ @@ -298,7 +298,7 @@ rtwn_rx_common(struct rtwn_softc *sc, struct mbuf *m, /* XXX TODO: we really need a rate-to-string method */ RTWN_DPRINTF(sc, RTWN_DEBUG_RSSI, "%s: rssi %d, rate %d\n", __func__, rssi, rxs.c_rate); - if (un != NULL && infosz != 0 && (rxdw0 & R92C_RXDW0_PHYST)) { + if (un != NULL && infosz != 0 && (rxdw0 & RTWN_RXDW0_PHYST)) { /* Update our average RSSI. */ rtwn_update_avgrssi(sc, un, rssi, is_cck); } Modified: head/sys/dev/rtwn/if_rtwnreg.h ============================================================================== --- head/sys/dev/rtwn/if_rtwnreg.h Thu Jul 6 07:37:03 2017 (r320724) +++ head/sys/dev/rtwn/if_rtwnreg.h Thu Jul 6 07:37:33 2017 (r320725) @@ -48,6 +48,55 @@ struct rtwn_tx_desc_common { } txdw7; } __packed __attribute__((aligned(4))); +/* Common part of Rx descriptor. */ +struct rtwn_rx_stat_common { + uint32_t rxdw0; +#define RTWN_RXDW0_PKTLEN_M 0x00003fff +#define RTWN_RXDW0_PKTLEN_S 0 +#define RTWN_RXDW0_CRCERR 0x00004000 +#define RTWN_RXDW0_ICVERR 0x00008000 +#define RTWN_RXDW0_INFOSZ_M 0x000f0000 +#define RTWN_RXDW0_INFOSZ_S 16 +#define RTWN_RXDW0_CIPHER_M 0x00700000 +#define RTWN_RXDW0_CIPHER_S 20 +#define RTWN_RXDW0_QOS 0x00800000 +#define RTWN_RXDW0_SHIFT_M 0x03000000 +#define RTWN_RXDW0_SHIFT_S 24 +#define RTWN_RXDW0_PHYST 0x04000000 +#define RTWN_RXDW0_SWDEC 0x08000000 +#define RTWN_RXDW0_LS 0x10000000 +#define RTWN_RXDW0_FS 0x20000000 +#define RTWN_RXDW0_EOR 0x40000000 +#define RTWN_RXDW0_OWN 0x80000000 + + uint32_t rxdw1; +#define RTWN_RXDW1_AMSDU 0x00002000 +#define RTWN_RXDW1_MC 0x40000000 +#define RTWN_RXDW1_BC 0x80000000 + + uint32_t rxdw2; + uint32_t rxdw3; +#define RTWN_RXDW3_HTC 0x00000400 +#define RTWN_RXDW3_BSSID01_FIT_M 0x00003000 +#define RTWN_RXDW3_BSSID01_FIT_S 12 + + uint32_t rxdw4; + uint32_t tsf_low; +} __packed __attribute__((aligned(4))); + +/* Rx descriptor for PCIe devices. */ +struct rtwn_rx_stat_pci { + uint32_t rxdw0; + uint32_t rxdw1; + uint32_t rxdw2; + uint32_t rxdw3; + uint32_t rxdw4; + uint32_t tsf_low; + + uint32_t rxbufaddr; + uint32_t rxbufaddr64; +} __packed __attribute__((aligned(4))); + /* * Macros to access subfields in registers. */ Modified: head/sys/dev/rtwn/pci/rtwn_pci_attach.c ============================================================================== --- head/sys/dev/rtwn/pci/rtwn_pci_attach.c Thu Jul 6 07:37:03 2017 (r320724) +++ head/sys/dev/rtwn/pci/rtwn_pci_attach.c Thu Jul 6 07:37:33 2017 (r320725) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include static device_probe_t rtwn_pci_probe; @@ -133,7 +132,7 @@ rtwn_pci_alloc_rx_list(struct rtwn_softc *sc) int i, error; /* Allocate Rx descriptors. */ - size = sizeof(struct r92ce_rx_stat) * RTWN_PCI_RX_LIST_COUNT; + size = sizeof(struct rtwn_rx_stat_pci) * RTWN_PCI_RX_LIST_COUNT; error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL, &rx_ring->desc_dmat); Modified: head/sys/dev/rtwn/pci/rtwn_pci_rx.c ============================================================================== --- head/sys/dev/rtwn/pci/rtwn_pci_rx.c Thu Jul 6 07:37:03 2017 (r320724) +++ head/sys/dev/rtwn/pci/rtwn_pci_rx.c Thu Jul 6 07:37:33 2017 (r320725) @@ -56,9 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include - void rtwn_pci_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) @@ -71,21 +69,21 @@ rtwn_pci_dma_map_addr(void *arg, bus_dma_segment_t *se } void -rtwn_pci_setup_rx_desc(struct rtwn_pci_softc *pc, struct r92ce_rx_stat *desc, - bus_addr_t addr, size_t len, int idx) +rtwn_pci_setup_rx_desc(struct rtwn_pci_softc *pc, + struct rtwn_rx_stat_pci *desc, bus_addr_t addr, size_t len, int idx) { memset(desc, 0, sizeof(*desc)); - desc->rxdw0 = htole32(SM(R92C_RXDW0_PKTLEN, len) | - ((idx == RTWN_PCI_RX_LIST_COUNT - 1) ? R92C_RXDW0_EOR : 0)); + desc->rxdw0 = htole32(SM(RTWN_RXDW0_PKTLEN, len) | + ((idx == RTWN_PCI_RX_LIST_COUNT - 1) ? RTWN_RXDW0_EOR : 0)); desc->rxbufaddr = htole32(addr); bus_space_barrier(pc->pc_st, pc->pc_sh, 0, pc->pc_mapsize, BUS_SPACE_BARRIER_WRITE); - desc->rxdw0 |= htole32(R92C_RXDW0_OWN); + desc->rxdw0 |= htole32(RTWN_RXDW0_OWN); } static void -rtwn_pci_rx_frame(struct rtwn_softc *sc, struct r92ce_rx_stat *rx_desc, +rtwn_pci_rx_frame(struct rtwn_softc *sc, struct rtwn_rx_stat_pci *rx_desc, int desc_idx) { struct rtwn_pci_softc *pc = RTWN_PCI_SOFTC(sc); @@ -107,18 +105,18 @@ rtwn_pci_rx_frame(struct rtwn_softc *sc, struct r92ce_ le32toh(rx_desc->rxbufaddr), le32toh(rx_desc->rxbufaddr64)); rxdw0 = le32toh(rx_desc->rxdw0); - if (__predict_false(rxdw0 & (R92C_RXDW0_CRCERR | R92C_RXDW0_ICVERR))) { + if (__predict_false(rxdw0 & (RTWN_RXDW0_CRCERR | RTWN_RXDW0_ICVERR))) { /* * This should not happen since we setup our Rx filter * to not receive these frames. */ RTWN_DPRINTF(sc, RTWN_DEBUG_RECV, "%s: RX flags error (%s)\n", __func__, - rxdw0 & R92C_RXDW0_CRCERR ? "CRC" : "ICV"); + rxdw0 & RTWN_RXDW0_CRCERR ? "CRC" : "ICV"); goto fail; } - pktlen = MS(rxdw0, R92C_RXDW0_PKTLEN); + pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); if (__predict_false(pktlen < sizeof(struct ieee80211_frame_ack) || pktlen > MJUMPAGESIZE)) { RTWN_DPRINTF(sc, RTWN_DEBUG_RECV, @@ -126,8 +124,8 @@ rtwn_pci_rx_frame(struct rtwn_softc *sc, struct r92ce_ goto fail; } - infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8; - shift = MS(rxdw0, R92C_RXDW0_SHIFT); + infosz = MS(rxdw0, RTWN_RXDW0_INFOSZ) * 8; + shift = MS(rxdw0, RTWN_RXDW0_SHIFT); m1 = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (__predict_false(m1 == NULL)) { @@ -268,9 +266,9 @@ rtwn_pci_rx_done(struct rtwn_softc *sc) bus_dmamap_sync(ring->desc_dmat, ring->desc_map, BUS_DMASYNC_POSTREAD); for (;;) { - struct r92ce_rx_stat *rx_desc = &ring->desc[ring->cur]; + struct rtwn_rx_stat_pci *rx_desc = &ring->desc[ring->cur]; - if (le32toh(rx_desc->rxdw0) & R92C_RXDW0_OWN) + if (le32toh(rx_desc->rxdw0) & RTWN_RXDW0_OWN) break; rtwn_pci_rx_frame(sc, rx_desc, ring->cur); Modified: head/sys/dev/rtwn/pci/rtwn_pci_rx.h ============================================================================== --- head/sys/dev/rtwn/pci/rtwn_pci_rx.h Thu Jul 6 07:37:03 2017 (r320724) +++ head/sys/dev/rtwn/pci/rtwn_pci_rx.h Thu Jul 6 07:37:33 2017 (r320725) @@ -21,7 +21,7 @@ void rtwn_pci_dma_map_addr(void *, bus_dma_segment_t *, int, int); void rtwn_pci_setup_rx_desc(struct rtwn_pci_softc *, - struct r92ce_rx_stat *, bus_addr_t, size_t, int); + struct rtwn_rx_stat_pci *, bus_addr_t, size_t, int); void rtwn_pci_intr(void *); #endif /* RTWN_PCI_RX_H */ Modified: head/sys/dev/rtwn/pci/rtwn_pci_var.h ============================================================================== --- head/sys/dev/rtwn/pci/rtwn_pci_var.h Thu Jul 6 07:37:03 2017 (r320724) +++ head/sys/dev/rtwn/pci/rtwn_pci_var.h Thu Jul 6 07:37:33 2017 (r320725) @@ -23,9 +23,6 @@ #ifndef RTWN_PCI_VAR_H #define RTWN_PCI_VAR_H -#include - - #define RTWN_PCI_RX_LIST_COUNT 256 #define RTWN_PCI_TX_LIST_COUNT 256 @@ -36,7 +33,7 @@ struct rtwn_rx_data { }; struct rtwn_rx_ring { - struct r92ce_rx_stat *desc; + struct rtwn_rx_stat_pci *desc; bus_addr_t paddr; bus_dma_tag_t desc_dmat; bus_dmamap_t desc_map; Modified: head/sys/dev/rtwn/usb/rtwn_usb_rx.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_rx.c Thu Jul 6 07:37:03 2017 (r320724) +++ head/sys/dev/rtwn/usb/rtwn_usb_rx.c Thu Jul 6 07:37:33 2017 (r320725) @@ -63,12 +63,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* for CAM_ALGO_NONE */ -#include - static struct mbuf * -rtwn_rx_copy_to_mbuf(struct rtwn_softc *sc, struct r92c_rx_stat *stat, +rtwn_rx_copy_to_mbuf(struct rtwn_softc *sc, struct rtwn_rx_stat_common *stat, int totlen) { struct ieee80211com *ic = &sc->sc_ic; @@ -93,18 +90,18 @@ rtwn_rx_copy_to_mbuf(struct rtwn_softc *sc, struct r92 return (NULL); rxdw0 = le32toh(stat->rxdw0); - if (__predict_false(rxdw0 & (R92C_RXDW0_CRCERR | R92C_RXDW0_ICVERR))) { + if (__predict_false(rxdw0 & (RTWN_RXDW0_CRCERR | RTWN_RXDW0_ICVERR))) { /* * This should not happen since we setup our Rx filter * to not receive these frames. */ RTWN_DPRINTF(sc, RTWN_DEBUG_RECV, "%s: RX flags error (%s)\n", __func__, - rxdw0 & R92C_RXDW0_CRCERR ? "CRC" : "ICV"); + rxdw0 & RTWN_RXDW0_CRCERR ? "CRC" : "ICV"); goto fail; } - pktlen = MS(rxdw0, R92C_RXDW0_PKTLEN); + pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); if (__predict_false(pktlen < sizeof(struct ieee80211_frame_ack))) { /* * Should not happen (because of Rx filter setup). @@ -140,21 +137,21 @@ static struct mbuf * rtwn_rxeof(struct rtwn_softc *sc, uint8_t *buf, int len) { struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); - struct r92c_rx_stat *stat; + struct rtwn_rx_stat_common *stat; struct mbuf *m, *m0 = NULL; uint32_t rxdw0; int totlen, pktlen, infosz; /* Process packets. */ while (len >= sizeof(*stat)) { - stat = (struct r92c_rx_stat *)buf; + stat = (struct rtwn_rx_stat_common *)buf; rxdw0 = le32toh(stat->rxdw0); - pktlen = MS(rxdw0, R92C_RXDW0_PKTLEN); + pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); if (__predict_false(pktlen == 0)) break; - infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8; + infosz = MS(rxdw0, RTWN_RXDW0_INFOSZ) * 8; /* Make sure everything fits in xfer. */ totlen = sizeof(*stat) + infosz + pktlen; @@ -193,7 +190,7 @@ rtwn_report_intr(struct rtwn_usb_softc *uc, struct usb usbd_xfer_status(xfer, &len, NULL, NULL, NULL); - if (__predict_false(len < sizeof(struct r92c_rx_stat))) { + if (__predict_false(len < sizeof(struct rtwn_rx_stat_common))) { counter_u64_add(ic->ic_ierrors, 1); return (NULL); } @@ -238,11 +235,11 @@ rtwn_report_intr(struct rtwn_usb_softc *uc, struct usb static struct ieee80211_node * rtwn_rx_frame(struct rtwn_softc *sc, struct mbuf *m) { - struct r92c_rx_stat stat; + struct rtwn_rx_stat_common stat; /* Imitate PCIe layout. */ - m_copydata(m, 0, sizeof(struct r92c_rx_stat), (caddr_t)&stat); - m_adj(m, sizeof(struct r92c_rx_stat)); + m_copydata(m, 0, sizeof(stat), (caddr_t)&stat); + m_adj(m, sizeof(stat)); return (rtwn_rx_common(sc, m, &stat)); } From owner-svn-src-head@freebsd.org Thu Jul 6 07:45:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF9B5DA6DB7; Thu, 6 Jul 2017 07:45:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9B53DB7; Thu, 6 Jul 2017 07:45:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v667jKVX072370; Thu, 6 Jul 2017 07:45:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v667jK3s072369; Thu, 6 Jul 2017 07:45:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060745.v667jK3s072369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 07:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320726 - head/contrib/netbsd-tests/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/contrib/netbsd-tests/lib/libc/stdio X-SVN-Commit-Revision: 320726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 07:45:22 -0000 Author: ngie Date: Thu Jul 6 07:45:20 2017 New Revision: 320726 URL: https://svnweb.freebsd.org/changeset/base/320726 Log: Expect :snprintf_float to segfault This issue started occurring within the past month or so. PR: 220502 Reported by: Jenkins (amd64-head job) Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Thu Jul 6 07:37:33 2017 (r320725) +++ head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Thu Jul 6 07:45:20 2017 (r320726) @@ -140,6 +140,10 @@ ATF_TC_BODY(snprintf_float, tc) char buf[1000]; struct rlimit rl; +#ifdef __FreeBSD__ + atf_tc_expect_signal(SIGSEGV, "test segfaults; PR # 220502"); +#endif + rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; ATF_CHECK(setrlimit(RLIMIT_AS, &rl) != -1); rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; From owner-svn-src-head@freebsd.org Thu Jul 6 07:59:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BEA0DA73B0; Thu, 6 Jul 2017 07:59:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 094F01625; Thu, 6 Jul 2017 07:59:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v667x1sl076399; Thu, 6 Jul 2017 07:59:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v667x1OT076398; Thu, 6 Jul 2017 07:59:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060759.v667x1OT076398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 07:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320727 - head/contrib/netbsd-tests/lib/libc/stdio X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/contrib/netbsd-tests/lib/libc/stdio X-SVN-Commit-Revision: 320727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 07:59:02 -0000 Author: ngie Date: Thu Jul 6 07:59:00 2017 New Revision: 320727 URL: https://svnweb.freebsd.org/changeset/base/320727 Log: :snprintf_float: don't blindly set RLIMIT_DATA and RLIMIT_AS to 1 MB -- raise the limit to 32MB instead. Require user=root and memory=64MB+ first so one can be reasonably sure that the test will function appropriately. MFC after: 1 month MFC with: r320726 PR: 220502 Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Modified: head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Thu Jul 6 07:45:20 2017 (r320726) +++ head/contrib/netbsd-tests/lib/libc/stdio/t_printf.c Thu Jul 6 07:59:00 2017 (r320727) @@ -127,6 +127,10 @@ ATF_TC_HEAD(snprintf_float, tc) atf_tc_set_md_var(tc, "descr", "test that floating conversions don't" " leak memory"); +#ifdef __FreeBSD__ + atf_tc_set_md_var(tc, "require.memory", "64m"); + atf_tc_set_md_var(tc, "require.user", "root"); +#endif } ATF_TC_BODY(snprintf_float, tc) @@ -141,13 +145,16 @@ ATF_TC_BODY(snprintf_float, tc) struct rlimit rl; #ifdef __FreeBSD__ - atf_tc_expect_signal(SIGSEGV, "test segfaults; PR # 220502"); -#endif - + rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; + ATF_CHECK(setrlimit(RLIMIT_AS, &rl) != -1); + rl.rlim_cur = rl.rlim_max = 32 * 1024 * 1024; + ATF_CHECK(setrlimit(RLIMIT_DATA, &rl) != -1); +#else rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; ATF_CHECK(setrlimit(RLIMIT_AS, &rl) != -1); rl.rlim_cur = rl.rlim_max = 1 * 1024 * 1024; ATF_CHECK(setrlimit(RLIMIT_DATA, &rl) != -1); +#endif time(&now); srand(now); From owner-svn-src-head@freebsd.org Thu Jul 6 08:05:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF52EDA7818; Thu, 6 Jul 2017 08:05:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DE8D1AA8; Thu, 6 Jul 2017 08:05:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6685v6b080227; Thu, 6 Jul 2017 08:05:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6685vbK080225; Thu, 6 Jul 2017 08:05:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707060805.v6685vbK080225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 6 Jul 2017 08:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320728 - head/usr.bin/xo/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/usr.bin/xo/tests X-SVN-Commit-Revision: 320728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 08:05:58 -0000 Author: ngie Date: Thu Jul 6 08:05:57 2017 New Revision: 320728 URL: https://svnweb.freebsd.org/changeset/base/320728 Log: Chase upstream change deprecating LIBXO_OPTIONS similar to r320521 LIBXO_OPTIONS was deprecated in favor of the --libxo options. Inspired by: https://github.com/Juniper/libxo (02272d5c6d7d) Modified: head/usr.bin/xo/tests/functional_test.sh Modified: head/usr.bin/xo/tests/functional_test.sh ============================================================================== --- head/usr.bin/xo/tests/functional_test.sh Thu Jul 6 07:59:00 2017 (r320727) +++ head/usr.bin/xo/tests/functional_test.sh Thu Jul 6 08:05:57 2017 (r320728) @@ -42,8 +42,8 @@ check() atf_check -s exit:0 -e file:${err_file} -o file:${out_file} \ env LC_ALL=en_US.UTF-8 \ - LIBXO_OPTIONS=":W${xo_fmt}" TZ="EST" "${SRCDIR}/${tc}" \ - ${XO} + TZ="EST" "${SRCDIR}/${tc}" \ + "${XO} --libxo:W${xo_fmt}" } add_testcase() From owner-svn-src-head@freebsd.org Thu Jul 6 08:36:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A5D3DA7E39; Thu, 6 Jul 2017 08:36:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B32DF274E; Thu, 6 Jul 2017 08:36:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v668aEJB092472; Thu, 6 Jul 2017 08:36:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v668aEC0092471; Thu, 6 Jul 2017 08:36:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707060836.v668aEC0092471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 6 Jul 2017 08:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320729 - head/sys/geom X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/geom X-SVN-Commit-Revision: 320729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 08:36:16 -0000 Author: mav Date: Thu Jul 6 08:36:14 2017 New Revision: 320729 URL: https://svnweb.freebsd.org/changeset/base/320729 Log: Add GEOM::descr attribute for symmetry with GEOM::ident. MFC after: 2 weeks Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Thu Jul 6 08:05:57 2017 (r320728) +++ head/sys/geom/geom_disk.c Thu Jul 6 08:36:14 2017 (r320729) @@ -501,6 +501,8 @@ g_disk_start(struct bio *bp) break; else if (g_handleattr_str(bp, "GEOM::ident", dp->d_ident)) break; + else if (g_handleattr_str(bp, "GEOM::descr", dp->d_descr)) + break; else if (g_handleattr_uint16_t(bp, "GEOM::hba_vendor", dp->d_hba_vendor)) break; From owner-svn-src-head@freebsd.org Thu Jul 6 09:05:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A212ADA8966; Thu, 6 Jul 2017 09:05:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 716523514; Thu, 6 Jul 2017 09:05:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6695cca004990; Thu, 6 Jul 2017 09:05:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6695cb5004989; Thu, 6 Jul 2017 09:05:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707060905.v6695cb5004989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 6 Jul 2017 09:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320730 - head/usr.sbin/diskinfo X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/usr.sbin/diskinfo X-SVN-Commit-Revision: 320730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 09:05:39 -0000 Author: mav Date: Thu Jul 6 09:05:38 2017 New Revision: 320730 URL: https://svnweb.freebsd.org/changeset/base/320730 Log: Report device descr in addition to ident. Serial number without device model is somewhat less useful. MFC after: 2 weeks Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Thu Jul 6 08:36:14 2017 (r320729) +++ head/usr.sbin/diskinfo/diskinfo.c Thu Jul 6 09:05:38 2017 (r320730) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -73,6 +74,7 @@ main(int argc, char **argv) int i, ch, fd, error, exitval = 0; char buf[BUFSIZ], ident[DISK_IDENT_SIZE], physpath[MAXPATHLEN]; char zone_desc[64]; + struct diocgattr_arg arg; off_t mediasize, stripesize, stripeoffset; u_int sectorsize, fwsectors, fwheads, zoned = 0, isreg; uint32_t zone_mode; @@ -230,6 +232,10 @@ main(int argc, char **argv) printf("\t%-12u\t# Heads according to firmware.\n", fwheads); printf("\t%-12u\t# Sectors according to firmware.\n", fwsectors); } + strlcpy(arg.name, "GEOM::descr", sizeof(arg.name)); + arg.len = sizeof(arg.value.str); + if (ioctl(fd, DIOCGATTR, &arg) == 0) + printf("\t%-12s\t# Disk descr.\n", arg.value.str); if (ioctl(fd, DIOCGIDENT, ident) == 0) printf("\t%-12s\t# Disk ident.\n", ident); if (ioctl(fd, DIOCGPHYSPATH, physpath) == 0) From owner-svn-src-head@freebsd.org Thu Jul 6 10:31:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3F78DA9F00; Thu, 6 Jul 2017 10:31:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87A3565BB2; Thu, 6 Jul 2017 10:31:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (d-24-245-127-120.cpe.metrocast.net [24.245.127.120]) by mail.baldwin.cx (Postfix) with ESMTPSA id 17B7410AF01; Thu, 6 Jul 2017 06:31:57 -0400 (EDT) Subject: Re: svn commit: r320701 - in head: bin sbin usr.bin usr.sbin To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201707060415.v664FU9n085204@repo.freebsd.org> From: John Baldwin Message-ID: <4ac448c4-af76-de43-5dbc-370492962d59@FreeBSD.org> Date: Thu, 6 Jul 2017 06:31:57 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <201707060415.v664FU9n085204@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 06 Jul 2017 06:31:57 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 10:31:59 -0000 On 7/6/17 12:15 AM, Ngie Cooper wrote: > Author: ngie > Date: Thu Jul 6 04:15:30 2017 > New Revision: 320701 > URL: https://svnweb.freebsd.org/changeset/base/320701 > > Log: > Remove SUBDIR ordering/uniquifying in *bin/Makefile > > After the addition of SUBDIR.yes, uniquifying/ordering the SUBDIRs doesn't > make a whole lot of sense, and it's in effect a half measure. > > Ordering SUBDIR (after adding SUBDIR.yes to it) in bsd.subdir.mk is a > separate change that warrants more discussion/testing, because while > the SUBDIR_PARALLEL work largely fixed dependency ordering for SUBDIRs, > there might be downstream FreeBSD consumers that rely on the SUBDIR > ordering. FWIW, I (as a human) am used to sorted build output when watching the output of 'buildworld' to gauge how far it has completed. This was a feature that SVN broke (CVS would walk directories in sorted order so you could do the same sort of guessing for 'cvs up' but you can't for 'svn up'). It's not a hard dependency, per se, but it would be nice to preserve this feature if possible. I had noticed that it had become less correct "recently". -- John Baldwin From owner-svn-src-head@freebsd.org Thu Jul 6 12:19:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF766DAC361; Thu, 6 Jul 2017 12:19:16 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC9DC68B9B; Thu, 6 Jul 2017 12:19:16 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66CJFe6083604; Thu, 6 Jul 2017 12:19:15 GMT (envelope-from robak@FreeBSD.org) Received: (from robak@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66CJFBa083603; Thu, 6 Jul 2017 12:19:15 GMT (envelope-from robak@FreeBSD.org) Message-Id: <201707061219.v66CJFBa083603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: robak set sender to robak@FreeBSD.org using -f From: Bartek Rutkowski Date: Thu, 6 Jul 2017 12:19:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320732 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: robak X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 320732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 12:19:17 -0000 Author: robak (ports committer) Date: Thu Jul 6 12:19:15 2017 New Revision: 320732 URL: https://svnweb.freebsd.org/changeset/base/320732 Log: usr.sbin/bsdinstall/scripts/hardening: fix options numbers Submitted by: Bartek Rutkowski Reviewed by: bapt Approved by: bapt MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D11505 Modified: head/usr.sbin/bsdinstall/scripts/hardening Modified: head/usr.sbin/bsdinstall/scripts/hardening ============================================================================== --- head/usr.sbin/bsdinstall/scripts/hardening Thu Jul 6 11:45:13 2017 (r320731) +++ head/usr.sbin/bsdinstall/scripts/hardening Thu Jul 6 12:19:15 2017 (r320732) @@ -46,7 +46,7 @@ FEATURES=$( dialog --backtitle "FreeBSD Installer" \ "7 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ "8 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ "9 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ - "9 secure_console" "Enable console password prompt" ${secure_console:-off} \ + "10 secure_console" "Enable console password prompt" ${secure_console:-off} \ 2>&1 1>&3 ) exec 3>&- From owner-svn-src-head@freebsd.org Thu Jul 6 12:27:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2195DAC660; Thu, 6 Jul 2017 12:27:15 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B14A26A062; Thu, 6 Jul 2017 12:27:15 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66CREpd087462; Thu, 6 Jul 2017 12:27:14 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66CREhU087461; Thu, 6 Jul 2017 12:27:14 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707061227.v66CREhU087461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 6 Jul 2017 12:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320733 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 320733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 12:27:16 -0000 Author: trasz Date: Thu Jul 6 12:27:14 2017 New Revision: 320733 URL: https://svnweb.freebsd.org/changeset/base/320733 Log: Make ddb(4) a bit more user-friendly by improving "help". Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/ddb/db_command.c Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Thu Jul 6 12:19:15 2017 (r320732) +++ head/sys/ddb/db_command.c Thu Jul 6 12:27:14 2017 (r320733) @@ -325,11 +325,26 @@ static void db_cmd_list(struct command_table *table) { struct command *cmd; + int have_subcommands; + have_subcommands = 0; LIST_FOREACH(cmd, table, next) { + if (cmd->more != NULL) + have_subcommands++; db_printf("%-16s", cmd->name); db_end_line(16); } + + if (have_subcommands > 0) { + db_printf("\nThe following have subcommands; append \"help\" " + "to list (e.g. \"show help\"):\n"); + LIST_FOREACH(cmd, table, next) { + if (cmd->more == NULL) + continue; + db_printf("%-16s", cmd->name); + db_end_line(16); + } + } } static void @@ -371,7 +386,8 @@ db_command(struct command **last_cmdp, struct command_ &cmd); switch (result) { case CMD_NONE: - db_printf("No such command\n"); + db_printf("No such command; use \"help\" " + "to list available commands\n"); db_flush_lex(); return; case CMD_AMBIGUOUS: @@ -379,6 +395,13 @@ db_command(struct command **last_cmdp, struct command_ db_flush_lex(); return; case CMD_HELP: + if (cmd_table == &db_cmd_table) { + db_printf("This is ddb(4), the kernel debugger; " + "see http://man.freebsd.org/ddb/4 for help.\n"); + db_printf("Use \"bt\" for backtrace, \"dump\" for " + "kernel core dump, \"reset\" to reboot.\n"); + db_printf("Available commands:\n"); + } db_cmd_list(cmd_table); db_flush_lex(); return; @@ -388,6 +411,8 @@ db_command(struct command **last_cmdp, struct command_ if ((cmd_table = cmd->more) != NULL) { t = db_read_token(); if (t != tIDENT) { + db_printf("Subcommand required; " + "available subcommands:\n"); db_cmd_list(cmd_table); db_flush_lex(); return; From owner-svn-src-head@freebsd.org Thu Jul 6 12:30:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE180DAC86D; Thu, 6 Jul 2017 12:30:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78F536A312; Thu, 6 Jul 2017 12:30:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66CUdTk087823; Thu, 6 Jul 2017 12:30:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66CUdW6087822; Thu, 6 Jul 2017 12:30:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707061230.v66CUdW6087822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 6 Jul 2017 12:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320734 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 320734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 12:30:40 -0000 Author: trasz Date: Thu Jul 6 12:30:39 2017 New Revision: 320734 URL: https://svnweb.freebsd.org/changeset/base/320734 Log: Improve ddb(4) error reporting a bit. Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/ddb/db_command.c Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Thu Jul 6 12:27:14 2017 (r320733) +++ head/sys/ddb/db_command.c Thu Jul 6 12:30:39 2017 (r320734) @@ -372,7 +372,8 @@ db_command(struct command **last_cmdp, struct command_ return; } else if (t != tIDENT) { - db_printf("?\n"); + db_printf("Unrecognized input; use \"help\" " + "to list available commands\n"); db_flush_lex(); return; } @@ -643,7 +644,7 @@ db_fncall(db_expr_t dummy1, bool dummy2, db_expr_t dum db_unread_token(t); } if (db_read_token() != tRPAREN) { - db_printf("?\n"); + db_printf("Mismatched parens\n"); db_flush_lex(); return; } From owner-svn-src-head@freebsd.org Thu Jul 6 13:27:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52B20DAD9E0; Thu, 6 Jul 2017 13:27:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5706F46A; Thu, 6 Jul 2017 13:27:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66DR1qJ013200; Thu, 6 Jul 2017 13:27:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66DR1WL013199; Thu, 6 Jul 2017 13:27:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707061327.v66DR1WL013199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 6 Jul 2017 13:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320735 - head/lib/libcompiler_rt X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libcompiler_rt X-SVN-Commit-Revision: 320735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 13:27:02 -0000 Author: emaste Date: Thu Jul 6 13:27:01 2017 New Revision: 320735 URL: https://svnweb.freebsd.org/changeset/base/320735 Log: compiler_rt: provide bswap buildins on sparc64 Attempting to build sparc64 world with GCC 6.3 previously failed with zstd_compress.c:(.text+0x8fc): undefined reference to `__bswapsi2' Modified: head/lib/libcompiler_rt/Makefile.inc Modified: head/lib/libcompiler_rt/Makefile.inc ============================================================================== --- head/lib/libcompiler_rt/Makefile.inc Thu Jul 6 12:30:39 2017 (r320734) +++ head/lib/libcompiler_rt/Makefile.inc Thu Jul 6 13:27:01 2017 (r320735) @@ -225,9 +225,8 @@ SRCS+= switchu8.S SRCS+= sync_synchronize.S .endif -# GCC-6.3 on mips32 requires bswap32 built-in. -.if ${MACHINE_CPUARCH} == "mips" +# On some archs GCC-6.3 requires bswap32 built-in. +.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "sparc64" SRCS+= bswapdi2.c SRCS+= bswapsi2.c .endif - From owner-svn-src-head@freebsd.org Thu Jul 6 13:40:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC87BDADF88; Thu, 6 Jul 2017 13:40:45 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from borg.macktronics.com (gw.macktronics.com [209.181.253.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A9C36FA60; Thu, 6 Jul 2017 13:40:44 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from carob.macktronics.com (olive.macktronics.com [209.181.253.66]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by borg.macktronics.com (Postfix) with ESMTPS id F3506778; Thu, 6 Jul 2017 08:31:04 -0500 (CDT) Date: Thu, 6 Jul 2017 08:31:04 -0500 (CDT) From: Dan Mack X-X-Sender: mack@localhost.local To: John Baldwin cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320701 - in head: bin sbin usr.bin usr.sbin In-Reply-To: <4ac448c4-af76-de43-5dbc-370492962d59@FreeBSD.org> Message-ID: References: <201707060415.v664FU9n085204@repo.freebsd.org> <4ac448c4-af76-de43-5dbc-370492962d59@FreeBSD.org> User-Agent: Alpine 2.11 (GSO 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 13:40:45 -0000 On Thu, 6 Jul 2017, John Baldwin wrote: > On 7/6/17 12:15 AM, Ngie Cooper wrote: >> Author: ngie >> Date: Thu Jul 6 04:15:30 2017 >> New Revision: 320701 >> URL: https://svnweb.freebsd.org/changeset/base/320701 >> >> Log: >> Remove SUBDIR ordering/uniquifying in *bin/Makefile >> >> After the addition of SUBDIR.yes, uniquifying/ordering the SUBDIRs doesn't >> make a whole lot of sense, and it's in effect a half measure. >> >> Ordering SUBDIR (after adding SUBDIR.yes to it) in bsd.subdir.mk is a >> separate change that warrants more discussion/testing, because while >> the SUBDIR_PARALLEL work largely fixed dependency ordering for SUBDIRs, >> there might be downstream FreeBSD consumers that rely on the SUBDIR >> ordering. > > FWIW, I (as a human) am used to sorted build output when watching the > output of 'buildworld' to gauge how far it has completed. This was a > feature that SVN broke (CVS would walk directories in sorted order so > you could do the same sort of guessing for 'cvs up' but you can't for > 'svn up'). It's not a hard dependency, per se, but it would be nice to > preserve this feature if possible. I had noticed that it had become > less correct "recently". > > -- > John Baldwin This is my poor man's build progress meter: set n=`awk 'END {print NR}' 320734/phase_bw` # << in prog build log set t=`awk 'END {print NR}' 320469/phase_bw` # last good build log echo "scale=4;$n/$t*100" | bc -l :-) Dan From owner-svn-src-head@freebsd.org Thu Jul 6 14:35:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 768EADAF63A; Thu, 6 Jul 2017 14:35:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43F3C72497; Thu, 6 Jul 2017 14:35:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66EZlDL043386; Thu, 6 Jul 2017 14:35:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66EZlAl043385; Thu, 6 Jul 2017 14:35:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707061435.v66EZlAl043385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 6 Jul 2017 14:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320736 - head/usr.sbin/acpi/acpidump X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/acpi/acpidump X-SVN-Commit-Revision: 320736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 14:35:48 -0000 Author: emaste Date: Thu Jul 6 14:35:47 2017 New Revision: 320736 URL: https://svnweb.freebsd.org/changeset/base/320736 Log: acpidump: warn and exit loop on invalid subtable length Submitted by: Guangyuan Yang Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/acpi/acpidump/acpi.c Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Thu Jul 6 13:27:01 2017 (r320735) +++ head/usr.sbin/acpi/acpidump/acpi.c Thu Jul 6 14:35:47 2017 (r320736) @@ -270,6 +270,10 @@ acpi_walk_subtables(ACPI_TABLE_HEADER *table, void *fi end = (char *)table + table->Length; while ((char *)subtable < end) { printf("\n"); + if (subtable->Length < sizeof(ACPI_SUBTABLE_HEADER)) { + warnx("invalid subtable length %u", subtable->Length); + return; + } action(subtable); subtable = (ACPI_SUBTABLE_HEADER *)((char *)subtable + subtable->Length); From owner-svn-src-head@freebsd.org Thu Jul 6 14:48:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1179DAFB4E; Thu, 6 Jul 2017 14:48:00 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 724E972BB1; Thu, 6 Jul 2017 14:48:00 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66ElxGa047759; Thu, 6 Jul 2017 14:47:59 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66Elxp6047757; Thu, 6 Jul 2017 14:47:59 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201707061447.v66Elxp6047757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 6 Jul 2017 14:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320737 - in head: contrib/netbsd-tests/lib/libc/gen lib/libc/tests/gen X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: contrib/netbsd-tests/lib/libc/gen lib/libc/tests/gen X-SVN-Commit-Revision: 320737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 14:48:00 -0000 Author: asomers Date: Thu Jul 6 14:47:59 2017 New Revision: 320737 URL: https://svnweb.freebsd.org/changeset/base/320737 Log: Fix cleanup in lib/libc/gen/setdomainname_test ATF cleanup routines run in separate processes from the tests themselves, so they can't share global variables. Also, setdomainname_test needs to be is_exclusive because the test cases access a global resource. PR: 219967 Reviewed by: ngie MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D11188 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c head/lib/libc/tests/gen/Makefile Modified: head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c Thu Jul 6 14:35:47 2017 (r320736) +++ head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c Thu Jul 6 14:47:59 2017 (r320737) @@ -34,11 +34,13 @@ __RCSID("$NetBSD: t_setdomainname.c,v 1.2 2012/03/25 0 #include #include +#include #include +#include #include #include -static char domain[MAXHOSTNAMELEN]; +#define DOMAIN_BACKUP_FILE "domain.bak" static const char domains[][MAXHOSTNAMELEN] = { "1234567890", @@ -47,6 +49,45 @@ static const char domains[][MAXHOSTNAMELEN] = { "--------------------------------------------------------------------" }; +static void +backup_domain(void) +{ + char domain[MAXHOSTNAMELEN]; + int fd; + size_t l; + ssize_t r,n = 0; + + memset(domain, 0, sizeof(domain)); + + ATF_REQUIRE_EQ(0, getdomainname(domain, sizeof(domain))); + l = strnlen(domain, MAXHOSTNAMELEN); + fd = open(DOMAIN_BACKUP_FILE, O_WRONLY | O_CREAT | O_EXCL, 0644); + ATF_REQUIRE(fd >= 0); + while ((r = write(fd, domain + n, l - n)) > 0) + n += r; + ATF_REQUIRE_EQ(0, r); + close(fd); +} + +static void +restore_domain(void) +{ + char domain[MAXHOSTNAMELEN]; + int fd; + ssize_t r, n = 0; + + memset(domain, 0, sizeof(domain)); + if ((fd = open(DOMAIN_BACKUP_FILE, O_RDONLY)) < 0) + err(1, "open"); + while ((r = read(fd, domain + n, sizeof(domain) - n)) > 0) + n += r; + if (r < 0) + err(1, "read"); + if (setdomainname(domain, strlen(domain)) != 0) + err(1, "setdomainname"); + close(fd); +} + ATF_TC_WITH_CLEANUP(setdomainname_basic); ATF_TC_HEAD(setdomainname_basic, tc) { @@ -59,6 +100,7 @@ ATF_TC_BODY(setdomainname_basic, tc) char name[MAXHOSTNAMELEN]; size_t i; + backup_domain(); for (i = 0; i < __arraycount(domains); i++) { (void)memset(name, 0, sizeof(name)); @@ -80,12 +122,11 @@ ATF_TC_BODY(setdomainname_basic, tc) ATF_REQUIRE(strcmp(domains[i], name) == 0); } - (void)setdomainname(domain, sizeof(domain)); } ATF_TC_CLEANUP(setdomainname_basic, tc) { - (void)setdomainname(domain, sizeof(domain)); + restore_domain(); } ATF_TC_WITH_CLEANUP(setdomainname_limit); @@ -100,6 +141,7 @@ ATF_TC_BODY(setdomainname_limit, tc) char name[MAXHOSTNAMELEN + 1]; (void)memset(name, 0, sizeof(name)); + backup_domain(); #ifdef __FreeBSD__ ATF_REQUIRE(setdomainname(name, MAXHOSTNAMELEN - 1 ) == 0); @@ -110,10 +152,10 @@ ATF_TC_BODY(setdomainname_limit, tc) ATF_TC_CLEANUP(setdomainname_limit, tc) { - (void)setdomainname(domain, sizeof(domain)); + restore_domain(); } -ATF_TC_WITH_CLEANUP(setdomainname_perm); +ATF_TC(setdomainname_perm); ATF_TC_HEAD(setdomainname_perm, tc) { atf_tc_set_md_var(tc, "descr", "Can normal user set the domain name?"); @@ -122,24 +164,16 @@ ATF_TC_HEAD(setdomainname_perm, tc) ATF_TC_BODY(setdomainname_perm, tc) { + char domain[MAXHOSTNAMELEN]; - errno = 0; + memset(domain, 0, sizeof(domain)); + errno = 0; ATF_REQUIRE_ERRNO(EPERM, setdomainname(domain, sizeof(domain)) == -1); } -ATF_TC_CLEANUP(setdomainname_perm, tc) -{ - (void)setdomainname(domain, sizeof(domain)); -} - ATF_TP_ADD_TCS(tp) { - - (void)memset(domain, 0, sizeof(domain)); - - ATF_REQUIRE(getdomainname(domain, sizeof(domain)) == 0); - ATF_TP_ADD_TC(tp, setdomainname_basic); ATF_TP_ADD_TC(tp, setdomainname_limit); ATF_TP_ADD_TC(tp, setdomainname_perm); Modified: head/lib/libc/tests/gen/Makefile ============================================================================== --- head/lib/libc/tests/gen/Makefile Thu Jul 6 14:35:47 2017 (r320736) +++ head/lib/libc/tests/gen/Makefile Thu Jul 6 14:47:59 2017 (r320737) @@ -72,6 +72,7 @@ CFLAGS+= -I${.CURDIR} SRCS.fmtcheck2_test= fmtcheck_test.c SRCS.fnmatch2_test= fnmatch_test.c +TEST_METADATA.setdomainname_test+= is_exclusive=true TESTS_SUBDIRS= execve TESTS_SUBDIRS+= posix_spawn From owner-svn-src-head@freebsd.org Thu Jul 6 15:03:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD4DADAFF84; Thu, 6 Jul 2017 15:03:55 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C48473492; Thu, 6 Jul 2017 15:03:55 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66F3sCY055734; Thu, 6 Jul 2017 15:03:54 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66F3s3p055733; Thu, 6 Jul 2017 15:03:54 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201707061503.v66F3s3p055733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Thu, 6 Jul 2017 15:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320738 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 320738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 15:03:55 -0000 Author: gallatin Date: Thu Jul 6 15:03:54 2017 New Revision: 320738 URL: https://svnweb.freebsd.org/changeset/base/320738 Log: Simplify UIO_SYSSPACE and UIO_NOCOPY paths in uiomove Uiomove can only block when the segflag is UIO_USERSPACE, otherwise we end up just doing a bcopy (or nothing) and moving cursors. So only emit witness warnings and set deadlock thread flags in the UIO_USERSPACE case. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D11489 Modified: head/sys/kern/subr_uio.c Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Thu Jul 6 14:47:59 2017 (r320737) +++ head/sys/kern/subr_uio.c Thu Jul 6 15:03:54 2017 (r320738) @@ -206,31 +206,32 @@ uiomove_nofault(void *cp, int n, struct uio *uio) static int uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault) { - struct thread *td; struct iovec *iov; size_t cnt; int error, newflags, save; - td = curthread; error = 0; KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE, ("uiomove: mode")); - KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == td, + KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove proc")); - if (!nofault) - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, - "Calling uiomove()"); - /* XXX does it make a sense to set TDP_DEADLKTREAT for UIO_SYSSPACE ? */ - newflags = TDP_DEADLKTREAT; - if (uio->uio_segflg == UIO_USERSPACE && nofault) { - /* - * Fail if a non-spurious page fault occurs. - */ - newflags |= TDP_NOFAULTING | TDP_RESETSPUR; + if (uio->uio_segflg == UIO_USERSPACE) { + newflags = TDP_DEADLKTREAT; + if (nofault) { + /* + * Fail if a non-spurious page fault occurs. + */ + newflags |= TDP_NOFAULTING | TDP_RESETSPUR; + } else { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "Calling uiomove()"); + } + save = curthread_pflags_set(newflags); + } else { + KASSERT(nofault == 0, ("uiomove: nofault")); } - save = curthread_pflags_set(newflags); while (n > 0 && uio->uio_resid) { iov = uio->uio_iov; @@ -272,7 +273,8 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, in n -= cnt; } out: - curthread_pflags_restore(save); + if (uio->uio_segflg == UIO_USERSPACE) + curthread_pflags_restore(save); return (error); } From owner-svn-src-head@freebsd.org Thu Jul 6 15:08:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA382DB007D; Thu, 6 Jul 2017 15:08:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77E1B7387D; Thu, 6 Jul 2017 15:08:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66F8p4r056079; Thu, 6 Jul 2017 15:08:51 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66F8pe4056078; Thu, 6 Jul 2017 15:08:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707061508.v66F8pe4056078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 6 Jul 2017 15:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320739 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 320739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 15:08:52 -0000 Author: trasz Date: Thu Jul 6 15:08:51 2017 New Revision: 320739 URL: https://svnweb.freebsd.org/changeset/base/320739 Log: Make ddb(4) disassembler (x/i) use n32 register names. Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/mips/mips/db_disasm.c Modified: head/sys/mips/mips/db_disasm.c ============================================================================== --- head/sys/mips/mips/db_disasm.c Thu Jul 6 15:03:54 2017 (r320738) +++ head/sys/mips/mips/db_disasm.c Thu Jul 6 15:08:51 2017 (r320739) @@ -104,7 +104,11 @@ static char *fmt_name[16] = { static char *reg_name[32] = { "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", +#if defined(__mips_n32) || defined(__mips_n64) + "a4", "a5", "a6", "a7", "t0", "t1", "t2", "t3", +#else "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", +#endif "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra" }; From owner-svn-src-head@freebsd.org Thu Jul 6 15:21:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A1E7DB040E; Thu, 6 Jul 2017 15:21:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07DB0740C9; Thu, 6 Jul 2017 15:21:58 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66FLw5L064632; Thu, 6 Jul 2017 15:21:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66FLwCW064631; Thu, 6 Jul 2017 15:21:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707061521.v66FLwCW064631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 6 Jul 2017 15:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320740 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 320740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 15:21:59 -0000 Author: trasz Date: Thu Jul 6 15:21:57 2017 New Revision: 320740 URL: https://svnweb.freebsd.org/changeset/base/320740 Log: Make ^w work in ddb(4). Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/ddb/db_input.c Modified: head/sys/ddb/db_input.c ============================================================================== --- head/sys/ddb/db_input.c Thu Jul 6 15:08:51 2017 (r320739) +++ head/sys/ddb/db_input.c Thu Jul 6 15:21:57 2017 (r320740) @@ -217,6 +217,19 @@ db_inputchar(c) cnputc(db_lc[-1]); } break; + case CTRL('w'): + /* erase previous word */ + for (; db_lc > db_lbuf_start;) { + if (*(db_lc - 1) != ' ') + break; + db_delete(1, DEL_BWD); + } + for (; db_lc > db_lbuf_start;) { + if (*(db_lc - 1) == ' ') + break; + db_delete(1, DEL_BWD); + } + break; case CTRL('r'): db_putstring("^R\n", 3); redraw: From owner-svn-src-head@freebsd.org Thu Jul 6 15:27:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B85DDB059A; Thu, 6 Jul 2017 15:27:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AAAF74462; Thu, 6 Jul 2017 15:27:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66FRYqE064902; Thu, 6 Jul 2017 15:27:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66FRYKI064901; Thu, 6 Jul 2017 15:27:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707061527.v66FRYKI064901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 6 Jul 2017 15:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320741 - head/sys/ddb X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/ddb X-SVN-Commit-Revision: 320741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 15:27:35 -0000 Author: trasz Date: Thu Jul 6 15:27:34 2017 New Revision: 320741 URL: https://svnweb.freebsd.org/changeset/base/320741 Log: Make ^c work in ddb(4). Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/ddb/db_input.c Modified: head/sys/ddb/db_input.c ============================================================================== --- head/sys/ddb/db_input.c Thu Jul 6 15:21:57 2017 (r320740) +++ head/sys/ddb/db_input.c Thu Jul 6 15:27:34 2017 (r320741) @@ -195,6 +195,7 @@ db_inputchar(c) db_delete(1, DEL_FWD); break; case CTRL('u'): + case CTRL('c'): /* kill entire line: */ /* at first, delete to beginning of line */ if (db_lc > db_lbuf_start) From owner-svn-src-head@freebsd.org Thu Jul 6 17:01:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5AC2D87FF6; Thu, 6 Jul 2017 17:01:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 847AA7737A; Thu, 6 Jul 2017 17:01:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66H1pvt005365; Thu, 6 Jul 2017 17:01:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66H1pLw005363; Thu, 6 Jul 2017 17:01:51 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201707061701.v66H1pLw005363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 6 Jul 2017 17:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320742 - head/lib/libc/regex X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libc/regex X-SVN-Commit-Revision: 320742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 17:01:52 -0000 Author: kevans Date: Thu Jul 6 17:01:51 2017 New Revision: 320742 URL: https://svnweb.freebsd.org/changeset/base/320742 Log: The impending libregex will implement GNU extensions to bring BREs and EREs closer together. Prepare for this and reduce the diff of libregex changes by refactoring and combining the top-level parsers for EREs/BREs ahead of time. Branching functionality has been split out to make it easier to follow the combined version of the top-level parser. It may also be enabled in the parsing context to make it easier when libregex enables branching for BREs. A branching context was also added for the various branching functions and so that BREs, for instance, can determine if they're the first expression in a chain of expressions within the current branch and treat '*' as ordinary if so. This should have no functional impact and negligible performance impact. Reviewed by: cem, emaste, pfg Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D10920 Modified: head/lib/libc/regex/regcomp.c head/lib/libc/regex/regex2.h Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Thu Jul 6 15:27:34 2017 (r320741) +++ head/lib/libc/regex/regcomp.c Thu Jul 6 17:01:51 2017 (r320742) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -62,6 +63,24 @@ __FBSDID("$FreeBSD$"); #include "cname.h" /* + * Branching context, used to keep track of branch state for all of the branch- + * aware functions. In addition to keeping track of branch positions for the + * p_branch_* functions, we use this to simplify some clumsiness in BREs for + * detection of whether ^ is acting as an anchor or being used erroneously and + * also for whether we're in a sub-expression or not. + */ +struct branchc { + sopno start; + sopno back; + sopno fwd; + + int nbranch; + int nchain; + bool outer; + bool terminate; +}; + +/* * parse structure, passed up and down to avoid global variables and * other clumsinesses */ @@ -77,6 +96,11 @@ struct parse { # define NPAREN 10 /* we need to remember () 1-9 for back refs */ sopno pbegin[NPAREN]; /* -> ( ([0] unused) */ sopno pend[NPAREN]; /* -> ) ([0] unused) */ + bool allowbranch; /* can this expression branch? */ + bool bre; /* convenience; is this a BRE? */ + bool (*parse_expr)(struct parse *, struct branchc *); + void (*pre_parse)(struct parse *, struct branchc *); + void (*post_parse)(struct parse *, struct branchc *); }; /* ========= begin header generated by ./mkh ========= */ @@ -85,11 +109,17 @@ extern "C" { #endif /* === regcomp.c === */ -static void p_ere(struct parse *p, int stop); -static void p_ere_exp(struct parse *p); +static bool p_ere_exp(struct parse *p, struct branchc *bc); static void p_str(struct parse *p); -static void p_bre(struct parse *p, int end1, int end2); -static int p_simp_re(struct parse *p, int starordinary); +static int p_branch_eat_delim(struct parse *p, struct branchc *bc); +static void p_branch_ins_offset(struct parse *p, struct branchc *bc); +static void p_branch_fix_tail(struct parse *p, struct branchc *bc); +static void p_branch_empty(struct parse *p, struct branchc *bc); +static bool p_branch_do(struct parse *p, struct branchc *bc); +static void p_bre_pre_parse(struct parse *p, struct branchc *bc); +static void p_bre_post_parse(struct parse *p, struct branchc *bc); +static void p_re(struct parse *p, int end1, int end2); +static bool p_simp_re(struct parse *p, struct branchc *bc); static int p_count(struct parse *p); static void p_bracket(struct parse *p); static void p_b_term(struct parse *p, cset *cs); @@ -139,6 +169,7 @@ static char nuls[10]; /* place to point scanner in ev #define MORE2() (p->next+1 < p->end) #define SEE(c) (MORE() && PEEK() == (c)) #define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b)) +#define SEESPEC(a) (p->bre ? SEETWO('\\', a) : SEE(a)) #define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0) #define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0) #define NEXT() (p->next++) @@ -247,6 +278,19 @@ regcomp(regex_t * __restrict preg, p->pbegin[i] = 0; p->pend[i] = 0; } + if (cflags & REG_EXTENDED) { + p->allowbranch = true; + p->bre = false; + p->parse_expr = p_ere_exp; + p->pre_parse = NULL; + p->post_parse = NULL; + } else { + p->allowbranch = false; + p->bre = true; + p->parse_expr = p_simp_re; + p->pre_parse = p_bre_pre_parse; + p->post_parse = p_bre_post_parse; + } g->sets = NULL; g->ncsets = 0; g->cflags = cflags; @@ -264,12 +308,10 @@ regcomp(regex_t * __restrict preg, /* do it */ EMIT(OEND, 0); g->firststate = THERE(); - if (cflags®_EXTENDED) - p_ere(p, OUT); - else if (cflags®_NOSPEC) + if (cflags & REG_NOSPEC) p_str(p); else - p_bre(p, OUT, OUT); + p_re(p, OUT, OUT); EMIT(OEND, 0); g->laststate = THERE(); @@ -305,58 +347,14 @@ regcomp(regex_t * __restrict preg, } /* - - p_ere - ERE parser top level, concatenation and alternation - == static void p_ere(struct parse *p, int_t stop); + - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op, + - return whether we should terminate or not + == static bool p_ere_exp(struct parse *p); */ -static void -p_ere(struct parse *p, - int stop) /* character this ERE should end at */ +static bool +p_ere_exp(struct parse *p, struct branchc *bc) { char c; - sopno prevback; - sopno prevfwd; - sopno conc; - int first = 1; /* is this the first alternative? */ - - for (;;) { - /* do a bunch of concatenated expressions */ - conc = HERE(); - while (MORE() && (c = PEEK()) != '|' && c != stop) - p_ere_exp(p); - (void)REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */ - - if (!EAT('|')) - break; /* NOTE BREAK OUT */ - - if (first) { - INSERT(OCH_, conc); /* offset is wrong */ - prevfwd = conc; - prevback = conc; - first = 0; - } - ASTERN(OOR1, prevback); - prevback = THERE(); - AHEAD(prevfwd); /* fix previous offset */ - prevfwd = HERE(); - EMIT(OOR2, 0); /* offset is very wrong */ - } - - if (!first) { /* tail-end fixups */ - AHEAD(prevfwd); - ASTERN(O_CH, prevback); - } - - assert(!MORE() || SEE(stop)); -} - -/* - - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op - == static void p_ere_exp(struct parse *p); - */ -static void -p_ere_exp(struct parse *p) -{ - char c; wint_t wc; sopno pos; int count; @@ -377,7 +375,7 @@ p_ere_exp(struct parse *p) p->pbegin[subno] = HERE(); EMIT(OLPAREN, subno); if (!SEE(')')) - p_ere(p, ')'); + p_re(p, ')', IGN); if (subno < NPAREN) { p->pend[subno] = HERE(); assert(p->pend[subno] != 0); @@ -445,7 +443,7 @@ p_ere_exp(struct parse *p) /* FALLTHROUGH */ default: if (p->error != 0) - return; + return (false); p->next--; wc = WGETNEXT(); ordinary(p, wc); @@ -453,12 +451,12 @@ p_ere_exp(struct parse *p) } if (!MORE()) - return; + return (false); c = PEEK(); /* we call { a repetition if followed by a digit */ if (!( c == '*' || c == '+' || c == '?' || (c == '{' && MORE2() && isdigit((uch)PEEK2())) )) - return; /* no repetition, we're done */ + return (false); /* no repetition, we're done */ NEXT(); (void)REQUIRE(!wascaret, REG_BADRPT); @@ -504,12 +502,13 @@ p_ere_exp(struct parse *p) } if (!MORE()) - return; + return (false); c = PEEK(); if (!( c == '*' || c == '+' || c == '?' || (c == '{' && MORE2() && isdigit((uch)PEEK2())) ) ) - return; + return (false); SETERROR(REG_BADRPT); + return (false); } /* @@ -525,50 +524,177 @@ p_str(struct parse *p) } /* - - p_bre - BRE parser top level, anchoring and concatenation - == static void p_bre(struct parse *p, int end1, \ - == int end2); - * Giving end1 as OUT essentially eliminates the end1/end2 check. - * - * This implementation is a bit of a kludge, in that a trailing $ is first - * taken as an ordinary character and then revised to be an anchor. - * The amount of lookahead needed to avoid this kludge is excessive. + * Eat consecutive branch delimiters for the kind of expression that we are + * parsing, return the number of delimiters that we ate. */ +static int +p_branch_eat_delim(struct parse *p, struct branchc *bc) +{ + int nskip; + + nskip = 0; + while (EAT('|')) + ++nskip; + return (nskip); +} + +/* + * Insert necessary branch book-keeping operations. This emits a + * bogus 'next' offset, since we still have more to parse + */ static void -p_bre(struct parse *p, - int end1, /* first terminating character */ - int end2) /* second terminating character */ +p_branch_ins_offset(struct parse *p, struct branchc *bc) { - sopno start = HERE(); - int first = 1; /* first subexpression? */ - int wasdollar = 0; + if (bc->nbranch == 0) { + INSERT(OCH_, bc->start); /* offset is wrong */ + bc->fwd = bc->start; + bc->back = bc->start; + } + + ASTERN(OOR1, bc->back); + bc->back = THERE(); + AHEAD(bc->fwd); /* fix previous offset */ + bc->fwd = HERE(); + EMIT(OOR2, 0); /* offset is very wrong */ + ++bc->nbranch; +} + +/* + * Fix the offset of the tail branch, if we actually had any branches. + * This is to correct the bogus placeholder offset that we use. + */ +static void +p_branch_fix_tail(struct parse *p, struct branchc *bc) +{ + + /* Fix bogus offset at the tail if we actually have branches */ + if (bc->nbranch > 0) { + AHEAD(bc->fwd); + ASTERN(O_CH, bc->back); + } +} + +/* + * Signal to the parser that an empty branch has been encountered; this will, + * in the future, be used to allow for more permissive behavior with empty + * branches. + */ +static void +p_branch_empty(struct parse *p, struct branchc *bc) +{ + + SETERROR(REG_EMPTY); +} + +/* + * Take care of any branching requirements. This includes inserting the + * appropriate branching instructions as well as eating all of the branch + * delimiters until we either run out of pattern or need to parse more pattern. + */ +static bool +p_branch_do(struct parse *p, struct branchc *bc) +{ + int ate = 0; + + ate = p_branch_eat_delim(p, bc); + if (ate == 0) + return (false); + (void)REQUIRE(ate == 1 && (!bc->outer || MORE()), REG_EMPTY); + p_branch_ins_offset(p, bc); + + return (true); +} + +static void +p_bre_pre_parse(struct parse *p, struct branchc *bc) +{ + + (void) bc; + /* + * Does not move cleanly into expression parser because of + * ordinary interpration of * at the beginning position of + * an expression. + */ if (EAT('^')) { EMIT(OBOL, 0); p->g->iflags |= USEBOL; p->g->nbol++; } - while (MORE() && !SEETWO(end1, end2)) { - wasdollar = p_simp_re(p, first); - first = 0; - } - if (wasdollar) { /* oops, that was a trailing anchor */ +} + +static void +p_bre_post_parse(struct parse *p, struct branchc *bc) +{ + + /* Expression is terminating due to EOL token */ + if (bc->terminate) { DROP(1); EMIT(OEOL, 0); p->g->iflags |= USEEOL; p->g->neol++; } +} - (void)REQUIRE(HERE() != start, REG_EMPTY); /* require nonempty */ +/* + - p_re - Top level parser, concatenation and BRE anchoring + == static void p_re(struct parse *p, int end1, int end2); + * Giving end1 as OUT essentially eliminates the end1/end2 check. + * + * This implementation is a bit of a kludge, in that a trailing $ is first + * taken as an ordinary character and then revised to be an anchor. + * The amount of lookahead needed to avoid this kludge is excessive. + */ +static void +p_re(struct parse *p, + int end1, /* first terminating character */ + int end2) /* second terminating character; ignored for EREs */ +{ + struct branchc bc; + + bc.nbranch = 0; + if (end1 == OUT && end2 == OUT) + bc.outer = true; + else + bc.outer = false; +#define SEEEND() (!p->bre ? SEE(end1) : SEETWO(end1, end2)) + for (;;) { + bc.start = HERE(); + bc.nchain = 0; + bc.terminate = false; + if (p->pre_parse != NULL) + p->pre_parse(p, &bc); + while (MORE() && !SEESPEC('|') && !SEEEND()) { + bc.terminate = p->parse_expr(p, &bc); + ++bc.nchain; + } + if (p->post_parse != NULL) + p->post_parse(p, &bc); + (void) REQUIRE(HERE() != bc.start, REG_EMPTY); + if (!p->allowbranch) + break; + /* + * p_branch_do's return value indicates whether we should + * continue parsing or not. This is both for correctness and + * a slight optimization, because it will check if we've + * encountered an empty branch or the end of the string + * immediately following a branch delimiter. + */ + if (!p_branch_do(p, &bc)) + break; + } +#undef SEE_END + if (p->allowbranch) + p_branch_fix_tail(p, &bc); + assert(!MORE() || SEE(end1)); } /* - p_simp_re - parse a simple RE, an atom possibly followed by a repetition - == static int p_simp_re(struct parse *p, int starordinary); + == static bool p_simp_re(struct parse *p, struct branchc *bc); */ -static int /* was the simple RE an unbackslashed $? */ -p_simp_re(struct parse *p, - int starordinary) /* is a leading * an ordinary character? */ +static bool /* was the simple RE an unbackslashed $? */ +p_simp_re(struct parse *p, struct branchc *bc) { int c; int count; @@ -614,7 +740,7 @@ p_simp_re(struct parse *p, EMIT(OLPAREN, subno); /* the MORE here is an error heuristic */ if (MORE() && !SEETWO('\\', ')')) - p_bre(p, '\\', ')'); + p_re(p, '\\', ')'); if (subno < NPAREN) { p->pend[subno] = HERE(); assert(p->pend[subno] != 0); @@ -650,11 +776,16 @@ p_simp_re(struct parse *p, p->g->backrefs = 1; break; case '*': - (void)REQUIRE(starordinary, REG_BADRPT); + /* + * Ordinary if used as the first character beyond BOL anchor of + * a (sub-)expression, counts as a bad repetition operator if it + * appears otherwise. + */ + (void)REQUIRE(bc->nchain == 0, REG_BADRPT); /* FALLTHROUGH */ default: if (p->error != 0) - return(0); /* Definitely not $... */ + return (false); /* Definitely not $... */ p->next--; wc = WGETNEXT(); ordinary(p, wc); @@ -685,9 +816,9 @@ p_simp_re(struct parse *p, SETERROR(REG_BADBR); } } else if (c == '$') /* $ (but not \$) ends it */ - return(1); + return (true); - return(0); + return (false); } /* Modified: head/lib/libc/regex/regex2.h ============================================================================== --- head/lib/libc/regex/regex2.h Thu Jul 6 15:27:34 2017 (r320741) +++ head/lib/libc/regex/regex2.h Thu Jul 6 17:01:51 2017 (r320742) @@ -189,4 +189,5 @@ struct re_guts { /* misc utilities */ #define OUT (CHAR_MIN - 1) /* a non-character value */ +#define IGN (CHAR_MIN - 2) #define ISWORD(c) (iswalnum((uch)(c)) || (c) == '_') From owner-svn-src-head@freebsd.org Thu Jul 6 17:03:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E53AD8B125; Thu, 6 Jul 2017 17:03:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF14077584; Thu, 6 Jul 2017 17:03:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66H3Mh4005467; Thu, 6 Jul 2017 17:03:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66H3M19005464; Thu, 6 Jul 2017 17:03:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707061703.v66H3M19005464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 6 Jul 2017 17:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320743 - in head/sys/dev: bwi iicbus iwi X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys/dev: bwi iicbus iwi X-SVN-Commit-Revision: 320743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 17:03:24 -0000 Author: ian Date: Thu Jul 6 17:03:22 2017 New Revision: 320743 URL: https://svnweb.freebsd.org/changeset/base/320743 Log: Fix drivers that assume ticks starts at zero. These drivers all have logic similar to "if (ticks > localvar+interval) {localvar=ticks; ...}" where localvar is initialized to zero. Ticks is initialized to a negative value since r278230, and that leads to these if statements never being true. Modified: head/sys/dev/bwi/if_bwi.c head/sys/dev/iicbus/ad7418.c head/sys/dev/iwi/if_iwi.c Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Thu Jul 6 17:01:51 2017 (r320742) +++ head/sys/dev/bwi/if_bwi.c Thu Jul 6 17:03:22 2017 (r320743) @@ -381,6 +381,7 @@ bwi_attach(struct bwi_softc *sc) */ sc->sc_fw_version = BWI_FW_VERSION3; sc->sc_led_idle = (2350 * hz) / 1000; + sc->sc_led_ticks = ticks - sc->sc_led_idle; sc->sc_led_blink = 1; sc->sc_txpwr_calib = 1; #ifdef BWI_DEBUG Modified: head/sys/dev/iicbus/ad7418.c ============================================================================== --- head/sys/dev/iicbus/ad7418.c Thu Jul 6 17:01:51 2017 (r320742) +++ head/sys/dev/iicbus/ad7418.c Thu Jul 6 17:03:22 2017 (r320743) @@ -120,6 +120,8 @@ ad7418_attach(device_t dev) int conf; sc->sc_dev = dev; + sc->sc_lastupdate = ticks - hz; + sx_init(&sc->sc_lock, "ad7418"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Thu Jul 6 17:01:51 2017 (r320742) +++ head/sys/dev/iwi/if_iwi.c Thu Jul 6 17:03:22 2017 (r320743) @@ -286,6 +286,7 @@ iwi_attach(device_t dev) int i, error; sc->sc_dev = dev; + sc->sc_ledevent = ticks; IWI_LOCK_INIT(sc); mbufq_init(&sc->sc_snd, ifqmaxlen); From owner-svn-src-head@freebsd.org Thu Jul 6 17:34:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1762ED8BAB5; Thu, 6 Jul 2017 17:34:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CEDDE78528; Thu, 6 Jul 2017 17:34:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id z6so1106165pfk.3; Thu, 06 Jul 2017 10:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3Cib0QT7xm9w1p1iaoVVsM8VPkMzLp8PDC86Jgj7GY8=; b=OUqJtGN3pM4PRwqRMpSE4zyeVf2TjEGcki0E7b9+7WyFfif+wte0gRfbj1DFlGyZK/ 89agS02ciIxQUl/6Ce5eMudbIvX1Rsr5wR6Q/0A6SxdId8uAlJJpoye0x2D4st8J1uC3 /kNudFeyUSS3WyesNmrfBoR3qiZcQ4ucldC12TSXxLGHWeo9aIGex2K+DAkeR3xM9ED7 O2KesarJp0WH9y5+/6a0R0g+PU+55akf0Tu5m+B5GaHiOE2eNdYKFnLQU/Axr39JU69P bYm1az4Ft/OMkdwlnQFjDRGbVAiyb400ippkaKbV08SmZZfIQGKHZNsggbcnBGZt38ae Zy8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3Cib0QT7xm9w1p1iaoVVsM8VPkMzLp8PDC86Jgj7GY8=; b=muyvwhTdT6RX9tWmyzhm5zyEf3Ayf2ye8cVxee749AM7pAfuu/gyqIraQpSFzzI99a LyIm3gH6O+r6FLSUDnVC2tdj/ZcA1FTmw97fbpN78mwZ+4OqZ88zmuIcwZ8K38noCjUs JfgjVKzzkNsbAotLsi5LecQbTGUzTp/b2J8VbcCoXX4mTzDaFHDIbup7bWAnVAIMNMv7 UQG5yVBbOHHban2SF5EK6VhY24usfUAcRRiAKsMCpmTYAHozORzUWSfnMLTYnW9eM655 yN/My7+G8On9NIRvFyXjsAZUinripKmU7QUD1FY/WDGrkQGsaWD7pAdmU7QbVCDHO/2q WMeA== X-Gm-Message-State: AIVw111O58oriKebhJTUwhVefX++rL70KfbBXbVbNA/wO0psBJM4zr+8 oPMVuKAI2FWnSKCzz3c= X-Received: by 10.84.135.129 with SMTP id 1mr29227454plj.12.1499362467173; Thu, 06 Jul 2017 10:34:27 -0700 (PDT) Received: from ?IPv6:2607:fb90:8360:b644:4c13:f064:ddb0:5883? ([2607:fb90:8360:b644:4c13:f064:ddb0:5883]) by smtp.gmail.com with ESMTPSA id s80sm1806616pfj.33.2017.07.06.10.34.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2017 10:34:26 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r320701 - in head: bin sbin usr.bin usr.sbin From: Ngie Cooper X-Mailer: iPhone Mail (14F89) In-Reply-To: <4ac448c4-af76-de43-5dbc-370492962d59@FreeBSD.org> Date: Thu, 6 Jul 2017 10:32:00 -0700 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201707060415.v664FU9n085204@repo.freebsd.org> <4ac448c4-af76-de43-5dbc-370492962d59@FreeBSD.org> To: John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 17:34:28 -0000 > On Jul 6, 2017, at 03:31, John Baldwin wrote: >=20 >> On 7/6/17 12:15 AM, Ngie Cooper wrote: >> Author: ngie >> Date: Thu Jul 6 04:15:30 2017 >> New Revision: 320701 >> URL: https://svnweb.freebsd.org/changeset/base/320701 >>=20 >> Log: >> Remove SUBDIR ordering/uniquifying in *bin/Makefile >>=20 >> After the addition of SUBDIR.yes, uniquifying/ordering the SUBDIRs doesn= 't >> make a whole lot of sense, and it's in effect a half measure. >>=20 >> Ordering SUBDIR (after adding SUBDIR.yes to it) in bsd.subdir.mk is a >> separate change that warrants more discussion/testing, because while >> the SUBDIR_PARALLEL work largely fixed dependency ordering for SUBDIRs, >> there might be downstream FreeBSD consumers that rely on the SUBDIR >> ordering. >=20 > FWIW, I (as a human) am used to sorted build output when watching the > output of 'buildworld' to gauge how far it has completed. This was a > feature that SVN broke (CVS would walk directories in sorted order so > you could do the same sort of guessing for 'cvs up' but you can't for > 'svn up'). It's not a hard dependency, per se, but it would be nice to > preserve this feature if possible. I had noticed that it had become > less correct "recently". I have another change I'm going to propose soon which sorts SUBDIR outpu= t (as a whole) again, as an opt-in feature in bsd.subdir.mk. Cheers, -Ngie= From owner-svn-src-head@freebsd.org Thu Jul 6 17:54:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2126AD8C17B; Thu, 6 Jul 2017 17:54:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E339D78ED6; Thu, 6 Jul 2017 17:54:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66Hs46Q025966; Thu, 6 Jul 2017 17:54:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66Hs4kL025965; Thu, 6 Jul 2017 17:54:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707061754.v66Hs4kL025965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 6 Jul 2017 17:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320748 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 320748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 17:54:05 -0000 Author: gjb Date: Thu Jul 6 17:54:03 2017 New Revision: 320748 URL: https://svnweb.freebsd.org/changeset/base/320748 Log: Allow passing NOPKG= to make(1) to prevent the pkg-stage target from getting executed. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Jul 6 17:34:53 2017 (r320747) +++ head/release/Makefile Thu Jul 6 17:54:03 2017 (r320748) @@ -269,7 +269,7 @@ packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} touch ${.TARGET} pkg-stage: -.if !defined(NOPKG) +.if !defined(NOPKG) || empty(NOPKG) env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ sh ${.CURDIR}/scripts/pkg-stage.sh mkdir -p ${.OBJDIR}/dvd/packages/repos/ From owner-svn-src-head@freebsd.org Thu Jul 6 17:59:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62274D8C283; Thu, 6 Jul 2017 17:59:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B6F9790DB; Thu, 6 Jul 2017 17:59:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 41FF04FBC; Thu, 6 Jul 2017 17:59:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Thu, 6 Jul 2017 17:59:46 +0000 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320748 - head/release Message-ID: <20170706175946.GK76445@FreeBSD.org> References: <201707061754.v66Hs4kL025965@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/jkxxxtAhYIHVDuh" Content-Disposition: inline In-Reply-To: <201707061754.v66Hs4kL025965@repo.freebsd.org> X-Operating-System: FreeBSD 11.0-STABLE amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer X-Spidey-Sense: Uh oh, Peter logged in User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 17:59:49 -0000 --/jkxxxtAhYIHVDuh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 06, 2017 at 05:54:04PM +0000, Glen Barber wrote: > Author: gjb > Date: Thu Jul 6 17:54:03 2017 > New Revision: 320748 > URL: https://svnweb.freebsd.org/changeset/base/320748 >=20 > Log: > Allow passing NOPKG=3D to make(1) to prevent the pkg-stage target > from getting executed. > =20 > MFC after: 3 days > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/release/Makefile >=20 > Modified: head/release/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/release/Makefile Thu Jul 6 17:34:53 2017 (r320747) > +++ head/release/Makefile Thu Jul 6 17:54:03 2017 (r320748) > @@ -269,7 +269,7 @@ packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} > touch ${.TARGET} > =20 > pkg-stage: > -.if !defined(NOPKG) > +.if !defined(NOPKG) || empty(NOPKG) > env PORTSDIR=3D${PORTSDIR} REPOS_DIR=3D${.CURDIR}/pkg_repos/ \ > sh ${.CURDIR}/scripts/pkg-stage.sh > mkdir -p ${.OBJDIR}/dvd/packages/repos/ >=20 Err, the commit message is backwards. The intent here is to enable *un*-setting NOPKG when it is defined but empty. Glen --/jkxxxtAhYIHVDuh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlleepIACgkQAxRYpUeP 4pNXYQ//cdcSgt5hIGIQpBFKj+qlNkeE7gxtVu7sZCxwbGBX2oCJnPNGGYtOS5sp kIfNHuAU21h6wyRfitEA0L/ulwLiNxOq45TDHXn8I7TsG8PPHU4JmddFGnCL3eoZ +nhgjMJuvf0BAePHpQbuL7//7hU1UO8lamRp/xze+yEuo8pWkHun81D1zjYIuYjG 2RUOOz5GNiJjaySEOwDu/oKDvClC4nHoogxEzslljwmN7U01zEQfAhOCekol69b6 +boF7qBVaX7zXxKxPQXMxnqhM+wow39O+GuQ/jI5MBEiajbO9tlV5QIjD/g29a33 4caLl96p2+lkXc8PcETbxv/dvkEUPSTWwuOV72R9CTTL+EsFszEJMkSoAWbAe2HU UktFdzru0Y1zAlecBCTOwyxN9Pn0hjQ7SBJLR57byYGo+1mZmTNlCcouBBZEFMN8 KYI3vqZIF/cRU2Cs5A3rMju4D6Pce+cvxznvs1XCvo1ytsnBI6RlBhFPnUcB2osZ njO/DmusDHrNqnMjwPLTvy3q7Rnay6IYjuaJyJZmLfOruQOb+SBBoeUvD4HcIodu UdzyLmqN00SYRZ5ut5HcqCcbeTHD8g3tE352tCxBP3ZmsS1hL3oGdlSa9SJsqPMV hh+huF1by4cf7/LAv2GdV5WHb75ZYsImoOfRtVhNupkCuhdKPxQ= =VJ9w -----END PGP SIGNATURE----- --/jkxxxtAhYIHVDuh-- From owner-svn-src-head@freebsd.org Thu Jul 6 18:21:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24E4CD8CB2E; Thu, 6 Jul 2017 18:21:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7D5779CD0; Thu, 6 Jul 2017 18:21:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66ILUjr034541; Thu, 6 Jul 2017 18:21:30 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66ILUbG034540; Thu, 6 Jul 2017 18:21:30 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201707061821.v66ILUbG034540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 6 Jul 2017 18:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320750 - head/lib/libc/regex X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libc/regex X-SVN-Commit-Revision: 320750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 18:21:32 -0000 Author: kevans Date: Thu Jul 6 18:21:30 2017 New Revision: 320750 URL: https://svnweb.freebsd.org/changeset/base/320750 Log: Fix sparc64 libc build after r320742. p_branch_empty was declared but never used due to an oversight. Use it as designed, further comment on its return value. Reported by: Jenkins (head-sparc64) Reviewed by: emaste Approved by: emaste (mentor) MFC with: r320742 Differential Revision: https://reviews.freebsd.org/D11506 Modified: head/lib/libc/regex/regcomp.c Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Thu Jul 6 18:08:38 2017 (r320749) +++ head/lib/libc/regex/regcomp.c Thu Jul 6 18:21:30 2017 (r320750) @@ -114,7 +114,7 @@ static void p_str(struct parse *p); static int p_branch_eat_delim(struct parse *p, struct branchc *bc); static void p_branch_ins_offset(struct parse *p, struct branchc *bc); static void p_branch_fix_tail(struct parse *p, struct branchc *bc); -static void p_branch_empty(struct parse *p, struct branchc *bc); +static bool p_branch_empty(struct parse *p, struct branchc *bc); static bool p_branch_do(struct parse *p, struct branchc *bc); static void p_bre_pre_parse(struct parse *p, struct branchc *bc); static void p_bre_post_parse(struct parse *p, struct branchc *bc); @@ -578,13 +578,15 @@ p_branch_fix_tail(struct parse *p, struct branchc *bc) /* * Signal to the parser that an empty branch has been encountered; this will, * in the future, be used to allow for more permissive behavior with empty - * branches. + * branches. The return value should indicate whether parsing may continue + * or not. */ -static void +static bool p_branch_empty(struct parse *p, struct branchc *bc) { SETERROR(REG_EMPTY); + return (false); } /* @@ -600,7 +602,13 @@ p_branch_do(struct parse *p, struct branchc *bc) ate = p_branch_eat_delim(p, bc); if (ate == 0) return (false); - (void)REQUIRE(ate == 1 && (!bc->outer || MORE()), REG_EMPTY); + else if ((ate > 1 || (bc->outer && !MORE())) && !p_branch_empty(p, bc)) + /* + * Halt parsing only if we have an empty branch and p_branch_empty + * indicates that we must not continue. In the future, this will not + * necessarily be an error. + */ + return (false); p_branch_ins_offset(p, bc); return (true); From owner-svn-src-head@freebsd.org Thu Jul 6 18:53:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F5E2D8D4E6; Thu, 6 Jul 2017 18:53:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A0B77B1CF; Thu, 6 Jul 2017 18:53:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x229.google.com with SMTP id p21so10118399qke.3; Thu, 06 Jul 2017 11:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=O9nlBif5AiYEELoq8zhWaSW6/bz7uPbTZbfAcsJPtEA=; b=PQcGrmOKGLa9gkT/gBWAZrc531DqEvnzgpBwBF5IF1biNQiYVTbo+Kn243QjWTSe0H gH0zjC2x7+5pMJrzkmrpcA0Kr50ZLGAfZ7j5NJ/7bl7o5ZKD0sXxyufTKQoyJDb2iD0n MlB1pk/7HMy2XPNQWjytPr7+8Wr9zo94E5daNkpBergOigDdheCrDmkK5lDLRBiipoi+ ISaibFy56QYUpw18HyRy/D28kJoGp6Jj2ln9a41Zuq1//J6f+JS4CetyPEwVihXZJ99E TLInC+w1+SGAPsL28gKllYMowyIESleCs7MIl+wXaqHsFU9NaheuFSbliLk9ZEThFNqZ hcIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=O9nlBif5AiYEELoq8zhWaSW6/bz7uPbTZbfAcsJPtEA=; b=cvaVBOz2+WV3p/iEHwNeTEjlImN45qDnp70ediLjwks7/ylLfPgCwKS57oXTqJO+QD Y/Rdznlr1dFtia/ZuVDPaqfRkDzCk0gD1wAtsztleRhXDoCyzNPsISR7LUY6q005gRkP o/y+Z4Zh4LUNeH3AAxkCIKj3UxMW9NedrAVV4whKnYWQ7OQlOpSRIf7ZN6eS06lECpqS 0HzuGfDZNFmWpXv/ycxyd7q5a5hNbany0sYo2jxiKgnn6dMm6chaI5OraluNER6YYqzm fkZyO/dL5LoRC+od5XB4DX75oiir/AiAAoUTr3rJUjnoJ/wms5NqMTt/IUXZKw3e4WD1 u0DQ== X-Gm-Message-State: AKS2vOyeDne3N5dSn9Lwqtz3deyLBSNCxU2NHKX+g09WbgxPYtM8TlgQ setIkj3zc9DbswYtRLlMj/XDqyHWIO2O X-Received: by 10.55.92.130 with SMTP id q124mr64473099qkb.205.1499367199233; Thu, 06 Jul 2017 11:53:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.92.142 with HTTP; Thu, 6 Jul 2017 11:53:18 -0700 (PDT) In-Reply-To: <20170706175946.GK76445@FreeBSD.org> References: <201707061754.v66Hs4kL025965@repo.freebsd.org> <20170706175946.GK76445@FreeBSD.org> From: Ngie Cooper Date: Thu, 6 Jul 2017 11:53:18 -0700 Message-ID: Subject: Re: svn commit: r320748 - head/release To: Glen Barber Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 18:53:20 -0000 On Thu, Jul 6, 2017 at 10:59 AM, Glen Barber wrote: > On Thu, Jul 06, 2017 at 05:54:04PM +0000, Glen Barber wrote: >> Author: gjb >> Date: Thu Jul 6 17:54:03 2017 >> New Revision: 320748 >> URL: https://svnweb.freebsd.org/changeset/base/320748 >> >> Log: >> Allow passing NOPKG= to make(1) to prevent the pkg-stage target >> from getting executed. `.if empty(NOPKG)` is a minimal test that can be used for that purpose, BTW. -Ngie From owner-svn-src-head@freebsd.org Thu Jul 6 19:53:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8920D90A9A; Thu, 6 Jul 2017 19:53:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94D707CF6F; Thu, 6 Jul 2017 19:53:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66JrU2O076272; Thu, 6 Jul 2017 19:53:30 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66JrUME076270; Thu, 6 Jul 2017 19:53:30 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201707061953.v66JrUME076270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 6 Jul 2017 19:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320754 - in head/usr.bin/grep: . tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/usr.bin/grep: . tests X-SVN-Commit-Revision: 320754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 19:53:31 -0000 Author: kevans Date: Thu Jul 6 19:53:30 2017 New Revision: 320754 URL: https://svnweb.freebsd.org/changeset/base/320754 Log: Update copyright e-mail address to @FreeBSD.org address Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D11508 Modified: head/usr.bin/grep/tests/grep_freebsd_test.sh head/usr.bin/grep/util.c Modified: head/usr.bin/grep/tests/grep_freebsd_test.sh ============================================================================== --- head/usr.bin/grep/tests/grep_freebsd_test.sh Thu Jul 6 18:46:33 2017 (r320753) +++ head/usr.bin/grep/tests/grep_freebsd_test.sh Thu Jul 6 19:53:30 2017 (r320754) @@ -1,5 +1,5 @@ # -# Copyright (c) 2017 Kyle Evans +# Copyright (c) 2017 Kyle Evans # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Thu Jul 6 18:46:33 2017 (r320753) +++ head/usr.bin/grep/util.c Thu Jul 6 19:53:30 2017 (r320754) @@ -5,7 +5,7 @@ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * Copyright (C) 2008-2010 Gabor Kovesdan - * Copyright (C) 2017 Kyle Evans + * Copyright (C) 2017 Kyle Evans * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-head@freebsd.org Thu Jul 6 21:47:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54D71D92ABA; Thu, 6 Jul 2017 21:47: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 mx1.freebsd.org (Postfix) with ESMTPS id 2202C80A13; Thu, 6 Jul 2017 21:47:19 +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 v66LlIwV023694; Thu, 6 Jul 2017 21:47:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66LlIPu023692; Thu, 6 Jul 2017 21:47:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707062147.v66LlIPu023692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 6 Jul 2017 21:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320755 - in head: share/man/man9 sys/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: share/man/man9 sys/sys X-SVN-Commit-Revision: 320755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 21:47:19 -0000 Author: kib Date: Thu Jul 6 21:47:17 2017 New Revision: 320755 URL: https://svnweb.freebsd.org/changeset/base/320755 Log: Add BIT_FLS() analogous to BIT_FFS(). The benefit of BIT_FLS() is that ffsl() can be implemented with a count leading zeros instruction which is more widespread available. Submitted by: Sebastian Huber MFC after: 1 week Modified: head/share/man/man9/bitset.9 head/sys/sys/bitset.h Modified: head/share/man/man9/bitset.9 ============================================================================== --- head/share/man/man9/bitset.9 Thu Jul 6 19:53:30 2017 (r320754) +++ head/share/man/man9/bitset.9 Thu Jul 6 21:47:17 2017 (r320755) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 24, 2017 +.Dd July 6, 2017 .Dt BITSET 9 .Os .Sh NAME @@ -43,6 +43,7 @@ .Nm BIT_EMPTY , .Nm BIT_ISFULLSET , .Nm BIT_FFS , +.Nm BIT_FLS , .Nm BIT_COUNT , .Nm BIT_SUBSET , .Nm BIT_OVERLAP , @@ -85,6 +86,8 @@ .Ft int .Fn BIT_FFS "const SETSIZE" "struct STRUCTNAME *bitset" .Ft int +.Fn BIT_FLS "const SETSIZE" "struct STRUCTNAME *bitset" +.Ft int .Fn BIT_COUNT "const SETSIZE" "struct STRUCTNAME *bitset" .\" .Ft bool @@ -275,6 +278,23 @@ Like with .Xr ffs 3 , to use the non-zero result of .Fn BIT_FFS +as a +.Fa bit +index parameter to any other +.Nm +macro, you must subtract one from the result. +.Pp +The +.Fn BIT_FLS +macro returns the 1-index of the last (highest) set bit in +.Fa bitset , +or zero if +.Fa bitset +is empty. +Like with +.Xr fls 3 , +to use the non-zero result of +.Fn BIT_FLS as a .Fa bit index parameter to any other Modified: head/sys/sys/bitset.h ============================================================================== --- head/sys/sys/bitset.h Thu Jul 6 19:53:30 2017 (r320754) +++ head/sys/sys/bitset.h Thu Jul 6 21:47:17 2017 (r320755) @@ -213,6 +213,21 @@ __bit; \ }) +#define BIT_FLS(_s, p) __extension__ ({ \ + __size_t __i; \ + int __bit; \ + \ + __bit = 0; \ + for (__i = __bitset_words((_s)) - 1; __i >= 0; __i--) { \ + if ((p)->__bits[__i] != 0) { \ + __bit = flsl((p)->__bits[__i]); \ + __bit += __i * _BITSET_BITS; \ + break; \ + } \ + } \ + __bit; \ +}) + #define BIT_COUNT(_s, p) __extension__ ({ \ __size_t __i; \ int __count; \ From owner-svn-src-head@freebsd.org Thu Jul 6 22:04:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83C42D93303; Thu, 6 Jul 2017 22:04:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DF258188F; Thu, 6 Jul 2017 22:04:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66M4bd8031769; Thu, 6 Jul 2017 22:04:37 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66M4bBh031768; Thu, 6 Jul 2017 22:04:37 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707062204.v66M4bBh031768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 6 Jul 2017 22:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320757 - head/usr.sbin/nfsuserd X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/usr.sbin/nfsuserd X-SVN-Commit-Revision: 320757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 22:04:38 -0000 Author: rmacklem Date: Thu Jul 6 22:04:37 2017 New Revision: 320757 URL: https://svnweb.freebsd.org/changeset/base/320757 Log: Modify the nfsuserd daemon so that it uses an AF_LOCAL socket for upcalls. This patch modifies the nfsuserd daemon so that it uses an AF_LOCAL socket for upcalls by default. This should fix the problem with using a UDP socket upcall to 127.0.0.1 when jails are used. The AF_LOCAL socket case only supports a single server daemon, since hangs were observed by the original problem reporter when multiple daemons were used. The patch adds a command line option called "-use-udpsock" which makes the daemon revert to its prepatched behaviour. Suggested by: dfr PR: 205193 Relnotes: yes Modified: head/usr.sbin/nfsuserd/nfsuserd.c Modified: head/usr.sbin/nfsuserd/nfsuserd.c ============================================================================== --- head/usr.sbin/nfsuserd/nfsuserd.c Thu Jul 6 22:03:58 2017 (r320756) +++ head/usr.sbin/nfsuserd/nfsuserd.c Thu Jul 6 22:04:37 2017 (r320757) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -43,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -73,6 +75,9 @@ static bool_t xdr_getid(XDR *, caddr_t); static bool_t xdr_getname(XDR *, caddr_t); static bool_t xdr_retval(XDR *, caddr_t); +#ifndef _PATH_NFSUSERDSOCK +#define _PATH_NFSUSERDSOCK "/var/run/nfsuserd.sock" +#endif #define MAXNAME 1024 #define MAXNFSUSERD 20 #define DEFNFSUSERD 4 @@ -92,6 +97,7 @@ uid_t defaultuid = 65534; u_char *defaultgroup = "nogroup"; gid_t defaultgid = 65533; int verbose = 0, im_a_slave = 0, nfsuserdcnt = -1, forcestart = 0; +int use_udpsock = 0; int defusertimeout = DEFUSERTIMEOUT, manage_gids = 0; pid_t slaves[MAXNFSUSERD]; @@ -103,15 +109,17 @@ main(int argc, char *argv[]) struct nfsd_idargs nid; struct passwd *pwd; struct group *grp; - int sock, one = 1; + int oldmask, one = 1, sock; SVCXPRT *udptransp; u_short portnum; + SVCXPRT *xprt; sigset_t signew; char hostname[MAXHOSTNAMELEN + 1], *cp; struct addrinfo *aip, hints; static uid_t check_dups[MAXUSERMAX]; gid_t grps[NGROUPS]; int ngroup; + struct sockaddr_un sun; if (modfind("nfscommon") < 0) { /* Not present in kernel, try loading it */ @@ -164,6 +172,8 @@ main(int argc, char *argv[]) forcestart = 1; } else if (!strcmp(*argv, "-manage-gids")) { manage_gids = 1; + } else if (!strcmp(*argv, "-use-udpsock")) { + use_udpsock = 1; } else if (!strcmp(*argv, "-usermax")) { if (argc == 1) usage(); @@ -207,6 +217,9 @@ main(int argc, char *argv[]) } if (nfsuserdcnt < 1) nfsuserdcnt = DEFNFSUSERD; + if (use_udpsock == 0) + /* For AF_LOCAL socket, only allow one server daemon. */ + nfsuserdcnt = 1; /* * Strip off leading and trailing '.'s in domain name and map @@ -245,49 +258,93 @@ main(int argc, char *argv[]) for (i = 0; i < nfsuserdcnt; i++) slaves[i] = (pid_t)-1; - /* - * Set up the service port to accept requests via UDP from - * localhost (127.0.0.1). - */ - if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) - err(1, "cannot create udp socket"); - - /* - * Not sure what this does, so I'll leave it here for now. - */ - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); + if (use_udpsock != 0) { + /* + * Set up the service port to accept requests via UDP from + * localhost (127.0.0.1). + */ + if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) + err(1, "cannot create udp socket"); - if ((udptransp = svcudp_create(sock)) == NULL) - err(1, "Can't set up socket"); - - /* - * By not specifying a protocol, it is linked into the - * dispatch queue, but not registered with portmapper, - * which is just what I want. - */ - if (!svc_register(udptransp, RPCPROG_NFSUSERD, RPCNFSUSERD_VERS, - nfsuserdsrv, 0)) - err(1, "Can't register nfsuserd"); - - /* - * Tell the kernel what my port# is. - */ - portnum = htons(udptransp->xp_port); + /* + * Not sure what this does, so I'll leave it here for now. + */ + setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); + + if ((udptransp = svcudp_create(sock)) == NULL) + err(1, "Can't set up socket"); + + /* + * By not specifying a protocol, it is linked into the + * dispatch queue, but not registered with portmapper, + * which is just what I want. + */ + if (!svc_register(udptransp, RPCPROG_NFSUSERD, RPCNFSUSERD_VERS, + nfsuserdsrv, 0)) + err(1, "Can't register nfsuserd"); + + /* + * Tell the kernel what my port# is. + */ + portnum = htons(udptransp->xp_port); #ifdef DEBUG - printf("portnum=0x%x\n", portnum); + printf("portnum=0x%x\n", portnum); #else - if (nfssvc(NFSSVC_NFSUSERDPORT, (caddr_t)&portnum) < 0) { - if (errno == EPERM) { - fprintf(stderr, - "Can't start nfsuserd when already running"); - fprintf(stderr, - " If not running, use the -force option.\n"); - } else { - fprintf(stderr, "Can't do nfssvc() to add port\n"); + if (nfssvc(NFSSVC_NFSUSERDPORT, (caddr_t)&portnum) < 0) { + if (errno == EPERM) + fprintf(stderr, "Can't start nfsuserd when" + " already running\nIf not running," + " use the -force option.\n"); + else + fprintf(stderr, + "Can't do nfssvc() to add socket\n"); + exit(1); } - exit(1); - } #endif + } else { + /* Use the AF_LOCAL socket. */ + memset(&sun, 0, sizeof sun); + sun.sun_family = AF_LOCAL; + unlink(_PATH_NFSUSERDSOCK); + strcpy(sun.sun_path, _PATH_NFSUSERDSOCK); + sun.sun_len = SUN_LEN(&sun); + sock = socket(AF_LOCAL, SOCK_STREAM, 0); + if (sock < 0) + err(1, "Can't create local nfsuserd socket"); + oldmask = umask(S_IXUSR | S_IRWXG | S_IRWXO); + if (bind(sock, (struct sockaddr *)&sun, sun.sun_len) < 0) + err(1, "Can't bind local nfsuserd socket"); + umask(oldmask); + if (listen(sock, SOMAXCONN) < 0) + err(1, "Can't listen on local nfsuserd socket"); + xprt = svc_vc_create(sock, RPC_MAXDATASIZE, RPC_MAXDATASIZE); + if (xprt == NULL) + err(1, + "Can't create transport for local nfsuserd socket"); + if (!svc_reg(xprt, RPCPROG_NFSUSERD, RPCNFSUSERD_VERS, + nfsuserdsrv, NULL)) + err(1, + "Can't register service for local nfsuserd socket"); + + /* + * Tell the kernel what the socket's path is. + */ +#ifdef DEBUG + printf("sockpath=%s\n", _PATH_NFSUSERDSOCK); +#else + if (nfssvc(NFSSVC_NFSUSERDPORT | NFSSVC_NEWSTRUCT, + _PATH_NFSUSERDSOCK) < 0) { + if (errno == EPERM) + fprintf(stderr, "Can't start nfsuserd when" + " already running\nIf not running," + " use the -force option.\n"); + else + fprintf(stderr, + "Can't do nfssvc() to add socket\n"); + exit(1); + } +#endif + } pwd = getpwnam(defaultuser); if (pwd) @@ -462,21 +519,25 @@ nfsuserdsrv(struct svc_req *rqstp, SVCXPRT *transp) gid_t grps[NGROUPS]; int ngroup; - /* - * Only handle requests from 127.0.0.1 on a reserved port number. - * (Since a reserved port # at localhost implies a client with - * local root, there won't be a security breach. This is about - * the only case I can think of where a reserved port # means - * something.) - */ - sport = ntohs(transp->xp_raddr.sin_port); - saddr = ntohl(transp->xp_raddr.sin_addr.s_addr); - if ((rqstp->rq_proc != NULLPROC && sport >= IPPORT_RESERVED) || - saddr != 0x7f000001) { - syslog(LOG_ERR, "req from ip=0x%x port=%d\n", saddr, sport); - svcerr_weakauth(transp); - return; + if (use_udpsock != 0) { + /* + * Only handle requests from 127.0.0.1 on a reserved port + * number. (Since a reserved port # at localhost implies a + * client with local root, there won't be a security breach. + * This is about the only case I can think of where a reserved + * port # means something.) + */ + sport = ntohs(transp->xp_raddr.sin_port); + saddr = ntohl(transp->xp_raddr.sin_addr.s_addr); + if ((rqstp->rq_proc != NULLPROC && sport >= IPPORT_RESERVED) || + saddr != 0x7f000001) { + syslog(LOG_ERR, "req from ip=0x%x port=%d, consider" + " using an AF_LOCAL socket\n", saddr, sport); + svcerr_weakauth(transp); + return; + } } + switch (rqstp->rq_proc) { case NULLPROC: if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL)) @@ -720,6 +781,7 @@ static void usage(void) { - errx(1, - "usage: nfsuserd [-usermax cache_size] [-usertimeout minutes] [-verbose] [-manage-gids] [-domain domain_name] [n]"); + errx(1, "usage: nfsuserd [-usermax cache_size] [-usertimeout minutes]" + " [-verbose] [-manage-gids] [-use-udpsock] [-domain domain_name]" + " [n]"); } From owner-svn-src-head@freebsd.org Thu Jul 6 22:34:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B21FD93A94; Thu, 6 Jul 2017 22:34:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 259E28244E; Thu, 6 Jul 2017 22:34:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v66MYYDp043942; Thu, 6 Jul 2017 22:34:34 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v66MYYPW043941; Thu, 6 Jul 2017 22:34:34 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707062234.v66MYYPW043941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 6 Jul 2017 22:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320758 - head/usr.sbin/nfsuserd X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/usr.sbin/nfsuserd X-SVN-Commit-Revision: 320758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 22:34:35 -0000 Author: rmacklem Date: Thu Jul 6 22:34:34 2017 New Revision: 320758 URL: https://svnweb.freebsd.org/changeset/base/320758 Log: Document the changes done to nfsuserd by r320757. This is a content change. Modified: head/usr.sbin/nfsuserd/nfsuserd.8 Modified: head/usr.sbin/nfsuserd/nfsuserd.8 ============================================================================== --- head/usr.sbin/nfsuserd/nfsuserd.8 Thu Jul 6 22:04:37 2017 (r320757) +++ head/usr.sbin/nfsuserd/nfsuserd.8 Thu Jul 6 22:34:34 2017 (r320758) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2017 +.Dd July 6, 2017 .Dt NFSUSERD 8 .Os .Sh NAME @@ -40,21 +40,34 @@ services plus support manage-gids for all NFS versions .Op Fl verbose .Op Fl force .Op Fl manage-gids +.Op Fl use-udpsock .Op Ar num_servers .Sh DESCRIPTION .Nm loads user and group information into the kernel for NFSv4. -It must be running for NFSv4 to function correctly, either client or server. It also provides support for manage-gids and must be running on the server if this is being used for any version of NFS. .Pp Upon startup, it loads the machines DNS domain name, plus timeout and cache size limit into the kernel. It then preloads the cache with group and user information, up to the cache size limit and forks off N children -(default 4), that service requests from the kernel for cache misses. The -master server is there for the sole purpose of killing off the slaves. +(only 1 child for AF_LOCAL sockets), that service requests from the kernel for cache misses. +The master server is there for the sole purpose of killing off the slave(s). To stop the nfsuserd, send a SIGUSR1 to the master server. .Pp +By default, upcalls from the kernel use an AF_LOCAL socket. +For this case, only one server daemon will be running. +The +.Fl use-udpsock +option may be used to make the +.Nm +daemon use a UDP socket, with upcalls done via 127.0.0.1, which was the +old behaviour for +.Nm . +Use of the UDP socket can only be done if +.Xr jail 8 +are not being used. +.Pp The following options are available: .Bl -tag -width Ds .It Fl domain Ar domain_name @@ -91,14 +104,12 @@ and uses the group list for that uid provided by .Xr getgrouplist 3 on the server instead of the list of groups provided in the RPC authenticator. This can be used to avoid the 16 group limit for AUTH_SYS. +.It Fl use-udpsock +This flag forces use of the old behaviour of a UDP socket with upcalls done via 127.0.0.1. .It Ar num_servers Specifies how many servers to create (max 20). -The default of 4 may be sufficient. You should run enough servers, so that -.Xr ps 1 -shows almost no running time for one or two of the slaves after the system -has been running for a long period. Running too few will have a major -performance impact, whereas running too many will only tie up some resources, -such as a process table entry and swap space. +This option has been deprecated and is ignored for AF_LOCAL upcall sockets, +which always use a single server. .El .Sh SEE ALSO .Xr getgrent 3 , @@ -127,8 +138,11 @@ and .Xr passwd 5 for more information on how the databases are accessed. .Pp -Since the kernel communicates with the +For the +.Fl use-udpsock +option, since the kernel communicates with the .Nm daemon via an upcall that uses the IP address 127.0.0.1, it does not work correctly when .Xr jail 8 are used and can crash the system. +This is not a problem when a AF_LOCAL socket is used. From owner-svn-src-head@freebsd.org Thu Jul 6 22:42:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16F11D93CDA; Thu, 6 Jul 2017 22:42:26 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670068.outbound.protection.outlook.com [40.107.67.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B43CA82981; Thu, 6 Jul 2017 22:42:24 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0190.CANPRD01.PROD.OUTLOOK.COM (10.165.218.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Thu, 6 Jul 2017 22:42:22 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.1220.018; Thu, 6 Jul 2017 22:42:22 +0000 From: Rick Macklem To: Konstantin Belousov CC: Olivier Cochard-Labb?? , Rick Macklem , svn-src-head , svn-src-all , src-committers Subject: Re: svn commit: r320659 - head/usr.sbin/nfsuserd Thread-Topic: svn commit: r320659 - head/usr.sbin/nfsuserd Thread-Index: AQHS9UyHHAWNv+gQ5UqU3c5HIHwLlqJEr28AgABwDTqAAEDlgIACBi7b Date: Thu, 6 Jul 2017 22:42:22 +0000 Message-ID: References: <201707042220.v64MKU77039219@repo.freebsd.org> <20170705050637.GT1935@kib.kiev.ua> , <20170705154346.GW1935@kib.kiev.ua> In-Reply-To: <20170705154346.GW1935@kib.kiev.ua> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTXPR01MB0190; 7:KRLVbVk962Nir0HDZg8vH3cIJzisNXPOkasm8/No5ZH01pcre8M0IHJDAR2qz5QkUibaR3pAROiBtBte8oikgLg9jgOvo4GXEqLUkCjNs6cFzmDzODg4xpgQ6JUZQjlTZvLLn9dB5KhoRuN0s5oYo/EH9x25OLLZxchxpoAEcRhw0aTrS6AO94we6q0BwAF1rRn3iLjW8GoHb+cS0nTmIk3DG+PvpMqitzHxRTTy/rGsVjVqxGkwdWEx/PcYjNzq51vbiXFKJZrIjOrm1G5dpniQMwhmToXl5thB9XC098RrWE2fxmAjUYZ34USwtGcP5KpsCxuYaJEo0BsvJQEhm8HBO90HInOepv4E3VryCdJBNjzNj6AXOlBdf491O8FMvcDap2dH54dJwvRkoUf81KULhjmC4+bKLl3X9W7F3W3Lm+zHgVJ/BtIQ91+KM7KQA7EuX0dR2ZqBjUPbrGoy74Dd0GXxIhxvkYUw0Y2VqFV4YkiF6NWFsMe4tjsGihIQd8MT1dr6ZUO00aw7bL2W2faC/HZtVQn9GgAKNczb70Rvcfj77jBR7FFjvl/RRB46znv6iW0TK2sDtm6G0WIT1p8K/VZsdIE+bvIxbWs59tyKi8X7xrTgqHpbCKAbOA13pMIqFTtQ5Zr/dDkAEzhYoWicn0BajGFRW8DuEufXhSi2MaBWZZGALuSxB5iaohZL3kONiofuNjT/t130ncn9A3aNx3NdGj67QBsIath6gXK27ZmG2uZRtXmj1Rk6q0pUoZ1r34cYsYeCZcGPIXRnyCvHbSEFNPssZQ3mZnKxI3Y= x-ms-office365-filtering-correlation-id: 903e75bc-9299-40a9-708d-08d4c4c04492 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:YTXPR01MB0190; x-ms-traffictypediagnostic: YTXPR01MB0190: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(236129657087228)(247924648384137); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6041248)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201702281529075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:YTXPR01MB0190; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:YTXPR01MB0190; x-forefront-prvs: 03607C04F0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39850400002)(39840400002)(39410400002)(39450400003)(51914003)(24454002)(3280700002)(8676002)(6436002)(76176999)(2950100002)(33656002)(8936002)(6916009)(1411001)(189998001)(5660300001)(50986999)(229853002)(2906002)(54356999)(86362001)(478600001)(3660700001)(74482002)(77096006)(93886004)(6246003)(9686003)(305945005)(110136004)(14454004)(53936002)(39060400002)(74316002)(38730400002)(4326008)(102836003)(7696004)(55016002)(2900100001)(6506006)(54906002)(81166006)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0190; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2017 22:42:22.8844 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0190 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 22:42:26 -0000 Konstantin Belousov wrote: [stuff snipped] >I wrote: >> >> The patches in PR#205193 change nfsuserd to use a local socket, >> which fixes this problem. However, the original poster of the PR had >> hangs when using the patches which was never resolved (I couldn't >> reproduce the hang). >So consider the issue not reproducable and test it in wild by committing >to HEAD. Ability to do such kind of experiment is one of the reasons why >do we have HEAD and separate release branches. Done. Thanks for the suggestion. I added a command line option that forces it to use the old/UDP behaviour, so any hangs can be avoided by adding the option. I didn't specify an MFC, but if no problems are reported, I think it can be= MFC'd in a couple of months. rick From owner-svn-src-head@freebsd.org Thu Jul 6 22:45:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAC4DD93D86 for ; Thu, 6 Jul 2017 22:45:38 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-12.reflexion.net [208.70.210.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B13D82B07 for ; Thu, 6 Jul 2017 22:45:37 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 24435 invoked from network); 6 Jul 2017 22:40:28 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 6 Jul 2017 22:40:28 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.40.1) with SMTP; Thu, 06 Jul 2017 18:38:56 -0400 (EDT) Received: (qmail 13253 invoked from network); 6 Jul 2017 22:38:56 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 6 Jul 2017 22:38:56 -0000 Received: from [192.168.1.114] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 57FD5EC8FBA; Thu, 6 Jul 2017 15:38:55 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts Message-Id: <9691CBDC-9C55-4E05-AFA2-9FEFD5E1B21F@dsl-only.net> Date: Thu, 6 Jul 2017 15:38:54 -0700 To: Konstantin Belousov , robak@FreeBSD.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 22:45:38 -0000 The following is only offered as a possibility for where the 2MB idea might have came from: https://hardenedbsd.org . I make no claim that the script change is in fact appropriate: I've not studied the issue. Quoting https://hardenedbsd.org "Stack Clash Mitigations" dated = 2017-Jun-25: FreeBSD provides a stack guard implementation, but has it disabled by = default. As discussed in the Qualys report, when enabled, FreeBSD's = stack guard implementation had a logic flaw that prevented it from being = effective. A proof-of-concept exploit written by HardenedBSD's own Shawn = Webb demonstrated Qualys' claims. HardenedBSD had the stack guard = enabled by default. To mitigate Stack Clash, we in HardenedBSD performed the following in = 12-CURRENT over the week of 19 Jun 2017 to 24 Jun 2017: =E2=80=A2 Fixed the flaw in the stack guard implementation that = prevented it from being effective. =E2=80=A2 Increased the size of the stack guard from one 4KB = page to 2MB. =E2=80=A2 Prevented mappings from occurring between the = bottom-most limit of the stack and the top of the stack. =E2=80=A2 (Soon) Modified the per-thread stack guard in libthr = to be of random size, minimum 1MB, maximum 5MB. =E2=80=A2 This also randomizes the top-most address of = each per-thread stack. The commits for these changes have been backported to HardenedBSD = 11-STABLE. Item #1 has been backported to HardenedBSD 10-STABLE. On 24 Jun 2017, FreeBSD committed their Stack Clash mitigation. It = introduces the concept of MAP_GUARD, which is a special PROT_NONE = mapping. It's placed immediately below the bottom-most limit of the = stack. It's a really innovative implementation that allows general use = of guard pages. Indeed, in a follow-up commit, the RTLD now uses = MAP_GUARD for guard pages between shared objects. FreeBSD's stack guard = is still a single 4KB page in size, even with Qualys' recommendation to = use a minimum of 1MB. On 25 Jun 2017, FreeBSD followed up with a commit = to fix a regression that effectively disabled the stack guard in certain = edge cases with the new implementation. Overall, FreeBSD's solution to = the Stack Clash problem is innovative and even useful outside the = context of Stack Clash. We in HardenedBSD now use a hybrid of both approaches. We've hardened = the security.bsd.stack_guard_page sysctl node to a 2MB stack guard. = We've made that sysctl node a read-only tunable, configurable only at = boot-time. The changes to libthr still stand and the per-thread stack = guard size is a random size between 1MB and 5MB. We may look to = integrate MAP_GUARD with libthr instead of its reliance on = mprotect(PROT_NONE). Update 25 Jun 2017: The randomization of the per-thread stack guard has = been found to be too aggressive. We are investigating this feature and = will revisit it soon. =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Fri Jul 7 02:48:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A82BD98004; Fri, 7 Jul 2017 02:48:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09B5664192; Fri, 7 Jul 2017 02:48:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v672mtY5048241; Fri, 7 Jul 2017 02:48:55 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v672mtJV048240; Fri, 7 Jul 2017 02:48:55 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201707070248.v672mtJV048240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 7 Jul 2017 02:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320761 - head/sbin/init X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/init X-SVN-Commit-Revision: 320761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 02:48:56 -0000 Author: delphij Date: Fri Jul 7 02:48:55 2017 New Revision: 320761 URL: https://svnweb.freebsd.org/changeset/base/320761 Log: - Use strlcat() instead of strncat(). - Use asprintf() and handle allocation errors. Reviewed by: kevlo MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D11486 Modified: head/sbin/init/init.c Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Fri Jul 7 00:34:51 2017 (r320760) +++ head/sbin/init/init.c Fri Jul 7 02:48:55 2017 (r320761) @@ -1271,8 +1271,8 @@ new_session(session_t *sprev, struct ttyent *typ) sp->se_flags |= SE_PRESENT; - sp->se_device = malloc(sizeof(_PATH_DEV) + strlen(typ->ty_name)); - sprintf(sp->se_device, "%s%s", _PATH_DEV, typ->ty_name); + if (asprintf(&sp->se_device, "%s%s", _PATH_DEV, typ->ty_name) < 0) + err(1, "asprintf"); /* * Attempt to open the device, if we get "device not configured" @@ -1315,8 +1315,8 @@ setupargv(session_t *sp, struct ttyent *typ) free(sp->se_getty_argv_space); free(sp->se_getty_argv); } - sp->se_getty = malloc(strlen(typ->ty_getty) + strlen(typ->ty_name) + 2); - sprintf(sp->se_getty, "%s %s", typ->ty_getty, typ->ty_name); + if (asprintf(&sp->se_getty, "%s %s", typ->ty_getty, typ->ty_name) < 0) + err(1, "asprintf"); sp->se_getty_argv_space = strdup(sp->se_getty); sp->se_getty_argv = construct_argv(sp->se_getty_argv_space); if (sp->se_getty_argv == NULL) { @@ -1429,7 +1429,7 @@ start_window_system(session_t *sp) if (sp->se_type) { /* Don't use malloc after fork */ strcpy(term, "TERM="); - strncat(term, sp->se_type, sizeof(term) - 6); + strlcat(term, sp->se_type, sizeof(term)); env[0] = term; env[1] = 0; } @@ -1493,7 +1493,7 @@ start_getty(session_t *sp) if (sp->se_type) { /* Don't use malloc after fork */ strcpy(term, "TERM="); - strncat(term, sp->se_type, sizeof(term) - 6); + strlcat(term, sp->se_type, sizeof(term)); env[0] = term; env[1] = 0; } else From owner-svn-src-head@freebsd.org Fri Jul 7 05:43:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC894D9AE18; Fri, 7 Jul 2017 05:43:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93D7F6878B; Fri, 7 Jul 2017 05:43:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v675h4RC056306 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 7 Jul 2017 08:43:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v675h4RC056306 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v675h4Br056305; Fri, 7 Jul 2017 08:43:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 7 Jul 2017 08:43:04 +0300 From: Konstantin Belousov To: Xin LI Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320761 - head/sbin/init Message-ID: <20170707054304.GN1935@kib.kiev.ua> References: <201707070248.v672mtJV048240@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201707070248.v672mtJV048240@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 05:43:10 -0000 On Fri, Jul 07, 2017 at 02:48:55AM +0000, Xin LI wrote: > Author: delphij > Date: Fri Jul 7 02:48:55 2017 > New Revision: 320761 > URL: https://svnweb.freebsd.org/changeset/base/320761 > > Log: > - Use strlcat() instead of strncat(). > - Use asprintf() and handle allocation errors. > > Reviewed by: kevlo > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D11486 > > Modified: > head/sbin/init/init.c > > Modified: head/sbin/init/init.c > ============================================================================== > --- head/sbin/init/init.c Fri Jul 7 00:34:51 2017 (r320760) > +++ head/sbin/init/init.c Fri Jul 7 02:48:55 2017 (r320761) > @@ -1271,8 +1271,8 @@ new_session(session_t *sprev, struct ttyent *typ) > > sp->se_flags |= SE_PRESENT; > > - sp->se_device = malloc(sizeof(_PATH_DEV) + strlen(typ->ty_name)); > - sprintf(sp->se_device, "%s%s", _PATH_DEV, typ->ty_name); > + if (asprintf(&sp->se_device, "%s%s", _PATH_DEV, typ->ty_name) < 0) > + err(1, "asprintf"); > IMO this is wrong. init(8) too important for the system operations, and panicing the machine due to error from attempt creating getty session is not worth it. Either session should be disabled, or retried after some time, or some other measures taken, but please do not kill init just due to a local error. I would even argue that using snprintf() there and ignoring truncation is much better than err(), not least because the problem probably can only practically appear due to a misconfiguration. > /* > * Attempt to open the device, if we get "device not configured" > @@ -1315,8 +1315,8 @@ setupargv(session_t *sp, struct ttyent *typ) > free(sp->se_getty_argv_space); > free(sp->se_getty_argv); > } > - sp->se_getty = malloc(strlen(typ->ty_getty) + strlen(typ->ty_name) + 2); > - sprintf(sp->se_getty, "%s %s", typ->ty_getty, typ->ty_name); > + if (asprintf(&sp->se_getty, "%s %s", typ->ty_getty, typ->ty_name) < 0) > + err(1, "asprintf"); Same there. > sp->se_getty_argv_space = strdup(sp->se_getty); > sp->se_getty_argv = construct_argv(sp->se_getty_argv_space); > if (sp->se_getty_argv == NULL) { > @@ -1429,7 +1429,7 @@ start_window_system(session_t *sp) > if (sp->se_type) { > /* Don't use malloc after fork */ > strcpy(term, "TERM="); > - strncat(term, sp->se_type, sizeof(term) - 6); > + strlcat(term, sp->se_type, sizeof(term)); > env[0] = term; > env[1] = 0; > } > @@ -1493,7 +1493,7 @@ start_getty(session_t *sp) > if (sp->se_type) { > /* Don't use malloc after fork */ > strcpy(term, "TERM="); > - strncat(term, sp->se_type, sizeof(term) - 6); > + strlcat(term, sp->se_type, sizeof(term)); > env[0] = term; > env[1] = 0; > } else From owner-svn-src-head@freebsd.org Fri Jul 7 05:43:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F30E5D9AE90; Fri, 7 Jul 2017 05:43:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C03F5688C9; Fri, 7 Jul 2017 05:43:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v675hiIB023404; Fri, 7 Jul 2017 05:43:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v675hiPT023403; Fri, 7 Jul 2017 05:43:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707070543.v675hiPT023403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 7 Jul 2017 05:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320762 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 320762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 05:43:46 -0000 Author: kib Date: Fri Jul 7 05:43:44 2017 New Revision: 320762 URL: https://svnweb.freebsd.org/changeset/base/320762 Log: Improve BIT_FLS() documentation. Submitted by: Sebastian Huber MFC after: 6 days Modified: head/share/man/man9/bitset.9 Modified: head/share/man/man9/bitset.9 ============================================================================== --- head/share/man/man9/bitset.9 Fri Jul 7 02:48:55 2017 (r320761) +++ head/share/man/man9/bitset.9 Fri Jul 7 05:43:44 2017 (r320762) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 6, 2017 +.Dd July 7, 2017 .Dt BITSET 9 .Os .Sh NAME @@ -519,4 +519,6 @@ argument to all of these macros must match the value g .Pp Unlike every other reference to individual set members, which are zero-indexed, .Fn BIT_FFS -returns a one-indexed result (or zero if the set is empty). +and +.Fn BIT_FLS +return a one-indexed result (or zero if the set is empty). From owner-svn-src-head@freebsd.org Fri Jul 7 05:55:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F08F6D9B084; Fri, 7 Jul 2017 05:55:44 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C53DB68CCB; Fri, 7 Jul 2017 05:55:44 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:37a:a563:61b1:723b:a3e7]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 4624A1768A; Thu, 6 Jul 2017 22:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1499406944; x=1499421344; bh=39fsT34DUl8ZNVMOzWE0Fga2z6258MZ8l0umrQlHw3c=; h=Cc:Subject:To:References:From:Date:In-Reply-To; b=JNyaQpQRzMnhTBvW19UiJAQn3KcoDaw8nxWzJ4RxtWvMTNT2SDcioQ75U7utrnGMV ruYyRDIvQ6F3eS+5FsN51hWjK3xIK86MY/RZ4RQekkylkk6QGiF4KGK4cAChsc/BEe HfEDVgbTFxo4yYZN2+9UMT4nzxEbiFVcaZZHiMfo= Cc: d@delphij.net, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320761 - head/sbin/init To: Konstantin Belousov , Xin LI References: <201707070248.v672mtJV048240@repo.freebsd.org> <20170707054304.GN1935@kib.kiev.ua> From: Xin Li Message-ID: <7a66538c-0c2a-86d8-5aa7-f477d5c09d82@delphij.net> Date: Thu, 6 Jul 2017 22:55:35 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170707054304.GN1935@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oBDAB3CmOKIpaJnGXhPN0Ubo1DxXEVL94" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 05:55:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oBDAB3CmOKIpaJnGXhPN0Ubo1DxXEVL94 Content-Type: multipart/mixed; boundary="Gphnsqkuj4lvT8oqSvF52rHC0WdhuhJQB"; protected-headers="v1" From: Xin Li To: Konstantin Belousov , Xin LI Cc: d@delphij.net, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <7a66538c-0c2a-86d8-5aa7-f477d5c09d82@delphij.net> Subject: Re: svn commit: r320761 - head/sbin/init References: <201707070248.v672mtJV048240@repo.freebsd.org> <20170707054304.GN1935@kib.kiev.ua> In-Reply-To: <20170707054304.GN1935@kib.kiev.ua> --Gphnsqkuj4lvT8oqSvF52rHC0WdhuhJQB Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi, Kostantin, On 7/6/17 22:43, Konstantin Belousov wrote: >> Modified: head/sbin/init/init.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sbin/init/init.c Fri Jul 7 00:34:51 2017 (r320760) >> +++ head/sbin/init/init.c Fri Jul 7 02:48:55 2017 (r320761) >> @@ -1271,8 +1271,8 @@ new_session(session_t *sprev, struct ttyent *typ= ) >> =20 >> sp->se_flags |=3D SE_PRESENT; >> =20 >> - sp->se_device =3D malloc(sizeof(_PATH_DEV) + strlen(typ->ty_name)); >> - sprintf(sp->se_device, "%s%s", _PATH_DEV, typ->ty_name); >> + if (asprintf(&sp->se_device, "%s%s", _PATH_DEV, typ->ty_name) < 0) >> + err(1, "asprintf"); >> =20 > IMO this is wrong. init(8) too important for the system operations, > and panicing the machine due to error from attempt creating getty > session is not worth it. >=20 > Either session should be disabled, or retried after some time, or > some other measures taken, but please do not kill init just due to a > local error. >=20 > I would even argue that using snprintf() there and ignoring truncation > is much better than err(), not least because the problem probably can > only practically appear due to a misconfiguration. Note that the previous code would just crash (due to NULL pointer deference) so I think this change is an improvement over the status quo. I do agree that the reliability of init(8) is critical and will see what we can do with the extreme situation and submit a new CR. Cheers, --Gphnsqkuj4lvT8oqSvF52rHC0WdhuhJQB-- --oBDAB3CmOKIpaJnGXhPN0Ubo1DxXEVL94 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJZXyJbAAoJEJW2GBstM+nsUxcQAJ95MGuMat+PHDzB3BVTYjLP DX6+15QIoRJWTwy3LIroADt5ODsw+rKCSL3tlG/kz+qowGT0mG79jX2HCSUoNHih n9zuUbijqfdJQIQSt3/sx4F/aWYXQspDC7xN8OKD9U74Iu4jD0SQxrGSGxXYQ3+7 /IGsjuQl+l9RMmYw/h4zW4BfwyrO0+VNcsHcEWy6jeyTCrshEDwXORTOm45Qw1xp KclaIeOL5hCBbHQInLYDTSyzm0DC4w85Cn9qcx51jaSl+cYiTeoU2h1zP1Fwb8WE NEE1N5k0sYwPLZVJ69Z07Hq9+WY1RSaLIqnSIZ2QUDBTcwrZ798W/vZZWpfAAZPC iS8mJWPMOqRFXjq+xWCKPS8/4etxA2qxF31rdOUIzGshNu/mVVfDLzbfkVdZTkrr /EeiiqzocOCw0qV4wG8Mx4s2/KWfhUO3uj8eTkJcJUCamiUZ6WeCPckZkxxJHdHq JeCP4xJjI7KeHYHCUf0bSTJyy5hH00VWVz3McQ1UWGICFpljwdWPoLDalo30nNBm frMO7LU4JnGdk9sZt8lGApQUv3Kckdihsm4mmGru2rY3wUyshygEzhAlDug7xK0e 1ZEgfl+PxPopZo7qNdx7BJ0rH4nKEIYX9X7uLccxSRIzy9M2cKajEkTFLoLvUshc eh1HL+F16tMeZ9eg5RKC =VrUD -----END PGP SIGNATURE----- --oBDAB3CmOKIpaJnGXhPN0Ubo1DxXEVL94-- From owner-svn-src-head@freebsd.org Fri Jul 7 06:37:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFDFAD9B9DA; Fri, 7 Jul 2017 06:37:20 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 814EB6AEAD; Fri, 7 Jul 2017 06:37:20 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v676bJJS043769; Fri, 7 Jul 2017 06:37:19 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v676bJGo043766; Fri, 7 Jul 2017 06:37:19 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201707070637.v676bJGo043766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Fri, 7 Jul 2017 06:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320764 - head/sys/amd64/vmm/amd X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/amd64/vmm/amd X-SVN-Commit-Revision: 320764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 06:37:20 -0000 Author: rlibby Date: Fri Jul 7 06:37:19 2017 New Revision: 320764 URL: https://svnweb.freebsd.org/changeset/base/320764 Log: amd-vi: gcc build errors amdvi_cmp_wait: gcc complained about a malformed string behind an ifdef. struct amdvi_dte: widen the type of the first reserved bitfield so that the packed representation would not cross an alignment boundary for that type. Apparently that causes in-tree gcc (4.2) to insert padding (despite packed, resulting in a wrong structure definition), and causes more modern gcc to emit a warning. ivrs_hdr_iterate_tbl: delete a misleading check about header length being less than 0 (the type is unsigned) and replace it with a check that the length doesn't exceed the table size. Reviewed by: anish, grehan Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11485 Modified: head/sys/amd64/vmm/amd/amdvi_hw.c head/sys/amd64/vmm/amd/amdvi_priv.h head/sys/amd64/vmm/amd/ivrs_drv.c Modified: head/sys/amd64/vmm/amd/amdvi_hw.c ============================================================================== --- head/sys/amd64/vmm/amd/amdvi_hw.c Fri Jul 7 06:29:18 2017 (r320763) +++ head/sys/amd64/vmm/amd/amdvi_hw.c Fri Jul 7 06:37:19 2017 (r320764) @@ -496,7 +496,7 @@ amdvi_cmp_wait(struct amdvi_softc *softc) #ifdef AMDVI_DEBUG_CMD if (status) - device_printf(softc->dev, "CMD completion DONE Tail:0x%x, + device_printf(softc->dev, "CMD completion DONE Tail:0x%x, " "Head:0x%x, loop:%d.\n", ctrl->cmd_tail, ctrl->cmd_head, loop); #endif Modified: head/sys/amd64/vmm/amd/amdvi_priv.h ============================================================================== --- head/sys/amd64/vmm/amd/amdvi_priv.h Fri Jul 7 06:29:18 2017 (r320763) +++ head/sys/amd64/vmm/amd/amdvi_priv.h Fri Jul 7 06:37:19 2017 (r320764) @@ -65,7 +65,7 @@ struct amdvi_dte { uint32_t dt_valid:1; /* Device Table valid. */ uint32_t pt_valid:1; /* Page translation valid. */ - uint8_t :7; /* Reserved[8:2] */ + uint16_t :7; /* Reserved[8:2] */ uint8_t pt_level:3; /* Paging level, 0 to disable. */ uint64_t pt_base:40; /* Page table root pointer. */ uint8_t :3; /* Reserved[54:52] */ Modified: head/sys/amd64/vmm/amd/ivrs_drv.c ============================================================================== --- head/sys/amd64/vmm/amd/ivrs_drv.c Fri Jul 7 06:29:18 2017 (r320763) +++ head/sys/amd64/vmm/amd/ivrs_drv.c Fri Jul 7 06:37:19 2017 (r320764) @@ -75,6 +75,12 @@ ivrs_hdr_iterate_tbl(ivhd_iter_t iter, void *arg) end = (ACPI_IVRS_HEADER *)((char *)ivrs + ivrs->Header.Length); while (ivrs_hdr < end) { + if ((uint8_t *)ivrs_hdr + ivrs_hdr->Length > (uint8_t *)end) { + printf("AMD-Vi:IVHD/IVMD is corrupted, length : %d\n", + ivrs_hdr->Length); + break; + } + switch (ivrs_hdr->Type) { case ACPI_IVRS_TYPE_HARDWARE: /* Legacy */ case 0x11: @@ -98,10 +104,6 @@ ivrs_hdr_iterate_tbl(ivhd_iter_t iter, void *arg) ivrs_hdr = (ACPI_IVRS_HEADER *)((uint8_t *)ivrs_hdr + ivrs_hdr->Length); - if (ivrs_hdr->Length < 0) { - printf("AMD-Vi:IVHD/IVMD is corrupted, length : %d\n", ivrs_hdr->Length); - break; - } } } From owner-svn-src-head@freebsd.org Fri Jul 7 08:43:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 769EDD9DD99 for ; Fri, 7 Jul 2017 08:43:56 +0000 (UTC) (envelope-from r@robakdesign.com) Received: from mail-vk0-f53.google.com (mail-vk0-f53.google.com [209.85.213.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3518071AC5 for ; Fri, 7 Jul 2017 08:43:55 +0000 (UTC) (envelope-from r@robakdesign.com) Received: by mail-vk0-f53.google.com with SMTP id r125so13935168vkf.1 for ; Fri, 07 Jul 2017 01:43:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4x75AYYn3qgGGTCja7bxTW5TrzyTVlSnEutWDKOs+mU=; b=CihKicJ84DZiBGlgTkMfckhl4iZ7NwaNVdIHGdXllj5DS2pLVZe6NFbmNJiAxcd9pM WdOfVhEp8V/bNGQunGLBsoQeSH0b9Y+dNX7Vesz9T/w7xP2oB3sg0t+PlG630I5AWhGB GL4cHZNMbZykyhCmbqFnXA0csCt9FcdUHUncqgHekZQpgZszOkbMsKsPvaSVMiRlpMNg ttMhiDNQYQlGU+VQeHOihBXkPEdl56TWBF5x1qgywq+7GryTcfTR+aNlQwyEeUfEUEWd AnG0Wl79SkVD/ZQzDbXMDAhUf2eYKmmKqKSdWwdAmWJdgt8a143UMnwIZ1WhgbTUXZr3 vnXQ== X-Gm-Message-State: AIVw110onugZcezhxAZGbQPz0YJWIU38Wqd9kObD4oLTjWVST9kPy65+ ShJ5HomxeQVkFpXYIfbjMQ== X-Received: by 10.31.165.150 with SMTP id o144mr43964vke.37.1499416679422; Fri, 07 Jul 2017 01:37:59 -0700 (PDT) Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com. [209.85.213.54]) by smtp.gmail.com with ESMTPSA id z15sm775008uab.19.2017.07.07.01.37.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jul 2017 01:37:58 -0700 (PDT) Received: by mail-vk0-f54.google.com with SMTP id y70so13676623vky.3 for ; Fri, 07 Jul 2017 01:37:58 -0700 (PDT) X-Received: by 10.31.106.2 with SMTP id f2mr52041vkc.112.1499416678320; Fri, 07 Jul 2017 01:37:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.13.7 with HTTP; Fri, 7 Jul 2017 01:37:37 -0700 (PDT) In-Reply-To: <9691CBDC-9C55-4E05-AFA2-9FEFD5E1B21F@dsl-only.net> References: <9691CBDC-9C55-4E05-AFA2-9FEFD5E1B21F@dsl-only.net> From: =?UTF-8?Q?Bart=C5=82omiej_Rutkowski?= Date: Fri, 7 Jul 2017 09:37:37 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts To: Mark Millard Cc: Konstantin Belousov , Bartek Rutkowski , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 08:43:56 -0000 On Thu, Jul 6, 2017 at 11:38 PM, Mark Millard wrote: > The following is only offered as a possibility for where > the 2MB idea might have came from: https://hardenedbsd.org . > I make no claim that the script change is in fact > appropriate: I've not studied the issue. > Not that it matters at all, but just to clear out the doubts, no this change was not inspired by HardenedBSD in any way, I'd even say it was the other way around ;) Kind regards, Bartek Rutkowski From owner-svn-src-head@freebsd.org Fri Jul 7 12:03:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C282FDA1E4D; Fri, 7 Jul 2017 12:03:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DE2677BCB; Fri, 7 Jul 2017 12:03:59 +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 v67C3wnb082243; Fri, 7 Jul 2017 12:03:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67C3wTF082242; Fri, 7 Jul 2017 12:03:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201707071203.v67C3wTF082242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 7 Jul 2017 12:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320773 - head/sys/dev/usb/controller X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/controller X-SVN-Commit-Revision: 320773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 12:03:59 -0000 Author: hselasky Date: Fri Jul 7 12:03:58 2017 New Revision: 320773 URL: https://svnweb.freebsd.org/changeset/base/320773 Log: Implement fix for BULK IN-token retry mechanism. When the hardware is programmed for infinite IN token retry after NAK, the SAF1761 hardware, however, does not retry the IN-token. This problem is described in the SAF1761 errata, section 18.1.1. While at it: - Add some minor chip specific initialization for RTEMS. - Add debug print for status registers in the interrupt filter. Submitted by: Christian Mauderer MFC after: 1 week Modified: head/sys/dev/usb/controller/saf1761_otg.c Modified: head/sys/dev/usb/controller/saf1761_otg.c ============================================================================== --- head/sys/dev/usb/controller/saf1761_otg.c Fri Jul 7 11:54:45 2017 (r320772) +++ head/sys/dev/usb/controller/saf1761_otg.c Fri Jul 7 12:03:58 2017 (r320773) @@ -516,7 +516,25 @@ saf1761_host_bulk_data_rx(struct saf1761_otg_softc *sc DPRINTFN(5, "STATUS=0x%08x\n", status); if (status & SOTG_PTD_DW3_ACTIVE) { - goto busy; + temp = saf1761_peek_host_status_le_4(sc, + pdt_addr + SOTG_PTD_DW0); + if (temp & SOTG_PTD_DW0_VALID) { + goto busy; + } else { + status = saf1761_peek_host_status_le_4(sc, + pdt_addr + SOTG_PTD_DW3); + + /* check if still active */ + if (status & SOTG_PTD_DW3_ACTIVE) { + saf1761_host_channel_free(sc, td); + goto retry; + } else if (status & SOTG_PTD_DW3_HALTED) { + if (!(status & SOTG_PTD_DW3_ERRORS)) + td->error_stall = 1; + td->error_any = 1; + goto complete; + } + } } else if (status & SOTG_PTD_DW3_HALTED) { if (!(status & SOTG_PTD_DW3_ERRORS)) td->error_stall = 1; @@ -560,6 +578,7 @@ saf1761_host_bulk_data_rx(struct saf1761_otg_softc *sc } saf1761_host_channel_free(sc, td); } +retry: if (saf1761_host_channel_alloc(sc, td)) goto busy; @@ -1589,6 +1608,8 @@ saf1761_otg_filter_interrupt(void *arg) (void) SAF1761_READ_LE_4(sc, SOTG_INT_PTD_DONE_PTD); (void) SAF1761_READ_LE_4(sc, SOTG_ISO_PTD_DONE_PTD); + DPRINTFN(9, "HCINTERRUPT=0x%08x DCINTERRUPT=0x%08x\n", hcstat, status); + if (status & SOTG_DCINTERRUPT_IEPSOF) { if ((sc->sc_host_async_busy_map[1] | sc->sc_host_async_busy_map[0] | sc->sc_host_intr_busy_map[1] | sc->sc_host_intr_busy_map[0] | @@ -2446,11 +2467,15 @@ saf1761_otg_init(struct saf1761_otg_softc *sc) */ SAF1761_WRITE_LE_4(sc, SOTG_CTRL_SET_CLR, SOTG_CTRL_CLR(0xFFFF)); +#ifdef __rtems__ SAF1761_WRITE_LE_4(sc, SOTG_CTRL_SET_CLR, + SOTG_CTRL_SET(SOTG_CTRL_SEL_CP_EXT | SOTG_CTRL_VBUS_DRV)); +#else + SAF1761_WRITE_LE_4(sc, SOTG_CTRL_SET_CLR, SOTG_CTRL_SET(SOTG_CTRL_SW_SEL_HC_DC | SOTG_CTRL_BDIS_ACON_EN | SOTG_CTRL_SEL_CP_EXT | SOTG_CTRL_VBUS_DRV)); - +#endif /* disable device address */ SAF1761_WRITE_LE_4(sc, SOTG_ADDRESS, 0); From owner-svn-src-head@freebsd.org Fri Jul 7 13:15:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FB9BDA32D0; Fri, 7 Jul 2017 13:15:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 553EE79F99; Fri, 7 Jul 2017 13:15:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67DF0Jq012117; Fri, 7 Jul 2017 13:15:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67DF0lG012116; Fri, 7 Jul 2017 13:15:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201707071315.v67DF0lG012116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 7 Jul 2017 13:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320774 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 320774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 13:15:01 -0000 Author: hselasky Date: Fri Jul 7 13:15:00 2017 New Revision: 320774 URL: https://svnweb.freebsd.org/changeset/base/320774 Log: Fix a bug in synchronize RCU when the calling thread is bound to a CPU. Set "td_pinned" to zero after "sched_unbind()" to prevent "td_pinned" from temporarily becoming negative during "sched_bind()". This can happen if "sched_bind()" uses "sched_pin()" and "sched_unpin()". MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_rcu.c Fri Jul 7 12:03:58 2017 (r320773) +++ head/sys/compat/linuxkpi/common/src/linux_rcu.c Fri Jul 7 13:15:00 2017 (r320774) @@ -299,8 +299,9 @@ linux_synchronize_rcu(void) old_cpu = PCPU_GET(cpuid); old_pinned = td->td_pinned; old_prio = td->td_priority; - td->td_pinned = 0; was_bound = sched_is_bound(td); + sched_unbind(td); + td->td_pinned = 0; sched_bind(td, old_cpu); ck_epoch_synchronize_wait(&linux_epoch, From owner-svn-src-head@freebsd.org Fri Jul 7 13:44:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89E06DA3A97; Fri, 7 Jul 2017 13:44:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 609947AD4E; Fri, 7 Jul 2017 13:44:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67DiEs9024495; Fri, 7 Jul 2017 13:44:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67DiErd024494; Fri, 7 Jul 2017 13:44:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201707071344.v67DiErd024494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 7 Jul 2017 13:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320775 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 320775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 13:44:15 -0000 Author: hselasky Date: Fri Jul 7 13:44:14 2017 New Revision: 320775 URL: https://svnweb.freebsd.org/changeset/base/320775 Log: Complete r320189 which allows a NULL VM fault handler in the LinuxKPI. Instead of mapping a dummy page upon a page fault, map the page pointed to by the physical address given by IDX_TO_OFF(vmap->vm_pfn). To simplify the implementation use OBJT_DEVICE to implement our own linux_cdev_pager_fault() instead of using the existing linux_cdev_pager_populate(). Some minor code factoring while at it. Reviewed by: markj @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Jul 7 13:15:00 2017 (r320774) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Jul 7 13:44:14 2017 (r320775) @@ -474,11 +474,57 @@ linux_file_free(struct linux_file *filp) } static int +linux_cdev_pager_fault(vm_object_t vm_obj, vm_ooffset_t offset, int prot, + vm_page_t *mres) +{ + struct vm_area_struct *vmap; + + vmap = linux_cdev_handle_find(vm_obj->handle); + + MPASS(vmap != NULL); + MPASS(vmap->vm_private_data == vm_obj->handle); + + if (likely(vmap->vm_ops != NULL && offset < vmap->vm_len)) { + vm_paddr_t paddr = IDX_TO_OFF(vmap->vm_pfn) + offset; + vm_page_t page; + + if (((*mres)->flags & PG_FICTITIOUS) != 0) { + /* + * If the passed in result page is a fake + * page, update it with the new physical + * address. + */ + page = *mres; + vm_page_updatefake(page, paddr, vm_obj->memattr); + } else { + /* + * Replace the passed in "mres" page with our + * own fake page and free up the all of the + * original pages. + */ + VM_OBJECT_WUNLOCK(vm_obj); + page = vm_page_getfake(paddr, vm_obj->memattr); + VM_OBJECT_WLOCK(vm_obj); + + vm_page_replace_checked(page, vm_obj, + (*mres)->pindex, *mres); + + vm_page_lock(*mres); + vm_page_free(*mres); + vm_page_unlock(*mres); + *mres = page; + } + page->valid = VM_PAGE_BITS_ALL; + return (VM_PAGER_OK); + } + return (VM_PAGER_FAIL); +} + +static int linux_cdev_pager_populate(vm_object_t vm_obj, vm_pindex_t pidx, int fault_type, vm_prot_t max_prot, vm_pindex_t *first, vm_pindex_t *last) { struct vm_area_struct *vmap; - struct vm_fault vmf; int err; linux_set_current(curthread); @@ -488,18 +534,20 @@ linux_cdev_pager_populate(vm_object_t vm_obj, vm_pinde MPASS(vmap != NULL); MPASS(vmap->vm_private_data == vm_obj->handle); - /* fill out VM fault structure */ - vmf.virtual_address = (void *)((uintptr_t)pidx << PAGE_SHIFT); - vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0; - vmf.pgoff = 0; - vmf.page = NULL; - VM_OBJECT_WUNLOCK(vm_obj); down_write(&vmap->vm_mm->mmap_sem); - if (unlikely(vmap->vm_ops == NULL || vmap->vm_ops->fault == NULL)) { + if (unlikely(vmap->vm_ops == NULL)) { err = VM_FAULT_SIGBUS; } else { + struct vm_fault vmf; + + /* fill out VM fault structure */ + vmf.virtual_address = (void *)((uintptr_t)pidx << PAGE_SHIFT); + vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0; + vmf.pgoff = 0; + vmf.page = NULL; + vmap->vm_pfn_count = 0; vmap->vm_pfn_pcount = &vmap->vm_pfn_count; vmap->vm_obj = vm_obj; @@ -631,10 +679,19 @@ linux_cdev_pager_dtor(void *handle) linux_cdev_handle_free(vmap); } -static struct cdev_pager_ops linux_cdev_pager_ops = { +static struct cdev_pager_ops linux_cdev_pager_ops[2] = { + { + /* OBJT_MGTDEVICE */ .cdev_pg_populate = linux_cdev_pager_populate, .cdev_pg_ctor = linux_cdev_pager_ctor, .cdev_pg_dtor = linux_cdev_pager_dtor + }, + { + /* OBJT_DEVICE */ + .cdev_pg_fault = linux_cdev_pager_fault, + .cdev_pg_ctor = linux_cdev_pager_ctor, + .cdev_pg_dtor = linux_cdev_pager_dtor + }, }; static int @@ -1184,8 +1241,15 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * vmap = linux_cdev_handle_insert(vm_private_data, vmap); - *object = cdev_pager_allocate(vm_private_data, OBJT_MGTDEVICE, - &linux_cdev_pager_ops, size, nprot, *offset, curthread->td_ucred); + if (vmap->vm_ops->fault == NULL) { + *object = cdev_pager_allocate(vm_private_data, OBJT_DEVICE, + &linux_cdev_pager_ops[1], size, nprot, *offset, + curthread->td_ucred); + } else { + *object = cdev_pager_allocate(vm_private_data, OBJT_MGTDEVICE, + &linux_cdev_pager_ops[0], size, nprot, *offset, + curthread->td_ucred); + } if (*object == NULL) { linux_cdev_handle_remove(vmap); @@ -1196,7 +1260,8 @@ linux_dev_mmap_single(struct cdev *dev, vm_ooffset_t * struct sglist *sg; sg = sglist_alloc(1, M_WAITOK); - sglist_append_phys(sg, (vm_paddr_t)vmap->vm_pfn << PAGE_SHIFT, vmap->vm_len); + sglist_append_phys(sg, + (vm_paddr_t)vmap->vm_pfn << PAGE_SHIFT, vmap->vm_len); *object = vm_pager_allocate(OBJT_SG, sg, vmap->vm_len, nprot, 0, curthread->td_ucred); From owner-svn-src-head@freebsd.org Fri Jul 7 13:55:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DCDCDA3DEB; Fri, 7 Jul 2017 13:55:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A5487B46A; Fri, 7 Jul 2017 13:55:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67DtEjR028952; Fri, 7 Jul 2017 13:55:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67DtBHk028926; Fri, 7 Jul 2017 13:55:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707071355.v67DtBHk028926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 7 Jul 2017 13:55:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320777 - in head/sys: arm/arm arm/conf arm/include conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm/arm arm/conf arm/include conf X-SVN-Commit-Revision: 320777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 13:55:15 -0000 Author: andrew Date: Fri Jul 7 13:55:11 2017 New Revision: 320777 URL: https://svnweb.freebsd.org/changeset/base/320777 Log: Remove the MULTIDELAY option from arm. It's now enabled when PLATFORM is enabled. Modified: head/sys/arm/arm/generic_timer.c head/sys/arm/arm/machdep.c head/sys/arm/arm/mpcore_timer.c head/sys/arm/arm/platform.c head/sys/arm/conf/ALLWINNER_UP head/sys/arm/conf/ALPINE head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/GENERIC head/sys/arm/conf/IMX53 head/sys/arm/conf/IMX6 head/sys/arm/conf/PANDABOARD head/sys/arm/conf/RK3188 head/sys/arm/conf/RPI-B head/sys/arm/conf/RPI2 head/sys/arm/conf/SOCFPGA head/sys/arm/conf/TEGRA124 head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/VIRT head/sys/arm/conf/VYBRID head/sys/arm/conf/ZEDBOARD head/sys/arm/include/machdep.h head/sys/arm/include/platformvar.h head/sys/conf/options.arm Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/arm/generic_timer.c Fri Jul 7 13:55:11 2017 (r320777) @@ -72,10 +72,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#if defined(__arm__) && !defined(MULTIDELAY) -#error The generic timer requires MULTIDELAY on 32bit arm -#endif - #define GT_CTRL_ENABLE (1 << 0) #define GT_CTRL_INT_MASK (1 << 1) #define GT_CTRL_INT_STAT (1 << 2) Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/arm/machdep.c Fri Jul 7 13:55:11 2017 (r320777) @@ -146,7 +146,7 @@ static struct pv_addr kernelstack; #endif /* __ARM_ARCH >= 6 */ #endif /* FDT */ -#ifdef MULTIDELAY +#ifdef PLATFORM static delay_func *delay_impl; static void *delay_arg; #endif @@ -331,7 +331,7 @@ cpu_initclocks(void) } #endif -#ifdef MULTIDELAY +#ifdef PLATFORM void arm_set_delay(delay_func *impl, void *arg) { Modified: head/sys/arm/arm/mpcore_timer.c ============================================================================== --- head/sys/arm/arm/mpcore_timer.c Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/arm/mpcore_timer.c Fri Jul 7 13:55:11 2017 (r320777) @@ -59,9 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef MULTIDELAY #include /* For arm_set_delay */ -#endif #include #include @@ -71,10 +69,6 @@ __FBSDID("$FreeBSD$"); #include -#if defined(PLATFORM) && !defined(MULTIDELAY) -#error The MPCore Timer driver requires MULTIDELAY when building with PLATFORM -#endif - /* Private (per-CPU) timer register map */ #define PRV_TIMER_LOAD 0x0000 #define PRV_TIMER_COUNT 0x0004 @@ -442,7 +436,7 @@ arm_tmr_attach(device_t dev) return (ENXIO); } -#ifdef MULTIDELAY +#ifdef PLATFORM /* * We can register as the DELAY() implementation only if we successfully * set up the global timer. @@ -533,7 +527,7 @@ arm_tmr_delay(int usec, void *arg) } } -#ifndef MULTIDELAY +#ifndef PLATFORM /** * DELAY - Delay for at least usec microseconds. * @usec: number of microseconds to delay by Modified: head/sys/arm/arm/platform.c ============================================================================== --- head/sys/arm/arm/platform.c Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/arm/platform.c Fri Jul 7 13:55:11 2017 (r320777) @@ -75,9 +75,7 @@ SYSCTL_STRING(_hw, OID_AUTO, platform, CTLFLAG_RDTUN | */ SET_DECLARE(platform_set, platform_def_t); -#ifdef MULTIDELAY static delay_func platform_delay; -#endif void platform_probe_and_attach(void) @@ -152,10 +150,8 @@ platform_probe_and_attach(void) strlcpy(plat_name, plat_def_impl->name, sizeof(plat_name)); -#ifdef MULTIDELAY /* Set a default delay function */ arm_set_delay(platform_delay, NULL); -#endif PLATFORM_ATTACH(plat_obj); } @@ -202,7 +198,6 @@ cpu_reset(void) } } -#ifdef MULTIDELAY static void platform_delay(int usec, void *arg __unused) { @@ -216,7 +211,6 @@ platform_delay(int usec, void *arg __unused) */ cpufunc_nullop(); } -#endif #if defined(SMP) void Modified: head/sys/arm/conf/ALLWINNER_UP ============================================================================== --- head/sys/arm/conf/ALLWINNER_UP Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/ALLWINNER_UP Fri Jul 7 13:55:11 2017 (r320777) @@ -30,7 +30,6 @@ options SOC_ALLWINNER_A13 options SCHED_4BSD # 4BSD scheduler options PLATFORM -options MULTIDELAY # NFS root from boopt/dhcp #options BOOTP Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/ALPINE Fri Jul 7 13:55:11 2017 (r320777) @@ -28,7 +28,6 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options SMP # Enable multiple cores options PLATFORM -options MULTIDELAY # Interrupt controller device gic Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/BEAGLEBONE Fri Jul 7 13:55:11 2017 (r320777) @@ -29,7 +29,6 @@ include "../ti/am335x/std.am335x" makeoptions MODULES_EXTRA="dtb/am335x am335x_dmtpps" options INTRNG -options MULTIDELAY options SCHED_4BSD # 4BSD scheduler options PLATFORM Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/EFIKA_MX Fri Jul 7 13:55:11 2017 (r320777) @@ -31,7 +31,6 @@ options SCHED_4BSD # 4BSD scheduler #options MD_ROOT # MD is a potential root device #options NFSD # Network Filesystem Server options PLATFORM -options MULTIDELAY options INCLUDE_CONFIG_FILE # Include this file in kernel # NFS root from boopt/dhcp Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/EXYNOS5.common Fri Jul 7 13:55:11 2017 (r320777) @@ -23,7 +23,6 @@ makeoptions WERROR="-Werror" include "std.armv6" options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC -options MULTIDELAY options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/GENERIC Fri Jul 7 13:55:11 2017 (r320777) @@ -62,7 +62,6 @@ options SOC_OMAP4 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM -options MULTIDELAY options LINUX_BOOT_ABI # EXT_RESOURCES pseudo devices Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/IMX53 Fri Jul 7 13:55:11 2017 (r320777) @@ -28,7 +28,6 @@ options SOC_IMX53 options SCHED_4BSD # 4BSD scheduler #options NFSD # Network Filesystem Server options PLATFORM -options MULTIDELAY options INCLUDE_CONFIG_FILE # Include this file in kernel # kernel/memory size reduction Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/IMX6 Fri Jul 7 13:55:11 2017 (r320777) @@ -31,7 +31,6 @@ options SCHED_ULE # ULE scheduler options INCLUDE_CONFIG_FILE # Include this file in kernel options PLATFORM options SMP # Enable multiple cores -options MULTIDELAY # NFS root from boopt/dhcp #options BOOTP Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/PANDABOARD Fri Jul 7 13:55:11 2017 (r320777) @@ -34,7 +34,6 @@ makeoptions MODULES_EXTRA=dtb/omap4 options SCHED_ULE # ULE scheduler options PLATFORM -options MULTIDELAY options SMP # Enable multiple cores # NFS root from boopt/dhcp Modified: head/sys/arm/conf/RK3188 ============================================================================== --- head/sys/arm/conf/RK3188 Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/RK3188 Fri Jul 7 13:55:11 2017 (r320777) @@ -28,7 +28,6 @@ options SOC_ROCKCHIP_RK3188 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM -options MULTIDELAY # Root mount from MMC/SD card options ROOTDEVNAME=\"ufs:/dev/mmcsd0\" Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/RPI-B Fri Jul 7 13:55:11 2017 (r320777) @@ -28,7 +28,6 @@ options INTRNG options SCHED_4BSD # 4BSD scheduler options PLATFORM -options MULTIDELAY # NFS root from boopt/dhcp #options BOOTP Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/RPI2 Fri Jul 7 13:55:11 2017 (r320777) @@ -31,7 +31,6 @@ options INTRNG options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM -options MULTIDELAY # NFS root from boopt/dhcp #options BOOTP Modified: head/sys/arm/conf/SOCFPGA ============================================================================== --- head/sys/arm/conf/SOCFPGA Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/SOCFPGA Fri Jul 7 13:55:11 2017 (r320777) @@ -29,7 +29,6 @@ makeoptions WERROR="-Werror" options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC options SMP # Enable multiple cores -options MULTIDELAY options SOC_ALTERA_ARRIA10 options SOC_ALTERA_CYCLONE5 Modified: head/sys/arm/conf/TEGRA124 ============================================================================== --- head/sys/arm/conf/TEGRA124 Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/TEGRA124 Fri Jul 7 13:55:11 2017 (r320777) @@ -25,7 +25,6 @@ ident TEGRA124 options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC -options MULTIDELAY options SMP # Enable multiple cores options LINUX_BOOT_ABI Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/VERSATILEPB Fri Jul 7 13:55:11 2017 (r320777) @@ -70,7 +70,6 @@ device random # Entropy device options INTRNG options PLATFORM -options MULTIDELAY # Flattened Device Tree options FDT # Configure using FDT/DTB data Modified: head/sys/arm/conf/VIRT ============================================================================== --- head/sys/arm/conf/VIRT Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/VIRT Fri Jul 7 13:55:11 2017 (r320777) @@ -26,7 +26,6 @@ include "../qemu/std.virt" options SCHED_ULE # ULE scheduler options PLATFORM options SMP # Enable multiple cores -options MULTIDELAY # Interrupt controller device gic Modified: head/sys/arm/conf/VYBRID ============================================================================== --- head/sys/arm/conf/VYBRID Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/VYBRID Fri Jul 7 13:55:11 2017 (r320777) @@ -26,7 +26,6 @@ makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options PLATFORM # Platform based SoC -options MULTIDELAY #options NANDFS # NAND Filesystem #options SMP # Enable multiple cores Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/conf/ZEDBOARD Fri Jul 7 13:55:11 2017 (r320777) @@ -28,7 +28,6 @@ makeoptions MODULES_EXTRA="dtb/zynq" options SCHED_ULE # ULE scheduler options PLATFORM # Platform based SoC -options MULTIDELAY #options NFSSD # Network Filesystem Server options SMP # Enable multiple cores Modified: head/sys/arm/include/machdep.h ============================================================================== --- head/sys/arm/include/machdep.h Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/include/machdep.h Fri Jul 7 13:55:11 2017 (r320777) @@ -48,7 +48,7 @@ void board_set_revision(uint32_t); int arm_predict_branch(void *, u_int, register_t, register_t *, u_int (*)(void*, int), u_int (*)(void*, vm_offset_t, u_int*)); -#ifdef MULTIDELAY +#ifdef PLATFORM typedef void delay_func(int, void *); void arm_set_delay(delay_func *, void *); #endif Modified: head/sys/arm/include/platformvar.h ============================================================================== --- head/sys/arm/include/platformvar.h Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/arm/include/platformvar.h Fri Jul 7 13:55:11 2017 (r320777) @@ -90,15 +90,9 @@ typedef struct fdt_platform_class fdt_platform_def_t; extern platform_method_t fdt_platform_methods[]; -#ifdef MULTIDELAY -#define FDT_PLATFORM_CTASSERT(delay) CTASSERT(delay > 0) -#else -#define FDT_PLATFORM_CTASSERT(delay) -#endif - #define FDT_PLATFORM_DEF2(NAME, VAR_NAME, NAME_STR, size, compatible, \ delay) \ -FDT_PLATFORM_CTASSERT(delay); \ +CTASSERT(delay > 0); \ static fdt_platform_def_t VAR_NAME ## _fdt_platform = { \ .name = NAME_STR, \ .methods = fdt_platform_methods, \ Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Fri Jul 7 13:44:18 2017 (r320776) +++ head/sys/conf/options.arm Fri Jul 7 13:55:11 2017 (r320777) @@ -34,7 +34,6 @@ KERNBASE opt_global.h KERNVIRTADDR opt_global.h LINUX_BOOT_ABI opt_global.h LOADERRAMADDR opt_global.h -MULTIDELAY opt_global.h NKPT2PG opt_pmap.h PHYSADDR opt_global.h PLATFORM opt_global.h From owner-svn-src-head@freebsd.org Fri Jul 7 16:22:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F157DA6EA1; Fri, 7 Jul 2017 16:22:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF57480777; Fri, 7 Jul 2017 16:22:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67GM9Nf090260; Fri, 7 Jul 2017 16:22:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67GM9Rn090259; Fri, 7 Jul 2017 16:22:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201707071622.v67GM9Rn090259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 7 Jul 2017 16:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320785 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 320785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 16:22:11 -0000 Author: gjb Date: Fri Jul 7 16:22:09 2017 New Revision: 320785 URL: https://svnweb.freebsd.org/changeset/base/320785 Log: Connect ena(4) to the build. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Jul 7 16:14:52 2017 (r320784) +++ head/share/man/man4/Makefile Fri Jul 7 16:22:09 2017 (r320785) @@ -141,6 +141,7 @@ MAN= aac.4 \ edsc.4 \ ehci.4 \ em.4 \ + ena.4 \ enc.4 \ epair.4 \ esp.4 \ From owner-svn-src-head@freebsd.org Fri Jul 7 16:54:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F95CDA7950; Fri, 7 Jul 2017 16:54:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6958782279; Fri, 7 Jul 2017 16:54:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67GsI9X006163; Fri, 7 Jul 2017 16:54:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67GsIaZ006162; Fri, 7 Jul 2017 16:54:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201707071654.v67GsIaZ006162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 7 Jul 2017 16:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320787 - head/sbin/newfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/newfs X-SVN-Commit-Revision: 320787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 16:54:20 -0000 Author: imp Date: Fri Jul 7 16:54:18 2017 New Revision: 320787 URL: https://svnweb.freebsd.org/changeset/base/320787 Log: Improve wording for -E and -t flags. -E never writes the entire disk, so don't imply that. Note that if BIO_DELETE isn't supported, the operation will fail (as opposed to writing the entire disk with zeros). Thin storage also benefits from trim. List more accurate reason why trim helps flash-memory. Modified: head/sbin/newfs/newfs.8 Modified: head/sbin/newfs/newfs.8 ============================================================================== --- head/sbin/newfs/newfs.8 Fri Jul 7 16:25:58 2017 (r320786) +++ head/sbin/newfs/newfs.8 Fri Jul 7 16:54:18 2017 (r320787) @@ -79,11 +79,9 @@ The following options define the general layout polici .It Fl E Erase the content of the disk before making the filesystem. The reserved area in front of the superblock (for bootcode) will not be erased. -.Pp -This option is only relevant for flash based storage devices that use -wear-leveling algorithms. -.Pp -Erasing may take a long time as it writes to every sector on the disk. +Erasing is only relevant to flash-memory or thinly provisioned devices. +Erasing may take a long time. +If the device does not support BIO_DELETE, the command will fail. .It Fl J Enable journaling on the new file system via gjournal. See @@ -264,9 +262,11 @@ Turn on the TRIM enable flag. If enabled, and if the underlying device supports the BIO_DELETE command, the file system will send a delete request to the underlying device for each freed block. -The trim enable flag is typically set when the underlying device -uses flash-memory as the device can use the delete command to -pre-zero or at least avoid copying blocks that have been deleted. +The trim enable flag is typically set for flash-memory devices to +reduce write amplification which reduces wear on write-limited +flash-memory and often improves long-term performance. +Thinly provisioned storage also benefits by returning unused blocks to +the global pool. .El .Pp The following options override the standard sizes for the disk geometry. From owner-svn-src-head@freebsd.org Fri Jul 7 16:58:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBC9FDA79DD; Fri, 7 Jul 2017 16:58:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D6CB8242C; Fri, 7 Jul 2017 16:58:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67GweXG006421; Fri, 7 Jul 2017 16:58:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67GweBC006420; Fri, 7 Jul 2017 16:58:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201707071658.v67GweBC006420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 7 Jul 2017 16:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320788 - head/sbin/newfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/newfs X-SVN-Commit-Revision: 320788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 16:58:42 -0000 Author: imp Date: Fri Jul 7 16:58:40 2017 New Revision: 320788 URL: https://svnweb.freebsd.org/changeset/base/320788 Log: Bump date for today's commit. Modified: head/sbin/newfs/newfs.8 Modified: head/sbin/newfs/newfs.8 ============================================================================== --- head/sbin/newfs/newfs.8 Fri Jul 7 16:54:18 2017 (r320787) +++ head/sbin/newfs/newfs.8 Fri Jul 7 16:58:40 2017 (r320788) @@ -28,7 +28,7 @@ .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd July 15, 2015 +.Dd July 7, 2017 .Dt NEWFS 8 .Os .Sh NAME From owner-svn-src-head@freebsd.org Fri Jul 7 18:06:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13B8ADA8AF2 for ; Fri, 7 Jul 2017 18:06:16 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-33.reflexion.net [208.70.210.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAE4C844ED for ; Fri, 7 Jul 2017 18:06:15 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 22271 invoked from network); 7 Jul 2017 18:03:56 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 7 Jul 2017 18:03:56 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.1) with SMTP; Fri, 07 Jul 2017 13:59:34 -0400 (EDT) Received: (qmail 14805 invoked from network); 7 Jul 2017 17:59:34 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 7 Jul 2017 17:59:34 -0000 Received: from [192.168.1.114] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id D67E5EC943C; Fri, 7 Jul 2017 10:59:33 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r320674 - head/usr.sbin/bsdinstall/scripts From: Mark Millard In-Reply-To: Date: Fri, 7 Jul 2017 10:59:33 -0700 Cc: svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <55AF105C-66D8-4A6A-AF26-BF6D2B59C142@dsl-only.net> References: <9691CBDC-9C55-4E05-AFA2-9FEFD5E1B21F@dsl-only.net> To: =?utf-8?Q?Bart=C5=82omiej_Rutkowski?= X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 18:06:16 -0000 On 2017-Jul-7, at 1:37 AM, Bart=C5=82omiej Rutkowski = wrote: > On Thu, Jul 6, 2017 at 11:38 PM, Mark Millard = wrote: > The following is only offered as a possibility for where > the 2MB idea might have came from: https://hardenedbsd.org . > I make no claim that the script change is in fact > appropriate: I've not studied the issue. >=20 > Not that it matters at all, but just to clear out the doubts, no this = change was not inspired by HardenedBSD in any way, I'd even say it was = the other way around ;) https://hardenedbsd.org "Stack Clash Mitigations" posting was dated: = 2017-Jun-25 (This is clearly after they had worked on the changes.) Your -r320674 check in date: 2017-Jul-5 https://reviews.freebsd.org/D9700 was earlier and has for Diff 30173: "Update the stack guard option to new sysctl behavior": 2017-Jun-28 (The prior diff [26537] does not have the change.) 2017-Jun-28 is shortly after the hardenedbsd.org posting, not before. So it was not obvious to me that you might have influenced hardenedBSD's changes. Sounds more like full independence to me now. I do not know if you picked 2MB based on > Qualys' recommendation to use a minimum of 1MB or not. (Quoted from hardenedbsd's article.) =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Fri Jul 7 22:00:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6FCDDAC5B9; Fri, 7 Jul 2017 22:00:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73ADE64C01; Fri, 7 Jul 2017 22:00:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67M0d7U029236; Fri, 7 Jul 2017 22:00:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67M0dl8029235; Fri, 7 Jul 2017 22:00:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201707072200.v67M0dl8029235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 7 Jul 2017 22:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320796 - head/lib/libc/regex X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libc/regex X-SVN-Commit-Revision: 320796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 22:00:40 -0000 Author: kevans Date: Fri Jul 7 22:00:39 2017 New Revision: 320796 URL: https://svnweb.freebsd.org/changeset/base/320796 Log: Correctly ignore branch operators in the top-level parser when applicable. An oversight in r320742 caused BREs to become sensitive to the branching operator prematurely, which caused breakage in some limited situations -- namely, those that tried to use branching in a BRE. Most of these scenarios had already been corrected beforehand to properly use gsed or grep for GNU extensions, so the damage is slightly mitigated. Reported by: antoine Reported by: antoine Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D11522 Modified: head/lib/libc/regex/regcomp.c Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Fri Jul 7 21:33:06 2017 (r320795) +++ head/lib/libc/regex/regcomp.c Fri Jul 7 22:00:39 2017 (r320796) @@ -672,7 +672,7 @@ p_re(struct parse *p, bc.terminate = false; if (p->pre_parse != NULL) p->pre_parse(p, &bc); - while (MORE() && !SEESPEC('|') && !SEEEND()) { + while (MORE() && (!p->allowbranch || !SEESPEC('|')) && !SEEEND()) { bc.terminate = p->parse_expr(p, &bc); ++bc.nchain; } From owner-svn-src-head@freebsd.org Sat Jul 8 07:33:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 089F7D93140; Sat, 8 Jul 2017 07:33:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C972C778FA; Sat, 8 Jul 2017 07:33:31 +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 v687XUXv068030; Sat, 8 Jul 2017 07:33:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v687XUQK068029; Sat, 8 Jul 2017 07:33:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707080733.v687XUQK068029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 8 Jul 2017 07:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320801 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 320801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 07:33:32 -0000 Author: kib Date: Sat Jul 8 07:33:30 2017 New Revision: 320801 URL: https://svnweb.freebsd.org/changeset/base/320801 Log: Simplify language. Submitted by: wblock MFC after: 3 days Modified: head/lib/libc/sys/mmap.2 Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Sat Jul 8 04:53:12 2017 (r320800) +++ head/lib/libc/sys/mmap.2 Sat Jul 8 07:33:30 2017 (r320801) @@ -329,10 +329,12 @@ stack top is the starting address returned by the call bytes. The bottom of the stack at maximum growth is the starting address returned by the call. -The system uses guards to prevent the inadvertent use of -regions into which stacks created with +.Pp +Stacks created with .Dv MAP_STACK -will automatically grow, without mapping the whole stack in advance. +automatically grow. +Guards prevent inadvertent use of the regions into which those +stacks can grow without requiring mapping the whole stack in advance. .El .Pp The From owner-svn-src-head@freebsd.org Sat Jul 8 09:28:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E24AD9567B; Sat, 8 Jul 2017 09:28:34 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D37C37A579; Sat, 8 Jul 2017 09:28:33 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v689SXSd013520; Sat, 8 Jul 2017 09:28:33 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v689SV93013507; Sat, 8 Jul 2017 09:28:31 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201707080928.v689SV93013507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 8 Jul 2017 09:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320802 - head/etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/etc/rc.d X-SVN-Commit-Revision: 320802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 09:28:34 -0000 Author: kp Date: Sat Jul 8 09:28:31 2017 New Revision: 320802 URL: https://svnweb.freebsd.org/changeset/base/320802 Log: Allow more services to run in vnet jails After some tests, here are the services that run into a vnet jail: - defaultroute - dhclient - ip6addrctl - natd - pf - pfsync - pflog (deamon runs, pflog0 interface usable, but /var/log/pflog not filled) - rarpd - route6d (do nothing anyway because obsolete) - routed (do nothing anyway because obsolete) - rtsold - static_arp - static_ndp PR: 220530 Submitted by: olivier@freebsd.org Modified: head/etc/rc.d/defaultroute head/etc/rc.d/dhclient head/etc/rc.d/ip6addrctl head/etc/rc.d/natd head/etc/rc.d/pf head/etc/rc.d/pflog head/etc/rc.d/pfsync head/etc/rc.d/rarpd head/etc/rc.d/route6d head/etc/rc.d/routed head/etc/rc.d/rtsold head/etc/rc.d/static_arp head/etc/rc.d/static_ndp Modified: head/etc/rc.d/defaultroute ============================================================================== --- head/etc/rc.d/defaultroute Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/defaultroute Sat Jul 8 09:28:31 2017 (r320802) @@ -7,7 +7,7 @@ # PROVIDE: defaultroute # REQUIRE: devd netif stf -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr . /etc/network.subr Modified: head/etc/rc.d/dhclient ============================================================================== --- head/etc/rc.d/dhclient Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/dhclient Sat Jul 8 09:28:31 2017 (r320802) @@ -4,7 +4,7 @@ # # PROVIDE: dhclient -# KEYWORD: nojail nostart +# KEYWORD: nojailvnet nostart . /etc/rc.subr . /etc/network.subr Modified: head/etc/rc.d/ip6addrctl ============================================================================== --- head/etc/rc.d/ip6addrctl Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/ip6addrctl Sat Jul 8 09:28:31 2017 (r320802) @@ -6,7 +6,7 @@ # PROVIDE: ip6addrctl # REQUIRE: FILESYSTEMS # BEFORE: netif -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr . /etc/network.subr Modified: head/etc/rc.d/natd ============================================================================== --- head/etc/rc.d/natd Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/natd Sat Jul 8 09:28:31 2017 (r320802) @@ -4,7 +4,7 @@ # # PROVIDE: natd -# KEYWORD: nostart nojail +# KEYWORD: nostart nojailvnet . /etc/rc.subr . /etc/network.subr Modified: head/etc/rc.d/pf ============================================================================== --- head/etc/rc.d/pf Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/pf Sat Jul 8 09:28:31 2017 (r320802) @@ -6,7 +6,7 @@ # PROVIDE: pf # REQUIRE: FILESYSTEMS netif pflog pfsync # BEFORE: routing -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr Modified: head/etc/rc.d/pflog ============================================================================== --- head/etc/rc.d/pflog Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/pflog Sat Jul 8 09:28:31 2017 (r320802) @@ -5,7 +5,7 @@ # PROVIDE: pflog # REQUIRE: FILESYSTEMS netif -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr Modified: head/etc/rc.d/pfsync ============================================================================== --- head/etc/rc.d/pfsync Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/pfsync Sat Jul 8 09:28:31 2017 (r320802) @@ -5,7 +5,7 @@ # PROVIDE: pfsync # REQUIRE: FILESYSTEMS netif -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr @@ -15,7 +15,7 @@ rcvar="pfsync_enable" start_precmd="pfsync_prestart" start_cmd="pfsync_start" stop_cmd="pfsync_stop" -required_modules="pf" +required_modules="pf pfsync" pfsync_prestart() { @@ -36,7 +36,6 @@ pfsync_start() if [ -n "${pfsync_syncpeer}" ]; then _syncpeer="syncpeer ${pfsync_syncpeer}" fi - load_kld pfsync ifconfig pfsync0 $_syncpeer syncdev $pfsync_syncdev $pfsync_ifconfig up } Modified: head/etc/rc.d/rarpd ============================================================================== --- head/etc/rc.d/rarpd Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/rarpd Sat Jul 8 09:28:31 2017 (r320802) @@ -6,7 +6,7 @@ # PROVIDE: rarpd # REQUIRE: DAEMON FILESYSTEMS # BEFORE: LOGIN -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr Modified: head/etc/rc.d/route6d ============================================================================== --- head/etc/rc.d/route6d Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/route6d Sat Jul 8 09:28:31 2017 (r320802) @@ -5,7 +5,7 @@ # PROVIDE: route6d # REQUIRE: netif routing -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr Modified: head/etc/rc.d/routed ============================================================================== --- head/etc/rc.d/routed Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/routed Sat Jul 8 09:28:31 2017 (r320802) @@ -6,7 +6,7 @@ # PROVIDE: routed # REQUIRE: netif routing # BEFORE: NETWORK -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr Modified: head/etc/rc.d/rtsold ============================================================================== --- head/etc/rc.d/rtsold Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/rtsold Sat Jul 8 09:28:31 2017 (r320802) @@ -6,7 +6,7 @@ # PROVIDE: rtsold # REQUIRE: netif # BEFORE: NETWORKING -# KEYWORD: nojail shutdown +# KEYWORD: nojailvnet shutdown . /etc/rc.subr Modified: head/etc/rc.d/static_arp ============================================================================== --- head/etc/rc.d/static_arp Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/static_arp Sat Jul 8 09:28:31 2017 (r320802) @@ -31,7 +31,7 @@ # PROVIDE: static_arp # REQUIRE: netif -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr . /etc/network.subr Modified: head/etc/rc.d/static_ndp ============================================================================== --- head/etc/rc.d/static_ndp Sat Jul 8 07:33:30 2017 (r320801) +++ head/etc/rc.d/static_ndp Sat Jul 8 09:28:31 2017 (r320802) @@ -31,7 +31,7 @@ # PROVIDE: static_ndp # REQUIRE: netif -# KEYWORD: nojail +# KEYWORD: nojailvnet . /etc/rc.subr . /etc/network.subr From owner-svn-src-head@freebsd.org Sat Jul 8 11:06:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AC41D973FB; Sat, 8 Jul 2017 11:06:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 296DD7CF87; Sat, 8 Jul 2017 11:06:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68B6RuI054942; Sat, 8 Jul 2017 11:06:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68B6RFq054941; Sat, 8 Jul 2017 11:06:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201707081106.v68B6RFq054941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 8 Jul 2017 11:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320803 - head/sbin/mount X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sbin/mount X-SVN-Commit-Revision: 320803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 11:06:28 -0000 Author: trasz Date: Sat Jul 8 11:06:27 2017 New Revision: 320803 URL: https://svnweb.freebsd.org/changeset/base/320803 Log: Fix "mount -uw /" when the filesystem type doesn't match. This basically makes "mount -uw /" work when the filesystem mounted on / is NFS, but the one configured in fstab(5) is UFS, which can happen when you forget to modify fstab. Note that the whole special case ("else if (argv[0][0] == '/'") is probably not needed anyway. I'll take a look at removing it altogether; for now this is a minimally intrusive fix. MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11323 Modified: head/sbin/mount/mount.c Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Sat Jul 8 09:28:31 2017 (r320802) +++ head/sbin/mount/mount.c Sat Jul 8 11:06:27 2017 (r320803) @@ -398,7 +398,9 @@ main(int argc, char *argv[]) have_fstab = 1; mntfromname = mntbuf->f_mntfromname; } else if (argv[0][0] == '/' && - argv[0][1] == '\0') { + argv[0][1] == '\0' && + strcmp(fs->fs_vfstype, + mntbuf->f_fstypename) == 0) { fs = getfsfile("/"); have_fstab = 1; mntfromname = fs->fs_spec; From owner-svn-src-head@freebsd.org Sat Jul 8 11:07:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC4E6D974B3; Sat, 8 Jul 2017 11:07:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2D27D0EF; Sat, 8 Jul 2017 11:07:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68B7dCF055029; Sat, 8 Jul 2017 11:07:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68B7dCj055028; Sat, 8 Jul 2017 11:07:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707081107.v68B7dCj055028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 8 Jul 2017 11:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320804 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 320804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 11:07:40 -0000 Author: kib Date: Sat Jul 8 11:07:39 2017 New Revision: 320804 URL: https://svnweb.freebsd.org/changeset/base/320804 Log: Fix handling of one more possible exception on return to usermode. If %ss is loaded with a segment pointing to a non-present descriptor by the IRETD instruction, a kernel-mode #SS exception is generated. Resulting T_STKFLT trap must be checked against doreti_iret_fault location and handled, otherwise userspace may panic the kernel. Note that this is i386 variant of FreeBSD-SA-15:21.amd64, but unlike amd64, there is no swapgs on i386 and the issue is arguably not exploitable. Reported by: Maxime Villard Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/i386/trap.c Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Sat Jul 8 11:06:27 2017 (r320803) +++ head/sys/i386/i386/trap.c Sat Jul 8 11:07:39 2017 (r320804) @@ -550,11 +550,7 @@ user_trctrap_out: vm86_trap((struct vm86frame *)frame); goto out; } - if (type == T_STKFLT) - break; - /* FALL THROUGH */ - case T_SEGNPFLT: /* segment not present fault */ if (curpcb->pcb_flags & PCB_VM86CALL) break; @@ -595,6 +591,9 @@ user_trctrap_out: frame->tf_eip = (int)doreti_iret_fault; goto out; } + if (type == T_STKFLT) + break; + if (frame->tf_eip == (int)doreti_popl_ds) { frame->tf_eip = (int)doreti_popl_ds_fault; goto out; From owner-svn-src-head@freebsd.org Sat Jul 8 15:01:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E884D9BC8E; Sat, 8 Jul 2017 15:01:57 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03BFA83149; Sat, 8 Jul 2017 15:01:56 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68F1uWf051175; Sat, 8 Jul 2017 15:01:56 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68F1uT7051173; Sat, 8 Jul 2017 15:01:56 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201707081501.v68F1uT7051173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sat, 8 Jul 2017 15:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320805 - head/sys/dev/syscons/fonts X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/sys/dev/syscons/fonts X-SVN-Commit-Revision: 320805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 15:01:57 -0000 Author: bde Date: Sat Jul 8 15:01:55 2017 New Revision: 320805 URL: https://svnweb.freebsd.org/changeset/base/320805 Log: Add files to help manage the (vga) syscons mouse cursor. To mostly fix distortion of mouse cursors by non-square pixels, I needed 8 variants of the same cursor shape for large fonts and another 7 variants for small fonts. Some variants are shared, leaving only 13 variants in 26 glyphs altogether. Keep these in the BDF source file cursor.bdf. cursor.bdf has another 5 unused experimental cursors in 10 glyphs. cursor.awk is a simple awk script for converting this and similar bdf files into C declarations for copying into scvgarndr.c. syscons doesn't use any of this yet. Added: head/sys/dev/syscons/fonts/ head/sys/dev/syscons/fonts/cursor.awk (contents, props changed) head/sys/dev/syscons/fonts/cursor.bdf (contents, props changed) Added: head/sys/dev/syscons/fonts/cursor.awk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscons/fonts/cursor.awk Sat Jul 8 15:01:55 2017 (r320805) @@ -0,0 +1,48 @@ +# $FreeBSD$ +# +# awk script to convert a bdf file to C declarations in a form specialized +# for the mouse cursors in syscons/scvgarndr.c. Usage: +# awk -f thisfile < file.bdf < file.c +# The accompanying syscons mouse cursor bdf file has specialized comments +# which this script converts to details in the C declarations. +# This is not a general conversion utility, but produces reasonable output +# if the input is for a monospaced font of size between 9x16 and 16x16. + +/^COMMENT cn.*mouse/ { + gsub("[(),]", "") + i = index($3, "-") + n = substr($3, 1, i - 1) + name[n] = $4 + i = index($4, "e") + j = index($4, "x") + k = index($4, "_") + width[n] = substr($4, i + 1, j - i - 1) + height[n] = substr($4, j + 1, k - j - 1) + baspect[n] = $6 + iaspect[n] = $8 +} +state == 0 && /^STARTCHAR/ { + n = substr($2, 5) + printf("static const struct mousedata %s = { {\n\t", name[n]) + state = 1 +} +state >= 1 && state < 7 || state >= 7 + 16 && state < 7 + 16 + 7 { + state++ + next +} +state >= 7 && state < 7 + 16 || state >= 7 + 16 + 7 && state < 7 + 16 + 7 +16 { + printf("0x%s,", $1) + if (state == 7 + 7 || state == 7 + 16 + 7 + 7) + printf("\n\t") + else if (state == 7 + 15) + printf(" }, {\n\t") + else if (state == 7 + 16 + 7 + 15) { + printf(" },\n\t%s, %s, %s, %s, \"%s\",", + width[n], height[n], baspect[n], iaspect[n], name[n]) + printf("\n};\n\n") + state = -1 + } else + printf(" ") + state++ + next +} Added: head/sys/dev/syscons/fonts/cursor.bdf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscons/fonts/cursor.bdf Sat Jul 8 15:01:55 2017 (r320805) @@ -0,0 +1,887 @@ +STARTFONT 2.1 +COMMENT +COMMENT $FreeBSD$ +COMMENT +COMMENT Mouse cursors for syscons. All except some unused ones are the +COMMENT main 10x16 one scaled down to 9x13 and/or scaled to minimize +COMMENT distortion with non-square pixels. Details of the scaling are +COMMENT given in the comments. E.g., for the main pair of glyphs cn 66-67, +COMMENT "mouse10x16_100 9++:13 (96), 8:11 (106)" says that: +COMMENT - the name of the glyph pair is mouse10x16_100 (it is more +COMMENT convenient to put the name in a comment than in STARTCHAR) +COMMENT - the size of the glyph pair is 10x16 (this is only used as part +COMMENT of the name, and is also in standard bdf info) +COMMENT - this glyph pair is designed for a pixel aspect ratio +COMMENT (ysize:xsize) of 100:100 (also just part of the name) +COMMENT - the arrowhead of the border glyph is in a rectangle of 9x13 +COMMENT pixels, but values 2 fudges larger than 9 should be tried in +COMMENT calculations of (diagonal) side lengths +COMMENT - the arrowhead of the border glyph has equal side lengths iff +COMMENT the aspect ratio is 96:100. Syscons makes choices based on +COMMENT this precise ratio for each half of the pair. +COMMENT - 8:11 (106) gives the arrowhead rectangle and preferred aspect +COMMENT ratio for the interior glyph. +COMMENT +COMMENT cn 0-1 mouse10x16_50 7++:16 (49), 6:13 (52) +COMMENT cn 16-17 mouse8x14_67 7++:13 (64), 6:11 (65) (360x400 0.675; also 320x350 24:35 = 0.686 and 320x400 3:5 = 0.600) +COMMENT cn 32-33 mouse8x13_75 6++:10 (75), 5:8 (80) +COMMENT cn 34-35 mouse10x16_75 7++:12 (72), 6:10 (75) +COMMENT cn 40-41 mouse9x16_84 8++:13 (78), 7:11 (82) (not used) +COMMENT cn 48-49 mouse9x13_90 8+:12 (89), 6:9 (89) +COMMENT cn 50-51 mouse10x16_90 10++:15 (89), 8:12 (89) +COMMENT cn 64-65 mouse9x13_100 8:11 (106), 6:8 (113) +COMMENT cn 66-67 mouse10x16_100 9++:13 (96), 8:11 (106) (640x480 and 1920x1080, also 1280x1024 15:16 = 0.9375, 640x400 6:5 = 1.2, 720x480 9:8 = 1.125) +COMMENT cn 72-73 mouse10x16_100large 10:14 (102), 7:10 (98) (use later) +COMMENT cn 74-75 mouse11x16_100 11++:16 (95), 10:14 (102) (use later) +COMMENT cn 80-81 mouse10x14_120 10+:13 (120), 7:9 (124) +COMMENT cn 82-83 mouse10x16_120 10+:13 (120), 7:9 (124) (720x400 1.35; also 640x350 48:35 = 1.371) +COMMENT cn 96-97 mouse9x13_133 9++:11 (142), 7:9 (124) +COMMENT cn 98-99 mouse10x16_133 10+:13 (120), 8:10 (133) (720x400 1.35; also 640x350 48:35 = 1.371) +COMMENT cn 112-113 mouse14x10_240 12+:9 (189), 8:6- (189) (640x200) +COMMENT cn 120-121 mouse9x9 (not used) +COMMENT cn 122-123 mouse11x11thick (not used) +FONT cursor-16x16 +SIZE 1 60 44 +FONTBOUNDINGBOX 16 16 0 0 +STARTPROPERTIES 10 +PIXEL_SIZE 16 +POINT_SIZE 11 +RESOLUTION_X 60 +RESOLUTION_Y 44 +FONT_ASCENT 12 +FONT_DESCENT 4 +AVERAGE_WIDTH 90 +SPACING "C" +DEFAULT_CHAR 32 +_XMBDFED_INFO "Edited with xmbdfed 4.7." +ENDPROPERTIES +CHARS 38 +STARTCHAR char0 +ENCODING 0 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8200 +8400 +8400 +8400 +9200 +B200 +A900 +C900 +8600 +ENDCHAR +STARTCHAR char1 +ENCODING 1 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7C00 +7800 +7800 +7800 +6C00 +4C00 +4600 +0600 +0000 +ENDCHAR +STARTCHAR char16 +ENCODING 16 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8700 +8400 +9200 +B200 +A900 +C900 +0600 +0000 +0000 +ENDCHAR +STARTCHAR char17 +ENCODING 17 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7800 +7800 +6C00 +4C00 +4600 +0600 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char32 +ENCODING 32 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8600 +8400 +B200 +D200 +0900 +0900 +0600 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char33 +ENCODING 33 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7800 +7800 +4C00 +0C00 +0600 +0600 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char34 +ENCODING 34 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8700 +8400 +9200 +B200 +C900 +0900 +0480 +0480 +0300 +ENDCHAR +STARTCHAR char35 +ENCODING 35 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7800 +7800 +6C00 +4C00 +0600 +0600 +0300 +0300 +0000 +ENDCHAR +STARTCHAR char40 +ENCODING 40 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8080 +8780 +8200 +9200 +B900 +C900 +0480 +0480 +0300 +ENDCHAR +STARTCHAR char41 +ENCODING 41 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7F00 +7800 +7C00 +6C00 +4600 +0600 +0300 +0300 +0000 +ENDCHAR +STARTCHAR char48 +ENCODING 48 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8780 +9200 +B200 +D900 +8900 +0600 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char49 +ENCODING 49 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7800 +6C00 +4C00 +0600 +0600 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char50 +ENCODING 50 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8080 +8040 +83E0 +8200 +9900 +A900 +C480 +8480 +0300 +ENDCHAR +STARTCHAR char51 +ENCODING 51 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7F00 +7F80 +7C00 +7C00 +6600 +4600 +0300 +0300 +0000 +ENDCHAR +STARTCHAR char64 +ENCODING 64 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8780 +B200 +D200 +8900 +0900 +0600 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char65 +ENCODING 65 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7800 +4C00 +0C00 +0600 +0600 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char66 +ENCODING 66 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8080 +8040 +83C0 +9200 +A900 +C900 +0480 +0480 +0300 +ENDCHAR +STARTCHAR char67 +ENCODING 67 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7F00 +7F80 +7C00 +6C00 +4600 +0600 +0300 +0300 +0000 +ENDCHAR +STARTCHAR char72 +ENCODING 72 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +8000 +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8080 +87C0 +9200 +A900 +C900 +8480 +0480 +0300 +ENDCHAR +STARTCHAR char73 +ENCODING 73 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7F00 +7800 +6C00 +4600 +0600 +0300 +0300 +0000 +0000 +ENDCHAR +STARTCHAR char74 +ENCODING 74 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8080 +8040 +8020 +8010 +81F0 +8900 +9480 +A480 +C240 +ENDCHAR +STARTCHAR char75 +ENCODING 75 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7F00 +7F80 +7FC0 +7FE0 +7E00 +7600 +6300 +4300 +0180 +ENDCHAR +STARTCHAR char80 +ENCODING 80 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8080 +97C0 +B200 +F200 +C900 +8900 +0600 +0000 +0000 +ENDCHAR +STARTCHAR char81 +ENCODING 81 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7F00 +6800 +4C00 +0C00 +0600 +0600 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char82 +ENCODING 82 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8080 +97C0 +B200 +F200 +C900 +8900 +0480 +0480 +0300 +ENDCHAR +STARTCHAR char83 +ENCODING 83 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7F00 +6800 +4C00 +0C00 +0600 +0600 +0300 +0300 +0000 +ENDCHAR +STARTCHAR char96 +ENCODING 96 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8080 +9780 +B200 +C900 +0900 +0600 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char97 +ENCODING 97 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7F00 +6800 +4C00 +0600 +0600 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char98 +ENCODING 98 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +C000 +A000 +9000 +8800 +8400 +8200 +8100 +8080 +8040 +93E0 +B200 +C900 +8900 +0480 +0480 +0300 +ENDCHAR +STARTCHAR char99 +ENCODING 99 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +4000 +6000 +7000 +7800 +7C00 +7E00 +7F00 +7F80 +6C00 +4C00 +0600 +0600 +0300 +0300 +0000 +ENDCHAR +STARTCHAR char112 +ENCODING 112 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +F800 +CE00 +C380 +C0E0 +C038 +C1FC +DCC0 +F660 +C330 +01E0 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char113 +ENCODING 113 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +3000 +3C00 +3F00 +3FC0 +3E00 +2300 +0180 +00C0 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char120 +ENCODING 120 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +FF80 +8080 +8300 +8400 +8200 +9100 +A880 +A500 +C200 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char121 +ENCODING 121 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +7F00 +7C00 +7800 +7C00 +6E00 +4700 +4200 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char122 +ENCODING 122 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +FFE0 +80C0 +8180 +8300 +8300 +8180 +98C0 +BC60 +E630 +C360 +81C0 +0080 +0000 +0000 +0000 +0000 +ENDCHAR +STARTCHAR char123 +ENCODING 123 +SWIDTH 19200 0 +DWIDTH 16 0 +BBX 16 16 0 0 +BITMAP +0000 +7F00 +7E00 +7C00 +7C00 +7E00 +6700 +4380 +01C0 +0080 +0000 +0000 +0000 +0000 +0000 +0000 +ENDCHAR +ENDFONT From owner-svn-src-head@freebsd.org Sat Jul 8 16:39:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF1B7D9DA6E; Sat, 8 Jul 2017 16:39:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE5E6A8F; Sat, 8 Jul 2017 16:39:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68GdtSB090499; Sat, 8 Jul 2017 16:39:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68GdtmZ090498; Sat, 8 Jul 2017 16:39:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201707081639.v68GdtmZ090498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 8 Jul 2017 16:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320806 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 320806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 16:39:57 -0000 Author: bdrewery Date: Sat Jul 8 16:39:55 2017 New Revision: 320806 URL: https://svnweb.freebsd.org/changeset/base/320806 Log: SYSTEM_COMPILER: Ensure there is not a stale compiler in WORLDTMP. In a scenario of cross-building it is possible that an OBJDIR's WORLDTMP contains an older compiler in WORLDTMP/usr/bin/cc that is not rebuilt if SYSTEM_COMPILER logic is triggered. This compiler was still incorrectly used. Address this by removing WORLDTMP/usr/bin/cc and all of the hardlinked files associated with it. Also do this for c++ for GCC builds. Sponsored by: Dell EMC Isilon MFC after: 1 week Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jul 8 15:01:55 2017 (r320805) +++ head/Makefile.inc1 Sat Jul 8 16:39:55 2017 (r320806) @@ -761,7 +761,15 @@ _worldtmp: .PHONY .endif .else rm -rf ${WORLDTMP}/legacy/usr/include -.endif +.if ${USING_SYSTEM_COMPILER} == "yes" +.for cc in cc c++ + if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \ + inum=$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \ + find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \ + fi +.endfor +.endif # ${USING_SYSTEM_COMPILER} == "yes" +.endif # !defined(NO_CLEAN) # Our current approach to dependency tracking cannot cope with certain source # tree changes, particularly with respect to removing source files and From owner-svn-src-head@freebsd.org Sat Jul 8 16:50:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25108D9DF62; Sat, 8 Jul 2017 16:50:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FB6B1434; Sat, 8 Jul 2017 16:50:18 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v68GoHrI068309; Sat, 8 Jul 2017 09:50:17 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v68GoHgS068308; Sat, 8 Jul 2017 09:50:17 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201707081650.v68GoHgS068308@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320803 - head/sbin/mount In-Reply-To: <201707081106.v68B6RFq054941@repo.freebsd.org> To: Edward Tomasz Napierala Date: Sat, 8 Jul 2017 09:50:17 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 16:50:19 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: trasz > Date: Sat Jul 8 11:06:27 2017 > New Revision: 320803 > URL: https://svnweb.freebsd.org/changeset/base/320803 > > Log: > Fix "mount -uw /" when the filesystem type doesn't match. > > This basically makes "mount -uw /" work when the filesystem > mounted on / is NFS, but the one configured in fstab(5) is UFS, > which can happen when you forget to modify fstab. Please do not silence user errors because they are inconvinient, this is a configuration error and the system should fail to mount the incorrectly configured root. If we start changing things to silently ignore user configuration errors we are going down a very slippery road. > Note that the whole special case ("else if (argv[0][0] == '/'") > is probably not needed anyway. I'll take a look at removing it > altogether; for now this is a minimally intrusive fix. > > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D11323 > > Modified: > head/sbin/mount/mount.c > > Modified: head/sbin/mount/mount.c > ============================================================================== > --- head/sbin/mount/mount.c Sat Jul 8 09:28:31 2017 (r320802) > +++ head/sbin/mount/mount.c Sat Jul 8 11:06:27 2017 (r320803) > @@ -398,7 +398,9 @@ main(int argc, char *argv[]) > have_fstab = 1; > mntfromname = mntbuf->f_mntfromname; > } else if (argv[0][0] == '/' && > - argv[0][1] == '\0') { > + argv[0][1] == '\0' && > + strcmp(fs->fs_vfstype, > + mntbuf->f_fstypename) == 0) { > fs = getfsfile("/"); > have_fstab = 1; > mntfromname = fs->fs_spec; > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Jul 8 17:02:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98F3FD9E60B for ; Sat, 8 Jul 2017 17:02:53 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31B751F86 for ; Sat, 8 Jul 2017 17:02:52 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 3f243ea8-63ff-11e7-b2f5-7fbc454a3a22 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 3f243ea8-63ff-11e7-b2f5-7fbc454a3a22; Sat, 08 Jul 2017 17:02:39 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v68H2brL009261; Sat, 8 Jul 2017 11:02:37 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1499533357.87595.78.camel@freebsd.org> Subject: Re: svn commit: r320803 - head/sbin/mount From: Ian Lepore To: rgrimes@freebsd.org, Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 08 Jul 2017 11:02:37 -0600 In-Reply-To: <201707081650.v68GoHgS068308@pdx.rh.CN85.dnsmgr.net> References: <201707081650.v68GoHgS068308@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 17:02:53 -0000 On Sat, 2017-07-08 at 09:50 -0700, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > > > Author: trasz > > Date: Sat Jul  8 11:06:27 2017 > > New Revision: 320803 > > URL: https://svnweb.freebsd.org/changeset/base/320803 > > > > Log: > >   Fix "mount -uw /" when the filesystem type doesn't match. > >    > >   This basically makes "mount -uw /" work when the filesystem > >   mounted on / is NFS, but the one configured in fstab(5) is UFS, > >   which can happen when you forget to modify fstab. > Please do not silence user errors because they are inconvinient, > this is a configuration error and the system should fail to  > mount the incorrectly configured root. > > If we start changing things to silently ignore user configuration > errors we are going down a very slippery road. > IMO, this change fixes the right problem, but maybe does so the wrong way.  Mount -u is by definition an update to an existing mount.  There should be no need to consult /etc/fstab for an existing mount since the info is available from the kernel. Note that I say the foregoing with my user hat on.  I haven't looked at the code to see if there's some reason why my common-sensical way of thinking about it is actually impossible to implement for some reason. -- Ian From owner-svn-src-head@freebsd.org Sat Jul 8 17:08:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F3E5D9EA15; Sat, 8 Jul 2017 17:08:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDB0B24A8; Sat, 8 Jul 2017 17:08:43 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68H8h5r004034; Sat, 8 Jul 2017 17:08:43 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68H8hfa004033; Sat, 8 Jul 2017 17:08:43 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201707081708.v68H8hfa004033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 8 Jul 2017 17:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320807 - head/usr.bin/stdbuf X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/usr.bin/stdbuf X-SVN-Commit-Revision: 320807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 17:08:44 -0000 Author: asomers Date: Sat Jul 8 17:08:42 2017 New Revision: 320807 URL: https://svnweb.freebsd.org/changeset/base/320807 Log: stdbuf(1): Add buffer definition "B" to the usage message This option has been missing from the usage message ever since the program was first imported. Submitted by: shivansh Reviewed by: asomers MFC after: 3 weeks Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D11529 Modified: head/usr.bin/stdbuf/stdbuf.c Modified: head/usr.bin/stdbuf/stdbuf.c ============================================================================== --- head/usr.bin/stdbuf/stdbuf.c Sat Jul 8 16:39:55 2017 (r320806) +++ head/usr.bin/stdbuf/stdbuf.c Sat Jul 8 17:08:42 2017 (r320807) @@ -40,7 +40,7 @@ static void usage(int s) { - fprintf(stderr, "Usage: %s [-e 0|L|] [-i 0|L|] [-o 0|L|] " + fprintf(stderr, "Usage: %s [-e 0|L|B|] [-i 0|L|B|] [-o 0|L|B|] " " [args ...]\n", __progname); exit(s); } From owner-svn-src-head@freebsd.org Sat Jul 8 17:15:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D91F8D9EC08; Sat, 8 Jul 2017 17:15:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96CE92874; Sat, 8 Jul 2017 17:15:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v68HFdVv068413; Sat, 8 Jul 2017 10:15:39 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v68HFd8O068412; Sat, 8 Jul 2017 10:15:39 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201707081715.v68HFd8O068412@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320803 - head/sbin/mount In-Reply-To: <1499533357.87595.78.camel@freebsd.org> To: Ian Lepore Date: Sat, 8 Jul 2017 10:15:39 -0700 (PDT) CC: rgrimes@freebsd.org, Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 17:15:41 -0000 [ Charset ISO-8859-1 unsupported, converting... ] > On Sat, 2017-07-08 at 09:50 -0700, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > > > > > Author: trasz > > > Date: Sat Jul??8 11:06:27 2017 > > > New Revision: 320803 > > > URL: https://svnweb.freebsd.org/changeset/base/320803 > > > > > > Log: > > > ? Fix "mount -uw /" when the filesystem type doesn't match. > > > ?? > > > ? This basically makes "mount -uw /" work when the filesystem > > > ? mounted on / is NFS, but the one configured in fstab(5) is UFS, > > > ? which can happen when you forget to modify fstab. > > Please do not silence user errors because they are inconvinient, > > this is a configuration error and the system should fail to? > > mount the incorrectly configured root. > > > > If we start changing things to silently ignore user configuration > > errors we are going down a very slippery road. > > > > IMO, this change fixes the right problem, but maybe does so the wrong > way. ?Mount -u is by definition an update to an existing mount. ?There > should be no need to consult /etc/fstab for an existing mount since the > info is available from the kernel. > > Note that I say the foregoing with my user hat on. ?I haven't looked at > the code to see if there's some reason why my common-sensical way of > thinking about it is actually impossible to implement for some reason. This "check" saves one from the mistake of a wrong fstab that was not properly written for nfs that is probably going to blow up when it goes to get /usr or some other file system. Example of when this change can cause things to go very wrong for an admin. I rsync/however a system that is booting from disk onto my nice new NAS box and setup exports of the file systems that I moved. I further set up dhcp/tftp/pxe to boot this NFS version of the system. I forget to edit the etc/fstab in the copy on the NFS server. I reboot the system via PXE, it gets its root file system via NFS and now silently ignores my error and procededs to FFS mount all the other file system. Can you see the error in thinking this change is a good idea? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Jul 8 17:16:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94DC0D9ED03; Sat, 8 Jul 2017 17:16:46 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x22a.google.com (mail-wr0-x22a.google.com [IPv6:2a00:1450:400c:c0c::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 242312A05; Sat, 8 Jul 2017 17:16:46 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x22a.google.com with SMTP id r103so85939127wrb.0; Sat, 08 Jul 2017 10:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=bewFH+PMUviZ3/jqsNOBBUjiVpxpJdhTG9LgaKUg9sw=; b=tqeVfVZPanL51XorOnVlnH5cZb66nQL69tTBp5rVMTG/jlzipYdMtEKU5njXIvVW+m 4OSThqVt9C+omx48Noxge2YTx8nk8bz8ry3QHxyzmcHK9LL4CMdlLZtOime/RxDeVdU5 5gFNCS2VVQhrvU4yEKhWK7V6JyCsTZHAEM09h/NlaC+sIdq5cSI+lDwx8Yb9robet6Pc j+ddjCdUPT0LVsJCeHrGUFndo/nQprpSJvCe5RVUr93nYVmQJsFuMIjdKhj9KOwgKvl8 ESii3U/XEOSzmq88eOm8pfTepFnrB/7I+SVjOJUmHtm3Mj6rQ7t3zjnKa1aKOsdGvBOq IBSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=bewFH+PMUviZ3/jqsNOBBUjiVpxpJdhTG9LgaKUg9sw=; b=TVtgDGV6npHcbqore8cQ64QjjWTHTlei6HG/0rfcvDXgIJZ278QsfAXBApSXJuMlo0 JsA0/+LTMQYUXCHShDhKGJMClLytzGNG0rH2325mob6FnHKa6fx16JAjE9NNeGig9hoz epbeiYKsxpGragXdTRcgODS9X9SSkEGWIaSGgW5w3QxYJe+m1fbXz6AKF6fhP+u6f0xK 9VGjAhg2io0lkHgy75RRs2qH/HmYIxTZ/88lxZgKAA7kQ5hCz0AD4DKhGiDh8VgvYNxz H2PHMLD9u4lL9N3wKlkn3KqpgXAhmVJ9vE5ZBQPHbdSaClM1+HngNQhINTvRpgdnvo3y RUdw== X-Gm-Message-State: AIVw113WQTU3O+8WVYL6QCyBrZagX0UOx3SNaiRJ8DV5YecVxZ1xE//1 r6TshZM/vvp8aGI9 X-Received: by 10.28.107.131 with SMTP id a3mr2804403wmi.60.1499534204220; Sat, 08 Jul 2017 10:16:44 -0700 (PDT) Received: from brick (cpc92310-cmbg19-2-0-cust934.5-4.cable.virginm.net. [82.9.227.167]) by smtp.gmail.com with ESMTPSA id r191sm2186849wmg.6.2017.07.08.10.16.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jul 2017 10:16:43 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 8 Jul 2017 18:16:41 +0100 From: Edward Tomasz Napierala To: Ian Lepore Cc: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320803 - head/sbin/mount Message-ID: <20170708171641.GA1129@brick> Mail-Followup-To: Ian Lepore , rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201707081650.v68GoHgS068308@pdx.rh.CN85.dnsmgr.net> <1499533357.87595.78.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1499533357.87595.78.camel@freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 17:16:46 -0000 On 0708T1102, Ian Lepore wrote: > On Sat, 2017-07-08 at 09:50 -0700, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > > > > > Author: trasz > > > Date: Sat Jul  8 11:06:27 2017 > > > New Revision: 320803 > > > URL: https://svnweb.freebsd.org/changeset/base/320803 > > > > > > Log: > > >   Fix "mount -uw /" when the filesystem type doesn't match. > > >    > > >   This basically makes "mount -uw /" work when the filesystem > > >   mounted on / is NFS, but the one configured in fstab(5) is UFS, > > >   which can happen when you forget to modify fstab. > > Please do not silence user errors because they are inconvinient, > > this is a configuration error and the system should fail to  > > mount the incorrectly configured root. > > > > If we start changing things to silently ignore user configuration > > errors we are going down a very slippery road. It doesn't silence down the error. What it does is it makes it possible to use "mount -uw /" - previously it would fail in a rather nonsensical way, by calling "mount_nfs -o upgrade,rw /dev/ada0 /". > IMO, this change fixes the right problem, but maybe does so the wrong > way.  Mount -u is by definition an update to an existing mount.  There > should be no need to consult /etc/fstab for an existing mount since the > info is available from the kernel. > > Note that I say the foregoing with my user hat on.  I haven't looked at > the code to see if there's some reason why my common-sensical way of > thinking about it is actually impossible to implement for some reason. I wouldn't expect it to consult fstab either, to be honest. But it does, and I suspect changing that would break someone's config. From owner-svn-src-head@freebsd.org Sat Jul 8 17:20:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0FCBD9EDCE for ; Sat, 8 Jul 2017 17:20:05 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BC4E2B6C for ; Sat, 8 Jul 2017 17:20:04 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: a99d473f-6401-11e7-b2f5-7fbc454a3a22 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id a99d473f-6401-11e7-b2f5-7fbc454a3a22; Sat, 08 Jul 2017 17:19:57 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v68HJtIJ009296; Sat, 8 Jul 2017 11:19:55 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1499534395.87595.80.camel@freebsd.org> Subject: Re: svn commit: r320803 - head/sbin/mount From: Ian Lepore To: rgrimes@freebsd.org Cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 08 Jul 2017 11:19:55 -0600 In-Reply-To: <201707081715.v68HFd8O068412@pdx.rh.CN85.dnsmgr.net> References: <201707081715.v68HFd8O068412@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 17:20:06 -0000 On Sat, 2017-07-08 at 10:15 -0700, Rodney W. Grimes wrote: > [ Charset ISO-8859-1 unsupported, converting... ] > > > > On Sat, 2017-07-08 at 09:50 -0700, Rodney W. Grimes wrote: > > > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > > > > > Author: trasz > > > > Date: Sat Jul??8 11:06:27 2017 > > > > New Revision: 320803 > > > > URL: https://svnweb.freebsd.org/changeset/base/320803 > > > > > > > > Log: > > > > ? Fix "mount -uw /" when the filesystem type doesn't match. > > > > ?? > > > > ? This basically makes "mount -uw /" work when the filesystem > > > > ? mounted on / is NFS, but the one configured in fstab(5) is > > > > UFS, > > > > ? which can happen when you forget to modify fstab. > > > Please do not silence user errors because they are inconvinient, > > > this is a configuration error and the system should fail to? > > > mount the incorrectly configured root. > > > > > > If we start changing things to silently ignore user configuration > > > errors we are going down a very slippery road. > > > > > IMO, this change fixes the right problem, but maybe does so the > > wrong > > way. ?Mount -u is by definition an update to an existing mount. > > ?There > > should be no need to consult /etc/fstab for an existing mount since > > the > > info is available from the kernel. > > > > Note that I say the foregoing with my user hat on. ?I haven't > > looked at > > the code to see if there's some reason why my common-sensical way > > of > > thinking about it is actually impossible to implement for some > > reason. > This "check" saves one from the mistake of a wrong fstab that was > not properly written for nfs that is probably going to blow up when > it goes to get /usr or some other file system.   > > Example of when this change can cause things to go very wrong for > an admin. > > I rsync/however a system that is booting from disk onto my nice new > NAS box and setup exports of the file systems that I moved.  I > further > set up dhcp/tftp/pxe to boot this NFS version of the system. > > I forget to edit the etc/fstab in the copy on the NFS server. > > I reboot the system via PXE, it gets its root file system via NFS > and now silently ignores my error and procededs to FFS mount all > the other file system. > > Can you see the error in thinking this change is a good idea? What I see is you ignoring everything I said and ranting about something completely different.  I sure don't have the energy to get involved in that kind of craziness, so just pretend I never said anything at all. -- Ian From owner-svn-src-head@freebsd.org Sat Jul 8 17:30:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AC82D9F1B4; Sat, 8 Jul 2017 17:30:35 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C21C0303B; Sat, 8 Jul 2017 17:30:34 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68HUYKM012269; Sat, 8 Jul 2017 17:30:34 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68HUX7U012267; Sat, 8 Jul 2017 17:30:33 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201707081730.v68HUX7U012267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sat, 8 Jul 2017 17:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320808 - head/sys/dev/syscons X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/sys/dev/syscons X-SVN-Commit-Revision: 320808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 17:30:35 -0000 Author: bde Date: Sat Jul 8 17:30:33 2017 New Revision: 320808 URL: https://svnweb.freebsd.org/changeset/base/320808 Log: Add many bitmaps (now there are 13) for mouse cursors and logic to try to choose the best one. The old 9x13 cursor was was sort of correct for CGA 640x200 text mode, but distorted for all other modes. This mode is still available on all systems with VGA, but stopped being useful in ~1985. It has very unsquare pixels with an aspect ratio of 240:100 on 4:3 monitors. On 16:9 monitors, the unsquareness in this mode is reduced to only 180:100 iff the monitor stretches the pixels to the full screen. Newer modes and systems have smaller distortions, but with many more variations. Square pixels first became common with VGA 640x480 mode on 4:3 monitors. However, standard VGA text mode also has 9-bit wide characters and only 25 lines, so it has 720x400 pixels. This has unsquare pixels with an aspect ratio of 135:100 on 4:3 monitors. On 16:9 monitors, it gives almost-square pixels with an aspect ration of 101:100 iff the monitor stretches, but in modes that were square on 4:3 monitors square similar monitor stretching breaks the squareness. Guess the physical aspect ratio using heuristics. The old version of X that I use is further from doing this using info from PnP monitors that is unavailable in syscons (X doesn't understand if the monitor is doing stretching and doesn't even understand how its its own mode changes affect the pixel size). Monitors with aspect ratio control should be configured to _not_ stretch 4:3 modes to 16:9. Otherwise, use the machdep.vga_aspect_scale sysctl to compensate. Only 1 of my 4 monitors/laptops requires this. It always stretches to 16:9. The mouse data has new aspect ratio fields for selecting the best cursor and a new name field for display in debugging messages. Selecting the mouse cursor is now a slow operation so it is not done for every drawing of the cursor. To avoid a new initialization method, it is done whenever the text cursor is set or changed. Also remove dead code in settings of text cursors. Use larger mouse cursors (sometimes the full 10x16 one) for 8x8 fonts in cases where this works better (mostly in graphics mode). Modified: head/sys/dev/syscons/scvgarndr.c head/sys/dev/syscons/syscons.h Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Sat Jul 8 17:08:42 2017 (r320807) +++ head/sys/dev/syscons/scvgarndr.c Sat Jul 8 17:30:33 2017 (r320808) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -149,25 +150,137 @@ RENDERER_MODULE(vga, vga_set); struct mousedata { u_short md_border[16]; u_short md_interior[16]; - u_short md_width; - u_short md_height; + u_char md_width; + u_char md_height; + u_char md_baspect; + u_char md_iaspect; + const char *md_name; }; -static const struct mousedata mouse9x13 = { { - 0xc000, 0xa000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x9780, - 0xf200, 0x1200, 0x1900, 0x0900, 0x0f00, 0x0000, 0x0000, 0x0000, }, { - 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7c00, 0x7e00, 0x6800, - 0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, }, - 9, 13, +static const struct mousedata mouse10x16_50 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8200, + 0x8400, 0x8400, 0x8400, 0x9200, 0xB200, 0xA900, 0xC900, 0x8600, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7C00, + 0x7800, 0x7800, 0x7800, 0x6C00, 0x4C00, 0x4600, 0x0600, 0x0000, }, + 10, 16, 49, 52, "mouse10x16_50", }; -static const struct mousedata mouse10x16 = { { - 0xc000, 0xa000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, - 0x8040, 0x83c0, 0x9200, 0xa900, 0xc900, 0x0480, 0x0480, 0x0300, }, { - 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7c00, 0x7e00, 0x7f00, - 0x7f80, 0x7c00, 0x6c00, 0x4600, 0x0600, 0x0300, 0x0300, 0x0000, }, - 10, 16, +static const struct mousedata mouse8x14_67 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8700, + 0x8400, 0x9200, 0xB200, 0xA900, 0xC900, 0x0600, 0x0000, 0x0000, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7800, + 0x7800, 0x6C00, 0x4C00, 0x4600, 0x0600, 0x0000, 0x0000, 0x0000, }, + 8, 14, 64, 65, "mouse8x14_67", }; + +static const struct mousedata mouse8x13_75 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8600, 0x8400, + 0xB200, 0xD200, 0x0900, 0x0900, 0x0600, 0x0000, 0x0000, 0x0000, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7800, 0x7800, + 0x4C00, 0x0C00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, }, + 8, 13, 75, 80, "mouse8x13_75", +}; + +static const struct mousedata mouse10x16_75 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8700, + 0x8400, 0x9200, 0xB200, 0xC900, 0x0900, 0x0480, 0x0480, 0x0300, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7800, + 0x7800, 0x6C00, 0x4C00, 0x0600, 0x0600, 0x0300, 0x0300, 0x0000, }, + 10, 16, 72, 75, "mouse10x16_75", +}; + +static const struct mousedata mouse9x13_90 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8780, + 0x9200, 0xB200, 0xD900, 0x8900, 0x0600, 0x0000, 0x0000, 0x0000, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7800, + 0x6C00, 0x4C00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, }, + 9, 13, 89, 89, "mouse9x13_90", +}; + +static const struct mousedata mouse10x16_90 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, + 0x8040, 0x83E0, 0x8200, 0x9900, 0xA900, 0xC480, 0x8480, 0x0300, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7F00, + 0x7F80, 0x7C00, 0x7C00, 0x6600, 0x4600, 0x0300, 0x0300, 0x0000, }, + 10, 16, 89, 89, "mouse10x16_90", +}; + +static const struct mousedata mouse9x13_100 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8780, + 0xB200, 0xD200, 0x8900, 0x0900, 0x0600, 0x0000, 0x0000, 0x0000, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7800, + 0x4C00, 0x0C00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, }, + 9, 13, 106, 113, "mouse9x13_100", +}; + +static const struct mousedata mouse10x16_100 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, + 0x8040, 0x83C0, 0x9200, 0xA900, 0xC900, 0x0480, 0x0480, 0x0300, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7F00, + 0x7F80, 0x7C00, 0x6C00, 0x4600, 0x0600, 0x0300, 0x0300, 0x0000, }, + 10, 16, 96, 106, "mouse10x16_100", +}; + +static const struct mousedata mouse10x14_120 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, + 0x97C0, 0xB200, 0xF200, 0xC900, 0x8900, 0x0600, 0x0000, 0x0000, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7F00, + 0x6800, 0x4C00, 0x0C00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, }, + 10, 14, 120, 124, "mouse10x14_120", +}; + +static const struct mousedata mouse10x16_120 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, + 0x97C0, 0xB200, 0xF200, 0xC900, 0x8900, 0x0480, 0x0480, 0x0300, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7F00, + 0x6800, 0x4C00, 0x0C00, 0x0600, 0x0600, 0x0300, 0x0300, 0x0000, }, + 10, 16, 120, 124, "mouse10x16_120", +}; + +static const struct mousedata mouse9x13_133 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, + 0x9780, 0xB200, 0xC900, 0x0900, 0x0600, 0x0000, 0x0000, 0x0000, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7F00, + 0x6800, 0x4C00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, }, + 9, 13, 142, 124, "mouse9x13_133", +}; + +static const struct mousedata mouse10x16_133 = { { + 0xC000, 0xA000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, + 0x8040, 0x93E0, 0xB200, 0xC900, 0x8900, 0x0480, 0x0480, 0x0300, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7C00, 0x7E00, 0x7F00, + 0x7F80, 0x6C00, 0x4C00, 0x0600, 0x0600, 0x0300, 0x0300, 0x0000, }, + 10, 16, 120, 133, "mouse10x16_133", +}; + +static const struct mousedata mouse14x10_240 = { { + 0xF800, 0xCE00, 0xC380, 0xC0E0, 0xC038, 0xC1FC, 0xDCC0, 0xF660, + 0xC330, 0x01E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, }, { + 0x0000, 0x3000, 0x3C00, 0x3F00, 0x3FC0, 0x3E00, 0x2300, 0x0180, + 0x00C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, }, + 14, 10, 189, 189, "mouse14x10_240", +}; + +static const struct mousedata * const mouselarge[] = { + &mouse10x16_50, + &mouse8x14_67, + &mouse10x16_75, + &mouse10x16_90, + &mouse10x16_100, + &mouse10x16_120, + &mouse10x16_133, + &mouse14x10_240, +}; + +static const struct mousedata * const mousesmall[] = { + &mouse8x14_67, + &mouse8x13_75, + &mouse9x13_90, + &mouse9x13_100, + &mouse10x14_120, + &mouse9x13_133, + &mouse14x10_240, +}; #endif #endif @@ -227,7 +340,70 @@ static uint16_t vga_palette15[16] = { }; #endif +static int vga_aspect_scale= 100; +SYSCTL_INT(_machdep, OID_AUTO, vga_aspect_scale, CTLFLAG_RW, + &vga_aspect_scale, 0, "Aspect scale ratio (3:4):actual times 100"); + static void +vga_setmdp(scr_stat *scp) +{ +#if !defined(SC_NO_CUTPASTE) && \ + (!defined(SC_ALT_MOUSE_IMAGE) || defined(SC_PIXEL_MODE)) + const struct mousedata *mdp; + const struct mousedata * const *mdpp; + int aspect, best_i, best_v, i, n, v, wb, wi, xpixel, ypixel; + + xpixel = scp->xpixel; + ypixel = scp->ypixel; + if (scp->sc->adp->va_flags & V_ADP_CWIDTH9) + xpixel = xpixel * 9 / 8; + + /* If 16:9 +-1%, assume square pixels, else scale to 4:3 or full. */ + aspect = xpixel * 900 / ypixel / 16; + if (aspect < 99 || aspect > 100) + aspect = xpixel * 300 / ypixel / 4 * vga_aspect_scale / 100; + + /* + * Use 10x16 cursors except even with 8x8 fonts except in ~200- + * line modes where pixels are very large and in text mode where + * even 13 pixels high is really 4 too many. Clipping a 16-high + * cursor at 9-high gives a variable tail which looks better than + * a smaller cursor with a constant tail. + * + * XXX: the IS*SC() macros don't work when this is called at the + * end of a mode switch since UNKNOWN_SC is still set. + */ + if (scp->font_size <= 8 && + (ypixel < 300 || !(scp->status & PIXEL_MODE))) { + mdpp = &mousesmall[0]; + n = nitems(mousesmall); + } else { + mdpp = &mouselarge[0]; + n = nitems(mouselarge); + } + if (scp->status & PIXEL_MODE) { + wb = 1024; + wi = 256; + } else { + wb = 256; + wi = 1024; + } + best_i = 0; + best_v = 0x7fffffff; + for (i = 0; i < n; i++) { + v = (wb * abs(mdpp[i]->md_baspect - aspect) + + wi * abs(mdpp[i]->md_iaspect - aspect)) / aspect; + if (best_v > v) { + best_v = v; + best_i = i; + } + } + mdp = mdpp[best_i]; + scp->mouse_data = mdp; +#endif /* !SC_NO_CUTPASTE && (!SC_ALT_MOUSE_IMAGE || SC_PIXEL_MODE) */ +} + +static void vga_nop(scr_stat *scp) { } @@ -272,13 +448,10 @@ vga_txtdraw(scr_stat *scp, int from, int count, int fl static void vga_txtcursor_shape(scr_stat *scp, int base, int height, int blink) { + vga_setmdp(scp); if (base < 0 || base >= scp->font_size) return; /* the caller may set height <= 0 in order to disable the cursor */ -#if 0 - scp->curs_attr.base = base; - scp->curs_attr.height = height; -#endif vidd_set_hw_cursor_shape(scp->sc->adp, base, height, scp->font_size, blink); } @@ -407,7 +580,7 @@ draw_txtmouse(scr_stat *scp, int x, int y) int crtc_addr; int i; - mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; + mdp = scp->mouse_data; /* prepare mousepointer char's bitmaps */ pos = (y/scp->font_size - scp->yoff)*scp->xsize + x/8 - scp->xoff; @@ -807,13 +980,7 @@ vga_vgadraw_planar(scr_stat *scp, int from, int count, static void vga_pxlcursor_shape(scr_stat *scp, int base, int height, int blink) { - if (base < 0 || base >= scp->font_size) - return; - /* the caller may set height <= 0 in order to disable the cursor */ -#if 0 - scp->curs_attr.base = base; - scp->curs_attr.height = height; -#endif + vga_setmdp(scp); } static void @@ -1003,7 +1170,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y) int i, j, k; uint8_t m1; - mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; + mdp = scp->mouse_data; line_width = scp->sc->adp->va_line_width; xoff = (x - scp->xoff*8)%8; yoff = y - rounddown(y, line_width); @@ -1070,7 +1237,7 @@ remove_pxlmouse_planar(scr_stat *scp, int x, int y) vm_offset_t p; int bx, by, i, line_width, xend, xoff, yend, yoff; - mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; + mdp = scp->mouse_data; /* * It is only necessary to remove the mouse image where it overlaps @@ -1109,7 +1276,7 @@ vga_pxlmouse_direct(scr_stat *scp, int x, int y, int o int xend, yend; int i, j; - mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; + mdp = scp->mouse_data; /* * Determine overlap with the border and then if removing, do nothing Modified: head/sys/dev/syscons/syscons.h ============================================================================== --- head/sys/dev/syscons/syscons.h Sat Jul 8 17:08:42 2017 (r320807) +++ head/sys/dev/syscons/syscons.h Sat Jul 8 17:30:33 2017 (r320808) @@ -329,6 +329,7 @@ typedef struct scr_stat { struct proc *mouse_proc; /* proc* of controlling proc */ pid_t mouse_pid; /* pid of controlling proc */ int mouse_signal; /* signal # to report with */ + const void *mouse_data; /* renderer (pixmap) data */ u_short bell_duration; u_short bell_pitch; From owner-svn-src-head@freebsd.org Sat Jul 8 17:34:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20F4AD9F245; Sat, 8 Jul 2017 17:34:55 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFF953412; Sat, 8 Jul 2017 17:34:53 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v68HYpsl068501; Sat, 8 Jul 2017 10:34:51 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v68HYpN9068500; Sat, 8 Jul 2017 10:34:51 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201707081734.v68HYpN9068500@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320803 - head/sbin/mount In-Reply-To: <20170708171641.GA1129@brick> To: Edward Tomasz Napierala Date: Sat, 8 Jul 2017 10:34:51 -0700 (PDT) CC: Ian Lepore , rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 17:34:55 -0000 [ Charset ISO-8859-1 unsupported, converting... ] > On 0708T1102, Ian Lepore wrote: > > On Sat, 2017-07-08 at 09:50 -0700, Rodney W. Grimes wrote: > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > Author: trasz > > > > Date: Sat Jul??8 11:06:27 2017 > > > > New Revision: 320803 > > > > URL: https://svnweb.freebsd.org/changeset/base/320803 > > > > > > > > Log: > > > > ? Fix "mount -uw /" when the filesystem type doesn't match. > > > > ?? > > > > ? This basically makes "mount -uw /" work when the filesystem > > > > ? mounted on / is NFS, but the one configured in fstab(5) is UFS, > > > > ? which can happen when you forget to modify fstab. > > > Please do not silence user errors because they are inconvinient, > > > this is a configuration error and the system should fail to? > > > mount the incorrectly configured root. > > > > > > If we start changing things to silently ignore user configuration > > > errors we are going down a very slippery road. > > It doesn't silence down the error. What it does is it makes it possible > to use "mount -uw /" - previously it would fail in a rather nonsensical > way, by calling "mount_nfs -o upgrade,rw /dev/ada0 /". It DOES silence the error. My configuration TOLD it to execute that rather nonsensical command, your change now causes it to execute something that my configuration did NOT tell it to do. > > IMO, this change fixes the right problem, but maybe does so the wrong > > way. ?Mount -u is by definition an update to an existing mount. ?There > > should be no need to consult /etc/fstab for an existing mount since the > > info is available from the kernel. > > > > Note that I say the foregoing with my user hat on. ?I haven't looked at > > the code to see if there's some reason why my common-sensical way of > > thinking about it is actually impossible to implement for some reason. > > I wouldn't expect it to consult fstab either, to be honest. But it does, > and I suspect changing that would break someone's config. It reads the fstab to get the options that may be specified there that your mount -uw / command does not specify, realize the kernel when mounting / does so in a very minimal way, when you invoke mount -u the parameters in /etc/fstab come in to play. I believe KIB refered to this during your differential when he said something like "what if the options disagree". -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Jul 8 17:53:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71245D9F73B; Sat, 8 Jul 2017 17:53:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9F63C2B; Sat, 8 Jul 2017 17:53:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68Hr0uF023875; Sat, 8 Jul 2017 17:53:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68Hr0wu023874; Sat, 8 Jul 2017 17:53:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201707081753.v68Hr0wu023874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 8 Jul 2017 17:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320809 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 320809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 17:53:01 -0000 Author: bdrewery Date: Sat Jul 8 17:53:00 2017 New Revision: 320809 URL: https://svnweb.freebsd.org/changeset/base/320809 Log: makeman: Don't show META_MODE ABI rebuild warnings. Reported by: dim Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jul 8 17:30:33 2017 (r320808) +++ head/Makefile.inc1 Sat Jul 8 17:53:00 2017 (r320809) @@ -655,7 +655,8 @@ LIBCOMPAT= SOFT # when the ABI breaks though that we want to force rebuilding WORLDTMP # to get updated host tools. .if ${MK_META_MODE} == "yes" && defined(NO_CLEAN) && \ - !defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS) + !defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS) && \ + !make(showconfig) # r318736 - ino64 major ABI breakage META_MODE_BAD_ABI_VERS+= 1200031 From owner-svn-src-head@freebsd.org Sat Jul 8 18:52:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02281DA059B; Sat, 8 Jul 2017 18:52:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE20764FF4; Sat, 8 Jul 2017 18:52:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68IqTcL048998; Sat, 8 Jul 2017 18:52:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68IqT6K048997; Sat, 8 Jul 2017 18:52:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707081852.v68IqT6K048997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 8 Jul 2017 18:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320810 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 320810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 18:52:31 -0000 Author: markj Date: Sat Jul 8 18:52:29 2017 New Revision: 320810 URL: https://svnweb.freebsd.org/changeset/base/320810 Log: Add TASK_COMM_LEN to the LinuxKPI. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/sched.h Sat Jul 8 17:53:00 2017 (r320809) +++ head/sys/compat/linuxkpi/common/include/linux/sched.h Sat Jul 8 18:52:29 2017 (r320810) @@ -56,6 +56,8 @@ #define TASK_WAKING 0x0100 #define TASK_PARKED 0x0200 +#define TASK_COMM_LEN (MAXCOMLEN + 1) + struct task_struct { struct thread *task_thread; struct mm_struct *mm; From owner-svn-src-head@freebsd.org Sat Jul 8 18:53:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B360DA05FC; Sat, 8 Jul 2017 18:53:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6829265136; Sat, 8 Jul 2017 18:53:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68Ir2lw049061; Sat, 8 Jul 2017 18:53:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68Ir2uA049060; Sat, 8 Jul 2017 18:53:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707081853.v68Ir2uA049060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 8 Jul 2017 18:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320811 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 320811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 18:53:03 -0000 Author: markj Date: Sat Jul 8 18:53:02 2017 New Revision: 320811 URL: https://svnweb.freebsd.org/changeset/base/320811 Log: Add device_is_registered() to the LinuxKPI. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/device.h Modified: head/sys/compat/linuxkpi/common/include/linux/device.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/device.h Sat Jul 8 18:52:29 2017 (r320810) +++ head/sys/compat/linuxkpi/common/include/linux/device.h Sat Jul 8 18:53:02 2017 (r320811) @@ -359,13 +359,20 @@ device_create_with_groups(struct class *class, return dev; } +static inline bool +device_is_registered(struct device *dev) +{ + + return (dev->bsddev != NULL); +} + static inline int device_register(struct device *dev) { device_t bsddev = NULL; int unit = -1; - if (dev->bsddev != NULL) + if (device_is_registered(dev)) goto done; if (dev->devt) { From owner-svn-src-head@freebsd.org Sat Jul 8 19:22:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31C90DA0D45; Sat, 8 Jul 2017 19:22:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEF7A65B52; Sat, 8 Jul 2017 19:22:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68JMU6U061370; Sat, 8 Jul 2017 19:22:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68JMUBL061369; Sat, 8 Jul 2017 19:22:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707081922.v68JMUBL061369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 8 Jul 2017 19:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320812 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 320812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 19:22:31 -0000 Author: markj Date: Sat Jul 8 19:22:29 2017 New Revision: 320812 URL: https://svnweb.freebsd.org/changeset/base/320812 Log: Fix the definitions of pgprot_{noncached,writecombine} after r316562. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/page.h Modified: head/sys/compat/linuxkpi/common/include/linux/page.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/page.h Sat Jul 8 18:53:02 2017 (r320811) +++ head/sys/compat/linuxkpi/common/include/linux/page.h Sat Jul 8 19:22:29 2017 (r320812) @@ -76,8 +76,10 @@ pgprot2cachemode(pgprot_t prot) #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) #define clear_page(page) memset((page), 0, PAGE_SIZE) -#define pgprot_noncached(prot) ((pgprot_t)VM_MEMATTR_UNCACHEABLE) -#define pgprot_writecombine(prot) ((pgprot_t)VM_MEMATTR_WRITE_COMBINING) +#define pgprot_noncached(prot) \ + ((prot) | cachemode2protval(VM_MEMATTR_UNCACHEABLE)) +#define pgprot_writecombine(prot) \ + ((prot) | cachemode2protval(VM_MEMATTR_WRITE_COMBINING)) #undef PAGE_MASK #define PAGE_MASK (~(PAGE_SIZE-1)) From owner-svn-src-head@freebsd.org Sat Jul 8 20:11:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE40ADA1842; Sat, 8 Jul 2017 20:11:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D0BD66948; Sat, 8 Jul 2017 20:11:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68KB64i078412; Sat, 8 Jul 2017 20:11:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68KB6hY078410; Sat, 8 Jul 2017 20:11:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707082011.v68KB6hY078410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 8 Jul 2017 20:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320813 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 320813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 20:11:07 -0000 Author: markj Date: Sat Jul 8 20:11:06 2017 New Revision: 320813 URL: https://svnweb.freebsd.org/changeset/base/320813 Log: Add some helper definitions to fs.h in the LinuxKPI. Add a field to struct linux_file to allow the creation of anonymous shmem objects. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/fs.h Sat Jul 8 19:22:29 2017 (r320812) +++ head/sys/compat/linuxkpi/common/include/linux/fs.h Sat Jul 8 20:11:06 2017 (r320813) @@ -80,8 +80,12 @@ struct linux_file { struct selinfo f_selinfo; struct sigio *f_sigio; struct vnode *f_vnode; +#define f_inode f_vnode volatile u_int f_count; + /* anonymous shmem object */ + vm_object_t f_shmem; + /* kqfilter support */ int f_kqflags; #define LINUX_KQ_FLAG_HAS_READ (1 << 0) @@ -156,7 +160,8 @@ struct file_operations { int (*setlease)(struct file *, long, struct file_lock **); #endif }; -#define fops_get(fops) (fops) +#define fops_get(fops) (fops) +#define replace_fops(f, fops) ((f)->f_op = (fops)) #define FMODE_READ FREAD #define FMODE_WRITE FWRITE Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Sat Jul 8 19:22:29 2017 (r320812) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Sat Jul 8 20:11:06 2017 (r320813) @@ -463,6 +463,8 @@ void linux_file_free(struct linux_file *filp) { if (filp->_file == NULL) { + if (filp->f_shmem != NULL) + vm_object_deallocate(filp->f_shmem); kfree(filp); } else { /* From owner-svn-src-head@freebsd.org Sat Jul 8 21:02:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20E3EDA261A; Sat, 8 Jul 2017 21:02:42 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE7CF67B4A; Sat, 8 Jul 2017 21:02:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68L2erx001794; Sat, 8 Jul 2017 21:02:40 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68L2e0d001793; Sat, 8 Jul 2017 21:02:40 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707082102.v68L2e0d001793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 8 Jul 2017 21:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320814 - head/sys/fs/fdescfs X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/fs/fdescfs X-SVN-Commit-Revision: 320814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 21:02:42 -0000 Author: dchagin Date: Sat Jul 8 21:02:40 2017 New Revision: 320814 URL: https://svnweb.freebsd.org/changeset/base/320814 Log: Style(9). Add blank line aftr {. MFC after: 3 weeks Modified: head/sys/fs/fdescfs/fdesc_vfsops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 20:11:06 2017 (r320813) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:02:40 2017 (r320814) @@ -68,6 +68,7 @@ static vfs_root_t fdesc_root; int fdesc_cmount(struct mntarg *ma, void *data, uint64_t flags) { + return kernel_mount(ma, flags); } From owner-svn-src-head@freebsd.org Sat Jul 8 21:04:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA38ADA269C; Sat, 8 Jul 2017 21:04:10 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 790C167C93; Sat, 8 Jul 2017 21:04:10 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68L49Ex001889; Sat, 8 Jul 2017 21:04:09 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68L49Mv001888; Sat, 8 Jul 2017 21:04:09 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707082104.v68L49Mv001888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 8 Jul 2017 21:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320815 - head/sys/fs/fdescfs X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/fs/fdescfs X-SVN-Commit-Revision: 320815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 21:04:10 -0000 Author: dchagin Date: Sat Jul 8 21:04:09 2017 New Revision: 320815 URL: https://svnweb.freebsd.org/changeset/base/320815 Log: Remove init from declaration. MFC after: 3 weeks Modified: head/sys/fs/fdescfs/fdesc_vfsops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:02:40 2017 (r320814) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:04:09 2017 (r320815) @@ -78,10 +78,10 @@ fdesc_cmount(struct mntarg *ma, void *data, uint64_t f static int fdesc_mount(struct mount *mp) { - int error = 0; struct fdescmount *fmp; struct thread *td = curthread; struct vnode *rvp; + int error; if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_FDESCFS)) return (EPERM); From owner-svn-src-head@freebsd.org Sat Jul 8 21:05:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25188DA2716; Sat, 8 Jul 2017 21:05:30 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E33DC67DD0; Sat, 8 Jul 2017 21:05:29 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68L5SHc001980; Sat, 8 Jul 2017 21:05:28 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68L5Sh5001979; Sat, 8 Jul 2017 21:05:28 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707082105.v68L5Sh5001979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 8 Jul 2017 21:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320816 - head/sys/fs/fdescfs X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/fs/fdescfs X-SVN-Commit-Revision: 320816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 21:05:30 -0000 Author: dchagin Date: Sat Jul 8 21:05:28 2017 New Revision: 320816 URL: https://svnweb.freebsd.org/changeset/base/320816 Log: Remove init from declaration, collapse two int vars declarations into single. MFC after: 3 weeks Modified: head/sys/fs/fdescfs/fdesc_vfsops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:04:09 2017 (r320815) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:05:28 2017 (r320816) @@ -124,9 +124,9 @@ fdesc_unmount(struct mount *mp, int mntflags) { struct fdescmount *fmp; caddr_t data; - int error; - int flags = 0; + int error, flags; + flags = 0; fmp = (struct fdescmount *)mp->mnt_data; if (mntflags & MNT_FORCE) { /* The hash mutex protects the private mount flags. */ From owner-svn-src-head@freebsd.org Sat Jul 8 21:08:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5FABDA2806; Sat, 8 Jul 2017 21:08:23 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BC0668030; Sat, 8 Jul 2017 21:08:23 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68L8M0D002118; Sat, 8 Jul 2017 21:08:22 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68L8MKY002117; Sat, 8 Jul 2017 21:08:22 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707082108.v68L8MKY002117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 8 Jul 2017 21:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320817 - head/sys/fs/fdescfs X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/fs/fdescfs X-SVN-Commit-Revision: 320817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 21:08:23 -0000 Author: dchagin Date: Sat Jul 8 21:08:22 2017 New Revision: 320817 URL: https://svnweb.freebsd.org/changeset/base/320817 Log: Don't take a lock around atomic operation. MFC after: 3 weeks Modified: head/sys/fs/fdescfs/fdesc_vfsops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:05:28 2017 (r320816) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:08:22 2017 (r320817) @@ -123,7 +123,6 @@ static int fdesc_unmount(struct mount *mp, int mntflags) { struct fdescmount *fmp; - caddr_t data; int error, flags; flags = 0; @@ -148,15 +147,10 @@ fdesc_unmount(struct mount *mp, int mntflags) return (error); /* - * Finally, throw away the fdescmount structure. Hold the hashmtx to - * protect the fdescmount structure. + * Finally, throw away the fdescmount structure. */ - mtx_lock(&fdesc_hashmtx); - data = mp->mnt_data; mp->mnt_data = NULL; - mtx_unlock(&fdesc_hashmtx); - free(data, M_FDESCMNT); /* XXX */ - + free(fmp, M_FDESCMNT); return (0); } From owner-svn-src-head@freebsd.org Sat Jul 8 21:12:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1A46DA29D5; Sat, 8 Jul 2017 21:12:01 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DB3868365; Sat, 8 Jul 2017 21:12:01 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68LC0pq005163; Sat, 8 Jul 2017 21:12:00 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68LC0Xv005162; Sat, 8 Jul 2017 21:12:00 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707082112.v68LC0Xv005162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 8 Jul 2017 21:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320818 - head/sys/fs/fdescfs X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/fs/fdescfs X-SVN-Commit-Revision: 320818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 21:12:01 -0000 Author: dchagin Date: Sat Jul 8 21:12:00 2017 New Revision: 320818 URL: https://svnweb.freebsd.org/changeset/base/320818 Log: Eliminate the bogus cast. MFC after: 3 weeks Modified: head/sys/fs/fdescfs/fdesc_vfsops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:08:22 2017 (r320817) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:12:00 2017 (r320818) @@ -126,7 +126,7 @@ fdesc_unmount(struct mount *mp, int mntflags) int error, flags; flags = 0; - fmp = (struct fdescmount *)mp->mnt_data; + fmp = mp->mnt_data; if (mntflags & MNT_FORCE) { /* The hash mutex protects the private mount flags. */ mtx_lock(&fdesc_hashmtx); From owner-svn-src-head@freebsd.org Sat Jul 8 21:13:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CB70DA2A52; Sat, 8 Jul 2017 21:13:26 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C18E68504; Sat, 8 Jul 2017 21:13:26 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68LDP3D006127; Sat, 8 Jul 2017 21:13:25 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68LDPlh006126; Sat, 8 Jul 2017 21:13:25 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707082113.v68LDPlh006126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 8 Jul 2017 21:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320819 - head/sys/fs/fdescfs X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/fs/fdescfs X-SVN-Commit-Revision: 320819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 21:13:26 -0000 Author: dchagin Date: Sat Jul 8 21:13:25 2017 New Revision: 320819 URL: https://svnweb.freebsd.org/changeset/base/320819 Log: Eliminate the bogus cast. MFC after: 3 weeks Modified: head/sys/fs/fdescfs/fdesc_vfsops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:12:00 2017 (r320818) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Sat Jul 8 21:13:25 2017 (r320819) @@ -99,7 +99,7 @@ fdesc_mount(struct mount *mp) * We need to initialize a few bits of our local mount point struct to * avoid confusion in allocvp. */ - mp->mnt_data = (qaddr_t) fmp; + mp->mnt_data = fmp; fmp->flags = 0; error = fdesc_allocvp(Froot, -1, FD_ROOT, mp, &rvp); if (error) { From owner-svn-src-head@freebsd.org Sat Jul 8 21:15:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C269DDA2AFF; Sat, 8 Jul 2017 21:15:47 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B68968672; Sat, 8 Jul 2017 21:15:47 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v68LFkdJ006261; Sat, 8 Jul 2017 21:15:46 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v68LFkYY006260; Sat, 8 Jul 2017 21:15:46 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707082115.v68LFkYY006260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 8 Jul 2017 21:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320820 - head/sys/fs/fdescfs X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: head/sys/fs/fdescfs X-SVN-Commit-Revision: 320820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 21:15:47 -0000 Author: dchagin Date: Sat Jul 8 21:15:46 2017 New Revision: 320820 URL: https://svnweb.freebsd.org/changeset/base/320820 Log: Don't initialize error in declaration. MFC after: 3 weeks Modified: head/sys/fs/fdescfs/fdesc_vnops.c Modified: head/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vnops.c Sat Jul 8 21:13:25 2017 (r320819) +++ head/sys/fs/fdescfs/fdesc_vnops.c Sat Jul 8 21:15:46 2017 (r320820) @@ -152,7 +152,7 @@ fdesc_allocvp(fdntype ftype, unsigned fd_fd, int ix, s struct fdescnode *fd, *fd2; struct vnode *vp, *vp2; struct thread *td; - int error = 0; + int error; td = curthread; fc = FD_NHASH(ix);