From owner-svn-src-all@freebsd.org Sun Jun 30 02:08:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7407715C77EC; Sun, 30 Jun 2019 02:08:14 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16F606C1B7; Sun, 30 Jun 2019 02:08:14 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFE811EEFB; Sun, 30 Jun 2019 02:08:13 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5U28DCl035507; Sun, 30 Jun 2019 02:08:13 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5U28Dvq035506; Sun, 30 Jun 2019 02:08:13 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906300208.x5U28Dvq035506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Sun, 30 Jun 2019 02:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349550 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 16F606C1B7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.929,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 02:08:14 -0000 Author: dougm Date: Sun Jun 30 02:08:13 2019 New Revision: 349550 URL: https://svnweb.freebsd.org/changeset/base/349550 Log: Remove a call to vm_map_simplify_entry from _vm_map_clip_start. Recent changes to vm_map_protect have made it unnecessary. Reviewed by: alc Approved by: kib (mentor) Tested by: pho Differential Revision: https://reviews.freebsd.org/D20633 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Jun 29 18:41:40 2019 (r349549) +++ head/sys/vm/vm_map.c Sun Jun 30 02:08:13 2019 (r349550) @@ -2186,7 +2186,6 @@ _vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, VM_MAP_ASSERT_LOCKED(map); KASSERT(entry->end > start && entry->start < start, ("_vm_map_clip_start: invalid clip of entry %p", entry)); - vm_map_simplify_entry(map, entry); /* * Create a backing object now, if none exists, so that more individual From owner-svn-src-all@freebsd.org Sun Jun 30 02:29:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55A4015C8159; Sun, 30 Jun 2019 02:29:14 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFC7F6CAAA; Sun, 30 Jun 2019 02:29:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB6CF1F256; Sun, 30 Jun 2019 02:29:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5U2TDr6045997; Sun, 30 Jun 2019 02:29:13 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5U2TDIn045994; Sun, 30 Jun 2019 02:29:13 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201906300229.x5U2TDIn045994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 30 Jun 2019 02:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349551 - in head/tools/bus_space: Python examples X-SVN-Group: head X-SVN-Commit-Author: marcel X-SVN-Commit-Paths: in head/tools/bus_space: Python examples X-SVN-Commit-Revision: 349551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EFC7F6CAAA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.933,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 02:29:14 -0000 Author: marcel Date: Sun Jun 30 02:29:12 2019 New Revision: 349551 URL: https://svnweb.freebsd.org/changeset/base/349551 Log: Add support for Python 3 and make it the default. Python 2.7 will retire on Januari 1, 2020. Modified: head/tools/bus_space/Python/Makefile head/tools/bus_space/Python/lang.c head/tools/bus_space/examples/am79c900_diag.py Modified: head/tools/bus_space/Python/Makefile ============================================================================== --- head/tools/bus_space/Python/Makefile Sun Jun 30 02:08:13 2019 (r349550) +++ head/tools/bus_space/Python/Makefile Sun Jun 30 02:29:12 2019 (r349551) @@ -3,7 +3,11 @@ SHLIB_NAME= bus.so SRCS= lang.c -CFLAGS+= -I${.CURDIR}/.. -I/usr/local/include/python2.7 -LDFLAGS+= -L/usr/local/lib -lpython2.7 +# Set PYTHON to the version to compile against. +# E.g. "python2.7", "python3.6", etc... +PYTHON= python3.6m + +CFLAGS+= -I${.CURDIR}/.. -I/usr/local/include/${PYTHON} +LDFLAGS+= -L/usr/local/lib -l${PYTHON} .include Modified: head/tools/bus_space/Python/lang.c ============================================================================== --- head/tools/bus_space/Python/lang.c Sun Jun 30 02:08:13 2019 (r349550) +++ head/tools/bus_space/Python/lang.c Sun Jun 30 02:29:12 2019 (r349551) @@ -412,6 +412,12 @@ busdma_sync_range(PyObject *self, PyObject *args) Py_RETURN_NONE; } +/* + * Module methods and initialization. + */ + +static char bus_docstr[] = "Access to H/W bus memory and register areas."; + static PyMethodDef bus_methods[] = { { "read_1", bus_read_1, METH_VARARGS, "Read a 1-byte data item." }, { "read_2", bus_read_2, METH_VARARGS, "Read a 2-byte data item." }, @@ -431,6 +437,9 @@ static PyMethodDef bus_methods[] = { { NULL, NULL, 0, NULL } }; +static char busdma_docstr[] = "A bus- and device-independent interface" + " to Direct Memory Access (DMA) mechanisms."; + static PyMethodDef busdma_methods[] = { { "tag_create", busdma_tag_create, METH_VARARGS, "Create a root tag." }, @@ -470,18 +479,12 @@ static PyMethodDef busdma_methods[] = { { NULL, NULL, 0, NULL } }; -PyMODINIT_FUNC -initbus(void) +static PyObject * +module_initialize(PyObject *bus, PyObject *busdma) { - PyObject *bus, *busdma; - bus = Py_InitModule("bus", bus_methods); - if (bus == NULL) - return; - busdma = Py_InitModule("busdma", busdma_methods); - if (busdma == NULL) - return; - PyModule_AddObject(bus, "dma", busdma); + if (bus == NULL || busdma == NULL) + return (NULL); PyModule_AddObject(busdma, "MD_BUS_SPACE", Py_BuildValue("i", 0)); PyModule_AddObject(busdma, "MD_PHYS_SPACE", Py_BuildValue("i", 1)); @@ -491,4 +494,49 @@ initbus(void) PyModule_AddObject(busdma, "SYNC_POSTREAD", Py_BuildValue("i", 2)); PyModule_AddObject(busdma, "SYNC_PREWRITE", Py_BuildValue("i", 4)); PyModule_AddObject(busdma, "SYNC_POSTWRITE", Py_BuildValue("i", 8)); + + PyModule_AddObject(bus, "dma", busdma); + return (bus); } + +#if PY_MAJOR_VERSION >= 3 + +static struct PyModuleDef bus_module = { + PyModuleDef_HEAD_INIT, + "bus", + bus_docstr, + -1, + bus_methods, +}; + +static struct PyModuleDef busdma_module = { + PyModuleDef_HEAD_INIT, + "busdma", + busdma_docstr, + -1, + busdma_methods, +}; + +PyMODINIT_FUNC +PyInit_bus(void) +{ + PyObject *bus, *busdma; + + bus = PyModule_Create(&bus_module); + busdma = PyModule_Create(&busdma_module); + return (module_initialize(bus, busdma)); +} + +#else /* PY_MAJOR_VERSION >= 3 */ + +PyMODINIT_FUNC +initbus(void) +{ + PyObject *bus, *busdma; + + bus = Py_InitModule3("bus", bus_methods, bus_docstr); + busdma = Py_InitModule3("busdma", busdma_methods, busdma_docstr); + (void)module_initialize(bus, busdma); +} + +#endif /* PY_MAJOR_VERSION >= 3 */ Modified: head/tools/bus_space/examples/am79c900_diag.py ============================================================================== --- head/tools/bus_space/examples/am79c900_diag.py Sun Jun 30 02:08:13 2019 (r349550) +++ head/tools/bus_space/examples/am79c900_diag.py Sun Jun 30 02:29:12 2019 (r349551) @@ -54,7 +54,7 @@ import time sys.path.append('/usr/lib') import bus -import busdma +from bus import dma as busdma # ILACC initialization block definition @@ -161,7 +161,7 @@ def ip_str(a): def mac_is(l, r): - for i in xrange(6): + for i in range(6): if l[i] != r[i]: return False return True @@ -203,7 +203,7 @@ def stop(): mac = () bcast = () -for o in xrange(6): +for o in range(6): mac += (bus.read_1(io, o),) bcast += (0xff,) logging.info('ethernet address = ' + MACFMT % mac) @@ -237,23 +237,23 @@ addr_txbufs = addr_rxbufs + bufsize * nrxbufs ib = initblock.from_address(addr_initblock) ib.mode = ((ffs(ntxbufs) - 1) << 28) | ((ffs(nrxbufs) - 1) << 20) -for i in xrange(len(mac)): +for i in range(len(mac)): ib.hwaddr[i] = mac[i] -for i in xrange(4): +for i in range(4): ib.filter[i] = 0xffff ib.rxdesc = busaddr + (addr_rxdesc - cpuaddr) ib.txdesc = busaddr + (addr_txdesc - cpuaddr) ib._pad1_ = 0 ib._pad2_ = 0 -for i in xrange(nrxbufs): +for i in range(nrxbufs): bd = bufdesc.from_address(addr_rxdesc + ctypes.sizeof(bufdesc) * i) bd.buffer = busaddr + (addr_rxbufs - cpuaddr) + bufsize * i bd.flags = (1 << 31) | (15 << 12) | (-bufsize & 0xfff) bd.length = 0 bd._pad_ = 0 -for i in xrange(ntxbufs): +for i in range(ntxbufs): bd = bufdesc.from_address(addr_txdesc + ctypes.sizeof(bufdesc) * i) bd.buffer = busaddr + (addr_txbufs - cpuaddr) + bufsize * i bd.flags = (15 << 12) @@ -280,10 +280,10 @@ start() pkt = packet.from_address(addr_txbufs) ctypes.memset(addr_txbufs, 0, ctypes.sizeof(pkt)) options = [53, 1, 1] -for i in xrange(len(options)): +for i in range(len(options)): pkt.dhcp_options[i] = options[i] pkt.dhcp_magic = 0x63825363 -for i in xrange(6): +for i in range(6): pkt.bootp_chaddr[i] = mac[i] pkt.bootp_hlen = 6 pkt.bootp_htype = 1 @@ -298,7 +298,7 @@ pkt.ip_ttl = 64 pkt.ip_len = ctypes.sizeof(pkt) - 14 pkt.ip_vl = 0x45 pkt.eth_type = 0x0800 -for i in xrange(6): +for i in range(6): pkt.eth_src[i] = mac[i] pkt.eth_dest[i] = bcast[i] pktlen = ctypes.sizeof(pkt) @@ -325,7 +325,7 @@ stop() busdma.sync_range(dmamem, busdma.SYNC_PREWRITE, addr_rxdesc - cpuaddr, ctypes.sizeof(bufdesc) * nrxbufs) -for i in xrange(nrxbufs): +for i in range(nrxbufs): bd = bufdesc.from_address(addr_rxdesc + ctypes.sizeof(bufdesc) * i) if (bd.flags & 0x80000000): continue From owner-svn-src-all@freebsd.org Sun Jun 30 03:14:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 644DD15C936F; Sun, 30 Jun 2019 03:14:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF3A66E11C; Sun, 30 Jun 2019 03:14:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85C4E1FB3D; Sun, 30 Jun 2019 03:14:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5U3E5JQ072510; Sun, 30 Jun 2019 03:14:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5U3E4hc072504; Sun, 30 Jun 2019 03:14:04 GMT (envelope-from np@FreeBSD.org) Message-Id: <201906300314.x5U3E4hc072504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 30 Jun 2019 03:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349552 - in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 mips/mips riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 mips/mips riscv/riscv X-SVN-Commit-Revision: 349552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AF3A66E11C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 03:14:06 -0000 Author: np Date: Sun Jun 30 03:14:04 2019 New Revision: 349552 URL: https://svnweb.freebsd.org/changeset/base/349552 Log: Display the approximate space needed when a minidump fails due to lack of space. Reviewed by: kib@ MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20801 Modified: head/sys/amd64/amd64/minidump_machdep.c head/sys/arm/arm/minidump_machdep.c head/sys/arm64/arm64/minidump_machdep.c head/sys/i386/i386/minidump_machdep_base.c head/sys/mips/mips/minidump_machdep.c head/sys/riscv/riscv/minidump_machdep.c Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/amd64/amd64/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -448,9 +448,10 @@ minidumpsys(struct dumperinfo *di) } else if (error == ECANCELED) printf("Dump aborted\n"); - else if (error == E2BIG) - printf("Dump failed. Partition too small.\n"); - else + else if (error == E2BIG) { + printf("Dump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/arm/arm/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -340,9 +340,10 @@ fail: if (error == ECANCELED) printf("\nDump aborted\n"); - else if (error == E2BIG || error == ENOSPC) - printf("\nDump failed. Partition too small.\n"); - else + else if (error == E2BIG || error == ENOSPC) { + printf("\nDump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("\n** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/arm64/arm64/minidump_machdep.c ============================================================================== --- head/sys/arm64/arm64/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/arm64/arm64/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -414,9 +414,10 @@ fail: } else if (error == ECANCELED) printf("Dump aborted\n"); - else if (error == E2BIG) - printf("Dump failed. Partition too small.\n"); - else + else if (error == E2BIG) { + printf("Dump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/i386/i386/minidump_machdep_base.c ============================================================================== --- head/sys/i386/i386/minidump_machdep_base.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/i386/i386/minidump_machdep_base.c Sun Jun 30 03:14:04 2019 (r349552) @@ -348,9 +348,10 @@ minidumpsys(struct dumperinfo *di) if (error == ECANCELED) printf("\nDump aborted\n"); - else if (error == E2BIG || error == ENOSPC) - printf("\nDump failed. Partition too small.\n"); - else + else if (error == E2BIG || error == ENOSPC) { + printf("\nDump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("\n** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/mips/mips/minidump_machdep.c ============================================================================== --- head/sys/mips/mips/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/mips/mips/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -348,9 +348,10 @@ fail: if (error == ECANCELED) printf("\nDump aborted\n"); - else if (error == E2BIG || error == ENOSPC) - printf("\nDump failed. Partition too small.\n"); - else + else if (error == E2BIG || error == ENOSPC) { + printf("\nDump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("\n** DUMP FAILED (ERROR %d) **\n", error); return (error); } Modified: head/sys/riscv/riscv/minidump_machdep.c ============================================================================== --- head/sys/riscv/riscv/minidump_machdep.c Sun Jun 30 02:29:12 2019 (r349551) +++ head/sys/riscv/riscv/minidump_machdep.c Sun Jun 30 03:14:04 2019 (r349552) @@ -399,9 +399,10 @@ fail: } else if (error == ECANCELED) printf("Dump aborted\n"); - else if (error == E2BIG) - printf("Dump failed. Partition too small.\n"); - else + else if (error == E2BIG) { + printf("Dump failed. Partition too small (about %lluMB were " + "needed this time).\n", (long long)dumpsize >> 20); + } else printf("** DUMP FAILED (ERROR %d) **\n", error); return (error); } From owner-svn-src-all@freebsd.org Sun Jun 30 11:50:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEBAF15D4351; Sun, 30 Jun 2019 11:50:01 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D29684271; Sun, 30 Jun 2019 11:50:01 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B3EA25124; Sun, 30 Jun 2019 11:50:01 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UBo1NM038290; Sun, 30 Jun 2019 11:50:01 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UBnwNG038243; Sun, 30 Jun 2019 11:49:58 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201906301149.x5UBnwNG038243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Sun, 30 Jun 2019 11:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349554 - in head: lib/libc/gen libexec/rtld-elf libexec/rtld-elf/rtld-libc X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: lib/libc/gen libexec/rtld-elf libexec/rtld-elf/rtld-libc X-SVN-Commit-Revision: 349554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6D29684271 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 11:50:02 -0000 Author: arichardson Date: Sun Jun 30 11:49:58 2019 New Revision: 349554 URL: https://svnweb.freebsd.org/changeset/base/349554 Log: Reduce size of rtld by 22% by pulling in less code from libc Currently RTLD is linked against libc_nossp_pic which means that any libc symbol used in rtld can pull in a lot of depedencies. This was causing symbol such as __libc_interposing and all the pthread stubs to be included in RTLD even though they are not required. It turns out most of these dependencies can easily be avoided by providing overrides inside of rtld. This change is motivated by CHERI, where we have an experimental ABI that requires additional relocation processing to allow the use of function pointers inside of rtld. Instead of adding this self-relocation code to RTLD I attempted to remove most function pointers from RTLD and discovered that most of them came from the libc dependencies instead of being actually used inside rtld. A nice side-effect of this change is that rtld is now 22% smaller on amd64. text data bss dec hex filename 0x21eb6 0xce0 0xe60 145910 239f6 /home/alr48/ld-elf-x86.before.so.1 0x1a6ed 0x728 0xdd8 113645 1bbed /home/alr48/ld-elf-x86.after.so.1 The number of R_X86_64_RELATIVE relocations that need to be processed on startup has also gone down from 368 to 187 (almost 50% less). Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D20663 Added: head/libexec/rtld-elf/rtld-libc/ head/libexec/rtld-elf/rtld-libc/Makefile.inc (contents, props changed) head/libexec/rtld-elf/rtld-libc/libc_private.h (contents, props changed) head/libexec/rtld-elf/rtld-libc/namespace.h (contents, props changed) head/libexec/rtld-elf/rtld-libc/rtld_libc.c (contents, props changed) head/libexec/rtld-elf/rtld-libc/rtld_libc.h (contents, props changed) head/libexec/rtld-elf/rtld-libc/un-namespace.h (contents, props changed) Modified: head/lib/libc/gen/gen-private.h head/libexec/rtld-elf/Makefile head/libexec/rtld-elf/libmap.c head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld_lock.c head/libexec/rtld-elf/rtld_printf.c head/libexec/rtld-elf/xmalloc.c Modified: head/lib/libc/gen/gen-private.h ============================================================================== --- head/lib/libc/gen/gen-private.h Sun Jun 30 06:44:35 2019 (r349553) +++ head/lib/libc/gen/gen-private.h Sun Jun 30 11:49:58 2019 (r349554) @@ -51,7 +51,11 @@ struct _dirdesc { int dd_len; /* size of data buffer */ off_t dd_seek; /* magic cookie returned by getdirentries */ int dd_flags; /* flags for readdir */ +#ifndef IN_RTLD struct pthread_mutex *dd_lock; /* lock */ +#else + struct _donotuse *dd_lock; /* unused in rtld, keep same layout */ +#endif struct _telldir *dd_td; /* telldir position recording */ void *dd_compat_de; /* compat dirent */ }; Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Sun Jun 30 06:44:35 2019 (r349553) +++ head/libexec/rtld-elf/Makefile Sun Jun 30 11:49:58 2019 (r349554) @@ -63,7 +63,8 @@ CFLAGS+= -fvisibility=hidden CFLAGS.reloc.c+=-fno-jump-tables .endif LDFLAGS+= -shared -Wl,-Bsymbolic -Wl,-z,defs -LIBADD= c_nossp_pic +# Pull in the dependencies that we use from libc +.include "rtld-libc/Makefile.inc" .if ${MK_TOOLCHAIN} == "no" LDFLAGS+= -L${LIBCDIR} .endif Modified: head/libexec/rtld-elf/libmap.c ============================================================================== --- head/libexec/rtld-elf/libmap.c Sun Jun 30 06:44:35 2019 (r349553) +++ head/libexec/rtld-elf/libmap.c Sun Jun 30 11:49:58 2019 (r349554) @@ -17,6 +17,7 @@ #include "rtld.h" #include "libmap.h" #include "paths.h" +#include "rtld_libc.h" TAILQ_HEAD(lm_list, lm); struct lm { Added: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Sun Jun 30 11:49:58 2019 (r349554) @@ -0,0 +1,101 @@ +# $FreeBSD$ +# This makefiles adds the necessary libc dependencies for RTLD without pulling +# in all of the complex libc bits such as locales, etc. + +.include + +LIBC_SRCTOP=${SRCTOP}/lib/libc +.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH}) +LIBC_ARCH=${MACHINE_ARCH} +.else +LIBC_ARCH=${MACHINE_CPUARCH} +.endif + +CFLAGS+= -I${SRCTOP}/libexec/rtld-elf/rtld-libc + +# Build all the libc files that use interposed symbols or pthreads again for +# RTLD. We compile with a different libc_private.h and namespace.h that +# redirects all calls to interposed functions to use the non-interposed version +# instead. +.PATH: ${LIBC_SRCTOP}/gen +SRCS+= opendir.c closedir.c readdir.c telldir.c + +# Avoid further dependencies by providing simple implementations of libc +# functions such as __error(), etc. +.PATH: ${SRCTOP}/libexec/rtld-elf/rtld-libc +SRCS+= rtld_libc.c + +# Now build the remaining files from libc: +.PATH: ${LIBC_SRCTOP}/stdlib +SRCS+= reallocf.c realpath.c getenv.c merge.c reallocarray.c +# TODO: fix merge.c to build with WARNS=6 +.if ${COMPILER_TYPE} == "clang" +CFLAGS.merge.c+=-Wno-error=null-pointer-arithmetic +.endif +.PATH: ${LIBC_SRCTOP}/gen +SRCS+= errlst.c getcwd.c getprogname.c raise.c sigsetops.c sysctlnametomib.c \ + __xuname.c +# errlst.c needs the errlst.h header from libc: +CFLAGS.errlst.c+=-I${LIBC_SRCTOP}/include + +# Use the string and memory .o files from libc instead of rebuilding them (they +# might be using optimized assembly and duplicating that logic here is awkward). +_libc_string_objects= bcopy memchr memcmp memcpy memmove stpncpy strcat \ + strchr strcmp stpcpy strcpy strcspn strdup strlcat strlcpy strlen strncmp \ + strncpy strrchr strsep strspn strstr strtok +# Also use all the syscall .o files from libc_nossp_pic: +_libc_other_objects= sigsetjmp lstat stat fstat fstatat fstatfs syscall \ + cerror geteuid getegid munmap mprotect sysarch __sysctl issetugid __getcwd \ + utrace thr_self thr_kill pread mmap lseek _exit _fstat _fstatat _fstatfs \ + getdirentries _getdirentries _close _fcntl _open _openat _read \ + _sigprocmask _write readlink _setjmp setjmp setjmperr + + +# Finally add additional architecture-dependent libc dependencies +.if ${LIBC_ARCH} == "arm" +# ARM needs aeabi_unwind_cpp for _setjmp +_libc_other_objects+=aeabi_unwind_cpp +.elif ${LIBC_ARCH} == "i386" +# __udivdi3 is needed by kvprintf() in rtld_printf.c +# i386 also needs i386_set_gsbase for allocate_initial_tls() +_libc_other_objects+=udivdi3 qdivrem i386_set_gsbase +.elif ${LIBC_ARCH} == "powerpc" || ${LIBC_ARCH} == "powerpcspe" +# ppc needs __syncicache for reloc.c and __umoddi3+__udivdi3 for rtld_printf.c +_libc_other_objects+=syncicache umoddi3 udivdi3 qdivrem +# for some reason there is also a reference to abs() +_libc_other_objects+=abs +.elif ${LIBC_ARCH} == "powerpc64" +# ppc64 needs __syncicache for reloc.c +_libc_other_objects+=syncicache +.elif ${LIBC_ARCH} == "mips" +# 32-bit MIPS needs __umoddi3+__udivdi3 for rtld_printf.c +.if ${MACHINE_ARCH:Mmipsn32*} == "" && ${MACHINE_ARCH:Mmips64*} == "" +_libc_other_objects+=umoddi3 udivdi3 qdivrem +.endif +.elif ${LIBC_ARCH} == "sparc64" +# reloc.c uses __sparc_utrap which needs a lot of other object files +_libc_other_objects+=__sparc_utrap __sparc_utrap_fp_disabled __sparc_utrap_gen \ + __sparc_utrap_setup __sparc_utrap_align __sparc_utrap_emul kill getpid \ + fpu fpu_explode fpu_div fpu_reg fpu_sqrt fpu_implode fpu_subr fpu_add \ + fpu_compare fpu_mul +.endif + +# Extract all the .o files from libc_nossp_pic.a. This ensures that +# we don't accidentally pull in the interposing table or similar by linking +# directly against libc_nossp_pic.a +_rtld_libc_objs= +.for _obj in ${_libc_other_objects} ${_libc_string_objects} +_rtld_libc_objs+=${_obj}.nossppico +CLEANFILES+=${_obj}.nossppico +# LDFLAGS+= -Wl,--trace-symbol=${_obj} +.endfor +# LDFLAGS+= -Wl,--trace + +# We insert all the .o files from libc_nossp_pic.a into a new rtld_libc.a file +# to ensure that only .o files that are actually used end up being included. +rtld_libc.a: ${LIBC_NOSSP_PIC} ${SRCTOP}/libexec/rtld-elf/rtld-libc/Makefile.inc + ${AR} x ${LIBC_NOSSP_PIC} ${_rtld_libc_objs} + ${AR} cr ${.OBJDIR}/${.TARGET} ${_rtld_libc_objs} +CLEANFILES+=rtld_libc.a +LDADD+=${.OBJDIR}/rtld_libc.a +${PROG}: rtld_libc.a Added: head/libexec/rtld-elf/rtld-libc/libc_private.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/rtld-libc/libc_private.h Sun Jun 30 11:49:58 2019 (r349554) @@ -0,0 +1,39 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2019 Alex Richadson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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 _RTLD_LIBC_PRIVATE_H_ +#define _RTLD_LIBC_PRIVATE_H_ + +#include "rtld_libc.h" + +#endif /* _RTLD_LIBC_PRIVATE_H_ */ Added: head/libexec/rtld-elf/rtld-libc/namespace.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/rtld-libc/namespace.h Sun Jun 30 11:49:58 2019 (r349554) @@ -0,0 +1,39 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2019 Alex Richadson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#define fcntl _fcntl +#define open _open +#define openat _openat +#define fstatfs _fstatfs +#define close _close +#define getdirentries _getdirentries Added: head/libexec/rtld-elf/rtld-libc/rtld_libc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/rtld-libc/rtld_libc.c Sun Jun 30 11:49:58 2019 (r349554) @@ -0,0 +1,140 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2019 Alex Richadson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "rtld.h" +#include "rtld_printf.h" +#include "rtld_libc.h" + +/* + * Avoid dependencies from various libc calls on abort(). Since this is only + * used for assertions in RTLD, we can just raise SIGABRT directly. + */ +void +abort(void) +{ + raise(SIGABRT); + __builtin_trap(); +} + +static int rtld_errno; +int *__error(void); +int * +__error(void) +{ + + return (&rtld_errno); +} + +/* Avoid dependency on __libc_interposing, use the system call directly. */ +#undef sigprocmask +int +sigprocmask(int how, const sigset_t *set, sigset_t *oset) +{ + + return (__sys_sigprocmask(how, set, oset)); +} +__strong_reference(sigprocmask, __libc_sigprocmask); + +#if defined DEBUG || !defined(NDEBUG) +/* Provide an implementation of __assert that does not pull in fprintf() */ +void +__assert(const char *func, const char *file, int line, const char *failedexpr) +{ + + if (func == NULL) + (void)rtld_fdprintf(STDERR_FILENO, + "Assertion failed: (%s), file %s, line %d.\n", failedexpr, + file, line); + else + (void)rtld_fdprintf(STDERR_FILENO, + "Assertion failed: (%s), function %s, file %s, line %d.\n", + failedexpr, func, file, line); + abort(); + /* NOTREACHED */ +} +#endif + +/* + * Avoid pulling in all of pthreads from getpagesize(). + * It normally uses libc/gen/auxv.c which pulls in pthread_once(). + */ +int +getpagesize(void) +{ + int mib[2], value; + size_t size; + static int pagesize; + + if (pagesize != 0) + return (pagesize); + + if (npagesizes > 0) + pagesize = pagesizes[0]; + + if (pagesize == 0) { + mib[0] = CTL_HW; + mib[1] = HW_PAGESIZE; + size = sizeof(value); + if (sysctl(mib, nitems(mib), &value, &size, NULL, 0) == -1) + pagesize = PAGE_SIZE; + else + pagesize = value; + } + + return (pagesize); +} + +extern int __sys___sysctl(const int *name, u_int namelen, void *oldp, + size_t *oldlenp, const void *newp, size_t newlen); + +int +sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, + const void *newp, size_t newlen) +{ + int retval; + + assert(name[0] != CTL_USER && "Not supported inside rtld!"); + retval = __sys___sysctl(name, namelen, oldp, oldlenp, newp, newlen); + return (retval); +} Added: head/libexec/rtld-elf/rtld-libc/rtld_libc.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/rtld-libc/rtld_libc.h Sun Jun 30 11:49:58 2019 (r349554) @@ -0,0 +1,89 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2019 Alex Richadson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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 _RTLD_AVOID_LIBC_DEPS_H_ +#define _RTLD_AVOID_LIBC_DEPS_H_ + +#include +#include +#include +#include + +/* Avoid dependencies on libthr (used by closedir/opendir/readdir) */ +#define __isthreaded 0 +#define _pthread_mutex_lock(mtx) (void)0 +#define _pthread_mutex_unlock(mtx) (void)0 +#define _pthread_mutex_destroy(mtx) (void)0 +#define __libc_interposing error, must not use this variable inside rtld + +int __sys_close(int); +void __sys_exit(int) __dead2; +int __sys_fcntl(int, int, ...); +int __sys_fstat(int fd, struct stat *); +int __sys_fstatat(int, const char *, struct stat *, int); +int __sys___getcwd(char *, size_t); +int __sys_open(const char *, int, ...); +int __sys_openat(int, const char *, int, ...); +int __sys_sigprocmask(int, const sigset_t *, sigset_t *); +int __sys_thr_kill(long, int); +int __sys_thr_self(long *); +__ssize_t __sys_pread(int, void *, __size_t, __off_t); +__ssize_t __sys_read(int, void *, __size_t); +__ssize_t __sys_write(int, const void *, __size_t); + +extern char* __progname; +const char *_getprogname(void); +int __getosreldate(void); + + +/* + * Don't pull in any of the libc wrappers. Instead we use the system call + * directly inside RTLD to avoid pulling in __libc_interposing (which pulls + * in lots more object files). + */ +#define close(fd) __sys_close(fd) +#define _close(fd) __sys_close(fd) +#define exit(status) __sys_exit(status) +#define _exit(status) __sys_exit(status) +#define fcntl(fd, cmd, arg) __sys_fcntl(fd, cmd, arg) +#define _fcntl(fd, cmd, arg) __sys_fcntl(fd, cmd, arg) +#define _fstat(fd, sb) __sys_fstat(fd, sb) +#define open(path, ...) __sys_open(path, __VA_ARGS__) +#define pread(fd, buf, nbytes, offset) __sys_pread(fd, buf, nbytes, offset) +#define read(fd, buf, nbytes) __sys_read(fd, buf, nbytes) +#define sigprocmask(how, set, oset) __sys_sigprocmask(how, set, oset) +#define strerror(errno) rtld_strerror(errno) +#define _write(fd, buf, nbytes) __sys_write(fd, buf, nbytes) +#define write(fd, buf, nbytes) __sys_write(fd, buf, nbytes) + +#endif /* _RTLD_AVOID_LIBC_DEPS_H_ */ Added: head/libexec/rtld-elf/rtld-libc/un-namespace.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/rtld-libc/un-namespace.h Sun Jun 30 11:49:58 2019 (r349554) @@ -0,0 +1,41 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2019 Alex Richadson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#undef fcntl +#undef open +#undef openat +#undef close +#undef fstatfs +#undef getdirentries + +#include "rtld_libc.h" Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Jun 30 06:44:35 2019 (r349553) +++ head/libexec/rtld-elf/rtld.c Sun Jun 30 11:49:58 2019 (r349554) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include "rtld_malloc.h" #include "rtld_utrace.h" #include "notes.h" +#include "rtld_libc.h" /* Types. */ typedef void (*func_ptr_type)(void); @@ -78,7 +79,6 @@ typedef void * (*path_enum_proc) (const char *path, si /* Variables that cannot be static: */ extern struct r_debug r_debug; /* For GDB */ extern int _thread_autoinit_dummy_decl; -extern char* __progname; extern void (*__cleanup)(void); @@ -250,7 +250,6 @@ void _rtld_error(const char *, ...) __exported; /* Only here to fix -Wmissing-prototypes warnings */ int __getosreldate(void); -void __pthread_cxa_finalize(struct dl_phdr_info *a); func_ptr_type _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp); Elf_Addr _rtld_bind(Obj_Entry *obj, Elf_Size reloff); @@ -5647,26 +5646,6 @@ __getosreldate(void) osreldate = osrel; return (osreldate); } - -void -exit(int status) -{ - - _exit(status); -} - -void (*__cleanup)(void); -int __isthreaded = 0; -int _thread_autoinit_dummy_decl = 1; - -/* - * No unresolved symbols for rtld. - */ -void -__pthread_cxa_finalize(struct dl_phdr_info *a __unused) -{ -} - const char * rtld_strerror(int errnum) { Modified: head/libexec/rtld-elf/rtld_lock.c ============================================================================== --- head/libexec/rtld-elf/rtld_lock.c Sun Jun 30 06:44:35 2019 (r349553) +++ head/libexec/rtld-elf/rtld_lock.c Sun Jun 30 11:49:58 2019 (r349554) @@ -52,6 +52,7 @@ #include "debug.h" #include "rtld.h" #include "rtld_machdep.h" +#include "rtld_libc.h" void _rtld_thread_init(struct RtldLockInfo *) __exported; void _rtld_atfork_pre(int *) __exported; Modified: head/libexec/rtld-elf/rtld_printf.c ============================================================================== --- head/libexec/rtld-elf/rtld_printf.c Sun Jun 30 06:44:35 2019 (r349553) +++ head/libexec/rtld-elf/rtld_printf.c Sun Jun 30 11:49:58 2019 (r349554) @@ -44,6 +44,7 @@ #include #include #include "rtld_printf.h" +#include "rtld_libc.h" #define MAXNBUF (sizeof(intmax_t) * NBBY + 1) Modified: head/libexec/rtld-elf/xmalloc.c ============================================================================== --- head/libexec/rtld-elf/xmalloc.c Sun Jun 30 06:44:35 2019 (r349553) +++ head/libexec/rtld-elf/xmalloc.c Sun Jun 30 11:49:58 2019 (r349554) @@ -34,6 +34,7 @@ #include "rtld.h" #include "rtld_printf.h" #include "rtld_malloc.h" +#include "rtld_libc.h" void * xcalloc(size_t number, size_t size) From owner-svn-src-all@freebsd.org Sun Jun 30 14:04:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ADB715D7048; Sun, 30 Jun 2019 14:04:32 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D270887B93; Sun, 30 Jun 2019 14:04:31 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB89926884; Sun, 30 Jun 2019 14:04:31 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UE4VBD010538; Sun, 30 Jun 2019 14:04:31 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UE4Ued010534; Sun, 30 Jun 2019 14:04:30 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201906301404.x5UE4Ued010534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Sun, 30 Jun 2019 14:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349555 - head/libexec/rtld-elf/rtld-libc X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/libexec/rtld-elf/rtld-libc X-SVN-Commit-Revision: 349555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D270887B93 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 14:04:32 -0000 Author: arichardson Date: Sun Jun 30 14:04:30 2019 New Revision: 349555 URL: https://svnweb.freebsd.org/changeset/base/349555 Log: Fix my name in license header Reported by: trasz Modified: head/libexec/rtld-elf/rtld-libc/libc_private.h head/libexec/rtld-elf/rtld-libc/namespace.h head/libexec/rtld-elf/rtld-libc/rtld_libc.c head/libexec/rtld-elf/rtld-libc/rtld_libc.h head/libexec/rtld-elf/rtld-libc/un-namespace.h Modified: head/libexec/rtld-elf/rtld-libc/libc_private.h ============================================================================== --- head/libexec/rtld-elf/rtld-libc/libc_private.h Sun Jun 30 11:49:58 2019 (r349554) +++ head/libexec/rtld-elf/rtld-libc/libc_private.h Sun Jun 30 14:04:30 2019 (r349555) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright 2019 Alex Richadson + * Copyright 2019 Alex Richardson * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and Modified: head/libexec/rtld-elf/rtld-libc/namespace.h ============================================================================== --- head/libexec/rtld-elf/rtld-libc/namespace.h Sun Jun 30 11:49:58 2019 (r349554) +++ head/libexec/rtld-elf/rtld-libc/namespace.h Sun Jun 30 14:04:30 2019 (r349555) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright 2019 Alex Richadson + * Copyright 2019 Alex Richardson * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and Modified: head/libexec/rtld-elf/rtld-libc/rtld_libc.c ============================================================================== --- head/libexec/rtld-elf/rtld-libc/rtld_libc.c Sun Jun 30 11:49:58 2019 (r349554) +++ head/libexec/rtld-elf/rtld-libc/rtld_libc.c Sun Jun 30 14:04:30 2019 (r349555) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright 2019 Alex Richadson + * Copyright 2019 Alex Richardson * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and Modified: head/libexec/rtld-elf/rtld-libc/rtld_libc.h ============================================================================== --- head/libexec/rtld-elf/rtld-libc/rtld_libc.h Sun Jun 30 11:49:58 2019 (r349554) +++ head/libexec/rtld-elf/rtld-libc/rtld_libc.h Sun Jun 30 14:04:30 2019 (r349555) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright 2019 Alex Richadson + * Copyright 2019 Alex Richardson * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and Modified: head/libexec/rtld-elf/rtld-libc/un-namespace.h ============================================================================== --- head/libexec/rtld-elf/rtld-libc/un-namespace.h Sun Jun 30 11:49:58 2019 (r349554) +++ head/libexec/rtld-elf/rtld-libc/un-namespace.h Sun Jun 30 14:04:30 2019 (r349555) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright 2019 Alex Richadson + * Copyright 2019 Alex Richardson * * This software was developed by SRI International and the University of * Cambridge Computer Laboratory (Department of Computer Science and From owner-svn-src-all@freebsd.org Sun Jun 30 14:46:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1820115D7B4A; Sun, 30 Jun 2019 14:46:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B17D288D0B; Sun, 30 Jun 2019 14:46:16 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 890C926F23; Sun, 30 Jun 2019 14:46:16 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UEkGrU031659; Sun, 30 Jun 2019 14:46:16 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UEkG7Z031657; Sun, 30 Jun 2019 14:46:16 GMT (envelope-from des@FreeBSD.org) Message-Id: <201906301446.x5UEkG7Z031657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 30 Jun 2019 14:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349556 - head/lib/libpam/modules/pam_exec X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: head/lib/libpam/modules/pam_exec X-SVN-Commit-Revision: 349556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B17D288D0B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 14:46:17 -0000 Author: des Date: Sun Jun 30 14:46:15 2019 New Revision: 349556 URL: https://svnweb.freebsd.org/changeset/base/349556 Log: Changes to the expose_password functionality: - Implement use_first_pass, allowing expose_password to be used by other service functions than pam_auth() without prompting a second time. - Don't prompt for a password during pam_setcred(). PR: 238041 MFC after: 3 weeks Modified: head/lib/libpam/modules/pam_exec/pam_exec.8 head/lib/libpam/modules/pam_exec/pam_exec.c Modified: head/lib/libpam/modules/pam_exec/pam_exec.8 ============================================================================== --- head/lib/libpam/modules/pam_exec/pam_exec.8 Sun Jun 30 14:04:30 2019 (r349555) +++ head/lib/libpam/modules/pam_exec/pam_exec.8 Sun Jun 30 14:46:15 2019 (r349556) @@ -1,5 +1,5 @@ .\" Copyright (c) 2001,2003 Networks Associates Technology, Inc. -.\" Copyright (c) 2017 Dag-Erling Smørgrav +.\" Copyright (c) 2017-2019 Dag-Erling Smørgrav .\" Copyright (c) 2018 Thomas Munro .\" All rights reserved. .\" @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 14, 2018 +.Dd May 24, 2019 .Dt PAM_EXEC 8 .Os .Sh NAME @@ -76,6 +76,13 @@ It must be a valid return value for this function. .It Cm expose_authtok Write the authentication token to the program's standard input stream, followed by a NUL character. +Ignored for +.Fn pam_sm_setcred . +.It Cm use_first_pass +If +.Cm expose_authtok +was specified, do not prompt for an authentication token if one is not +already available. .It Cm -- Stop options parsing; program and its arguments follow. Modified: head/lib/libpam/modules/pam_exec/pam_exec.c ============================================================================== --- head/lib/libpam/modules/pam_exec/pam_exec.c Sun Jun 30 14:04:30 2019 (r349555) +++ head/lib/libpam/modules/pam_exec/pam_exec.c Sun Jun 30 14:46:15 2019 (r349556) @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2001,2003 Networks Associates Technology, Inc. - * Copyright (c) 2017 Dag-Erling Smørgrav + * Copyright (c) 2017-2019 Dag-Erling Smørgrav * Copyright (c) 2018 Thomas Munro * All rights reserved. * @@ -110,6 +110,7 @@ struct pe_opts { int capture_stdout; int capture_stderr; int expose_authtok; + int use_first_pass; }; static int @@ -139,6 +140,8 @@ parse_options(const char *func, int *argc, const char options->return_prog_exit_status = 1; } else if (strcmp((*argv)[i], "expose_authtok") == 0) { options->expose_authtok = 1; + } else if (strcmp((*argv)[i], "use_first_pass") == 0) { + options->use_first_pass = 1; } else { if (strcmp((*argv)[i], "--") == 0) { (*argc)--; @@ -252,13 +255,20 @@ _pam_exec(pam_handle_t *pamh, openpam_log(PAM_LOG_ERROR, "%s: fcntl(): %m", func); OUT(PAM_SYSTEM_ERR); } - rc = pam_get_authtok(pamh, PAM_AUTHTOK, &authtok, NULL); + if (options->use_first_pass || + strcmp(func, "pam_sm_setcred") == 0) { + /* don't prompt, only expose existing token */ + rc = pam_get_item(pamh, PAM_AUTHTOK, &item); + authtok = item; + } else { + rc = pam_get_authtok(pamh, PAM_AUTHTOK, &authtok, NULL); + } if (rc == PAM_SUCCESS) { - /* We include the trailing NUL-terminator. */ + /* We include the trailing null terminator. */ authtok_size = strlen(authtok) + 1; } else { - openpam_log(PAM_LOG_ERROR, "%s: pam_get_authtok(): %s", func, - pam_strerror(pamh, rc)); + openpam_log(PAM_LOG_ERROR, "%s: pam_get_authtok(): %s", + func, pam_strerror(pamh, rc)); OUT(PAM_SYSTEM_ERR); } } From owner-svn-src-all@freebsd.org Sun Jun 30 14:57:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71F5915D7EA6; Sun, 30 Jun 2019 14:57:02 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20A3F8929E; Sun, 30 Jun 2019 14:57:02 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1FFA270CE; Sun, 30 Jun 2019 14:57:01 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UEv1Q5037475; Sun, 30 Jun 2019 14:57:01 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UEuvub037445; Sun, 30 Jun 2019 14:56:57 GMT (envelope-from des@FreeBSD.org) Message-Id: <201906301456.x5UEuvub037445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 30 Jun 2019 14:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349557 - in vendor/unbound/dist: . contrib daemon doc iterator libunbound libunbound/python pythonmod respip services services/cache testdata testdata/ssl_req_order.tdir util X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: in vendor/unbound/dist: . contrib daemon doc iterator libunbound libunbound/python pythonmod respip services services/cache testdata testdata/ssl_req_order.tdir util X-SVN-Commit-Revision: 349557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 20A3F8929E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 14:57:02 -0000 Author: des Date: Sun Jun 30 14:56:56 2019 New Revision: 349557 URL: https://svnweb.freebsd.org/changeset/base/349557 Log: Vendor import of Unbound 1.9.1. Modified: vendor/unbound/dist/Makefile.in vendor/unbound/dist/config.h.in vendor/unbound/dist/configure vendor/unbound/dist/configure.ac vendor/unbound/dist/contrib/libunbound.so.conf vendor/unbound/dist/contrib/unbound.init vendor/unbound/dist/daemon/daemon.c vendor/unbound/dist/daemon/remote.c vendor/unbound/dist/daemon/worker.c vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/README vendor/unbound/dist/doc/example.conf.in vendor/unbound/dist/doc/libunbound.3.in vendor/unbound/dist/doc/unbound-anchor.8.in vendor/unbound/dist/doc/unbound-checkconf.8.in vendor/unbound/dist/doc/unbound-control.8.in vendor/unbound/dist/doc/unbound-host.1.in vendor/unbound/dist/doc/unbound.8.in vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/iterator/iter_fwd.c vendor/unbound/dist/iterator/iter_hints.c vendor/unbound/dist/iterator/iter_utils.c vendor/unbound/dist/iterator/iterator.c vendor/unbound/dist/libunbound/libworker.c vendor/unbound/dist/libunbound/python/libunbound.i vendor/unbound/dist/pythonmod/interface.i vendor/unbound/dist/pythonmod/pythonmod.c vendor/unbound/dist/respip/respip.c vendor/unbound/dist/services/cache/infra.c vendor/unbound/dist/services/cache/infra.h vendor/unbound/dist/services/listen_dnsport.c vendor/unbound/dist/services/localzone.c vendor/unbound/dist/services/localzone.h vendor/unbound/dist/services/modstack.c vendor/unbound/dist/services/outside_network.c vendor/unbound/dist/testdata/auth_xfr_notify.rpl vendor/unbound/dist/testdata/iter_ranoaa_lame.rpl vendor/unbound/dist/testdata/iter_reclame_two.rpl vendor/unbound/dist/testdata/ssl_req_order.tdir/ssl_req_order.post vendor/unbound/dist/util/configparser.c vendor/unbound/dist/util/configparser.y vendor/unbound/dist/util/net_help.c vendor/unbound/dist/util/netevent.c Modified: vendor/unbound/dist/Makefile.in ============================================================================== --- vendor/unbound/dist/Makefile.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/Makefile.in Sun Jun 30 14:56:56 2019 (r349557) @@ -1075,8 +1075,7 @@ unitlruhash.lo unitlruhash.o: $(srcdir)/testcode/unitl $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ - $(srcdir)/util/log.h \ - $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h $(srcdir)/util/timehist.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ Modified: vendor/unbound/dist/config.h.in ============================================================================== --- vendor/unbound/dist/config.h.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/config.h.in Sun Jun 30 14:56:56 2019 (r349557) @@ -69,6 +69,9 @@ /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA +/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */ +#undef HAVE_CRYPTO_THREADID_SET_CALLBACK + /* Define to 1 if you have the `ctime_r' function. */ #undef HAVE_CTIME_R Modified: vendor/unbound/dist/configure ============================================================================== --- vendor/unbound/dist/configure Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/configure Sun Jun 30 14:56:56 2019 (r349557) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.9.0. +# Generated by GNU Autoconf 2.69 for unbound 1.9.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.9.0' -PACKAGE_STRING='unbound 1.9.0' +PACKAGE_VERSION='1.9.1' +PACKAGE_STRING='unbound 1.9.1' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -694,9 +694,6 @@ swig SWIG_LIB SWIG PC_PY_DEPENDENCY -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG PY_MAJOR_VERSION PYTHON_SITE_PKG PYTHON_LDFLAGS @@ -710,6 +707,9 @@ PTHREAD_CC ax_pthread_config RUNTIME_PATH LIBOBJS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -892,10 +892,10 @@ CPP YACC YFLAGS LT_SYS_LIBRARY_PATH -PYTHON_VERSION PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR +PYTHON_VERSION SYSTEMD_CFLAGS SYSTEMD_LIBS SYSTEMD_DAEMON_CFLAGS @@ -1440,7 +1440,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.9.0 to adapt to many kinds of systems. +\`configure' configures unbound 1.9.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1505,7 +1505,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.9.0:";; + short | recursive ) echo "Configuration of unbound 1.9.1:";; esac cat <<\_ACEOF @@ -1638,15 +1638,15 @@ Some influential environment variables: default value of `-d' given by some make applications. LT_SYS_LIBRARY_PATH User-defined run-time library search path. - PYTHON_VERSION - The installed Python version to use, for example '2.3'. This - string will be appended to the Python interpreter canonical - name. PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path + PYTHON_VERSION + The installed Python version to use, for example '2.3'. This + string will be appended to the Python interpreter canonical + name. SYSTEMD_CFLAGS C compiler flags for SYSTEMD, overriding pkg-config SYSTEMD_LIBS @@ -1722,7 +1722,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.9.0 +unbound configure 1.9.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2431,7 +2431,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.9.0, which was +It was created by unbound $as_me 1.9.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2783,11 +2783,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=9 -UNBOUND_VERSION_MICRO=0 +UNBOUND_VERSION_MICRO=1 LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=0 +LIBUNBOUND_REVISION=1 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2854,7 +2854,8 @@ LIBUNBOUND_AGE=1 # 1.8.1 had 8:1:0 # 1.8.2 had 8:2:0 # 1.8.3 had 8:3:0 -# 1.8.4 had 9:0:1 # add ub_ctx_set_tls +# 1.9.0 had 9:0:1 # add ub_ctx_set_tls +# 1.9.1 had 9:1:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -14558,6 +14559,127 @@ CC=$lt_save_CC + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + # Checks for header files. for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h do : @@ -17015,126 +17137,6 @@ $as_echo "#define HAVE_PYTHON 1" >>confdefs.h CPPFLAGS="$PYTHON_CPPFLAGS" fi ub_have_python=yes - - - - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi -fi if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5 ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5 @@ -17993,7 +17995,7 @@ fi done -for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify SSL_CTX_set_tlsext_ticket_key_cb EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex +for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify SSL_CTX_set_tlsext_ticket_key_cb EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -21148,7 +21150,7 @@ _ACEOF -version=1.9.0 +version=1.9.1 date=`date +'%b %e, %Y'` @@ -21667,7 +21669,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.9.0, which was +This file was extended by unbound $as_me 1.9.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21733,7 +21735,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.9.0 +unbound config.status 1.9.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/unbound/dist/configure.ac ============================================================================== --- vendor/unbound/dist/configure.ac Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/configure.ac Sun Jun 30 14:56:56 2019 (r349557) @@ -11,14 +11,14 @@ sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[9]) -m4_define([VERSION_MICRO],[0]) +m4_define([VERSION_MICRO],[1]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=0 +LIBUNBOUND_REVISION=1 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -85,7 +85,8 @@ LIBUNBOUND_AGE=1 # 1.8.1 had 8:1:0 # 1.8.2 had 8:2:0 # 1.8.3 had 8:3:0 -# 1.8.4 had 9:0:1 # add ub_ctx_set_tls +# 1.9.0 had 9:0:1 # add ub_ctx_set_tls +# 1.9.1 had 9:1:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -382,6 +383,8 @@ AC_CHECK_PROG(doxygen, doxygen, doxygen) AC_CHECK_TOOL(STRIP, strip) ACX_LIBTOOL_C_ONLY +PKG_PROG_PKG_CONFIG + # Checks for header files. AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h],,, [AC_INCLUDES_DEFAULT]) @@ -641,7 +644,6 @@ if test x_$ub_test_python != x_no; then CPPFLAGS="$PYTHON_CPPFLAGS" fi ub_have_python=yes - PKG_PROG_PKG_CONFIG PKG_CHECK_EXISTS(["python${PY_MAJOR_VERSION}"], [PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"], [PC_PY_DEPENDENCY="python"]) @@ -781,7 +783,7 @@ else AC_MSG_RESULT([no]) fi AC_CHECK_HEADERS([openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify SSL_CTX_set_tlsext_ticket_key_cb EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex]) +AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 EVP_DigestVerify SSL_CTX_set_tlsext_ticket_key_cb EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback]) # these check_funcs need -lssl BAKLIBS="$LIBS" Modified: vendor/unbound/dist/contrib/libunbound.so.conf ============================================================================== --- vendor/unbound/dist/contrib/libunbound.so.conf Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/contrib/libunbound.so.conf Sun Jun 30 14:56:56 2019 (r349557) @@ -14,6 +14,7 @@ int ub_ctx_set_option(ub_ctx*, string, string); int ub_ctx_get_option(ub_ctx*, string, +string*); int ub_ctx_config(ub_ctx*, string); int ub_ctx_set_fwd(ub_ctx*, string); +int ub_ctx_set_tls(ub_ctx*, bool(int)); int ub_ctx_set_stub(ub_ctx*, string, string, bool(int)); int ub_ctx_resolvconf(ub_ctx*, string); int ub_ctx_hosts(ub_ctx*, string); Modified: vendor/unbound/dist/contrib/unbound.init ============================================================================== --- vendor/unbound/dist/contrib/unbound.init Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/contrib/unbound.init Sun Jun 30 14:56:56 2019 (r349557) @@ -39,13 +39,13 @@ start() { # setup root jail if [ -s /etc/localtime ]; then [ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ; - if [ ! -e ${rootdir}/etc/localtime ] || /usr/bin/cmp -s /etc/localtime ${rootdir}/etc/localtime; then + if [ ! -e ${rootdir}/etc/localtime ] || ! /usr/bin/cmp -s /etc/localtime ${rootdir}/etc/localtime; then cp -fp /etc/localtime ${rootdir}/etc/localtime fi; fi; if [ -s /etc/resolv.conf ]; then [ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ; - if [ ! -e ${rootdir}/etc/resolv.conf ] || /usr/bin/cmp -s /etc/resolv.conf ${rootdir}/etc/resolv.conf; then + if [ ! -e ${rootdir}/etc/resolv.conf ] || ! /usr/bin/cmp -s /etc/resolv.conf ${rootdir}/etc/resolv.conf; then cp -fp /etc/resolv.conf ${rootdir}/etc/resolv.conf fi; fi; Modified: vendor/unbound/dist/daemon/daemon.c ============================================================================== --- vendor/unbound/dist/daemon/daemon.c Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/daemon/daemon.c Sun Jun 30 14:56:56 2019 (r349557) @@ -770,7 +770,7 @@ daemon_delete(struct daemon* daemon) # endif # ifdef HAVE_OPENSSL_CONFIG EVP_cleanup(); -# if OPENSSL_VERSION_NUMBER < 0x10100000 +# if (OPENSSL_VERSION_NUMBER < 0x10100000) && !defined(OPENSSL_NO_ENGINE) ENGINE_cleanup(); # endif CONF_modules_free(); Modified: vendor/unbound/dist/daemon/remote.c ============================================================================== --- vendor/unbound/dist/daemon/remote.c Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/daemon/remote.c Sun Jun 30 14:56:56 2019 (r349557) @@ -1987,7 +1987,7 @@ parse_delegpt(RES* ssl, char* args, uint8_t* nm, int a return NULL; } } else { -#ifndef HAVE_SSL_SET1_HOST +#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST) if(auth_name) log_err("no name verification functionality in " "ssl library, ignored name for %s", todo); Modified: vendor/unbound/dist/daemon/worker.c ============================================================================== --- vendor/unbound/dist/daemon/worker.c Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/daemon/worker.c Sun Jun 30 14:56:56 2019 (r349557) @@ -1171,7 +1171,7 @@ worker_handle_request(struct comm_point* c, void* arg, /* check if this query should be dropped based on source ip rate limiting */ if(!infra_ip_ratelimit_inc(worker->env.infra_cache, repinfo, - *worker->env.now)) { + *worker->env.now, c->buffer)) { /* See if we are passed through with slip factor */ if(worker->env.cfg->ip_ratelimit_factor != 0 && ub_random_max(worker->env.rnd, @@ -1559,8 +1559,17 @@ send_reply_rc: if(worker->env.cfg->log_replies) { struct timeval tv = {0, 0}; - log_reply_info(0, &qinfo, &repinfo->addr, repinfo->addrlen, - tv, 1, c->buffer); + if(qinfo.local_alias && qinfo.local_alias->rrset && + qinfo.local_alias->rrset->rk.dname) { + /* log original qname, before the local alias was + * used to resolve that CNAME to something else */ + qinfo.qname = qinfo.local_alias->rrset->rk.dname; + log_reply_info(0, &qinfo, &repinfo->addr, repinfo->addrlen, + tv, 1, c->buffer); + } else { + log_reply_info(0, &qinfo, &repinfo->addr, repinfo->addrlen, + tv, 1, c->buffer); + } } #ifdef USE_DNSCRYPT if(!dnsc_handle_uncurved_request(repinfo)) { Modified: vendor/unbound/dist/doc/Changelog ============================================================================== --- vendor/unbound/dist/doc/Changelog Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/Changelog Sun Jun 30 14:56:56 2019 (r349557) @@ -1,6 +1,86 @@ -5 February 2019: Wouter - - Fix tls-ciphers spelling in example.conf +1 March 2019: Wouter + - output forwarder log in ssl_req_order test. +28 February 2019: Wouter + - Remove memory leak on pythonmod python2 script file init. + - Remove swig gcc8 python function cast warnings, they are ignored. + - Print correct module that failed when module-config is wrong. + +27 February 2019: Wouter + - Fix #4229: Unbound man pages lack information, about access-control + order and local zone tags, and elements in views. + - Fix #14: contrib/unbound.init: Fix wrong comparison judgment + before copying. + - Fix for python module on Windows, fix fopen. + +25 February 2019: Wouter + - Fix #4227: pair event del and add for libevent for tcp_req_info. + +21 February 2019: Wouter + - Fix the error for unknown module in module-config is understandable, + and explains it was not compiled in and where to see the list. + - In example.conf explain where to put cachedb module in module-config. + - In man page and example config explain that most modules have to + be listed at the start of module-config. + +20 February 2019: Wouter + - Fix pythonmod include and sockaddr_un ifdefs for compile on + Windows, and for libunbound. + +18 February 2019: Wouter + - Print query name with ip_ratelimit exceeded log lines. + - Spaces instead of tabs in that log message. + - Print query name and IP address when domain rate limit exceeded. + +14 February 2019: Wouter + - Fix capsforid canonical sort qsort callback. + +11 February 2019: Wouter + - Note default for module-config in man page. + - Fix recursion lame test for qname minimisation asked queries, + that were not present in the set of prepared answers. + - Fix #13: Remove left-over requirements on OpenSSL >= 1.1.0 for + cert name matching, from man page. + - make depend, with newer gcc, nicer layout. + +7 February 2019: Wouter + - Fix #4206: OpenSSL 1.0.2 hostname verification for FreeBSD 11.2. + - Fix that qname minimisation does not skip a label when missing + nameserver targets need to be fetched. + - Fix #4225: clients seem to erroneously receive no answer with + DNS-over-TLS and qname-minimisation. + +4 February 2019: Wouter + - Fix that log-replies prints the correct name for local-alias + names, for names that have a CNAME in local-data configuration. + It logs the original query name, not the target of the CNAME. + - Add local-zone type inform_redirect, which logs like type inform, + and redirects like type redirect. + - Perform canonical sort for 0x20 capsforid compare of replies, + this sorts rrsets in the authority and additional section before + comparison, so that out of order rrsets do not cause failure. + +31 January 2019: Wouter + - Set ub_ctx_set_tls call signature in ltrace config file for + libunbound in contrib/libunbound.so.conf. + - improve documentation for tls-service-key and forward-first. + - #10: fixed pkg-config operations, PKG_PROG_PKG_CONFIG moved out of + conditional section, fixes systemd builds, from Enrico Scholz. + - #9: For openssl 1.0.2 use the CRYPTO_THREADID locking callbacks, + still supports the set_id_callback previous API. And for 1.1.0 + no locking callbacks are needed. + - #8: Fix OpenSSL without ENGINE support compilation. + - Wipe TLS session key data from memory on exit. + +30 January 2019: Ralph + - Fix case in which query timeout can result in marking delegation + as edns_lame_known. + +29 January 2019: Wouter + - Fix spelling of tls-ciphers in example.conf.in. + - Fix #4224: auth_xfr_notify.rpl test broken due to typo + - Fix locking for libunbound context setup with broken port config. + 28 January 2019: Wouter - ub_ctx_set_tls call for libunbound that enables DoT for the machines set with ub_ctx_set_fwd. Patch from Florian Obser. @@ -8,7 +88,9 @@ - List example config for root zone copy locally hosted with auth-zone as suggested from draft-ietf-dnsop-7706-bis-02. But with updated B root address. - - set version to 1.9.0 for release. + - set version to 1.9.0 for release. And this was released with the + spelling for tls-ciphers fix as 1.9.0 on Feb 5. Trunk has 1.9.1 in + development. 25 January 2019: Wouter - Fix that tcp for auth zone and outgoing does not remove and Modified: vendor/unbound/dist/doc/README ============================================================================== --- vendor/unbound/dist/doc/README Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/README Sun Jun 30 14:56:56 2019 (r349557) @@ -1,4 +1,4 @@ -README for Unbound 1.9.0 +README for Unbound 1.9.1 Copyright 2007 NLnet Labs http://unbound.net Modified: vendor/unbound/dist/doc/example.conf.in ============================================================================== --- vendor/unbound/dist/doc/example.conf.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/example.conf.in Sun Jun 30 14:56:56 2019 (r349557) @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.9.0. +# See unbound.conf(5) man page, version 1.9.1. # # this is a comment. @@ -475,6 +475,9 @@ server: # module configuration of the server. A string with identifiers # separated by spaces. Syntax: "[dns64] [validator] iterator" + # most modules have to be listed at the beginning of the line, + # except cachedb(just before iterator), and python (at the beginning, + # or, just before the iterator). # module-config: "validator iterator" # File with trusted keys, kept uptodate using RFC5011 probes, @@ -673,6 +676,7 @@ server: # o typetransparent resolves normally for other types and other names # o inform acts like transparent, but logs client IP address # o inform_deny drops queries and logs client IP address + # o inform_redirect redirects queries and logs client IP address # o always_transparent, always_refuse, always_nxdomain, resolve in # that way but ignore local data for that name # o noview breaks out of that view towards global local-zones. @@ -822,6 +826,8 @@ server: # Python config section. To enable: # o use --with-pythonmodule to configure before compiling. # o list python in the module-config string (above) to enable. +# It can be at the start, it gets validated results, or just before +# the iterator and process before DNSSEC validation. # o and give a python-script to run. python: # Script file to load @@ -972,7 +978,7 @@ remote-control: # Enable external backend DB as auxiliary cache. Specify the backend name # (default is "testframe", which has no use other than for debugging and # testing) and backend-specific options. The 'cachedb' module must be -# included in module-config. +# included in module-config, just before the iterator module. # cachedb: # backend: "testframe" # # secret seed string to calculate hashed keys Modified: vendor/unbound/dist/doc/libunbound.3.in ============================================================================== --- vendor/unbound/dist/doc/libunbound.3.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/libunbound.3.in Sun Jun 30 14:56:56 2019 (r349557) @@ -1,4 +1,4 @@ -.TH "libunbound" "3" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "libunbound" "3" "Mar 12, 2019" "NLnet Labs" "unbound 1.9.1" .\" .\" libunbound.3 -- unbound library functions manual .\" @@ -44,7 +44,7 @@ .B ub_ctx_zone_remove, .B ub_ctx_data_add, .B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.9.0 functions. +\- Unbound DNS validating resolver 1.9.1 functions. .SH "SYNOPSIS" .B #include .LP Modified: vendor/unbound/dist/doc/unbound-anchor.8.in ============================================================================== --- vendor/unbound/dist/doc/unbound-anchor.8.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/unbound-anchor.8.in Sun Jun 30 14:56:56 2019 (r349557) @@ -1,4 +1,4 @@ -.TH "unbound-anchor" "8" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound-anchor" "8" "Mar 12, 2019" "NLnet Labs" "unbound 1.9.1" .\" .\" unbound-anchor.8 -- unbound anchor maintenance utility manual .\" Modified: vendor/unbound/dist/doc/unbound-checkconf.8.in ============================================================================== --- vendor/unbound/dist/doc/unbound-checkconf.8.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/unbound-checkconf.8.in Sun Jun 30 14:56:56 2019 (r349557) @@ -1,4 +1,4 @@ -.TH "unbound-checkconf" "8" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound-checkconf" "8" "Mar 12, 2019" "NLnet Labs" "unbound 1.9.1" .\" .\" unbound-checkconf.8 -- unbound configuration checker manual .\" Modified: vendor/unbound/dist/doc/unbound-control.8.in ============================================================================== --- vendor/unbound/dist/doc/unbound-control.8.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/unbound-control.8.in Sun Jun 30 14:56:56 2019 (r349557) @@ -1,4 +1,4 @@ -.TH "unbound-control" "8" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound-control" "8" "Mar 12, 2019" "NLnet Labs" "unbound 1.9.1" .\" .\" unbound-control.8 -- unbound remote control manual .\" Modified: vendor/unbound/dist/doc/unbound-host.1.in ============================================================================== --- vendor/unbound/dist/doc/unbound-host.1.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/unbound-host.1.in Sun Jun 30 14:56:56 2019 (r349557) @@ -1,4 +1,4 @@ -.TH "unbound\-host" "1" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound\-host" "1" "Mar 12, 2019" "NLnet Labs" "unbound 1.9.1" .\" .\" unbound-host.1 -- unbound DNS lookup utility .\" Modified: vendor/unbound/dist/doc/unbound.8.in ============================================================================== --- vendor/unbound/dist/doc/unbound.8.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/unbound.8.in Sun Jun 30 14:56:56 2019 (r349557) @@ -1,4 +1,4 @@ -.TH "unbound" "8" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound" "8" "Mar 12, 2019" "NLnet Labs" "unbound 1.9.1" .\" .\" unbound.8 -- unbound manual .\" @@ -9,7 +9,7 @@ .\" .SH "NAME" .B unbound -\- Unbound DNS validating resolver 1.9.0. +\- Unbound DNS validating resolver 1.9.1. .SH "SYNOPSIS" .B unbound .RB [ \-h ] Modified: vendor/unbound/dist/doc/unbound.conf.5.in ============================================================================== --- vendor/unbound/dist/doc/unbound.conf.5.in Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/doc/unbound.conf.5.in Sun Jun 30 14:56:56 2019 (r349557) @@ -1,4 +1,4 @@ -.TH "unbound.conf" "5" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound.conf" "5" "Mar 12, 2019" "NLnet Labs" "unbound 1.9.1" .\" .\" unbound.conf.5 -- unbound.conf manual .\" @@ -458,14 +458,15 @@ Alternate syntax for \fBtls\-upstream\fR. If both are file the last is used. .TP .B tls\-service\-key: \fI -If enabled, the server provides TLS service on its TCP sockets. The clients -have to use tls\-upstream: yes. The file is the private key for the TLS -session. The public certificate is in the tls\-service\-pem file. Default -is "", turned off. Requires a restart (a reload is not enough) if changed, -because the private key is read while root permissions are held and before -chroot (if any). Normal DNS TCP service is not provided and gives errors, -this service is best run with a different \fBport:\fR config or \fI@port\fR -suffixes in the \fBinterface\fR config. +If enabled, the server provides TLS service on the TCP ports marked +implicitly or explicitly for TLS service with tls\-port. The file must +contain the private key for the TLS session, the public certificate is in +the tls\-service\-pem file and it must also be specified if tls\-service\-key +is specified. The default is "", turned off. Enabling or disabling +this service requires a restart (a reload is not enough), because the +key is read while root permissions are held and before chroot (if any). +The ports enabled implicitly or explicitly via \fBtls\-port:\fR do not provide +normal DNS TCP service. .TP .B ssl\-service\-key: \fI Alternate syntax for \fBtls\-service\-key\fR. @@ -545,6 +546,7 @@ classless network block. The action can be \fIdeny\fR, \fIallow\fR, \fIallow_setrd\fR, \fIallow_snoop\fR, \fIdeny_non_local\fR or \fIrefuse_non_local\fR. The most specific netblock match is used, if none match \fIdeny\fR is used. +The order of the access\-control statements therefore does not matter. .IP The action \fIdeny\fR stops queries from hosts from that netblock. .IP @@ -929,6 +931,12 @@ Setting this to "iterator" will result in a non\-valid Setting this to "validator iterator" will turn on DNSSEC validation. The ordering of the modules is important. You must also set trust\-anchors for validation to be useful. +The default is "validator iterator". When the server is built with +EDNS client subnet support the default is "subnetcache validator iterator". +Most modules that need to be listed here have to be listed at the beginning +of the line. The cachedb module has to be listed just before the iterator. +The python module can be listed in different places, it then processes the +output of the module it is just before. .TP .B trust\-anchor\-file: \fI File with trusted keys for validation. Both DS and DNSKEY entries can appear @@ -1140,7 +1148,7 @@ address space are not validated. This is usually requ Configure a local zone. The type determines the answer to give if there is no match from local\-data. The types are deny, refuse, static, transparent, redirect, nodefault, typetransparent, inform, inform_deny, -always_transparent, always_refuse, always_nxdomain, noview, +inform_redirect, always_transparent, always_refuse, always_nxdomain, noview, and are explained below. After that the default settings are listed. Use local\-data: to enter data into the local zone. Answers for local zones are authoritative DNS answers. By default the zones are class IN. @@ -1201,6 +1209,10 @@ looking up infected names are logged, eg. to run antiv The query is dropped, like 'deny', and logged, like 'inform'. Ie. find infected machines without answering the queries. .TP 10 +\h'5'\fIinform_redirect\fR +The query is redirected, like 'redirect', and logged, like 'inform'. +Ie. answer queries with fixed data and also log the machines that ask. +.TP 10 \h'5'\fIalways_transparent\fR Like transparent, but ignores local data and resolves normally. .TP 10 @@ -1356,7 +1368,8 @@ TTL can be inserted like this: "2001:DB8::4 7200 www.e Assign tags to localzones. Tagged localzones will only be applied when the used access-control element has a matching tag. Tags must be defined in \fIdefine\-tags\fR. Enclose list of tags in quotes ("") and put spaces between -tags. +tags. When there are multiple tags it checks if the intersection of the +list of tags for the query and local\-zone\-tag is non-empty. .TP 5 .B local\-zone\-override: \fI Override the localzone type for queries from addresses matching netblock. @@ -1614,13 +1627,11 @@ the '@' and '#', the '@' comes first. At high verbosity it logs the TLS certificate, with TLS enabled. If you leave out the '#' and auth name from the forward\-addr, any name is accepted. The cert must also match a CA from the tls\-cert\-bundle. -The cert name match code needs OpenSSL 1.1.0 or later to be enabled. .TP .B forward\-first: \fI -If enabled, a query is attempted without the forward clause if it fails. -The data could not be retrieved and would have caused SERVFAIL because -the servers are unreachable, instead it is tried without this clause. -The default is no. +If a forwarded query is met with a SERVFAIL error, and this option is +enabled, unbound will fall back to normal recursive resolution for this +query as if no query forwarding had been specified. The default is "no". .TP .B forward\-tls\-upstream: \fI Enabled or disable whether the queries to this forwarder use TLS for transport. @@ -1715,7 +1726,9 @@ data (eg. from the master servers). There may be multiple .B view: clauses. Each with a \fBname:\fR and zero or more \fBlocal\-zone\fR and -\fBlocal\-data\fR elements. View can be mapped to requests by specifying the +\fBlocal\-data\fR elements. Views can also contain view\-first, +response\-ip, response\-ip\-data and local\-data\-ptr elements. +View can be mapped to requests by specifying the view name in an \fBaccess\-control\-view\fR element. Options from matching views will override global options. Global options will be used if no matching view is found, or when the matching view does not have the option specified. Modified: vendor/unbound/dist/iterator/iter_fwd.c ============================================================================== --- vendor/unbound/dist/iterator/iter_fwd.c Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/iterator/iter_fwd.c Sun Jun 30 14:56:56 2019 (r349557) @@ -239,7 +239,7 @@ read_fwds_addr(struct config_stub* s, struct delegpt* s->name, p->str); return 0; } -#ifndef HAVE_SSL_SET1_HOST +#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST) if(tls_auth_name) log_err("no name verification functionality in " "ssl library, ignored name for %s", p->str); Modified: vendor/unbound/dist/iterator/iter_hints.c ============================================================================== --- vendor/unbound/dist/iterator/iter_hints.c Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/iterator/iter_hints.c Sun Jun 30 14:56:56 2019 (r349557) @@ -252,7 +252,7 @@ read_stubs_addr(struct config_stub* s, struct delegpt* s->name, p->str); return 0; } -#ifndef HAVE_SSL_SET1_HOST +#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST) if(auth_name) log_err("no name verification functionality in " "ssl library, ignored name for %s", p->str); Modified: vendor/unbound/dist/iterator/iter_utils.c ============================================================================== --- vendor/unbound/dist/iterator/iter_utils.c Sun Jun 30 14:46:15 2019 (r349556) +++ vendor/unbound/dist/iterator/iter_utils.c Sun Jun 30 14:56:56 2019 (r349557) @@ -882,10 +882,35 @@ rrset_equal(struct ub_packed_rrset_key* k1, struct ub_ return 1; } +/** compare rrsets and sort canonically. Compares rrset name, type, class. + * return 0 if equal, +1 if x > y, and -1 if x < y. + */ +static int +rrset_canonical_sort_cmp(const void* x, const void* y) +{ + struct ub_packed_rrset_key* rrx = *(struct ub_packed_rrset_key**)x; + struct ub_packed_rrset_key* rry = *(struct ub_packed_rrset_key**)y; + int r = dname_canonical_compare(rrx->rk.dname, rry->rk.dname); + if(r != 0) + return r; + if(rrx->rk.type != rry->rk.type) { + if(ntohs(rrx->rk.type) > ntohs(rry->rk.type)) + return 1; + else return -1; + } + if(rrx->rk.rrset_class != rry->rk.rrset_class) { + if(ntohs(rrx->rk.rrset_class) > ntohs(rry->rk.rrset_class)) + return 1; + else return -1; + } + return 0; +} + int reply_equal(struct reply_info* p, struct reply_info* q, struct regional* region) { size_t i; + struct ub_packed_rrset_key** sorted_p, **sorted_q; if(p->flags != q->flags || p->qdcount != q->qdcount || /* do not check TTL, this may differ */ @@ -899,16 +924,43 @@ reply_equal(struct reply_info* p, struct reply_info* q p->ar_numrrsets != q->ar_numrrsets || p->rrset_count != q->rrset_count) return 0; + /* sort the rrsets in the authority and additional sections before + * compare, the query and answer sections are ordered in the sequence + * they should have (eg. one after the other for aliases). */ + sorted_p = (struct ub_packed_rrset_key**)regional_alloc_init( + region, p->rrsets, sizeof(*sorted_p)*p->rrset_count); + if(!sorted_p) return 0; + log_assert(p->an_numrrsets + p->ns_numrrsets + p->ar_numrrsets <= + p->rrset_count); + qsort(sorted_p + p->an_numrrsets, p->ns_numrrsets, + sizeof(*sorted_p), rrset_canonical_sort_cmp); + qsort(sorted_p + p->an_numrrsets + p->ns_numrrsets, p->ar_numrrsets, + sizeof(*sorted_p), rrset_canonical_sort_cmp); + + sorted_q = (struct ub_packed_rrset_key**)regional_alloc_init( + region, q->rrsets, sizeof(*sorted_q)*q->rrset_count); + if(!sorted_q) { + regional_free_all(region); + return 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jun 30 14:57:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE5EC15D7ED1; Sun, 30 Jun 2019 14:57:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AFB189366; Sun, 30 Jun 2019 14:57:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 473D6270CF; Sun, 30 Jun 2019 14:57:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UEv9Z9037524; Sun, 30 Jun 2019 14:57:09 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UEv9Pj037523; Sun, 30 Jun 2019 14:57:09 GMT (envelope-from des@FreeBSD.org) Message-Id: <201906301457.x5UEv9Pj037523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 30 Jun 2019 14:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349558 - vendor/unbound/1.9.1 X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/unbound/1.9.1 X-SVN-Commit-Revision: 349558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4AFB189366 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 14:57:13 -0000 Author: des Date: Sun Jun 30 14:57:08 2019 New Revision: 349558 URL: https://svnweb.freebsd.org/changeset/base/349558 Log: Tag Unbound 1.9.1. Added: vendor/unbound/1.9.1/ - copied from r349557, vendor/unbound/dist/ From owner-svn-src-all@freebsd.org Sun Jun 30 15:01:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E27615D8032; Sun, 30 Jun 2019 15:01:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BBA2A89626; Sun, 30 Jun 2019 15:01:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95D6727216; Sun, 30 Jun 2019 15:01:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UF1D7x040763; Sun, 30 Jun 2019 15:01:13 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UF1BQ5040753; Sun, 30 Jun 2019 15:01:11 GMT (envelope-from des@FreeBSD.org) Message-Id: <201906301501.x5UF1BQ5040753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 30 Jun 2019 15:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349559 - in vendor/unbound/dist: . cachedb contrib daemon doc edns-subnet iterator libunbound/python pythonmod pythonmod/doc/examples pythonmod/examples services services/cache testcod... X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: in vendor/unbound/dist: . cachedb contrib daemon doc edns-subnet iterator libunbound/python pythonmod pythonmod/doc/examples pythonmod/examples services services/cache testcode testdata util util/data... X-SVN-Commit-Revision: 349559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BBA2A89626 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 15:01:14 -0000 Author: des Date: Sun Jun 30 15:01:11 2019 New Revision: 349559 URL: https://svnweb.freebsd.org/changeset/base/349559 Log: Vendor import of Unbound 1.9.2. Added: vendor/unbound/dist/.travis.yml vendor/unbound/dist/README.md vendor/unbound/dist/pythonmod/examples/avahi-resolver.py vendor/unbound/dist/testdata/auth_nsec3_ent.rpl Modified: vendor/unbound/dist/.gitignore vendor/unbound/dist/cachedb/cachedb.c vendor/unbound/dist/config.h.in vendor/unbound/dist/configure vendor/unbound/dist/configure.ac vendor/unbound/dist/contrib/fastrpz.patch vendor/unbound/dist/daemon/unbound.c vendor/unbound/dist/daemon/worker.c vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/README vendor/unbound/dist/doc/example.conf.in vendor/unbound/dist/doc/libunbound.3.in vendor/unbound/dist/doc/unbound-anchor.8.in vendor/unbound/dist/doc/unbound-checkconf.8.in vendor/unbound/dist/doc/unbound-control.8.in vendor/unbound/dist/doc/unbound-host.1.in vendor/unbound/dist/doc/unbound.8.in vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/doc/unbound.doxygen vendor/unbound/dist/edns-subnet/subnetmod.c vendor/unbound/dist/iterator/iter_utils.c vendor/unbound/dist/iterator/iter_utils.h vendor/unbound/dist/iterator/iterator.c vendor/unbound/dist/libunbound/python/libunbound.i vendor/unbound/dist/pythonmod/doc/examples/example0-1.py vendor/unbound/dist/pythonmod/doc/examples/example0.rst vendor/unbound/dist/pythonmod/examples/edns.py vendor/unbound/dist/pythonmod/examples/inplace_callbacks.py vendor/unbound/dist/pythonmod/interface.i vendor/unbound/dist/services/authzone.c vendor/unbound/dist/services/authzone.h vendor/unbound/dist/services/cache/dns.c vendor/unbound/dist/services/listen_dnsport.c vendor/unbound/dist/services/mesh.c vendor/unbound/dist/services/outside_network.c vendor/unbound/dist/services/outside_network.h vendor/unbound/dist/testcode/fake_event.c vendor/unbound/dist/testdata/auth_nsec3_wild.rpl vendor/unbound/dist/util/alloc.c vendor/unbound/dist/util/data/msgreply.h vendor/unbound/dist/util/fptr_wlist.c vendor/unbound/dist/util/iana_ports.inc vendor/unbound/dist/util/net_help.c vendor/unbound/dist/util/netevent.c vendor/unbound/dist/util/storage/lookup3.c vendor/unbound/dist/util/ub_event.c Modified: vendor/unbound/dist/.gitignore ============================================================================== --- vendor/unbound/dist/.gitignore Sun Jun 30 14:57:08 2019 (r349558) +++ vendor/unbound/dist/.gitignore Sun Jun 30 15:01:11 2019 (r349559) @@ -4,6 +4,7 @@ /Makefile /autom4te.cache/ /config.h +/config.h.in~ /config.log /config.status /dnstap/dnstap_config.h @@ -18,6 +19,7 @@ /doc/unbound.conf.5 /libtool /libunbound.la +/_unbound.la /smallapp/unbound-control-setup.sh /unbound /unbound-anchor @@ -39,4 +41,14 @@ /contrib/libunbound.pc /contrib/unbound.service /contrib/unbound.socket - +/dnstap/dnstap.pb-c.c +/dnstap/dnstap.pb-c.h +/libunbound/python/libunbound_wrap.c +/libunbound/python/unbound.py +/pythonmod/interface.h +/pythonmod/unboundmodule.py +/testdata/result.* +/testdata/.done-* +/testdata/.perfstats.txt +/doc/html +/doc/xml Added: vendor/unbound/dist/.travis.yml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/unbound/dist/.travis.yml Sun Jun 30 15:01:11 2019 (r349559) @@ -0,0 +1,16 @@ +sudo: false +language: c +compiler: + - gcc +addons: + apt: + packages: + - libssl-dev + - libevent-dev + - libexpat-dev + - clang +script: + - ./configure --enable-debug --disable-flto + - make + - make test + - (cd testdata/clang-analysis.tdir; bash clang-analysis.test) Added: vendor/unbound/dist/README.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/unbound/dist/README.md Sun Jun 30 15:01:11 2019 (r349559) @@ -0,0 +1,37 @@ +# Unbound + +[![Travis Build Status](https://travis-ci.org/NLnetLabs/unbound.svg?branch=master)](https://travis-ci.org/NLnetLabs/unbound) +[![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) + +Unbound is a validating, recursive, caching DNS resolver. It is designed to be +fast and lean and incorporates modern features based on open standards. If you +have any feedback, we would love to hear from you. Don’t hesitate to +[create an issue on Github](https://github.com/NLnetLabs/unbound/issues/new) +or post a message on the [Unbound mailing list](https://nlnetlabs.nl/mailman/listinfo/unbound-users). +You can lean more about Unbound by reading our +[documentation](https://nlnetlabs.nl/documentation/unbound/). + +## Compiling + +Make sure you have the C toolchain, OpenSSL and its include files, and libexpat +installed. Unbound can be compiled and installed using: + +``` +./configure && make && make install +``` + +You can use libevent if you want. libevent is useful when using many (10000) +outgoing ports. By default max 256 ports are opened at the same time and the +builtin alternative is equally capable and a little faster. + +Use the `--with-libevent=dir` configure option to compile Unbound with libevent +support. + +## Unbound configuration + +All of Unbound's configuration options are described in the man pages, which +will be installed and are available on the Unbound +[documentation page](https://nlnetlabs.nl/documentation/unbound/). + +An example configuration file is located in +[doc/example.conf](https://github.com/NLnetLabs/unbound/blob/master/doc/example.conf.in). Modified: vendor/unbound/dist/cachedb/cachedb.c ============================================================================== --- vendor/unbound/dist/cachedb/cachedb.c Sun Jun 30 14:57:08 2019 (r349558) +++ vendor/unbound/dist/cachedb/cachedb.c Sun Jun 30 15:01:11 2019 (r349559) @@ -72,6 +72,19 @@ # define be64toh(x) OSSwapBigToHostInt64(x) #endif +/* Some compilers do not define __BYTE_ORDER__, like IBM XLC on AIX */ +#ifndef be64toh +#if defined(__sun) || defined(_AIX) +# if __BIG_ENDIAN__ +# define be64toh(n) (n) +# define htobe64(n) (n) +# else +# define be64toh(n) (((uint64_t)htonl((n) & 0xFFFFFFFF) << 32) | htonl((n) >> 32)) +# define htobe64(n) (((uint64_t)htonl((n) & 0xFFFFFFFF) << 32) | htonl((n) >> 32)) +# endif +#endif +#endif /* be64toh */ + /** the unit test testframe for cachedb, its module state contains * a cache for a couple queries (in memory). */ struct testframe_moddata { Modified: vendor/unbound/dist/config.h.in ============================================================================== --- vendor/unbound/dist/config.h.in Sun Jun 30 14:57:08 2019 (r349558) +++ vendor/unbound/dist/config.h.in Sun Jun 30 15:01:11 2019 (r349559) @@ -86,6 +86,10 @@ if you don't. */ #undef HAVE_DECL_ARC4RANDOM_UNIFORM +/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if + you don't. */ +#undef HAVE_DECL_EVSIGNAL_ASSIGN + /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you don't. */ #undef HAVE_DECL_INET_NTOP @@ -166,6 +170,9 @@ /* Define to 1 if you have the `ERR_load_crypto_strings' function. */ #undef HAVE_ERR_LOAD_CRYPTO_STRINGS +/* Define to 1 if you have the `event_assign' function. */ +#undef HAVE_EVENT_ASSIGN + /* Define to 1 if you have the `event_base_free' function. */ #undef HAVE_EVENT_BASE_FREE @@ -406,7 +413,7 @@ /* Define to 1 if you have the `RAND_cleanup' function. */ #undef HAVE_RAND_CLEANUP -/* Define to 1 if you have the `reallocarray' function. */ +/* If we have reallocarray(3) */ #undef HAVE_REALLOCARRAY /* Define to 1 if you have the `recvmsg' function. */ @@ -965,8 +972,14 @@ +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif + #ifndef UNBOUND_DEBUG +# ifndef NDEBUG # define NDEBUG +# endif #endif /** Use small-ldns codebase */ Modified: vendor/unbound/dist/configure ============================================================================== --- vendor/unbound/dist/configure Sun Jun 30 14:57:08 2019 (r349558) +++ vendor/unbound/dist/configure Sun Jun 30 15:01:11 2019 (r349559) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.9.1. +# Generated by GNU Autoconf 2.69 for unbound 1.9.2. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.9.1' -PACKAGE_STRING='unbound 1.9.1' +PACKAGE_VERSION='1.9.2' +PACKAGE_STRING='unbound 1.9.2' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -1440,7 +1440,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.9.1 to adapt to many kinds of systems. +\`configure' configures unbound 1.9.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1505,7 +1505,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.9.1:";; + short | recursive ) echo "Configuration of unbound 1.9.2:";; esac cat <<\_ACEOF @@ -1722,7 +1722,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.9.1 +unbound configure 1.9.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2431,7 +2431,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.9.1, which was +It was created by unbound $as_me 1.9.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2783,11 +2783,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=9 -UNBOUND_VERSION_MICRO=1 +UNBOUND_VERSION_MICRO=2 LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=1 +LIBUNBOUND_REVISION=2 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2856,6 +2856,7 @@ LIBUNBOUND_AGE=1 # 1.8.3 had 8:3:0 # 1.9.0 had 9:0:1 # add ub_ctx_set_tls # 1.9.1 had 9:1:1 +# 1.9.2 had 9:2:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -19012,6 +19013,35 @@ _ACEOF fi done # only in libev. (tested on 4.00) + for ac_func in event_assign +do : + ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign" +if test "x$ac_cv_func_event_assign" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EVENT_ASSIGN 1 +_ACEOF + +fi +done + # in libevent, for thread-safety + ac_fn_c_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default +#ifdef HAVE_EVENT_H +# include +#else +# include \"event2/event.h\" +#endif + +" +if test "x$ac_cv_have_decl_evsignal_assign" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl +_ACEOF + PC_LIBEVENT_DEPENDENCY="libevent" if test -n "$BAK_LDFLAGS_SET"; then @@ -20114,20 +20144,44 @@ fi LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS" -ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray" -if test "x$ac_cv_func_reallocarray" = xyes; then : - $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5 +$as_echo_n "checking for reallocarray... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif +#include +int main(void) { + void* p = reallocarray(NULL, 10, 100); + free(p); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h + + else - case " $LIBOBJS " in + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + case " $LIBOBJS " in *" reallocarray.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext" ;; esac -fi - +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$USE_NSS" = "no"; then ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random" if test "x$ac_cv_func_arc4random" = xyes; then : @@ -21150,7 +21204,7 @@ _ACEOF -version=1.9.1 +version=1.9.2 date=`date +'%b %e, %Y'` @@ -21669,7 +21723,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.9.1, which was +This file was extended by unbound $as_me 1.9.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21735,7 +21789,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.9.1 +unbound config.status 1.9.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/unbound/dist/configure.ac ============================================================================== --- vendor/unbound/dist/configure.ac Sun Jun 30 14:57:08 2019 (r349558) +++ vendor/unbound/dist/configure.ac Sun Jun 30 15:01:11 2019 (r349559) @@ -11,14 +11,14 @@ sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[9]) -m4_define([VERSION_MICRO],[1]) +m4_define([VERSION_MICRO],[2]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=1 +LIBUNBOUND_REVISION=2 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -87,6 +87,7 @@ LIBUNBOUND_AGE=1 # 1.8.3 had 8:3:0 # 1.9.0 had 9:0:1 # add ub_ctx_set_tls # 1.9.1 had 9:1:1 +# 1.9.2 had 9:2:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -1199,6 +1200,14 @@ large outgoing port ranges. ]) AC_CHECK_FUNCS([event_base_get_method]) # only in libevent 1.4.3 and later AC_CHECK_FUNCS([ev_loop]) # only in libev. (tested on 3.51) AC_CHECK_FUNCS([ev_default_loop]) # only in libev. (tested on 4.00) + AC_CHECK_FUNCS([event_assign]) # in libevent, for thread-safety + AC_CHECK_DECLS([evsignal_assign], [], [], [AC_INCLUDES_DEFAULT +#ifdef HAVE_EVENT_H +# include +#else +# include "event2/event.h" +#endif + ]) PC_LIBEVENT_DEPENDENCY="libevent" AC_SUBST(PC_LIBEVENT_DEPENDENCY) if test -n "$BAK_LDFLAGS_SET"; then @@ -1438,7 +1447,24 @@ AC_REPLACE_FUNCS(explicit_bzero) dnl without CTIME, ARC4-functions and without reallocarray. LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS" AC_SUBST(LIBOBJ_WITHOUT_CTIMEARC4) -AC_REPLACE_FUNCS(reallocarray) +AC_MSG_CHECKING([for reallocarray]) +AC_LINK_IFELSE([AC_LANG_SOURCE(AC_INCLUDES_DEFAULT +[[ +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif +#include +int main(void) { + void* p = reallocarray(NULL, 10, 100); + free(p); + return 0; +} +]])], [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_REALLOCARRAY, 1, [If we have reallocarray(3)]) +], [ + AC_MSG_RESULT(no) + AC_LIBOBJ(reallocarray) +]) if test "$USE_NSS" = "no"; then AC_REPLACE_FUNCS(arc4random) AC_REPLACE_FUNCS(arc4random_uniform) @@ -1651,8 +1677,14 @@ AHX_CONFIG_EXT_FLAGS dnl includes [ +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif + #ifndef UNBOUND_DEBUG +# ifndef NDEBUG # define NDEBUG +# endif #endif /** Use small-ldns codebase */ Modified: vendor/unbound/dist/contrib/fastrpz.patch ============================================================================== --- vendor/unbound/dist/contrib/fastrpz.patch Sun Jun 30 14:57:08 2019 (r349558) +++ vendor/unbound/dist/contrib/fastrpz.patch Sun Jun 30 15:01:11 2019 (r349559) @@ -1,11 +1,11 @@ Description: based on the included patch contrib/fastrpz.patch Author: fastrpz@farsightsecurity.com --- -Index: unboundfastrpz/Makefile.in -=================================================================== ---- unboundfastrpz/Makefile.in (revision 5073) -+++ unboundfastrpz/Makefile.in (working copy) -@@ -23,6 +23,8 @@ +diff --git a/Makefile.in b/Makefile.in +index 03a6347..6758bea 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -23,6 +23,8 @@ CHECKLOCK_SRC=testcode/checklocks.c CHECKLOCK_OBJ=@CHECKLOCK_OBJ@ DNSTAP_SRC=@DNSTAP_SRC@ DNSTAP_OBJ=@DNSTAP_OBJ@ @@ -14,7 +14,7 @@ Index: unboundfastrpz/Makefile.in DNSCRYPT_SRC=@DNSCRYPT_SRC@ DNSCRYPT_OBJ=@DNSCRYPT_OBJ@ WITH_PYTHONMODULE=@WITH_PYTHONMODULE@ -@@ -126,7 +128,7 @@ +@@ -126,7 +128,7 @@ validator/val_sigcrypt.c validator/val_utils.c dns64/dns64.c \ edns-subnet/edns-subnet.c edns-subnet/subnetmod.c \ edns-subnet/addrtree.c edns-subnet/subnet-whitelist.c \ cachedb/cachedb.c cachedb/redis.c respip/respip.c $(CHECKLOCK_SRC) \ @@ -23,7 +23,7 @@ Index: unboundfastrpz/Makefile.in COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ -@@ -139,7 +141,7 @@ +@@ -139,7 +141,7 @@ autotrust.lo val_anchor.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo cachedb.lo redis.lo authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ @@ -32,7 +32,7 @@ Index: unboundfastrpz/Makefile.in COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo -@@ -405,6 +407,11 @@ +@@ -405,6 +407,11 @@ dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h \ $(srcdir)/util/config_file.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h @@ -44,11 +44,11 @@ Index: unboundfastrpz/Makefile.in # Python Module pythonmod.lo pythonmod.o: $(srcdir)/pythonmod/pythonmod.c config.h \ pythonmod/interface.h \ -Index: unboundfastrpz/config.h.in -=================================================================== ---- unboundfastrpz/config.h.in (revision 5073) -+++ unboundfastrpz/config.h.in (working copy) -@@ -1293,4 +1293,11 @@ +diff --git a/config.h.in b/config.h.in +index 74c14d1..a18f4ff 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -1305,4 +1305,11 @@ void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, /** the version of unbound-control that this software implements */ #define UNBOUND_CONTROL_VERSION 1 @@ -61,11 +61,11 @@ Index: unboundfastrpz/config.h.in +#undef FASTRPZ_LIB_OPEN +/** turn on fastrpz response policy zones */ +#undef ENABLE_FASTRPZ -Index: unboundfastrpz/configure.ac -=================================================================== ---- unboundfastrpz/configure.ac (revision 5073) -+++ unboundfastrpz/configure.ac (working copy) -@@ -6,6 +6,7 @@ +diff --git a/configure.ac b/configure.ac +index abbecf0..6454274 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -6,6 +6,7 @@ sinclude(ax_pthread.m4) sinclude(acx_python.m4) sinclude(ac_pkg_swig.m4) sinclude(dnstap/dnstap.m4) @@ -73,7 +73,7 @@ Index: unboundfastrpz/configure.ac sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing -@@ -1575,6 +1576,9 @@ +@@ -1586,6 +1587,9 @@ case "$enable_ipsecmod" in ;; esac @@ -83,10 +83,10 @@ Index: unboundfastrpz/configure.ac AC_MSG_CHECKING([if ${MAKE:-make} supports $< with implicit rule in scope]) # on openBSD, the implicit rule make $< work. # on Solaris, it does not work ($? is changed sources, $^ lists dependencies). -Index: unboundfastrpz/daemon/daemon.c -=================================================================== ---- unboundfastrpz/daemon/daemon.c (revision 5073) -+++ unboundfastrpz/daemon/daemon.c (working copy) +diff --git a/daemon/daemon.c b/daemon/daemon.c +index 7461a26..706f8f6 100644 +--- a/daemon/daemon.c ++++ b/daemon/daemon.c @@ -91,6 +91,9 @@ #include "sldns/keyraw.h" #include "respip/respip.h" @@ -97,36 +97,36 @@ Index: unboundfastrpz/daemon/daemon.c #ifdef HAVE_SYSTEMD #include -@@ -462,6 +465,14 @@ +@@ -460,6 +463,14 @@ daemon_create_workers(struct daemon* daemon) + dt_apply_cfg(daemon->dtenv, daemon->cfg); + #else fatal_exit("dnstap enabled in config but not built with dnstap support"); - #endif - } ++#endif ++ } + if(daemon->cfg->rpz_enable) { +#ifdef ENABLE_FASTRPZ + rpz_init(&daemon->rpz_clist, &daemon->rpz_client, daemon->cfg); +#else + fatal_exit("fastrpz enabled in config" + " but not built with fastrpz"); -+#endif -+ } + #endif + } for(i=0; inum; i++) { - if(!(daemon->workers[i] = worker_create(daemon, i, - shufport+numport*i/daemon->num, -@@ -719,6 +730,9 @@ +@@ -718,6 +729,9 @@ daemon_cleanup(struct daemon* daemon) + #ifdef USE_DNSCRYPT dnsc_delete(daemon->dnscenv); daemon->dnscenv = NULL; - #endif ++#endif +#ifdef ENABLE_FASTRPZ + rpz_delete(&daemon->rpz_clist, &daemon->rpz_client); -+#endif + #endif daemon->cfg = NULL; } - -Index: unboundfastrpz/daemon/daemon.h -=================================================================== ---- unboundfastrpz/daemon/daemon.h (revision 5073) -+++ unboundfastrpz/daemon/daemon.h (working copy) -@@ -136,6 +136,11 @@ +diff --git a/daemon/daemon.h b/daemon/daemon.h +index 5749dbe..64ce230 100644 +--- a/daemon/daemon.h ++++ b/daemon/daemon.h +@@ -136,6 +136,11 @@ struct daemon { /** the dnscrypt environment */ struct dnsc_env* dnscenv; #endif @@ -138,10 +138,10 @@ Index: unboundfastrpz/daemon/daemon.h }; /** -Index: unboundfastrpz/daemon/worker.c -=================================================================== ---- unboundfastrpz/daemon/worker.c (revision 5073) -+++ unboundfastrpz/daemon/worker.c (working copy) +diff --git a/daemon/worker.c b/daemon/worker.c +index fc93817..e435226 100644 +--- a/daemon/worker.c ++++ b/daemon/worker.c @@ -75,6 +75,9 @@ #include "libunbound/context.h" #include "libunbound/libworker.h" @@ -152,7 +152,7 @@ Index: unboundfastrpz/daemon/worker.c #include "sldns/wire2str.h" #include "util/shm_side/shm_main.h" #include "dnscrypt/dnscrypt.h" -@@ -533,8 +536,27 @@ +@@ -533,8 +536,27 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo, /* not secure */ secure = 0; break; @@ -180,7 +180,7 @@ Index: unboundfastrpz/daemon/worker.c /* return this delegation from the cache */ edns_bak = *edns; edns->edns_version = EDNS_ADVERTISED_VERSION; -@@ -702,6 +724,23 @@ +@@ -699,6 +721,23 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, secure = 0; } } else secure = 0; @@ -204,7 +204,7 @@ Index: unboundfastrpz/daemon/worker.c edns_bak = *edns; edns->edns_version = EDNS_ADVERTISED_VERSION; -@@ -1407,6 +1446,15 @@ +@@ -1409,6 +1448,15 @@ worker_handle_request(struct comm_point* c, void* arg, int error, log_addr(VERB_ALGO, "refused nonrec (cache snoop) query from", &repinfo->addr, repinfo->addrlen); goto send_reply; @@ -220,7 +220,7 @@ Index: unboundfastrpz/daemon/worker.c } /* If we've found a local alias, replace the qname with the alias -@@ -1455,12 +1503,21 @@ +@@ -1457,12 +1505,21 @@ lookup_cache: h = query_info_hash(lookup_qinfo, sldns_buffer_read_u16_at(c->buffer, 2)); if((e=slabhash_lookup(worker->env.msg_cache, h, lookup_qinfo, 0))) { /* answer from cache - we have acquired a readlock on it */ @@ -244,7 +244,7 @@ Index: unboundfastrpz/daemon/worker.c /* prefetch it if the prefetch TTL expired. * Note that if there is more than one pass * its qname must be that used for cache -@@ -1514,11 +1571,19 @@ +@@ -1516,11 +1573,19 @@ lookup_cache: lock_rw_unlock(&e->lock); } if(!LDNS_RD_WIRE(sldns_buffer_begin(c->buffer))) { @@ -266,11 +266,11 @@ Index: unboundfastrpz/daemon/worker.c goto send_reply; } verbose(VERB_ALGO, "answer norec from cache -- " -Index: unboundfastrpz/doc/unbound.conf.5.in -=================================================================== ---- unboundfastrpz/doc/unbound.conf.5.in (revision 5073) -+++ unboundfastrpz/doc/unbound.conf.5.in (working copy) -@@ -1781,6 +1781,81 @@ +diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in +index c14ee27..0b71eaf 100644 +--- a/doc/unbound.conf.5.in ++++ b/doc/unbound.conf.5.in +@@ -1795,6 +1795,81 @@ List domain for which the AAAA records are ignored and the A record is used by dns64 processing instead. Can be entered multiple times, list a new domain for which it applies, one per line. Applies also to names underneath the name given. @@ -352,10 +352,11 @@ Index: unboundfastrpz/doc/unbound.conf.5.in .SS "DNSCrypt Options" .LP The -Index: unboundfastrpz/fastrpz/librpz.h -=================================================================== ---- unboundfastrpz/fastrpz/librpz.h (nonexistent) -+++ unboundfastrpz/fastrpz/librpz.h (working copy) +diff --git a/fastrpz/librpz.h b/fastrpz/librpz.h +new file mode 100644 +index 0000000..645279d +--- /dev/null ++++ b/fastrpz/librpz.h @@ -0,0 +1,957 @@ +/* + * Define the interface from a DNS resolver to the Response Policy Zone @@ -1314,10 +1315,11 @@ Index: unboundfastrpz/fastrpz/librpz.h +#endif /* LIBRPZ_LIB_OPEN */ + +#endif /* LIBRPZ_H */ -Index: unboundfastrpz/fastrpz/rpz.c -=================================================================== ---- unboundfastrpz/fastrpz/rpz.c (nonexistent) -+++ unboundfastrpz/fastrpz/rpz.c (working copy) +diff --git a/fastrpz/rpz.c b/fastrpz/rpz.c +new file mode 100644 +index 0000000..c5ab780 +--- /dev/null ++++ b/fastrpz/rpz.c @@ -0,0 +1,1352 @@ +/* + * fastrpz/rpz.c - interface to the fastrpz response policy zone library @@ -2671,10 +2673,11 @@ Index: unboundfastrpz/fastrpz/rpz.c +} + +#endif /* ENABLE_FASTRPZ */ -Index: unboundfastrpz/fastrpz/rpz.h -=================================================================== ---- unboundfastrpz/fastrpz/rpz.h (nonexistent) -+++ unboundfastrpz/fastrpz/rpz.h (working copy) +diff --git a/fastrpz/rpz.h b/fastrpz/rpz.h +new file mode 100644 +index 0000000..5d7e31c +--- /dev/null ++++ b/fastrpz/rpz.h @@ -0,0 +1,138 @@ +/* + * fastrpz/rpz.h - interface to the fastrpz response policy zone library @@ -2814,10 +2817,11 @@ Index: unboundfastrpz/fastrpz/rpz.h + +#endif /* ENABLE_FASTRPZ */ +#endif /* UNBOUND_FASTRPZ_RPZ_H */ -Index: unboundfastrpz/fastrpz/rpz.m4 -=================================================================== ---- unboundfastrpz/fastrpz/rpz.m4 (nonexistent) -+++ unboundfastrpz/fastrpz/rpz.m4 (working copy) +diff --git a/fastrpz/rpz.m4 b/fastrpz/rpz.m4 +new file mode 100644 +index 0000000..2123535 +--- /dev/null ++++ b/fastrpz/rpz.m4 @@ -0,0 +1,64 @@ +# fastrpz/rpz.m4 + @@ -2883,10 +2887,10 @@ Index: unboundfastrpz/fastrpz/rpz.m4 + AC_MSG_WARN([[dlopen and librpz.so needed for fastrpz]]) + fi +]) -Index: unboundfastrpz/iterator/iterator.c -=================================================================== ---- unboundfastrpz/iterator/iterator.c (revision 5073) -+++ unboundfastrpz/iterator/iterator.c (working copy) +diff --git a/iterator/iterator.c b/iterator/iterator.c +index c906c27..55bf218 100644 +--- a/iterator/iterator.c ++++ b/iterator/iterator.c @@ -68,6 +68,9 @@ #include "sldns/str2wire.h" #include "sldns/parseutil.h" @@ -2897,7 +2901,7 @@ Index: unboundfastrpz/iterator/iterator.c /* in msec */ int UNKNOWN_SERVER_NICENESS = 376; -@@ -551,6 +554,23 @@ +@@ -551,6 +554,23 @@ handle_cname_response(struct module_qstate* qstate, struct iter_qstate* iq, if(ntohs(r->rk.type) == LDNS_RR_TYPE_CNAME && query_dname_compare(*mname, r->rk.dname) == 0 && !iter_find_rrset_in_prepend_answer(iq, r)) { @@ -2921,7 +2925,7 @@ Index: unboundfastrpz/iterator/iterator.c /* Add this relevant CNAME rrset to the prepend list.*/ if(!iter_add_prepend_answer(qstate, iq, r)) return 0; -@@ -559,6 +579,9 @@ +@@ -559,6 +579,9 @@ handle_cname_response(struct module_qstate* qstate, struct iter_qstate* iq, /* Other rrsets in the section are ignored. */ } @@ -2931,7 +2935,7 @@ Index: unboundfastrpz/iterator/iterator.c /* add authority rrsets to authority prepend, for wildcarded CNAMEs */ for(i=msg->rep->an_numrrsets; irep->an_numrrsets + msg->rep->ns_numrrsets; i++) { -@@ -1195,6 +1218,7 @@ +@@ -1195,6 +1218,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, uint8_t* delname; size_t delnamelen; struct dns_msg* msg = NULL; @@ -2939,7 +2943,7 @@ Index: unboundfastrpz/iterator/iterator.c log_query_info(VERB_DETAIL, "resolving", &qstate->qinfo); /* check effort */ -@@ -1281,8 +1305,7 @@ +@@ -1281,8 +1305,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, } if(msg) { /* handle positive cache response */ @@ -2949,7 +2953,7 @@ Index: unboundfastrpz/iterator/iterator.c if(verbosity >= VERB_ALGO) { log_dns_msg("msg from cache lookup", &msg->qinfo, msg->rep); -@@ -1290,7 +1313,22 @@ +@@ -1290,7 +1313,22 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, (int)msg->rep->ttl, (int)msg->rep->prefetch_ttl); } @@ -2972,7 +2976,7 @@ Index: unboundfastrpz/iterator/iterator.c if(type == RESPONSE_TYPE_CNAME) { uint8_t* sname = 0; size_t slen = 0; -@@ -2694,6 +2732,62 @@ +@@ -2714,6 +2752,62 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, sock_list_insert(&qstate->reply_origin, &qstate->reply->addr, qstate->reply->addrlen, qstate->region); @@ -3035,7 +3039,7 @@ Index: unboundfastrpz/iterator/iterator.c if(iq->minimisation_state != DONOT_MINIMISE_STATE && !(iq->chase_flags & BIT_RD)) { if(FLAGS_GET_RCODE(iq->response->rep->flags) != -@@ -3440,6 +3534,10 @@ +@@ -3467,12 +3561,44 @@ processFinished(struct module_qstate* qstate, struct iter_qstate* iq, * but only if we did recursion. The nonrecursion referral * from cache does not need to be stored in the msg cache. */ if(!qstate->no_cache_store && qstate->query_flags&BIT_RD) { @@ -3046,7 +3050,6 @@ Index: unboundfastrpz/iterator/iterator.c iter_dns_store(qstate->env, &qstate->qinfo, iq->response->rep, 0, qstate->prefetch_leeway, iq->dp&&iq->dp->has_parent_side_NS, -@@ -3446,6 +3544,34 @@ qstate->region, qstate->query_flags); } } @@ -3081,11 +3084,11 @@ Index: unboundfastrpz/iterator/iterator.c qstate->return_rcode = LDNS_RCODE_NOERROR; qstate->return_msg = iq->response; return 0; -Index: unboundfastrpz/iterator/iterator.h -=================================================================== ---- unboundfastrpz/iterator/iterator.h (revision 5073) -+++ unboundfastrpz/iterator/iterator.h (working copy) -@@ -386,6 +386,16 @@ +diff --git a/iterator/iterator.h b/iterator/iterator.h +index a2f1b57..e1e4a73 100644 +--- a/iterator/iterator.h ++++ b/iterator/iterator.h +@@ -386,6 +386,16 @@ struct iter_qstate { */ int minimise_count; @@ -3102,11 +3105,11 @@ Index: unboundfastrpz/iterator/iterator.h /** * Count number of time-outs. Used to prevent resolving failures when * the QNAME minimisation QTYPE is blocked. */ -Index: unboundfastrpz/services/cache/dns.c -=================================================================== ---- unboundfastrpz/services/cache/dns.c (revision 5073) -+++ unboundfastrpz/services/cache/dns.c (working copy) -@@ -939,6 +939,14 @@ +diff --git a/services/cache/dns.c b/services/cache/dns.c +index aa4efec..5dd3412 100644 +--- a/services/cache/dns.c ++++ b/services/cache/dns.c +@@ -945,6 +945,14 @@ dns_cache_store(struct module_env* env, struct query_info* msgqinf, struct regional* region, uint32_t flags) { struct reply_info* rep = NULL; @@ -3121,10 +3124,10 @@ Index: unboundfastrpz/services/cache/dns.c /* alloc, malloc properly (not in region, like msg is) */ rep = reply_info_copy(msgrep, env->alloc, NULL); if(!rep) -Index: unboundfastrpz/services/mesh.c -=================================================================== ---- unboundfastrpz/services/mesh.c (revision 5073) -+++ unboundfastrpz/services/mesh.c (working copy) +diff --git a/services/mesh.c b/services/mesh.c +index d96289e..2e9f267 100644 +--- a/services/mesh.c ++++ b/services/mesh.c @@ -60,6 +60,9 @@ #include "sldns/wire2str.h" #include "services/localzone.h" @@ -3135,7 +3138,7 @@ Index: unboundfastrpz/services/mesh.c #include "respip/respip.h" #include "services/listen_dnsport.h" -@@ -1072,6 +1075,13 @@ +@@ -1072,6 +1075,13 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep, else secure = 0; if(!rep && rcode == LDNS_RCODE_NOERROR) rcode = LDNS_RCODE_SERVFAIL; @@ -3149,7 +3152,7 @@ Index: unboundfastrpz/services/mesh.c /* send the reply */ /* We don't reuse the encoded answer if either the previous or current * response has a local alias. We could compare the alias records -@@ -1247,6 +1257,7 @@ +@@ -1247,6 +1257,7 @@ struct mesh_state* mesh_area_find(struct mesh_area* mesh, key.s.is_valrec = valrec; key.s.qinfo = *qinfo; key.s.query_flags = qflags; @@ -3157,7 +3160,7 @@ Index: unboundfastrpz/services/mesh.c /* We are searching for a similar mesh state when we DO want to * aggregate the state. Thus unique is set to NULL. (default when we * desire aggregation).*/ -@@ -1293,6 +1304,10 @@ +@@ -1293,6 +1304,10 @@ int mesh_state_add_reply(struct mesh_state* s, struct edns_data* edns, if(!r) return 0; r->query_reply = *rep; @@ -3168,11 +3171,11 @@ Index: unboundfastrpz/services/mesh.c r->edns = *edns; if(edns->opt_list) { r->edns.opt_list = edns_opt_copy_region(edns->opt_list, -Index: unboundfastrpz/util/config_file.c -=================================================================== ---- unboundfastrpz/util/config_file.c (revision 5073) -+++ unboundfastrpz/util/config_file.c (working copy) -@@ -1418,6 +1418,8 @@ +diff --git a/util/config_file.c b/util/config_file.c +index 9b60254..d791f8f 100644 +--- a/util/config_file.c ++++ b/util/config_file.c +@@ -1418,6 +1418,8 @@ config_delete(struct config_file* cfg) free(cfg->dnstap_socket_path); free(cfg->dnstap_identity); free(cfg->dnstap_version); @@ -3181,11 +3184,11 @@ Index: unboundfastrpz/util/config_file.c config_deldblstrlist(cfg->ratelimit_for_domain); config_deldblstrlist(cfg->ratelimit_below_domain); #ifdef USE_IPSECMOD -Index: unboundfastrpz/util/config_file.h -=================================================================== ---- unboundfastrpz/util/config_file.h (revision 5073) -+++ unboundfastrpz/util/config_file.h (working copy) -@@ -490,6 +490,11 @@ +diff --git a/util/config_file.h b/util/config_file.h +index 3cffdbf..e0fa1c8 100644 +--- a/util/config_file.h ++++ b/util/config_file.h +@@ -490,6 +490,11 @@ struct config_file { /** true to disable DNSSEC lameness check in iterator */ int disable_dnssec_lame_check; @@ -3197,11 +3200,11 @@ Index: unboundfastrpz/util/config_file.h /** ratelimit for ip addresses. 0 is off, otherwise qps (unless overridden) */ int ip_ratelimit; /** number of slabs for ip_ratelimit cache */ -Index: unboundfastrpz/util/configlexer.lex -=================================================================== ---- unboundfastrpz/util/configlexer.lex (revision 5073) -+++ unboundfastrpz/util/configlexer.lex (working copy) -@@ -439,6 +439,10 @@ +diff --git a/util/configlexer.lex b/util/configlexer.lex +index 16b5bc5..038045d 100644 +--- a/util/configlexer.lex ++++ b/util/configlexer.lex +@@ -439,6 +439,10 @@ dnstap-log-forwarder-query-messages{COLON} { YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES) } dnstap-log-forwarder-response-messages{COLON} { YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES) } @@ -3212,11 +3215,11 @@ Index: unboundfastrpz/util/configlexer.lex disable-dnssec-lame-check{COLON} { YDVAR(1, VAR_DISABLE_DNSSEC_LAME_CHECK) } ip-ratelimit{COLON} { YDVAR(1, VAR_IP_RATELIMIT) } ratelimit{COLON} { YDVAR(1, VAR_RATELIMIT) } -Index: unboundfastrpz/util/configparser.y -=================================================================== ---- unboundfastrpz/util/configparser.y (revision 5073) -+++ unboundfastrpz/util/configparser.y (working copy) -@@ -125,6 +125,7 @@ +diff --git a/util/configparser.y b/util/configparser.y +index c7b9169..bef15b5 100644 +--- a/util/configparser.y ++++ b/util/configparser.y +@@ -125,6 +125,7 @@ extern struct config_parser_state* cfg_parser; %token VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES %token VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES %token VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES @@ -3224,7 +3227,7 @@ Index: unboundfastrpz/util/configparser.y %token VAR_RESPONSE_IP_TAG VAR_RESPONSE_IP VAR_RESPONSE_IP_DATA %token VAR_HARDEN_ALGO_DOWNGRADE VAR_IP_TRANSPARENT %token VAR_DISABLE_DNSSEC_LAME_CHECK -@@ -170,7 +171,7 @@ +@@ -170,7 +171,7 @@ extern struct config_parser_state* cfg_parser; %% toplevelvars: /* empty */ | toplevelvars toplevelvar ; @@ -3233,7 +3236,7 @@ Index: unboundfastrpz/util/configparser.y forwardstart contents_forward | pythonstart contents_py | rcstart contents_rc | dtstart contents_dt | viewstart contents_view | dnscstart contents_dnsc | cachedbstart contents_cachedb | -@@ -2708,6 +2709,50 @@ +@@ -2710,6 +2711,50 @@ dt_dnstap_log_forwarder_response_messages: VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MES free($2); } ; @@ -3284,11 +3287,11 @@ Index: unboundfastrpz/util/configparser.y pythonstart: VAR_PYTHON { OUTYY(("\nP(python:)\n")); -Index: unboundfastrpz/util/data/msgencode.c -=================================================================== ---- unboundfastrpz/util/data/msgencode.c (revision 5073) -+++ unboundfastrpz/util/data/msgencode.c (working copy) -@@ -590,6 +590,35 @@ +diff --git a/util/data/msgencode.c b/util/data/msgencode.c +index 4c0a555..e51e9b8 100644 +--- a/util/data/msgencode.c ++++ b/util/data/msgencode.c +@@ -590,6 +590,35 @@ insert_section(struct reply_info* rep, size_t num_rrsets, uint16_t* num_rrs, return RETVAL_OK; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jun 30 15:01:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8883A15D8054; Sun, 30 Jun 2019 15:01:21 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 274C489676; Sun, 30 Jun 2019 15:01:21 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 068002721B; Sun, 30 Jun 2019 15:01:20 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UF1Jsp040814; Sun, 30 Jun 2019 15:01:19 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UF1JaG040813; Sun, 30 Jun 2019 15:01:19 GMT (envelope-from des@FreeBSD.org) Message-Id: <201906301501.x5UF1JaG040813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 30 Jun 2019 15:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349560 - vendor/unbound/1.9.2 X-SVN-Group: vendor X-SVN-Commit-Author: des X-SVN-Commit-Paths: vendor/unbound/1.9.2 X-SVN-Commit-Revision: 349560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 274C489676 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 15:01:21 -0000 Author: des Date: Sun Jun 30 15:01:19 2019 New Revision: 349560 URL: https://svnweb.freebsd.org/changeset/base/349560 Log: Tag Unbound 1.9.2. Added: vendor/unbound/1.9.2/ - copied from r349559, vendor/unbound/dist/ From owner-svn-src-all@freebsd.org Sun Jun 30 17:03:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D409715DA669; Sun, 30 Jun 2019 17:03:15 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 769B78DBDD; Sun, 30 Jun 2019 17:03:15 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D09B719; Sun, 30 Jun 2019 17:03:15 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UH3FKZ006623; Sun, 30 Jun 2019 17:03:15 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UH3F6F006622; Sun, 30 Jun 2019 17:03:15 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201906301703.x5UH3F6F006622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Sun, 30 Jun 2019 17:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349561 - head/libexec/rtld-elf/rtld-libc X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/libexec/rtld-elf/rtld-libc X-SVN-Commit-Revision: 349561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 769B78DBDD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 17:03:16 -0000 Author: arichardson Date: Sun Jun 30 17:03:14 2019 New Revision: 349561 URL: https://svnweb.freebsd.org/changeset/base/349561 Log: Fix CROSS_TOOLCHAIN=amd64-gcc build after r349554 Apparently clang can remove the reference to __umoddi3 but GCC keeps it. Reported by: lwhsu Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- head/libexec/rtld-elf/rtld-libc/Makefile.inc Sun Jun 30 15:01:19 2019 (r349560) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Sun Jun 30 17:03:14 2019 (r349561) @@ -58,7 +58,7 @@ _libc_other_objects+=aeabi_unwind_cpp .elif ${LIBC_ARCH} == "i386" # __udivdi3 is needed by kvprintf() in rtld_printf.c # i386 also needs i386_set_gsbase for allocate_initial_tls() -_libc_other_objects+=udivdi3 qdivrem i386_set_gsbase +_libc_other_objects+=umoddi3 udivdi3 qdivrem i386_set_gsbase .elif ${LIBC_ARCH} == "powerpc" || ${LIBC_ARCH} == "powerpcspe" # ppc needs __syncicache for reloc.c and __umoddi3+__udivdi3 for rtld_printf.c _libc_other_objects+=syncicache umoddi3 udivdi3 qdivrem From owner-svn-src-all@freebsd.org Sun Jun 30 19:43:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7302115DD4F6; Sun, 30 Jun 2019 19:43:14 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 186306BB3A; Sun, 30 Jun 2019 19:43:14 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5F0F223F; Sun, 30 Jun 2019 19:43:13 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UJhD4S092274; Sun, 30 Jun 2019 19:43:13 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UJhD6M092273; Sun, 30 Jun 2019 19:43:13 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906301943.x5UJhD6M092273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 30 Jun 2019 19:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349562 - head/contrib/elftoolchain/common X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/contrib/elftoolchain/common X-SVN-Commit-Revision: 349562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 186306BB3A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 19:43:14 -0000 Author: mhorne Date: Sun Jun 30 19:43:13 2019 New Revision: 349562 URL: https://svnweb.freebsd.org/changeset/base/349562 Log: elftoolchain: fix an incorrect e_flags description r349482 introduced the definitions and descriptions of the RISC-V specific e_flags values to elftoolchain. However, the description for the EF_RISCV_RVE flag was incorrectly duplicated from EF_RISCV_RVC. Fix this by providing the proper description for this flag. Reported by: jhb Approved by: markj (mentor) Modified: head/contrib/elftoolchain/common/elfdefinitions.h Modified: head/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- head/contrib/elftoolchain/common/elfdefinitions.h Sun Jun 30 17:03:14 2019 (r349561) +++ head/contrib/elftoolchain/common/elfdefinitions.h Sun Jun 30 19:43:13 2019 (r349562) @@ -439,7 +439,7 @@ _ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_DOUBLE, 0x00000004UL _ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_QUAD, 0x00000006UL, \ "Quad precision floating point") \ _ELF_DEFINE_EF(EF_RISCV_RVE, 0x00000008UL, \ - "Compressed instruction ABI") \ + "RV32E embedded ABI") \ _ELF_DEFINE_EF(EF_RISCV_TSO, 0x00000010UL, \ "RVTSO memory consistency model") \ _ELF_DEFINE_EF(EF_SPARC_EXT_MASK, 0x00ffff00UL, \ From owner-svn-src-all@freebsd.org Sun Jun 30 19:47:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 851B215DD697; Sun, 30 Jun 2019 19:47:16 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25BE56C048; Sun, 30 Jun 2019 19:47:16 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4F63224C; Sun, 30 Jun 2019 19:47:15 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UJlFB2093028; Sun, 30 Jun 2019 19:47:15 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UJlFYD093027; Sun, 30 Jun 2019 19:47:15 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201906301947.x5UJlFYD093027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 30 Jun 2019 19:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349563 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 349563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 25BE56C048 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 19:47:16 -0000 Author: mhorne Date: Sun Jun 30 19:47:15 2019 New Revision: 349563 URL: https://svnweb.freebsd.org/changeset/base/349563 Log: readelf: Add RISC-V DWARF register aliases This allows DWARF debugging output to use the common register mneumonics, such as ra, sp, or t0. DWARF registers 0-31 are mapped to the 32 general purpose registers, which are then followed by the 32 floating point registers. Reviewed by: markj Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D20779 Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Sun Jun 30 19:43:13 2019 (r349562) +++ head/contrib/elftoolchain/readelf/readelf.c Sun Jun 30 19:47:15 2019 (r349563) @@ -2080,6 +2080,74 @@ dwarf_reg(unsigned int mach, unsigned int reg) case 49: return "ldtr"; default: return (NULL); } + case EM_RISCV: + switch (reg) { + case 0: return "zero"; + case 1: return "ra"; + case 2: return "sp"; + case 3: return "gp"; + case 4: return "tp"; + case 5: return "t0"; + case 6: return "t1"; + case 7: return "t2"; + case 8: return "s0"; + case 9: return "s1"; + case 10: return "a0"; + case 11: return "a1"; + case 12: return "a2"; + case 13: return "a3"; + case 14: return "a4"; + case 15: return "a5"; + case 16: return "a6"; + case 17: return "a7"; + case 18: return "s2"; + case 19: return "s3"; + case 20: return "s4"; + case 21: return "s5"; + case 22: return "s6"; + case 23: return "s7"; + case 24: return "s8"; + case 25: return "s9"; + case 26: return "s10"; + case 27: return "s11"; + case 28: return "t3"; + case 29: return "t4"; + case 30: return "t5"; + case 31: return "t6"; + case 32: return "ft0"; + case 33: return "ft1"; + case 34: return "ft2"; + case 35: return "ft3"; + case 36: return "ft4"; + case 37: return "ft5"; + case 38: return "ft6"; + case 39: return "ft7"; + case 40: return "fs0"; + case 41: return "fs1"; + case 42: return "fa0"; + case 43: return "fa1"; + case 44: return "fa2"; + case 45: return "fa3"; + case 46: return "fa4"; + case 47: return "fa5"; + case 48: return "fa6"; + case 49: return "fa7"; + case 50: return "fs2"; + case 51: return "fs3"; + case 52: return "fs4"; + case 53: return "fs5"; + case 54: return "fs6"; + case 55: return "fs7"; + case 56: return "fs8"; + case 57: return "fs9"; + case 58: return "fs10"; + case 59: return "fs11"; + case 60: return "ft8"; + case 61: return "ft9"; + case 62: return "ft10"; + case 63: return "ft11"; + default: return (NULL); + } case EM_X86_64: switch (reg) { case 0: return "rax"; From owner-svn-src-all@freebsd.org Sun Jun 30 20:15:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E1FB15DE12E; Sun, 30 Jun 2019 20:15:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8E7D6DBA8; Sun, 30 Jun 2019 20:15:02 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A93C27B8; Sun, 30 Jun 2019 20:15:02 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UKF21F011383; Sun, 30 Jun 2019 20:15:02 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UKF27w011382; Sun, 30 Jun 2019 20:15:02 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201906302015.x5UKF27w011382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 30 Jun 2019 20:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349564 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 349564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8E7D6DBA8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 20:15:03 -0000 Author: tsoome Date: Sun Jun 30 20:15:02 2019 New Revision: 349564 URL: https://svnweb.freebsd.org/changeset/base/349564 Log: Clean efihttp pointer-sign warnings The Http protocol structure is using unsigned char strings, Use type casts where needed. Modified: head/stand/efi/libefi/efihttp.c Modified: head/stand/efi/libefi/efihttp.c ============================================================================== --- head/stand/efi/libefi/efihttp.c Sun Jun 30 19:47:15 2019 (r349563) +++ head/stand/efi/libefi/efihttp.c Sun Jun 30 20:15:02 2019 (r349564) @@ -199,7 +199,7 @@ efihttp_dev_init(void) DevicePathSubType(devpath) != MSG_URI_DP) continue; uri = (URI_DEVICE_PATH *)devpath; - if (strncmp("http", uri->Uri, 4) == 0) + if (strncmp("http", (const char *)uri->Uri, 4) == 0) found_http = true; } if (!found_http) @@ -341,7 +341,7 @@ efihttp_dev_open(struct open_file *f, ...) err = ENOMEM; goto end; } - strncpy(oh->uri_base, uri->Uri, len); + strncpy(oh->uri_base, (const char *)uri->Uri, len); oh->uri_base[len] = '\0'; c = strrchr(oh->uri_base, '/'); if (c != NULL) @@ -468,12 +468,12 @@ _efihttp_fs_open(const char *path, struct open_file *f message.Body = NULL; request.Method = HttpMethodGet; request.Url = calloc(strlen(oh->uri_base) + strlen(path) + 1, 2); - headers[0].FieldName = "Host"; - headers[0].FieldValue = hostp; - headers[1].FieldName = "Connection"; - headers[1].FieldValue = "close"; - headers[2].FieldName = "Accept"; - headers[2].FieldValue = "*/*"; + headers[0].FieldName = (CHAR8 *)"Host"; + headers[0].FieldValue = (CHAR8 *)hostp; + headers[1].FieldName = (CHAR8 *)"Connection"; + headers[1].FieldValue = (CHAR8 *)"close"; + headers[2].FieldName = (CHAR8 *)"Accept"; + headers[2].FieldValue = (CHAR8 *)"*/*"; cpy8to16(oh->uri_base, request.Url, strlen(oh->uri_base)); cpy8to16(path, request.Url + strlen(oh->uri_base), strlen(path)); status = oh->http->Request(oh->http, &token); @@ -542,14 +542,14 @@ _efihttp_fs_open(const char *path, struct open_file *f fh->size = 0; fh->is_dir = false; for (i = 0; i < message.HeaderCount; i++) { - if (strcasecmp(message.Headers[i].FieldName, + if (strcasecmp((const char *)message.Headers[i].FieldName, "Content-Length") == 0) - fh->size = strtoul(message.Headers[i].FieldValue, NULL, - 10); - else if (strcasecmp(message.Headers[i].FieldName, + fh->size = strtoul((const char *) + message.Headers[i].FieldValue, NULL, 10); + else if (strcasecmp((const char *)message.Headers[i].FieldName, "Content-type") == 0) { - if (strncmp(message.Headers[i].FieldValue, "text/html", - 9) == 0) + if (strncmp((const char *)message.Headers[i].FieldValue, + "text/html", 9) == 0) fh->is_dir = true; } } From owner-svn-src-all@freebsd.org Sun Jun 30 20:18:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF54A15DE2F3; Sun, 30 Jun 2019 20:18:32 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 628236DF51; Sun, 30 Jun 2019 20:18:32 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CD3327C0; Sun, 30 Jun 2019 20:18:32 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UKIWiu011821; Sun, 30 Jun 2019 20:18:32 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UKIWeT011820; Sun, 30 Jun 2019 20:18:32 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201906302018.x5UKIWeT011820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 30 Jun 2019 20:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349565 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 349565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 628236DF51 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 20:18:32 -0000 Author: tsoome Date: Sun Jun 30 20:18:31 2019 New Revision: 349565 URL: https://svnweb.freebsd.org/changeset/base/349565 Log: efihttp: comparison of integers of different signs message.HeaderCount is UINTN (unsigned int), so should be i. Modified: head/stand/efi/libefi/efihttp.c Modified: head/stand/efi/libefi/efihttp.c ============================================================================== --- head/stand/efi/libefi/efihttp.c Sun Jun 30 20:15:02 2019 (r349564) +++ head/stand/efi/libefi/efihttp.c Sun Jun 30 20:18:31 2019 (r349565) @@ -396,7 +396,7 @@ _efihttp_fs_open(const char *path, struct open_file *f struct open_efihttp *oh; struct file_efihttp *fh; EFI_STATUS status; - int i; + UINTN i; int polltime; bool done; From owner-svn-src-all@freebsd.org Sun Jun 30 20:21:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 747DD15DE42E; Sun, 30 Jun 2019 20:21:28 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 178186E3E2; Sun, 30 Jun 2019 20:21:28 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE2E42804; Sun, 30 Jun 2019 20:21:27 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UKLRlu012941; Sun, 30 Jun 2019 20:21:27 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UKLR0C012940; Sun, 30 Jun 2019 20:21:27 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201906302021.x5UKLR0C012940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 30 Jun 2019 20:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349566 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 349566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 178186E3E2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 20:21:28 -0000 Author: tsoome Date: Sun Jun 30 20:21:27 2019 New Revision: 349566 URL: https://svnweb.freebsd.org/changeset/base/349566 Log: efihttp: mark unused arguments with __unused we do have __unused, lets use it. Modified: head/stand/efi/libefi/efihttp.c Modified: head/stand/efi/libefi/efihttp.c ============================================================================== --- head/stand/efi/libefi/efihttp.c Sun Jun 30 20:18:31 2019 (r349565) +++ head/stand/efi/libefi/efihttp.c Sun Jun 30 20:21:27 2019 (r349566) @@ -108,7 +108,7 @@ struct fs_ops efihttp_fsops = { }; static void EFIAPI -notify(EFI_EVENT event, void *context) +notify(EFI_EVENT event __unused, void *context) { bool *b; @@ -217,8 +217,9 @@ efihttp_dev_init(void) } static int -efihttp_dev_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf, - size_t *rsize) +efihttp_dev_strategy(void *devdata __unused, int rw __unused, + daddr_t blk __unused, size_t size __unused, char *buf __unused, + size_t *rsize __unused) { return (EIO); } @@ -583,7 +584,7 @@ efihttp_fs_open(const char *path, struct open_file *f) } static int -efihttp_fs_close(struct open_file *f) +efihttp_fs_close(struct open_file *f __unused) { return (0); } @@ -677,7 +678,8 @@ end: } static int -efihttp_fs_write(struct open_file *f, const void *buf, size_t size, size_t *resid) +efihttp_fs_write(struct open_file *f __unused, const void *buf __unused, + size_t size __unused, size_t *resid __unused) { return (EIO); } From owner-svn-src-all@freebsd.org Sun Jun 30 22:27:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94BAE15E20B3; Sun, 30 Jun 2019 22:27:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37A6A74D57; Sun, 30 Jun 2019 22:27:59 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C6E24088; Sun, 30 Jun 2019 22:27:59 +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 x5UMRwoJ085806; Sun, 30 Jun 2019 22:27:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UMRwEI085805; Sun, 30 Jun 2019 22:27:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906302227.x5UMRwEI085805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 30 Jun 2019 22:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349567 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 37A6A74D57 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 22:27:59 -0000 Author: cy Date: Sun Jun 30 22:27:58 2019 New Revision: 349567 URL: https://svnweb.freebsd.org/changeset/base/349567 Log: Revert r349400. It has uintended effects. Reported by: christos@NetBSD.org X-MFC with: r349400. Modified: head/sys/contrib/ipfilter/netinet/fil.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sun Jun 30 20:21:27 2019 (r349566) +++ head/sys/contrib/ipfilter/netinet/fil.c Sun Jun 30 22:27:58 2019 (r349567) @@ -1732,22 +1732,24 @@ ipf_pr_ipv4hdr(fin) fi->fi_flx |= FI_FRAG; off &= IP_OFFMASK; - fin->fin_flx |= FI_FRAGBODY; - off <<= 3; - if ((off + fin->fin_dlen > 65535) || - (fin->fin_dlen == 0) || - ((morefrag != 0) && ((fin->fin_dlen & 7) != 0))) { - /* - * The length of the packet, starting at its - * offset cannot exceed 65535 (0xffff) as the - * length of an IP packet is only 16 bits. - * - * Any fragment that isn't the last fragment - * must have a length greater than 0 and it - * must be an even multiple of 8. - */ - fi->fi_flx |= FI_BAD; - DT1(ipf_fi_bad_fragbody_gt_65535, fr_info_t *, fin); + if (off != 0) { + fin->fin_flx |= FI_FRAGBODY; + off <<= 3; + if ((off + fin->fin_dlen > 65535) || + (fin->fin_dlen == 0) || + ((morefrag != 0) && ((fin->fin_dlen & 7) != 0))) { + /* + * The length of the packet, starting at its + * offset cannot exceed 65535 (0xffff) as the + * length of an IP packet is only 16 bits. + * + * Any fragment that isn't the last fragment + * must have a length greater than 0 and it + * must be an even multiple of 8. + */ + fi->fi_flx |= FI_BAD; + DT1(ipf_fi_bad_fragbody_gt_65535, fr_info_t *, fin); + } } } fin->fin_off = off; From owner-svn-src-all@freebsd.org Sun Jun 30 22:32:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D667415E22B8; Sun, 30 Jun 2019 22:32:34 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76EAE75152; Sun, 30 Jun 2019 22:32:34 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0957A4235; Sun, 30 Jun 2019 22:32:34 +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 x5UMWX3g090790; Sun, 30 Jun 2019 22:32:33 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UMWXCs090789; Sun, 30 Jun 2019 22:32:33 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201906302232.x5UMWXCs090789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 30 Jun 2019 22:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349568 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 76EAE75152 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 22:32:35 -0000 Author: cy Date: Sun Jun 30 22:32:33 2019 New Revision: 349568 URL: https://svnweb.freebsd.org/changeset/base/349568 Log: The RFC 3128 test should be made after the offset mask has been applied. Reported by: christos@NetBSD.org X-MFC with: r349399 Modified: head/sys/contrib/ipfilter/netinet/fil.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sun Jun 30 22:27:58 2019 (r349567) +++ head/sys/contrib/ipfilter/netinet/fil.c Sun Jun 30 22:32:33 2019 (r349568) @@ -1723,15 +1723,15 @@ ipf_pr_ipv4hdr(fin) * calculate the byte offset that it represents. */ off &= IP_MF|IP_OFFMASK; - if (off == 1 && p == IPPROTO_TCP) { - fin->fin_flx |= FI_SHORT; /* RFC 3128 */ - DT1(ipf_fi_tcp_frag_off_1, fr_info_t *, fin); - } if (off != 0) { int morefrag = off & IP_MF; fi->fi_flx |= FI_FRAG; off &= IP_OFFMASK; + if (off == 1 && p == IPPROTO_TCP) { + fin->fin_flx |= FI_SHORT; /* RFC 3128 */ + DT1(ipf_fi_tcp_frag_off_1, fr_info_t *, fin); + } if (off != 0) { fin->fin_flx |= FI_FRAGBODY; off <<= 3; From owner-svn-src-all@freebsd.org Mon Jul 1 06:22:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C762A15C7714; Mon, 1 Jul 2019 06:22:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 681009235D; Mon, 1 Jul 2019 06:22:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 426139183; Mon, 1 Jul 2019 06:22:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x616MgUY037159; Mon, 1 Jul 2019 06:22:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x616Mgrq037158; Mon, 1 Jul 2019 06:22:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907010622.x616Mgrq037158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 1 Jul 2019 06:22:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349571 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 349571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 681009235D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.82 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.82)[-0.821,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 06:22:43 -0000 Author: avg Date: Mon Jul 1 06:22:41 2019 New Revision: 349571 URL: https://svnweb.freebsd.org/changeset/base/349571 Log: upgrade the warning printf-s in bus accessors to KASSERT-s, take 2 After this change sys/bus.h includes sys/systm.h when _KERNEL is defined. This brings back r349459 but with systm.h hidden from userland. MFC after: 2 weeks Modified: head/sys/sys/bus.h Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Mon Jul 1 05:12:01 2019 (r349570) +++ head/sys/sys/bus.h Mon Jul 1 06:22:41 2019 (r349571) @@ -152,6 +152,7 @@ struct devreq { #include #include +#include /** * devctl hooks. Typically one should use the devctl_notify @@ -813,12 +814,9 @@ static __inline type varp ## _get_ ## var(device_t dev int e; \ e = BUS_READ_IVAR(device_get_parent(dev), dev, \ ivarp ## _IVAR_ ## ivar, &v); \ - if (e != 0) { \ - device_printf(dev, "failed to read ivar " \ - __XSTRING(ivarp ## _IVAR_ ## ivar) " on bus %s, " \ - "error = %d\n", \ - device_get_nameunit(device_get_parent(dev)), e); \ - } \ + KASSERT(e == 0, ("%s failed for %s on bus %s, error = %d", \ + __func__, device_get_nameunit(dev), \ + device_get_nameunit(device_get_parent(dev)), e)); \ return ((type) v); \ } \ \ @@ -828,12 +826,9 @@ static __inline void varp ## _set_ ## var(device_t dev int e; \ e = BUS_WRITE_IVAR(device_get_parent(dev), dev, \ ivarp ## _IVAR_ ## ivar, v); \ - if (e != 0) { \ - device_printf(dev, "failed to write ivar " \ - __XSTRING(ivarp ## _IVAR_ ## ivar) " on bus %s, " \ - "error = %d\n", \ - device_get_nameunit(device_get_parent(dev)), e); \ - } \ + KASSERT(e == 0, ("%s failed for %s on bus %s, error = %d", \ + __func__, device_get_nameunit(dev), \ + device_get_nameunit(device_get_parent(dev)), e)); \ } /** From owner-svn-src-all@freebsd.org Mon Jul 1 10:03:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB09015D07D2; Mon, 1 Jul 2019 10:03:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B0836F3DD; Mon, 1 Jul 2019 10:03:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3443DB615; Mon, 1 Jul 2019 10:03:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61A3eXh054039; Mon, 1 Jul 2019 10:03:40 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61A3cTj054033; Mon, 1 Jul 2019 10:03:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907011003.x61A3cTj054033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Jul 2019 10:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349573 - in stable/11: sbin/ipfw sys/netinet sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11: sbin/ipfw sys/netinet sys/netpfil/ipfw X-SVN-Commit-Revision: 349573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5B0836F3DD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 10:03:41 -0000 Author: ae Date: Mon Jul 1 10:03:38 2019 New Revision: 349573 URL: https://svnweb.freebsd.org/changeset/base/349573 Log: MFC r349267: Add "tcpmss" opcode to match the TCP MSS value. With this opcode it is possible to match TCP packets with specified MSS option, whose value corresponds to configured in opcode value. It is allowed to specify single value, range of values, or array of specific values or ranges. E.g. # ipfw add deny log tcp from any to any tcpmss 0-500 Modified: stable/11/sbin/ipfw/ipfw.8 stable/11/sbin/ipfw/ipfw2.c stable/11/sbin/ipfw/ipfw2.h stable/11/sys/netinet/ip_fw.h stable/11/sys/netpfil/ipfw/ip_fw2.c stable/11/sys/netpfil/ipfw/ip_fw_sockopt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Mon Jul 1 10:01:08 2019 (r349572) +++ stable/11/sbin/ipfw/ipfw.8 Mon Jul 1 10:03:38 2019 (r349573) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2019 +.Dd June 21, 2019 .Dt IPFW 8 .Os .Sh NAME @@ -1989,6 +1989,12 @@ a non-zero offset. See the .Cm frag option for details on matching fragmented packets. +.It Cm tcpmss Ar tcpmss-list +Matches TCP packets whose MSS (maximum segment size) value is set to +.Ar tcpmss-list , +which is either a single value or a list of values or ranges +specified in the same way as +.Ar ports . .It Cm tcpseq Ar seq TCP packets only. Match if the TCP header sequence number field is set to Modified: stable/11/sbin/ipfw/ipfw2.c ============================================================================== --- stable/11/sbin/ipfw/ipfw2.c Mon Jul 1 10:01:08 2019 (r349572) +++ stable/11/sbin/ipfw/ipfw2.c Mon Jul 1 10:03:38 2019 (r349573) @@ -338,6 +338,7 @@ static struct _s_x rule_options[] = { { "tcpdatalen", TOK_TCPDATALEN }, { "tcpflags", TOK_TCPFLAGS }, { "tcpflgs", TOK_TCPFLAGS }, + { "tcpmss", TOK_TCPMSS }, { "tcpoptions", TOK_TCPOPTS }, { "tcpopts", TOK_TCPOPTS }, { "tcpseq", TOK_TCPSEQ }, @@ -881,6 +882,7 @@ static struct _s_x _port_name[] = { {"ipttl", O_IPTTL}, {"mac-type", O_MAC_TYPE}, {"tcpdatalen", O_TCPDATALEN}, + {"tcpmss", O_TCPMSS}, {"tcpwin", O_TCPWIN}, {"tagged", O_TAGGED}, {NULL, 0} @@ -1588,6 +1590,7 @@ print_instruction(struct buf_pr *bp, const struct form case O_IPTTL: case O_IPLEN: case O_TCPDATALEN: + case O_TCPMSS: case O_TCPWIN: if (F_LEN(cmd) == 1) { switch (cmd->opcode) { @@ -1603,6 +1606,9 @@ print_instruction(struct buf_pr *bp, const struct form case O_TCPDATALEN: s = "tcpdatalen"; break; + case O_TCPMSS: + s = "tcpmss"; + break; case O_TCPWIN: s = "tcpwin"; break; @@ -4709,14 +4715,18 @@ read_options: av++; break; + case TOK_TCPMSS: case TOK_TCPWIN: - NEED1("tcpwin requires length"); + NEED1("tcpmss/tcpwin requires size"); if (strpbrk(*av, "-,")) { - if (!add_ports(cmd, *av, 0, O_TCPWIN, cblen)) - errx(EX_DATAERR, "invalid tcpwin len %s", *av); + if (add_ports(cmd, *av, 0, + i == TOK_TCPWIN ? O_TCPWIN : O_TCPMSS, + cblen) == NULL) + errx(EX_DATAERR, "invalid %s size %s", + s, *av); } else - fill_cmd(cmd, O_TCPWIN, 0, - strtoul(*av, NULL, 0)); + fill_cmd(cmd, i == TOK_TCPWIN ? O_TCPWIN : + O_TCPMSS, 0, strtoul(*av, NULL, 0)); av++; break; Modified: stable/11/sbin/ipfw/ipfw2.h ============================================================================== --- stable/11/sbin/ipfw/ipfw2.h Mon Jul 1 10:01:08 2019 (r349572) +++ stable/11/sbin/ipfw/ipfw2.h Mon Jul 1 10:03:38 2019 (r349573) @@ -151,6 +151,7 @@ enum tokens { TOK_TCPOPTS, TOK_TCPSEQ, TOK_TCPACK, + TOK_TCPMSS, TOK_TCPWIN, TOK_ICMPTYPES, TOK_MAC, Modified: stable/11/sys/netinet/ip_fw.h ============================================================================== --- stable/11/sys/netinet/ip_fw.h Mon Jul 1 10:01:08 2019 (r349572) +++ stable/11/sys/netinet/ip_fw.h Mon Jul 1 10:03:38 2019 (r349573) @@ -291,6 +291,7 @@ enum ipfw_opcodes { /* arguments (4 byte each) */ O_EXTERNAL_DATA, /* variable length data */ O_SKIP_ACTION, /* none */ + O_TCPMSS, /* arg1=MSS value */ O_LAST_OPCODE /* not an opcode! */ }; Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Mon Jul 1 10:01:08 2019 (r349572) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Mon Jul 1 10:03:38 2019 (r349573) @@ -329,10 +329,10 @@ ipopts_match(struct ip *ip, ipfw_insn *cmd) } static int -tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) +tcpopts_parse(struct tcphdr *tcp, uint16_t *mss) { - int optlen, bits = 0; u_char *cp = (u_char *)(tcp + 1); + int optlen, bits = 0; int x = (tcp->th_off << 2) - sizeof(struct tcphdr); for (; x > 0; x -= optlen, cp += optlen) { @@ -348,12 +348,13 @@ tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) } switch (opt) { - default: break; case TCPOPT_MAXSEG: bits |= IP_FW_TCPOPT_MSS; + if (mss != NULL) + *mss = be16dec(cp + 2); break; case TCPOPT_WINDOW: @@ -368,13 +369,19 @@ tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) case TCPOPT_TIMESTAMP: bits |= IP_FW_TCPOPT_TS; break; - } } - return (flags_match(cmd, bits)); + return (bits); } static int +tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) +{ + + return (flags_match(cmd, tcpopts_parse(tcp, NULL))); +} + +static int iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { @@ -2271,6 +2278,31 @@ do { \ match = (proto == IPPROTO_TCP && offset == 0 && ((ipfw_insn_u32 *)cmd)->d[0] == TCP(ulp)->th_ack); + break; + + case O_TCPMSS: + if (proto == IPPROTO_TCP && + (args->f_id._flags & TH_SYN) != 0 && + ulp != NULL) { + uint16_t mss, *p; + int i; + + PULLUP_LEN(hlen, ulp, + (TCP(ulp)->th_off << 2)); + if ((tcpopts_parse(TCP(ulp), &mss) & + IP_FW_TCPOPT_MSS) == 0) + break; + if (cmdlen == 1) { + match = (cmd->arg1 == mss); + break; + } + /* Otherwise we have ranges. */ + p = ((ipfw_insn_u16 *)cmd)->ports; + i = cmdlen - 1; + for (; !match && i > 0; i--, p += 2) + match = (mss >= p[0] && + mss <= p[1]); + } break; case O_TCPWIN: Modified: stable/11/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Jul 1 10:01:08 2019 (r349572) +++ stable/11/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Jul 1 10:03:38 2019 (r349573) @@ -1175,7 +1175,9 @@ move_objects(struct ip_fw_chain *ch, ipfw_range_tlv *r } } return (c); -}/* +} + +/* * Changes set of given rule rannge @rt * with each other. * @@ -1906,6 +1908,7 @@ check_ipfw_rule_body(ipfw_insn *cmd, int cmd_len, stru case O_IPTTL: case O_IPLEN: case O_TCPDATALEN: + case O_TCPMSS: case O_TCPWIN: case O_TAGGED: if (cmdlen < 1 || cmdlen > 31) From owner-svn-src-all@freebsd.org Mon Jul 1 10:01:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E245015D0292; Mon, 1 Jul 2019 10:01:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F9E16F03E; Mon, 1 Jul 2019 10:01:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B65CB4A4; Mon, 1 Jul 2019 10:01:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61A1Ag0050114; Mon, 1 Jul 2019 10:01:10 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61A19mf050108; Mon, 1 Jul 2019 10:01:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907011001.x61A19mf050108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Jul 2019 10:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349572 - in stable/12: sbin/ipfw sys/netinet sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/12: sbin/ipfw sys/netinet sys/netpfil/ipfw X-SVN-Commit-Revision: 349572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7F9E16F03E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 10:01:11 -0000 Author: ae Date: Mon Jul 1 10:01:08 2019 New Revision: 349572 URL: https://svnweb.freebsd.org/changeset/base/349572 Log: MFC r349267: Add "tcpmss" opcode to match the TCP MSS value. With this opcode it is possible to match TCP packets with specified MSS option, whose value corresponds to configured in opcode value. It is allowed to specify single value, range of values, or array of specific values or ranges. E.g. # ipfw add deny log tcp from any to any tcpmss 0-500 Modified: stable/12/sbin/ipfw/ipfw.8 stable/12/sbin/ipfw/ipfw2.c stable/12/sbin/ipfw/ipfw2.h stable/12/sys/netinet/ip_fw.h stable/12/sys/netpfil/ipfw/ip_fw2.c stable/12/sys/netpfil/ipfw/ip_fw_sockopt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipfw.8 ============================================================================== --- stable/12/sbin/ipfw/ipfw.8 Mon Jul 1 06:22:41 2019 (r349571) +++ stable/12/sbin/ipfw/ipfw.8 Mon Jul 1 10:01:08 2019 (r349572) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 24, 2019 +.Dd June 21, 2019 .Dt IPFW 8 .Os .Sh NAME @@ -1989,6 +1989,12 @@ a non-zero offset. See the .Cm frag option for details on matching fragmented packets. +.It Cm tcpmss Ar tcpmss-list +Matches TCP packets whose MSS (maximum segment size) value is set to +.Ar tcpmss-list , +which is either a single value or a list of values or ranges +specified in the same way as +.Ar ports . .It Cm tcpseq Ar seq TCP packets only. Match if the TCP header sequence number field is set to Modified: stable/12/sbin/ipfw/ipfw2.c ============================================================================== --- stable/12/sbin/ipfw/ipfw2.c Mon Jul 1 06:22:41 2019 (r349571) +++ stable/12/sbin/ipfw/ipfw2.c Mon Jul 1 10:01:08 2019 (r349572) @@ -338,6 +338,7 @@ static struct _s_x rule_options[] = { { "tcpdatalen", TOK_TCPDATALEN }, { "tcpflags", TOK_TCPFLAGS }, { "tcpflgs", TOK_TCPFLAGS }, + { "tcpmss", TOK_TCPMSS }, { "tcpoptions", TOK_TCPOPTS }, { "tcpopts", TOK_TCPOPTS }, { "tcpseq", TOK_TCPSEQ }, @@ -881,6 +882,7 @@ static struct _s_x _port_name[] = { {"ipttl", O_IPTTL}, {"mac-type", O_MAC_TYPE}, {"tcpdatalen", O_TCPDATALEN}, + {"tcpmss", O_TCPMSS}, {"tcpwin", O_TCPWIN}, {"tagged", O_TAGGED}, {NULL, 0} @@ -1588,6 +1590,7 @@ print_instruction(struct buf_pr *bp, const struct form case O_IPTTL: case O_IPLEN: case O_TCPDATALEN: + case O_TCPMSS: case O_TCPWIN: if (F_LEN(cmd) == 1) { switch (cmd->opcode) { @@ -1603,6 +1606,9 @@ print_instruction(struct buf_pr *bp, const struct form case O_TCPDATALEN: s = "tcpdatalen"; break; + case O_TCPMSS: + s = "tcpmss"; + break; case O_TCPWIN: s = "tcpwin"; break; @@ -4709,14 +4715,18 @@ read_options: av++; break; + case TOK_TCPMSS: case TOK_TCPWIN: - NEED1("tcpwin requires length"); + NEED1("tcpmss/tcpwin requires size"); if (strpbrk(*av, "-,")) { - if (!add_ports(cmd, *av, 0, O_TCPWIN, cblen)) - errx(EX_DATAERR, "invalid tcpwin len %s", *av); + if (add_ports(cmd, *av, 0, + i == TOK_TCPWIN ? O_TCPWIN : O_TCPMSS, + cblen) == NULL) + errx(EX_DATAERR, "invalid %s size %s", + s, *av); } else - fill_cmd(cmd, O_TCPWIN, 0, - strtoul(*av, NULL, 0)); + fill_cmd(cmd, i == TOK_TCPWIN ? O_TCPWIN : + O_TCPMSS, 0, strtoul(*av, NULL, 0)); av++; break; Modified: stable/12/sbin/ipfw/ipfw2.h ============================================================================== --- stable/12/sbin/ipfw/ipfw2.h Mon Jul 1 06:22:41 2019 (r349571) +++ stable/12/sbin/ipfw/ipfw2.h Mon Jul 1 10:01:08 2019 (r349572) @@ -151,6 +151,7 @@ enum tokens { TOK_TCPOPTS, TOK_TCPSEQ, TOK_TCPACK, + TOK_TCPMSS, TOK_TCPWIN, TOK_ICMPTYPES, TOK_MAC, Modified: stable/12/sys/netinet/ip_fw.h ============================================================================== --- stable/12/sys/netinet/ip_fw.h Mon Jul 1 06:22:41 2019 (r349571) +++ stable/12/sys/netinet/ip_fw.h Mon Jul 1 10:01:08 2019 (r349572) @@ -293,6 +293,7 @@ enum ipfw_opcodes { /* arguments (4 byte each) */ O_EXTERNAL_DATA, /* variable length data */ O_SKIP_ACTION, /* none */ + O_TCPMSS, /* arg1=MSS value */ O_LAST_OPCODE /* not an opcode! */ }; Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Mon Jul 1 06:22:41 2019 (r349571) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Mon Jul 1 10:01:08 2019 (r349572) @@ -331,10 +331,10 @@ ipopts_match(struct ip *ip, ipfw_insn *cmd) } static int -tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) +tcpopts_parse(struct tcphdr *tcp, uint16_t *mss) { - int optlen, bits = 0; u_char *cp = (u_char *)(tcp + 1); + int optlen, bits = 0; int x = (tcp->th_off << 2) - sizeof(struct tcphdr); for (; x > 0; x -= optlen, cp += optlen) { @@ -350,12 +350,13 @@ tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) } switch (opt) { - default: break; case TCPOPT_MAXSEG: bits |= IP_FW_TCPOPT_MSS; + if (mss != NULL) + *mss = be16dec(cp + 2); break; case TCPOPT_WINDOW: @@ -370,13 +371,19 @@ tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) case TCPOPT_TIMESTAMP: bits |= IP_FW_TCPOPT_TS; break; - } } - return (flags_match(cmd, bits)); + return (bits); } static int +tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) +{ + + return (flags_match(cmd, tcpopts_parse(tcp, NULL))); +} + +static int iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { @@ -2273,6 +2280,31 @@ do { \ match = (proto == IPPROTO_TCP && offset == 0 && ((ipfw_insn_u32 *)cmd)->d[0] == TCP(ulp)->th_ack); + break; + + case O_TCPMSS: + if (proto == IPPROTO_TCP && + (args->f_id._flags & TH_SYN) != 0 && + ulp != NULL) { + uint16_t mss, *p; + int i; + + PULLUP_LEN(hlen, ulp, + (TCP(ulp)->th_off << 2)); + if ((tcpopts_parse(TCP(ulp), &mss) & + IP_FW_TCPOPT_MSS) == 0) + break; + if (cmdlen == 1) { + match = (cmd->arg1 == mss); + break; + } + /* Otherwise we have ranges. */ + p = ((ipfw_insn_u16 *)cmd)->ports; + i = cmdlen - 1; + for (; !match && i > 0; i--, p += 2) + match = (mss >= p[0] && + mss <= p[1]); + } break; case O_TCPWIN: Modified: stable/12/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Jul 1 06:22:41 2019 (r349571) +++ stable/12/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Jul 1 10:01:08 2019 (r349572) @@ -1177,7 +1177,9 @@ move_objects(struct ip_fw_chain *ch, ipfw_range_tlv *r } } return (c); -}/* +} + +/* * Changes set of given rule rannge @rt * with each other. * @@ -1908,6 +1910,7 @@ check_ipfw_rule_body(ipfw_insn *cmd, int cmd_len, stru case O_IPTTL: case O_IPLEN: case O_TCPDATALEN: + case O_TCPMSS: case O_TCPWIN: case O_TAGGED: if (cmdlen < 1 || cmdlen > 31) From owner-svn-src-all@freebsd.org Mon Jul 1 10:09:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 282BA15D1043; Mon, 1 Jul 2019 10:09:20 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C0A156F59C; Mon, 1 Jul 2019 10:09:19 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95BD5B617; Mon, 1 Jul 2019 10:09:19 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61A9JIf054304; Mon, 1 Jul 2019 10:09:19 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61A9JhW054303; Mon, 1 Jul 2019 10:09:19 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907011009.x61A9JhW054303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Jul 2019 10:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349574 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 349574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C0A156F59C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 10:09:20 -0000 Author: ae Date: Mon Jul 1 10:09:19 2019 New Revision: 349574 URL: https://svnweb.freebsd.org/changeset/base/349574 Log: MFC r348774: Use underscores for internal variable name to avoid conflicts. Modified: stable/11/sys/sys/counter.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/counter.h ============================================================================== --- stable/11/sys/sys/counter.h Mon Jul 1 10:03:38 2019 (r349573) +++ stable/11/sys/sys/counter.h Mon Jul 1 10:09:19 2019 (r349574) @@ -41,23 +41,23 @@ void counter_u64_zero(counter_u64_t); uint64_t counter_u64_fetch(counter_u64_t); #define COUNTER_ARRAY_ALLOC(a, n, wait) do { \ - for (int i = 0; i < (n); i++) \ - (a)[i] = counter_u64_alloc(wait); \ + for (int _i = 0; _i < (n); _i++) \ + (a)[_i] = counter_u64_alloc(wait); \ } while (0) #define COUNTER_ARRAY_FREE(a, n) do { \ - for (int i = 0; i < (n); i++) \ - counter_u64_free((a)[i]); \ + for (int _i = 0; _i < (n); _i++) \ + counter_u64_free((a)[_i]); \ } while (0) #define COUNTER_ARRAY_COPY(a, dstp, n) do { \ - for (int i = 0; i < (n); i++) \ - ((uint64_t *)(dstp))[i] = counter_u64_fetch((a)[i]);\ + for (int _i = 0; _i < (n); _i++) \ + ((uint64_t *)(dstp))[_i] = counter_u64_fetch((a)[_i]);\ } while (0) #define COUNTER_ARRAY_ZERO(a, n) do { \ - for (int i = 0; i < (n); i++) \ - counter_u64_zero((a)[i]); \ + for (int _i = 0; _i < (n); _i++) \ + counter_u64_zero((a)[_i]); \ } while (0) #endif /* _KERNEL */ #endif /* ! __SYS_COUNTER_H__ */ From owner-svn-src-all@freebsd.org Mon Jul 1 10:15:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C691415D1BF8; Mon, 1 Jul 2019 10:15:53 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2B46FA06; Mon, 1 Jul 2019 10:15:53 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42127B7CB; Mon, 1 Jul 2019 10:15:53 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61AFrn1059408; Mon, 1 Jul 2019 10:15:53 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61AFq0A059406; Mon, 1 Jul 2019 10:15:52 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907011015.x61AFq0A059406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Jul 2019 10:15:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349575 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 349575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6B2B46FA06 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 10:15:54 -0000 Author: ae Date: Mon Jul 1 10:15:52 2019 New Revision: 349575 URL: https://svnweb.freebsd.org/changeset/base/349575 Log: MFC r348235: Add `missing` and `or-flush` options to "ipfw table create" command to simplify firewall reloading. The `missing` option suppresses EEXIST error code, but does check that existing table has the same parameters as new one. The `or-flush` option implies `missing` option and additionally does flush for table if it is already exist. Submitted by: lev Differential Revision: https://reviews.freebsd.org/D18339 MFC r348301: Remove unused token that was added in r348235. Modified: stable/11/sbin/ipfw/ipfw.8 stable/11/sbin/ipfw/ipfw2.h stable/11/sbin/ipfw/tables.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Mon Jul 1 10:09:19 2019 (r349574) +++ stable/11/sbin/ipfw/ipfw.8 Mon Jul 1 10:15:52 2019 (r349575) @@ -2144,7 +2144,7 @@ The following creation options are supported: .Bl -tag -width indent .It Ar create-options : Ar create-option | create-options .It Ar create-option : Cm type Ar table-type | Cm valtype Ar value-mask | Cm algo Ar algo-desc | -.Cm limit Ar number | Cm locked +.Cm limit Ar number | Cm locked | Cm missing | Cm or-flush .It Cm type Table key type. .It Cm valtype @@ -2155,6 +2155,13 @@ Table algorithm to use (see below). Maximum number of items that may be inserted into table. .It Cm locked Restrict any table modifications. +.It Cm missing +Do not fail if table already exists and has exactly same options as new one. +.It Cm or-flush +Flush existing table with same name instead of returning error. +Implies +.Cm missing +so existing table must be compatible with new one. .El .Pp Some of these options may be modified later via Modified: stable/11/sbin/ipfw/ipfw2.h ============================================================================== --- stable/11/sbin/ipfw/ipfw2.h Mon Jul 1 10:09:19 2019 (r349574) +++ stable/11/sbin/ipfw/ipfw2.h Mon Jul 1 10:15:52 2019 (r349575) @@ -265,6 +265,8 @@ enum tokens { TOK_UNLOCK, TOK_VLIST, TOK_OLIST, + TOK_MISSING, + TOK_ORFLUSH, /* NAT64 tokens */ TOK_NAT64STL, Modified: stable/11/sbin/ipfw/tables.c ============================================================================== --- stable/11/sbin/ipfw/tables.c Mon Jul 1 10:09:19 2019 (r349574) +++ stable/11/sbin/ipfw/tables.c Mon Jul 1 10:15:52 2019 (r349575) @@ -327,6 +327,8 @@ static struct _s_x tablenewcmds[] = { { "algo", TOK_ALGO }, { "limit", TOK_LIMIT }, { "locked", TOK_LOCK }, + { "missing", TOK_MISSING }, + { "or-flush", TOK_ORFLUSH }, { NULL, 0 } }; @@ -389,19 +391,19 @@ table_print_type(char *tbuf, size_t size, uint8_t type * Creates new table * * ipfw table NAME create [ type { addr | iface | number | flow } ] - * [ algo algoname ] + * [ algo algoname ] [missing] [or-flush] */ static void table_create(ipfw_obj_header *oh, int ac, char *av[]) { - ipfw_xtable_info xi; - int error, tcmd, val; + ipfw_xtable_info xi, xie; + int error, missing, orflush, tcmd, val; uint32_t fset, fclear; char *e, *p; char tbuf[128]; + missing = orflush = 0; memset(&xi, 0, sizeof(xi)); - while (ac > 0) { tcmd = get_token(tablenewcmds, *av, "option"); ac--; av++; @@ -457,6 +459,12 @@ table_create(ipfw_obj_header *oh, int ac, char *av[]) case TOK_LOCK: xi.flags |= IPFW_TGFLAGS_LOCKED; break; + case TOK_ORFLUSH: + orflush = 1; + /* FALLTHROUGH */ + case TOK_MISSING: + missing = 1; + break; } } @@ -466,8 +474,28 @@ table_create(ipfw_obj_header *oh, int ac, char *av[]) if (xi.vmask == 0) xi.vmask = IPFW_VTYPE_LEGACY; - if ((error = table_do_create(oh, &xi)) != 0) + error = table_do_create(oh, &xi); + + if (error == 0) + return; + + if (errno != EEXIST || missing == 0) err(EX_OSERR, "Table creation failed"); + + /* Check that existing table is the same we are trying to create */ + if (table_get_info(oh, &xie) != 0) + err(EX_OSERR, "Existing table check failed"); + + if (xi.limit != xie.limit || xi.type != xie.type || + xi.tflags != xie.tflags || xi.vmask != xie.vmask || ( + xi.algoname[0] != '\0' && strcmp(xi.algoname, + xie.algoname) != 0) || xi.flags != xie.flags) + errx(EX_DATAERR, "The existing table is not compatible " + "with one you are creating."); + + /* Flush existing table if instructed to do so */ + if (orflush != 0 && table_flush(oh) != 0) + err(EX_OSERR, "Table flush on creation failed"); } /* From owner-svn-src-all@freebsd.org Mon Jul 1 11:47:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 657D515D7B6B; Mon, 1 Jul 2019 11:47:46 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AF8F7291F; Mon, 1 Jul 2019 11:47:46 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2F82C857; Mon, 1 Jul 2019 11:47:45 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61BljZo007050; Mon, 1 Jul 2019 11:47:45 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61BljPK007049; Mon, 1 Jul 2019 11:47:45 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201907011147.x61BljPK007049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 1 Jul 2019 11:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349576 - head/kerberos5/usr.bin/krb5-config X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/kerberos5/usr.bin/krb5-config X-SVN-Commit-Revision: 349576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0AF8F7291F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 11:47:46 -0000 Author: arichardson Date: Mon Jul 1 11:47:45 2019 New Revision: 349576 URL: https://svnweb.freebsd.org/changeset/base/349576 Log: Fix generation of krb5-config with LC_CTYPE=*.UTF-8 When building on MacOS with a UTF-8 locale sed will fail when reading krb-config.in due to invalid characters. Forcing the "C" locale fixes this. Reviewed By: emaste, cy Differential Revision: https://reviews.freebsd.org/D16849 Modified: head/kerberos5/usr.bin/krb5-config/Makefile Modified: head/kerberos5/usr.bin/krb5-config/Makefile ============================================================================== --- head/kerberos5/usr.bin/krb5-config/Makefile Mon Jul 1 10:15:52 2019 (r349575) +++ head/kerberos5/usr.bin/krb5-config/Makefile Mon Jul 1 11:47:45 2019 (r349576) @@ -5,8 +5,12 @@ MAN= krb5-config.1 CLEANFILES= krb5-config +# In order for this to work on MacOS we need to set LC_ALL=C since the +# krb5-config.in file contains characters that will be rejected by MacOS with +# a UTF-8 locale (see https://stackoverflow.com/a/23584470/894271) +# TODO: Should we just require LC_ALL=C during the build? krb5-config: krb5-config.in - sed -e "s,@PACKAGE@,FreeBSD heimdal,g" \ + env LC_ALL=C sed -e "s,@PACKAGE@,FreeBSD heimdal,g" \ -e "s,@VERSION@,1.1.0,g" \ -e "s,@prefix@,/usr,g" \ -e "s,@exec_prefix@,/usr,g" \ From owner-svn-src-all@freebsd.org Mon Jul 1 11:52:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB9AE15D7D60; Mon, 1 Jul 2019 11:52:55 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CFF672D18; Mon, 1 Jul 2019 11:52:55 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51A37C9FA; Mon, 1 Jul 2019 11:52:55 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61BqtPi012063; Mon, 1 Jul 2019 11:52:55 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61Bqs88012060; Mon, 1 Jul 2019 11:52:54 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201907011152.x61Bqs88012060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 1 Jul 2019 11:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349577 - in head: contrib/elftoolchain/common contrib/elftoolchain/libelftc lib/libelf X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: contrib/elftoolchain/common contrib/elftoolchain/libelftc lib/libelf X-SVN-Commit-Revision: 349577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8CFF672D18 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 11:52:56 -0000 Author: arichardson Date: Mon Jul 1 11:52:54 2019 New Revision: 349577 URL: https://svnweb.freebsd.org/changeset/base/349577 Log: Allow bootstrapping elftoolchain on MacOS and Linux This is required in order to build on non-FreeBSD systems without setting all the XAR/XSTRINGS/etc. variables Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D16771 Modified: head/contrib/elftoolchain/common/_elftc.h head/contrib/elftoolchain/libelftc/elftc_set_timestamps.c head/lib/libelf/Makefile Modified: head/contrib/elftoolchain/common/_elftc.h ============================================================================== --- head/contrib/elftoolchain/common/_elftc.h Mon Jul 1 11:47:45 2019 (r349576) +++ head/contrib/elftoolchain/common/_elftc.h Mon Jul 1 11:52:54 2019 (r349577) @@ -374,11 +374,14 @@ extern const char *__progname; #include #define htobe32(x) OSSwapHostToBigInt32(x) +#define htole32(x) OSSwapHostToLittleInt32(x) +#ifndef roundup2 #define roundup2 roundup +#endif -#define ELFTC_BYTE_ORDER _BYTE_ORDER -#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN -#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN +#define ELFTC_BYTE_ORDER __DARWIN_BYTE_ORDER +#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN +#define ELFTC_BYTE_ORDER_BIG_ENDIAN __DARWIN_BIG_ENDIAN #define ELFTC_HAVE_MMAP 1 #define ELFTC_HAVE_STRMODE 1 @@ -418,7 +421,9 @@ extern const char *__progname; /* Whether we need to supply {be,le}32dec. */ #define ELFTC_NEED_BYTEORDER_EXTENSIONS 1 +#ifndef roundup2 #define roundup2 roundup +#endif #endif /* __GLIBC__ || __linux__ */ Modified: head/contrib/elftoolchain/libelftc/elftc_set_timestamps.c ============================================================================== --- head/contrib/elftoolchain/libelftc/elftc_set_timestamps.c Mon Jul 1 11:47:45 2019 (r349576) +++ head/contrib/elftoolchain/libelftc/elftc_set_timestamps.c Mon Jul 1 11:52:54 2019 (r349577) @@ -37,7 +37,7 @@ ELFTC_VCSID("$Id$"); * stat'. */ -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) #define ATIME st_atimespec #define MTIME st_mtimespec #define LIBELFTC_HAVE_UTIMES 1 Modified: head/lib/libelf/Makefile ============================================================================== --- head/lib/libelf/Makefile Mon Jul 1 11:47:45 2019 (r349576) +++ head/lib/libelf/Makefile Mon Jul 1 11:52:54 2019 (r349577) @@ -79,6 +79,13 @@ INCS= libelf.h gelf.h # SRCS+= sys/elf32.h sys/elf64.h sys/elf_common.h +# Allow bootstrapping elftoolchain on Linux: +.if defined(BOOTSTRAPPING) && ${.MAKE.OS} == "Linux" +native-elf-format.h: + ${ELFTCDIR}/common/native-elf-format > ${.TARGET} || rm ${.TARGET} +SRCS+= native-elf-format.h +.endif + GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c CLEANFILES= ${GENSRCS} CLEANDIRS= sys From owner-svn-src-all@freebsd.org Mon Jul 1 13:41:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37A4E15DB13E; Mon, 1 Jul 2019 13:41:38 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9F7676D0F; Mon, 1 Jul 2019 13:41:37 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9B03DB0A; Mon, 1 Jul 2019 13:41:37 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61Dfb3P065339; Mon, 1 Jul 2019 13:41:37 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61Dfbco065338; Mon, 1 Jul 2019 13:41:37 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201907011341.x61Dfbco065338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 1 Jul 2019 13:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349578 - head/sys/dev/etherswitch/e6000sw X-SVN-Group: head X-SVN-Commit-Author: loos X-SVN-Commit-Paths: head/sys/dev/etherswitch/e6000sw X-SVN-Commit-Revision: 349578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D9F7676D0F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 13:41:38 -0000 Author: loos Date: Mon Jul 1 13:41:37 2019 New Revision: 349578 URL: https://svnweb.freebsd.org/changeset/base/349578 Log: Add support for the Marvell 88E6190 11 ports switch. With more ports, some of the registers are shifted a bit to accommodate. This switch also adds two high speed Serdes/SGMII interfaces (2.5 Gb/s). Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c head/sys/dev/etherswitch/e6000sw/e6000swreg.h Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Mon Jul 1 11:52:54 2019 (r349577) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Mon Jul 1 13:41:37 2019 (r349578) @@ -106,6 +106,8 @@ static int e6000sw_parse_fixed_link(e6000sw_softc_t *, static int e6000sw_parse_ethernet(e6000sw_softc_t *, phandle_t, uint32_t); static int e6000sw_attach(device_t); static int e6000sw_detach(device_t); +static int e6000sw_read_xmdio(device_t, int, int, int); +static int e6000sw_write_xmdio(device_t, int, int, int, int); static int e6000sw_readphy(device_t, int, int); static int e6000sw_writephy(device_t, int, int, int); static etherswitch_info_t* e6000sw_getinfo(device_t); @@ -205,16 +207,26 @@ e6000sw_probe(device_t dev) const char *description; phandle_t switch_node; + sc = device_get_softc(dev); switch_node = ofw_bus_find_compatible(OF_finddevice("/"), "marvell,mv88e6085"); + if (switch_node == 0) { + switch_node = ofw_bus_find_compatible(OF_finddevice("/"), + "marvell,mv88e6190"); - if (switch_node == 0) - return (ENXIO); + if (switch_node == 0) + return (ENXIO); + /* + * Trust DTS and fix the port register offset for the MV88E6190 + * detection bellow. + */ + sc->swid = MV88E6190; + } + if (bootverbose) device_printf(dev, "Found switch_node: 0x%x\n", switch_node); - sc = device_get_softc(dev); sc->dev = dev; sc->node = switch_node; @@ -230,7 +242,7 @@ e6000sw_probe(device_t dev) */ sx_init(&sc->sx, "e6000sw_tmp"); E6000SW_LOCK(sc); - sc->swid = e6000sw_readreg(sc, REG_PORT(0), SWITCH_ID) & 0xfff0; + sc->swid = e6000sw_readreg(sc, REG_PORT(sc, 0), SWITCH_ID) & 0xfff0; E6000SW_UNLOCK(sc); sx_destroy(&sc->sx); @@ -257,6 +269,10 @@ e6000sw_probe(device_t dev) description = "Marvell 88E6176"; sc->num_ports = 7; break; + case MV88E6190: + description = "Marvell 88E6190"; + sc->num_ports = 11; + break; default: device_printf(dev, "Unrecognized device, id 0x%x.\n", sc->swid); return (ENXIO); @@ -278,18 +294,16 @@ e6000sw_parse_fixed_link(e6000sw_softc_t *sc, phandle_ if (fixed_link != 0) { sc->fixed_mask |= (1 << port); - if (OF_getencprop(fixed_link, "speed", &speed, sizeof(speed))> 0) { - if (speed == 2500 && - (MVSWITCH(sc, MV88E6141) || - MVSWITCH(sc, MV88E6341))) - sc->fixed25_mask |= (1 << port); - } else { - device_printf(sc->dev, + if (OF_getencprop(fixed_link, + "speed", &speed, sizeof(speed)) < 0) { + device_printf(sc->dev, "Port %d has a fixed-link node without a speed " "property\n", port); - - return (ENXIO); + return (ENXIO); } + if (speed == 2500 && (MVSWITCH(sc, MV88E6141) || + MVSWITCH(sc, MV88E6341) || MVSWITCH(sc, MV88E6190))) + sc->fixed25_mask |= (1 << port); } return (0); @@ -383,9 +397,36 @@ e6000sw_attach_miibus(e6000sw_softc_t *sc, int port) return (0); } +static void +e6000sw_serdes_power(device_t dev, int port, bool sgmii) +{ + uint32_t reg; + + /* SGMII */ + reg = e6000sw_read_xmdio(dev, port, E6000SW_SERDES_DEV, + E6000SW_SERDES_SGMII_CTL); + if (sgmii) + reg &= ~E6000SW_SERDES_PDOWN; + else + reg |= E6000SW_SERDES_PDOWN; + e6000sw_write_xmdio(dev, port, E6000SW_SERDES_DEV, + E6000SW_SERDES_SGMII_CTL, reg); + + /* 10GBASE-R/10GBASE-X4/X2 */ + reg = e6000sw_read_xmdio(dev, port, E6000SW_SERDES_DEV, + E6000SW_SERDES_PCS_CTL1); + if (sgmii) + reg |= E6000SW_SERDES_PDOWN; + else + reg &= ~E6000SW_SERDES_PDOWN; + e6000sw_write_xmdio(dev, port, E6000SW_SERDES_DEV, + E6000SW_SERDES_PCS_CTL1, reg); +} + static int e6000sw_attach(device_t dev) { + bool sgmii; e6000sw_softc_t *sc; phandle_t child, ports; int err, port; @@ -436,28 +477,47 @@ e6000sw_attach(device_t dev) if (e6000sw_is_fixedport(sc, port)) { /* Link must be down to change speed force value. */ - reg = e6000sw_readreg(sc, REG_PORT(port), PSC_CONTROL); + reg = e6000sw_readreg(sc, REG_PORT(sc, port), + PSC_CONTROL); reg &= ~PSC_CONTROL_LINK_UP; reg |= PSC_CONTROL_FORCED_LINK; - e6000sw_writereg(sc, REG_PORT(port), PSC_CONTROL, reg); + e6000sw_writereg(sc, REG_PORT(sc, port), PSC_CONTROL, + reg); /* * Force speed, full-duplex, EEE off and flow-control * on. */ reg &= ~(PSC_CONTROL_SPD2500 | PSC_CONTROL_ALT_SPD | + PSC_CONTROL_FORCED_FC | PSC_CONTROL_FC_ON | PSC_CONTROL_FORCED_EEE); if (e6000sw_is_fixed25port(sc, port)) reg |= PSC_CONTROL_SPD2500; else reg |= PSC_CONTROL_SPD1000; + if (MVSWITCH(sc, MV88E6190) && + e6000sw_is_fixed25port(sc, port)) + reg |= PSC_CONTROL_ALT_SPD; reg |= PSC_CONTROL_FORCED_DPX | PSC_CONTROL_FULLDPX | PSC_CONTROL_FORCED_LINK | PSC_CONTROL_LINK_UP | - PSC_CONTROL_FORCED_FC | PSC_CONTROL_FC_ON | PSC_CONTROL_FORCED_SPD; - if (MVSWITCH(sc, MV88E6141) || MVSWITCH(sc, MV88E6341)) - reg |= PSC_CONTROL_FORCED_EEE; - e6000sw_writereg(sc, REG_PORT(port), PSC_CONTROL, reg); + if (!MVSWITCH(sc, MV88E6190)) + reg |= PSC_CONTROL_FORCED_FC | PSC_CONTROL_FC_ON; + if (MVSWITCH(sc, MV88E6141) || + MVSWITCH(sc, MV88E6341) || + MVSWITCH(sc, MV88E6190)) + reg |= PSC_CONTROL_FORCED_EEE; + e6000sw_writereg(sc, REG_PORT(sc, port), PSC_CONTROL, + reg); + /* Power on the SERDES interfaces. */ + if (MVSWITCH(sc, MV88E6190) && + (port == 9 || port == 10)) { + if (e6000sw_is_fixed25port(sc, port)) + sgmii = false; + else + sgmii = true; + e6000sw_serdes_power(sc->dev, port, sgmii); + } } /* Don't attach miibus at CPU/fixed ports */ @@ -510,6 +570,79 @@ e6000sw_waitready(e6000sw_softc_t *sc, uint32_t phy, u return (1); } +/* XMDIO/Clause 45 access. */ +static int +e6000sw_read_xmdio(device_t dev, int phy, int devaddr, int devreg) +{ + e6000sw_softc_t *sc; + uint32_t reg; + + sc = device_get_softc(dev); + E6000SW_LOCK_ASSERT(sc, SA_XLOCKED); + if (E6000SW_WAITREADY2(sc, SMI_PHY_CMD_REG, SMI_CMD_BUSY)) { + device_printf(dev, "Timeout while waiting for switch\n"); + return (ETIMEDOUT); + } + + reg = devaddr & SMI_CMD_REG_ADDR_MASK; + reg |= (phy << SMI_CMD_DEV_ADDR) & SMI_CMD_DEV_ADDR_MASK; + + /* Load C45 register address. */ + e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_DATA_REG, devreg); + e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_CMD_REG, + reg | SMI_CMD_OP_C45_ADDR); + if (E6000SW_WAITREADY2(sc, SMI_PHY_CMD_REG, SMI_CMD_BUSY)) { + device_printf(dev, "Timeout while waiting for switch\n"); + return (ETIMEDOUT); + } + + /* Start C45 read operation. */ + e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_CMD_REG, + reg | SMI_CMD_OP_C45_READ); + if (E6000SW_WAITREADY2(sc, SMI_PHY_CMD_REG, SMI_CMD_BUSY)) { + device_printf(dev, "Timeout while waiting for switch\n"); + return (ETIMEDOUT); + } + + /* Read C45 data. */ + reg = e6000sw_readreg(sc, REG_GLOBAL2, SMI_PHY_DATA_REG); + + return (reg & PHY_DATA_MASK); +} + +static int +e6000sw_write_xmdio(device_t dev, int phy, int devaddr, int devreg, int val) +{ + e6000sw_softc_t *sc; + uint32_t reg; + + sc = device_get_softc(dev); + E6000SW_LOCK_ASSERT(sc, SA_XLOCKED); + if (E6000SW_WAITREADY2(sc, SMI_PHY_CMD_REG, SMI_CMD_BUSY)) { + device_printf(dev, "Timeout while waiting for switch\n"); + return (ETIMEDOUT); + } + + reg = devaddr & SMI_CMD_REG_ADDR_MASK; + reg |= (phy << SMI_CMD_DEV_ADDR) & SMI_CMD_DEV_ADDR_MASK; + + /* Load C45 register address. */ + e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_DATA_REG, devreg); + e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_CMD_REG, + reg | SMI_CMD_OP_C45_ADDR); + if (E6000SW_WAITREADY2(sc, SMI_PHY_CMD_REG, SMI_CMD_BUSY)) { + device_printf(dev, "Timeout while waiting for switch\n"); + return (ETIMEDOUT); + } + + /* Load data and start the C45 write operation. */ + e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_DATA_REG, devreg); + e6000sw_writereg(sc, REG_GLOBAL2, SMI_PHY_CMD_REG, + reg | SMI_CMD_OP_C45_WRITE); + + return (0); +} + /* * PHY registers are paged. Put page index in reg 22 (accessible from every * page), then access specific register. @@ -670,7 +803,7 @@ e6000sw_getport(device_t dev, etherswitch_port_t *p) e6000sw_get_pvid(sc, p->es_port, &p->es_pvid); /* Port flags. */ - reg = e6000sw_readreg(sc, REG_PORT(p->es_port), PORT_CONTROL2); + reg = e6000sw_readreg(sc, REG_PORT(sc, p->es_port), PORT_CONTROL2); if (reg & PORT_CONTROL2_DISC_TAGGED) p->es_flags |= ETHERSWITCH_PORT_DROPTAGGED; if (reg & PORT_CONTROL2_DISC_UNTAGGED) @@ -717,7 +850,7 @@ e6000sw_setport(device_t dev, etherswitch_port_t *p) return (0); /* Port flags. */ - reg = e6000sw_readreg(sc, REG_PORT(p->es_port), PORT_CONTROL2); + reg = e6000sw_readreg(sc, REG_PORT(sc, p->es_port), PORT_CONTROL2); if (p->es_flags & ETHERSWITCH_PORT_DROPTAGGED) reg |= PORT_CONTROL2_DISC_TAGGED; else @@ -726,7 +859,7 @@ e6000sw_setport(device_t dev, etherswitch_port_t *p) reg |= PORT_CONTROL2_DISC_UNTAGGED; else reg &= ~PORT_CONTROL2_DISC_UNTAGGED; - e6000sw_writereg(sc, REG_PORT(p->es_port), PORT_CONTROL2, reg); + e6000sw_writereg(sc, REG_PORT(sc, p->es_port), PORT_CONTROL2, reg); err = 0; E6000SW_LOCK(sc); @@ -748,15 +881,15 @@ e6000sw_port_vlan_assign(e6000sw_softc_t *sc, int port { uint32_t reg; - reg = e6000sw_readreg(sc, REG_PORT(port), PORT_VLAN_MAP); + reg = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_VLAN_MAP); reg &= ~(PORT_MASK(sc) | PORT_VLAN_MAP_FID_MASK); reg |= members & PORT_MASK(sc) & ~(1 << port); reg |= (fid << PORT_VLAN_MAP_FID) & PORT_VLAN_MAP_FID_MASK; - e6000sw_writereg(sc, REG_PORT(port), PORT_VLAN_MAP, reg); - reg = e6000sw_readreg(sc, REG_PORT(port), PORT_CONTROL1); + e6000sw_writereg(sc, REG_PORT(sc, port), PORT_VLAN_MAP, reg); + reg = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_CONTROL1); reg &= ~PORT_CONTROL1_FID_MASK; reg |= (fid >> 4) & PORT_CONTROL1_FID_MASK; - e6000sw_writereg(sc, REG_PORT(port), PORT_CONTROL1, reg); + e6000sw_writereg(sc, REG_PORT(sc, port), PORT_CONTROL1, reg); } static int @@ -767,8 +900,8 @@ e6000sw_init_vlan(struct e6000sw_softc *sc) /* Disable all ports */ for (port = 0; port < sc->num_ports; port++) { - ret = e6000sw_readreg(sc, REG_PORT(port), PORT_CONTROL); - e6000sw_writereg(sc, REG_PORT(port), PORT_CONTROL, + ret = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_CONTROL); + e6000sw_writereg(sc, REG_PORT(sc, port), PORT_CONTROL, (ret & ~PORT_CONTROL_ENABLE)); } @@ -777,23 +910,23 @@ e6000sw_init_vlan(struct e6000sw_softc *sc) for (port = 0; port < sc->num_ports; port++) { /* Reset the egress and frame mode. */ - ret = e6000sw_readreg(sc, REG_PORT(port), PORT_CONTROL); + ret = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_CONTROL); ret &= ~(PORT_CONTROL_EGRESS | PORT_CONTROL_FRAME); - e6000sw_writereg(sc, REG_PORT(port), PORT_CONTROL, ret); + e6000sw_writereg(sc, REG_PORT(sc, port), PORT_CONTROL, ret); /* Set the the 802.1q mode. */ - ret = e6000sw_readreg(sc, REG_PORT(port), PORT_CONTROL2); + ret = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_CONTROL2); ret &= ~PORT_CONTROL2_DOT1Q; if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) ret |= PORT_CONTROL2_DOT1Q; - e6000sw_writereg(sc, REG_PORT(port), PORT_CONTROL2, ret); + e6000sw_writereg(sc, REG_PORT(sc, port), PORT_CONTROL2, ret); } for (port = 0; port < sc->num_ports; port++) { if (!e6000sw_is_portenabled(sc, port)) continue; - ret = e6000sw_readreg(sc, REG_PORT(port), PORT_VID); + ret = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_VID); /* Set port priority */ ret &= ~PORT_VID_PRIORITY_MASK; @@ -804,7 +937,7 @@ e6000sw_init_vlan(struct e6000sw_softc *sc) ret |= 1; else ret |= (port + 1); - e6000sw_writereg(sc, REG_PORT(port), PORT_VID, ret); + e6000sw_writereg(sc, REG_PORT(sc, port), PORT_VID, ret); } /* Assign the member ports to each origin port. */ @@ -835,8 +968,8 @@ e6000sw_init_vlan(struct e6000sw_softc *sc) for (port = 0; port < sc->num_ports; port++) { if (!e6000sw_is_portenabled(sc, port)) continue; - ret = e6000sw_readreg(sc, REG_PORT(port), PORT_CONTROL); - e6000sw_writereg(sc, REG_PORT(port), PORT_CONTROL, + ret = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_CONTROL); + e6000sw_writereg(sc, REG_PORT(sc, port), PORT_CONTROL, (ret | PORT_CONTROL_ENABLE)); } @@ -873,9 +1006,11 @@ e6000sw_set_vlan_mode(struct e6000sw_softc *sc, uint32 static int e6000sw_readreg_wrapper(device_t dev, int addr_reg) { + e6000sw_softc_t *sc; + sc = device_get_softc(dev); if ((addr_reg > (REG_GLOBAL2 * 32 + REG_NUM_MAX)) || - (addr_reg < (REG_PORT(0) * 32))) { + (addr_reg < (REG_PORT(sc, 0) * 32))) { device_printf(dev, "Wrong register address.\n"); return (EINVAL); } @@ -887,9 +1022,11 @@ e6000sw_readreg_wrapper(device_t dev, int addr_reg) static int e6000sw_writereg_wrapper(device_t dev, int addr_reg, int val) { + e6000sw_softc_t *sc; + sc = device_get_softc(dev); if ((addr_reg > (REG_GLOBAL2 * 32 + REG_NUM_MAX)) || - (addr_reg < (REG_PORT(0) * 32))) { + (addr_reg < (REG_PORT(sc, 0) * 32))) { device_printf(dev, "Wrong register address.\n"); return (EINVAL); } @@ -1049,11 +1186,11 @@ e6000sw_get_port_vlan(e6000sw_softc_t *sc, etherswitch return (0); } - reg = e6000sw_readreg(sc, REG_PORT(port), PORT_VLAN_MAP); + reg = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_VLAN_MAP); vg->es_untagged_ports = vg->es_member_ports = reg & PORT_MASK(sc); vg->es_vid = port | ETHERSWITCH_VID_VALID; vg->es_fid = (reg & PORT_VLAN_MAP_FID_MASK) >> PORT_VLAN_MAP_FID; - reg = e6000sw_readreg(sc, REG_PORT(port), PORT_CONTROL1); + reg = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_CONTROL1); vg->es_fid |= (reg & PORT_CONTROL1_FID_MASK) << 4; return (0); @@ -1268,10 +1405,10 @@ e6000sw_set_pvid(e6000sw_softc_t *sc, int port, int pv { uint32_t reg; - reg = e6000sw_readreg(sc, REG_PORT(port), PORT_VID); + reg = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_VID); reg &= ~PORT_VID_DEF_VID_MASK; reg |= (pvid & PORT_VID_DEF_VID_MASK); - e6000sw_writereg(sc, REG_PORT(port), PORT_VID, reg); + e6000sw_writereg(sc, REG_PORT(sc, port), PORT_VID, reg); } static __inline int @@ -1281,7 +1418,7 @@ e6000sw_get_pvid(e6000sw_softc_t *sc, int port, int *p if (pvid == NULL) return (ENXIO); - *pvid = e6000sw_readreg(sc, REG_PORT(port), PORT_VID) & + *pvid = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_VID) & PORT_VID_DEF_VID_MASK; return (0); @@ -1346,7 +1483,7 @@ e6000sw_tick(void *arg) if (mii == NULL) continue; - portstatus = e6000sw_readreg(sc, REG_PORT(port), + portstatus = e6000sw_readreg(sc, REG_PORT(sc, port), PORT_STATUS); e6000sw_update_ifmedia(portstatus, Modified: head/sys/dev/etherswitch/e6000sw/e6000swreg.h ============================================================================== --- head/sys/dev/etherswitch/e6000sw/e6000swreg.h Mon Jul 1 11:52:54 2019 (r349577) +++ head/sys/dev/etherswitch/e6000sw/e6000swreg.h Mon Jul 1 13:41:37 2019 (r349578) @@ -48,6 +48,7 @@ struct atu_opt { #define MV88E6352 0x3520 #define MV88E6172 0x1720 #define MV88E6176 0x1760 +#define MV88E6190 0x1900 #define MVSWITCH(_sc, id) ((_sc)->swid == (id)) #define MVSWITCH_MULTICHIP(_sc) ((_sc)->sw_addr != 0) @@ -57,7 +58,7 @@ struct atu_opt { */ #define REG_GLOBAL 0x1b #define REG_GLOBAL2 0x1c -#define REG_PORT(p) (0x10 + (p)) +#define REG_PORT(_sc, p) ((MVSWITCH((_sc), MV88E6190) ? 0 : 0x10) + (p)) #define REG_NUM_MAX 31 @@ -139,13 +140,13 @@ struct atu_opt { #define VTU_DATA 7 #define VTU_DATA2 8 -#define VTU_FID_MASK(_sc) 0xff +#define VTU_FID_MASK(_sc) (MVSWITCH((_sc), MV88E6190) ? 0xfff : 0xff) #define VTU_FID_POLICY (1 << 12) #define VTU_PORT_UNMODIFIED 0 #define VTU_PORT_UNTAGGED 1 #define VTU_PORT_TAGGED 2 #define VTU_PORT_DISCARD 3 -#define VTU_PPREG(_sc) 4 +#define VTU_PPREG(_sc) (MVSWITCH((_sc), MV88E6190) ? 8 : 4) #define VTU_PORT(_sc, p) (((p) % VTU_PPREG(_sc)) * (16 / VTU_PPREG(_sc))) #define VTU_PORT_MASK 3 #define VTU_BUSY (1 << 15) @@ -175,7 +176,7 @@ struct atu_opt { #define ATU_MAC_ADDR45 15 #define ATU_DATA_LAG (1 << 15) -#define ATU_PORT_MASK(_sc) 0xff0 +#define ATU_PORT_MASK(_sc) (MVSWITCH((_sc), MV88E6190) ? 0xfff0 : 0xff0) #define ATU_PORT_SHIFT 4 #define ATU_LAG_MASK 0xf0 #define ATU_LAG_SHIFT 4 From owner-svn-src-all@freebsd.org Mon Jul 1 15:43:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF66515DDEBA; Mon, 1 Jul 2019 15:43:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9485B84733; Mon, 1 Jul 2019 15:43:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67A92F0F9; Mon, 1 Jul 2019 15:43:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61Fhmhu036114; Mon, 1 Jul 2019 15:43:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61FhmNZ036113; Mon, 1 Jul 2019 15:43:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907011543.x61FhmNZ036113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 1 Jul 2019 15:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349579 - head/sys/dev/nctgpio X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/nctgpio X-SVN-Commit-Revision: 349579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9485B84733 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 15:43:49 -0000 Author: avg Date: Mon Jul 1 15:43:48 2019 New Revision: 349579 URL: https://svnweb.freebsd.org/changeset/base/349579 Log: nctgpio: change default pin names to those used by the datasheet(s) That is, instead of the current GPIO00 - GPIO15 the names will be GPIO00 - GPIO07, GPIO10 - GPIO17. The first digit is a GPIO "bank" / group number and the second one is a pin number within the bank. Alternative view is that the pin names are changed from decimal numbering scheme to octal one (as there are 8 pins per bank). Discussed with: cem, gonzo MFC after: 2 weeks Modified: head/sys/dev/nctgpio/nctgpio.c Modified: head/sys/dev/nctgpio/nctgpio.c ============================================================================== --- head/sys/dev/nctgpio/nctgpio.c Mon Jul 1 13:41:37 2019 (r349578) +++ head/sys/dev/nctgpio/nctgpio.c Mon Jul 1 15:43:48 2019 (r349579) @@ -529,7 +529,7 @@ nct_attach(device_t dev) pin->gp_caps = NCT_GPIO_CAPS; pin->gp_flags = 0; - snprintf(pin->gp_name, GPIOMAXNAME, "GPIO%02u", i); + snprintf(pin->gp_name, GPIOMAXNAME, "GPIO%02o", i); pin->gp_name[GPIOMAXNAME - 1] = '\0'; if (nct_pin_is_input(sc, i)) From owner-svn-src-all@freebsd.org Mon Jul 1 17:05:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B366115DFEAC; Mon, 1 Jul 2019 17:05:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CEB087C6B; Mon, 1 Jul 2019 17:05:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16422FEF2; Mon, 1 Jul 2019 17:05:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61H5gUd079211; Mon, 1 Jul 2019 17:05:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61H5gCl079204; Mon, 1 Jul 2019 17:05:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907011705.x61H5gCl079204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 1 Jul 2019 17:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349580 - in head/sys: amd64/conf conf dev/superio i386/conf modules modules/superio X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys: amd64/conf conf dev/superio i386/conf modules modules/superio X-SVN-Commit-Revision: 349580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4CEB087C6B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 17:05:44 -0000 Author: avg Date: Mon Jul 1 17:05:41 2019 New Revision: 349580 URL: https://svnweb.freebsd.org/changeset/base/349580 Log: add superio driver The goal of this driver is consolidate information about SuperIO chips and to provide for peaceful coexistence of drivers that need to access SuperIO configuration registers. While SuperIO chips can host various functions most of them are discoverable and accessible without any knowledge of the SuperIO. Examples are: keyboard and mouse controllers, UARTs, floppy disk controllers. SuperIO-s also provide non-standard functions such as GPIO, watchdog timers and hardware monitoring. Such functions do require drivers with a knowledge of a specific SuperIO. At this time the driver supports a number of ITE and Nuvoton (fka Winbond) SuperIO chips. There is a single driver for all devices. So, I have not done the usual split between the hardware driver and the bus functionality. Although, superio does act as a bus for devices that represent known non-standard functions of a SuperIO chip. The bus provides enumeration of child devices based on the hardcoded knowledge of such functions. The knowledge as extracted from datasheets and other drivers. As there is a single driver, I have not defined a kobj interface for it. So, its interface is currently made of simple functions. I think that we can the flexibility (and complications) when we actually need it. I am planning to convert nctgpio and wbwd to superio bus very soon. Also, I am working on itwd driver (watchdog in ITE SuperIO-s). Additionally, there is ithwm driver based on the reverted sensors import, but I am not sure how to integrate it given that we still lack any sensors interface. Discussed with: imp, jhb MFC after: 7 weeks Differential Revision: https://reviews.freebsd.org/D8175 Added: head/sys/dev/superio/ head/sys/dev/superio/superio.c (contents, props changed) head/sys/dev/superio/superio.h (contents, props changed) head/sys/modules/superio/ head/sys/modules/superio/Makefile (contents, props changed) Modified: head/sys/amd64/conf/NOTES head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/i386/conf/NOTES head/sys/modules/Makefile Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Mon Jul 1 15:43:48 2019 (r349579) +++ head/sys/amd64/conf/NOTES Mon Jul 1 17:05:41 2019 (r349580) @@ -567,6 +567,11 @@ device amdtemp device cpuctl # +# SuperIO driver. +# +device superio + +# # System Management Bus (SMB) # options ENABLE_ALART # Control alarm on Intel intpm driver Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Jul 1 15:43:48 2019 (r349579) +++ head/sys/conf/files.amd64 Mon Jul 1 17:05:41 2019 (r349580) @@ -493,6 +493,7 @@ dev/smartpqi/smartpqi_response.c optional smartpqi dev/smartpqi/smartpqi_sis.c optional smartpqi dev/smartpqi/smartpqi_tag.c optional smartpqi dev/speaker/spkr.c optional speaker +dev/superio/superio.c optional superio isa dev/syscons/apm/apm_saver.c optional apm_saver apm dev/syscons/scvesactl.c optional sc vga vesa dev/syscons/scvgarndr.c optional sc vga Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Mon Jul 1 15:43:48 2019 (r349579) +++ head/sys/conf/files.i386 Mon Jul 1 17:05:41 2019 (r349580) @@ -312,6 +312,7 @@ dev/sio/sio_pccard.c optional sio pccard dev/sio/sio_pci.c optional sio pci dev/sio/sio_puc.c optional sio puc dev/speaker/spkr.c optional speaker +dev/superio/superio.c optional superio isa dev/syscons/apm/apm_saver.c optional apm_saver apm dev/syscons/scvesactl.c optional sc vga vesa dev/syscons/scvgarndr.c optional sc vga Added: head/sys/dev/superio/superio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/superio/superio.c Mon Jul 1 17:05:41 2019 (r349580) @@ -0,0 +1,953 @@ +/* + * Copyright (c) 2016 Andriy Gapon + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include "isa_if.h" + + +typedef void (*sio_conf_enter_f)(struct resource*, uint16_t); +typedef void (*sio_conf_exit_f)(struct resource*, uint16_t); + +struct sio_conf_methods { + sio_conf_enter_f enter; + sio_conf_exit_f exit; + superio_vendor_t vendor; +}; + +struct sio_device { + uint8_t ldn; + superio_dev_type_t type; +}; + +struct superio_devinfo { + STAILQ_ENTRY(superio_devinfo) link; + struct resource_list resources; + device_t dev; + uint8_t ldn; + superio_dev_type_t type; + uint16_t iobase; + uint16_t iobase2; + uint8_t irq; + uint8_t dma; +}; + +struct siosc { + struct mtx conf_lock; + STAILQ_HEAD(, superio_devinfo) devlist; + struct resource* io_res; + int io_rid; + uint16_t io_port; + const struct sio_conf_methods *methods; + const struct sio_device *known_devices; + superio_vendor_t vendor; + uint16_t devid; + uint8_t revid; + uint8_t current_ldn; + uint8_t ldn_reg; + uint8_t enable_reg; +}; + +#define NUMPORTS 2 + +static uint8_t +sio_read(struct resource* res, uint8_t reg) +{ + bus_write_1(res, 0, reg); + return (bus_read_1(res, 1)); +} + +/* Read a word from two one-byte registers, big endian. */ +static uint16_t +sio_readw(struct resource* res, uint8_t reg) +{ + uint16_t v; + + v = sio_read(res, reg); + v <<= 8; + v |= sio_read(res, reg + 1); + return (v); +} + +static void +sio_write(struct resource* res, uint8_t reg, uint8_t val) +{ + bus_write_1(res, 0, reg); + bus_write_1(res, 1, val); +} + +static void +sio_ldn_select(struct siosc *sc, uint8_t ldn) +{ + mtx_assert(&sc->conf_lock, MA_OWNED); + if (ldn == sc->current_ldn) + return; + sio_write(sc->io_res, sc->ldn_reg, ldn); + sc->current_ldn = ldn; +} + +static uint8_t +sio_ldn_read(struct siosc *sc, uint8_t ldn, uint8_t reg) +{ + mtx_assert(&sc->conf_lock, MA_OWNED); + if (reg >= sc->enable_reg) { + sio_ldn_select(sc, ldn); + KASSERT(sc->current_ldn == ldn, ("sio_ldn_select failed")); + } + return (sio_read(sc->io_res, reg)); +} + +static uint16_t +sio_ldn_readw(struct siosc *sc, uint8_t ldn, uint8_t reg) +{ + mtx_assert(&sc->conf_lock, MA_OWNED); + if (reg >= sc->enable_reg) { + sio_ldn_select(sc, ldn); + KASSERT(sc->current_ldn == ldn, ("sio_ldn_select failed")); + } + return (sio_readw(sc->io_res, reg)); +} + +static void +sio_ldn_write(struct siosc *sc, uint8_t ldn, uint8_t reg, uint8_t val) +{ + mtx_assert(&sc->conf_lock, MA_OWNED); + if (reg <= sc->ldn_reg) { + printf("ignored attempt to write special register 0x%x\n", reg); + return; + } + sio_ldn_select(sc, ldn); + KASSERT(sc->current_ldn == ldn, ("sio_ldn_select failed")); + sio_write(sc->io_res, reg, val); +} + +static void +sio_conf_enter(struct siosc *sc) +{ + mtx_lock(&sc->conf_lock); + sc->methods->enter(sc->io_res, sc->io_port); +} + +static void +sio_conf_exit(struct siosc *sc) +{ + sc->methods->exit(sc->io_res, sc->io_port); + mtx_unlock(&sc->conf_lock); +} + +static void +ite_conf_enter(struct resource* res, uint16_t port) +{ + bus_write_1(res, 0, 0x87); + bus_write_1(res, 0, 0x01); + bus_write_1(res, 0, 0x55); + bus_write_1(res, 0, port == 0x2e ? 0x55 : 0xaa); +} + +static void +ite_conf_exit(struct resource* res, uint16_t port) +{ + sio_write(res, 0x02, 0x02); +} + +static const struct sio_conf_methods ite_conf_methods = { + .enter = ite_conf_enter, + .exit = ite_conf_exit, + .vendor = SUPERIO_VENDOR_ITE +}; + +static void +nvt_conf_enter(struct resource* res, uint16_t port) +{ + bus_write_1(res, 0, 0x87); + bus_write_1(res, 0, 0x87); +} + +static void +nvt_conf_exit(struct resource* res, uint16_t port) +{ + bus_write_1(res, 0, 0xaa); +} + +static const struct sio_conf_methods nvt_conf_methods = { + .enter = nvt_conf_enter, + .exit = nvt_conf_exit, + .vendor = SUPERIO_VENDOR_NUVOTON +}; + +static const struct sio_conf_methods * const methods_table[] = { + &ite_conf_methods, + &nvt_conf_methods, + NULL +}; + +static const uint16_t ports_table[] = { + 0x2e, 0x4e, 0 +}; + +const struct sio_device ite_devices[] = { + { .ldn = 4, .type = SUPERIO_DEV_HWM }, + { .ldn = 7, .type = SUPERIO_DEV_WDT }, + { .type = SUPERIO_DEV_NONE }, +}; + +const struct sio_device nvt_devices[] = { + { .ldn = 8, .type = SUPERIO_DEV_WDT }, + { .type = SUPERIO_DEV_NONE }, +}; + +const struct sio_device nct5104_devices[] = { + { .ldn = 7, .type = SUPERIO_DEV_GPIO }, + { .ldn = 8, .type = SUPERIO_DEV_WDT }, + { .ldn = 15, .type = SUPERIO_DEV_GPIO }, + { .type = SUPERIO_DEV_NONE }, +}; + +static const struct { + superio_vendor_t vendor; + uint16_t devid; + uint16_t mask; + const char *descr; + const struct sio_device *devices; +} superio_table[] = { + { + .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8712, + .devices = ite_devices, + }, + { + .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8716, + .devices = ite_devices, + }, + { + .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8718, + .devices = ite_devices, + }, + { + .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8720, + .devices = ite_devices, + }, + { + .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8721, + .devices = ite_devices, + }, + { + .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8726, + .devices = ite_devices, + }, + { + .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8728, + .devices = ite_devices, + }, + { + .vendor = SUPERIO_VENDOR_ITE, .devid = 0x8771, + .devices = ite_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0x1061, .mask = 0x00, + .descr = "Nuvoton NCT5104D/NCT6102D/NCT6106D (rev. A)", + .devices = nct5104_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0x5200, .mask = 0xff, + .descr = "Winbond 83627HF/F/HG/G", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0x5900, .mask = 0xff, + .descr = "Winbond 83627S", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0x6000, .mask = 0xff, + .descr = "Winbond 83697HF", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0x6800, .mask = 0xff, + .descr = "Winbond 83697UG", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0x7000, .mask = 0xff, + .descr = "Winbond 83637HF", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0x8200, .mask = 0xff, + .descr = "Winbond 83627THF", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0x8500, .mask = 0xff, + .descr = "Winbond 83687THF", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0x8800, .mask = 0xff, + .descr = "Winbond 83627EHF", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xa000, .mask = 0xff, + .descr = "Winbond 83627DHG", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xa200, .mask = 0xff, + .descr = "Winbond 83627UHG", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xa500, .mask = 0xff, + .descr = "Winbond 83667HG", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xb000, .mask = 0xff, + .descr = "Winbond 83627DHG-P", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xb300, .mask = 0xff, + .descr = "Winbond 83667HG-B", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xb400, .mask = 0xff, + .descr = "Nuvoton NCT6775", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xc300, .mask = 0xff, + .descr = "Nuvoton NCT6776", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xc400, .mask = 0xff, + .descr = "Nuvoton NCT5104D/NCT6102D/NCT6106D (rev. B+)", + .devices = nct5104_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xc500, .mask = 0xff, + .descr = "Nuvoton NCT6779", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xc800, .mask = 0xff, + .descr = "Nuvoton NCT6791", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xc900, .mask = 0xff, + .descr = "Nuvoton NCT6792", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xd100, .mask = 0xff, + .descr = "Nuvoton NCT6793", + .devices = nvt_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xd300, .mask = 0xff, + .descr = "Nuvoton NCT6795", + .devices = nvt_devices, + }, + { 0, 0 } +}; + +static const char * +devtype_to_str(superio_dev_type_t type) +{ + switch (type) { + case SUPERIO_DEV_NONE: + return ("invalid"); + case SUPERIO_DEV_HWM: + return ("HWM"); + case SUPERIO_DEV_WDT: + return ("WDT"); + case SUPERIO_DEV_GPIO: + return ("GPIO"); + case SUPERIO_DEV_MAX: + return ("invalid"); + } +} + +static int +superio_detect(device_t dev, bool claim, struct siosc *sc) +{ + struct resource *res; + rman_res_t port; + rman_res_t count; + uint16_t devid; + uint8_t revid; + int error; + int rid; + int i, m; + + error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &port, &count); + if (error != 0) + return (error); + if (port > UINT16_MAX || count < NUMPORTS) { + device_printf(dev, "unexpected I/O range size\n"); + return (ENXIO); + } + + /* + * Make a temporary resource reservation for hardware probing. + * If we can't get the resources we need then + * we need to abort. Possibly this indicates + * the resources were used by another device + * in which case the probe would have failed anyhow. + */ + rid = 0; + res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); + if (res == NULL) { + if (claim) + device_printf(dev, "failed to allocate I/O resource\n"); + return (ENXIO); + } + + for (m = 0; methods_table[m] != NULL; m++) { + methods_table[m]->enter(res, port); + if (methods_table[m]->vendor == SUPERIO_VENDOR_ITE) { + devid = sio_readw(res, 0x20); + revid = sio_read(res, 0x22); + } else if (methods_table[m]->vendor == SUPERIO_VENDOR_NUVOTON) { + devid = sio_read(res, 0x20); + revid = sio_read(res, 0x21); + devid = (devid << 8) | revid; + } else { + continue; + } + methods_table[m]->exit(res, port); + for (i = 0; superio_table[i].vendor != 0; i++) { + uint16_t mask; + + mask = superio_table[i].mask; + if (superio_table[i].vendor != + methods_table[m]->vendor) + continue; + if ((superio_table[i].devid & ~mask) != (devid & ~mask)) + continue; + break; + } + + /* Found a matching SuperIO entry. */ + if (superio_table[i].vendor != 0) + break; + } + + if (methods_table[m] == NULL) + error = ENXIO; + else + error = 0; + if (!claim || error != 0) { + bus_release_resource(dev, SYS_RES_IOPORT, rid, res); + return (error); + } + + sc->methods = methods_table[m]; + sc->vendor = sc->methods->vendor; + sc->known_devices = superio_table[i].devices; + sc->io_res = res; + sc->io_rid = rid; + sc->io_port = port; + sc->devid = devid; + sc->revid = revid; + + KASSERT(sc->vendor == SUPERIO_VENDOR_ITE || + sc->vendor == SUPERIO_VENDOR_NUVOTON, + ("Only ITE and Nuvoton SuperIO-s are supported")); + sc->ldn_reg = 0x07; + sc->enable_reg = 0x30; + sc->current_ldn = 0xff; /* no device should have this */ + + if (superio_table[i].descr != NULL) { + device_set_desc(dev, superio_table[i].descr); + } else if (sc->vendor == SUPERIO_VENDOR_ITE) { + char descr[64]; + + snprintf(descr, sizeof(descr), + "ITE IT%4x SuperIO (revision 0x%02x)", + sc->devid, sc->revid); + device_set_desc_copy(dev, descr); + } + return (0); +} + +static void +superio_identify(driver_t *driver, device_t parent) +{ + device_t child; + int i; + + /* + * Don't create child devices if any already exist. + * Those could be created via isa hints or if this + * driver is loaded, unloaded and then loaded again. + */ + if (device_find_child(parent, "superio", -1)) { + if (bootverbose) + printf("superio: device(s) already created\n"); + return; + } + + /* + * Create a child for each candidate port. + * It would be nice if we could somehow clean up those + * that this driver fails to probe. + */ + for (i = 0; ports_table[i] != 0; i++) { + child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, + "superio", -1); + if (child == NULL) { + device_printf(parent, "failed to add superio child\n"); + continue; + } + bus_set_resource(child, SYS_RES_IOPORT, 0, ports_table[i], 2); + if (superio_detect(child, false, NULL) != 0) + device_delete_child(parent, child); + } +} + +static int +superio_probe(device_t dev) +{ + struct siosc *sc; + int error; + + /* Make sure we do not claim some ISA PNP device. */ + if (isa_get_logicalid(dev) != 0) + return (ENXIO); + + /* + * XXX We can populate the softc now only because we return + * BUS_PROBE_SPECIFIC + */ + sc = device_get_softc(dev); + error = superio_detect(dev, true, sc); + if (error != 0) + return (error); + return (BUS_PROBE_SPECIFIC); +} + +static void +superio_add_known_child(device_t dev, superio_dev_type_t type, uint8_t ldn) +{ + struct siosc *sc = device_get_softc(dev); + struct superio_devinfo *dinfo; + device_t child; + + child = BUS_ADD_CHILD(dev, 0, NULL, -1); + if (child == NULL) { + device_printf(dev, "failed to add child for ldn %d, type %s\n", + ldn, devtype_to_str(type)); + return; + } + dinfo = device_get_ivars(child); + dinfo->ldn = ldn; + dinfo->type = type; + sio_conf_enter(sc); + dinfo->iobase = sio_ldn_readw(sc, ldn, 0x60); + dinfo->iobase2 = sio_ldn_readw(sc, ldn, 0x62); + dinfo->irq = sio_ldn_readw(sc, ldn, 0x70); + dinfo->dma = sio_ldn_readw(sc, ldn, 0x74); + sio_conf_exit(sc); + STAILQ_INSERT_TAIL(&sc->devlist, dinfo, link); +} + +static int +superio_attach(device_t dev) +{ + struct siosc *sc = device_get_softc(dev); + int i; + + mtx_init(&sc->conf_lock, device_get_nameunit(dev), "superio", MTX_DEF); + STAILQ_INIT(&sc->devlist); + + for (i = 0; sc->known_devices[i].type != SUPERIO_DEV_NONE; i++) { + superio_add_known_child(dev, sc->known_devices[i].type, + sc->known_devices[i].ldn); + } + + bus_generic_probe(dev); + bus_generic_attach(dev); + return (0); +} + +static int +superio_detach(device_t dev) +{ + struct siosc *sc = device_get_softc(dev); + int error; + + error = bus_generic_detach(dev); + if (error != 0) + return (error); + device_delete_children(dev); + bus_release_resource(dev, SYS_RES_IOPORT, sc->io_rid, sc->io_res); + mtx_destroy(&sc->conf_lock); + return (0); +} + +static device_t +superio_add_child(device_t dev, u_int order, const char *name, int unit) +{ + struct superio_devinfo *dinfo; + device_t child; + + child = device_add_child_ordered(dev, order, name, unit); + if (child == NULL) + return (NULL); + dinfo = malloc(sizeof(*dinfo), M_DEVBUF, M_NOWAIT | M_ZERO); + if (dinfo == NULL) { + device_delete_child(dev, child); + return (NULL); + } + dinfo->ldn = 0xff; + dinfo->type = SUPERIO_DEV_NONE; + dinfo->dev = child; + resource_list_init(&dinfo->resources); + device_set_ivars(child, dinfo); + return (child); +} + +static int +superio_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +{ + struct superio_devinfo *dinfo; + + dinfo = device_get_ivars(child); + switch (which) { + case SUPERIO_IVAR_LDN: + *result = dinfo->ldn; + break; + case SUPERIO_IVAR_TYPE: + *result = dinfo->type; + break; + case SUPERIO_IVAR_IOBASE: + *result = dinfo->iobase; + break; + case SUPERIO_IVAR_IOBASE2: + *result = dinfo->iobase2; + break; + case SUPERIO_IVAR_IRQ: + *result = dinfo->irq; + break; + case SUPERIO_IVAR_DMA: + *result = dinfo->dma; + break; + default: + return (ENOENT); + } + return (0); +} + +static int +superio_write_ivar(device_t dev, device_t child, int which, uintptr_t value) +{ + + switch (which) { + case SUPERIO_IVAR_LDN: + case SUPERIO_IVAR_TYPE: + case SUPERIO_IVAR_IOBASE: + case SUPERIO_IVAR_IOBASE2: + case SUPERIO_IVAR_IRQ: + case SUPERIO_IVAR_DMA: + return (EINVAL); + default: + return (ENOENT); + } +} + +static struct resource_list * +superio_get_resource_list(device_t dev, device_t child) +{ + struct superio_devinfo *dinfo = device_get_ivars(child); + + return (&dinfo->resources); +} + +static int +superio_printf(struct superio_devinfo *dinfo, const char *fmt, ...) +{ + va_list ap; + int retval; + + retval = printf("superio:%s@ldn%0x2x: ", + devtype_to_str(dinfo->type), dinfo->ldn); + va_start(ap, fmt); + retval += vprintf(fmt, ap); + va_end(ap); + return (retval); +} + +static void +superio_child_detached(device_t dev, device_t child) +{ + struct superio_devinfo *dinfo; + struct resource_list *rl; + + dinfo = device_get_ivars(child); + rl = &dinfo->resources; + + if (resource_list_release_active(rl, dev, child, SYS_RES_IRQ) != 0) + superio_printf(dinfo, "Device leaked IRQ resources\n"); + if (resource_list_release_active(rl, dev, child, SYS_RES_MEMORY) != 0) + superio_printf(dinfo, "Device leaked memory resources\n"); + if (resource_list_release_active(rl, dev, child, SYS_RES_IOPORT) != 0) + superio_printf(dinfo, "Device leaked I/O resources\n"); +} + +static int +superio_child_location_str(device_t parent, device_t child, char *buf, + size_t buflen) +{ + uint8_t ldn; + + ldn = superio_get_ldn(child); + snprintf(buf, buflen, "ldn=0x%02x", ldn); + return (0); +} + +static int +superio_child_pnp_str(device_t parent, device_t child, char *buf, + size_t buflen) +{ + superio_dev_type_t type; + + type = superio_get_type(child); + snprintf(buf, buflen, "type=%s", devtype_to_str(type)); + return (0); +} + +static int +superio_print_child(device_t parent, device_t child) +{ + superio_dev_type_t type; + uint8_t ldn; + int retval; + + ldn = superio_get_ldn(child); + type = superio_get_type(child); + + retval = bus_print_child_header(parent, child); + retval += printf(" at %s ldn 0x%02x", devtype_to_str(type), ldn); + retval += bus_print_child_footer(parent, child); + + return (retval); +} + +superio_vendor_t +superio_vendor(device_t dev) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + + return (sc->vendor); +} + +uint16_t +superio_devid(device_t dev) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + + return (sc->devid); +} + +uint8_t +superio_revid(device_t dev) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + + return (sc->revid); +} + +uint8_t +superio_read(device_t dev, uint8_t reg) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + struct superio_devinfo *dinfo = device_get_ivars(dev); + uint8_t v; + + sio_conf_enter(sc); + v = sio_ldn_read(sc, dinfo->ldn, reg); + sio_conf_exit(sc); + return (v); +} + +void +superio_write(device_t dev, uint8_t reg, uint8_t val) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + struct superio_devinfo *dinfo = device_get_ivars(dev); + + sio_conf_enter(sc); + sio_ldn_write(sc, dinfo->ldn, reg, val); + sio_conf_exit(sc); +} + +bool +superio_dev_enabled(device_t dev, uint8_t mask) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + struct superio_devinfo *dinfo = device_get_ivars(dev); + uint8_t v; + + /* GPIO device is always active in ITE chips. */ + if (sc->vendor == SUPERIO_VENDOR_ITE && dinfo->ldn == 7) + return (true); + + v = superio_read(dev, sc->enable_reg); + return ((v & mask) != 0); +} + +void +superio_dev_enable(device_t dev, uint8_t mask) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + struct superio_devinfo *dinfo = device_get_ivars(dev); + uint8_t v; + + /* GPIO device is always active in ITE chips. */ + if (sc->vendor == SUPERIO_VENDOR_ITE && dinfo->ldn == 7) + return; + + sio_conf_enter(sc); + v = sio_ldn_read(sc, dinfo->ldn, sc->enable_reg); + v |= mask; + sio_ldn_write(sc, dinfo->ldn, sc->enable_reg, v); + sio_conf_exit(sc); +} + +void +superio_dev_disable(device_t dev, uint8_t mask) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + struct superio_devinfo *dinfo = device_get_ivars(dev); + uint8_t v; + + /* GPIO device is always active in ITE chips. */ + if (sc->vendor == SUPERIO_VENDOR_ITE && dinfo->ldn == 7) + return; + + sio_conf_enter(sc); + v = sio_ldn_read(sc, dinfo->ldn, sc->enable_reg); + v &= ~mask; + sio_ldn_write(sc, dinfo->ldn, sc->enable_reg, v); + sio_conf_exit(sc); +} + +device_t +superio_find_dev(device_t superio, superio_dev_type_t type, int ldn) +{ + struct siosc *sc = device_get_softc(superio); + struct superio_devinfo *dinfo; + + if (ldn < -1 || ldn > UINT8_MAX) + return (NULL); /* ERANGE */ + if (type == SUPERIO_DEV_NONE && ldn == -1) + return (NULL); /* EINVAL */ + + STAILQ_FOREACH(dinfo, &sc->devlist, link) { + if (ldn != -1 && dinfo->ldn != ldn) + continue; + if (type != SUPERIO_DEV_NONE && dinfo->type != type) + continue; + return (dinfo->dev); + } + return (NULL); +} + +static devclass_t superio_devclass; + +static device_method_t superio_methods[] = { + DEVMETHOD(device_identify, superio_identify), + DEVMETHOD(device_probe, superio_probe), + DEVMETHOD(device_attach, superio_attach), + DEVMETHOD(device_detach, superio_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + DEVMETHOD(bus_add_child, superio_add_child), + DEVMETHOD(bus_child_detached, superio_child_detached), + DEVMETHOD(bus_child_location_str, superio_child_location_str), + DEVMETHOD(bus_child_pnpinfo_str, superio_child_pnp_str), + DEVMETHOD(bus_print_child, superio_print_child), + DEVMETHOD(bus_read_ivar, superio_read_ivar), + DEVMETHOD(bus_write_ivar, superio_write_ivar), + DEVMETHOD(bus_get_resource_list, superio_get_resource_list), + DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + + DEVMETHOD_END +}; + +static driver_t superio_driver = { + "superio", + superio_methods, + sizeof(struct siosc) +}; + +DRIVER_MODULE(superio, isa, superio_driver, superio_devclass, 0, 0); +MODULE_VERSION(superio, 1); Added: head/sys/dev/superio/superio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/superio/superio.h Mon Jul 1 17:05:41 2019 (r349580) @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2016 Andriy Gapon + * + * 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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jul 1 20:37:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 820FB15E3F30; Mon, 1 Jul 2019 20:37:36 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 276898F131; Mon, 1 Jul 2019 20:37:36 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F03281A28C; Mon, 1 Jul 2019 20:37:35 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61KbZiQ090526; Mon, 1 Jul 2019 20:37:35 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61KbZOD090525; Mon, 1 Jul 2019 20:37:35 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907012037.x61KbZOD090525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Mon, 1 Jul 2019 20:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349581 - head/sys/dev/netmap X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/dev/netmap X-SVN-Commit-Revision: 349581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 276898F131 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 20:37:36 -0000 Author: vmaffione Date: Mon Jul 1 20:37:35 2019 New Revision: 349581 URL: https://svnweb.freebsd.org/changeset/base/349581 Log: netmap: fix two panics with emulated adapter This patch fixes 2 panics. The first one is due to the current VNET not being set in the emulated adapter transmission path. The second one is caused by the M_PKTHDR flag not being set when preallocated mbufs are recycled in the transmit path. Submitted by: aleksandr.fedorov@itglobal.com Reviewed by: vmaffione MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20824 Modified: head/sys/dev/netmap/netmap_freebsd.c Modified: head/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- head/sys/dev/netmap/netmap_freebsd.c Mon Jul 1 17:05:41 2019 (r349580) +++ head/sys/dev/netmap/netmap_freebsd.c Mon Jul 1 20:37:35 2019 (r349581) @@ -444,6 +444,7 @@ nm_os_generic_xmit_frame(struct nm_os_gen_arg *a) m->m_ext.ext_size = len; #endif /* __FreeBSD_version >= 1100000 */ + m->m_flags |= M_PKTHDR; m->m_len = m->m_pkthdr.len = len; /* mbuf refcnt is not contended, no need to use atomic @@ -452,7 +453,9 @@ nm_os_generic_xmit_frame(struct nm_os_gen_arg *a) M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); m->m_pkthdr.flowid = a->ring_nr; m->m_pkthdr.rcvif = ifp; /* used for tx notification */ + CURVNET_SET(ifp->if_vnet); ret = NA(ifp)->if_transmit(ifp, m); + CURVNET_RESTORE(); return ret ? -1 : 0; } From owner-svn-src-all@freebsd.org Mon Jul 1 20:41:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 403A715E40D4; Mon, 1 Jul 2019 20:41:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE7F18F45D; Mon, 1 Jul 2019 20:41:44 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A75A1A3F3; Mon, 1 Jul 2019 20:41:44 +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 x61KfiSC095467; Mon, 1 Jul 2019 20:41:44 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61KfiMD095201; Mon, 1 Jul 2019 20:41:44 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201907012041.x61KfiMD095201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 1 Jul 2019 20:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349582 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 349582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BE7F18F45D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 20:41:45 -0000 Author: rmacklem Date: Mon Jul 1 20:41:43 2019 New Revision: 349582 URL: https://svnweb.freebsd.org/changeset/base/349582 Log: Factor out the code that does a VOP_SETATTR(size) from vn_truncate(). This patch factors the code in vn_truncate() that does the actual VOP_SETATTR() of size into a separate function called vn_truncate_locked(). This will allow the NFS server and the patch that adds a copy_file_range(2) syscall to call this function instead of duplicating the code and carrying over changes, such as the recent r347151. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D20808 Modified: head/sys/kern/vfs_vnops.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Mon Jul 1 20:37:35 2019 (r349581) +++ head/sys/kern/vfs_vnops.c Mon Jul 1 20:41:43 2019 (r349582) @@ -1289,7 +1289,6 @@ static int vn_truncate(struct file *fp, off_t length, struct ucred *active_cred, struct thread *td) { - struct vattr vattr; struct mount *mp; struct vnode *vp; void *rl_cookie; @@ -1316,20 +1315,35 @@ vn_truncate(struct file *fp, off_t length, struct ucre if (error) goto out; #endif + error = vn_truncate_locked(vp, length, (fp->f_flag & O_FSYNC) != 0, + fp->f_cred); +out: + VOP_UNLOCK(vp, 0); + vn_finished_write(mp); +out1: + vn_rangelock_unlock(vp, rl_cookie); + return (error); +} + +/* + * Truncate a file that is already locked. + */ +int +vn_truncate_locked(struct vnode *vp, off_t length, bool sync, + struct ucred *cred) +{ + struct vattr vattr; + int error; + error = VOP_ADD_WRITECOUNT(vp, 1); if (error == 0) { VATTR_NULL(&vattr); vattr.va_size = length; - if ((fp->f_flag & O_FSYNC) != 0) + if (sync) vattr.va_vaflags |= VA_SYNC; - error = VOP_SETATTR(vp, &vattr, fp->f_cred); + error = VOP_SETATTR(vp, &vattr, cred); VOP_ADD_WRITECOUNT_CHECKED(vp, -1); } -out: - VOP_UNLOCK(vp, 0); - vn_finished_write(mp); -out1: - vn_rangelock_unlock(vp, rl_cookie); return (error); } Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Mon Jul 1 20:37:35 2019 (r349581) +++ head/sys/sys/vnode.h Mon Jul 1 20:41:43 2019 (r349582) @@ -695,6 +695,8 @@ int vn_stat(struct vnode *vp, struct stat *sb, struct int vn_start_write(struct vnode *vp, struct mount **mpp, int flags); int vn_start_secondary_write(struct vnode *vp, struct mount **mpp, int flags); +int vn_truncate_locked(struct vnode *vp, off_t length, bool sync, + struct ucred *cred); int vn_writechk(struct vnode *vp); int vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace, const char *attrname, int *buflen, char *buf, struct thread *td); From owner-svn-src-all@freebsd.org Mon Jul 1 21:06:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5309D15E4715; Mon, 1 Jul 2019 21:06:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 004828FFE2; Mon, 1 Jul 2019 21:06:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C489B1A7BF; Mon, 1 Jul 2019 21:06:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61L6BiO006245; Mon, 1 Jul 2019 21:06:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61L6B3b006243; Mon, 1 Jul 2019 21:06:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907012106.x61L6B3b006243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 1 Jul 2019 21:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349583 - in head/contrib/llvm: include/llvm/Analysis lib/Analysis lib/Transforms/Scalar X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/contrib/llvm: include/llvm/Analysis lib/Analysis lib/Transforms/Scalar X-SVN-Commit-Revision: 349583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 004828FFE2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 21:06:12 -0000 Author: dim Date: Mon Jul 1 21:06:10 2019 New Revision: 349583 URL: https://svnweb.freebsd.org/changeset/base/349583 Log: Pull in r360968 from upstream llvm trunk (by Philip Reames): Clarify comments on helpers used by LFTR [NFC] I'm slowly wrapping my head around this code, and am making comment improvements where I can. Pull in r360972 from upstream llvm trunk (by Philip Reames): [LFTR] Factor out a helper function for readability purpose [NFC] Pull in r360976 from upstream llvm trunk (by Philip Reames): [IndVars] Don't reimplement Loop::isLoopInvariant [NFC] Using dominance vs a set membership check is indistinguishable from a compile time perspective, and the two queries return equivelent results. Simplify code by using the existing function. Pull in r360978 from upstream llvm trunk (by Philip Reames): [LFTR] Strengthen assertions in genLoopLimit [NFCI] Pull in r362292 from upstream llvm trunk (by Nikita Popov): [IndVarSimplify] Fixup nowrap flags during LFTR (PR31181) Fix for https://bugs.llvm.org/show_bug.cgi?id=31181 and partial fix for LFTR poison handling issues in general. When LFTR moves a condition from pre-inc to post-inc, it may now depend on value that is poison due to nowrap flags. To avoid this, we clear any nowrap flag that SCEV cannot prove for the post-inc addrec. Additionally, LFTR may switch to a different IV that is dynamically dead and as such may be arbitrarily poison. This patch will correct nowrap flags in some but not all cases where this happens. This is related to the adoption of IR nowrap flags for the pre-inc addrec. (See some of the switch_to_different_iv tests, where flags are not dropped or insufficiently dropped.) Finally, there are likely similar issues with the handling of GEP inbounds, but we don't have a test case for this yet. Differential Revision: https://reviews.llvm.org/D60935 Pull in r362971 from upstream llvm trunk (by Philip Reames): Prepare for multi-exit LFTR [NFC] This change does the plumbing to wire an ExitingBB parameter through the LFTR implementation, and reorganizes the code to work in terms of a set of individual loop exits. Most of it is fairly obvious, but there's one key complexity which makes it worthy of consideration. The actual multi-exit LFTR patch is in D62625 for context. Specifically, it turns out the existing code uses the backedge taken count from before a IV is widened. Oddly, we can end up with a different (more expensive, but semantically equivelent) BE count for the loop when requerying after widening. For the nestedIV example from elim-extend, we end up with the following BE counts: BEFORE: (-2 + (-1 * %innercount) + %limit) AFTER: (-1 + (sext i32 (-1 + %limit) to i64) + (-1 * (sext i32 %innercount to i64))) This is the only test in tree which seems sensitive to this difference. The actual result of using the wider BETC on this example is that we actually produce slightly better code. :) In review, we decided to accept that test change. This patch is structured to preserve the old behavior, but a separate change will immediate follow with the behavior change. (I wanted it separate for problem attribution purposes.) Differential Revision: https://reviews.llvm.org/D62880 Pull in r362975 from upstream llvm trunk (by Philip Reames): [LFTR] Use recomputed BE count This was discussed as part of D62880. The basic thought is that computing BE taken count after widening should produce (on average) an equally good backedge taken count as the one before widening. Since there's only one test in the suite which is impacted by this change, and it's essentially equivelent codegen, that seems to be a reasonable assertion. This change was separated from r362971 so that if this turns out to be problematic, the triggering piece is obvious and easily revertable. For the nestedIV example from elim-extend.ll, we end up with the following BE counts: BEFORE: (-2 + (-1 * %innercount) + %limit) AFTER: (-1 + (sext i32 (-1 + %limit) to i64) + (-1 * (sext i32 %innercount to i64))) Note that before is an i32 type, and the after is an i64. Truncating the i64 produces the i32. Pull in r362980 from upstream llvm trunk (by Philip Reames): Factor out a helper function for readability and reuse in a future patch [NFC] Pull in r363613 from upstream llvm trunk (by Philip Reames): Fix a bug w/inbounds invalidation in LFTR (recommit) Recommit r363289 with a bug fix for crash identified in pr42279. Issue was that a loop exit test does not have to be an icmp, leading to a null dereference crash when new logic was exercised for that case. Test case previously committed in r363601. Original commit comment follows: This contains fixes for two cases where we might invalidate inbounds and leave it stale in the IR (a miscompile). Case 1 is when switching to an IV with no dynamically live uses, and case 2 is when doing pre-to-post conversion on the same pointer type IV. The basic scheme used is to prove that using the given IV (pre or post increment forms) would have to already trigger UB on the path to the test we're modifying. As such, our potential UB triggering use does not change the semantics of the original program. As was pointed out in the review thread by Nikita, this is defending against a separate issue from the hasConcreteDef case. This is about poison, that's about undef. Unfortunately, the two are different, see Nikita's comment for a fuller explanation, he explains it well. (Note: I'm going to address Nikita's last style comment in a separate commit just to minimize chance of subtle bugs being introduced due to typos.) Differential Revision: https://reviews.llvm.org/D62939 Pull in r363875 from upstream llvm trunk (by Philip Reames): [LFTR] Rename variable to minimize confusion [NFC] (Recommit of r363293 which was reverted when a dependent patch was.) As pointed out by Nikita in D62625, BackedgeTakenCount is generally used to refer to the backedge taken count of the loop. A conditional backedge taken count - one which only applies if a particular exit is taken - is called a ExitCount in SCEV code, so be consistent here. Pull in r363877 from upstream llvm trunk (by Philip Reames): [LFTR] Stylistic cleanup as suggested in last review comment of D62939 [NFC] (Resumbit of r363292 which was reverted along w/an earlier patch) Pull in r364346 from upstream llvm trunk (by Philip Reames): [LFTR] Adjust debug output to include extensions (if any) Pull in r364693 from upstream llvm trunk (by Philip Reames): [IndVars] Remove a bit of manual constant folding [NFC] SCEV is more than capable of folding (add x, trunc(0)) to x. Pull in r364709 from upstream llvm trunk (by Nikita Popov): [LFTR] Fix post-inc pointer IV with truncated exit count (PR41998) Fixes https://bugs.llvm.org/show_bug.cgi?id=41998. Usually when we have a truncated exit count we'll truncate the IV when comparing against the limit, in which case exit count overflow in post-inc form doesn't matter. However, for pointer IVs we don't do that, so we have to be careful about incrementing the IV in the wide type. I'm fixing this by removing the IVCount variable (which was ExitCount or ExitCount+1) and replacing it with a UsePostInc flag, and then moving the actual limit adjustment to the individual cases (which are: pointer IV where we add to the wide type, integer IV where we add to the narrow type, and constant integer IV where we add to the wide type). Differential Revision: https://reviews.llvm.org/D63686 Together, these should fix a hang when building the textproc/htmldoc port, due to an incorrect loop optimization. PR: 237515 MFC after: 1 week Modified: head/contrib/llvm/include/llvm/Analysis/ValueTracking.h head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Modified: head/contrib/llvm/include/llvm/Analysis/ValueTracking.h ============================================================================== --- head/contrib/llvm/include/llvm/Analysis/ValueTracking.h Mon Jul 1 20:41:43 2019 (r349582) +++ head/contrib/llvm/include/llvm/Analysis/ValueTracking.h Mon Jul 1 21:06:10 2019 (r349583) @@ -17,6 +17,7 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Optional.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/IR/CallSite.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Instruction.h" @@ -505,6 +506,12 @@ class Value; /// undefined behavior if I is executed and that operand has a full-poison /// value (all bits poison). const Value *getGuaranteedNonFullPoisonOp(const Instruction *I); + + /// Return true if the given instruction must trigger undefined behavior. + /// when I is executed with any operands which appear in KnownPoison holding + /// a full-poison value at the point of execution. + bool mustTriggerUB(const Instruction *I, + const SmallSet& KnownPoison); /// Return true if this function can prove that if PoisonI is executed /// and yields a full-poison value (all bits poison), then that will Modified: head/contrib/llvm/lib/Analysis/ValueTracking.cpp ============================================================================== --- head/contrib/llvm/lib/Analysis/ValueTracking.cpp Mon Jul 1 20:41:43 2019 (r349582) +++ head/contrib/llvm/lib/Analysis/ValueTracking.cpp Mon Jul 1 21:06:10 2019 (r349583) @@ -4413,6 +4413,13 @@ const Value *llvm::getGuaranteedNonFullPoisonOp(const } } +bool llvm::mustTriggerUB(const Instruction *I, + const SmallSet& KnownPoison) { + auto *NotPoison = getGuaranteedNonFullPoisonOp(I); + return (NotPoison && KnownPoison.count(NotPoison)); +} + + bool llvm::programUndefinedIfFullPoison(const Instruction *PoisonI) { // We currently only look for uses of poison values within the same basic // block, as that makes it easier to guarantee that the uses will be @@ -4436,8 +4443,7 @@ bool llvm::programUndefinedIfFullPoison(const Instruct while (Iter++ < MaxDepth) { for (auto &I : make_range(Begin, End)) { if (&I != PoisonI) { - const Value *NotPoison = getGuaranteedNonFullPoisonOp(&I); - if (NotPoison != nullptr && YieldsPoison.count(NotPoison)) + if (mustTriggerUB(&I, YieldsPoison)) return true; if (!isGuaranteedToTransferExecutionToSuccessor(&I)) return false; Modified: head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp ============================================================================== --- head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Mon Jul 1 20:41:43 2019 (r349582) +++ head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Mon Jul 1 21:06:10 2019 (r349583) @@ -32,6 +32,7 @@ #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" @@ -43,6 +44,7 @@ #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/TargetTransformInfo.h" +#include "llvm/Analysis/ValueTracking.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Constant.h" @@ -147,7 +149,8 @@ class IndVarSimplify { bool rewriteFirstIterationLoopExitValues(Loop *L); bool hasHardUserWithinLoop(const Loop *L, const Instruction *I) const; - bool linearFunctionTestReplace(Loop *L, const SCEV *BackedgeTakenCount, + bool linearFunctionTestReplace(Loop *L, BasicBlock *ExitingBB, + const SCEV *ExitCount, PHINode *IndVar, SCEVExpander &Rewriter); bool sinkUnusedInvariants(Loop *L); @@ -1022,24 +1025,13 @@ class WidenIV { (protected) } // end anonymous namespace -/// Perform a quick domtree based check for loop invariance assuming that V is -/// used within the loop. LoopInfo::isLoopInvariant() seems gratuitous for this -/// purpose. -static bool isLoopInvariant(Value *V, const Loop *L, const DominatorTree *DT) { - Instruction *Inst = dyn_cast(V); - if (!Inst) - return true; - - return DT->properlyDominates(Inst->getParent(), L->getHeader()); -} - Value *WidenIV::createExtendInst(Value *NarrowOper, Type *WideType, bool IsSigned, Instruction *Use) { // Set the debug location and conservative insertion point. IRBuilder<> Builder(Use); // Hoist the insertion point into loop preheaders as far as possible. for (const Loop *L = LI->getLoopFor(Use->getParent()); - L && L->getLoopPreheader() && isLoopInvariant(NarrowOper, L, DT); + L && L->getLoopPreheader() && L->isLoopInvariant(NarrowOper); L = L->getParentLoop()) Builder.SetInsertPoint(L->getLoopPreheader()->getTerminator()); @@ -1977,41 +1969,10 @@ bool IndVarSimplify::simplifyAndExtend(Loop *L, // linearFunctionTestReplace and its kin. Rewrite the loop exit condition. //===----------------------------------------------------------------------===// -/// Return true if this loop's backedge taken count expression can be safely and -/// cheaply expanded into an instruction sequence that can be used by -/// linearFunctionTestReplace. -/// -/// TODO: This fails for pointer-type loop counters with greater than one byte -/// strides, consequently preventing LFTR from running. For the purpose of LFTR -/// we could skip this check in the case that the LFTR loop counter (chosen by -/// FindLoopCounter) is also pointer type. Instead, we could directly convert -/// the loop test to an inequality test by checking the target data's alignment -/// of element types (given that the initial pointer value originates from or is -/// used by ABI constrained operation, as opposed to inttoptr/ptrtoint). -/// However, we don't yet have a strong motivation for converting loop tests -/// into inequality tests. -static bool canExpandBackedgeTakenCount(Loop *L, ScalarEvolution *SE, - SCEVExpander &Rewriter) { - const SCEV *BackedgeTakenCount = SE->getBackedgeTakenCount(L); - if (isa(BackedgeTakenCount) || - BackedgeTakenCount->isZero()) - return false; - - if (!L->getExitingBlock()) - return false; - - // Can't rewrite non-branch yet. - if (!isa(L->getExitingBlock()->getTerminator())) - return false; - - if (Rewriter.isHighCostExpansion(BackedgeTakenCount, L)) - return false; - - return true; -} - -/// Return the loop header phi IFF IncV adds a loop invariant value to the phi. -static PHINode *getLoopPhiForCounter(Value *IncV, Loop *L, DominatorTree *DT) { +/// Given an Value which is hoped to be part of an add recurance in the given +/// loop, return the associated Phi node if so. Otherwise, return null. Note +/// that this is less general than SCEVs AddRec checking. +static PHINode *getLoopPhiForCounter(Value *IncV, Loop *L) { Instruction *IncI = dyn_cast(IncV); if (!IncI) return nullptr; @@ -2031,7 +1992,7 @@ static PHINode *getLoopPhiForCounter(Value *IncV, Loop PHINode *Phi = dyn_cast(IncI->getOperand(0)); if (Phi && Phi->getParent() == L->getHeader()) { - if (isLoopInvariant(IncI->getOperand(1), L, DT)) + if (L->isLoopInvariant(IncI->getOperand(1))) return Phi; return nullptr; } @@ -2041,22 +2002,23 @@ static PHINode *getLoopPhiForCounter(Value *IncV, Loop // Allow add/sub to be commuted. Phi = dyn_cast(IncI->getOperand(1)); if (Phi && Phi->getParent() == L->getHeader()) { - if (isLoopInvariant(IncI->getOperand(0), L, DT)) + if (L->isLoopInvariant(IncI->getOperand(0))) return Phi; } return nullptr; } -/// Return the compare guarding the loop latch, or NULL for unrecognized tests. -static ICmpInst *getLoopTest(Loop *L) { - assert(L->getExitingBlock() && "expected loop exit"); +/// Given a loop with one backedge and one exit, return the ICmpInst +/// controlling the sole loop exit. There is no guarantee that the exiting +/// block is also the latch. +static ICmpInst *getLoopTest(Loop *L, BasicBlock *ExitingBB) { BasicBlock *LatchBlock = L->getLoopLatch(); // Don't bother with LFTR if the loop is not properly simplified. if (!LatchBlock) return nullptr; - BranchInst *BI = dyn_cast(L->getExitingBlock()->getTerminator()); + BranchInst *BI = dyn_cast(ExitingBB->getTerminator()); assert(BI && "expected exit branch"); return dyn_cast(BI->getCondition()); @@ -2064,9 +2026,9 @@ static ICmpInst *getLoopTest(Loop *L) { /// linearFunctionTestReplace policy. Return true unless we can show that the /// current exit test is already sufficiently canonical. -static bool needsLFTR(Loop *L, DominatorTree *DT) { +static bool needsLFTR(Loop *L, BasicBlock *ExitingBB) { // Do LFTR to simplify the exit condition to an ICMP. - ICmpInst *Cond = getLoopTest(L); + ICmpInst *Cond = getLoopTest(L, ExitingBB); if (!Cond) return true; @@ -2078,15 +2040,15 @@ static bool needsLFTR(Loop *L, DominatorTree *DT) { // Look for a loop invariant RHS Value *LHS = Cond->getOperand(0); Value *RHS = Cond->getOperand(1); - if (!isLoopInvariant(RHS, L, DT)) { - if (!isLoopInvariant(LHS, L, DT)) + if (!L->isLoopInvariant(RHS)) { + if (!L->isLoopInvariant(LHS)) return true; std::swap(LHS, RHS); } // Look for a simple IV counter LHS PHINode *Phi = dyn_cast(LHS); if (!Phi) - Phi = getLoopPhiForCounter(LHS, L, DT); + Phi = getLoopPhiForCounter(LHS, L); if (!Phi) return true; @@ -2098,9 +2060,51 @@ static bool needsLFTR(Loop *L, DominatorTree *DT) { // Do LFTR if the exit condition's IV is *not* a simple counter. Value *IncV = Phi->getIncomingValue(Idx); - return Phi != getLoopPhiForCounter(IncV, L, DT); + return Phi != getLoopPhiForCounter(IncV, L); } +/// Return true if undefined behavior would provable be executed on the path to +/// OnPathTo if Root produced a posion result. Note that this doesn't say +/// anything about whether OnPathTo is actually executed or whether Root is +/// actually poison. This can be used to assess whether a new use of Root can +/// be added at a location which is control equivalent with OnPathTo (such as +/// immediately before it) without introducing UB which didn't previously +/// exist. Note that a false result conveys no information. +static bool mustExecuteUBIfPoisonOnPathTo(Instruction *Root, + Instruction *OnPathTo, + DominatorTree *DT) { + // Basic approach is to assume Root is poison, propagate poison forward + // through all users we can easily track, and then check whether any of those + // users are provable UB and must execute before out exiting block might + // exit. + + // The set of all recursive users we've visited (which are assumed to all be + // poison because of said visit) + SmallSet KnownPoison; + SmallVector Worklist; + Worklist.push_back(Root); + while (!Worklist.empty()) { + const Instruction *I = Worklist.pop_back_val(); + + // If we know this must trigger UB on a path leading our target. + if (mustTriggerUB(I, KnownPoison) && DT->dominates(I, OnPathTo)) + return true; + + // If we can't analyze propagation through this instruction, just skip it + // and transitive users. Safe as false is a conservative result. + if (!propagatesFullPoison(I) && I != Root) + continue; + + if (KnownPoison.insert(I).second) + for (const User *User : I->users()) + Worklist.push_back(cast(User)); + } + + // Might be non-UB, or might have a path we couldn't prove must execute on + // way to exiting bb. + return false; +} + /// Recursive helper for hasConcreteDef(). Unfortunately, this currently boils /// down to checking that all operands are constant and listing instructions /// that may hide undef. @@ -2157,25 +2161,43 @@ static bool AlmostDeadIV(PHINode *Phi, BasicBlock *Lat return true; } -/// Find an affine IV in canonical form. +/// Return true if the given phi is a "counter" in L. A counter is an +/// add recurance (of integer or pointer type) with an arbitrary start, and a +/// step of 1. Note that L must have exactly one latch. +static bool isLoopCounter(PHINode* Phi, Loop *L, + ScalarEvolution *SE) { + assert(Phi->getParent() == L->getHeader()); + assert(L->getLoopLatch()); + + if (!SE->isSCEVable(Phi->getType())) + return false; + + const SCEVAddRecExpr *AR = dyn_cast(SE->getSCEV(Phi)); + if (!AR || AR->getLoop() != L || !AR->isAffine()) + return false; + + const SCEV *Step = dyn_cast(AR->getStepRecurrence(*SE)); + if (!Step || !Step->isOne()) + return false; + + int LatchIdx = Phi->getBasicBlockIndex(L->getLoopLatch()); + Value *IncV = Phi->getIncomingValue(LatchIdx); + return (getLoopPhiForCounter(IncV, L) == Phi); +} + +/// Search the loop header for a loop counter (anadd rec w/step of one) +/// suitable for use by LFTR. If multiple counters are available, select the +/// "best" one based profitable heuristics. /// /// BECount may be an i8* pointer type. The pointer difference is already /// valid count without scaling the address stride, so it remains a pointer /// expression as far as SCEV is concerned. -/// -/// Currently only valid for LFTR. See the comments on hasConcreteDef below. -/// -/// FIXME: Accept -1 stride and set IVLimit = IVInit - BECount -/// -/// FIXME: Accept non-unit stride as long as SCEV can reduce BECount * Stride. -/// This is difficult in general for SCEV because of potential overflow. But we -/// could at least handle constant BECounts. -static PHINode *FindLoopCounter(Loop *L, const SCEV *BECount, +static PHINode *FindLoopCounter(Loop *L, BasicBlock *ExitingBB, + const SCEV *BECount, ScalarEvolution *SE, DominatorTree *DT) { uint64_t BCWidth = SE->getTypeSizeInBits(BECount->getType()); - Value *Cond = - cast(L->getExitingBlock()->getTerminator())->getCondition(); + Value *Cond = cast(ExitingBB->getTerminator())->getCondition(); // Loop over all of the PHI nodes, looking for a simple counter. PHINode *BestPhi = nullptr; @@ -2186,17 +2208,15 @@ static PHINode *FindLoopCounter(Loop *L, const SCEV *B for (BasicBlock::iterator I = L->getHeader()->begin(); isa(I); ++I) { PHINode *Phi = cast(I); - if (!SE->isSCEVable(Phi->getType())) + if (!isLoopCounter(Phi, L, SE)) continue; // Avoid comparing an integer IV against a pointer Limit. if (BECount->getType()->isPointerTy() && !Phi->getType()->isPointerTy()) continue; - const SCEVAddRecExpr *AR = dyn_cast(SE->getSCEV(Phi)); - if (!AR || AR->getLoop() != L || !AR->isAffine()) - continue; - + const auto *AR = dyn_cast(SE->getSCEV(Phi)); + // AR may be a pointer type, while BECount is an integer type. // AR may be wider than BECount. With eq/ne tests overflow is immaterial. // AR may not be a narrower type, or we may never exit. @@ -2204,28 +2224,33 @@ static PHINode *FindLoopCounter(Loop *L, const SCEV *B if (PhiWidth < BCWidth || !DL.isLegalInteger(PhiWidth)) continue; - const SCEV *Step = dyn_cast(AR->getStepRecurrence(*SE)); - if (!Step || !Step->isOne()) - continue; - - int LatchIdx = Phi->getBasicBlockIndex(LatchBlock); - Value *IncV = Phi->getIncomingValue(LatchIdx); - if (getLoopPhiForCounter(IncV, L, DT) != Phi) - continue; - // Avoid reusing a potentially undef value to compute other values that may // have originally had a concrete definition. if (!hasConcreteDef(Phi)) { // We explicitly allow unknown phis as long as they are already used by // the loop test. In this case we assume that performing LFTR could not // increase the number of undef users. - if (ICmpInst *Cond = getLoopTest(L)) { - if (Phi != getLoopPhiForCounter(Cond->getOperand(0), L, DT) && - Phi != getLoopPhiForCounter(Cond->getOperand(1), L, DT)) { - continue; - } - } + // TODO: Generalize this to allow *any* loop exit which is known to + // execute on each iteration + if (L->getExitingBlock()) + if (ICmpInst *Cond = getLoopTest(L, ExitingBB)) + if (Phi != getLoopPhiForCounter(Cond->getOperand(0), L) && + Phi != getLoopPhiForCounter(Cond->getOperand(1), L)) + continue; } + + // Avoid introducing undefined behavior due to poison which didn't exist in + // the original program. (Annoyingly, the rules for poison and undef + // propagation are distinct, so this does NOT cover the undef case above.) + // We have to ensure that we don't introduce UB by introducing a use on an + // iteration where said IV produces poison. Our strategy here differs for + // pointers and integer IVs. For integers, we strip and reinfer as needed, + // see code in linearFunctionTestReplace. For pointers, we restrict + // transforms as there is no good way to reinfer inbounds once lost. + if (!Phi->getType()->isIntegerTy() && + !mustExecuteUBIfPoisonOnPathTo(Phi, ExitingBB->getTerminator(), DT)) + continue; + const SCEV *Init = AR->getStart(); if (BestPhi && !AlmostDeadIV(BestPhi, LatchBlock, Cond)) { @@ -2251,38 +2276,43 @@ static PHINode *FindLoopCounter(Loop *L, const SCEV *B return BestPhi; } -/// Help linearFunctionTestReplace by generating a value that holds the RHS of -/// the new loop test. -static Value *genLoopLimit(PHINode *IndVar, const SCEV *IVCount, Loop *L, +/// Insert an IR expression which computes the value held by the IV IndVar +/// (which must be an loop counter w/unit stride) after the backedge of loop L +/// is taken ExitCount times. +static Value *genLoopLimit(PHINode *IndVar, BasicBlock *ExitingBB, + const SCEV *ExitCount, bool UsePostInc, Loop *L, SCEVExpander &Rewriter, ScalarEvolution *SE) { - const SCEVAddRecExpr *AR = dyn_cast(SE->getSCEV(IndVar)); - assert(AR && AR->getLoop() == L && AR->isAffine() && "bad loop counter"); + assert(isLoopCounter(IndVar, L, SE)); + const SCEVAddRecExpr *AR = cast(SE->getSCEV(IndVar)); const SCEV *IVInit = AR->getStart(); - // IVInit may be a pointer while IVCount is an integer when FindLoopCounter - // finds a valid pointer IV. Sign extend BECount in order to materialize a + // IVInit may be a pointer while ExitCount is an integer when FindLoopCounter + // finds a valid pointer IV. Sign extend ExitCount in order to materialize a // GEP. Avoid running SCEVExpander on a new pointer value, instead reusing // the existing GEPs whenever possible. - if (IndVar->getType()->isPointerTy() && !IVCount->getType()->isPointerTy()) { + if (IndVar->getType()->isPointerTy() && + !ExitCount->getType()->isPointerTy()) { // IVOffset will be the new GEP offset that is interpreted by GEP as a - // signed value. IVCount on the other hand represents the loop trip count, + // signed value. ExitCount on the other hand represents the loop trip count, // which is an unsigned value. FindLoopCounter only allows induction // variables that have a positive unit stride of one. This means we don't // have to handle the case of negative offsets (yet) and just need to zero - // extend IVCount. + // extend ExitCount. Type *OfsTy = SE->getEffectiveSCEVType(IVInit->getType()); - const SCEV *IVOffset = SE->getTruncateOrZeroExtend(IVCount, OfsTy); + const SCEV *IVOffset = SE->getTruncateOrZeroExtend(ExitCount, OfsTy); + if (UsePostInc) + IVOffset = SE->getAddExpr(IVOffset, SE->getOne(OfsTy)); // Expand the code for the iteration count. assert(SE->isLoopInvariant(IVOffset, L) && "Computed iteration count is not loop invariant!"); - BranchInst *BI = cast(L->getExitingBlock()->getTerminator()); + BranchInst *BI = cast(ExitingBB->getTerminator()); Value *GEPOffset = Rewriter.expandCodeFor(IVOffset, OfsTy, BI); Value *GEPBase = IndVar->getIncomingValueForBlock(L->getLoopPreheader()); assert(AR->getStart() == SE->getSCEV(GEPBase) && "bad loop counter"); // We could handle pointer IVs other than i8*, but we need to compensate for - // gep index scaling. See canExpandBackedgeTakenCount comments. + // gep index scaling. assert(SE->getSizeOfExpr(IntegerType::getInt64Ty(IndVar->getContext()), cast(GEPBase->getType()) ->getElementType())->isOne() && @@ -2291,7 +2321,7 @@ static Value *genLoopLimit(PHINode *IndVar, const SCEV IRBuilder<> Builder(L->getLoopPreheader()->getTerminator()); return Builder.CreateGEP(nullptr, GEPBase, GEPOffset, "lftr.limit"); } else { - // In any other case, convert both IVInit and IVCount to integers before + // In any other case, convert both IVInit and ExitCount to integers before // comparing. This may result in SCEV expansion of pointers, but in practice // SCEV will fold the pointer arithmetic away as such: // BECount = (IVEnd - IVInit - 1) => IVLimit = IVInit (postinc). @@ -2299,35 +2329,34 @@ static Value *genLoopLimit(PHINode *IndVar, const SCEV // Valid Cases: (1) both integers is most common; (2) both may be pointers // for simple memset-style loops. // - // IVInit integer and IVCount pointer would only occur if a canonical IV + // IVInit integer and ExitCount pointer would only occur if a canonical IV // were generated on top of case #2, which is not expected. - const SCEV *IVLimit = nullptr; - // For unit stride, IVCount = Start + BECount with 2's complement overflow. - // For non-zero Start, compute IVCount here. - if (AR->getStart()->isZero()) - IVLimit = IVCount; - else { - assert(AR->getStepRecurrence(*SE)->isOne() && "only handles unit stride"); - const SCEV *IVInit = AR->getStart(); + assert(AR->getStepRecurrence(*SE)->isOne() && "only handles unit stride"); + // For unit stride, IVCount = Start + ExitCount with 2's complement + // overflow. + const SCEV *IVInit = AR->getStart(); - // For integer IVs, truncate the IV before computing IVInit + BECount. - if (SE->getTypeSizeInBits(IVInit->getType()) - > SE->getTypeSizeInBits(IVCount->getType())) - IVInit = SE->getTruncateExpr(IVInit, IVCount->getType()); + // For integer IVs, truncate the IV before computing IVInit + BECount. + if (SE->getTypeSizeInBits(IVInit->getType()) + > SE->getTypeSizeInBits(ExitCount->getType())) + IVInit = SE->getTruncateExpr(IVInit, ExitCount->getType()); - IVLimit = SE->getAddExpr(IVInit, IVCount); - } + const SCEV *IVLimit = SE->getAddExpr(IVInit, ExitCount); + + if (UsePostInc) + IVLimit = SE->getAddExpr(IVLimit, SE->getOne(IVLimit->getType())); + // Expand the code for the iteration count. - BranchInst *BI = cast(L->getExitingBlock()->getTerminator()); + BranchInst *BI = cast(ExitingBB->getTerminator()); IRBuilder<> Builder(BI); assert(SE->isLoopInvariant(IVLimit, L) && "Computed iteration count is not loop invariant!"); // Ensure that we generate the same type as IndVar, or a smaller integer // type. In the presence of null pointer values, we have an integer type // SCEV expression (IVInit) for a pointer type IV value (IndVar). - Type *LimitTy = IVCount->getType()->isPointerTy() ? - IndVar->getType() : IVCount->getType(); + Type *LimitTy = ExitCount->getType()->isPointerTy() ? + IndVar->getType() : ExitCount->getType(); return Rewriter.expandCodeFor(IVLimit, LimitTy, BI); } } @@ -2338,51 +2367,76 @@ static Value *genLoopLimit(PHINode *IndVar, const SCEV /// determine a loop-invariant trip count of the loop, which is actually a much /// broader range than just linear tests. bool IndVarSimplify:: -linearFunctionTestReplace(Loop *L, const SCEV *BackedgeTakenCount, +linearFunctionTestReplace(Loop *L, BasicBlock *ExitingBB, + const SCEV *ExitCount, PHINode *IndVar, SCEVExpander &Rewriter) { - assert(canExpandBackedgeTakenCount(L, SE, Rewriter) && "precondition"); + assert(L->getLoopLatch() && "Loop no longer in simplified form?"); + assert(isLoopCounter(IndVar, L, SE)); + Instruction * const IncVar = + cast(IndVar->getIncomingValueForBlock(L->getLoopLatch())); - // Initialize CmpIndVar and IVCount to their preincremented values. + // Initialize CmpIndVar to the preincremented IV. Value *CmpIndVar = IndVar; - const SCEV *IVCount = BackedgeTakenCount; + bool UsePostInc = false; - assert(L->getLoopLatch() && "Loop no longer in simplified form?"); - // If the exiting block is the same as the backedge block, we prefer to // compare against the post-incremented value, otherwise we must compare // against the preincremented value. - if (L->getExitingBlock() == L->getLoopLatch()) { - // Add one to the "backedge-taken" count to get the trip count. - // This addition may overflow, which is valid as long as the comparison is - // truncated to BackedgeTakenCount->getType(). - IVCount = SE->getAddExpr(BackedgeTakenCount, - SE->getOne(BackedgeTakenCount->getType())); - // The BackedgeTaken expression contains the number of times that the - // backedge branches to the loop header. This is one less than the - // number of times the loop executes, so use the incremented indvar. - CmpIndVar = IndVar->getIncomingValueForBlock(L->getExitingBlock()); + if (ExitingBB == L->getLoopLatch()) { + bool SafeToPostInc = IndVar->getType()->isIntegerTy(); + if (!SafeToPostInc) { + // For pointer IVs, we chose to not strip inbounds which requires us not + // to add a potentially UB introducing use. We need to either a) show + // the loop test we're modifying is already in post-inc form, or b) show + // that adding a use must not introduce UB. + if (ICmpInst *LoopTest = getLoopTest(L, ExitingBB)) + SafeToPostInc = LoopTest->getOperand(0) == IncVar || + LoopTest->getOperand(1) == IncVar; + if (!SafeToPostInc) + SafeToPostInc = + mustExecuteUBIfPoisonOnPathTo(IncVar, ExitingBB->getTerminator(), DT); + } + + if (SafeToPostInc) { + UsePostInc = true; + CmpIndVar = IncVar; + } } - Value *ExitCnt = genLoopLimit(IndVar, IVCount, L, Rewriter, SE); + // It may be necessary to drop nowrap flags on the incrementing instruction + // if either LFTR moves from a pre-inc check to a post-inc check (in which + // case the increment might have previously been poison on the last iteration + // only) or if LFTR switches to a different IV that was previously dynamically + // dead (and as such may be arbitrarily poison). We remove any nowrap flags + // that SCEV didn't infer for the post-inc addrec (even if we use a pre-inc + // check), because the pre-inc addrec flags may be adopted from the original + // instruction, while SCEV has to explicitly prove the post-inc nowrap flags. + // TODO: This handling is inaccurate for one case: If we switch to a + // dynamically dead IV that wraps on the first loop iteration only, which is + // not covered by the post-inc addrec. (If the new IV was not dynamically + // dead, it could not be poison on the first iteration in the first place.) + if (auto *BO = dyn_cast(IncVar)) { + const SCEVAddRecExpr *AR = cast(SE->getSCEV(IncVar)); + if (BO->hasNoUnsignedWrap()) + BO->setHasNoUnsignedWrap(AR->hasNoUnsignedWrap()); + if (BO->hasNoSignedWrap()) + BO->setHasNoSignedWrap(AR->hasNoSignedWrap()); + } + + Value *ExitCnt = genLoopLimit( + IndVar, ExitingBB, ExitCount, UsePostInc, L, Rewriter, SE); assert(ExitCnt->getType()->isPointerTy() == IndVar->getType()->isPointerTy() && "genLoopLimit missed a cast"); // Insert a new icmp_ne or icmp_eq instruction before the branch. - BranchInst *BI = cast(L->getExitingBlock()->getTerminator()); + BranchInst *BI = cast(ExitingBB->getTerminator()); ICmpInst::Predicate P; if (L->contains(BI->getSuccessor(0))) P = ICmpInst::ICMP_NE; else P = ICmpInst::ICMP_EQ; - LLVM_DEBUG(dbgs() << "INDVARS: Rewriting loop exit condition to:\n" - << " LHS:" << *CmpIndVar << '\n' - << " op:\t" << (P == ICmpInst::ICMP_NE ? "!=" : "==") - << "\n" - << " RHS:\t" << *ExitCnt << "\n" - << " IVCount:\t" << *IVCount << "\n"); - IRBuilder<> Builder(BI); // The new loop exit condition should reuse the debug location of the @@ -2391,25 +2445,20 @@ linearFunctionTestReplace(Loop *L, const SCEV *Backedg Builder.SetCurrentDebugLocation(Cond->getDebugLoc()); // LFTR can ignore IV overflow and truncate to the width of - // BECount. This avoids materializing the add(zext(add)) expression. + // ExitCount. This avoids materializing the add(zext(add)) expression. unsigned CmpIndVarSize = SE->getTypeSizeInBits(CmpIndVar->getType()); unsigned ExitCntSize = SE->getTypeSizeInBits(ExitCnt->getType()); if (CmpIndVarSize > ExitCntSize) { const SCEVAddRecExpr *AR = cast(SE->getSCEV(IndVar)); const SCEV *ARStart = AR->getStart(); const SCEV *ARStep = AR->getStepRecurrence(*SE); - // For constant IVCount, avoid truncation. - if (isa(ARStart) && isa(IVCount)) { + // For constant ExitCount, avoid truncation. + if (isa(ARStart) && isa(ExitCount)) { const APInt &Start = cast(ARStart)->getAPInt(); - APInt Count = cast(IVCount)->getAPInt(); - // Note that the post-inc value of BackedgeTakenCount may have overflowed - // above such that IVCount is now zero. - if (IVCount != BackedgeTakenCount && Count == 0) { - Count = APInt::getMaxValue(Count.getBitWidth()).zext(CmpIndVarSize); + APInt Count = cast(ExitCount)->getAPInt(); + Count = Count.zext(CmpIndVarSize); + if (UsePostInc) ++Count; - } - else - Count = Count.zext(CmpIndVarSize); APInt NewLimit; if (cast(ARStep)->getValue()->isNegative()) NewLimit = Start - Count; @@ -2451,6 +2500,14 @@ linearFunctionTestReplace(Loop *L, const SCEV *Backedg "lftr.wideiv"); } } + LLVM_DEBUG(dbgs() << "INDVARS: Rewriting loop exit condition to:\n" + << " LHS:" << *CmpIndVar << '\n' + << " op:\t" << (P == ICmpInst::ICMP_NE ? "!=" : "==") + << "\n" + << " RHS:\t" << *ExitCnt << "\n" + << "ExitCount:\t" << *ExitCount << "\n" + << " was: " << *BI->getCondition() << "\n"); + Value *Cond = Builder.CreateICmp(P, CmpIndVar, ExitCnt, "exitcond"); Value *OrigCond = BI->getCondition(); // It's tempting to use replaceAllUsesWith here to fully replace the old @@ -2615,22 +2672,52 @@ bool IndVarSimplify::run(Loop *L) { NumElimIV += Rewriter.replaceCongruentIVs(L, DT, DeadInsts); // If we have a trip count expression, rewrite the loop's exit condition - // using it. We can currently only handle loops with a single exit. - if (!DisableLFTR && canExpandBackedgeTakenCount(L, SE, Rewriter) && - needsLFTR(L, DT)) { - PHINode *IndVar = FindLoopCounter(L, BackedgeTakenCount, SE, DT); - if (IndVar) { + // using it. + if (!DisableLFTR) { + // For the moment, we only do LFTR for single exit loops. The code is + // structured as it is in the expectation of generalization to multi-exit + // loops in the near future. See D62625 for context. + SmallVector ExitingBlocks; + if (auto *ExitingBB = L->getExitingBlock()) + ExitingBlocks.push_back(ExitingBB); + for (BasicBlock *ExitingBB : ExitingBlocks) { + // Can't rewrite non-branch yet. + if (!isa(ExitingBB->getTerminator())) + continue; + + if (!needsLFTR(L, ExitingBB)) + continue; + + const SCEV *ExitCount = SE->getExitCount(L, ExitingBB); + if (isa(ExitCount)) + continue; + + // Better to fold to true (TODO: do so!) + if (ExitCount->isZero()) + continue; + + PHINode *IndVar = FindLoopCounter(L, ExitingBB, ExitCount, SE, DT); + if (!IndVar) + continue; + + // Avoid high cost expansions. Note: This heuristic is questionable in + // that our definition of "high cost" is not exactly principled. + if (Rewriter.isHighCostExpansion(ExitCount, L)) + continue; + // Check preconditions for proper SCEVExpander operation. SCEV does not - // express SCEVExpander's dependencies, such as LoopSimplify. Instead any - // pass that uses the SCEVExpander must do it. This does not work well for - // loop passes because SCEVExpander makes assumptions about all loops, - // while LoopPassManager only forces the current loop to be simplified. + // express SCEVExpander's dependencies, such as LoopSimplify. Instead + // any pass that uses the SCEVExpander must do it. This does not work + // well for loop passes because SCEVExpander makes assumptions about + // all loops, while LoopPassManager only forces the current loop to be + // simplified. // // FIXME: SCEV expansion has no way to bail out, so the caller must // explicitly check any assumptions made by SCEV. Brittle. - const SCEVAddRecExpr *AR = dyn_cast(BackedgeTakenCount); + const SCEVAddRecExpr *AR = dyn_cast(ExitCount); if (!AR || AR->getLoop()->getLoopPreheader()) - Changed |= linearFunctionTestReplace(L, BackedgeTakenCount, IndVar, + Changed |= linearFunctionTestReplace(L, ExitingBB, + ExitCount, IndVar, Rewriter); } } From owner-svn-src-all@freebsd.org Mon Jul 1 21:50:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D032D15E5417; Mon, 1 Jul 2019 21:50:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7887F6AECC; Mon, 1 Jul 2019 21:50:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 536B51AED4; Mon, 1 Jul 2019 21:50:54 +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 x61LosJH028199; Mon, 1 Jul 2019 21:50:54 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61LosRF028198; Mon, 1 Jul 2019 21:50:54 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201907012150.x61LosRF028198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 1 Jul 2019 21:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349584 - head/sys/dev/mmc/host X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/mmc/host X-SVN-Commit-Revision: 349584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7887F6AECC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 21:50:55 -0000 Author: manu Date: Mon Jul 1 21:50:53 2019 New Revision: 349584 URL: https://svnweb.freebsd.org/changeset/base/349584 Log: Since r349571 we need all the accessor to be present for set or get otherwise we panic. dwmmc don't handle VCCQ (voltage for the IO line of the SD/eMMC) or TIMING. Add the needed accessor in the {read,write}_ivar functions. Reviewed by: imp (previous version) Modified: head/sys/dev/mmc/host/dwmmc.c Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Mon Jul 1 21:06:10 2019 (r349583) +++ head/sys/dev/mmc/host/dwmmc.c Mon Jul 1 21:50:53 2019 (r349584) @@ -1096,6 +1096,10 @@ dwmmc_read_ivar(device_t bus, device_t child, int whic break; case MMCBR_IVAR_MAX_DATA: *(int *)result = sc->desc_count; + break; + case MMCBR_IVAR_TIMING: + *(int *)result = sc->host.ios.timing; + break; } return (0); } @@ -1133,6 +1137,14 @@ dwmmc_write_ivar(device_t bus, device_t child, int whi break; case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; + break; + case MMCBR_IVAR_TIMING: + sc->host.ios.timing = value; + break; + + /* Not handled */ + case MMCBR_IVAR_VCCQ: + return (0); break; /* These are read-only */ case MMCBR_IVAR_CAPS: From owner-svn-src-all@freebsd.org Mon Jul 1 22:00:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEE4115E5795; Mon, 1 Jul 2019 22:00:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 665426B79B; Mon, 1 Jul 2019 22:00:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AE421B065; Mon, 1 Jul 2019 22:00:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61M0hso035643; Mon, 1 Jul 2019 22:00:43 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61M0hiN035637; Mon, 1 Jul 2019 22:00:43 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201907012200.x61M0hiN035637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 1 Jul 2019 22:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349585 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 349585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 665426B79B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 22:00:44 -0000 Author: alc Date: Mon Jul 1 22:00:42 2019 New Revision: 349585 URL: https://svnweb.freebsd.org/changeset/base/349585 Log: Tidy up pmap_copy(). Notably, deindent the innermost loop by making a simple change to the control flow. Replace an unnecessary test by a KASSERT. Add a comment explaining an obscure test. Reviewed by: kib, markj MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D20812 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Jul 1 21:50:53 2019 (r349584) +++ head/sys/amd64/amd64/pmap.c Mon Jul 1 22:00:42 2019 (r349585) @@ -6345,18 +6345,18 @@ pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t * * This routine is only advisory and need not do anything. */ - void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, vm_offset_t src_addr) { struct rwlock *lock; struct spglist free; - vm_offset_t addr; - vm_offset_t end_addr = src_addr + len; - vm_offset_t va_next; + pml4_entry_t *pml4e; + pdp_entry_t *pdpe; + pd_entry_t *pde, srcptepaddr; + pt_entry_t *dst_pte, PG_A, PG_M, PG_V, ptetemp, *src_pte; + vm_offset_t addr, end_addr, va_next; vm_page_t dst_pdpg, dstmpte, srcmpte; - pt_entry_t PG_A, PG_M, PG_V; if (dst_addr != src_addr) return; @@ -6375,6 +6375,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ if (pmap_emulate_ad_bits(dst_pmap)) return; + end_addr = src_addr + len; lock = NULL; if (dst_pmap < src_pmap) { PMAP_LOCK(dst_pmap); @@ -6389,11 +6390,6 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ PG_V = pmap_valid_bit(dst_pmap); for (addr = src_addr; addr < end_addr; addr = va_next) { - pt_entry_t *src_pte, *dst_pte; - pml4_entry_t *pml4e; - pdp_entry_t *pdpe; - pd_entry_t srcptepaddr, *pde; - KASSERT(addr < UPT_MIN_ADDRESS, ("pmap_copy: invalid to pmap_copy page tables")); @@ -6435,7 +6431,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ pmap_pv_insert_pde(dst_pmap, addr, srcptepaddr, PMAP_ENTER_NORECLAIM, &lock))) { *pde = srcptepaddr & ~PG_W; - pmap_resident_count_inc(dst_pmap, NBPDR / PAGE_SIZE); + pmap_resident_count_inc(dst_pmap, NBPDR / + PAGE_SIZE); atomic_add_long(&pmap_pde_mappings, 1); } else dst_pdpg->wire_count--; @@ -6453,58 +6450,54 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ src_pte = (pt_entry_t *)PHYS_TO_DMAP(srcptepaddr); src_pte = &src_pte[pmap_pte_index(addr)]; dstmpte = NULL; - while (addr < va_next) { - pt_entry_t ptetemp; + for (; addr < va_next; addr += PAGE_SIZE, src_pte++) { ptetemp = *src_pte; + /* - * we only virtual copy managed pages + * We only virtual copy managed pages. */ - if ((ptetemp & PG_MANAGED) != 0) { - if (dstmpte != NULL && - dstmpte->pindex == pmap_pde_pindex(addr)) - dstmpte->wire_count++; - else if ((dstmpte = pmap_allocpte(dst_pmap, - addr, NULL)) == NULL) - goto out; - dst_pte = (pt_entry_t *) - PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dstmpte)); - dst_pte = &dst_pte[pmap_pte_index(addr)]; - if (*dst_pte == 0 && - pmap_try_insert_pv_entry(dst_pmap, addr, - PHYS_TO_VM_PAGE(ptetemp & PG_FRAME), - &lock)) { + if ((ptetemp & PG_MANAGED) == 0) + continue; + + if (dstmpte != NULL) { + KASSERT(dstmpte->pindex == + pmap_pde_pindex(addr), + ("dstmpte pindex/addr mismatch")); + dstmpte->wire_count++; + } else if ((dstmpte = pmap_allocpte(dst_pmap, addr, + NULL)) == NULL) + goto out; + dst_pte = (pt_entry_t *) + PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dstmpte)); + dst_pte = &dst_pte[pmap_pte_index(addr)]; + if (*dst_pte == 0 && + pmap_try_insert_pv_entry(dst_pmap, addr, + PHYS_TO_VM_PAGE(ptetemp & PG_FRAME), &lock)) { + /* + * Clear the wired, modified, and accessed + * (referenced) bits during the copy. + */ + *dst_pte = ptetemp & ~(PG_W | PG_M | PG_A); + pmap_resident_count_inc(dst_pmap, 1); + } else { + SLIST_INIT(&free); + if (pmap_unwire_ptp(dst_pmap, addr, dstmpte, + &free)) { /* - * Clear the wired, modified, and - * accessed (referenced) bits - * during the copy. + * Although "addr" is not mapped, + * paging-structure caches could + * nonetheless have entries that refer + * to the freed page table pages. + * Invalidate those entries. */ - *dst_pte = ptetemp & ~(PG_W | PG_M | - PG_A); - pmap_resident_count_inc(dst_pmap, 1); - } else { - SLIST_INIT(&free); - if (pmap_unwire_ptp(dst_pmap, addr, - dstmpte, &free)) { - /* - * Although "addr" is not - * mapped, paging-structure - * caches could nonetheless - * have entries that refer to - * the freed page table pages. - * Invalidate those entries. - */ - pmap_invalidate_page(dst_pmap, - addr); - vm_page_free_pages_toq(&free, - true); - } - goto out; + pmap_invalidate_page(dst_pmap, addr); + vm_page_free_pages_toq(&free, true); } - if (dstmpte->wire_count >= srcmpte->wire_count) - break; + goto out; } - addr += PAGE_SIZE; - src_pte++; + /* Have we copied all of the valid mappings? */ + if (dstmpte->wire_count >= srcmpte->wire_count) + break; } } out: From owner-svn-src-all@freebsd.org Tue Jul 2 02:15:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2850A15E60A5; Tue, 2 Jul 2019 02:15:19 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E97F86D84; Tue, 2 Jul 2019 01:06:05 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C47A1D012; Tue, 2 Jul 2019 01:06:05 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62165Bw028112; Tue, 2 Jul 2019 01:06:05 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62164nS028106; Tue, 2 Jul 2019 01:06:04 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201907020106.x62164nS028106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 2 Jul 2019 01:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349590 - vendor/tzdata/dist X-SVN-Group: vendor X-SVN-Commit-Author: philip X-SVN-Commit-Paths: vendor/tzdata/dist X-SVN-Commit-Revision: 349590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E97F86D84 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 02:15:19 -0000 Author: philip Date: Tue Jul 2 01:06:03 2019 New Revision: 349590 URL: https://svnweb.freebsd.org/changeset/base/349590 Log: Import tzdata 2019b Modified: vendor/tzdata/dist/Makefile vendor/tzdata/dist/NEWS vendor/tzdata/dist/africa vendor/tzdata/dist/antarctica vendor/tzdata/dist/asia vendor/tzdata/dist/australasia vendor/tzdata/dist/backzone vendor/tzdata/dist/checktab.awk vendor/tzdata/dist/europe vendor/tzdata/dist/factory vendor/tzdata/dist/northamerica vendor/tzdata/dist/pacificnew vendor/tzdata/dist/southamerica vendor/tzdata/dist/systemv vendor/tzdata/dist/theory.html vendor/tzdata/dist/version vendor/tzdata/dist/zishrink.awk vendor/tzdata/dist/zone.tab vendor/tzdata/dist/zone1970.tab vendor/tzdata/dist/zoneinfo2tdf.pl Modified: vendor/tzdata/dist/Makefile ============================================================================== --- vendor/tzdata/dist/Makefile Mon Jul 1 23:22:26 2019 (r349589) +++ vendor/tzdata/dist/Makefile Tue Jul 2 01:06:03 2019 (r349590) @@ -35,11 +35,13 @@ DATAFORM= main LOCALTIME= GMT -# If you want something other than Eastern United States time as a template -# for handling ruleless POSIX-style timezone environment variables, +# The POSIXRULES macro controls interpretation of nonstandard and obsolete +# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules. +# In the reference implementation, if you want something other than Eastern +# United States time as a template for handling these settings, you can # change the line below (after finding the timezone you want in the # one of the $(TDATA) source files, or adding it to a source file). -# A ruleless environment setting like TZ='CST6CDT' uses the rules in the +# A setting like TZ='EET-2EEST' is supposed to use the rules in the # template file to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. @@ -49,6 +51,17 @@ LOCALTIME= GMT # Use the command # make zonenames # to get a list of the values you can use for POSIXRULES. +# +# If POSIXRULES is empty, no template is installed; this is the intended +# future default for POSIXRULES. +# +# Nonempty POSIXRULES is obsolete and should not be relied on, because: +# * It does not work correctly in popular implementations such as GNU/Linux. +# * It does not work in the tzdb implementation for timestamps after 2037. +# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions +# at standard time or UT rather than at local time. +# In short, software should avoid ruleless settings like TZ='EET-2EEST' +# and so should not depend on the value of POSIXRULES. POSIXRULES= America/New_York @@ -231,6 +244,13 @@ LDLIBS= # other than simply getting garbage data # -DUSE_LTZ=0 to build zdump with the system time zone library # Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below. +# -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and +# similarly for "fat". Fat TZif files work around incompatibilities +# and bugs in some TZif readers, notably readers that mishandle 64-bit +# data in TZif files. Slim TZif files are more efficient and do not +# work around these incompatibilities and bugs. If not given, the +# current default is "fat" but this is intended to change as readers +# requiring fat files often mishandle timestamps after 2037 anyway. # -DZIC_MAX_ABBR_LEN_WO_WARN=3 # (or some other number) to set the maximum time zone abbreviation length # that zic will accept without a warning (the default is 6) @@ -364,7 +384,9 @@ ZIC= $(zic) $(ZFLAGS) # To shrink the size of installed TZif files, # append "-r @N" to omit data before N-seconds-after-the-Epoch. -# See the zic man page for more about -r. +# You can also append "-b slim" if that is not already the default; +# see ZIC_BLOAT_DEFAULT above. +# See the zic man page for more about -b and -r. ZFLAGS= # How to use zic to install TZif files. @@ -388,6 +410,9 @@ KSHELL= /bin/bash # Name of curl , used for HTML validation. CURL= curl +# Name of GNU Privacy Guard , used to sign distributions. +GPG= gpg + # The path where SGML DTDs are kept and the catalog file(s) to use when # validating HTML 4.01. The default should work on both Debian and Red Hat. SGML_TOPDIR= /usr @@ -562,7 +587,9 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(LIBDIR)' \ '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' - $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \ + $(ZIC_INSTALL) -l $(LOCALTIME) \ + `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ + ` $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -781,12 +808,6 @@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c - $(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \ - LC_ALL=C sort -c - $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ - LC_ALL=C sort -cu touch $@ check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi @@ -1051,7 +1072,7 @@ tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz $(ALL_ASC): - gpg2 --armor --detach-sign $? + $(GPG) --armor --detach-sign $? TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T typecheck: typecheck_long_long typecheck_unsigned Modified: vendor/tzdata/dist/NEWS ============================================================================== --- vendor/tzdata/dist/NEWS Mon Jul 1 23:22:26 2019 (r349589) +++ vendor/tzdata/dist/NEWS Tue Jul 2 01:06:03 2019 (r349590) @@ -1,8 +1,102 @@ News for the tz database -Release 20198 - 2019-03-25 22:01:33 -0700 +Release 2019b - 2019-07-01 00:09:53 -0700 Briefly: + Brazil no longer observes DST. + 'zic -b slim' outputs smaller TZif files; please try it out. + Palestine's 2019 spring-forward transition was on 03-29, not 03-30. + + Changes to future timestamps + + Brazil has canceled DST and will stay on standard time indefinitely. + (Thanks to Steffen Thorsen, Marcus Diniz, and Daniel Soares de + Oliveira.) + + Predictions for Morocco now go through 2087 instead of 2037, to + work around a problem on newlib when using TZif files output by + zic 2019a or earlier. (Problem reported by David Gauchard.) + + Changes to past and future timestamps + + Palestine's 2019 spring transition was 03-29 at 00:00, not 03-30 + at 01:00. (Thanks to Sharef Mustafa and Even Scharning.) Guess + future transitions to be March's last Friday at 00:00. + + Changes to past timestamps + + Hong Kong's 1941-06-15 spring-forward transition was at 03:00, not + 03:30. Its 1945 transition from JST to HKT was on 11-18 at 02:00, + not 09-15 at 00:00. In 1946 its spring-forward transition was on + 04-21 at 00:00, not the previous day at 03:30. From 1946 through + 1952 its fall-back transitions occurred at 04:30, not at 03:30. + In 1947 its fall-back transition was on 11-30, not 12-30. + (Thanks to P Chan.) + + Changes to past time zone abbreviations + + Italy's 1866 transition to Rome Mean Time was on December 12, not + September 22. This affects only the time zone abbreviation for + Europe/Rome between those dates. (Thanks to Stephen Trainor and + Luigi Rosa.) + + Changes affecting metadata only + + Add info about the Crimea situation in zone1970.tab and zone.tab. + (Problem reported by Serhii Demediuk.) + + Changes to code + + zic's new -b option supports a way to control data bloat and to + test for year-2038 bugs in software that reads TZif files. + 'zic -b fat' and 'zic -b slim' generate larger and smaller output; + for example, changing from fat to slim shrinks the Europe/London + file from 3648 to 1599 bytes, saving about 56%. Fat and slim + files represent the same set of timestamps and use the same TZif + format as documented in tzfile(5) and in Internet RFC 8536. + Fat format attempts to work around bugs or incompatibilities in + older software, notably software that mishandles 64-bit TZif data + or uses obsolete TZ strings like "EET-2EEST" that lack DST rules. + Slim format is more efficient and does not work around 64-bit bugs + or obsolete TZ strings. Currently zic defaults to fat format + unless you compile with -DZIC_BLOAT_DEFAULT=\"slim\"; this + out-of-the-box default is intended to change in future releases + as the buggy software often mishandles timestamps anyway. + + zic no longer treats a set of rules ending in 2037 specially. + Previously, zic assumed that such a ruleset meant that future + timestamps could not be predicted, and therefore omitted a + POSIX-like TZ string in the TZif output. The old behavior is no + longer needed for current tzdata, and caused problems with newlib + when used with older tzdata (reported by David Gauchard). + + zic no longer generates some artifact transitions. For example, + Europe/London no longer has a no-op transition in January 1996. + + Changes to build procedure + + tzdata.zi now assumes zic 2017c or later. This shrinks tzdata.zi + by a percent or so. + + Changes to documentation and commentary + + The Makefile now documents the POSIXRULES macro as being obsolete, + and similarly, zic's -p POSIXRULES option is now documented as + being obsolete. Although the POSIXRULES feature still exists and + works as before, in practice it is rarely used for its intended + purpose, and it does not work either in the default reference + implementation (for timestamps after 2037) or in common + implementations such as GNU/Linux (for contemporary timestamps). + Since POSIXRULES was designed primarily as a temporary transition + facility for System V platforms that died off decades ago, it is + being decommissioned rather than institutionalized. + + New info on Bonin Islands and Marcus (thanks to Wakaba and Phake Nick). + + +Release 2019a - 2019-03-25 22:01:33 -0700 + + Briefly: Palestine "springs forward" on 2019-03-30 instead of 2019-03-23. Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00. @@ -481,7 +575,7 @@ Release 2018d - 2018-03-22 07:05:46 -0700 The code is a bit more portable to MS-Windows. Installers can compile with -DRESERVE_STD_EXT_IDS on MS-Windows platforms that reserve identifiers like 'localtime'. (Thanks to Manuela - Friedrich). + Friedrich.) Changes to documentation and commentary @@ -2276,7 +2370,7 @@ Release 2014f - 2014-08-05 17:42:36 -0700 warlord Jin Shuren in the data. Commentary about the coverage of each Russian zone has been standardized. - (Thanks to Tim Parenti). + (Thanks to Tim Parenti.) There is new commentary about contemporary timekeeping in Ethiopia. @@ -2724,7 +2818,7 @@ Release 2013e - 2013-09-19 23:50:04 -0700 Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46. This affects Europe/Zurich timestamps from 1853 to 1894. (Thanks - to Alois Treindl). + to Alois Treindl.) Change the date of the circa-1850 Zurich transition from 1849-09-12 to 1853-07-16, overriding Shanks with data from Messerli about @@ -3034,7 +3128,7 @@ Release 2013a - 2013-02-27 09:20:35 -0800 (Thanks to Arthur David Olson.) Improve the commentary about which districts observe what times - in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson). + in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson.) Add web page links to tz.js. Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Mon Jul 1 23:22:26 2019 (r349589) +++ vendor/tzdata/dist/africa Tue Jul 2 01:06:03 2019 (r349590) @@ -89,7 +89,7 @@ Rule Algeria 1980 only - Apr 25 0:00 1:00 S Rule Algeria 1980 only - Oct 31 2:00 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 0:00 Algeria WE%sT 1940 Feb 25 2:00 @@ -124,7 +124,7 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 # For now, ignore that and follow the 1911-05-26 Portuguese decree # (see Europe/Lisbon). # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia -2:00 - -02 1942 Sep -2:00 1:00 -01 1945 Oct 15 @@ -135,7 +135,7 @@ Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2 # See Africa/Lagos. # Chad -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena 1:00 - WAT 1979 Oct 14 1:00 1:00 WAST 1980 Mar 8 @@ -151,7 +151,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Dja # See Africa/Lagos. # Côte d'Ivoire / Ivory Coast -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Abidjan -0:16:08 - LMT 1912 0:00 - GMT Link Africa/Abidjan Africa/Bamako # Mali @@ -356,7 +356,7 @@ Rule Egypt 2014 only - Jun 26 24:00 0 - Rule Egypt 2014 only - Jul 31 24:00 1:00 S Rule Egypt 2014 only - Sep lastThu 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct 2:00 Egypt EE%sT @@ -414,7 +414,7 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Ghana 1920 1942 - Sep 1 0:00 0:20 - Rule Ghana 1920 1942 - Dec 31 0:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 0:00 Ghana GMT/+0020 @@ -428,13 +428,13 @@ Zone Africa/Accra -0:00:52 - LMT 1918 # evidently confusing the date of the Portuguese decree # (see Europe/Lisbon) with the date that it took effect. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u -1:00 - -01 1975 0:00 - GMT # Kenya -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 2:30 - +0230 1940 @@ -469,7 +469,7 @@ Link Africa/Nairobi Indian/Mayotte # Use the abbreviation "MMT" before 1972, as the more-accurate numeric # abbreviation "-004430" would be one byte over the POSIX limit. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time -0:44:30 - MMT 1972 Jan 7 # approximately MMT @@ -519,7 +519,7 @@ Rule Libya 1997 only - Apr 4 0:00 1:00 S Rule Libya 1997 only - Oct 4 0:00 0 - Rule Libya 2013 only - Mar lastFri 1:00 1:00 S Rule Libya 2013 only - Oct lastFri 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tripoli 0:52:44 - LMT 1920 1:00 Libya CE%sT 1959 2:00 - EET 1982 @@ -629,7 +629,7 @@ Rule Mauritius 1982 only - Oct 10 0:00 1:00 - Rule Mauritius 1983 only - Mar 21 0:00 0 - Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 - Rule Mauritius 2009 only - Mar lastSun 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez @@ -860,18 +860,24 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # the week end after.... The government does not announce yet the decision # about this temporary change. But it s 99% sure that it will be the case, # as in previous years. An unofficial survey was done these days, showing -# that 64% of asked peopke are ok for moving from +1 to +0 during Ramadan. +# that 64% of asked people are ok for moving from +1 to +0 during Ramadan. # https://leconomiste.com/article/1035870-enquete-l-economiste-sunergia-64-des-marocains-plebiscitent-le-gmt-pendant-ramadan + +# From Naoufal Semlali (2019-04-16): +# Morocco will be on GMT starting from Sunday, May 5th 2019 at 3am. +# The switch to GMT+1 will occur on Sunday, June 9th 2019 at 2am.... +# http://fr.le360.ma/societe/voici-la-date-du-retour-a-lheure-legale-au-maroc-188222 # -# From Paul Eggert (2018-11-01): -# For now, guess that Morocco will fall back at 03:00 the last Sunday -# before Ramadan, and spring forward at 02:00 the first Sunday after +# From Paul Eggert (2019-05-20): +# This agrees with our 2018-11-01 guess that the Moroccan government +# would continue the practice of falling back at 03:00 the last Sunday +# before Ramadan, and of springing forward at 02:00 the first Sunday after # Ramadan, as this has been the practice since 2012. To implement this, -# transition dates for 2019 through 2037 were determined by running the -# following program under GNU Emacs 26.1. +# transition dates for 2019 through 2087 were determined by running the +# following program under GNU Emacs 26.2. # (let ((islamic-year 1440)) # (require 'cal-islam) -# (while (< islamic-year 1460) +# (while (< islamic-year 1511) # (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) # (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) # (sunday 0)) @@ -970,8 +976,114 @@ Rule Morocco 2036 only - Oct 19 3:00 -1:00 - Rule Morocco 2036 only - Nov 23 2:00 0 - Rule Morocco 2037 only - Oct 4 3:00 -1:00 - Rule Morocco 2037 only - Nov 15 2:00 0 - +Rule Morocco 2038 only - Sep 26 3:00 -1:00 - +Rule Morocco 2038 only - Oct 31 2:00 0 - +Rule Morocco 2039 only - Sep 18 3:00 -1:00 - +Rule Morocco 2039 only - Oct 23 2:00 0 - +Rule Morocco 2040 only - Sep 2 3:00 -1:00 - +Rule Morocco 2040 only - Oct 14 2:00 0 - +Rule Morocco 2041 only - Aug 25 3:00 -1:00 - +Rule Morocco 2041 only - Sep 29 2:00 0 - +Rule Morocco 2042 only - Aug 10 3:00 -1:00 - +Rule Morocco 2042 only - Sep 21 2:00 0 - +Rule Morocco 2043 only - Aug 2 3:00 -1:00 - +Rule Morocco 2043 only - Sep 6 2:00 0 - +Rule Morocco 2044 only - Jul 24 3:00 -1:00 - +Rule Morocco 2044 only - Aug 28 2:00 0 - +Rule Morocco 2045 only - Jul 9 3:00 -1:00 - +Rule Morocco 2045 only - Aug 20 2:00 0 - +Rule Morocco 2046 only - Jul 1 3:00 -1:00 - +Rule Morocco 2046 only - Aug 5 2:00 0 - +Rule Morocco 2047 only - Jun 23 3:00 -1:00 - +Rule Morocco 2047 only - Jul 28 2:00 0 - +Rule Morocco 2048 only - Jun 7 3:00 -1:00 - +Rule Morocco 2048 only - Jul 19 2:00 0 - +Rule Morocco 2049 only - May 30 3:00 -1:00 - +Rule Morocco 2049 only - Jul 4 2:00 0 - +Rule Morocco 2050 only - May 15 3:00 -1:00 - +Rule Morocco 2050 only - Jun 26 2:00 0 - +Rule Morocco 2051 only - May 7 3:00 -1:00 - +Rule Morocco 2051 only - Jun 11 2:00 0 - +Rule Morocco 2052 only - Apr 28 3:00 -1:00 - +Rule Morocco 2052 only - Jun 2 2:00 0 - +Rule Morocco 2053 only - Apr 13 3:00 -1:00 - +Rule Morocco 2053 only - May 25 2:00 0 - +Rule Morocco 2054 only - Apr 5 3:00 -1:00 - +Rule Morocco 2054 only - May 10 2:00 0 - +Rule Morocco 2055 only - Mar 28 3:00 -1:00 - +Rule Morocco 2055 only - May 2 2:00 0 - +Rule Morocco 2056 only - Mar 12 3:00 -1:00 - +Rule Morocco 2056 only - Apr 23 2:00 0 - +Rule Morocco 2057 only - Mar 4 3:00 -1:00 - +Rule Morocco 2057 only - Apr 8 2:00 0 - +Rule Morocco 2058 only - Feb 17 3:00 -1:00 - +Rule Morocco 2058 only - Mar 31 2:00 0 - +Rule Morocco 2059 only - Feb 9 3:00 -1:00 - +Rule Morocco 2059 only - Mar 16 2:00 0 - +Rule Morocco 2060 only - Feb 1 3:00 -1:00 - +Rule Morocco 2060 only - Mar 7 2:00 0 - +Rule Morocco 2061 only - Jan 16 3:00 -1:00 - +Rule Morocco 2061 only - Feb 27 2:00 0 - +Rule Morocco 2062 only - Jan 8 3:00 -1:00 - +Rule Morocco 2062 only - Feb 12 2:00 0 - +Rule Morocco 2062 only - Dec 31 3:00 -1:00 - +Rule Morocco 2063 only - Feb 4 2:00 0 - +Rule Morocco 2063 only - Dec 16 3:00 -1:00 - +Rule Morocco 2064 only - Jan 20 2:00 0 - +Rule Morocco 2064 only - Dec 7 3:00 -1:00 - +Rule Morocco 2065 only - Jan 11 2:00 0 - +Rule Morocco 2065 only - Nov 22 3:00 -1:00 - +Rule Morocco 2066 only - Jan 3 2:00 0 - +Rule Morocco 2066 only - Nov 14 3:00 -1:00 - +Rule Morocco 2066 only - Dec 19 2:00 0 - +Rule Morocco 2067 only - Nov 6 3:00 -1:00 - +Rule Morocco 2067 only - Dec 11 2:00 0 - +Rule Morocco 2068 only - Oct 21 3:00 -1:00 - +Rule Morocco 2068 only - Dec 2 2:00 0 - +Rule Morocco 2069 only - Oct 13 3:00 -1:00 - +Rule Morocco 2069 only - Nov 17 2:00 0 - +Rule Morocco 2070 only - Oct 5 3:00 -1:00 - +Rule Morocco 2070 only - Nov 9 2:00 0 - +Rule Morocco 2071 only - Sep 20 3:00 -1:00 - +Rule Morocco 2071 only - Oct 25 2:00 0 - +Rule Morocco 2072 only - Sep 11 3:00 -1:00 - +Rule Morocco 2072 only - Oct 16 2:00 0 - +Rule Morocco 2073 only - Aug 27 3:00 -1:00 - +Rule Morocco 2073 only - Oct 8 2:00 0 - +Rule Morocco 2074 only - Aug 19 3:00 -1:00 - +Rule Morocco 2074 only - Sep 23 2:00 0 - +Rule Morocco 2075 only - Aug 11 3:00 -1:00 - +Rule Morocco 2075 only - Sep 15 2:00 0 - +Rule Morocco 2076 only - Jul 26 3:00 -1:00 - +Rule Morocco 2076 only - Sep 6 2:00 0 - +Rule Morocco 2077 only - Jul 18 3:00 -1:00 - +Rule Morocco 2077 only - Aug 22 2:00 0 - +Rule Morocco 2078 only - Jul 10 3:00 -1:00 - +Rule Morocco 2078 only - Aug 14 2:00 0 - +Rule Morocco 2079 only - Jun 25 3:00 -1:00 - +Rule Morocco 2079 only - Jul 30 2:00 0 - +Rule Morocco 2080 only - Jun 16 3:00 -1:00 - +Rule Morocco 2080 only - Jul 21 2:00 0 - +Rule Morocco 2081 only - Jun 1 3:00 -1:00 - +Rule Morocco 2081 only - Jul 13 2:00 0 - +Rule Morocco 2082 only - May 24 3:00 -1:00 - +Rule Morocco 2082 only - Jun 28 2:00 0 - +Rule Morocco 2083 only - May 16 3:00 -1:00 - +Rule Morocco 2083 only - Jun 20 2:00 0 - +Rule Morocco 2084 only - Apr 30 3:00 -1:00 - +Rule Morocco 2084 only - Jun 11 2:00 0 - +Rule Morocco 2085 only - Apr 22 3:00 -1:00 - +Rule Morocco 2085 only - May 27 2:00 0 - +Rule Morocco 2086 only - Apr 14 3:00 -1:00 - +Rule Morocco 2086 only - May 19 2:00 0 - +Rule Morocco 2087 only - Mar 30 3:00 -1:00 - +Rule Morocco 2087 only - May 4 2:00 0 - +# For dates after the somewhat-arbitrary cutoff of 2087, assume that +# Morocco will no longer observe DST. At some point this table will +# need to be extended, though quite possibly Morocco will change the +# rules first. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 0:00 Morocco +00/+01 1984 Mar 16 1:00 - +01 1986 @@ -1001,7 +1113,7 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aai # https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Maputo 2:10:20 - LMT 1903 Mar 2:00 - CAT Link Africa/Maputo Africa/Blantyre # Malawi @@ -1073,7 +1185,7 @@ Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 WAT #Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 WAT # End of rearguard section. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 @@ -1094,7 +1206,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 # See Africa/Lagos. # Nigeria -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Lagos 0:13:36 - LMT 1919 Sep 1:00 - WAT Link Africa/Lagos Africa/Bangui # Central African Republic @@ -1108,7 +1220,7 @@ Link Africa/Lagos Africa/Niamey # Niger Link Africa/Lagos Africa/Porto-Novo # Benin # Réunion -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis 4:00 - +04 # @@ -1168,7 +1280,7 @@ Zone Africa/Sao_Tome 0:26:56 - LMT 1884 # See Africa/Abidjan. # Seychelles -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria 4:00 - +04 # From Paul Eggert (2001-05-30): @@ -1188,7 +1300,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 - Rule SA 1943 1944 - Mar Sun>=15 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 1:30 - SAST 1903 Mar 2:00 SA SAST @@ -1223,14 +1335,14 @@ Rule Sudan 1970 only - May 1 0:00 1:00 S Rule Sudan 1970 1985 - Oct 15 0:00 0 - Rule Sudan 1971 only - Apr 30 0:00 1:00 S Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Khartoum 2:10:08 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT 2017 Nov 1 2:00 - CAT # South Sudan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Juba 2:06:28 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT @@ -1336,7 +1448,7 @@ Rule Tunisia 2006 2008 - Oct lastSun 2:00s 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. # Shanks & Pottenger say the 1911 switch was on Mar 9; go with Howse's Mar 11. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tunis 0:40:44 - LMT 1881 May 12 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 1:00 Tunisia CE%sT Modified: vendor/tzdata/dist/antarctica ============================================================================== --- vendor/tzdata/dist/antarctica Mon Jul 1 23:22:26 2019 (r349589) +++ vendor/tzdata/dist/antarctica Tue Jul 2 01:06:03 2019 (r349590) @@ -13,7 +13,7 @@ # for information. # Unless otherwise specified, we have no time zone information. -# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited. +# FORMAT is '-00' and STDOFF is 0 for locations while uninhabited. # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -70,7 +70,7 @@ # Australian Antarctica Division informed us that Casey changed time # zone to UTC+11 in "the morning of 22nd October 2016". -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Casey 0 - -00 1969 8:00 - +08 2009 Oct 18 2:00 11:00 - +11 2010 Mar 5 2:00 @@ -142,7 +142,7 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13 # St Paul Island - near Amsterdam, uninhabited # fishing stations operated variously 1819/1931 # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français 5:00 - +05 # @@ -153,7 +153,7 @@ Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Françai # Another base at Port-Martin, 50km east, began operation in 1947. # It was destroyed by fire on 1952-01-14. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/DumontDUrville 0 - -00 1947 10:00 - +10 1952 Jan 14 0 - -00 1956 Nov @@ -181,7 +181,7 @@ Zone Antarctica/DumontDUrville 0 - -00 1947 # Syowa station, which is the first antarctic station of Japan, # was established on 1957-01-29. Since Syowa station is still the main # station of Japan, it's appropriate for the principal location. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Syowa 0 - -00 1957 Jan 29 3:00 - +03 # See: @@ -231,7 +231,7 @@ Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02 #Rule Troll 2004 max - Nov 7 1:00u 0:00 +00 # Remove the following line when uncommenting the above '#Rule' lines. Rule Troll 2004 max - Oct lastSun 1:00u 0:00 +00 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Troll 0 - -00 2005 Feb 12 0:00 Troll %s @@ -305,7 +305,7 @@ Zone Antarctica/Vostok 0 - -00 1957 Dec 16 # From Paul Eggert (2002-10-22) # says Rothera is -03 all year. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Rothera 0 - -00 1976 Dec 1 -3:00 - -03 Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Mon Jul 1 23:22:26 2019 (r349589) +++ vendor/tzdata/dist/asia Tue Jul 2 01:06:03 2019 (r349590) @@ -84,7 +84,7 @@ Rule RussiaAsia 1985 2010 - Mar lastSun 2:00s 1:00 - Rule RussiaAsia 1996 2010 - Oct lastSun 2:00s 0 - # Afghanistan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 4:00 - +04 1945 4:30 - +0430 @@ -117,7 +117,7 @@ Zone Asia/Kabul 4:36:48 - LMT 1890 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Armenia 2011 only - Mar lastSun 2:00s 1:00 - Rule Armenia 2011 only - Oct lastSun 2:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -143,7 +143,7 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 - Rule Azer 1997 2015 - Oct lastSun 5:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baku 3:19:24 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -231,7 +231,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 Rule Dhaka 2009 only - Jun 19 23:00 1:00 - Rule Dhaka 2009 only - Dec 31 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? 6:30 - +0630 1942 May 15 @@ -241,7 +241,7 @@ Zone Asia/Dhaka 6:01:40 - LMT 1890 6:00 Dhaka +06/+07 # Bhutan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu 5:30 - +0530 1987 Oct 6:00 - +06 @@ -252,13 +252,13 @@ Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimb # We have no information as to when standard time was introduced; # assume it occurred in 1907, the same year as Mauritius (which # then contained the Chagos Archipelago). -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Chagos 4:49:40 - LMT 1907 5:00 - +05 1996 6:00 - +06 # Brunei -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan 7:30 - +0730 1933 8:00 - +08 @@ -273,7 +273,7 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri # of Greenwich." This refers to the period before Burma's transition to +0630, # a transition for which Shanks is the only source. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoon 6:24:47 - RMT 1920 # Rangoon local time 6:30 - +0630 1942 May @@ -561,7 +561,7 @@ Rule PRC 1987 1991 - Apr Sun>=11 2:00 1:00 D # that the sort of users who prefer Asia/Urumqi now typically ignored the # +08 mandate back then. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Beijing time, used throughout China; represented by Shanghai. Zone Asia/Shanghai 8:05:43 - LMT 1901 8:00 Shang C%sT 1949 May 28 @@ -652,11 +652,41 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # https://i.imgur.com/05KkvtC.png # * 1941-09-30, Hong Kong Daily Press, Winter Time Warning. # https://i.imgur.com/dge4kFJ.png -# Also, the Liberation day of Hong Kong after WWII which British rule -# over the territory resumed was August 30, 1945, which I think should -# be the termination date for the use of JST in the territory.... -# From Paul Eggert (2018-11-17): +# From P Chan (2018-12-31): +# * According to the Hong Kong Daylight-Saving Regulations, 1941, the +# 1941 spring-forward transition was at 03:00. +# http://sunzi.lib.hku.hk/hkgro/view/g1941/304271.pdf +# http://sunzi.lib.hku.hk/hkgro/view/g1941/305516.pdf +# * According to some articles from South China Morning Post, +08 was +# resumed on 1945-11-18 at 02:00. +# https://i.imgur.com/M2IsZ3c.png +# https://i.imgur.com/iOPqrVo.png +# https://i.imgur.com/fffcGDs.png +# * Some newspapers ... said the 1946 spring-forward transition was on +# 04-21 at 00:00. The Kung Sheung Evening News 1946-04-20 (Chinese) +# https://i.imgur.com/ZSzent0.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2FH7zGe%2FKF%2BFLYsuqGhRBfe p.4 +# The Kung Sheung Daily News 1946-04-21 (Chinese) +# https://i.imgur.com/7ecmRlcm.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2BQBGt1%2BwUj5qG2GqtwR3Wh p.4 +# * According to the Summer Time Ordinance (1946), the fallback +# transitions between 1946 and 1952 were at 03:30 Standard Time (+08) +# http://oelawhk.lib.hku.hk/archive/files/bb74b06a74d5294620a15de560ab33c6.pdf +# * Some other laws and regulations related to DST from 1953 to 1979 +# Summer Time Ordinance 1953 +# https://i.imgur.com/IOlJMav.jpg +# Summer Time (Amendment) Ordinance 1965 +# https://i.imgur.com/8rofeLa.jpg +# Interpretation and General Clauses Ordinance (1966) +# https://i.imgur.com/joy3msj.jpg +# Emergency (Summer Time) Regulation 1973 +# Interpretation and General Clauses (Amendment) Ordinance 1977 +# https://i.imgur.com/RaNqnc4.jpg +# Resolution of the Legislative Council passed on 9 May 1979 +# https://www.legco.gov.hk/yr78-79/english/lc_sitg/hansard/h790509.pdf#page=39 + +# From Paul Eggert (2019-05-31): # Here are the dates given at # https://www.hko.gov.hk/gts/time/Summertime.htm # as of 2014-06-19: @@ -667,7 +697,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # 1944 Whole year # 1945 Whole year # 1946 20 Apr to 1 Dec -# 1947 13 Apr to 30 Dec +# 1947 13 Apr to 30 Nov # 1948 2 May to 31 Oct # 1949 3 Apr to 30 Oct # 1950 2 Apr to 29 Oct @@ -704,36 +734,28 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # The page does not give times of day for transitions, # or dates for the 1942 and 1945 transitions. # The Japanese occupation of Hong Kong began 1941-12-25. -# The Japanese surrender of Hong Kong was signed 1945-09-16; see: -# Heaver S. The days after the Pacific war ended: unsettling times -# in Hong Kong. Post Magazine. 2016-06-13. -# https://www.scmp.com/magazines/post-magazine/article/1852990/days-after-pacific-war-ended-unsettling-times-hong-kong -# For lack of anything better, use start of those days as the -# transition times. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule HK 1946 only - Apr 20 3:30 1:00 S -Rule HK 1946 only - Dec 1 3:30 0 - -Rule HK 1947 only - Apr 13 3:30 1:00 S -Rule HK 1947 only - Dec 30 3:30 0 - -Rule HK 1948 only - May 2 3:30 1:00 S -Rule HK 1948 1951 - Oct lastSun 3:30 0 - -Rule HK 1952 1953 - Nov Sun>=1 3:30 0 - +Rule HK 1946 only - Apr 21 0:00 1:00 S +Rule HK 1946 only - Dec 1 3:30s 0 - +Rule HK 1947 only - Apr 13 3:30s 1:00 S +Rule HK 1947 only - Nov 30 3:30s 0 - +Rule HK 1948 only - May 2 3:30s 1:00 S +Rule HK 1948 1952 - Oct Sun>=28 3:30s 0 - Rule HK 1949 1953 - Apr Sun>=1 3:30 1:00 S +Rule HK 1953 1964 - Oct Sun>=31 3:30 0 - Rule HK 1954 1964 - Mar Sun>=18 3:30 1:00 S -Rule HK 1954 only - Oct 31 3:30 0 - -Rule HK 1955 1964 - Nov Sun>=1 3:30 0 - Rule HK 1965 1976 - Apr Sun>=16 3:30 1:00 S Rule HK 1965 1976 - Oct Sun>=16 3:30 0 - Rule HK 1973 only - Dec 30 3:30 1:00 S -Rule HK 1979 only - May Sun>=8 3:30 1:00 S -Rule HK 1979 only - Oct Sun>=16 3:30 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Rule HK 1979 only - May 13 3:30 1:00 S +Rule HK 1979 only - Oct 21 3:30 0 - +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42 - 8:00 - HKT 1941 Jun 15 3:30 + 8:00 - HKT 1941 Jun 15 3:00 8:00 1:00 HKST 1941 Oct 1 4:00 8:30 - HKT 1941 Dec 25 - 9:00 - JST 1945 Sep 16 + 9:00 - JST 1945 Nov 18 2:00 8:00 HK HK%sT ############################################################################### @@ -857,7 +879,7 @@ Rule Taiwan 1974 1975 - Oct 1 0:00 0 S Rule Taiwan 1979 only - Jul 1 0:00 1:00 D Rule Taiwan 1979 only - Oct 1 0:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Taipei or Taibei or T'ai-pei Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 8:00 - CST 1937 Oct 1 @@ -995,7 +1017,7 @@ Rule Macau 1975 1976 - Apr Sun>=16 03:30 1:00 D Rule Macau 1979 only - May 13 03:30 1:00 D Rule Macau 1979 only - Oct Sun>=16 03:30 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Macau 7:34:10 - LMT 1904 Oct 30 8:00 - CST 1941 Dec 21 23:00 9:00 Macau +09/+10 1945 Sep 30 24:00 @@ -1034,7 +1056,7 @@ Rule Cyprus 1977 only - Sep 25 0:00 0 - Rule Cyprus 1978 only - Oct 2 0:00 0 - Rule Cyprus 1979 1997 - Sep lastSun 0:00 0 - Rule Cyprus 1981 1998 - Mar lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14 2:00 Cyprus EE%sT 1998 Sep 2:00 EUAsia EE%sT @@ -1083,7 +1105,7 @@ Link Asia/Nicosia Europe/Nicosia # Byalokoz 1919 says Georgia was 2:59:11. # Go with Byalokoz. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tbilisi 2:59:11 - LMT 1880 2:59:11 - TBMT 1924 May 2 # Tbilisi Mean Time 3:00 - +03 1957 Mar @@ -1120,7 +1142,7 @@ Zone Asia/Tbilisi 2:59:11 - LMT 1880 # which will be permanent, with no seasonal adjustment, will happen at # midnight on Saturday, September 16. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 8:00 - +08 1942 Feb 21 23:00 9:00 - +09 1976 May 3 @@ -1186,7 +1208,7 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 # time for 1870-1941. Shanks is our only (and dubious) source for the # 1941-1945 data. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata 5:53:20 - HMT 1870 # Howrah Mean Time? 5:21:10 - MMT 1906 Jan 1 # Madras local time @@ -1238,7 +1260,7 @@ Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata # WITA - +08 - Waktu Indonesia Tengah (Indonesia central time) # WIT - +09 - Waktu Indonesia Timur (Indonesia eastern time) # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Java, Sumatra Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, @@ -1314,9 +1336,9 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # I used the following code in GNU Emacs 26.1 to generate the "Rule Iran" # lines from 2008 through 2087. Emacs 26.1 uses Ed Reingold's # cal-persia implementation of Birashk's approximation, which in the -# 2008-2087 range disagrees with the the astronomical Persian calendar -# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), -# so the following code special-case those years. See Table 15.1, page 264, of: +# 2008-2087 range disagrees with the astronomical Persian calendar +# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), so +# the following code special-cases those years. See Table 15.1, page 264, of: # Edward M. Reingold and Nachum Dershowitz, Calendrical Calculations: # The Ultimate Edition, Cambridge University Press (2018). # https://www.cambridge.org/fr/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition @@ -1510,7 +1532,7 @@ Rule Iran 2087 only - Sep 21 24:00 0 - Rule Iran 2088 max - Mar 20 24:00 1:00 - Rule Iran 2088 max - Sep 20 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time 3:30 - +0330 1977 Nov @@ -1555,7 +1577,7 @@ Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 - # Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 - Rule Iraq 1991 2007 - Oct 1 3:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? 3:00 - +03 1982 May @@ -1622,7 +1644,7 @@ Rule Zion 1975 only - Apr 20 0:00 1:00 D Rule Zion 1975 only - Aug 31 0:00 0 S # From Alois Treindl (2019-03-06): -# http://www.moin.gov.il/Documents/שעון קיץ/clock-50-years-7-2014.pdf +# http://www.moin.gov.il/Documents/שעון%20קיץ/clock-50-years-7-2014.pdf # From Isaac Starkman (2019-03-06): # Summer time was in that period in 1980 and 1984, see # https://www.ynet.co.il/articles/0,7340,L-3951073,00.html @@ -1760,32 +1782,15 @@ Rule Zion 2004 only - Sep 22 1:00 0 S # # ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps -# From Paul Eggert (2012-10-26): -# I used Ephraim Silverberg's dst-israel.el program -# (2005-02-20) -# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4, -# to generate the transitions from 2005 through 2012. -# (I replaced "lastFri" with "Fri>=26" by hand.) -# The spring transitions all correspond to the following Rule: -# -# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D -# -# but older zic implementations (e.g., Solaris 8) do not support -# "Fri>=26" to mean April 1 in years like 2005, so for now we list the -# springtime transitions explicitly. - # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Zion 2005 only - Apr 1 2:00 1:00 D +Rule Zion 2005 2012 - Apr Fri<=1 2:00 1:00 D Rule Zion 2005 only - Oct 9 2:00 0 S -Rule Zion 2006 2010 - Mar Fri>=26 2:00 1:00 D Rule Zion 2006 only - Oct 1 2:00 0 S Rule Zion 2007 only - Sep 16 2:00 0 S Rule Zion 2008 only - Oct 5 2:00 0 S Rule Zion 2009 only - Sep 27 2:00 0 S Rule Zion 2010 only - Sep 12 2:00 0 S -Rule Zion 2011 only - Apr 1 2:00 1:00 D Rule Zion 2011 only - Oct 2 2:00 0 S -Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D Rule Zion 2012 only - Sep 23 2:00 0 S # From Ephraim Silverberg (2013-06-27): @@ -1801,7 +1806,7 @@ Rule Zion 2012 only - Sep 23 2:00 0 S Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D Rule Zion 2013 max - Oct lastSun 2:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Jerusalem 2:20:54 - LMT 1880 2:20:40 - JMT 1918 # Jerusalem Mean Time? 2:00 Zion I%sT @@ -1893,7 +1898,7 @@ Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D # Central Time (UT+9). The adoption began on Oct 1, 1937. # https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u 9:00 Japan J%sT # Since 1938, all Japanese possessions have been like Asia/Tokyo, @@ -1996,7 +2001,7 @@ Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - Rule Jordan 2013 only - Dec 20 0:00 0 - Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S Rule Jordan 2014 max - Oct lastFri 0:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 2:00 Jordan EE%sT @@ -2037,8 +2042,8 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # text. # # According to Izvestia newspaper No. 68 (23334) from 1991-03-20 -# (page 6; available at http://libinfo.org/newsr/newsr2574.djvu via -# http://libinfo.org/index.php?id=58564) on 1991-03-31 at 2:00 during +# -- page 6; available at http://libinfo.org/newsr/newsr2574.djvu via +# http://libinfo.org/index.php?id=58564 -- on 1991-03-31 at 2:00 during # transition to "summer" time: # Republic of Georgia, Latvian SSR, Lithuanian SSR, SSR Moldova, # Estonian SSR; Komi ASSR; Kaliningrad oblast; Nenets autonomous okrug @@ -2054,7 +2059,7 @@ Zone Asia/Amman 2:23:44 - LMT 1931 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 2 02:15:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE71315E6168; Tue, 2 Jul 2019 02:15:21 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5B086BED0; Mon, 1 Jul 2019 22:06:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 909221B204; Mon, 1 Jul 2019 22:06:36 +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 x61M6aYK038926; Mon, 1 Jul 2019 22:06:36 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61M6aLG038925; Mon, 1 Jul 2019 22:06:36 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201907012206.x61M6aLG038925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 1 Jul 2019 22:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349587 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 349587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B5B086BED0 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 02:15:22 -0000 Author: rlibby Date: Mon Jul 1 22:06:36 2019 New Revision: 349587 URL: https://svnweb.freebsd.org/changeset/base/349587 Log: g_mirror_taste: avoid deadlock, always clear tasting flag If g_mirror_taste encountered an error at g_mirror_add_disk, it might try to g_mirror_destroy the device with the G_MIRROR_DEVICE_FLAG_TASTING flag still set. This would wait on a worker to complete the destruction with g_mirror_try_destroy, but that function bails out if the tasting flag is set, resulting in a deadlock. Clear the tasting flag before trying to destroy the device. Test Plan: sysctl debug.fail_point.mnowait="1%return" kyua test -k /usr/tests/sys/geom/class/mirror/Kyuafile Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20744 Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Mon Jul 1 22:06:16 2019 (r349586) +++ head/sys/geom/mirror/g_mirror.c Mon Jul 1 22:06:36 2019 (r349587) @@ -3291,6 +3291,7 @@ g_mirror_taste(struct g_class *mp, struct g_provider * sx_xlock(&sc->sc_lock); sc->sc_flags |= G_MIRROR_DEVICE_FLAG_TASTING; error = g_mirror_add_disk(sc, pp, &md); + sc->sc_flags &= ~G_MIRROR_DEVICE_FLAG_TASTING; if (error != 0) { G_MIRROR_DEBUG(0, "Cannot add disk %s to %s (error=%d).", pp->name, gp->name, error); @@ -3302,7 +3303,6 @@ g_mirror_taste(struct g_class *mp, struct g_provider * } gp = NULL; } - sc->sc_flags &= ~G_MIRROR_DEVICE_FLAG_TASTING; if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { g_mirror_destroy(sc, G_MIRROR_DESTROY_HARD); g_topology_lock(); From owner-svn-src-all@freebsd.org Tue Jul 2 02:15:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BFF015E618E; Tue, 2 Jul 2019 02:15:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5426A6CB7A; Mon, 1 Jul 2019 22:11:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F60F1B276; Mon, 1 Jul 2019 22:11:57 +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 x61MBv4a043358; Mon, 1 Jul 2019 22:11:57 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61MBvHM043347; Mon, 1 Jul 2019 22:11:57 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201907012211.x61MBvHM043347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 1 Jul 2019 22:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349588 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 349588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5426A6CB7A X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 02:15:22 -0000 Author: manu Date: Mon Jul 1 22:11:56 2019 New Revision: 349588 URL: https://svnweb.freebsd.org/changeset/base/349588 Log: arm64: efi: Map memory IO region as device Reviewed by: andrew Sponsored by: Ampere Computing, LLC Modified: head/sys/arm64/arm64/efirt_machdep.c Modified: head/sys/arm64/arm64/efirt_machdep.c ============================================================================== --- head/sys/arm64/arm64/efirt_machdep.c Mon Jul 1 22:06:36 2019 (r349587) +++ head/sys/arm64/arm64/efirt_machdep.c Mon Jul 1 22:11:56 2019 (r349588) @@ -208,20 +208,14 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int mode = VM_MEMATTR_WRITE_THROUGH; else if ((p->md_attr & EFI_MD_ATTR_WC) != 0) mode = VM_MEMATTR_WRITE_COMBINING; - else if ((p->md_attr & EFI_MD_ATTR_UC) != 0) + else mode = VM_MEMATTR_DEVICE; - else { - if (bootverbose) - printf("EFI Runtime entry %d mapping " - "attributes unsupported\n", i); - mode = VM_MEMATTR_UNCACHEABLE; - } printf("MAP %lx mode %x pages %lu\n", p->md_phys, mode, p->md_pages); l3_attr = ATTR_DEFAULT | ATTR_IDX(mode) | ATTR_AP(ATTR_AP_RW) | L3_PAGE; - if (mode == VM_MEMATTR_DEVICE) + if (mode == VM_MEMATTR_DEVICE || p->md_attr & EFI_MD_ATTR_XP) l3_attr |= ATTR_UXN | ATTR_PXN; VM_OBJECT_WLOCK(obj_1t1_pt); From owner-svn-src-all@freebsd.org Tue Jul 2 02:15:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 565BA15E61BD; Tue, 2 Jul 2019 02:15:22 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF1CC6BDFB; Mon, 1 Jul 2019 22:06:16 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2DAB1B202; Mon, 1 Jul 2019 22:06:16 +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 x61M6GCh038872; Mon, 1 Jul 2019 22:06:16 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61M6GT4038871; Mon, 1 Jul 2019 22:06:16 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201907012206.x61M6GT4038871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 1 Jul 2019 22:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349586 - head/sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/geom/eli X-SVN-Commit-Revision: 349586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DF1CC6BDFB X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 02:15:23 -0000 Author: rlibby Date: Mon Jul 1 22:06:16 2019 New Revision: 349586 URL: https://svnweb.freebsd.org/changeset/base/349586 Log: g_eli_create: only dec g_access acw if we inc'd it Reviewed by: cem, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20743 Modified: head/sys/geom/eli/g_eli.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Mon Jul 1 22:00:42 2019 (r349585) +++ head/sys/geom/eli/g_eli.c Mon Jul 1 22:06:16 2019 (r349586) @@ -827,7 +827,7 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp; struct g_consumer *cp; u_int i, threads; - int error; + int dcw, error; G_ELI_DEBUG(1, "Creating device %s%s.", bpp->name, G_ELI_SUFFIX); @@ -881,10 +881,8 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, * We don't open provider for writing only when user requested read-only * access. */ - if (sc->sc_flags & G_ELI_FLAG_RO) - error = g_access(cp, 1, 0, 1); - else - error = g_access(cp, 1, 1, 1); + dcw = (sc->sc_flags & G_ELI_FLAG_RO) ? 0 : 1; + error = g_access(cp, 1, dcw, 1); if (error != 0) { if (req != NULL) { gctl_error(req, "Cannot access %s (error=%d).", @@ -996,7 +994,7 @@ failed: mtx_destroy(&sc->sc_queue_mtx); if (cp->provider != NULL) { if (cp->acr == 1) - g_access(cp, -1, -1, -1); + g_access(cp, -1, -dcw, -1); g_detach(cp); } g_destroy_consumer(cp); From owner-svn-src-all@freebsd.org Tue Jul 2 02:15:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 309F615E619F; Tue, 2 Jul 2019 02:15:22 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D9F786EDB; Tue, 2 Jul 2019 01:06:40 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E17961D013; Tue, 2 Jul 2019 01:06:39 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6216dv2028158; Tue, 2 Jul 2019 01:06:39 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6216dse028157; Tue, 2 Jul 2019 01:06:39 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201907020106.x6216dse028157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 2 Jul 2019 01:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349591 - vendor/tzdata/tzdata2019b X-SVN-Group: vendor X-SVN-Commit-Author: philip X-SVN-Commit-Paths: vendor/tzdata/tzdata2019b X-SVN-Commit-Revision: 349591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2D9F786EDB X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 02:15:22 -0000 Author: philip Date: Tue Jul 2 01:06:39 2019 New Revision: 349591 URL: https://svnweb.freebsd.org/changeset/base/349591 Log: Tag import of tzdata2019b Added: vendor/tzdata/tzdata2019b/ - copied from r349590, vendor/tzdata/dist/ From owner-svn-src-all@freebsd.org Tue Jul 2 02:15:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C9B715E61BE; Tue, 2 Jul 2019 02:15:22 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 627DB682C0; Mon, 1 Jul 2019 23:22:28 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 22C441BF3A; Mon, 1 Jul 2019 23:22:28 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x61NMSD3078272; Mon, 1 Jul 2019 23:22:28 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x61NMRGS078268; Mon, 1 Jul 2019 23:22:27 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201907012322.x61NMRGS078268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 1 Jul 2019 23:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349589 - in head: sbin/mount sys/sys sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head: sbin/mount sys/sys sys/ufs/ffs X-SVN-Commit-Revision: 349589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 627DB682C0 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 02:15:23 -0000 Author: mckusick Date: Mon Jul 1 23:22:26 2019 New Revision: 349589 URL: https://svnweb.freebsd.org/changeset/base/349589 Log: Add a new "untrusted" option to the mount command. Its purpose is to notify the kernel that the file system is untrusted and it should use more extensive checks on the file-system's metadata before using it. This option is intended to be used when mounting file systems from untrusted media such as USB memory sticks or other externally-provided media. It will initially be used by the UFS/FFS file system, but should likely be expanded to be used by other file systems that may appear on external media like msdosfs, exfat, and ext2fs. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20786 Modified: head/sbin/mount/mntopts.h head/sbin/mount/mount.8 head/sbin/mount/mount.c head/sys/sys/mount.h head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sbin/mount/mntopts.h ============================================================================== --- head/sbin/mount/mntopts.h Mon Jul 1 22:11:56 2019 (r349588) +++ head/sbin/mount/mntopts.h Mon Jul 1 23:22:26 2019 (r349589) @@ -58,6 +58,7 @@ struct mntopt { #define MOPT_ACLS { "acls", 0, MNT_ACLS, 0 } #define MOPT_NFS4ACLS { "nfsv4acls", 0, MNT_NFS4ACLS, 0 } #define MOPT_AUTOMOUNTED { "automounted",0, MNT_AUTOMOUNTED, 0 } +#define MOPT_UNTRUSTED { "untrusted", 0, MNT_UNTRUSTED, 0 } /* Control flags. */ #define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } @@ -93,7 +94,8 @@ struct mntopt { MOPT_MULTILABEL, \ MOPT_ACLS, \ MOPT_NFS4ACLS, \ - MOPT_AUTOMOUNTED + MOPT_AUTOMOUNTED, \ + MOPT_UNTRUSTED void getmntopts(const char *, const struct mntopt *, int *, int *); void rmslashes(char *, char *); Modified: head/sbin/mount/mount.8 ============================================================================== --- head/sbin/mount/mount.8 Mon Jul 1 22:11:56 2019 (r349588) +++ head/sbin/mount/mount.8 Mon Jul 1 23:22:26 2019 (r349589) @@ -355,6 +355,12 @@ Lookups will be done in the mounted file system first. If those operations fail due to a non-existent file the underlying directory is then accessed. All creates are done in the mounted file system. +.It Cm untrusted +The file system is untrusted and the kernel should use more +extensive checks on the file-system's metadata before using it. +This option is intended to be used when mounting file systems +from untrusted media such as USB memory sticks or other +externally-provided media. .El .Pp Any additional options specific to a file system type that is not Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Mon Jul 1 22:11:56 2019 (r349588) +++ head/sbin/mount/mount.c Mon Jul 1 23:22:26 2019 (r349589) @@ -118,6 +118,7 @@ static struct opt { { MNT_GJOURNAL, "gjournal" }, { MNT_AUTOMOUNTED, "automounted" }, { MNT_VERIFIED, "verified" }, + { MNT_UNTRUSTED, "untrusted" }, { 0, NULL } }; @@ -972,6 +973,7 @@ flags2opts(int flags) if (flags & MNT_MULTILABEL) res = catopt(res, "multilabel"); if (flags & MNT_ACLS) res = catopt(res, "acls"); if (flags & MNT_NFS4ACLS) res = catopt(res, "nfsv4acls"); + if (flags & MNT_UNTRUSTED) res = catopt(res, "untrusted"); return (res); } Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Mon Jul 1 22:11:56 2019 (r349588) +++ head/sys/sys/mount.h Mon Jul 1 23:22:26 2019 (r349589) @@ -296,6 +296,7 @@ void __mnt_vnode_markerfree_active(struct vno #define MNT_NOCLUSTERW 0x0000000080000000ULL /* disable cluster write */ #define MNT_SUJ 0x0000000100000000ULL /* using journaled soft updates */ #define MNT_AUTOMOUNTED 0x0000000200000000ULL /* mounted by automountd(8) */ +#define MNT_UNTRUSTED 0x0000000800000000ULL /* filesys metadata untrusted */ /* * NFS export related mount flags. @@ -333,7 +334,8 @@ void __mnt_vnode_markerfree_active(struct vno MNT_NOCLUSTERW | MNT_SUIDDIR | MNT_SOFTDEP | \ MNT_IGNORE | MNT_EXPUBLIC | MNT_NOSYMFOLLOW | \ MNT_GJOURNAL | MNT_MULTILABEL | MNT_ACLS | \ - MNT_NFS4ACLS | MNT_AUTOMOUNTED | MNT_VERIFIED) + MNT_NFS4ACLS | MNT_AUTOMOUNTED | MNT_VERIFIED | \ + MNT_UNTRUSTED) /* Mask of flags that can be updated. */ #define MNT_UPDATEMASK (MNT_NOSUID | MNT_NOEXEC | \ @@ -342,7 +344,7 @@ void __mnt_vnode_markerfree_active(struct vno MNT_NOSYMFOLLOW | MNT_IGNORE | \ MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR | \ MNT_ACLS | MNT_USER | MNT_NFS4ACLS | \ - MNT_AUTOMOUNTED) + MNT_AUTOMOUNTED | MNT_UNTRUSTED) /* * External filesystem command modifier flags. Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Mon Jul 1 22:11:56 2019 (r349588) +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Jul 1 23:22:26 2019 (r349589) @@ -145,7 +145,7 @@ static struct buf_ops ffs_ops = { static const char *ffs_opts[] = { "acls", "async", "noatime", "noclusterr", "noclusterw", "noexec", "export", "force", "from", "groupquota", "multilabel", "nfsv4acls", "fsckpid", "snapshot", "nosuid", "suiddir", - "nosymfollow", "sync", "union", "userquota", NULL }; + "nosymfollow", "sync", "union", "userquota", "untrusted", NULL }; static int ffs_mount(struct mount *mp) @@ -184,6 +184,9 @@ ffs_mount(struct mount *mp) return (error); mntorflags = 0; + if (vfs_getopt(mp->mnt_optnew, "untrusted", NULL, NULL) == 0) + mntorflags |= MNT_UNTRUSTED; + if (vfs_getopt(mp->mnt_optnew, "acls", NULL, NULL) == 0) mntorflags |= MNT_ACLS; From owner-svn-src-all@freebsd.org Tue Jul 2 02:15:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 687FC15E61CD; Tue, 2 Jul 2019 02:15:22 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EB318D953; Tue, 2 Jul 2019 01:12:24 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48D8C1D1A9; Tue, 2 Jul 2019 01:12:24 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x621COkI032825; Tue, 2 Jul 2019 01:12:24 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x621CNAL032820; Tue, 2 Jul 2019 01:12:23 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201907020112.x621CNAL032820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 2 Jul 2019 01:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349592 - head/contrib/tzdata X-SVN-Group: head X-SVN-Commit-Author: philip X-SVN-Commit-Paths: head/contrib/tzdata X-SVN-Commit-Revision: 349592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6EB318D953 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 02:15:23 -0000 Author: philip Date: Tue Jul 2 01:12:23 2019 New Revision: 349592 URL: https://svnweb.freebsd.org/changeset/base/349592 Log: Import tzdata 2019b Changes: https://github.com/eggert/tz/blob/2019b/NEWS MFC after: 1 day Modified: head/contrib/tzdata/Makefile head/contrib/tzdata/NEWS head/contrib/tzdata/africa head/contrib/tzdata/antarctica head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/backzone head/contrib/tzdata/checktab.awk head/contrib/tzdata/europe head/contrib/tzdata/factory head/contrib/tzdata/northamerica head/contrib/tzdata/pacificnew head/contrib/tzdata/southamerica head/contrib/tzdata/systemv head/contrib/tzdata/theory.html head/contrib/tzdata/version head/contrib/tzdata/zishrink.awk head/contrib/tzdata/zone.tab head/contrib/tzdata/zone1970.tab head/contrib/tzdata/zoneinfo2tdf.pl Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/Makefile ============================================================================== --- head/contrib/tzdata/Makefile Tue Jul 2 01:06:39 2019 (r349591) +++ head/contrib/tzdata/Makefile Tue Jul 2 01:12:23 2019 (r349592) @@ -35,11 +35,13 @@ DATAFORM= main LOCALTIME= GMT -# If you want something other than Eastern United States time as a template -# for handling ruleless POSIX-style timezone environment variables, +# The POSIXRULES macro controls interpretation of nonstandard and obsolete +# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules. +# In the reference implementation, if you want something other than Eastern +# United States time as a template for handling these settings, you can # change the line below (after finding the timezone you want in the # one of the $(TDATA) source files, or adding it to a source file). -# A ruleless environment setting like TZ='CST6CDT' uses the rules in the +# A setting like TZ='EET-2EEST' is supposed to use the rules in the # template file to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. @@ -49,6 +51,17 @@ LOCALTIME= GMT # Use the command # make zonenames # to get a list of the values you can use for POSIXRULES. +# +# If POSIXRULES is empty, no template is installed; this is the intended +# future default for POSIXRULES. +# +# Nonempty POSIXRULES is obsolete and should not be relied on, because: +# * It does not work correctly in popular implementations such as GNU/Linux. +# * It does not work in the tzdb implementation for timestamps after 2037. +# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions +# at standard time or UT rather than at local time. +# In short, software should avoid ruleless settings like TZ='EET-2EEST' +# and so should not depend on the value of POSIXRULES. POSIXRULES= America/New_York @@ -231,6 +244,13 @@ LDLIBS= # other than simply getting garbage data # -DUSE_LTZ=0 to build zdump with the system time zone library # Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below. +# -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and +# similarly for "fat". Fat TZif files work around incompatibilities +# and bugs in some TZif readers, notably readers that mishandle 64-bit +# data in TZif files. Slim TZif files are more efficient and do not +# work around these incompatibilities and bugs. If not given, the +# current default is "fat" but this is intended to change as readers +# requiring fat files often mishandle timestamps after 2037 anyway. # -DZIC_MAX_ABBR_LEN_WO_WARN=3 # (or some other number) to set the maximum time zone abbreviation length # that zic will accept without a warning (the default is 6) @@ -364,7 +384,9 @@ ZIC= $(zic) $(ZFLAGS) # To shrink the size of installed TZif files, # append "-r @N" to omit data before N-seconds-after-the-Epoch. -# See the zic man page for more about -r. +# You can also append "-b slim" if that is not already the default; +# see ZIC_BLOAT_DEFAULT above. +# See the zic man page for more about -b and -r. ZFLAGS= # How to use zic to install TZif files. @@ -388,6 +410,9 @@ KSHELL= /bin/bash # Name of curl , used for HTML validation. CURL= curl +# Name of GNU Privacy Guard , used to sign distributions. +GPG= gpg + # The path where SGML DTDs are kept and the catalog file(s) to use when # validating HTML 4.01. The default should work on both Debian and Red Hat. SGML_TOPDIR= /usr @@ -562,7 +587,9 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(LIBDIR)' \ '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' - $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \ + $(ZIC_INSTALL) -l $(LOCALTIME) \ + `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ + ` $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -781,12 +808,6 @@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c - $(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \ - LC_ALL=C sort -c - $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ - LC_ALL=C sort -cu touch $@ check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi @@ -1051,7 +1072,7 @@ tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz $(ALL_ASC): - gpg2 --armor --detach-sign $? + $(GPG) --armor --detach-sign $? TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T typecheck: typecheck_long_long typecheck_unsigned Modified: head/contrib/tzdata/NEWS ============================================================================== --- head/contrib/tzdata/NEWS Tue Jul 2 01:06:39 2019 (r349591) +++ head/contrib/tzdata/NEWS Tue Jul 2 01:12:23 2019 (r349592) @@ -1,8 +1,102 @@ News for the tz database -Release 20198 - 2019-03-25 22:01:33 -0700 +Release 2019b - 2019-07-01 00:09:53 -0700 Briefly: + Brazil no longer observes DST. + 'zic -b slim' outputs smaller TZif files; please try it out. + Palestine's 2019 spring-forward transition was on 03-29, not 03-30. + + Changes to future timestamps + + Brazil has canceled DST and will stay on standard time indefinitely. + (Thanks to Steffen Thorsen, Marcus Diniz, and Daniel Soares de + Oliveira.) + + Predictions for Morocco now go through 2087 instead of 2037, to + work around a problem on newlib when using TZif files output by + zic 2019a or earlier. (Problem reported by David Gauchard.) + + Changes to past and future timestamps + + Palestine's 2019 spring transition was 03-29 at 00:00, not 03-30 + at 01:00. (Thanks to Sharef Mustafa and Even Scharning.) Guess + future transitions to be March's last Friday at 00:00. + + Changes to past timestamps + + Hong Kong's 1941-06-15 spring-forward transition was at 03:00, not + 03:30. Its 1945 transition from JST to HKT was on 11-18 at 02:00, + not 09-15 at 00:00. In 1946 its spring-forward transition was on + 04-21 at 00:00, not the previous day at 03:30. From 1946 through + 1952 its fall-back transitions occurred at 04:30, not at 03:30. + In 1947 its fall-back transition was on 11-30, not 12-30. + (Thanks to P Chan.) + + Changes to past time zone abbreviations + + Italy's 1866 transition to Rome Mean Time was on December 12, not + September 22. This affects only the time zone abbreviation for + Europe/Rome between those dates. (Thanks to Stephen Trainor and + Luigi Rosa.) + + Changes affecting metadata only + + Add info about the Crimea situation in zone1970.tab and zone.tab. + (Problem reported by Serhii Demediuk.) + + Changes to code + + zic's new -b option supports a way to control data bloat and to + test for year-2038 bugs in software that reads TZif files. + 'zic -b fat' and 'zic -b slim' generate larger and smaller output; + for example, changing from fat to slim shrinks the Europe/London + file from 3648 to 1599 bytes, saving about 56%. Fat and slim + files represent the same set of timestamps and use the same TZif + format as documented in tzfile(5) and in Internet RFC 8536. + Fat format attempts to work around bugs or incompatibilities in + older software, notably software that mishandles 64-bit TZif data + or uses obsolete TZ strings like "EET-2EEST" that lack DST rules. + Slim format is more efficient and does not work around 64-bit bugs + or obsolete TZ strings. Currently zic defaults to fat format + unless you compile with -DZIC_BLOAT_DEFAULT=\"slim\"; this + out-of-the-box default is intended to change in future releases + as the buggy software often mishandles timestamps anyway. + + zic no longer treats a set of rules ending in 2037 specially. + Previously, zic assumed that such a ruleset meant that future + timestamps could not be predicted, and therefore omitted a + POSIX-like TZ string in the TZif output. The old behavior is no + longer needed for current tzdata, and caused problems with newlib + when used with older tzdata (reported by David Gauchard). + + zic no longer generates some artifact transitions. For example, + Europe/London no longer has a no-op transition in January 1996. + + Changes to build procedure + + tzdata.zi now assumes zic 2017c or later. This shrinks tzdata.zi + by a percent or so. + + Changes to documentation and commentary + + The Makefile now documents the POSIXRULES macro as being obsolete, + and similarly, zic's -p POSIXRULES option is now documented as + being obsolete. Although the POSIXRULES feature still exists and + works as before, in practice it is rarely used for its intended + purpose, and it does not work either in the default reference + implementation (for timestamps after 2037) or in common + implementations such as GNU/Linux (for contemporary timestamps). + Since POSIXRULES was designed primarily as a temporary transition + facility for System V platforms that died off decades ago, it is + being decommissioned rather than institutionalized. + + New info on Bonin Islands and Marcus (thanks to Wakaba and Phake Nick). + + +Release 2019a - 2019-03-25 22:01:33 -0700 + + Briefly: Palestine "springs forward" on 2019-03-30 instead of 2019-03-23. Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00. @@ -481,7 +575,7 @@ Release 2018d - 2018-03-22 07:05:46 -0700 The code is a bit more portable to MS-Windows. Installers can compile with -DRESERVE_STD_EXT_IDS on MS-Windows platforms that reserve identifiers like 'localtime'. (Thanks to Manuela - Friedrich). + Friedrich.) Changes to documentation and commentary @@ -2276,7 +2370,7 @@ Release 2014f - 2014-08-05 17:42:36 -0700 warlord Jin Shuren in the data. Commentary about the coverage of each Russian zone has been standardized. - (Thanks to Tim Parenti). + (Thanks to Tim Parenti.) There is new commentary about contemporary timekeeping in Ethiopia. @@ -2724,7 +2818,7 @@ Release 2013e - 2013-09-19 23:50:04 -0700 Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46. This affects Europe/Zurich timestamps from 1853 to 1894. (Thanks - to Alois Treindl). + to Alois Treindl.) Change the date of the circa-1850 Zurich transition from 1849-09-12 to 1853-07-16, overriding Shanks with data from Messerli about @@ -3034,7 +3128,7 @@ Release 2013a - 2013-02-27 09:20:35 -0800 (Thanks to Arthur David Olson.) Improve the commentary about which districts observe what times - in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson). + in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson.) Add web page links to tz.js. Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Tue Jul 2 01:06:39 2019 (r349591) +++ head/contrib/tzdata/africa Tue Jul 2 01:12:23 2019 (r349592) @@ -89,7 +89,7 @@ Rule Algeria 1980 only - Apr 25 0:00 1:00 S Rule Algeria 1980 only - Oct 31 2:00 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 0:00 Algeria WE%sT 1940 Feb 25 2:00 @@ -124,7 +124,7 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 # For now, ignore that and follow the 1911-05-26 Portuguese decree # (see Europe/Lisbon). # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia -2:00 - -02 1942 Sep -2:00 1:00 -01 1945 Oct 15 @@ -135,7 +135,7 @@ Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2 # See Africa/Lagos. # Chad -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena 1:00 - WAT 1979 Oct 14 1:00 1:00 WAST 1980 Mar 8 @@ -151,7 +151,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Dja # See Africa/Lagos. # Côte d'Ivoire / Ivory Coast -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Abidjan -0:16:08 - LMT 1912 0:00 - GMT Link Africa/Abidjan Africa/Bamako # Mali @@ -356,7 +356,7 @@ Rule Egypt 2014 only - Jun 26 24:00 0 - Rule Egypt 2014 only - Jul 31 24:00 1:00 S Rule Egypt 2014 only - Sep lastThu 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct 2:00 Egypt EE%sT @@ -414,7 +414,7 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Ghana 1920 1942 - Sep 1 0:00 0:20 - Rule Ghana 1920 1942 - Dec 31 0:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 0:00 Ghana GMT/+0020 @@ -428,13 +428,13 @@ Zone Africa/Accra -0:00:52 - LMT 1918 # evidently confusing the date of the Portuguese decree # (see Europe/Lisbon) with the date that it took effect. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u -1:00 - -01 1975 0:00 - GMT # Kenya -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 2:30 - +0230 1940 @@ -469,7 +469,7 @@ Link Africa/Nairobi Indian/Mayotte # Use the abbreviation "MMT" before 1972, as the more-accurate numeric # abbreviation "-004430" would be one byte over the POSIX limit. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time -0:44:30 - MMT 1972 Jan 7 # approximately MMT @@ -519,7 +519,7 @@ Rule Libya 1997 only - Apr 4 0:00 1:00 S Rule Libya 1997 only - Oct 4 0:00 0 - Rule Libya 2013 only - Mar lastFri 1:00 1:00 S Rule Libya 2013 only - Oct lastFri 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tripoli 0:52:44 - LMT 1920 1:00 Libya CE%sT 1959 2:00 - EET 1982 @@ -629,7 +629,7 @@ Rule Mauritius 1982 only - Oct 10 0:00 1:00 - Rule Mauritius 1983 only - Mar 21 0:00 0 - Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 - Rule Mauritius 2009 only - Mar lastSun 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez @@ -860,18 +860,24 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # the week end after.... The government does not announce yet the decision # about this temporary change. But it s 99% sure that it will be the case, # as in previous years. An unofficial survey was done these days, showing -# that 64% of asked peopke are ok for moving from +1 to +0 during Ramadan. +# that 64% of asked people are ok for moving from +1 to +0 during Ramadan. # https://leconomiste.com/article/1035870-enquete-l-economiste-sunergia-64-des-marocains-plebiscitent-le-gmt-pendant-ramadan + +# From Naoufal Semlali (2019-04-16): +# Morocco will be on GMT starting from Sunday, May 5th 2019 at 3am. +# The switch to GMT+1 will occur on Sunday, June 9th 2019 at 2am.... +# http://fr.le360.ma/societe/voici-la-date-du-retour-a-lheure-legale-au-maroc-188222 # -# From Paul Eggert (2018-11-01): -# For now, guess that Morocco will fall back at 03:00 the last Sunday -# before Ramadan, and spring forward at 02:00 the first Sunday after +# From Paul Eggert (2019-05-20): +# This agrees with our 2018-11-01 guess that the Moroccan government +# would continue the practice of falling back at 03:00 the last Sunday +# before Ramadan, and of springing forward at 02:00 the first Sunday after # Ramadan, as this has been the practice since 2012. To implement this, -# transition dates for 2019 through 2037 were determined by running the -# following program under GNU Emacs 26.1. +# transition dates for 2019 through 2087 were determined by running the +# following program under GNU Emacs 26.2. # (let ((islamic-year 1440)) # (require 'cal-islam) -# (while (< islamic-year 1460) +# (while (< islamic-year 1511) # (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) # (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) # (sunday 0)) @@ -970,8 +976,114 @@ Rule Morocco 2036 only - Oct 19 3:00 -1:00 - Rule Morocco 2036 only - Nov 23 2:00 0 - Rule Morocco 2037 only - Oct 4 3:00 -1:00 - Rule Morocco 2037 only - Nov 15 2:00 0 - +Rule Morocco 2038 only - Sep 26 3:00 -1:00 - +Rule Morocco 2038 only - Oct 31 2:00 0 - +Rule Morocco 2039 only - Sep 18 3:00 -1:00 - +Rule Morocco 2039 only - Oct 23 2:00 0 - +Rule Morocco 2040 only - Sep 2 3:00 -1:00 - +Rule Morocco 2040 only - Oct 14 2:00 0 - +Rule Morocco 2041 only - Aug 25 3:00 -1:00 - +Rule Morocco 2041 only - Sep 29 2:00 0 - +Rule Morocco 2042 only - Aug 10 3:00 -1:00 - +Rule Morocco 2042 only - Sep 21 2:00 0 - +Rule Morocco 2043 only - Aug 2 3:00 -1:00 - +Rule Morocco 2043 only - Sep 6 2:00 0 - +Rule Morocco 2044 only - Jul 24 3:00 -1:00 - +Rule Morocco 2044 only - Aug 28 2:00 0 - +Rule Morocco 2045 only - Jul 9 3:00 -1:00 - +Rule Morocco 2045 only - Aug 20 2:00 0 - +Rule Morocco 2046 only - Jul 1 3:00 -1:00 - +Rule Morocco 2046 only - Aug 5 2:00 0 - +Rule Morocco 2047 only - Jun 23 3:00 -1:00 - +Rule Morocco 2047 only - Jul 28 2:00 0 - +Rule Morocco 2048 only - Jun 7 3:00 -1:00 - +Rule Morocco 2048 only - Jul 19 2:00 0 - +Rule Morocco 2049 only - May 30 3:00 -1:00 - +Rule Morocco 2049 only - Jul 4 2:00 0 - +Rule Morocco 2050 only - May 15 3:00 -1:00 - +Rule Morocco 2050 only - Jun 26 2:00 0 - +Rule Morocco 2051 only - May 7 3:00 -1:00 - +Rule Morocco 2051 only - Jun 11 2:00 0 - +Rule Morocco 2052 only - Apr 28 3:00 -1:00 - +Rule Morocco 2052 only - Jun 2 2:00 0 - +Rule Morocco 2053 only - Apr 13 3:00 -1:00 - +Rule Morocco 2053 only - May 25 2:00 0 - +Rule Morocco 2054 only - Apr 5 3:00 -1:00 - +Rule Morocco 2054 only - May 10 2:00 0 - +Rule Morocco 2055 only - Mar 28 3:00 -1:00 - +Rule Morocco 2055 only - May 2 2:00 0 - +Rule Morocco 2056 only - Mar 12 3:00 -1:00 - +Rule Morocco 2056 only - Apr 23 2:00 0 - +Rule Morocco 2057 only - Mar 4 3:00 -1:00 - +Rule Morocco 2057 only - Apr 8 2:00 0 - +Rule Morocco 2058 only - Feb 17 3:00 -1:00 - +Rule Morocco 2058 only - Mar 31 2:00 0 - +Rule Morocco 2059 only - Feb 9 3:00 -1:00 - +Rule Morocco 2059 only - Mar 16 2:00 0 - +Rule Morocco 2060 only - Feb 1 3:00 -1:00 - +Rule Morocco 2060 only - Mar 7 2:00 0 - +Rule Morocco 2061 only - Jan 16 3:00 -1:00 - +Rule Morocco 2061 only - Feb 27 2:00 0 - +Rule Morocco 2062 only - Jan 8 3:00 -1:00 - +Rule Morocco 2062 only - Feb 12 2:00 0 - +Rule Morocco 2062 only - Dec 31 3:00 -1:00 - +Rule Morocco 2063 only - Feb 4 2:00 0 - +Rule Morocco 2063 only - Dec 16 3:00 -1:00 - +Rule Morocco 2064 only - Jan 20 2:00 0 - +Rule Morocco 2064 only - Dec 7 3:00 -1:00 - +Rule Morocco 2065 only - Jan 11 2:00 0 - +Rule Morocco 2065 only - Nov 22 3:00 -1:00 - +Rule Morocco 2066 only - Jan 3 2:00 0 - +Rule Morocco 2066 only - Nov 14 3:00 -1:00 - +Rule Morocco 2066 only - Dec 19 2:00 0 - +Rule Morocco 2067 only - Nov 6 3:00 -1:00 - +Rule Morocco 2067 only - Dec 11 2:00 0 - +Rule Morocco 2068 only - Oct 21 3:00 -1:00 - +Rule Morocco 2068 only - Dec 2 2:00 0 - +Rule Morocco 2069 only - Oct 13 3:00 -1:00 - +Rule Morocco 2069 only - Nov 17 2:00 0 - +Rule Morocco 2070 only - Oct 5 3:00 -1:00 - +Rule Morocco 2070 only - Nov 9 2:00 0 - +Rule Morocco 2071 only - Sep 20 3:00 -1:00 - +Rule Morocco 2071 only - Oct 25 2:00 0 - +Rule Morocco 2072 only - Sep 11 3:00 -1:00 - +Rule Morocco 2072 only - Oct 16 2:00 0 - +Rule Morocco 2073 only - Aug 27 3:00 -1:00 - +Rule Morocco 2073 only - Oct 8 2:00 0 - +Rule Morocco 2074 only - Aug 19 3:00 -1:00 - +Rule Morocco 2074 only - Sep 23 2:00 0 - +Rule Morocco 2075 only - Aug 11 3:00 -1:00 - +Rule Morocco 2075 only - Sep 15 2:00 0 - +Rule Morocco 2076 only - Jul 26 3:00 -1:00 - +Rule Morocco 2076 only - Sep 6 2:00 0 - +Rule Morocco 2077 only - Jul 18 3:00 -1:00 - +Rule Morocco 2077 only - Aug 22 2:00 0 - +Rule Morocco 2078 only - Jul 10 3:00 -1:00 - +Rule Morocco 2078 only - Aug 14 2:00 0 - +Rule Morocco 2079 only - Jun 25 3:00 -1:00 - +Rule Morocco 2079 only - Jul 30 2:00 0 - +Rule Morocco 2080 only - Jun 16 3:00 -1:00 - +Rule Morocco 2080 only - Jul 21 2:00 0 - +Rule Morocco 2081 only - Jun 1 3:00 -1:00 - +Rule Morocco 2081 only - Jul 13 2:00 0 - +Rule Morocco 2082 only - May 24 3:00 -1:00 - +Rule Morocco 2082 only - Jun 28 2:00 0 - +Rule Morocco 2083 only - May 16 3:00 -1:00 - +Rule Morocco 2083 only - Jun 20 2:00 0 - +Rule Morocco 2084 only - Apr 30 3:00 -1:00 - +Rule Morocco 2084 only - Jun 11 2:00 0 - +Rule Morocco 2085 only - Apr 22 3:00 -1:00 - +Rule Morocco 2085 only - May 27 2:00 0 - +Rule Morocco 2086 only - Apr 14 3:00 -1:00 - +Rule Morocco 2086 only - May 19 2:00 0 - +Rule Morocco 2087 only - Mar 30 3:00 -1:00 - +Rule Morocco 2087 only - May 4 2:00 0 - +# For dates after the somewhat-arbitrary cutoff of 2087, assume that +# Morocco will no longer observe DST. At some point this table will +# need to be extended, though quite possibly Morocco will change the +# rules first. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 0:00 Morocco +00/+01 1984 Mar 16 1:00 - +01 1986 @@ -1001,7 +1113,7 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aai # https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Maputo 2:10:20 - LMT 1903 Mar 2:00 - CAT Link Africa/Maputo Africa/Blantyre # Malawi @@ -1073,7 +1185,7 @@ Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 WAT #Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 WAT # End of rearguard section. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 @@ -1094,7 +1206,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 # See Africa/Lagos. # Nigeria -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Lagos 0:13:36 - LMT 1919 Sep 1:00 - WAT Link Africa/Lagos Africa/Bangui # Central African Republic @@ -1108,7 +1220,7 @@ Link Africa/Lagos Africa/Niamey # Niger Link Africa/Lagos Africa/Porto-Novo # Benin # Réunion -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis 4:00 - +04 # @@ -1168,7 +1280,7 @@ Zone Africa/Sao_Tome 0:26:56 - LMT 1884 # See Africa/Abidjan. # Seychelles -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria 4:00 - +04 # From Paul Eggert (2001-05-30): @@ -1188,7 +1300,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 - Rule SA 1943 1944 - Mar Sun>=15 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 1:30 - SAST 1903 Mar 2:00 SA SAST @@ -1223,14 +1335,14 @@ Rule Sudan 1970 only - May 1 0:00 1:00 S Rule Sudan 1970 1985 - Oct 15 0:00 0 - Rule Sudan 1971 only - Apr 30 0:00 1:00 S Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Khartoum 2:10:08 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT 2017 Nov 1 2:00 - CAT # South Sudan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Juba 2:06:28 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT @@ -1336,7 +1448,7 @@ Rule Tunisia 2006 2008 - Oct lastSun 2:00s 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. # Shanks & Pottenger say the 1911 switch was on Mar 9; go with Howse's Mar 11. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tunis 0:40:44 - LMT 1881 May 12 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 1:00 Tunisia CE%sT Modified: head/contrib/tzdata/antarctica ============================================================================== --- head/contrib/tzdata/antarctica Tue Jul 2 01:06:39 2019 (r349591) +++ head/contrib/tzdata/antarctica Tue Jul 2 01:12:23 2019 (r349592) @@ -13,7 +13,7 @@ # for information. # Unless otherwise specified, we have no time zone information. -# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited. +# FORMAT is '-00' and STDOFF is 0 for locations while uninhabited. # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -70,7 +70,7 @@ # Australian Antarctica Division informed us that Casey changed time # zone to UTC+11 in "the morning of 22nd October 2016". -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Casey 0 - -00 1969 8:00 - +08 2009 Oct 18 2:00 11:00 - +11 2010 Mar 5 2:00 @@ -142,7 +142,7 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13 # St Paul Island - near Amsterdam, uninhabited # fishing stations operated variously 1819/1931 # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français 5:00 - +05 # @@ -153,7 +153,7 @@ Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Françai # Another base at Port-Martin, 50km east, began operation in 1947. # It was destroyed by fire on 1952-01-14. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/DumontDUrville 0 - -00 1947 10:00 - +10 1952 Jan 14 0 - -00 1956 Nov @@ -181,7 +181,7 @@ Zone Antarctica/DumontDUrville 0 - -00 1947 # Syowa station, which is the first antarctic station of Japan, # was established on 1957-01-29. Since Syowa station is still the main # station of Japan, it's appropriate for the principal location. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Syowa 0 - -00 1957 Jan 29 3:00 - +03 # See: @@ -231,7 +231,7 @@ Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02 #Rule Troll 2004 max - Nov 7 1:00u 0:00 +00 # Remove the following line when uncommenting the above '#Rule' lines. Rule Troll 2004 max - Oct lastSun 1:00u 0:00 +00 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Troll 0 - -00 2005 Feb 12 0:00 Troll %s @@ -305,7 +305,7 @@ Zone Antarctica/Vostok 0 - -00 1957 Dec 16 # From Paul Eggert (2002-10-22) # says Rothera is -03 all year. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Rothera 0 - -00 1976 Dec 1 -3:00 - -03 Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Tue Jul 2 01:06:39 2019 (r349591) +++ head/contrib/tzdata/asia Tue Jul 2 01:12:23 2019 (r349592) @@ -84,7 +84,7 @@ Rule RussiaAsia 1985 2010 - Mar lastSun 2:00s 1:00 - Rule RussiaAsia 1996 2010 - Oct lastSun 2:00s 0 - # Afghanistan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 4:00 - +04 1945 4:30 - +0430 @@ -117,7 +117,7 @@ Zone Asia/Kabul 4:36:48 - LMT 1890 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Armenia 2011 only - Mar lastSun 2:00s 1:00 - Rule Armenia 2011 only - Oct lastSun 2:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -143,7 +143,7 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 - Rule Azer 1997 2015 - Oct lastSun 5:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baku 3:19:24 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -231,7 +231,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 Rule Dhaka 2009 only - Jun 19 23:00 1:00 - Rule Dhaka 2009 only - Dec 31 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? 6:30 - +0630 1942 May 15 @@ -241,7 +241,7 @@ Zone Asia/Dhaka 6:01:40 - LMT 1890 6:00 Dhaka +06/+07 # Bhutan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu 5:30 - +0530 1987 Oct 6:00 - +06 @@ -252,13 +252,13 @@ Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimb # We have no information as to when standard time was introduced; # assume it occurred in 1907, the same year as Mauritius (which # then contained the Chagos Archipelago). -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Chagos 4:49:40 - LMT 1907 5:00 - +05 1996 6:00 - +06 # Brunei -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan 7:30 - +0730 1933 8:00 - +08 @@ -273,7 +273,7 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri # of Greenwich." This refers to the period before Burma's transition to +0630, # a transition for which Shanks is the only source. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoon 6:24:47 - RMT 1920 # Rangoon local time 6:30 - +0630 1942 May @@ -561,7 +561,7 @@ Rule PRC 1987 1991 - Apr Sun>=11 2:00 1:00 D # that the sort of users who prefer Asia/Urumqi now typically ignored the # +08 mandate back then. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Beijing time, used throughout China; represented by Shanghai. Zone Asia/Shanghai 8:05:43 - LMT 1901 8:00 Shang C%sT 1949 May 28 @@ -652,11 +652,41 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # https://i.imgur.com/05KkvtC.png # * 1941-09-30, Hong Kong Daily Press, Winter Time Warning. # https://i.imgur.com/dge4kFJ.png -# Also, the Liberation day of Hong Kong after WWII which British rule -# over the territory resumed was August 30, 1945, which I think should -# be the termination date for the use of JST in the territory.... -# From Paul Eggert (2018-11-17): +# From P Chan (2018-12-31): +# * According to the Hong Kong Daylight-Saving Regulations, 1941, the +# 1941 spring-forward transition was at 03:00. +# http://sunzi.lib.hku.hk/hkgro/view/g1941/304271.pdf +# http://sunzi.lib.hku.hk/hkgro/view/g1941/305516.pdf +# * According to some articles from South China Morning Post, +08 was +# resumed on 1945-11-18 at 02:00. +# https://i.imgur.com/M2IsZ3c.png +# https://i.imgur.com/iOPqrVo.png +# https://i.imgur.com/fffcGDs.png +# * Some newspapers ... said the 1946 spring-forward transition was on +# 04-21 at 00:00. The Kung Sheung Evening News 1946-04-20 (Chinese) +# https://i.imgur.com/ZSzent0.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2FH7zGe%2FKF%2BFLYsuqGhRBfe p.4 +# The Kung Sheung Daily News 1946-04-21 (Chinese) +# https://i.imgur.com/7ecmRlcm.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2BQBGt1%2BwUj5qG2GqtwR3Wh p.4 +# * According to the Summer Time Ordinance (1946), the fallback +# transitions between 1946 and 1952 were at 03:30 Standard Time (+08) +# http://oelawhk.lib.hku.hk/archive/files/bb74b06a74d5294620a15de560ab33c6.pdf +# * Some other laws and regulations related to DST from 1953 to 1979 +# Summer Time Ordinance 1953 +# https://i.imgur.com/IOlJMav.jpg +# Summer Time (Amendment) Ordinance 1965 +# https://i.imgur.com/8rofeLa.jpg +# Interpretation and General Clauses Ordinance (1966) +# https://i.imgur.com/joy3msj.jpg +# Emergency (Summer Time) Regulation 1973 +# Interpretation and General Clauses (Amendment) Ordinance 1977 +# https://i.imgur.com/RaNqnc4.jpg +# Resolution of the Legislative Council passed on 9 May 1979 +# https://www.legco.gov.hk/yr78-79/english/lc_sitg/hansard/h790509.pdf#page=39 + +# From Paul Eggert (2019-05-31): # Here are the dates given at # https://www.hko.gov.hk/gts/time/Summertime.htm # as of 2014-06-19: @@ -667,7 +697,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # 1944 Whole year # 1945 Whole year # 1946 20 Apr to 1 Dec -# 1947 13 Apr to 30 Dec +# 1947 13 Apr to 30 Nov # 1948 2 May to 31 Oct # 1949 3 Apr to 30 Oct # 1950 2 Apr to 29 Oct @@ -704,36 +734,28 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # The page does not give times of day for transitions, # or dates for the 1942 and 1945 transitions. # The Japanese occupation of Hong Kong began 1941-12-25. -# The Japanese surrender of Hong Kong was signed 1945-09-16; see: -# Heaver S. The days after the Pacific war ended: unsettling times -# in Hong Kong. Post Magazine. 2016-06-13. -# https://www.scmp.com/magazines/post-magazine/article/1852990/days-after-pacific-war-ended-unsettling-times-hong-kong -# For lack of anything better, use start of those days as the -# transition times. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule HK 1946 only - Apr 20 3:30 1:00 S -Rule HK 1946 only - Dec 1 3:30 0 - -Rule HK 1947 only - Apr 13 3:30 1:00 S -Rule HK 1947 only - Dec 30 3:30 0 - -Rule HK 1948 only - May 2 3:30 1:00 S -Rule HK 1948 1951 - Oct lastSun 3:30 0 - -Rule HK 1952 1953 - Nov Sun>=1 3:30 0 - +Rule HK 1946 only - Apr 21 0:00 1:00 S +Rule HK 1946 only - Dec 1 3:30s 0 - +Rule HK 1947 only - Apr 13 3:30s 1:00 S +Rule HK 1947 only - Nov 30 3:30s 0 - +Rule HK 1948 only - May 2 3:30s 1:00 S +Rule HK 1948 1952 - Oct Sun>=28 3:30s 0 - Rule HK 1949 1953 - Apr Sun>=1 3:30 1:00 S +Rule HK 1953 1964 - Oct Sun>=31 3:30 0 - Rule HK 1954 1964 - Mar Sun>=18 3:30 1:00 S -Rule HK 1954 only - Oct 31 3:30 0 - -Rule HK 1955 1964 - Nov Sun>=1 3:30 0 - Rule HK 1965 1976 - Apr Sun>=16 3:30 1:00 S Rule HK 1965 1976 - Oct Sun>=16 3:30 0 - Rule HK 1973 only - Dec 30 3:30 1:00 S -Rule HK 1979 only - May Sun>=8 3:30 1:00 S -Rule HK 1979 only - Oct Sun>=16 3:30 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Rule HK 1979 only - May 13 3:30 1:00 S +Rule HK 1979 only - Oct 21 3:30 0 - +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42 - 8:00 - HKT 1941 Jun 15 3:30 + 8:00 - HKT 1941 Jun 15 3:00 8:00 1:00 HKST 1941 Oct 1 4:00 8:30 - HKT 1941 Dec 25 - 9:00 - JST 1945 Sep 16 + 9:00 - JST 1945 Nov 18 2:00 8:00 HK HK%sT ############################################################################### @@ -857,7 +879,7 @@ Rule Taiwan 1974 1975 - Oct 1 0:00 0 S Rule Taiwan 1979 only - Jul 1 0:00 1:00 D Rule Taiwan 1979 only - Oct 1 0:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Taipei or Taibei or T'ai-pei Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 8:00 - CST 1937 Oct 1 @@ -995,7 +1017,7 @@ Rule Macau 1975 1976 - Apr Sun>=16 03:30 1:00 D Rule Macau 1979 only - May 13 03:30 1:00 D Rule Macau 1979 only - Oct Sun>=16 03:30 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Macau 7:34:10 - LMT 1904 Oct 30 8:00 - CST 1941 Dec 21 23:00 9:00 Macau +09/+10 1945 Sep 30 24:00 @@ -1034,7 +1056,7 @@ Rule Cyprus 1977 only - Sep 25 0:00 0 - Rule Cyprus 1978 only - Oct 2 0:00 0 - Rule Cyprus 1979 1997 - Sep lastSun 0:00 0 - Rule Cyprus 1981 1998 - Mar lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14 2:00 Cyprus EE%sT 1998 Sep 2:00 EUAsia EE%sT @@ -1083,7 +1105,7 @@ Link Asia/Nicosia Europe/Nicosia # Byalokoz 1919 says Georgia was 2:59:11. # Go with Byalokoz. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tbilisi 2:59:11 - LMT 1880 2:59:11 - TBMT 1924 May 2 # Tbilisi Mean Time 3:00 - +03 1957 Mar @@ -1120,7 +1142,7 @@ Zone Asia/Tbilisi 2:59:11 - LMT 1880 # which will be permanent, with no seasonal adjustment, will happen at # midnight on Saturday, September 16. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 8:00 - +08 1942 Feb 21 23:00 9:00 - +09 1976 May 3 @@ -1186,7 +1208,7 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 # time for 1870-1941. Shanks is our only (and dubious) source for the # 1941-1945 data. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata 5:53:20 - HMT 1870 # Howrah Mean Time? 5:21:10 - MMT 1906 Jan 1 # Madras local time @@ -1238,7 +1260,7 @@ Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata # WITA - +08 - Waktu Indonesia Tengah (Indonesia central time) # WIT - +09 - Waktu Indonesia Timur (Indonesia eastern time) # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Java, Sumatra Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, @@ -1314,9 +1336,9 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # I used the following code in GNU Emacs 26.1 to generate the "Rule Iran" # lines from 2008 through 2087. Emacs 26.1 uses Ed Reingold's # cal-persia implementation of Birashk's approximation, which in the -# 2008-2087 range disagrees with the the astronomical Persian calendar -# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), -# so the following code special-case those years. See Table 15.1, page 264, of: +# 2008-2087 range disagrees with the astronomical Persian calendar +# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), so +# the following code special-cases those years. See Table 15.1, page 264, of: # Edward M. Reingold and Nachum Dershowitz, Calendrical Calculations: # The Ultimate Edition, Cambridge University Press (2018). # https://www.cambridge.org/fr/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition @@ -1510,7 +1532,7 @@ Rule Iran 2087 only - Sep 21 24:00 0 - Rule Iran 2088 max - Mar 20 24:00 1:00 - Rule Iran 2088 max - Sep 20 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time 3:30 - +0330 1977 Nov @@ -1555,7 +1577,7 @@ Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 - # Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 - Rule Iraq 1991 2007 - Oct 1 3:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? 3:00 - +03 1982 May @@ -1622,7 +1644,7 @@ Rule Zion 1975 only - Apr 20 0:00 1:00 D Rule Zion 1975 only - Aug 31 0:00 0 S # From Alois Treindl (2019-03-06): -# http://www.moin.gov.il/Documents/שעון קיץ/clock-50-years-7-2014.pdf +# http://www.moin.gov.il/Documents/שעון%20קיץ/clock-50-years-7-2014.pdf # From Isaac Starkman (2019-03-06): # Summer time was in that period in 1980 and 1984, see # https://www.ynet.co.il/articles/0,7340,L-3951073,00.html @@ -1760,32 +1782,15 @@ Rule Zion 2004 only - Sep 22 1:00 0 S # # ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps -# From Paul Eggert (2012-10-26): -# I used Ephraim Silverberg's dst-israel.el program -# (2005-02-20) -# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4, -# to generate the transitions from 2005 through 2012. -# (I replaced "lastFri" with "Fri>=26" by hand.) -# The spring transitions all correspond to the following Rule: -# -# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D -# -# but older zic implementations (e.g., Solaris 8) do not support -# "Fri>=26" to mean April 1 in years like 2005, so for now we list the -# springtime transitions explicitly. - # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Zion 2005 only - Apr 1 2:00 1:00 D +Rule Zion 2005 2012 - Apr Fri<=1 2:00 1:00 D Rule Zion 2005 only - Oct 9 2:00 0 S -Rule Zion 2006 2010 - Mar Fri>=26 2:00 1:00 D Rule Zion 2006 only - Oct 1 2:00 0 S Rule Zion 2007 only - Sep 16 2:00 0 S Rule Zion 2008 only - Oct 5 2:00 0 S Rule Zion 2009 only - Sep 27 2:00 0 S Rule Zion 2010 only - Sep 12 2:00 0 S -Rule Zion 2011 only - Apr 1 2:00 1:00 D Rule Zion 2011 only - Oct 2 2:00 0 S -Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D Rule Zion 2012 only - Sep 23 2:00 0 S # From Ephraim Silverberg (2013-06-27): @@ -1801,7 +1806,7 @@ Rule Zion 2012 only - Sep 23 2:00 0 S Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D Rule Zion 2013 max - Oct lastSun 2:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Jerusalem 2:20:54 - LMT 1880 2:20:40 - JMT 1918 # Jerusalem Mean Time? 2:00 Zion I%sT @@ -1893,7 +1898,7 @@ Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D # Central Time (UT+9). The adoption began on Oct 1, 1937. # https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u 9:00 Japan J%sT # Since 1938, all Japanese possessions have been like Asia/Tokyo, @@ -1996,7 +2001,7 @@ Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - Rule Jordan 2013 only - Dec 20 0:00 0 - Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S Rule Jordan 2014 max - Oct lastFri 0:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 2:00 Jordan EE%sT @@ -2037,8 +2042,8 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # text. # # According to Izvestia newspaper No. 68 (23334) from 1991-03-20 -# (page 6; available at http://libinfo.org/newsr/newsr2574.djvu via -# http://libinfo.org/index.php?id=58564) on 1991-03-31 at 2:00 during +# -- page 6; available at http://libinfo.org/newsr/newsr2574.djvu via +# http://libinfo.org/index.php?id=58564 -- on 1991-03-31 at 2:00 during # transition to "summer" time: # Republic of Georgia, Latvian SSR, Lithuanian SSR, SSR Moldova, # Estonian SSR; Komi ASSR; Kaliningrad oblast; Nenets autonomous okrug @@ -2054,7 +2059,7 @@ Zone Asia/Amman 2:23:44 - LMT 1931 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 2 02:52:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 103F315C1943; Tue, 2 Jul 2019 02:52:06 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1E3C6A005; Tue, 2 Jul 2019 02:52:05 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 773FB1E27E; Tue, 2 Jul 2019 02:52:05 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x622q5Nd082489; Tue, 2 Jul 2019 02:52:05 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x622q5fo082488; Tue, 2 Jul 2019 02:52:05 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201907020252.x622q5fo082488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Tue, 2 Jul 2019 02:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349593 - head/sys/dev/bwn X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: head/sys/dev/bwn X-SVN-Commit-Revision: 349593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A1E3C6A005 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 02:52:06 -0000 Author: landonf Date: Tue Jul 2 02:52:05 2019 New Revision: 349593 URL: https://svnweb.freebsd.org/changeset/base/349593 Log: bwn(4): Include SROM revision when printing device identification. Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Tue Jul 2 01:12:23 2019 (r349592) +++ head/sys/dev/bwn/if_bwn.c Tue Jul 2 02:52:05 2019 (r349593) @@ -632,9 +632,10 @@ bwn_attach(device_t dev) goto fail; bhnd_format_chip_id(chip_name, sizeof(chip_name), sc->sc_cid.chip_id); - device_printf(sc->sc_dev, "WLAN (%s rev %u) " + device_printf(sc->sc_dev, "WLAN (%s rev %u sromrev %u) " "PHY (analog %d type %d rev %d) RADIO (manuf %#x ver %#x rev %d)\n", - chip_name, bhnd_get_hwrev(sc->sc_dev), mac->mac_phy.analog, + chip_name, bhnd_get_hwrev(sc->sc_dev), + sc->sc_board_info.board_srom_rev, mac->mac_phy.analog, mac->mac_phy.type, mac->mac_phy.rev, mac->mac_phy.rf_manuf, mac->mac_phy.rf_ver, mac->mac_phy.rf_rev); if (mac->mac_flags & BWN_MAC_FLAG_DMA) From owner-svn-src-all@freebsd.org Tue Jul 2 05:25:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B901D15C72A6; Tue, 2 Jul 2019 05:25:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E2696E87B; Tue, 2 Jul 2019 05:25:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35DC11FC5C; Tue, 2 Jul 2019 05:25:20 +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 x625PKHQ061233; Tue, 2 Jul 2019 05:25:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x625PJ4B061226; Tue, 2 Jul 2019 05:25:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201907020525.x625PJ4B061226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jul 2019 05:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349594 - in head/sys: amd64/conf conf dev/ntb dev/ntb/ntb_hw i386/conf modules/ntb modules/ntb/ntb_hw_amd X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys: amd64/conf conf dev/ntb dev/ntb/ntb_hw i386/conf modules/ntb modules/ntb/ntb_hw_amd X-SVN-Commit-Revision: 349594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5E2696E87B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 05:25:21 -0000 Author: mav Date: Tue Jul 2 05:25:18 2019 New Revision: 349594 URL: https://svnweb.freebsd.org/changeset/base/349594 Log: Add driver for NTB in AMD SoC. This patch is the driver for NTB hardware in AMD SoCs (ported from Linux) and enables the NTB infrastructure like Doorbells, Scratchpads and Memory window in AMD SoC. This driver has been validated using ntb_transport and if_ntb driver already available in FreeBSD. Submitted by: Rajesh Kumar MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D18774 Added: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c (contents, props changed) head/sys/dev/ntb/ntb_hw/ntb_hw_amd.h (contents, props changed) head/sys/modules/ntb/ntb_hw_amd/ head/sys/modules/ntb/ntb_hw_amd/Makefile (contents, props changed) Modified: head/sys/amd64/conf/NOTES head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/ntb/ntb.c head/sys/dev/ntb/ntb.h head/sys/dev/ntb/ntb_if.m head/sys/dev/ntb/ntb_transport.c head/sys/i386/conf/NOTES head/sys/modules/ntb/Makefile Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Tue Jul 2 02:52:05 2019 (r349593) +++ head/sys/amd64/conf/NOTES Tue Jul 2 05:25:18 2019 (r349594) @@ -383,6 +383,7 @@ device wpifw device if_ntb # Virtual NTB network interface device ntb_transport # NTB packet transport driver device ntb # NTB hardware interface +device ntb_hw_amd # AMD NTB hardware driver device ntb_hw_intel # Intel NTB hardware driver device ntb_hw_plx # PLX NTB hardware driver Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Jul 2 02:52:05 2019 (r349593) +++ head/sys/conf/files.amd64 Tue Jul 2 05:25:18 2019 (r349594) @@ -352,8 +352,9 @@ dev/nctgpio/nctgpio.c optional nctgpio dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.c optional if_ntb dev/ntb/ntb_transport.c optional ntb_transport | if_ntb -dev/ntb/ntb.c optional ntb | ntb_transport | if_ntb | ntb_hw_intel | ntb_hw_plx | ntb_hw -dev/ntb/ntb_if.m optional ntb | ntb_transport | if_ntb | ntb_hw_intel | ntb_hw_plx | ntb_hw +dev/ntb/ntb.c optional ntb | ntb_transport | if_ntb | ntb_hw_amd | ntb_hw_intel | ntb_hw_plx | ntb_hw +dev/ntb/ntb_if.m optional ntb | ntb_transport | if_ntb | ntb_hw_amd | ntb_hw_intel | ntb_hw_plx | ntb_hw +dev/ntb/ntb_hw/ntb_hw_amd.c optional ntb_hw_amd | ntb_hw dev/ntb/ntb_hw/ntb_hw_intel.c optional ntb_hw_intel | ntb_hw dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw dev/nvd/nvd.c optional nvd nvme Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Jul 2 02:52:05 2019 (r349593) +++ head/sys/conf/files.i386 Tue Jul 2 05:25:18 2019 (r349594) @@ -284,8 +284,9 @@ dev/nctgpio/nctgpio.c optional nctgpio dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.c optional if_ntb dev/ntb/ntb_transport.c optional ntb_transport | if_ntb -dev/ntb/ntb.c optional ntb | ntb_transport | if_ntb | ntb_hw_intel | ntb_hw_plx | ntb_hw -dev/ntb/ntb_if.m optional ntb | ntb_transport | if_ntb | ntb_hw_intel | ntb_hw_plx | ntb_hw +dev/ntb/ntb.c optional ntb | ntb_transport | if_ntb | ntb_hw_amd | ntb_hw_intel | ntb_hw_plx | ntb_hw +dev/ntb/ntb_if.m optional ntb | ntb_transport | if_ntb | ntb_hw_amd | ntb_hw_intel | ntb_hw_plx | ntb_hw +dev/ntb/ntb_hw/ntb_hw_amd.c optional ntb_hw_amd | ntb_hw dev/ntb/ntb_hw/ntb_hw_intel.c optional ntb_hw_intel | ntb_hw dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw dev/nvd/nvd.c optional nvd nvme Modified: head/sys/dev/ntb/ntb.c ============================================================================== --- head/sys/dev/ntb/ntb.c Tue Jul 2 02:52:05 2019 (r349593) +++ head/sys/dev/ntb/ntb.c Tue Jul 2 05:25:18 2019 (r349594) @@ -243,6 +243,30 @@ ntb_db_event(device_t dev, uint32_t vec) } } +int +ntb_port_number(device_t ntb) +{ + return (NTB_PORT_NUMBER(device_get_parent(ntb))); +} + +int +ntb_peer_port_count(device_t ntb) +{ + return (NTB_PEER_PORT_COUNT(device_get_parent(ntb))); +} + +int +ntb_peer_port_number(device_t ntb, int pidx) +{ + return (NTB_PEER_PORT_NUMBER(device_get_parent(ntb), pidx)); +} + +int +ntb_peer_port_idx(device_t ntb, int port) +{ + return (NTB_PEER_PORT_IDX(device_get_parent(ntb), port)); +} + bool ntb_link_is_up(device_t ntb, enum ntb_speed *speed, enum ntb_width *width) { Modified: head/sys/dev/ntb/ntb.h ============================================================================== --- head/sys/dev/ntb/ntb.h Tue Jul 2 02:52:05 2019 (r349593) +++ head/sys/dev/ntb/ntb.h Tue Jul 2 05:25:18 2019 (r349594) @@ -64,6 +64,51 @@ void ntb_link_event(device_t ntb); */ void ntb_db_event(device_t ntb, uint32_t vec); +/** + * ntb_port_number() - get the local port number + * @ntb: NTB device context. + * + * Hardware driver returns local port number in compliance with topology. + * + * Return: the local port number + */ +int ntb_port_number(device_t ntb); + +/** + * ntb_port_count() - get the number of peer device ports + * @ntb: NTB device context. + * + * By default hardware driver supports just one peer device. + * + * Return: the number of peer ports + */ +int ntb_peer_port_count(device_t ntb); + +/** + * ntb_peer_port_number() - get the peer port by given index + * @ntb: NTB device context. + * @idx: Peer port index (should be zero for now). + * + * By default hardware driver supports just one peer device, so this method + * shall return the corresponding value. + * + * Return: the peer device port or an error number + */ +int ntb_peer_port_number(device_t ntb, int pidx); + +/* + * ntb_peer_port_idx() - get the peer device port index by given port + * number + * @ntb: NTB device context. + * @port: Peer port number + * + * By default hardware driver supports just one peer device, so given a + * valid peer port number, the return value shall be zero. + * + * Return: the peer port index or an error number + */ +int ntb_peer_port_idx(device_t ntb, int port); + /* * ntb_link_is_up() - get the current ntb link state * @ntb: NTB device context Added: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Tue Jul 2 05:25:18 2019 (r349594) @@ -0,0 +1,1247 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright (C) 2019 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * BSD LICENSE + * + * Copyright (c) 2019 Advanced Micro Devices, Inc. + * + * 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 AMD 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 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. + * + * Contact Information : + * Rajesh Kumar + */ + +/* + * The Non-Transparent Bridge (NTB) is a device that allows you to connect + * two or more systems using a PCI-e links, providing remote memory access. + * + * This module contains a driver for NTB hardware in AMD CPUs + * + * Much of the code in this module is shared with Linux. Any patches may + * be picked up and redistributed in Linux with a dual GPL/BSD license. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + +#include "ntb_hw_amd.h" +#include "dev/ntb/ntb.h" + +MALLOC_DEFINE(M_AMD_NTB, "amd_ntb_hw", "amd_ntb_hw driver memory allocations"); + +struct pci_device_table amd_ntb_devs[] = { + { PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID), + PCI_DESCR("AMD Non-Transparent Bridge") } +}; + +static unsigned g_amd_ntb_hw_debug_level; +SYSCTL_UINT(_hw_ntb, OID_AUTO, debug_level, CTLFLAG_RWTUN, + &g_amd_ntb_hw_debug_level, 0, "amd_ntb_hw log level -- higher is verbose"); + +#define amd_ntb_printf(lvl, ...) do { \ + if (lvl <= g_amd_ntb_hw_debug_level) \ + device_printf(ntb->device, __VA_ARGS__); \ +} while (0) + +/* + * AMD NTB INTERFACE ROUTINES + */ +static int +amd_ntb_port_number(device_t dev) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: conn_type %d\n", __func__, ntb->conn_type); + + switch (ntb->conn_type) { + case NTB_CONN_PRI: + return (NTB_PORT_PRI_USD); + case NTB_CONN_SEC: + return (NTB_PORT_SEC_DSD); + default: + break; + } + + return (-EINVAL); +} + +static int +amd_ntb_peer_port_count(device_t dev) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: peer cnt %d\n", __func__, NTB_DEF_PEER_CNT); + return (NTB_DEF_PEER_CNT); +} + +static int +amd_ntb_peer_port_number(device_t dev, int pidx) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: pidx %d conn type %d\n", + __func__, pidx, ntb->conn_type); + + if (pidx != NTB_DEF_PEER_IDX) + return (-EINVAL); + + switch (ntb->conn_type) { + case NTB_CONN_PRI: + return (NTB_PORT_SEC_DSD); + case NTB_CONN_SEC: + return (NTB_PORT_PRI_USD); + default: + break; + } + + return (-EINVAL); +} + +static int +amd_ntb_peer_port_idx(device_t dev, int port) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + int peer_port; + + peer_port = amd_ntb_peer_port_number(dev, NTB_DEF_PEER_IDX); + + amd_ntb_printf(1, "%s: port %d peer_port %d\n", + __func__, port, peer_port); + + if (peer_port == -EINVAL || port != peer_port) + return (-EINVAL); + + return (0); +} + +/* + * AMD NTB INTERFACE - LINK ROUTINES + */ +static inline int +amd_link_is_up(struct amd_ntb_softc *ntb) +{ + + amd_ntb_printf(2, "%s: peer_sta 0x%x cntl_sta 0x%x\n", + __func__, ntb->peer_sta, ntb->cntl_sta); + + if (!ntb->peer_sta) + return (NTB_LNK_STA_ACTIVE(ntb->cntl_sta)); + + return (0); +} + +static inline enum ntb_speed +amd_ntb_link_sta_speed(struct amd_ntb_softc *ntb) +{ + + if (!amd_link_is_up(ntb)) + return (NTB_SPEED_NONE); + + return (NTB_LNK_STA_SPEED(ntb->lnk_sta)); +} + +static inline enum ntb_width +amd_ntb_link_sta_width(struct amd_ntb_softc *ntb) +{ + + if (!amd_link_is_up(ntb)) + return (NTB_WIDTH_NONE); + + return (NTB_LNK_STA_WIDTH(ntb->lnk_sta)); +} + +static bool +amd_ntb_link_is_up(device_t dev, enum ntb_speed *speed, enum ntb_width *width) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + if (speed != NULL) + *speed = amd_ntb_link_sta_speed(ntb); + if (width != NULL) + *width = amd_ntb_link_sta_width(ntb); + + return (amd_link_is_up(ntb)); +} + +static int +amd_ntb_link_enable(device_t dev, enum ntb_speed max_speed, + enum ntb_width max_width) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + uint32_t ntb_ctl; + + amd_ntb_printf(1, "%s: int_mask 0x%x conn_type %d\n", + __func__, ntb->int_mask, ntb->conn_type); + + amd_init_side_info(ntb); + + /* Enable event interrupt */ + ntb->int_mask &= ~AMD_EVENT_INTMASK; + amd_ntb_reg_write(4, AMD_INTMASK_OFFSET, ntb->int_mask); + + if (ntb->conn_type == NTB_CONN_SEC) + return (EINVAL); + + amd_ntb_printf(0, "%s: Enabling Link.\n", __func__); + + ntb_ctl = amd_ntb_reg_read(4, AMD_CNTL_OFFSET); + ntb_ctl |= (PMM_REG_CTL | SMM_REG_CTL); + amd_ntb_printf(1, "%s: ntb_ctl 0x%x\n", __func__, ntb_ctl); + amd_ntb_reg_write(4, AMD_CNTL_OFFSET, ntb_ctl); + + return (0); +} + +static int +amd_ntb_link_disable(device_t dev) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + uint32_t ntb_ctl; + + amd_ntb_printf(1, "%s: int_mask 0x%x conn_type %d\n", + __func__, ntb->int_mask, ntb->conn_type); + + amd_deinit_side_info(ntb); + + /* Disable event interrupt */ + ntb->int_mask |= AMD_EVENT_INTMASK; + amd_ntb_reg_write(4, AMD_INTMASK_OFFSET, ntb->int_mask); + + if (ntb->conn_type == NTB_CONN_SEC) + return (EINVAL); + + amd_ntb_printf(0, "%s: Disabling Link.\n", __func__); + + ntb_ctl = amd_ntb_reg_read(4, AMD_CNTL_OFFSET); + ntb_ctl &= ~(PMM_REG_CTL | SMM_REG_CTL); + amd_ntb_printf(1, "%s: ntb_ctl 0x%x\n", __func__, ntb_ctl); + amd_ntb_reg_write(4, AMD_CNTL_OFFSET, ntb_ctl); + + return (0); +} + +/* + * AMD NTB memory window routines + */ +static uint8_t +amd_ntb_mw_count(device_t dev) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + return (ntb->mw_count); +} + +static int +amd_ntb_mw_get_range(device_t dev, unsigned mw_idx, vm_paddr_t *base, + caddr_t *vbase, size_t *size, size_t *align, size_t *align_size, + bus_addr_t *plimit) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + struct amd_ntb_pci_bar_info *bar_info; + + if (mw_idx < 0 || mw_idx >= ntb->mw_count) + return (EINVAL); + + bar_info = &ntb->bar_info[mw_idx+1]; + + if (base != NULL) + *base = bar_info->pbase; + + if (vbase != NULL) + *vbase = bar_info->vbase; + + if (align != NULL) + *align = bar_info->size; + + if (size != NULL) + *size = bar_info->size; + + if (align_size != NULL) + *align_size = 1; + + if (plimit != NULL) { + if (mw_idx != 0) + *plimit = BUS_SPACE_MAXADDR; + else + *plimit = BUS_SPACE_MAXADDR_32BIT; + } + + amd_ntb_printf(1, "%s: mw %d padd %p vadd %p psize 0x%lx " + "align 0x%lx asize 0x%lx alimit %p\n", __func__, mw_idx, + (void *)*base, (void *)*vbase, (uint64_t)*size, (uint64_t)*align, + (uint64_t)*align_size, (void *)*plimit); + + return (0); +} + +static int +amd_ntb_mw_set_trans(device_t dev, unsigned mw_idx, bus_addr_t addr, size_t size) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + struct amd_ntb_pci_bar_info *bar_info; + + if (mw_idx < 0 || mw_idx >= ntb->mw_count) + return (EINVAL); + + bar_info = &ntb->bar_info[mw_idx+1]; + + /* make sure the range fits in the usable mw size */ + if (size > bar_info->size) { + amd_ntb_printf(0, "%s: size 0x%x greater than mw_size 0x%x\n", + __func__, (uint32_t)size, (uint32_t)bar_info->size); + return (EINVAL); + } + + amd_ntb_printf(1, "%s: mw %d mw_size 0x%x size 0x%x base %p\n", + __func__, mw_idx, (uint32_t)bar_info->size, + (uint32_t)size, (void *)bar_info->pci_bus_handle); + + /* + * AMD NTB XLAT and Limit registers needs to be written only after + * link enable + * + * set and verify setting the translation address + */ + amd_ntb_peer_reg_write(8, bar_info->xlat_off, (uint64_t)addr); + amd_ntb_printf(0, "%s: mw %d xlat_off 0x%x cur_val 0x%lx addr %p\n", + __func__, mw_idx, bar_info->xlat_off, + amd_ntb_peer_reg_read(8, bar_info->xlat_off), (void *)addr); + + /* set and verify setting the limit */ + if (mw_idx != 0) { + amd_ntb_reg_write(8, bar_info->limit_off, (uint64_t)size); + amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%lx limit 0x%x\n", + __func__, bar_info->limit_off, + amd_ntb_peer_reg_read(8, bar_info->limit_off), (uint32_t)size); + } else { + amd_ntb_reg_write(4, bar_info->limit_off, (uint64_t)size); + amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%x limit 0x%x\n", + __func__, bar_info->limit_off, + amd_ntb_peer_reg_read(4, bar_info->limit_off), (uint32_t)size); + } + + return (0); +} + +static int +amd_ntb_mw_clear_trans(device_t dev, unsigned mw_idx) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: mw_idx %d\n", __func__, mw_idx); + + if (mw_idx < 0 || mw_idx >= ntb->mw_count) + return (EINVAL); + + return (amd_ntb_mw_set_trans(dev, mw_idx, 0, 0)); +} + +static int +amd_ntb_mw_set_wc(device_t dev, unsigned int mw_idx, vm_memattr_t mode) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + struct amd_ntb_pci_bar_info *bar_info; + int rc; + + if (mw_idx < 0 || mw_idx >= ntb->mw_count) + return (EINVAL); + + bar_info = &ntb->bar_info[mw_idx+1]; + if (mode == bar_info->map_mode) + return (0); + + rc = pmap_change_attr((vm_offset_t)bar_info->vbase, bar_info->size, mode); + if (rc == 0) + bar_info->map_mode = mode; + + return (rc); +} + +static int +amd_ntb_mw_get_wc(device_t dev, unsigned mw_idx, vm_memattr_t *mode) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + struct amd_ntb_pci_bar_info *bar_info; + + amd_ntb_printf(1, "%s: mw_idx %d\n", __func__, mw_idx); + + if (mw_idx < 0 || mw_idx >= ntb->mw_count) + return (EINVAL); + + bar_info = &ntb->bar_info[mw_idx+1]; + *mode = bar_info->map_mode; + + return (0); +} + +/* + * AMD NTB doorbell routines + */ +static int +amd_ntb_db_vector_count(device_t dev) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: db_count 0x%x\n", __func__, ntb->db_count); + + return (ntb->db_count); +} + +static uint64_t +amd_ntb_db_valid_mask(device_t dev) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: db_valid_mask 0x%x\n", + __func__, ntb->db_valid_mask); + + return (ntb->db_valid_mask); +} + +static uint64_t +amd_ntb_db_vector_mask(device_t dev, uint32_t vector) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: vector %d db_count 0x%x db_valid_mask 0x%x\n", + __func__, vector, ntb->db_count, ntb->db_valid_mask); + + if (vector < 0 || vector >= ntb->db_count) + return (0); + + return (ntb->db_valid_mask & (1 << vector)); +} + +static uint64_t +amd_ntb_db_read(device_t dev) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + uint64_t dbstat_off; + + dbstat_off = (uint64_t)amd_ntb_reg_read(2, AMD_DBSTAT_OFFSET); + + amd_ntb_printf(1, "%s: dbstat_off 0x%lx\n", __func__, dbstat_off); + + return (dbstat_off); +} + +static void +amd_ntb_db_clear(device_t dev, uint64_t db_bits) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: db_bits 0x%lx\n", __func__, db_bits); + amd_ntb_reg_write(2, AMD_DBSTAT_OFFSET, (uint16_t)db_bits); +} + +static void +amd_ntb_db_set_mask(device_t dev, uint64_t db_bits) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + DB_MASK_LOCK(ntb); + amd_ntb_printf(1, "%s: db_mask 0x%x db_bits 0x%lx\n", + __func__, ntb->db_mask, db_bits); + + ntb->db_mask |= db_bits; + amd_ntb_reg_write(2, AMD_DBMASK_OFFSET, ntb->db_mask); + DB_MASK_UNLOCK(ntb); +} + +static void +amd_ntb_db_clear_mask(device_t dev, uint64_t db_bits) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + DB_MASK_LOCK(ntb); + amd_ntb_printf(1, "%s: db_mask 0x%x db_bits 0x%lx\n", + __func__, ntb->db_mask, db_bits); + + ntb->db_mask &= ~db_bits; + amd_ntb_reg_write(2, AMD_DBMASK_OFFSET, ntb->db_mask); + DB_MASK_UNLOCK(ntb); +} + +static void +amd_ntb_peer_db_set(device_t dev, uint64_t db_bits) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: db_bits 0x%lx\n", __func__, db_bits); + amd_ntb_reg_write(2, AMD_DBREQ_OFFSET, (uint16_t)db_bits); +} + +/* + * AMD NTB scratchpad routines + */ +static uint8_t +amd_ntb_spad_count(device_t dev) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + + amd_ntb_printf(1, "%s: spad_count 0x%x\n", __func__, ntb->spad_count); + + return (ntb->spad_count); +} + +static int +amd_ntb_spad_read(device_t dev, unsigned int idx, uint32_t *val) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + uint32_t offset; + + amd_ntb_printf(2, "%s: idx %d\n", __func__, idx); + + if (idx < 0 || idx >= ntb->spad_count) + return (EINVAL); + + offset = ntb->self_spad + (idx << 2); + *val = amd_ntb_reg_read(4, AMD_SPAD_OFFSET + offset); + amd_ntb_printf(2, "%s: offset 0x%x val 0x%x\n", __func__, offset, *val); + + return (0); +} + +static int +amd_ntb_spad_write(device_t dev, unsigned int idx, uint32_t val) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + uint32_t offset; + + amd_ntb_printf(2, "%s: idx %d\n", __func__, idx); + + if (idx < 0 || idx >= ntb->spad_count) + return (EINVAL); + + offset = ntb->self_spad + (idx << 2); + amd_ntb_reg_write(4, AMD_SPAD_OFFSET + offset, val); + amd_ntb_printf(2, "%s: offset 0x%x val 0x%x\n", __func__, offset, val); + + return (0); +} + +static void +amd_ntb_spad_clear(struct amd_ntb_softc *ntb) +{ + uint8_t i; + + for (i = 0; i < ntb->spad_count; i++) + amd_ntb_spad_write(ntb->device, i, 0); +} + +static int +amd_ntb_peer_spad_read(device_t dev, unsigned int idx, uint32_t *val) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + uint32_t offset; + + amd_ntb_printf(2, "%s: idx %d\n", __func__, idx); + + if (idx < 0 || idx >= ntb->spad_count) + return (EINVAL); + + offset = ntb->peer_spad + (idx << 2); + *val = amd_ntb_reg_read(4, AMD_SPAD_OFFSET + offset); + amd_ntb_printf(2, "%s: offset 0x%x val 0x%x\n", __func__, offset, *val); + + return (0); +} + +static int +amd_ntb_peer_spad_write(device_t dev, unsigned int idx, uint32_t val) +{ + struct amd_ntb_softc *ntb = device_get_softc(dev); + uint32_t offset; + + amd_ntb_printf(2, "%s: idx %d\n", __func__, idx); + + if (idx < 0 || idx >= ntb->spad_count) + return (EINVAL); + + offset = ntb->peer_spad + (idx << 2); + amd_ntb_reg_write(4, AMD_SPAD_OFFSET + offset, val); + amd_ntb_printf(2, "%s: offset 0x%x val 0x%x\n", __func__, offset, val); + + return (0); +} + + +/* + * AMD NTB INIT + */ +static int +amd_ntb_hw_info_handler(SYSCTL_HANDLER_ARGS) +{ + struct amd_ntb_softc* ntb = arg1; + struct sbuf *sb; + int rc = 0; + + sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); + if (sb == NULL) + return (sb->s_error); + + sbuf_printf(sb, "NTB AMD Hardware info:\n\n"); + sbuf_printf(sb, "AMD NTB side: %s\n", + (ntb->conn_type == NTB_CONN_PRI)? "PRIMARY" : "SECONDARY"); + sbuf_printf(sb, "AMD LNK STA: 0x%#06x\n", ntb->lnk_sta); + + if (!amd_link_is_up(ntb)) + sbuf_printf(sb, "AMD Link Status: Down\n"); + else { + sbuf_printf(sb, "AMD Link Status: Up\n"); + sbuf_printf(sb, "AMD Link Speed: PCI-E Gen %u\n", + NTB_LNK_STA_SPEED(ntb->lnk_sta)); + sbuf_printf(sb, "AMD Link Width: PCI-E Width %u\n", + NTB_LNK_STA_WIDTH(ntb->lnk_sta)); + } + + sbuf_printf(sb, "AMD Memory window count: %d\n", + ntb->mw_count); + sbuf_printf(sb, "AMD Spad count: %d\n", + ntb->spad_count); + sbuf_printf(sb, "AMD Doorbell count: %d\n", + ntb->db_count); + sbuf_printf(sb, "AMD MSI-X vec count: %d\n\n", + ntb->msix_vec_count); + sbuf_printf(sb, "AMD Doorbell valid mask: 0x%x\n", + ntb->db_valid_mask); + sbuf_printf(sb, "AMD Doorbell Mask: 0x%x\n", + amd_ntb_reg_read(4, AMD_DBMASK_OFFSET)); + sbuf_printf(sb, "AMD Doorbell: 0x%x\n", + amd_ntb_reg_read(4, AMD_DBSTAT_OFFSET)); + sbuf_printf(sb, "AMD NTB Incoming XLAT: \n"); + sbuf_printf(sb, "AMD XLAT1: 0x%lx\n", + amd_ntb_peer_reg_read(8, AMD_BAR1XLAT_OFFSET)); + sbuf_printf(sb, "AMD XLAT23: 0x%lx\n", + amd_ntb_peer_reg_read(8, AMD_BAR23XLAT_OFFSET)); + sbuf_printf(sb, "AMD XLAT45: 0x%lx\n", + amd_ntb_peer_reg_read(8, AMD_BAR45XLAT_OFFSET)); + sbuf_printf(sb, "AMD LMT1: 0x%x\n", + amd_ntb_reg_read(4, AMD_BAR1LMT_OFFSET)); + sbuf_printf(sb, "AMD LMT23: 0x%lx\n", + amd_ntb_reg_read(8, AMD_BAR23LMT_OFFSET)); + sbuf_printf(sb, "AMD LMT45: 0x%lx\n", + amd_ntb_reg_read(8, AMD_BAR45LMT_OFFSET)); + + rc = sbuf_finish(sb); + sbuf_delete(sb); + return (rc); +} + +static void +amd_ntb_sysctl_init(struct amd_ntb_softc *ntb) +{ + struct sysctl_oid_list *globals; + struct sysctl_ctx_list *ctx; + + ctx = device_get_sysctl_ctx(ntb->device); + globals = SYSCTL_CHILDREN(device_get_sysctl_tree(ntb->device)); + + SYSCTL_ADD_PROC(ctx, globals, OID_AUTO, "info", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, ntb, 0, + amd_ntb_hw_info_handler, "A", "AMD NTB HW Information"); +} + +/* + * Polls the HW link status register(s); returns true if something has changed. + */ +static bool +amd_ntb_poll_link(struct amd_ntb_softc *ntb) +{ + uint32_t fullreg, reg, stat; + + fullreg = amd_ntb_peer_reg_read(4, AMD_SIDEINFO_OFFSET); + reg = fullreg & NTB_LIN_STA_ACTIVE_BIT; + + if (reg == ntb->cntl_sta) + return (false); + + amd_ntb_printf(0, "%s: SIDEINFO reg_val = 0x%x cntl_sta 0x%x\n", + __func__, fullreg, ntb->cntl_sta); + + ntb->cntl_sta = reg; + + stat = pci_read_config(ntb->device, AMD_LINK_STATUS_OFFSET, 4); + + amd_ntb_printf(0, "%s: LINK_STATUS stat = 0x%x lnk_sta 0x%x.\n", + __func__, stat, ntb->lnk_sta); + + ntb->lnk_sta = stat; + + return (true); +} + +static void +amd_link_hb(void *arg) +{ + struct amd_ntb_softc *ntb = arg; + + if (amd_ntb_poll_link(ntb)) + ntb_link_event(ntb->device); + + if (!amd_link_is_up(ntb)) { + callout_reset(&ntb->hb_timer, AMD_LINK_HB_TIMEOUT, + amd_link_hb, ntb); + } else { + callout_reset(&ntb->hb_timer, (AMD_LINK_HB_TIMEOUT * 10), + amd_link_hb, ntb); + } +} + +static void +amd_ntb_interrupt(struct amd_ntb_softc *ntb, uint16_t vec) +{ + if (vec < AMD_DB_CNT) + ntb_db_event(ntb->device, vec); + else + amd_ntb_printf(0, "Invalid vector %d\n", vec); +} + +static void +amd_ntb_vec_isr(void *arg) +{ + struct amd_ntb_vec *nvec = arg; + + amd_ntb_interrupt(nvec->ntb, nvec->num); +} + +static void +amd_ntb_irq_isr(void *arg) +{ + /* If we couldn't set up MSI-X, we only have the one vector. */ + amd_ntb_interrupt(arg, 0); +} + +static void +amd_init_side_info(struct amd_ntb_softc *ntb) +{ + unsigned int reg; + + reg = amd_ntb_reg_read(4, AMD_SIDEINFO_OFFSET); + if (!(reg & AMD_SIDE_READY)) { + reg |= AMD_SIDE_READY; + amd_ntb_reg_write(4, AMD_SIDEINFO_OFFSET, reg); + } + reg = amd_ntb_reg_read(4, AMD_SIDEINFO_OFFSET); +} + +static void +amd_deinit_side_info(struct amd_ntb_softc *ntb) +{ + unsigned int reg; + + reg = amd_ntb_reg_read(4, AMD_SIDEINFO_OFFSET); + if (reg & AMD_SIDE_READY) { + reg &= ~AMD_SIDE_READY; + amd_ntb_reg_write(4, AMD_SIDEINFO_OFFSET, reg); + amd_ntb_reg_read(4, AMD_SIDEINFO_OFFSET); + } +} + +static int +amd_ntb_setup_isr(struct amd_ntb_softc *ntb, uint16_t num_vectors, bool msi, + bool intx) +{ + uint16_t i; + int flags = 0, rc = 0; + + flags |= RF_ACTIVE; + if (intx) + flags |= RF_SHAREABLE; + + for (i = 0; i < num_vectors; i++) { + + /* RID should be 0 for intx */ + if (intx) + ntb->int_info[i].rid = i; + else + ntb->int_info[i].rid = i + 1; + + ntb->int_info[i].res = bus_alloc_resource_any(ntb->device, + SYS_RES_IRQ, &ntb->int_info[i].rid, flags); + if (ntb->int_info[i].res == NULL) { + amd_ntb_printf(0, "bus_alloc_resource IRQ failed\n"); + return (ENOMEM); + } + + ntb->int_info[i].tag = NULL; + ntb->allocated_interrupts++; + + if (msi || intx) { + rc = bus_setup_intr(ntb->device, ntb->int_info[i].res, + INTR_MPSAFE | INTR_TYPE_MISC, NULL, amd_ntb_irq_isr, + ntb, &ntb->int_info[i].tag); + } else { + rc = bus_setup_intr(ntb->device, ntb->int_info[i].res, + INTR_MPSAFE | INTR_TYPE_MISC, NULL, amd_ntb_vec_isr, + &ntb->msix_vec[i], &ntb->int_info[i].tag); + } + + if (rc != 0) { + amd_ntb_printf(0, "bus_setup_intr %d failed\n", i); + return (ENXIO); + } + } + + return (0); +} + +static int +amd_ntb_create_msix_vec(struct amd_ntb_softc *ntb, uint32_t max_vectors) +{ + uint8_t i; + + ntb->msix_vec = malloc(max_vectors * sizeof(*ntb->msix_vec), M_AMD_NTB, + M_ZERO | M_WAITOK); + + for (i = 0; i < max_vectors; i++) { + ntb->msix_vec[i].num = i; + ntb->msix_vec[i].ntb = ntb; + } + + return (0); +} + +static void +amd_ntb_free_msix_vec(struct amd_ntb_softc *ntb) +{ + if (ntb->msix_vec_count) { + pci_release_msi(ntb->device); + ntb->msix_vec_count = 0; + } + + if (ntb->msix_vec != NULL) { + free(ntb->msix_vec, M_AMD_NTB); + ntb->msix_vec = NULL; + } +} + +static int +amd_ntb_init_isr(struct amd_ntb_softc *ntb) +{ + uint32_t supported_vectors, num_vectors; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 2 06:34:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1683C15C965D; Tue, 2 Jul 2019 06:34:51 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 991B57052A; Tue, 2 Jul 2019 06:34:50 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f54.google.com with SMTP id e5so34514616iok.4; Mon, 01 Jul 2019 23:34:50 -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:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=hc43m5vfc3g7H/2pClkIFNTGKTi7Hc3pq2/pVcVZee4=; b=uPRY0oSsJohtbRRTXdtpIOLElk2b+fGl3oc8otJowKAsIPX2de9to2Se1dcqrJvOOx b59RM2PdLD8zNq1I7HpouWpCjLVL5zFmC4HP7mC27pKIzB+H3VIfsDCx5wn67Y23LVR8 73Fme/ci41cgRErcM7EBpGs1lOcoxcNAkwkWwdEEAdBzfAnJ1R7K7OTskyzV19xx30/Z VMtOz4pgjjvkvgRySsVuXSC/AzK4LtsA1hhCjRsZRtXubjFhlj1V6NV0yY92dy1hI0wY jnrIBpXDzdw2dHFmBjazSiBh99ht2uhrO1tdDtGpPrzzcaiJvhzHGBsNQwaEXKkbjjpF I5Mw== X-Gm-Message-State: APjAAAVddn0DBox1YTPSvy9ntAvH2uBwtcCkE2x1HZex4Orb6KYQewpP UFmBDnhcM1daXcEJS01sBzWQCvVmTr8= X-Google-Smtp-Source: APXvYqzH7PMSu72jAb1pWYf7iRR7GdZTjClJ8qfEmRKS7Yhu60Drl4bxPGzcqDoR2FxIjS2tjaC1qQ== X-Received: by 2002:a5d:8ad0:: with SMTP id e16mr1957717iot.262.1562049283672; Mon, 01 Jul 2019 23:34:43 -0700 (PDT) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com. [209.85.166.42]) by smtp.gmail.com with ESMTPSA id c1sm10252815ioc.43.2019.07.01.23.34.42 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2019 23:34:43 -0700 (PDT) Received: by mail-io1-f42.google.com with SMTP id e5so34514467iok.4; Mon, 01 Jul 2019 23:34:42 -0700 (PDT) X-Received: by 2002:a02:710f:: with SMTP id n15mr32571502jac.119.1562049282596; Mon, 01 Jul 2019 23:34:42 -0700 (PDT) MIME-Version: 1.0 References: <201907012322.x61NMRGS078268@repo.freebsd.org> In-Reply-To: <201907012322.x61NMRGS078268@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 2 Jul 2019 08:34:32 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r349589 - in head: sbin/mount sys/sys sys/ufs/ffs To: Kirk McKusick Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 991B57052A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 06:34:51 -0000 Hi, Maybe the sense of the flag should be reversed? Ie, add a =E2=80=9Ctrusted= =E2=80=9D flag and default to untrusted. I have two reasons in mind. The first is that a new default-off option is easy to forget, and a missed security feature may be worse than a missed mount-time performance enhancement. The second is just the basic idea of preferring to avoid double negatives in flag names. Thanks, Conrad On Tue, Jul 2, 2019 at 04:21 Kirk McKusick wrote: > Author: mckusick > Date: Mon Jul 1 23:22:26 2019 > New Revision: 349589 > URL: https://svnweb.freebsd.org/changeset/base/349589 > > Log: > Add a new "untrusted" option to the mount command. Its purpose > is to notify the kernel that the file system is untrusted and it > should use more extensive checks on the file-system's metadata > before using it. This option is intended to be used when mounting > file systems from untrusted media such as USB memory sticks or other > externally-provided media. > > It will initially be used by the UFS/FFS file system, but should > likely be expanded to be used by other file systems that may appear > on external media like msdosfs, exfat, and ext2fs. > > Reviewed by: kib > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D20786 > > Modified: > head/sbin/mount/mntopts.h > head/sbin/mount/mount.8 > head/sbin/mount/mount.c > head/sys/sys/mount.h > head/sys/ufs/ffs/ffs_vfsops.c > > Modified: head/sbin/mount/mntopts.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/mount/mntopts.h Mon Jul 1 22:11:56 2019 (r349588) > +++ head/sbin/mount/mntopts.h Mon Jul 1 23:22:26 2019 (r349589) > @@ -58,6 +58,7 @@ struct mntopt { > #define MOPT_ACLS { "acls", 0, MNT_ACLS, 0 } > #define MOPT_NFS4ACLS { "nfsv4acls", 0, MNT_NFS4ACLS, 0 } > #define MOPT_AUTOMOUNTED { "automounted",0, MNT_AUTOMOUNTED, 0 } > +#define MOPT_UNTRUSTED { "untrusted", 0, MNT_UNTRUSTED, 0 } > > /* Control flags. */ > #define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } > @@ -93,7 +94,8 @@ struct mntopt { > MOPT_MULTILABEL, \ > MOPT_ACLS, \ > MOPT_NFS4ACLS, \ > - MOPT_AUTOMOUNTED > + MOPT_AUTOMOUNTED, \ > + MOPT_UNTRUSTED > > void getmntopts(const char *, const struct mntopt *, int *, int *); > void rmslashes(char *, char *); > > Modified: head/sbin/mount/mount.8 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/mount/mount.8 Mon Jul 1 22:11:56 2019 (r349588) > +++ head/sbin/mount/mount.8 Mon Jul 1 23:22:26 2019 (r349589) > @@ -355,6 +355,12 @@ Lookups will be done in the mounted file system firs= t. > If those operations fail due to a non-existent file the underlying > directory is then accessed. > All creates are done in the mounted file system. > +.It Cm untrusted > +The file system is untrusted and the kernel should use more > +extensive checks on the file-system's metadata before using it. > +This option is intended to be used when mounting file systems > +from untrusted media such as USB memory sticks or other > +externally-provided media. > .El > .Pp > Any additional options specific to a file system type that is not > > Modified: head/sbin/mount/mount.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/mount/mount.c Mon Jul 1 22:11:56 2019 (r349588) > +++ head/sbin/mount/mount.c Mon Jul 1 23:22:26 2019 (r349589) > @@ -118,6 +118,7 @@ static struct opt { > { MNT_GJOURNAL, "gjournal" }, > { MNT_AUTOMOUNTED, "automounted" }, > { MNT_VERIFIED, "verified" }, > + { MNT_UNTRUSTED, "untrusted" }, > { 0, NULL } > }; > > @@ -972,6 +973,7 @@ flags2opts(int flags) > if (flags & MNT_MULTILABEL) res =3D catopt(res, "multilabel")= ; > if (flags & MNT_ACLS) res =3D catopt(res, "acls"); > if (flags & MNT_NFS4ACLS) res =3D catopt(res, "nfsv4acls"); > + if (flags & MNT_UNTRUSTED) res =3D catopt(res, "untrusted"); > > return (res); > } > > Modified: head/sys/sys/mount.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/mount.h Mon Jul 1 22:11:56 2019 (r349588) > +++ head/sys/sys/mount.h Mon Jul 1 23:22:26 2019 (r349589) > @@ -296,6 +296,7 @@ void __mnt_vnode_markerfree_active(struct vn= o > #define MNT_NOCLUSTERW 0x0000000080000000ULL /* disable cluster > write */ > #define MNT_SUJ 0x0000000100000000ULL /* using journaled > soft updates */ > #define MNT_AUTOMOUNTED 0x0000000200000000ULL /* mounted by > automountd(8) */ > +#define MNT_UNTRUSTED 0x0000000800000000ULL /* filesys metadata > untrusted */ > > /* > * NFS export related mount flags. > @@ -333,7 +334,8 @@ void __mnt_vnode_markerfree_active(struct vn= o > MNT_NOCLUSTERW | MNT_SUIDDIR | MNT_SOFTDEP |= \ > MNT_IGNORE | MNT_EXPUBLIC | MNT_NOSYMFOLLOW > | \ > MNT_GJOURNAL | MNT_MULTILABEL | MNT_ACLS |= \ > - MNT_NFS4ACLS | MNT_AUTOMOUNTED | MNT_VERIFIED) > + MNT_NFS4ACLS | MNT_AUTOMOUNTED | MNT_VERIFIED = | > \ > + MNT_UNTRUSTED) > > /* Mask of flags that can be updated. */ > #define MNT_UPDATEMASK (MNT_NOSUID | MNT_NOEXEC | \ > @@ -342,7 +344,7 @@ void __mnt_vnode_markerfree_active(struct vn= o > MNT_NOSYMFOLLOW | MNT_IGNORE | \ > MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR |= \ > MNT_ACLS | MNT_USER | MNT_NFS4ACLS |= \ > - MNT_AUTOMOUNTED) > + MNT_AUTOMOUNTED | MNT_UNTRUSTED) > > /* > * External filesystem command modifier flags. > > Modified: head/sys/ufs/ffs/ffs_vfsops.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/sys/ufs/ffs/ffs_vfsops.c Mon Jul 1 22:11:56 2019 > (r349588) > +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Jul 1 23:22:26 2019 > (r349589) > @@ -145,7 +145,7 @@ static struct buf_ops ffs_ops =3D { > static const char *ffs_opts[] =3D { "acls", "async", "noatime", > "noclusterr", > "noclusterw", "noexec", "export", "force", "from", "groupquota", > "multilabel", "nfsv4acls", "fsckpid", "snapshot", "nosuid", "suiddir= ", > - "nosymfollow", "sync", "union", "userquota", NULL }; > + "nosymfollow", "sync", "union", "userquota", "untrusted", NULL }; > > static int > ffs_mount(struct mount *mp) > @@ -184,6 +184,9 @@ ffs_mount(struct mount *mp) > return (error); > > mntorflags =3D 0; > + if (vfs_getopt(mp->mnt_optnew, "untrusted", NULL, NULL) =3D=3D 0) > + mntorflags |=3D MNT_UNTRUSTED; > + > if (vfs_getopt(mp->mnt_optnew, "acls", NULL, NULL) =3D=3D 0) > mntorflags |=3D MNT_ACLS; > > > From owner-svn-src-all@freebsd.org Tue Jul 2 07:34:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E12F715CA69E; Tue, 2 Jul 2019 07:34:07 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6865E71E1E; Tue, 2 Jul 2019 07:34:07 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot1-x32f.google.com with SMTP id z23so16179380ote.13; Tue, 02 Jul 2019 00:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZPrmWnovr2Wf37LG1giFXFuso60nsgGCZklhXMd9OIo=; b=h0lvVMXFSKHDY9u4Q/K0VprNN8UI6m9SFs6uEJZyhiRuirouayUaRkxCKz1NSwlrgX gpnH2606TW+UzCr+mBGec67HF64xV6QjtPx2sFaqrjs/5sCKeu/fqyec1vsdVp7lIcDR nd3g83ijILVlo6wxR3MBsoVuzAc9bYrhKbLwelXpqadjzPTrCQwJ+cVUXh+8pquTlHbk T73l2rIItx3Yc9rgWpXNYEx8VtvZvJ3HguImXXR0/LLtcrA6a8uTMgfzPKSCzXMcBP/j mcnLFdR0aCUmg+07MEjdprUx8FB7F+Y2eiuY4pEPRfid3uCFj43Ht8FNMf48fIdnFMV1 dCiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZPrmWnovr2Wf37LG1giFXFuso60nsgGCZklhXMd9OIo=; b=ig+eKwm6DCfv4aR7JVPa2LnaTVi0+t5RfcBeRa1SzPPouhtvMHqv+yktSbB8yz2h3t YSD/EQVhfQnzykpvtTb2M2SiiigNqTraUXAP7NTqMjcm4H+cAVOahJIKWxufrLngNicT y4ApOsr2felcm8GLXT4jBIXBe+1b43hlrcIwVG7hoWOJ0tUgmjfpGO86eMFFbYNprwqO xVRR2D1E2w1suAgt0naJtU7a9pUqRr0WuIYvS/OJvU3uVZzyPV9RVx4pxwY/RDZHHb7p rrTi900ddqoy2vRHJurhkQaSTp8jtu4IFNom3g334Y+jS7jr7u8RNZ5pxcy++H0Vv0Pj Pr5A== X-Gm-Message-State: APjAAAXJlBrYa3Ie575vuAz4pAK1Xxz4BZ+4lShlgVHNpghtqsAb9lm4 QCosN0HV0rjSNlG4JMFEBh6UgT8B/ug/5HKyEHyAJWKy X-Google-Smtp-Source: APXvYqwRa5vWbRrd4L6uzovmVfofeu/Ki7Cg6QBUAWFEiYNv8IfKaXy1i9mzI2yIEunCOGfmowX2g9tTdJm8BYdJpHE= X-Received: by 2002:a05:6830:6:: with SMTP id c6mr23792537otp.14.1562052846454; Tue, 02 Jul 2019 00:34:06 -0700 (PDT) MIME-Version: 1.0 References: <201907012322.x61NMRGS078268@repo.freebsd.org> In-Reply-To: <201907012322.x61NMRGS078268@repo.freebsd.org> From: Benjamin Kaduk Date: Tue, 2 Jul 2019 00:33:55 -0700 Message-ID: Subject: Re: svn commit: r349589 - in head: sbin/mount sys/sys sys/ufs/ffs To: Kirk McKusick Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 6865E71E1E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.969,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 07:34:08 -0000 On Mon, Jul 1, 2019 at 8:33 PM Kirk McKusick via svn-src-all < svn-src-all@freebsd.org> wrote: > Author: mckusick > Date: Mon Jul 1 23:22:26 2019 > New Revision: 349589 > URL: https://svnweb.freebsd.org/changeset/base/349589 > > Log: > Add a new "untrusted" option to the mount command. Its purpose > is to notify the kernel that the file system is untrusted and it > should use more extensive checks on the file-system's metadata > before using it. This option is intended to be used when mounting > file systems from untrusted media such as USB memory sticks or other > externally-provided media. > > Are these additional extensive checks supposed to be computationally expensive in some regard, that we would not want to just always perform them? Thanks, Ben From owner-svn-src-all@freebsd.org Tue Jul 2 07:47:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8B9F15CB000; Tue, 2 Jul 2019 07:47:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E69872609; Tue, 2 Jul 2019 07:47:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2875821455; Tue, 2 Jul 2019 07:47:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x627lCqA034282; Tue, 2 Jul 2019 07:47:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x627lCu2034281; Tue, 2 Jul 2019 07:47:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201907020747.x627lCu2034281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jul 2019 07:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349595 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 349595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E69872609 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 07:47:12 -0000 Author: mav Date: Tue Jul 2 07:47:11 2019 New Revision: 349595 URL: https://svnweb.freebsd.org/changeset/base/349595 Log: Fix i386 LINT after r349594. MFC after: 1 month Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Tue Jul 2 05:25:18 2019 (r349594) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Tue Jul 2 07:47:11 2019 (r349595) @@ -93,6 +93,26 @@ SYSCTL_UINT(_hw_ntb, OID_AUTO, debug_level, CTLFLAG_RW device_printf(ntb->device, __VA_ARGS__); \ } while (0) +#ifdef __i386__ +static __inline uint64_t +bus_space_read_8(bus_space_tag_t tag, bus_space_handle_t handle, + bus_size_t offset) +{ + + return (bus_space_read_4(tag, handle, offset) | + ((uint64_t)bus_space_read_4(tag, handle, offset + 4)) << 32); +} + +static __inline void +bus_space_write_8(bus_space_tag_t tag, bus_space_handle_t handle, + bus_size_t offset, uint64_t val) +{ + + bus_space_write_4(tag, handle, offset, val); + bus_space_write_4(tag, handle, offset + 4, val >> 32); +} +#endif + /* * AMD NTB INTERFACE ROUTINES */ @@ -316,11 +336,6 @@ amd_ntb_mw_get_range(device_t dev, unsigned mw_idx, vm *plimit = BUS_SPACE_MAXADDR_32BIT; } - amd_ntb_printf(1, "%s: mw %d padd %p vadd %p psize 0x%lx " - "align 0x%lx asize 0x%lx alimit %p\n", __func__, mw_idx, - (void *)*base, (void *)*vbase, (uint64_t)*size, (uint64_t)*align, - (uint64_t)*align_size, (void *)*plimit); - return (0); } @@ -353,14 +368,14 @@ amd_ntb_mw_set_trans(device_t dev, unsigned mw_idx, bu * set and verify setting the translation address */ amd_ntb_peer_reg_write(8, bar_info->xlat_off, (uint64_t)addr); - amd_ntb_printf(0, "%s: mw %d xlat_off 0x%x cur_val 0x%lx addr %p\n", + amd_ntb_printf(0, "%s: mw %d xlat_off 0x%x cur_val 0x%jx addr %p\n", __func__, mw_idx, bar_info->xlat_off, amd_ntb_peer_reg_read(8, bar_info->xlat_off), (void *)addr); /* set and verify setting the limit */ if (mw_idx != 0) { amd_ntb_reg_write(8, bar_info->limit_off, (uint64_t)size); - amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%lx limit 0x%x\n", + amd_ntb_printf(1, "%s: limit_off 0x%x cur_val 0x%jx limit 0x%x\n", __func__, bar_info->limit_off, amd_ntb_peer_reg_read(8, bar_info->limit_off), (uint32_t)size); } else { @@ -470,7 +485,7 @@ amd_ntb_db_read(device_t dev) dbstat_off = (uint64_t)amd_ntb_reg_read(2, AMD_DBSTAT_OFFSET); - amd_ntb_printf(1, "%s: dbstat_off 0x%lx\n", __func__, dbstat_off); + amd_ntb_printf(1, "%s: dbstat_off 0x%jx\n", __func__, dbstat_off); return (dbstat_off); } @@ -480,7 +495,7 @@ amd_ntb_db_clear(device_t dev, uint64_t db_bits) { struct amd_ntb_softc *ntb = device_get_softc(dev); - amd_ntb_printf(1, "%s: db_bits 0x%lx\n", __func__, db_bits); + amd_ntb_printf(1, "%s: db_bits 0x%jx\n", __func__, db_bits); amd_ntb_reg_write(2, AMD_DBSTAT_OFFSET, (uint16_t)db_bits); } @@ -490,7 +505,7 @@ amd_ntb_db_set_mask(device_t dev, uint64_t db_bits) struct amd_ntb_softc *ntb = device_get_softc(dev); DB_MASK_LOCK(ntb); - amd_ntb_printf(1, "%s: db_mask 0x%x db_bits 0x%lx\n", + amd_ntb_printf(1, "%s: db_mask 0x%x db_bits 0x%jx\n", __func__, ntb->db_mask, db_bits); ntb->db_mask |= db_bits; @@ -504,7 +519,7 @@ amd_ntb_db_clear_mask(device_t dev, uint64_t db_bits) struct amd_ntb_softc *ntb = device_get_softc(dev); DB_MASK_LOCK(ntb); - amd_ntb_printf(1, "%s: db_mask 0x%x db_bits 0x%lx\n", + amd_ntb_printf(1, "%s: db_mask 0x%x db_bits 0x%jx\n", __func__, ntb->db_mask, db_bits); ntb->db_mask &= ~db_bits; @@ -517,7 +532,7 @@ amd_ntb_peer_db_set(device_t dev, uint64_t db_bits) { struct amd_ntb_softc *ntb = device_get_softc(dev); - amd_ntb_printf(1, "%s: db_bits 0x%lx\n", __func__, db_bits); + amd_ntb_printf(1, "%s: db_bits 0x%jx\n", __func__, db_bits); amd_ntb_reg_write(2, AMD_DBREQ_OFFSET, (uint16_t)db_bits); } @@ -660,17 +675,17 @@ amd_ntb_hw_info_handler(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "AMD Doorbell: 0x%x\n", amd_ntb_reg_read(4, AMD_DBSTAT_OFFSET)); sbuf_printf(sb, "AMD NTB Incoming XLAT: \n"); - sbuf_printf(sb, "AMD XLAT1: 0x%lx\n", + sbuf_printf(sb, "AMD XLAT1: 0x%jx\n", amd_ntb_peer_reg_read(8, AMD_BAR1XLAT_OFFSET)); - sbuf_printf(sb, "AMD XLAT23: 0x%lx\n", + sbuf_printf(sb, "AMD XLAT23: 0x%jx\n", amd_ntb_peer_reg_read(8, AMD_BAR23XLAT_OFFSET)); - sbuf_printf(sb, "AMD XLAT45: 0x%lx\n", + sbuf_printf(sb, "AMD XLAT45: 0x%jx\n", amd_ntb_peer_reg_read(8, AMD_BAR45XLAT_OFFSET)); sbuf_printf(sb, "AMD LMT1: 0x%x\n", amd_ntb_reg_read(4, AMD_BAR1LMT_OFFSET)); - sbuf_printf(sb, "AMD LMT23: 0x%lx\n", + sbuf_printf(sb, "AMD LMT23: 0x%jx\n", amd_ntb_reg_read(8, AMD_BAR23LMT_OFFSET)); - sbuf_printf(sb, "AMD LMT45: 0x%lx\n", + sbuf_printf(sb, "AMD LMT45: 0x%jx\n", amd_ntb_reg_read(8, AMD_BAR45LMT_OFFSET)); rc = sbuf_finish(sb); From owner-svn-src-all@freebsd.org Tue Jul 2 08:47:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 996EA15CCCB1; Tue, 2 Jul 2019 08:47:19 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F3DE74A98; Tue, 2 Jul 2019 08:47:19 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1515921EB8; Tue, 2 Jul 2019 08:47:19 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x628lILR066142; Tue, 2 Jul 2019 08:47:18 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x628lIAW066141; Tue, 2 Jul 2019 08:47:18 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201907020847.x628lIAW066141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 2 Jul 2019 08:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349596 - head/sys/dev/fdt X-SVN-Group: head X-SVN-Commit-Author: ganbold X-SVN-Commit-Paths: head/sys/dev/fdt X-SVN-Commit-Revision: 349596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3F3DE74A98 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 08:47:20 -0000 Author: ganbold Date: Tue Jul 2 08:47:18 2019 New Revision: 349596 URL: https://svnweb.freebsd.org/changeset/base/349596 Log: Extend simple_mfd driver to expose a syscon interface if that node is also compatible with syscon. For instance, Rockchip RK3399's GRF (General Register Files) is compatible with simple-mfd as well as syscon and has devices like usb2-phy, emmc-phy and pcie-phy etc. under it. Reviewed by: manu Added: head/sys/dev/fdt/simple_mfd.h (contents, props changed) Modified: head/sys/dev/fdt/simple_mfd.c Modified: head/sys/dev/fdt/simple_mfd.c ============================================================================== --- head/sys/dev/fdt/simple_mfd.c Tue Jul 2 07:47:11 2019 (r349595) +++ head/sys/dev/fdt/simple_mfd.c Tue Jul 2 08:47:18 2019 (r349596) @@ -33,7 +33,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include +#include #include @@ -42,15 +45,88 @@ __FBSDID("$FreeBSD$"); #include #include -struct simple_mfd_softc { - struct simplebus_softc sc; -}; +#include device_t simple_mfd_add_device(device_t dev, phandle_t node, u_int order, const char *name, int unit, struct simplebus_devinfo *di); struct simplebus_devinfo *simple_mfd_setup_dinfo(device_t dev, phandle_t node, struct simplebus_devinfo *di); +#include "syscon_if.h" +#include + +MALLOC_DECLARE(M_SYSCON); + +static uint32_t simple_mfd_syscon_read_4(struct syscon *syscon, bus_size_t offset); +static int simple_mfd_syscon_write_4(struct syscon *syscon, bus_size_t offset, + uint32_t val); +static int simple_mfd_syscon_modify_4(struct syscon *syscon, bus_size_t offset, + uint32_t clear_bits, uint32_t set_bits); + +#define SYSCON_LOCK(_sc) mtx_lock_spin(&(_sc)->mtx) +#define SYSCON_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->mtx) +#define SYSCON_LOCK_INIT(_sc) mtx_init(&(_sc)->mtx, \ + device_get_nameunit((_sc)->dev), "syscon", MTX_SPIN) +#define SYSCON_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->mtx); +#define SYSCON_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_OWNED); +#define SYSCON_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_NOTOWNED); + +static syscon_method_t simple_mfd_syscon_methods[] = { + SYSCONMETHOD(syscon_read_4, simple_mfd_syscon_read_4), + SYSCONMETHOD(syscon_write_4, simple_mfd_syscon_write_4), + SYSCONMETHOD(syscon_modify_4, simple_mfd_syscon_modify_4), + + SYSCONMETHOD_END +}; +DEFINE_CLASS_1(simple_mfd_syscon, simple_mfd_syscon_class, + simple_mfd_syscon_methods, 0, syscon_class); + +static uint32_t +simple_mfd_syscon_read_4(struct syscon *syscon, bus_size_t offset) +{ + struct simple_mfd_softc *sc; + uint32_t val; + + sc = device_get_softc(syscon->pdev); + + SYSCON_LOCK(sc); + val = bus_read_4(sc->mem_res, offset); + SYSCON_UNLOCK(sc); + return (val); +} + static int +simple_mfd_syscon_write_4(struct syscon *syscon, bus_size_t offset, + uint32_t val) +{ + struct simple_mfd_softc *sc; + + sc = device_get_softc(syscon->pdev); + + SYSCON_LOCK(sc); + bus_write_4(sc->mem_res, offset, val); + SYSCON_UNLOCK(sc); + return (0); +} + +static int +simple_mfd_syscon_modify_4(struct syscon *syscon, bus_size_t offset, + uint32_t clear_bits, uint32_t set_bits) +{ + struct simple_mfd_softc *sc; + uint32_t val; + + sc = device_get_softc(syscon->pdev); + + SYSCON_LOCK(sc); + val = bus_read_4(sc->mem_res, offset); + val &= ~clear_bits; + val |= set_bits; + bus_write_4(sc->mem_res, offset, val); + SYSCON_UNLOCK(sc); + return (0); +} + +static int simple_mfd_probe(device_t dev) { @@ -70,10 +146,14 @@ simple_mfd_attach(device_t dev) struct simple_mfd_softc *sc; phandle_t node, child; device_t cdev; + int rid; sc = device_get_softc(dev); node = ofw_bus_get_node(dev); + sc->dev = dev; + rid = 0; + /* Parse address-cells and size-cells from the parent node as a fallback */ if (OF_getencprop(node, "#address-cells", &sc->sc.acells, sizeof(sc->sc.acells)) == -1) { @@ -105,9 +185,48 @@ simple_mfd_attach(device_t dev) device_probe_and_attach(cdev); } + if (ofw_bus_is_compatible(dev, "syscon")) { + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->mem_res == NULL) { + device_printf(dev, + "Cannot allocate memory resource\n"); + return (ENXIO); + } + + SYSCON_LOCK_INIT(sc); + sc->syscon = syscon_create_ofw_node(dev, + &simple_mfd_syscon_class, ofw_bus_get_node(dev)); + if (sc->syscon == NULL) { + device_printf(dev, + "Failed to create/register syscon\n"); + return (ENXIO); + } + } return (bus_generic_attach(dev)); } +static int +simple_mfd_detach(device_t dev) +{ + struct simple_mfd_softc *sc; + + sc = device_get_softc(dev); + if (ofw_bus_is_compatible(dev, "syscon")) { + if (sc->syscon != NULL) { + syscon_unregister(sc->syscon); + free(sc->syscon, M_SYSCON); + } + + SYSCON_LOCK_DESTROY(sc); + + if (sc->mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, 0, + sc->mem_res); + } + return (0); +} + struct simplebus_devinfo * simple_mfd_setup_dinfo(device_t dev, phandle_t node, struct simplebus_devinfo *di) @@ -162,6 +281,7 @@ static device_method_t simple_mfd_methods[] = { /* Device interface */ DEVMETHOD(device_probe, simple_mfd_probe), DEVMETHOD(device_attach, simple_mfd_attach), + DEVMETHOD(device_detach, simple_mfd_detach), DEVMETHOD_END }; Added: head/sys/dev/fdt/simple_mfd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/simple_mfd.h Tue Jul 2 08:47:18 2019 (r349596) @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Ganbold Tsagaankhuu + * + * 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 DEV_SIMPLE_MFD_H +#define DEV_SIMPLE_MFD_H + +#include + +struct simple_mfd_softc { + struct simplebus_softc sc; + device_t dev; + struct syscon *syscon; + struct resource *mem_res; + struct mtx mtx; +}; + +DECLARE_CLASS(simple_mfd_driver); + +#endif /* DEV_SIMPLE_MFD_H */ From owner-svn-src-all@freebsd.org Tue Jul 2 08:48:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E87715CCD36; Tue, 2 Jul 2019 08:48:20 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E28874BE7; Tue, 2 Jul 2019 08:48:20 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: by mail-qt1-x830.google.com with SMTP id d23so17596779qto.2; Tue, 02 Jul 2019 01:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=03j4ISGRIC2PNl3m68h/RxrzUihtJGBIKtZf8H+NsLQ=; b=AUAa6CpcCbz2YYpC6KCYX9IltV3Avqu6vlFHng3M/JI/W7LNpBqwNz9cizy1zaLlpG NgNVpvdCCM8f2KXevpuWlJ3gW/qgEq6FPNpJ7T9l2JEpnA1+EBps00TABhYSzsOMDxns lkyGikfmTJrlxG3wRB72jFQAjwPacEmGBjuROCs5lB/Z5+dRX7XdHPgYzz7UoXK0O0yp XO5300oD++v+/ysx7lgcJuPba6Q6MUS0YRzrSQujhQcMfRuqu0pmqbI+GZed1CCUs5A4 E0kkUsNOG4UkdXFON7n0AOzhszW8XsEO62jXCDCLcvwUkozGF2DcbwUH85cHJY5ygRaM MwUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=03j4ISGRIC2PNl3m68h/RxrzUihtJGBIKtZf8H+NsLQ=; b=GmedZCUaYIFkW6EqvPXE0FwKhe3zON3IcDHbKqxgwqZENYQs+6JBeiP3Zzj2ocFw6R S0TRvcbdQas1CZMxKo2KdQYyz61SXo30eMKX1rJRIvPKLnTNYl1Y7+XgL1shbXu3zWmX HIVZd9tzrnsZOMFEzj4IqZ0IMNU0fnJAyNNfBbVgJhN5EURfsdm1+584jAtLb/ZQVRYU SDXgmbzs5BJUmEZrPQn1H0Da8KfOgUwFwz+ZELfLQ+N9LfIKkQyDuJ4cI7jbJhdX9ZiK jkDEnEzXLh8FP9q7FbwtchJXS6nzeKtcW3zG4AhTxU9HiOveaBfLzaAYe8kmC9xkACIq GJpQ== X-Gm-Message-State: APjAAAWlXHHaJiU+aKKt1r+0CUtBVPPMvmCI0Yf4E0jfN+sK9RPynEX8 153gjb1uVJ8v74LtshvN3wQD/B2A8binnMoNp2DmN7IpghY= X-Google-Smtp-Source: APXvYqz8NFSo/WKlnF+PemIKrh0UIlWonjAaSVvt+w9SiOI1kS5Aqrs18YfTRrfas9oywQJZF7CiqlpKLZhX8mpeApQ= X-Received: by 2002:ac8:c0e:: with SMTP id k14mr23874756qti.72.1562057299543; Tue, 02 Jul 2019 01:48:19 -0700 (PDT) MIME-Version: 1.0 References: <201907020847.x628lIAW066141@repo.freebsd.org> In-Reply-To: <201907020847.x628lIAW066141@repo.freebsd.org> From: Ganbold Tsagaankhuu Date: Tue, 2 Jul 2019 16:48:08 +0800 Message-ID: Subject: Re: svn commit: r349596 - head/sys/dev/fdt To: Ganbold Tsagaankhuu Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 2E28874BE7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 08:48:20 -0000 On Tue, Jul 2, 2019 at 4:47 PM Ganbold Tsagaankhuu wrote: > Author: ganbold > Date: Tue Jul 2 08:47:18 2019 > New Revision: 349596 > URL: https://svnweb.freebsd.org/changeset/base/349596 > > Log: > Extend simple_mfd driver to expose a syscon interface if > that node is also compatible with syscon. For instance, > Rockchip RK3399's GRF (General Register Files) is compatible > with simple-mfd as well as syscon and has devices like > usb2-phy, emmc-phy and pcie-phy etc. under it. > Forgot to include: https://reviews.freebsd.org/D20647 thanks, Ganbold > > Reviewed by: manu > > Added: > head/sys/dev/fdt/simple_mfd.h (contents, props changed) > Modified: > head/sys/dev/fdt/simple_mfd.c > > Modified: head/sys/dev/fdt/simple_mfd.c > > ============================================================================== > --- head/sys/dev/fdt/simple_mfd.c Tue Jul 2 07:47:11 2019 > (r349595) > +++ head/sys/dev/fdt/simple_mfd.c Tue Jul 2 08:47:18 2019 > (r349596) > @@ -33,7 +33,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > +#include > +#include > > #include > > @@ -42,15 +45,88 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -struct simple_mfd_softc { > - struct simplebus_softc sc; > -}; > +#include > > device_t simple_mfd_add_device(device_t dev, phandle_t node, u_int order, > const char *name, int unit, struct simplebus_devinfo *di); > struct simplebus_devinfo *simple_mfd_setup_dinfo(device_t dev, phandle_t > node, struct simplebus_devinfo *di); > > +#include "syscon_if.h" > +#include > + > +MALLOC_DECLARE(M_SYSCON); > + > +static uint32_t simple_mfd_syscon_read_4(struct syscon *syscon, > bus_size_t offset); > +static int simple_mfd_syscon_write_4(struct syscon *syscon, bus_size_t > offset, > + uint32_t val); > +static int simple_mfd_syscon_modify_4(struct syscon *syscon, bus_size_t > offset, > + uint32_t clear_bits, uint32_t set_bits); > + > +#define SYSCON_LOCK(_sc) mtx_lock_spin(&(_sc)->mtx) > +#define SYSCON_UNLOCK(_sc) > mtx_unlock_spin(&(_sc)->mtx) > +#define SYSCON_LOCK_INIT(_sc) mtx_init(&(_sc)->mtx, \ > + device_get_nameunit((_sc)->dev), "syscon", MTX_SPIN) > +#define SYSCON_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->mtx); > +#define SYSCON_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->mtx, > MA_OWNED); > +#define SYSCON_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->mtx, > MA_NOTOWNED); > + > +static syscon_method_t simple_mfd_syscon_methods[] = { > + SYSCONMETHOD(syscon_read_4, simple_mfd_syscon_read_4), > + SYSCONMETHOD(syscon_write_4, simple_mfd_syscon_write_4), > + SYSCONMETHOD(syscon_modify_4, simple_mfd_syscon_modify_4), > + > + SYSCONMETHOD_END > +}; > +DEFINE_CLASS_1(simple_mfd_syscon, simple_mfd_syscon_class, > + simple_mfd_syscon_methods, 0, syscon_class); > + > +static uint32_t > +simple_mfd_syscon_read_4(struct syscon *syscon, bus_size_t offset) > +{ > + struct simple_mfd_softc *sc; > + uint32_t val; > + > + sc = device_get_softc(syscon->pdev); > + > + SYSCON_LOCK(sc); > + val = bus_read_4(sc->mem_res, offset); > + SYSCON_UNLOCK(sc); > + return (val); > +} > + > static int > +simple_mfd_syscon_write_4(struct syscon *syscon, bus_size_t offset, > + uint32_t val) > +{ > + struct simple_mfd_softc *sc; > + > + sc = device_get_softc(syscon->pdev); > + > + SYSCON_LOCK(sc); > + bus_write_4(sc->mem_res, offset, val); > + SYSCON_UNLOCK(sc); > + return (0); > +} > + > +static int > +simple_mfd_syscon_modify_4(struct syscon *syscon, bus_size_t offset, > + uint32_t clear_bits, uint32_t set_bits) > +{ > + struct simple_mfd_softc *sc; > + uint32_t val; > + > + sc = device_get_softc(syscon->pdev); > + > + SYSCON_LOCK(sc); > + val = bus_read_4(sc->mem_res, offset); > + val &= ~clear_bits; > + val |= set_bits; > + bus_write_4(sc->mem_res, offset, val); > + SYSCON_UNLOCK(sc); > + return (0); > +} > + > +static int > simple_mfd_probe(device_t dev) > { > > @@ -70,10 +146,14 @@ simple_mfd_attach(device_t dev) > struct simple_mfd_softc *sc; > phandle_t node, child; > device_t cdev; > + int rid; > > sc = device_get_softc(dev); > node = ofw_bus_get_node(dev); > > + sc->dev = dev; > + rid = 0; > + > /* Parse address-cells and size-cells from the parent node as a > fallback */ > if (OF_getencprop(node, "#address-cells", &sc->sc.acells, > sizeof(sc->sc.acells)) == -1) { > @@ -105,9 +185,48 @@ simple_mfd_attach(device_t dev) > device_probe_and_attach(cdev); > } > > + if (ofw_bus_is_compatible(dev, "syscon")) { > + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, > &rid, > + RF_ACTIVE); > + if (sc->mem_res == NULL) { > + device_printf(dev, > + "Cannot allocate memory resource\n"); > + return (ENXIO); > + } > + > + SYSCON_LOCK_INIT(sc); > + sc->syscon = syscon_create_ofw_node(dev, > + &simple_mfd_syscon_class, ofw_bus_get_node(dev)); > + if (sc->syscon == NULL) { > + device_printf(dev, > + "Failed to create/register syscon\n"); > + return (ENXIO); > + } > + } > return (bus_generic_attach(dev)); > } > > +static int > +simple_mfd_detach(device_t dev) > +{ > + struct simple_mfd_softc *sc; > + > + sc = device_get_softc(dev); > + if (ofw_bus_is_compatible(dev, "syscon")) { > + if (sc->syscon != NULL) { > + syscon_unregister(sc->syscon); > + free(sc->syscon, M_SYSCON); > + } > + > + SYSCON_LOCK_DESTROY(sc); > + > + if (sc->mem_res != NULL) > + bus_release_resource(dev, SYS_RES_MEMORY, 0, > + sc->mem_res); > + } > + return (0); > +} > + > struct simplebus_devinfo * > simple_mfd_setup_dinfo(device_t dev, phandle_t node, > struct simplebus_devinfo *di) > @@ -162,6 +281,7 @@ static device_method_t simple_mfd_methods[] = { > /* Device interface */ > DEVMETHOD(device_probe, simple_mfd_probe), > DEVMETHOD(device_attach, simple_mfd_attach), > + DEVMETHOD(device_detach, simple_mfd_detach), > > DEVMETHOD_END > }; > > Added: head/sys/dev/fdt/simple_mfd.h > > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/fdt/simple_mfd.h Tue Jul 2 08:47:18 2019 > (r349596) > @@ -0,0 +1,44 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2019 Ganbold Tsagaankhuu > + * > + * 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 DEV_SIMPLE_MFD_H > +#define DEV_SIMPLE_MFD_H > + > +#include > + > +struct simple_mfd_softc { > + struct simplebus_softc sc; > + device_t dev; > + struct syscon *syscon; > + struct resource *mem_res; > + struct mtx mtx; > +}; > + > +DECLARE_CLASS(simple_mfd_driver); > + > +#endif /* DEV_SIMPLE_MFD_H */ > > From owner-svn-src-all@freebsd.org Tue Jul 2 11:06:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0DE615CF7AF; Tue, 2 Jul 2019 11:06:25 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CC9880AC6; Tue, 2 Jul 2019 11:06:25 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5805D260389; Tue, 2 Jul 2019 13:06:17 +0200 (CEST) Subject: Re: svn commit: r349596 - head/sys/dev/fdt To: Ganbold Tsagaankhuu , Ganbold Tsagaankhuu Cc: src-committers , svn-src-all , svn-src-head References: <201907020847.x628lIAW066141@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Tue, 2 Jul 2019 13:05:40 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 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-Rspamd-Queue-Id: 8CC9880AC6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.956,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 11:06:26 -0000 On 2019-07-02 10:48, Ganbold Tsagaankhuu wrote: > On Tue, Jul 2, 2019 at 4:47 PM Ganbold Tsagaankhuu > wrote: > >> Author: ganbold >> Date: Tue Jul 2 08:47:18 2019 >> New Revision: 349596 >> URL: https://svnweb.freebsd.org/changeset/base/349596 >> >> Log: >> Extend simple_mfd driver to expose a syscon interface if >> that node is also compatible with syscon. For instance, >> Rockchip RK3399's GRF (General Register Files) is compatible >> with simple-mfd as well as syscon and has devices like >> usb2-phy, emmc-phy and pcie-phy etc. under it. >> > > Forgot to include: > > https://reviews.freebsd.org/D20647 > 08:55:21 /usr/src/sys/dev/fdt/simple_mfd.c:54:23: error: syscon_if.h: No such file or directory See: https://ci.freebsd.org/tinderbox/ --HPS From owner-svn-src-all@freebsd.org Tue Jul 2 12:22:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAAEB15D2133; Tue, 2 Jul 2019 12:22:32 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7422883A69; Tue, 2 Jul 2019 12:22:32 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A980224349; Tue, 2 Jul 2019 12:22:28 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62CMSxx080461; Tue, 2 Jul 2019 12:22:28 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62CMRtv080453; Tue, 2 Jul 2019 12:22:27 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201907021222.x62CMRtv080453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 2 Jul 2019 12:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349597 - stable/12/contrib/tzdata X-SVN-Group: stable-12 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/12/contrib/tzdata X-SVN-Commit-Revision: 349597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7422883A69 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 12:22:33 -0000 Author: philip Date: Tue Jul 2 12:22:27 2019 New Revision: 349597 URL: https://svnweb.freebsd.org/changeset/base/349597 Log: MFC r349592: Import tzdata 2019b Modified: stable/12/contrib/tzdata/Makefile stable/12/contrib/tzdata/NEWS stable/12/contrib/tzdata/africa stable/12/contrib/tzdata/antarctica stable/12/contrib/tzdata/asia stable/12/contrib/tzdata/australasia stable/12/contrib/tzdata/backzone stable/12/contrib/tzdata/checktab.awk stable/12/contrib/tzdata/europe stable/12/contrib/tzdata/factory stable/12/contrib/tzdata/northamerica stable/12/contrib/tzdata/pacificnew stable/12/contrib/tzdata/southamerica stable/12/contrib/tzdata/systemv stable/12/contrib/tzdata/theory.html stable/12/contrib/tzdata/version stable/12/contrib/tzdata/zishrink.awk stable/12/contrib/tzdata/zone.tab stable/12/contrib/tzdata/zone1970.tab stable/12/contrib/tzdata/zoneinfo2tdf.pl Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/tzdata/Makefile ============================================================================== --- stable/12/contrib/tzdata/Makefile Tue Jul 2 08:47:18 2019 (r349596) +++ stable/12/contrib/tzdata/Makefile Tue Jul 2 12:22:27 2019 (r349597) @@ -35,11 +35,13 @@ DATAFORM= main LOCALTIME= GMT -# If you want something other than Eastern United States time as a template -# for handling ruleless POSIX-style timezone environment variables, +# The POSIXRULES macro controls interpretation of nonstandard and obsolete +# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules. +# In the reference implementation, if you want something other than Eastern +# United States time as a template for handling these settings, you can # change the line below (after finding the timezone you want in the # one of the $(TDATA) source files, or adding it to a source file). -# A ruleless environment setting like TZ='CST6CDT' uses the rules in the +# A setting like TZ='EET-2EEST' is supposed to use the rules in the # template file to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. @@ -49,6 +51,17 @@ LOCALTIME= GMT # Use the command # make zonenames # to get a list of the values you can use for POSIXRULES. +# +# If POSIXRULES is empty, no template is installed; this is the intended +# future default for POSIXRULES. +# +# Nonempty POSIXRULES is obsolete and should not be relied on, because: +# * It does not work correctly in popular implementations such as GNU/Linux. +# * It does not work in the tzdb implementation for timestamps after 2037. +# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions +# at standard time or UT rather than at local time. +# In short, software should avoid ruleless settings like TZ='EET-2EEST' +# and so should not depend on the value of POSIXRULES. POSIXRULES= America/New_York @@ -231,6 +244,13 @@ LDLIBS= # other than simply getting garbage data # -DUSE_LTZ=0 to build zdump with the system time zone library # Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below. +# -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and +# similarly for "fat". Fat TZif files work around incompatibilities +# and bugs in some TZif readers, notably readers that mishandle 64-bit +# data in TZif files. Slim TZif files are more efficient and do not +# work around these incompatibilities and bugs. If not given, the +# current default is "fat" but this is intended to change as readers +# requiring fat files often mishandle timestamps after 2037 anyway. # -DZIC_MAX_ABBR_LEN_WO_WARN=3 # (or some other number) to set the maximum time zone abbreviation length # that zic will accept without a warning (the default is 6) @@ -364,7 +384,9 @@ ZIC= $(zic) $(ZFLAGS) # To shrink the size of installed TZif files, # append "-r @N" to omit data before N-seconds-after-the-Epoch. -# See the zic man page for more about -r. +# You can also append "-b slim" if that is not already the default; +# see ZIC_BLOAT_DEFAULT above. +# See the zic man page for more about -b and -r. ZFLAGS= # How to use zic to install TZif files. @@ -388,6 +410,9 @@ KSHELL= /bin/bash # Name of curl , used for HTML validation. CURL= curl +# Name of GNU Privacy Guard , used to sign distributions. +GPG= gpg + # The path where SGML DTDs are kept and the catalog file(s) to use when # validating HTML 4.01. The default should work on both Debian and Red Hat. SGML_TOPDIR= /usr @@ -562,7 +587,9 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(LIBDIR)' \ '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' - $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \ + $(ZIC_INSTALL) -l $(LOCALTIME) \ + `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ + ` $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -781,12 +808,6 @@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c - $(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \ - LC_ALL=C sort -c - $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ - LC_ALL=C sort -cu touch $@ check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi @@ -1051,7 +1072,7 @@ tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz $(ALL_ASC): - gpg2 --armor --detach-sign $? + $(GPG) --armor --detach-sign $? TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T typecheck: typecheck_long_long typecheck_unsigned Modified: stable/12/contrib/tzdata/NEWS ============================================================================== --- stable/12/contrib/tzdata/NEWS Tue Jul 2 08:47:18 2019 (r349596) +++ stable/12/contrib/tzdata/NEWS Tue Jul 2 12:22:27 2019 (r349597) @@ -1,8 +1,102 @@ News for the tz database -Release 20198 - 2019-03-25 22:01:33 -0700 +Release 2019b - 2019-07-01 00:09:53 -0700 Briefly: + Brazil no longer observes DST. + 'zic -b slim' outputs smaller TZif files; please try it out. + Palestine's 2019 spring-forward transition was on 03-29, not 03-30. + + Changes to future timestamps + + Brazil has canceled DST and will stay on standard time indefinitely. + (Thanks to Steffen Thorsen, Marcus Diniz, and Daniel Soares de + Oliveira.) + + Predictions for Morocco now go through 2087 instead of 2037, to + work around a problem on newlib when using TZif files output by + zic 2019a or earlier. (Problem reported by David Gauchard.) + + Changes to past and future timestamps + + Palestine's 2019 spring transition was 03-29 at 00:00, not 03-30 + at 01:00. (Thanks to Sharef Mustafa and Even Scharning.) Guess + future transitions to be March's last Friday at 00:00. + + Changes to past timestamps + + Hong Kong's 1941-06-15 spring-forward transition was at 03:00, not + 03:30. Its 1945 transition from JST to HKT was on 11-18 at 02:00, + not 09-15 at 00:00. In 1946 its spring-forward transition was on + 04-21 at 00:00, not the previous day at 03:30. From 1946 through + 1952 its fall-back transitions occurred at 04:30, not at 03:30. + In 1947 its fall-back transition was on 11-30, not 12-30. + (Thanks to P Chan.) + + Changes to past time zone abbreviations + + Italy's 1866 transition to Rome Mean Time was on December 12, not + September 22. This affects only the time zone abbreviation for + Europe/Rome between those dates. (Thanks to Stephen Trainor and + Luigi Rosa.) + + Changes affecting metadata only + + Add info about the Crimea situation in zone1970.tab and zone.tab. + (Problem reported by Serhii Demediuk.) + + Changes to code + + zic's new -b option supports a way to control data bloat and to + test for year-2038 bugs in software that reads TZif files. + 'zic -b fat' and 'zic -b slim' generate larger and smaller output; + for example, changing from fat to slim shrinks the Europe/London + file from 3648 to 1599 bytes, saving about 56%. Fat and slim + files represent the same set of timestamps and use the same TZif + format as documented in tzfile(5) and in Internet RFC 8536. + Fat format attempts to work around bugs or incompatibilities in + older software, notably software that mishandles 64-bit TZif data + or uses obsolete TZ strings like "EET-2EEST" that lack DST rules. + Slim format is more efficient and does not work around 64-bit bugs + or obsolete TZ strings. Currently zic defaults to fat format + unless you compile with -DZIC_BLOAT_DEFAULT=\"slim\"; this + out-of-the-box default is intended to change in future releases + as the buggy software often mishandles timestamps anyway. + + zic no longer treats a set of rules ending in 2037 specially. + Previously, zic assumed that such a ruleset meant that future + timestamps could not be predicted, and therefore omitted a + POSIX-like TZ string in the TZif output. The old behavior is no + longer needed for current tzdata, and caused problems with newlib + when used with older tzdata (reported by David Gauchard). + + zic no longer generates some artifact transitions. For example, + Europe/London no longer has a no-op transition in January 1996. + + Changes to build procedure + + tzdata.zi now assumes zic 2017c or later. This shrinks tzdata.zi + by a percent or so. + + Changes to documentation and commentary + + The Makefile now documents the POSIXRULES macro as being obsolete, + and similarly, zic's -p POSIXRULES option is now documented as + being obsolete. Although the POSIXRULES feature still exists and + works as before, in practice it is rarely used for its intended + purpose, and it does not work either in the default reference + implementation (for timestamps after 2037) or in common + implementations such as GNU/Linux (for contemporary timestamps). + Since POSIXRULES was designed primarily as a temporary transition + facility for System V platforms that died off decades ago, it is + being decommissioned rather than institutionalized. + + New info on Bonin Islands and Marcus (thanks to Wakaba and Phake Nick). + + +Release 2019a - 2019-03-25 22:01:33 -0700 + + Briefly: Palestine "springs forward" on 2019-03-30 instead of 2019-03-23. Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00. @@ -481,7 +575,7 @@ Release 2018d - 2018-03-22 07:05:46 -0700 The code is a bit more portable to MS-Windows. Installers can compile with -DRESERVE_STD_EXT_IDS on MS-Windows platforms that reserve identifiers like 'localtime'. (Thanks to Manuela - Friedrich). + Friedrich.) Changes to documentation and commentary @@ -2276,7 +2370,7 @@ Release 2014f - 2014-08-05 17:42:36 -0700 warlord Jin Shuren in the data. Commentary about the coverage of each Russian zone has been standardized. - (Thanks to Tim Parenti). + (Thanks to Tim Parenti.) There is new commentary about contemporary timekeeping in Ethiopia. @@ -2724,7 +2818,7 @@ Release 2013e - 2013-09-19 23:50:04 -0700 Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46. This affects Europe/Zurich timestamps from 1853 to 1894. (Thanks - to Alois Treindl). + to Alois Treindl.) Change the date of the circa-1850 Zurich transition from 1849-09-12 to 1853-07-16, overriding Shanks with data from Messerli about @@ -3034,7 +3128,7 @@ Release 2013a - 2013-02-27 09:20:35 -0800 (Thanks to Arthur David Olson.) Improve the commentary about which districts observe what times - in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson). + in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson.) Add web page links to tz.js. Modified: stable/12/contrib/tzdata/africa ============================================================================== --- stable/12/contrib/tzdata/africa Tue Jul 2 08:47:18 2019 (r349596) +++ stable/12/contrib/tzdata/africa Tue Jul 2 12:22:27 2019 (r349597) @@ -89,7 +89,7 @@ Rule Algeria 1980 only - Apr 25 0:00 1:00 S Rule Algeria 1980 only - Oct 31 2:00 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 0:00 Algeria WE%sT 1940 Feb 25 2:00 @@ -124,7 +124,7 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 # For now, ignore that and follow the 1911-05-26 Portuguese decree # (see Europe/Lisbon). # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia -2:00 - -02 1942 Sep -2:00 1:00 -01 1945 Oct 15 @@ -135,7 +135,7 @@ Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2 # See Africa/Lagos. # Chad -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena 1:00 - WAT 1979 Oct 14 1:00 1:00 WAST 1980 Mar 8 @@ -151,7 +151,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Dja # See Africa/Lagos. # Côte d'Ivoire / Ivory Coast -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Abidjan -0:16:08 - LMT 1912 0:00 - GMT Link Africa/Abidjan Africa/Bamako # Mali @@ -356,7 +356,7 @@ Rule Egypt 2014 only - Jun 26 24:00 0 - Rule Egypt 2014 only - Jul 31 24:00 1:00 S Rule Egypt 2014 only - Sep lastThu 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct 2:00 Egypt EE%sT @@ -414,7 +414,7 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Ghana 1920 1942 - Sep 1 0:00 0:20 - Rule Ghana 1920 1942 - Dec 31 0:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 0:00 Ghana GMT/+0020 @@ -428,13 +428,13 @@ Zone Africa/Accra -0:00:52 - LMT 1918 # evidently confusing the date of the Portuguese decree # (see Europe/Lisbon) with the date that it took effect. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u -1:00 - -01 1975 0:00 - GMT # Kenya -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 2:30 - +0230 1940 @@ -469,7 +469,7 @@ Link Africa/Nairobi Indian/Mayotte # Use the abbreviation "MMT" before 1972, as the more-accurate numeric # abbreviation "-004430" would be one byte over the POSIX limit. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time -0:44:30 - MMT 1972 Jan 7 # approximately MMT @@ -519,7 +519,7 @@ Rule Libya 1997 only - Apr 4 0:00 1:00 S Rule Libya 1997 only - Oct 4 0:00 0 - Rule Libya 2013 only - Mar lastFri 1:00 1:00 S Rule Libya 2013 only - Oct lastFri 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tripoli 0:52:44 - LMT 1920 1:00 Libya CE%sT 1959 2:00 - EET 1982 @@ -629,7 +629,7 @@ Rule Mauritius 1982 only - Oct 10 0:00 1:00 - Rule Mauritius 1983 only - Mar 21 0:00 0 - Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 - Rule Mauritius 2009 only - Mar lastSun 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez @@ -860,18 +860,24 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # the week end after.... The government does not announce yet the decision # about this temporary change. But it s 99% sure that it will be the case, # as in previous years. An unofficial survey was done these days, showing -# that 64% of asked peopke are ok for moving from +1 to +0 during Ramadan. +# that 64% of asked people are ok for moving from +1 to +0 during Ramadan. # https://leconomiste.com/article/1035870-enquete-l-economiste-sunergia-64-des-marocains-plebiscitent-le-gmt-pendant-ramadan + +# From Naoufal Semlali (2019-04-16): +# Morocco will be on GMT starting from Sunday, May 5th 2019 at 3am. +# The switch to GMT+1 will occur on Sunday, June 9th 2019 at 2am.... +# http://fr.le360.ma/societe/voici-la-date-du-retour-a-lheure-legale-au-maroc-188222 # -# From Paul Eggert (2018-11-01): -# For now, guess that Morocco will fall back at 03:00 the last Sunday -# before Ramadan, and spring forward at 02:00 the first Sunday after +# From Paul Eggert (2019-05-20): +# This agrees with our 2018-11-01 guess that the Moroccan government +# would continue the practice of falling back at 03:00 the last Sunday +# before Ramadan, and of springing forward at 02:00 the first Sunday after # Ramadan, as this has been the practice since 2012. To implement this, -# transition dates for 2019 through 2037 were determined by running the -# following program under GNU Emacs 26.1. +# transition dates for 2019 through 2087 were determined by running the +# following program under GNU Emacs 26.2. # (let ((islamic-year 1440)) # (require 'cal-islam) -# (while (< islamic-year 1460) +# (while (< islamic-year 1511) # (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) # (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) # (sunday 0)) @@ -970,8 +976,114 @@ Rule Morocco 2036 only - Oct 19 3:00 -1:00 - Rule Morocco 2036 only - Nov 23 2:00 0 - Rule Morocco 2037 only - Oct 4 3:00 -1:00 - Rule Morocco 2037 only - Nov 15 2:00 0 - +Rule Morocco 2038 only - Sep 26 3:00 -1:00 - +Rule Morocco 2038 only - Oct 31 2:00 0 - +Rule Morocco 2039 only - Sep 18 3:00 -1:00 - +Rule Morocco 2039 only - Oct 23 2:00 0 - +Rule Morocco 2040 only - Sep 2 3:00 -1:00 - +Rule Morocco 2040 only - Oct 14 2:00 0 - +Rule Morocco 2041 only - Aug 25 3:00 -1:00 - +Rule Morocco 2041 only - Sep 29 2:00 0 - +Rule Morocco 2042 only - Aug 10 3:00 -1:00 - +Rule Morocco 2042 only - Sep 21 2:00 0 - +Rule Morocco 2043 only - Aug 2 3:00 -1:00 - +Rule Morocco 2043 only - Sep 6 2:00 0 - +Rule Morocco 2044 only - Jul 24 3:00 -1:00 - +Rule Morocco 2044 only - Aug 28 2:00 0 - +Rule Morocco 2045 only - Jul 9 3:00 -1:00 - +Rule Morocco 2045 only - Aug 20 2:00 0 - +Rule Morocco 2046 only - Jul 1 3:00 -1:00 - +Rule Morocco 2046 only - Aug 5 2:00 0 - +Rule Morocco 2047 only - Jun 23 3:00 -1:00 - +Rule Morocco 2047 only - Jul 28 2:00 0 - +Rule Morocco 2048 only - Jun 7 3:00 -1:00 - +Rule Morocco 2048 only - Jul 19 2:00 0 - +Rule Morocco 2049 only - May 30 3:00 -1:00 - +Rule Morocco 2049 only - Jul 4 2:00 0 - +Rule Morocco 2050 only - May 15 3:00 -1:00 - +Rule Morocco 2050 only - Jun 26 2:00 0 - +Rule Morocco 2051 only - May 7 3:00 -1:00 - +Rule Morocco 2051 only - Jun 11 2:00 0 - +Rule Morocco 2052 only - Apr 28 3:00 -1:00 - +Rule Morocco 2052 only - Jun 2 2:00 0 - +Rule Morocco 2053 only - Apr 13 3:00 -1:00 - +Rule Morocco 2053 only - May 25 2:00 0 - +Rule Morocco 2054 only - Apr 5 3:00 -1:00 - +Rule Morocco 2054 only - May 10 2:00 0 - +Rule Morocco 2055 only - Mar 28 3:00 -1:00 - +Rule Morocco 2055 only - May 2 2:00 0 - +Rule Morocco 2056 only - Mar 12 3:00 -1:00 - +Rule Morocco 2056 only - Apr 23 2:00 0 - +Rule Morocco 2057 only - Mar 4 3:00 -1:00 - +Rule Morocco 2057 only - Apr 8 2:00 0 - +Rule Morocco 2058 only - Feb 17 3:00 -1:00 - +Rule Morocco 2058 only - Mar 31 2:00 0 - +Rule Morocco 2059 only - Feb 9 3:00 -1:00 - +Rule Morocco 2059 only - Mar 16 2:00 0 - +Rule Morocco 2060 only - Feb 1 3:00 -1:00 - +Rule Morocco 2060 only - Mar 7 2:00 0 - +Rule Morocco 2061 only - Jan 16 3:00 -1:00 - +Rule Morocco 2061 only - Feb 27 2:00 0 - +Rule Morocco 2062 only - Jan 8 3:00 -1:00 - +Rule Morocco 2062 only - Feb 12 2:00 0 - +Rule Morocco 2062 only - Dec 31 3:00 -1:00 - +Rule Morocco 2063 only - Feb 4 2:00 0 - +Rule Morocco 2063 only - Dec 16 3:00 -1:00 - +Rule Morocco 2064 only - Jan 20 2:00 0 - +Rule Morocco 2064 only - Dec 7 3:00 -1:00 - +Rule Morocco 2065 only - Jan 11 2:00 0 - +Rule Morocco 2065 only - Nov 22 3:00 -1:00 - +Rule Morocco 2066 only - Jan 3 2:00 0 - +Rule Morocco 2066 only - Nov 14 3:00 -1:00 - +Rule Morocco 2066 only - Dec 19 2:00 0 - +Rule Morocco 2067 only - Nov 6 3:00 -1:00 - +Rule Morocco 2067 only - Dec 11 2:00 0 - +Rule Morocco 2068 only - Oct 21 3:00 -1:00 - +Rule Morocco 2068 only - Dec 2 2:00 0 - +Rule Morocco 2069 only - Oct 13 3:00 -1:00 - +Rule Morocco 2069 only - Nov 17 2:00 0 - +Rule Morocco 2070 only - Oct 5 3:00 -1:00 - +Rule Morocco 2070 only - Nov 9 2:00 0 - +Rule Morocco 2071 only - Sep 20 3:00 -1:00 - +Rule Morocco 2071 only - Oct 25 2:00 0 - +Rule Morocco 2072 only - Sep 11 3:00 -1:00 - +Rule Morocco 2072 only - Oct 16 2:00 0 - +Rule Morocco 2073 only - Aug 27 3:00 -1:00 - +Rule Morocco 2073 only - Oct 8 2:00 0 - +Rule Morocco 2074 only - Aug 19 3:00 -1:00 - +Rule Morocco 2074 only - Sep 23 2:00 0 - +Rule Morocco 2075 only - Aug 11 3:00 -1:00 - +Rule Morocco 2075 only - Sep 15 2:00 0 - +Rule Morocco 2076 only - Jul 26 3:00 -1:00 - +Rule Morocco 2076 only - Sep 6 2:00 0 - +Rule Morocco 2077 only - Jul 18 3:00 -1:00 - +Rule Morocco 2077 only - Aug 22 2:00 0 - +Rule Morocco 2078 only - Jul 10 3:00 -1:00 - +Rule Morocco 2078 only - Aug 14 2:00 0 - +Rule Morocco 2079 only - Jun 25 3:00 -1:00 - +Rule Morocco 2079 only - Jul 30 2:00 0 - +Rule Morocco 2080 only - Jun 16 3:00 -1:00 - +Rule Morocco 2080 only - Jul 21 2:00 0 - +Rule Morocco 2081 only - Jun 1 3:00 -1:00 - +Rule Morocco 2081 only - Jul 13 2:00 0 - +Rule Morocco 2082 only - May 24 3:00 -1:00 - +Rule Morocco 2082 only - Jun 28 2:00 0 - +Rule Morocco 2083 only - May 16 3:00 -1:00 - +Rule Morocco 2083 only - Jun 20 2:00 0 - +Rule Morocco 2084 only - Apr 30 3:00 -1:00 - +Rule Morocco 2084 only - Jun 11 2:00 0 - +Rule Morocco 2085 only - Apr 22 3:00 -1:00 - +Rule Morocco 2085 only - May 27 2:00 0 - +Rule Morocco 2086 only - Apr 14 3:00 -1:00 - +Rule Morocco 2086 only - May 19 2:00 0 - +Rule Morocco 2087 only - Mar 30 3:00 -1:00 - +Rule Morocco 2087 only - May 4 2:00 0 - +# For dates after the somewhat-arbitrary cutoff of 2087, assume that +# Morocco will no longer observe DST. At some point this table will +# need to be extended, though quite possibly Morocco will change the +# rules first. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 0:00 Morocco +00/+01 1984 Mar 16 1:00 - +01 1986 @@ -1001,7 +1113,7 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aai # https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Maputo 2:10:20 - LMT 1903 Mar 2:00 - CAT Link Africa/Maputo Africa/Blantyre # Malawi @@ -1073,7 +1185,7 @@ Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 WAT #Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 WAT # End of rearguard section. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 @@ -1094,7 +1206,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 # See Africa/Lagos. # Nigeria -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Lagos 0:13:36 - LMT 1919 Sep 1:00 - WAT Link Africa/Lagos Africa/Bangui # Central African Republic @@ -1108,7 +1220,7 @@ Link Africa/Lagos Africa/Niamey # Niger Link Africa/Lagos Africa/Porto-Novo # Benin # Réunion -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis 4:00 - +04 # @@ -1168,7 +1280,7 @@ Zone Africa/Sao_Tome 0:26:56 - LMT 1884 # See Africa/Abidjan. # Seychelles -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria 4:00 - +04 # From Paul Eggert (2001-05-30): @@ -1188,7 +1300,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 - Rule SA 1943 1944 - Mar Sun>=15 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 1:30 - SAST 1903 Mar 2:00 SA SAST @@ -1223,14 +1335,14 @@ Rule Sudan 1970 only - May 1 0:00 1:00 S Rule Sudan 1970 1985 - Oct 15 0:00 0 - Rule Sudan 1971 only - Apr 30 0:00 1:00 S Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Khartoum 2:10:08 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT 2017 Nov 1 2:00 - CAT # South Sudan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Juba 2:06:28 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT @@ -1336,7 +1448,7 @@ Rule Tunisia 2006 2008 - Oct lastSun 2:00s 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. # Shanks & Pottenger say the 1911 switch was on Mar 9; go with Howse's Mar 11. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tunis 0:40:44 - LMT 1881 May 12 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 1:00 Tunisia CE%sT Modified: stable/12/contrib/tzdata/antarctica ============================================================================== --- stable/12/contrib/tzdata/antarctica Tue Jul 2 08:47:18 2019 (r349596) +++ stable/12/contrib/tzdata/antarctica Tue Jul 2 12:22:27 2019 (r349597) @@ -13,7 +13,7 @@ # for information. # Unless otherwise specified, we have no time zone information. -# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited. +# FORMAT is '-00' and STDOFF is 0 for locations while uninhabited. # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -70,7 +70,7 @@ # Australian Antarctica Division informed us that Casey changed time # zone to UTC+11 in "the morning of 22nd October 2016". -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Casey 0 - -00 1969 8:00 - +08 2009 Oct 18 2:00 11:00 - +11 2010 Mar 5 2:00 @@ -142,7 +142,7 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13 # St Paul Island - near Amsterdam, uninhabited # fishing stations operated variously 1819/1931 # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français 5:00 - +05 # @@ -153,7 +153,7 @@ Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Françai # Another base at Port-Martin, 50km east, began operation in 1947. # It was destroyed by fire on 1952-01-14. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/DumontDUrville 0 - -00 1947 10:00 - +10 1952 Jan 14 0 - -00 1956 Nov @@ -181,7 +181,7 @@ Zone Antarctica/DumontDUrville 0 - -00 1947 # Syowa station, which is the first antarctic station of Japan, # was established on 1957-01-29. Since Syowa station is still the main # station of Japan, it's appropriate for the principal location. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Syowa 0 - -00 1957 Jan 29 3:00 - +03 # See: @@ -231,7 +231,7 @@ Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02 #Rule Troll 2004 max - Nov 7 1:00u 0:00 +00 # Remove the following line when uncommenting the above '#Rule' lines. Rule Troll 2004 max - Oct lastSun 1:00u 0:00 +00 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Troll 0 - -00 2005 Feb 12 0:00 Troll %s @@ -305,7 +305,7 @@ Zone Antarctica/Vostok 0 - -00 1957 Dec 16 # From Paul Eggert (2002-10-22) # says Rothera is -03 all year. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Rothera 0 - -00 1976 Dec 1 -3:00 - -03 Modified: stable/12/contrib/tzdata/asia ============================================================================== --- stable/12/contrib/tzdata/asia Tue Jul 2 08:47:18 2019 (r349596) +++ stable/12/contrib/tzdata/asia Tue Jul 2 12:22:27 2019 (r349597) @@ -84,7 +84,7 @@ Rule RussiaAsia 1985 2010 - Mar lastSun 2:00s 1:00 - Rule RussiaAsia 1996 2010 - Oct lastSun 2:00s 0 - # Afghanistan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 4:00 - +04 1945 4:30 - +0430 @@ -117,7 +117,7 @@ Zone Asia/Kabul 4:36:48 - LMT 1890 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Armenia 2011 only - Mar lastSun 2:00s 1:00 - Rule Armenia 2011 only - Oct lastSun 2:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -143,7 +143,7 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 - Rule Azer 1997 2015 - Oct lastSun 5:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baku 3:19:24 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -231,7 +231,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 Rule Dhaka 2009 only - Jun 19 23:00 1:00 - Rule Dhaka 2009 only - Dec 31 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? 6:30 - +0630 1942 May 15 @@ -241,7 +241,7 @@ Zone Asia/Dhaka 6:01:40 - LMT 1890 6:00 Dhaka +06/+07 # Bhutan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu 5:30 - +0530 1987 Oct 6:00 - +06 @@ -252,13 +252,13 @@ Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimb # We have no information as to when standard time was introduced; # assume it occurred in 1907, the same year as Mauritius (which # then contained the Chagos Archipelago). -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Chagos 4:49:40 - LMT 1907 5:00 - +05 1996 6:00 - +06 # Brunei -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan 7:30 - +0730 1933 8:00 - +08 @@ -273,7 +273,7 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri # of Greenwich." This refers to the period before Burma's transition to +0630, # a transition for which Shanks is the only source. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoon 6:24:47 - RMT 1920 # Rangoon local time 6:30 - +0630 1942 May @@ -561,7 +561,7 @@ Rule PRC 1987 1991 - Apr Sun>=11 2:00 1:00 D # that the sort of users who prefer Asia/Urumqi now typically ignored the # +08 mandate back then. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Beijing time, used throughout China; represented by Shanghai. Zone Asia/Shanghai 8:05:43 - LMT 1901 8:00 Shang C%sT 1949 May 28 @@ -652,11 +652,41 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # https://i.imgur.com/05KkvtC.png # * 1941-09-30, Hong Kong Daily Press, Winter Time Warning. # https://i.imgur.com/dge4kFJ.png -# Also, the Liberation day of Hong Kong after WWII which British rule -# over the territory resumed was August 30, 1945, which I think should -# be the termination date for the use of JST in the territory.... -# From Paul Eggert (2018-11-17): +# From P Chan (2018-12-31): +# * According to the Hong Kong Daylight-Saving Regulations, 1941, the +# 1941 spring-forward transition was at 03:00. +# http://sunzi.lib.hku.hk/hkgro/view/g1941/304271.pdf +# http://sunzi.lib.hku.hk/hkgro/view/g1941/305516.pdf +# * According to some articles from South China Morning Post, +08 was +# resumed on 1945-11-18 at 02:00. +# https://i.imgur.com/M2IsZ3c.png +# https://i.imgur.com/iOPqrVo.png +# https://i.imgur.com/fffcGDs.png +# * Some newspapers ... said the 1946 spring-forward transition was on +# 04-21 at 00:00. The Kung Sheung Evening News 1946-04-20 (Chinese) +# https://i.imgur.com/ZSzent0.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2FH7zGe%2FKF%2BFLYsuqGhRBfe p.4 +# The Kung Sheung Daily News 1946-04-21 (Chinese) +# https://i.imgur.com/7ecmRlcm.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2BQBGt1%2BwUj5qG2GqtwR3Wh p.4 +# * According to the Summer Time Ordinance (1946), the fallback +# transitions between 1946 and 1952 were at 03:30 Standard Time (+08) +# http://oelawhk.lib.hku.hk/archive/files/bb74b06a74d5294620a15de560ab33c6.pdf +# * Some other laws and regulations related to DST from 1953 to 1979 +# Summer Time Ordinance 1953 +# https://i.imgur.com/IOlJMav.jpg +# Summer Time (Amendment) Ordinance 1965 +# https://i.imgur.com/8rofeLa.jpg +# Interpretation and General Clauses Ordinance (1966) +# https://i.imgur.com/joy3msj.jpg +# Emergency (Summer Time) Regulation 1973 +# Interpretation and General Clauses (Amendment) Ordinance 1977 +# https://i.imgur.com/RaNqnc4.jpg +# Resolution of the Legislative Council passed on 9 May 1979 +# https://www.legco.gov.hk/yr78-79/english/lc_sitg/hansard/h790509.pdf#page=39 + +# From Paul Eggert (2019-05-31): # Here are the dates given at # https://www.hko.gov.hk/gts/time/Summertime.htm # as of 2014-06-19: @@ -667,7 +697,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # 1944 Whole year # 1945 Whole year # 1946 20 Apr to 1 Dec -# 1947 13 Apr to 30 Dec +# 1947 13 Apr to 30 Nov # 1948 2 May to 31 Oct # 1949 3 Apr to 30 Oct # 1950 2 Apr to 29 Oct @@ -704,36 +734,28 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # The page does not give times of day for transitions, # or dates for the 1942 and 1945 transitions. # The Japanese occupation of Hong Kong began 1941-12-25. -# The Japanese surrender of Hong Kong was signed 1945-09-16; see: -# Heaver S. The days after the Pacific war ended: unsettling times -# in Hong Kong. Post Magazine. 2016-06-13. -# https://www.scmp.com/magazines/post-magazine/article/1852990/days-after-pacific-war-ended-unsettling-times-hong-kong -# For lack of anything better, use start of those days as the -# transition times. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule HK 1946 only - Apr 20 3:30 1:00 S -Rule HK 1946 only - Dec 1 3:30 0 - -Rule HK 1947 only - Apr 13 3:30 1:00 S -Rule HK 1947 only - Dec 30 3:30 0 - -Rule HK 1948 only - May 2 3:30 1:00 S -Rule HK 1948 1951 - Oct lastSun 3:30 0 - -Rule HK 1952 1953 - Nov Sun>=1 3:30 0 - +Rule HK 1946 only - Apr 21 0:00 1:00 S +Rule HK 1946 only - Dec 1 3:30s 0 - +Rule HK 1947 only - Apr 13 3:30s 1:00 S +Rule HK 1947 only - Nov 30 3:30s 0 - +Rule HK 1948 only - May 2 3:30s 1:00 S +Rule HK 1948 1952 - Oct Sun>=28 3:30s 0 - Rule HK 1949 1953 - Apr Sun>=1 3:30 1:00 S +Rule HK 1953 1964 - Oct Sun>=31 3:30 0 - Rule HK 1954 1964 - Mar Sun>=18 3:30 1:00 S -Rule HK 1954 only - Oct 31 3:30 0 - -Rule HK 1955 1964 - Nov Sun>=1 3:30 0 - Rule HK 1965 1976 - Apr Sun>=16 3:30 1:00 S Rule HK 1965 1976 - Oct Sun>=16 3:30 0 - Rule HK 1973 only - Dec 30 3:30 1:00 S -Rule HK 1979 only - May Sun>=8 3:30 1:00 S -Rule HK 1979 only - Oct Sun>=16 3:30 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Rule HK 1979 only - May 13 3:30 1:00 S +Rule HK 1979 only - Oct 21 3:30 0 - +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42 - 8:00 - HKT 1941 Jun 15 3:30 + 8:00 - HKT 1941 Jun 15 3:00 8:00 1:00 HKST 1941 Oct 1 4:00 8:30 - HKT 1941 Dec 25 - 9:00 - JST 1945 Sep 16 + 9:00 - JST 1945 Nov 18 2:00 8:00 HK HK%sT ############################################################################### @@ -857,7 +879,7 @@ Rule Taiwan 1974 1975 - Oct 1 0:00 0 S Rule Taiwan 1979 only - Jul 1 0:00 1:00 D Rule Taiwan 1979 only - Oct 1 0:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Taipei or Taibei or T'ai-pei Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 8:00 - CST 1937 Oct 1 @@ -995,7 +1017,7 @@ Rule Macau 1975 1976 - Apr Sun>=16 03:30 1:00 D Rule Macau 1979 only - May 13 03:30 1:00 D Rule Macau 1979 only - Oct Sun>=16 03:30 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Macau 7:34:10 - LMT 1904 Oct 30 8:00 - CST 1941 Dec 21 23:00 9:00 Macau +09/+10 1945 Sep 30 24:00 @@ -1034,7 +1056,7 @@ Rule Cyprus 1977 only - Sep 25 0:00 0 - Rule Cyprus 1978 only - Oct 2 0:00 0 - Rule Cyprus 1979 1997 - Sep lastSun 0:00 0 - Rule Cyprus 1981 1998 - Mar lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14 2:00 Cyprus EE%sT 1998 Sep 2:00 EUAsia EE%sT @@ -1083,7 +1105,7 @@ Link Asia/Nicosia Europe/Nicosia # Byalokoz 1919 says Georgia was 2:59:11. # Go with Byalokoz. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tbilisi 2:59:11 - LMT 1880 2:59:11 - TBMT 1924 May 2 # Tbilisi Mean Time 3:00 - +03 1957 Mar @@ -1120,7 +1142,7 @@ Zone Asia/Tbilisi 2:59:11 - LMT 1880 # which will be permanent, with no seasonal adjustment, will happen at # midnight on Saturday, September 16. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 8:00 - +08 1942 Feb 21 23:00 9:00 - +09 1976 May 3 @@ -1186,7 +1208,7 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 # time for 1870-1941. Shanks is our only (and dubious) source for the # 1941-1945 data. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata 5:53:20 - HMT 1870 # Howrah Mean Time? 5:21:10 - MMT 1906 Jan 1 # Madras local time @@ -1238,7 +1260,7 @@ Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata # WITA - +08 - Waktu Indonesia Tengah (Indonesia central time) # WIT - +09 - Waktu Indonesia Timur (Indonesia eastern time) # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Java, Sumatra Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, @@ -1314,9 +1336,9 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # I used the following code in GNU Emacs 26.1 to generate the "Rule Iran" # lines from 2008 through 2087. Emacs 26.1 uses Ed Reingold's # cal-persia implementation of Birashk's approximation, which in the -# 2008-2087 range disagrees with the the astronomical Persian calendar -# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), -# so the following code special-case those years. See Table 15.1, page 264, of: +# 2008-2087 range disagrees with the astronomical Persian calendar +# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), so +# the following code special-cases those years. See Table 15.1, page 264, of: # Edward M. Reingold and Nachum Dershowitz, Calendrical Calculations: # The Ultimate Edition, Cambridge University Press (2018). # https://www.cambridge.org/fr/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition @@ -1510,7 +1532,7 @@ Rule Iran 2087 only - Sep 21 24:00 0 - Rule Iran 2088 max - Mar 20 24:00 1:00 - Rule Iran 2088 max - Sep 20 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time 3:30 - +0330 1977 Nov @@ -1555,7 +1577,7 @@ Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 - # Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 - Rule Iraq 1991 2007 - Oct 1 3:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? 3:00 - +03 1982 May @@ -1622,7 +1644,7 @@ Rule Zion 1975 only - Apr 20 0:00 1:00 D Rule Zion 1975 only - Aug 31 0:00 0 S # From Alois Treindl (2019-03-06): -# http://www.moin.gov.il/Documents/שעון קיץ/clock-50-years-7-2014.pdf +# http://www.moin.gov.il/Documents/שעון%20קיץ/clock-50-years-7-2014.pdf # From Isaac Starkman (2019-03-06): # Summer time was in that period in 1980 and 1984, see # https://www.ynet.co.il/articles/0,7340,L-3951073,00.html @@ -1760,32 +1782,15 @@ Rule Zion 2004 only - Sep 22 1:00 0 S # # ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps -# From Paul Eggert (2012-10-26): -# I used Ephraim Silverberg's dst-israel.el program -# (2005-02-20) -# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4, -# to generate the transitions from 2005 through 2012. -# (I replaced "lastFri" with "Fri>=26" by hand.) -# The spring transitions all correspond to the following Rule: -# -# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D -# -# but older zic implementations (e.g., Solaris 8) do not support -# "Fri>=26" to mean April 1 in years like 2005, so for now we list the -# springtime transitions explicitly. - # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Zion 2005 only - Apr 1 2:00 1:00 D +Rule Zion 2005 2012 - Apr Fri<=1 2:00 1:00 D Rule Zion 2005 only - Oct 9 2:00 0 S -Rule Zion 2006 2010 - Mar Fri>=26 2:00 1:00 D Rule Zion 2006 only - Oct 1 2:00 0 S Rule Zion 2007 only - Sep 16 2:00 0 S Rule Zion 2008 only - Oct 5 2:00 0 S Rule Zion 2009 only - Sep 27 2:00 0 S Rule Zion 2010 only - Sep 12 2:00 0 S -Rule Zion 2011 only - Apr 1 2:00 1:00 D Rule Zion 2011 only - Oct 2 2:00 0 S -Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D Rule Zion 2012 only - Sep 23 2:00 0 S # From Ephraim Silverberg (2013-06-27): @@ -1801,7 +1806,7 @@ Rule Zion 2012 only - Sep 23 2:00 0 S Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D Rule Zion 2013 max - Oct lastSun 2:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Jerusalem 2:20:54 - LMT 1880 2:20:40 - JMT 1918 # Jerusalem Mean Time? 2:00 Zion I%sT @@ -1893,7 +1898,7 @@ Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D # Central Time (UT+9). The adoption began on Oct 1, 1937. # https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u 9:00 Japan J%sT # Since 1938, all Japanese possessions have been like Asia/Tokyo, @@ -1996,7 +2001,7 @@ Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - Rule Jordan 2013 only - Dec 20 0:00 0 - Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S Rule Jordan 2014 max - Oct lastFri 0:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 2:00 Jordan EE%sT @@ -2037,8 +2042,8 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # text. # # According to Izvestia newspaper No. 68 (23334) from 1991-03-20 -# (page 6; available at http://libinfo.org/newsr/newsr2574.djvu via -# http://libinfo.org/index.php?id=58564) on 1991-03-31 at 2:00 during +# -- page 6; available at http://libinfo.org/newsr/newsr2574.djvu via +# http://libinfo.org/index.php?id=58564 -- on 1991-03-31 at 2:00 during # transition to "summer" time: # Republic of Georgia, Latvian SSR, Lithuanian SSR, SSR Moldova, # Estonian SSR; Komi ASSR; Kaliningrad oblast; Nenets autonomous okrug @@ -2054,7 +2059,7 @@ Zone Asia/Amman 2:23:44 - LMT 1931 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 2 12:22:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7DF315D2213; Tue, 2 Jul 2019 12:22:55 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78BD383BBC; Tue, 2 Jul 2019 12:22:55 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51B6224354; Tue, 2 Jul 2019 12:22:55 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62CMtGo080529; Tue, 2 Jul 2019 12:22:55 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62CMswV080524; Tue, 2 Jul 2019 12:22:54 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201907021222.x62CMswV080524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 2 Jul 2019 12:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349598 - stable/11/contrib/tzdata X-SVN-Group: stable-11 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/11/contrib/tzdata X-SVN-Commit-Revision: 349598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 78BD383BBC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 12:22:56 -0000 Author: philip Date: Tue Jul 2 12:22:54 2019 New Revision: 349598 URL: https://svnweb.freebsd.org/changeset/base/349598 Log: MFC r349592: Import tzdata 2019b Modified: stable/11/contrib/tzdata/Makefile stable/11/contrib/tzdata/NEWS stable/11/contrib/tzdata/africa stable/11/contrib/tzdata/antarctica stable/11/contrib/tzdata/asia stable/11/contrib/tzdata/australasia stable/11/contrib/tzdata/backzone stable/11/contrib/tzdata/checktab.awk stable/11/contrib/tzdata/europe stable/11/contrib/tzdata/factory stable/11/contrib/tzdata/northamerica stable/11/contrib/tzdata/pacificnew stable/11/contrib/tzdata/southamerica stable/11/contrib/tzdata/systemv stable/11/contrib/tzdata/theory.html stable/11/contrib/tzdata/version stable/11/contrib/tzdata/zishrink.awk stable/11/contrib/tzdata/zone.tab stable/11/contrib/tzdata/zone1970.tab stable/11/contrib/tzdata/zoneinfo2tdf.pl Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/tzdata/Makefile ============================================================================== --- stable/11/contrib/tzdata/Makefile Tue Jul 2 12:22:27 2019 (r349597) +++ stable/11/contrib/tzdata/Makefile Tue Jul 2 12:22:54 2019 (r349598) @@ -35,11 +35,13 @@ DATAFORM= main LOCALTIME= GMT -# If you want something other than Eastern United States time as a template -# for handling ruleless POSIX-style timezone environment variables, +# The POSIXRULES macro controls interpretation of nonstandard and obsolete +# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules. +# In the reference implementation, if you want something other than Eastern +# United States time as a template for handling these settings, you can # change the line below (after finding the timezone you want in the # one of the $(TDATA) source files, or adding it to a source file). -# A ruleless environment setting like TZ='CST6CDT' uses the rules in the +# A setting like TZ='EET-2EEST' is supposed to use the rules in the # template file to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. @@ -49,6 +51,17 @@ LOCALTIME= GMT # Use the command # make zonenames # to get a list of the values you can use for POSIXRULES. +# +# If POSIXRULES is empty, no template is installed; this is the intended +# future default for POSIXRULES. +# +# Nonempty POSIXRULES is obsolete and should not be relied on, because: +# * It does not work correctly in popular implementations such as GNU/Linux. +# * It does not work in the tzdb implementation for timestamps after 2037. +# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions +# at standard time or UT rather than at local time. +# In short, software should avoid ruleless settings like TZ='EET-2EEST' +# and so should not depend on the value of POSIXRULES. POSIXRULES= America/New_York @@ -231,6 +244,13 @@ LDLIBS= # other than simply getting garbage data # -DUSE_LTZ=0 to build zdump with the system time zone library # Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below. +# -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and +# similarly for "fat". Fat TZif files work around incompatibilities +# and bugs in some TZif readers, notably readers that mishandle 64-bit +# data in TZif files. Slim TZif files are more efficient and do not +# work around these incompatibilities and bugs. If not given, the +# current default is "fat" but this is intended to change as readers +# requiring fat files often mishandle timestamps after 2037 anyway. # -DZIC_MAX_ABBR_LEN_WO_WARN=3 # (or some other number) to set the maximum time zone abbreviation length # that zic will accept without a warning (the default is 6) @@ -364,7 +384,9 @@ ZIC= $(zic) $(ZFLAGS) # To shrink the size of installed TZif files, # append "-r @N" to omit data before N-seconds-after-the-Epoch. -# See the zic man page for more about -r. +# You can also append "-b slim" if that is not already the default; +# see ZIC_BLOAT_DEFAULT above. +# See the zic man page for more about -b and -r. ZFLAGS= # How to use zic to install TZif files. @@ -388,6 +410,9 @@ KSHELL= /bin/bash # Name of curl , used for HTML validation. CURL= curl +# Name of GNU Privacy Guard , used to sign distributions. +GPG= gpg + # The path where SGML DTDs are kept and the catalog file(s) to use when # validating HTML 4.01. The default should work on both Debian and Red Hat. SGML_TOPDIR= /usr @@ -562,7 +587,9 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(LIBDIR)' \ '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' - $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \ + $(ZIC_INSTALL) -l $(LOCALTIME) \ + `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ + ` $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -781,12 +808,6 @@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c - $(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \ - LC_ALL=C sort -c - $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ - LC_ALL=C sort -cu touch $@ check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi @@ -1051,7 +1072,7 @@ tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz $(ALL_ASC): - gpg2 --armor --detach-sign $? + $(GPG) --armor --detach-sign $? TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T typecheck: typecheck_long_long typecheck_unsigned Modified: stable/11/contrib/tzdata/NEWS ============================================================================== --- stable/11/contrib/tzdata/NEWS Tue Jul 2 12:22:27 2019 (r349597) +++ stable/11/contrib/tzdata/NEWS Tue Jul 2 12:22:54 2019 (r349598) @@ -1,8 +1,102 @@ News for the tz database -Release 20198 - 2019-03-25 22:01:33 -0700 +Release 2019b - 2019-07-01 00:09:53 -0700 Briefly: + Brazil no longer observes DST. + 'zic -b slim' outputs smaller TZif files; please try it out. + Palestine's 2019 spring-forward transition was on 03-29, not 03-30. + + Changes to future timestamps + + Brazil has canceled DST and will stay on standard time indefinitely. + (Thanks to Steffen Thorsen, Marcus Diniz, and Daniel Soares de + Oliveira.) + + Predictions for Morocco now go through 2087 instead of 2037, to + work around a problem on newlib when using TZif files output by + zic 2019a or earlier. (Problem reported by David Gauchard.) + + Changes to past and future timestamps + + Palestine's 2019 spring transition was 03-29 at 00:00, not 03-30 + at 01:00. (Thanks to Sharef Mustafa and Even Scharning.) Guess + future transitions to be March's last Friday at 00:00. + + Changes to past timestamps + + Hong Kong's 1941-06-15 spring-forward transition was at 03:00, not + 03:30. Its 1945 transition from JST to HKT was on 11-18 at 02:00, + not 09-15 at 00:00. In 1946 its spring-forward transition was on + 04-21 at 00:00, not the previous day at 03:30. From 1946 through + 1952 its fall-back transitions occurred at 04:30, not at 03:30. + In 1947 its fall-back transition was on 11-30, not 12-30. + (Thanks to P Chan.) + + Changes to past time zone abbreviations + + Italy's 1866 transition to Rome Mean Time was on December 12, not + September 22. This affects only the time zone abbreviation for + Europe/Rome between those dates. (Thanks to Stephen Trainor and + Luigi Rosa.) + + Changes affecting metadata only + + Add info about the Crimea situation in zone1970.tab and zone.tab. + (Problem reported by Serhii Demediuk.) + + Changes to code + + zic's new -b option supports a way to control data bloat and to + test for year-2038 bugs in software that reads TZif files. + 'zic -b fat' and 'zic -b slim' generate larger and smaller output; + for example, changing from fat to slim shrinks the Europe/London + file from 3648 to 1599 bytes, saving about 56%. Fat and slim + files represent the same set of timestamps and use the same TZif + format as documented in tzfile(5) and in Internet RFC 8536. + Fat format attempts to work around bugs or incompatibilities in + older software, notably software that mishandles 64-bit TZif data + or uses obsolete TZ strings like "EET-2EEST" that lack DST rules. + Slim format is more efficient and does not work around 64-bit bugs + or obsolete TZ strings. Currently zic defaults to fat format + unless you compile with -DZIC_BLOAT_DEFAULT=\"slim\"; this + out-of-the-box default is intended to change in future releases + as the buggy software often mishandles timestamps anyway. + + zic no longer treats a set of rules ending in 2037 specially. + Previously, zic assumed that such a ruleset meant that future + timestamps could not be predicted, and therefore omitted a + POSIX-like TZ string in the TZif output. The old behavior is no + longer needed for current tzdata, and caused problems with newlib + when used with older tzdata (reported by David Gauchard). + + zic no longer generates some artifact transitions. For example, + Europe/London no longer has a no-op transition in January 1996. + + Changes to build procedure + + tzdata.zi now assumes zic 2017c or later. This shrinks tzdata.zi + by a percent or so. + + Changes to documentation and commentary + + The Makefile now documents the POSIXRULES macro as being obsolete, + and similarly, zic's -p POSIXRULES option is now documented as + being obsolete. Although the POSIXRULES feature still exists and + works as before, in practice it is rarely used for its intended + purpose, and it does not work either in the default reference + implementation (for timestamps after 2037) or in common + implementations such as GNU/Linux (for contemporary timestamps). + Since POSIXRULES was designed primarily as a temporary transition + facility for System V platforms that died off decades ago, it is + being decommissioned rather than institutionalized. + + New info on Bonin Islands and Marcus (thanks to Wakaba and Phake Nick). + + +Release 2019a - 2019-03-25 22:01:33 -0700 + + Briefly: Palestine "springs forward" on 2019-03-30 instead of 2019-03-23. Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00. @@ -481,7 +575,7 @@ Release 2018d - 2018-03-22 07:05:46 -0700 The code is a bit more portable to MS-Windows. Installers can compile with -DRESERVE_STD_EXT_IDS on MS-Windows platforms that reserve identifiers like 'localtime'. (Thanks to Manuela - Friedrich). + Friedrich.) Changes to documentation and commentary @@ -2276,7 +2370,7 @@ Release 2014f - 2014-08-05 17:42:36 -0700 warlord Jin Shuren in the data. Commentary about the coverage of each Russian zone has been standardized. - (Thanks to Tim Parenti). + (Thanks to Tim Parenti.) There is new commentary about contemporary timekeeping in Ethiopia. @@ -2724,7 +2818,7 @@ Release 2013e - 2013-09-19 23:50:04 -0700 Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46. This affects Europe/Zurich timestamps from 1853 to 1894. (Thanks - to Alois Treindl). + to Alois Treindl.) Change the date of the circa-1850 Zurich transition from 1849-09-12 to 1853-07-16, overriding Shanks with data from Messerli about @@ -3034,7 +3128,7 @@ Release 2013a - 2013-02-27 09:20:35 -0800 (Thanks to Arthur David Olson.) Improve the commentary about which districts observe what times - in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson). + in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson.) Add web page links to tz.js. Modified: stable/11/contrib/tzdata/africa ============================================================================== --- stable/11/contrib/tzdata/africa Tue Jul 2 12:22:27 2019 (r349597) +++ stable/11/contrib/tzdata/africa Tue Jul 2 12:22:54 2019 (r349598) @@ -89,7 +89,7 @@ Rule Algeria 1980 only - Apr 25 0:00 1:00 S Rule Algeria 1980 only - Oct 31 2:00 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 0:00 Algeria WE%sT 1940 Feb 25 2:00 @@ -124,7 +124,7 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 # For now, ignore that and follow the 1911-05-26 Portuguese decree # (see Europe/Lisbon). # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia -2:00 - -02 1942 Sep -2:00 1:00 -01 1945 Oct 15 @@ -135,7 +135,7 @@ Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2 # See Africa/Lagos. # Chad -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena 1:00 - WAT 1979 Oct 14 1:00 1:00 WAST 1980 Mar 8 @@ -151,7 +151,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Dja # See Africa/Lagos. # Côte d'Ivoire / Ivory Coast -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Abidjan -0:16:08 - LMT 1912 0:00 - GMT Link Africa/Abidjan Africa/Bamako # Mali @@ -356,7 +356,7 @@ Rule Egypt 2014 only - Jun 26 24:00 0 - Rule Egypt 2014 only - Jul 31 24:00 1:00 S Rule Egypt 2014 only - Sep lastThu 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct 2:00 Egypt EE%sT @@ -414,7 +414,7 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Ghana 1920 1942 - Sep 1 0:00 0:20 - Rule Ghana 1920 1942 - Dec 31 0:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 0:00 Ghana GMT/+0020 @@ -428,13 +428,13 @@ Zone Africa/Accra -0:00:52 - LMT 1918 # evidently confusing the date of the Portuguese decree # (see Europe/Lisbon) with the date that it took effect. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u -1:00 - -01 1975 0:00 - GMT # Kenya -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 2:30 - +0230 1940 @@ -469,7 +469,7 @@ Link Africa/Nairobi Indian/Mayotte # Use the abbreviation "MMT" before 1972, as the more-accurate numeric # abbreviation "-004430" would be one byte over the POSIX limit. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time -0:44:30 - MMT 1972 Jan 7 # approximately MMT @@ -519,7 +519,7 @@ Rule Libya 1997 only - Apr 4 0:00 1:00 S Rule Libya 1997 only - Oct 4 0:00 0 - Rule Libya 2013 only - Mar lastFri 1:00 1:00 S Rule Libya 2013 only - Oct lastFri 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tripoli 0:52:44 - LMT 1920 1:00 Libya CE%sT 1959 2:00 - EET 1982 @@ -629,7 +629,7 @@ Rule Mauritius 1982 only - Oct 10 0:00 1:00 - Rule Mauritius 1983 only - Mar 21 0:00 0 - Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 - Rule Mauritius 2009 only - Mar lastSun 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez @@ -860,18 +860,24 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # the week end after.... The government does not announce yet the decision # about this temporary change. But it s 99% sure that it will be the case, # as in previous years. An unofficial survey was done these days, showing -# that 64% of asked peopke are ok for moving from +1 to +0 during Ramadan. +# that 64% of asked people are ok for moving from +1 to +0 during Ramadan. # https://leconomiste.com/article/1035870-enquete-l-economiste-sunergia-64-des-marocains-plebiscitent-le-gmt-pendant-ramadan + +# From Naoufal Semlali (2019-04-16): +# Morocco will be on GMT starting from Sunday, May 5th 2019 at 3am. +# The switch to GMT+1 will occur on Sunday, June 9th 2019 at 2am.... +# http://fr.le360.ma/societe/voici-la-date-du-retour-a-lheure-legale-au-maroc-188222 # -# From Paul Eggert (2018-11-01): -# For now, guess that Morocco will fall back at 03:00 the last Sunday -# before Ramadan, and spring forward at 02:00 the first Sunday after +# From Paul Eggert (2019-05-20): +# This agrees with our 2018-11-01 guess that the Moroccan government +# would continue the practice of falling back at 03:00 the last Sunday +# before Ramadan, and of springing forward at 02:00 the first Sunday after # Ramadan, as this has been the practice since 2012. To implement this, -# transition dates for 2019 through 2037 were determined by running the -# following program under GNU Emacs 26.1. +# transition dates for 2019 through 2087 were determined by running the +# following program under GNU Emacs 26.2. # (let ((islamic-year 1440)) # (require 'cal-islam) -# (while (< islamic-year 1460) +# (while (< islamic-year 1511) # (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) # (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) # (sunday 0)) @@ -970,8 +976,114 @@ Rule Morocco 2036 only - Oct 19 3:00 -1:00 - Rule Morocco 2036 only - Nov 23 2:00 0 - Rule Morocco 2037 only - Oct 4 3:00 -1:00 - Rule Morocco 2037 only - Nov 15 2:00 0 - +Rule Morocco 2038 only - Sep 26 3:00 -1:00 - +Rule Morocco 2038 only - Oct 31 2:00 0 - +Rule Morocco 2039 only - Sep 18 3:00 -1:00 - +Rule Morocco 2039 only - Oct 23 2:00 0 - +Rule Morocco 2040 only - Sep 2 3:00 -1:00 - +Rule Morocco 2040 only - Oct 14 2:00 0 - +Rule Morocco 2041 only - Aug 25 3:00 -1:00 - +Rule Morocco 2041 only - Sep 29 2:00 0 - +Rule Morocco 2042 only - Aug 10 3:00 -1:00 - +Rule Morocco 2042 only - Sep 21 2:00 0 - +Rule Morocco 2043 only - Aug 2 3:00 -1:00 - +Rule Morocco 2043 only - Sep 6 2:00 0 - +Rule Morocco 2044 only - Jul 24 3:00 -1:00 - +Rule Morocco 2044 only - Aug 28 2:00 0 - +Rule Morocco 2045 only - Jul 9 3:00 -1:00 - +Rule Morocco 2045 only - Aug 20 2:00 0 - +Rule Morocco 2046 only - Jul 1 3:00 -1:00 - +Rule Morocco 2046 only - Aug 5 2:00 0 - +Rule Morocco 2047 only - Jun 23 3:00 -1:00 - +Rule Morocco 2047 only - Jul 28 2:00 0 - +Rule Morocco 2048 only - Jun 7 3:00 -1:00 - +Rule Morocco 2048 only - Jul 19 2:00 0 - +Rule Morocco 2049 only - May 30 3:00 -1:00 - +Rule Morocco 2049 only - Jul 4 2:00 0 - +Rule Morocco 2050 only - May 15 3:00 -1:00 - +Rule Morocco 2050 only - Jun 26 2:00 0 - +Rule Morocco 2051 only - May 7 3:00 -1:00 - +Rule Morocco 2051 only - Jun 11 2:00 0 - +Rule Morocco 2052 only - Apr 28 3:00 -1:00 - +Rule Morocco 2052 only - Jun 2 2:00 0 - +Rule Morocco 2053 only - Apr 13 3:00 -1:00 - +Rule Morocco 2053 only - May 25 2:00 0 - +Rule Morocco 2054 only - Apr 5 3:00 -1:00 - +Rule Morocco 2054 only - May 10 2:00 0 - +Rule Morocco 2055 only - Mar 28 3:00 -1:00 - +Rule Morocco 2055 only - May 2 2:00 0 - +Rule Morocco 2056 only - Mar 12 3:00 -1:00 - +Rule Morocco 2056 only - Apr 23 2:00 0 - +Rule Morocco 2057 only - Mar 4 3:00 -1:00 - +Rule Morocco 2057 only - Apr 8 2:00 0 - +Rule Morocco 2058 only - Feb 17 3:00 -1:00 - +Rule Morocco 2058 only - Mar 31 2:00 0 - +Rule Morocco 2059 only - Feb 9 3:00 -1:00 - +Rule Morocco 2059 only - Mar 16 2:00 0 - +Rule Morocco 2060 only - Feb 1 3:00 -1:00 - +Rule Morocco 2060 only - Mar 7 2:00 0 - +Rule Morocco 2061 only - Jan 16 3:00 -1:00 - +Rule Morocco 2061 only - Feb 27 2:00 0 - +Rule Morocco 2062 only - Jan 8 3:00 -1:00 - +Rule Morocco 2062 only - Feb 12 2:00 0 - +Rule Morocco 2062 only - Dec 31 3:00 -1:00 - +Rule Morocco 2063 only - Feb 4 2:00 0 - +Rule Morocco 2063 only - Dec 16 3:00 -1:00 - +Rule Morocco 2064 only - Jan 20 2:00 0 - +Rule Morocco 2064 only - Dec 7 3:00 -1:00 - +Rule Morocco 2065 only - Jan 11 2:00 0 - +Rule Morocco 2065 only - Nov 22 3:00 -1:00 - +Rule Morocco 2066 only - Jan 3 2:00 0 - +Rule Morocco 2066 only - Nov 14 3:00 -1:00 - +Rule Morocco 2066 only - Dec 19 2:00 0 - +Rule Morocco 2067 only - Nov 6 3:00 -1:00 - +Rule Morocco 2067 only - Dec 11 2:00 0 - +Rule Morocco 2068 only - Oct 21 3:00 -1:00 - +Rule Morocco 2068 only - Dec 2 2:00 0 - +Rule Morocco 2069 only - Oct 13 3:00 -1:00 - +Rule Morocco 2069 only - Nov 17 2:00 0 - +Rule Morocco 2070 only - Oct 5 3:00 -1:00 - +Rule Morocco 2070 only - Nov 9 2:00 0 - +Rule Morocco 2071 only - Sep 20 3:00 -1:00 - +Rule Morocco 2071 only - Oct 25 2:00 0 - +Rule Morocco 2072 only - Sep 11 3:00 -1:00 - +Rule Morocco 2072 only - Oct 16 2:00 0 - +Rule Morocco 2073 only - Aug 27 3:00 -1:00 - +Rule Morocco 2073 only - Oct 8 2:00 0 - +Rule Morocco 2074 only - Aug 19 3:00 -1:00 - +Rule Morocco 2074 only - Sep 23 2:00 0 - +Rule Morocco 2075 only - Aug 11 3:00 -1:00 - +Rule Morocco 2075 only - Sep 15 2:00 0 - +Rule Morocco 2076 only - Jul 26 3:00 -1:00 - +Rule Morocco 2076 only - Sep 6 2:00 0 - +Rule Morocco 2077 only - Jul 18 3:00 -1:00 - +Rule Morocco 2077 only - Aug 22 2:00 0 - +Rule Morocco 2078 only - Jul 10 3:00 -1:00 - +Rule Morocco 2078 only - Aug 14 2:00 0 - +Rule Morocco 2079 only - Jun 25 3:00 -1:00 - +Rule Morocco 2079 only - Jul 30 2:00 0 - +Rule Morocco 2080 only - Jun 16 3:00 -1:00 - +Rule Morocco 2080 only - Jul 21 2:00 0 - +Rule Morocco 2081 only - Jun 1 3:00 -1:00 - +Rule Morocco 2081 only - Jul 13 2:00 0 - +Rule Morocco 2082 only - May 24 3:00 -1:00 - +Rule Morocco 2082 only - Jun 28 2:00 0 - +Rule Morocco 2083 only - May 16 3:00 -1:00 - +Rule Morocco 2083 only - Jun 20 2:00 0 - +Rule Morocco 2084 only - Apr 30 3:00 -1:00 - +Rule Morocco 2084 only - Jun 11 2:00 0 - +Rule Morocco 2085 only - Apr 22 3:00 -1:00 - +Rule Morocco 2085 only - May 27 2:00 0 - +Rule Morocco 2086 only - Apr 14 3:00 -1:00 - +Rule Morocco 2086 only - May 19 2:00 0 - +Rule Morocco 2087 only - Mar 30 3:00 -1:00 - +Rule Morocco 2087 only - May 4 2:00 0 - +# For dates after the somewhat-arbitrary cutoff of 2087, assume that +# Morocco will no longer observe DST. At some point this table will +# need to be extended, though quite possibly Morocco will change the +# rules first. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 0:00 Morocco +00/+01 1984 Mar 16 1:00 - +01 1986 @@ -1001,7 +1113,7 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aai # https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Maputo 2:10:20 - LMT 1903 Mar 2:00 - CAT Link Africa/Maputo Africa/Blantyre # Malawi @@ -1073,7 +1185,7 @@ Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 WAT #Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 WAT # End of rearguard section. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 @@ -1094,7 +1206,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 # See Africa/Lagos. # Nigeria -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Lagos 0:13:36 - LMT 1919 Sep 1:00 - WAT Link Africa/Lagos Africa/Bangui # Central African Republic @@ -1108,7 +1220,7 @@ Link Africa/Lagos Africa/Niamey # Niger Link Africa/Lagos Africa/Porto-Novo # Benin # Réunion -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis 4:00 - +04 # @@ -1168,7 +1280,7 @@ Zone Africa/Sao_Tome 0:26:56 - LMT 1884 # See Africa/Abidjan. # Seychelles -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria 4:00 - +04 # From Paul Eggert (2001-05-30): @@ -1188,7 +1300,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 - Rule SA 1943 1944 - Mar Sun>=15 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 1:30 - SAST 1903 Mar 2:00 SA SAST @@ -1223,14 +1335,14 @@ Rule Sudan 1970 only - May 1 0:00 1:00 S Rule Sudan 1970 1985 - Oct 15 0:00 0 - Rule Sudan 1971 only - Apr 30 0:00 1:00 S Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Khartoum 2:10:08 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT 2017 Nov 1 2:00 - CAT # South Sudan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Juba 2:06:28 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT @@ -1336,7 +1448,7 @@ Rule Tunisia 2006 2008 - Oct lastSun 2:00s 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. # Shanks & Pottenger say the 1911 switch was on Mar 9; go with Howse's Mar 11. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tunis 0:40:44 - LMT 1881 May 12 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 1:00 Tunisia CE%sT Modified: stable/11/contrib/tzdata/antarctica ============================================================================== --- stable/11/contrib/tzdata/antarctica Tue Jul 2 12:22:27 2019 (r349597) +++ stable/11/contrib/tzdata/antarctica Tue Jul 2 12:22:54 2019 (r349598) @@ -13,7 +13,7 @@ # for information. # Unless otherwise specified, we have no time zone information. -# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited. +# FORMAT is '-00' and STDOFF is 0 for locations while uninhabited. # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -70,7 +70,7 @@ # Australian Antarctica Division informed us that Casey changed time # zone to UTC+11 in "the morning of 22nd October 2016". -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Casey 0 - -00 1969 8:00 - +08 2009 Oct 18 2:00 11:00 - +11 2010 Mar 5 2:00 @@ -142,7 +142,7 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13 # St Paul Island - near Amsterdam, uninhabited # fishing stations operated variously 1819/1931 # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français 5:00 - +05 # @@ -153,7 +153,7 @@ Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Françai # Another base at Port-Martin, 50km east, began operation in 1947. # It was destroyed by fire on 1952-01-14. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/DumontDUrville 0 - -00 1947 10:00 - +10 1952 Jan 14 0 - -00 1956 Nov @@ -181,7 +181,7 @@ Zone Antarctica/DumontDUrville 0 - -00 1947 # Syowa station, which is the first antarctic station of Japan, # was established on 1957-01-29. Since Syowa station is still the main # station of Japan, it's appropriate for the principal location. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Syowa 0 - -00 1957 Jan 29 3:00 - +03 # See: @@ -231,7 +231,7 @@ Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02 #Rule Troll 2004 max - Nov 7 1:00u 0:00 +00 # Remove the following line when uncommenting the above '#Rule' lines. Rule Troll 2004 max - Oct lastSun 1:00u 0:00 +00 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Troll 0 - -00 2005 Feb 12 0:00 Troll %s @@ -305,7 +305,7 @@ Zone Antarctica/Vostok 0 - -00 1957 Dec 16 # From Paul Eggert (2002-10-22) # says Rothera is -03 all year. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Rothera 0 - -00 1976 Dec 1 -3:00 - -03 Modified: stable/11/contrib/tzdata/asia ============================================================================== --- stable/11/contrib/tzdata/asia Tue Jul 2 12:22:27 2019 (r349597) +++ stable/11/contrib/tzdata/asia Tue Jul 2 12:22:54 2019 (r349598) @@ -84,7 +84,7 @@ Rule RussiaAsia 1985 2010 - Mar lastSun 2:00s 1:00 - Rule RussiaAsia 1996 2010 - Oct lastSun 2:00s 0 - # Afghanistan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 4:00 - +04 1945 4:30 - +0430 @@ -117,7 +117,7 @@ Zone Asia/Kabul 4:36:48 - LMT 1890 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Armenia 2011 only - Mar lastSun 2:00s 1:00 - Rule Armenia 2011 only - Oct lastSun 2:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -143,7 +143,7 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 - Rule Azer 1997 2015 - Oct lastSun 5:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baku 3:19:24 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -231,7 +231,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 Rule Dhaka 2009 only - Jun 19 23:00 1:00 - Rule Dhaka 2009 only - Dec 31 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? 6:30 - +0630 1942 May 15 @@ -241,7 +241,7 @@ Zone Asia/Dhaka 6:01:40 - LMT 1890 6:00 Dhaka +06/+07 # Bhutan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu 5:30 - +0530 1987 Oct 6:00 - +06 @@ -252,13 +252,13 @@ Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimb # We have no information as to when standard time was introduced; # assume it occurred in 1907, the same year as Mauritius (which # then contained the Chagos Archipelago). -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Chagos 4:49:40 - LMT 1907 5:00 - +05 1996 6:00 - +06 # Brunei -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan 7:30 - +0730 1933 8:00 - +08 @@ -273,7 +273,7 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri # of Greenwich." This refers to the period before Burma's transition to +0630, # a transition for which Shanks is the only source. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoon 6:24:47 - RMT 1920 # Rangoon local time 6:30 - +0630 1942 May @@ -561,7 +561,7 @@ Rule PRC 1987 1991 - Apr Sun>=11 2:00 1:00 D # that the sort of users who prefer Asia/Urumqi now typically ignored the # +08 mandate back then. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Beijing time, used throughout China; represented by Shanghai. Zone Asia/Shanghai 8:05:43 - LMT 1901 8:00 Shang C%sT 1949 May 28 @@ -652,11 +652,41 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # https://i.imgur.com/05KkvtC.png # * 1941-09-30, Hong Kong Daily Press, Winter Time Warning. # https://i.imgur.com/dge4kFJ.png -# Also, the Liberation day of Hong Kong after WWII which British rule -# over the territory resumed was August 30, 1945, which I think should -# be the termination date for the use of JST in the territory.... -# From Paul Eggert (2018-11-17): +# From P Chan (2018-12-31): +# * According to the Hong Kong Daylight-Saving Regulations, 1941, the +# 1941 spring-forward transition was at 03:00. +# http://sunzi.lib.hku.hk/hkgro/view/g1941/304271.pdf +# http://sunzi.lib.hku.hk/hkgro/view/g1941/305516.pdf +# * According to some articles from South China Morning Post, +08 was +# resumed on 1945-11-18 at 02:00. +# https://i.imgur.com/M2IsZ3c.png +# https://i.imgur.com/iOPqrVo.png +# https://i.imgur.com/fffcGDs.png +# * Some newspapers ... said the 1946 spring-forward transition was on +# 04-21 at 00:00. The Kung Sheung Evening News 1946-04-20 (Chinese) +# https://i.imgur.com/ZSzent0.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2FH7zGe%2FKF%2BFLYsuqGhRBfe p.4 +# The Kung Sheung Daily News 1946-04-21 (Chinese) +# https://i.imgur.com/7ecmRlcm.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2BQBGt1%2BwUj5qG2GqtwR3Wh p.4 +# * According to the Summer Time Ordinance (1946), the fallback +# transitions between 1946 and 1952 were at 03:30 Standard Time (+08) +# http://oelawhk.lib.hku.hk/archive/files/bb74b06a74d5294620a15de560ab33c6.pdf +# * Some other laws and regulations related to DST from 1953 to 1979 +# Summer Time Ordinance 1953 +# https://i.imgur.com/IOlJMav.jpg +# Summer Time (Amendment) Ordinance 1965 +# https://i.imgur.com/8rofeLa.jpg +# Interpretation and General Clauses Ordinance (1966) +# https://i.imgur.com/joy3msj.jpg +# Emergency (Summer Time) Regulation 1973 +# Interpretation and General Clauses (Amendment) Ordinance 1977 +# https://i.imgur.com/RaNqnc4.jpg +# Resolution of the Legislative Council passed on 9 May 1979 +# https://www.legco.gov.hk/yr78-79/english/lc_sitg/hansard/h790509.pdf#page=39 + +# From Paul Eggert (2019-05-31): # Here are the dates given at # https://www.hko.gov.hk/gts/time/Summertime.htm # as of 2014-06-19: @@ -667,7 +697,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # 1944 Whole year # 1945 Whole year # 1946 20 Apr to 1 Dec -# 1947 13 Apr to 30 Dec +# 1947 13 Apr to 30 Nov # 1948 2 May to 31 Oct # 1949 3 Apr to 30 Oct # 1950 2 Apr to 29 Oct @@ -704,36 +734,28 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # The page does not give times of day for transitions, # or dates for the 1942 and 1945 transitions. # The Japanese occupation of Hong Kong began 1941-12-25. -# The Japanese surrender of Hong Kong was signed 1945-09-16; see: -# Heaver S. The days after the Pacific war ended: unsettling times -# in Hong Kong. Post Magazine. 2016-06-13. -# https://www.scmp.com/magazines/post-magazine/article/1852990/days-after-pacific-war-ended-unsettling-times-hong-kong -# For lack of anything better, use start of those days as the -# transition times. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule HK 1946 only - Apr 20 3:30 1:00 S -Rule HK 1946 only - Dec 1 3:30 0 - -Rule HK 1947 only - Apr 13 3:30 1:00 S -Rule HK 1947 only - Dec 30 3:30 0 - -Rule HK 1948 only - May 2 3:30 1:00 S -Rule HK 1948 1951 - Oct lastSun 3:30 0 - -Rule HK 1952 1953 - Nov Sun>=1 3:30 0 - +Rule HK 1946 only - Apr 21 0:00 1:00 S +Rule HK 1946 only - Dec 1 3:30s 0 - +Rule HK 1947 only - Apr 13 3:30s 1:00 S +Rule HK 1947 only - Nov 30 3:30s 0 - +Rule HK 1948 only - May 2 3:30s 1:00 S +Rule HK 1948 1952 - Oct Sun>=28 3:30s 0 - Rule HK 1949 1953 - Apr Sun>=1 3:30 1:00 S +Rule HK 1953 1964 - Oct Sun>=31 3:30 0 - Rule HK 1954 1964 - Mar Sun>=18 3:30 1:00 S -Rule HK 1954 only - Oct 31 3:30 0 - -Rule HK 1955 1964 - Nov Sun>=1 3:30 0 - Rule HK 1965 1976 - Apr Sun>=16 3:30 1:00 S Rule HK 1965 1976 - Oct Sun>=16 3:30 0 - Rule HK 1973 only - Dec 30 3:30 1:00 S -Rule HK 1979 only - May Sun>=8 3:30 1:00 S -Rule HK 1979 only - Oct Sun>=16 3:30 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Rule HK 1979 only - May 13 3:30 1:00 S +Rule HK 1979 only - Oct 21 3:30 0 - +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42 - 8:00 - HKT 1941 Jun 15 3:30 + 8:00 - HKT 1941 Jun 15 3:00 8:00 1:00 HKST 1941 Oct 1 4:00 8:30 - HKT 1941 Dec 25 - 9:00 - JST 1945 Sep 16 + 9:00 - JST 1945 Nov 18 2:00 8:00 HK HK%sT ############################################################################### @@ -857,7 +879,7 @@ Rule Taiwan 1974 1975 - Oct 1 0:00 0 S Rule Taiwan 1979 only - Jul 1 0:00 1:00 D Rule Taiwan 1979 only - Oct 1 0:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Taipei or Taibei or T'ai-pei Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 8:00 - CST 1937 Oct 1 @@ -995,7 +1017,7 @@ Rule Macau 1975 1976 - Apr Sun>=16 03:30 1:00 D Rule Macau 1979 only - May 13 03:30 1:00 D Rule Macau 1979 only - Oct Sun>=16 03:30 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Macau 7:34:10 - LMT 1904 Oct 30 8:00 - CST 1941 Dec 21 23:00 9:00 Macau +09/+10 1945 Sep 30 24:00 @@ -1034,7 +1056,7 @@ Rule Cyprus 1977 only - Sep 25 0:00 0 - Rule Cyprus 1978 only - Oct 2 0:00 0 - Rule Cyprus 1979 1997 - Sep lastSun 0:00 0 - Rule Cyprus 1981 1998 - Mar lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14 2:00 Cyprus EE%sT 1998 Sep 2:00 EUAsia EE%sT @@ -1083,7 +1105,7 @@ Link Asia/Nicosia Europe/Nicosia # Byalokoz 1919 says Georgia was 2:59:11. # Go with Byalokoz. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tbilisi 2:59:11 - LMT 1880 2:59:11 - TBMT 1924 May 2 # Tbilisi Mean Time 3:00 - +03 1957 Mar @@ -1120,7 +1142,7 @@ Zone Asia/Tbilisi 2:59:11 - LMT 1880 # which will be permanent, with no seasonal adjustment, will happen at # midnight on Saturday, September 16. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 8:00 - +08 1942 Feb 21 23:00 9:00 - +09 1976 May 3 @@ -1186,7 +1208,7 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 # time for 1870-1941. Shanks is our only (and dubious) source for the # 1941-1945 data. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata 5:53:20 - HMT 1870 # Howrah Mean Time? 5:21:10 - MMT 1906 Jan 1 # Madras local time @@ -1238,7 +1260,7 @@ Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata # WITA - +08 - Waktu Indonesia Tengah (Indonesia central time) # WIT - +09 - Waktu Indonesia Timur (Indonesia eastern time) # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Java, Sumatra Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, @@ -1314,9 +1336,9 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # I used the following code in GNU Emacs 26.1 to generate the "Rule Iran" # lines from 2008 through 2087. Emacs 26.1 uses Ed Reingold's # cal-persia implementation of Birashk's approximation, which in the -# 2008-2087 range disagrees with the the astronomical Persian calendar -# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), -# so the following code special-case those years. See Table 15.1, page 264, of: +# 2008-2087 range disagrees with the astronomical Persian calendar +# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), so +# the following code special-cases those years. See Table 15.1, page 264, of: # Edward M. Reingold and Nachum Dershowitz, Calendrical Calculations: # The Ultimate Edition, Cambridge University Press (2018). # https://www.cambridge.org/fr/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition @@ -1510,7 +1532,7 @@ Rule Iran 2087 only - Sep 21 24:00 0 - Rule Iran 2088 max - Mar 20 24:00 1:00 - Rule Iran 2088 max - Sep 20 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time 3:30 - +0330 1977 Nov @@ -1555,7 +1577,7 @@ Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 - # Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 - Rule Iraq 1991 2007 - Oct 1 3:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? 3:00 - +03 1982 May @@ -1622,7 +1644,7 @@ Rule Zion 1975 only - Apr 20 0:00 1:00 D Rule Zion 1975 only - Aug 31 0:00 0 S # From Alois Treindl (2019-03-06): -# http://www.moin.gov.il/Documents/שעון קיץ/clock-50-years-7-2014.pdf +# http://www.moin.gov.il/Documents/שעון%20קיץ/clock-50-years-7-2014.pdf # From Isaac Starkman (2019-03-06): # Summer time was in that period in 1980 and 1984, see # https://www.ynet.co.il/articles/0,7340,L-3951073,00.html @@ -1760,32 +1782,15 @@ Rule Zion 2004 only - Sep 22 1:00 0 S # # ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps -# From Paul Eggert (2012-10-26): -# I used Ephraim Silverberg's dst-israel.el program -# (2005-02-20) -# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4, -# to generate the transitions from 2005 through 2012. -# (I replaced "lastFri" with "Fri>=26" by hand.) -# The spring transitions all correspond to the following Rule: -# -# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D -# -# but older zic implementations (e.g., Solaris 8) do not support -# "Fri>=26" to mean April 1 in years like 2005, so for now we list the -# springtime transitions explicitly. - # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Zion 2005 only - Apr 1 2:00 1:00 D +Rule Zion 2005 2012 - Apr Fri<=1 2:00 1:00 D Rule Zion 2005 only - Oct 9 2:00 0 S -Rule Zion 2006 2010 - Mar Fri>=26 2:00 1:00 D Rule Zion 2006 only - Oct 1 2:00 0 S Rule Zion 2007 only - Sep 16 2:00 0 S Rule Zion 2008 only - Oct 5 2:00 0 S Rule Zion 2009 only - Sep 27 2:00 0 S Rule Zion 2010 only - Sep 12 2:00 0 S -Rule Zion 2011 only - Apr 1 2:00 1:00 D Rule Zion 2011 only - Oct 2 2:00 0 S -Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D Rule Zion 2012 only - Sep 23 2:00 0 S # From Ephraim Silverberg (2013-06-27): @@ -1801,7 +1806,7 @@ Rule Zion 2012 only - Sep 23 2:00 0 S Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D Rule Zion 2013 max - Oct lastSun 2:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Jerusalem 2:20:54 - LMT 1880 2:20:40 - JMT 1918 # Jerusalem Mean Time? 2:00 Zion I%sT @@ -1893,7 +1898,7 @@ Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D # Central Time (UT+9). The adoption began on Oct 1, 1937. # https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u 9:00 Japan J%sT # Since 1938, all Japanese possessions have been like Asia/Tokyo, @@ -1996,7 +2001,7 @@ Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - Rule Jordan 2013 only - Dec 20 0:00 0 - Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S Rule Jordan 2014 max - Oct lastFri 0:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 2:00 Jordan EE%sT @@ -2037,8 +2042,8 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # text. # # According to Izvestia newspaper No. 68 (23334) from 1991-03-20 -# (page 6; available at http://libinfo.org/newsr/newsr2574.djvu via -# http://libinfo.org/index.php?id=58564) on 1991-03-31 at 2:00 during +# -- page 6; available at http://libinfo.org/newsr/newsr2574.djvu via +# http://libinfo.org/index.php?id=58564 -- on 1991-03-31 at 2:00 during # transition to "summer" time: # Republic of Georgia, Latvian SSR, Lithuanian SSR, SSR Moldova, # Estonian SSR; Komi ASSR; Kaliningrad oblast; Nenets autonomous okrug @@ -2054,7 +2059,7 @@ Zone Asia/Amman 2:23:44 - LMT 1931 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jul 2 14:24:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F58215D4D06; Tue, 2 Jul 2019 14:24:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4BA988381; Tue, 2 Jul 2019 14:24:42 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEDD1257E5; Tue, 2 Jul 2019 14:24:42 +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 x62EOgNL044909; Tue, 2 Jul 2019 14:24:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62EOgeD044908; Tue, 2 Jul 2019 14:24:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907021424.x62EOgeD044908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 2 Jul 2019 14:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349599 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 349599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E4BA988381 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 14:24:43 -0000 Author: markj Date: Tue Jul 2 14:24:42 2019 New Revision: 349599 URL: https://svnweb.freebsd.org/changeset/base/349599 Log: Fix handling of errors from sblock() in soreceive_stream(). Previously we would attempt to unlock the socket buffer despite having failed to lock it. Simply return an error instead: no resources need to be released at this point, and doing so is consistent with soreceive_generic(). PR: 238789 Submitted by: Greg Becker MFC after: 1 week Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Jul 2 12:22:54 2019 (r349598) +++ head/sys/kern/uipc_socket.c Tue Jul 2 14:24:42 2019 (r349599) @@ -2200,7 +2200,7 @@ soreceive_stream(struct socket *so, struct sockaddr ** /* Prevent other readers from entering the socket. */ error = sblock(sb, SBLOCKWAIT(flags)); if (error) - goto out; + return (error); SOCKBUF_LOCK(sb); /* Easy one, no space to copyout anything. */ From owner-svn-src-all@freebsd.org Tue Jul 2 14:53:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2E3215D5B52; Tue, 2 Jul 2019 14:53:52 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64B2A895FE; Tue, 2 Jul 2019 14:53:52 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B06925CEF; Tue, 2 Jul 2019 14:53:52 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62ErqRO060638; Tue, 2 Jul 2019 14:53:52 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62ErqSB060637; Tue, 2 Jul 2019 14:53:52 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201907021453.x62ErqSB060637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Tue, 2 Jul 2019 14:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349600 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: wblock X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 349600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 64B2A895FE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 14:53:52 -0000 Author: wblock (doc committer) Date: Tue Jul 2 14:53:51 2019 New Revision: 349600 URL: https://svnweb.freebsd.org/changeset/base/349600 Log: Correct name of vmm(4) pptdevs variable. Reported by: nwolff@ixsystems.com Modified: head/usr.sbin/bhyve/bhyve.8 Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Tue Jul 2 14:24:42 2019 (r349599) +++ head/usr.sbin/bhyve/bhyve.8 Tue Jul 2 14:53:51 2019 (r349600) @@ -347,7 +347,7 @@ Guest memory must be wired using the option when a pass-through device is configured. .Pp The host device must have been reserved at boot-time using the -.Va pptdev +.Va pptdevs loader variable as described in .Xr vmm 4 . .Pp From owner-svn-src-all@freebsd.org Tue Jul 2 15:01:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C19315D6099; Tue, 2 Jul 2019 15:01:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23C3E89C79; Tue, 2 Jul 2019 15:01:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1088B25E74; Tue, 2 Jul 2019 15:01:55 +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 x62F1sDF062045; Tue, 2 Jul 2019 15:01:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62F1sXc062044; Tue, 2 Jul 2019 15:01:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201907021501.x62F1sXc062044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jul 2019 15:01:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349601 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 349601 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 23C3E89C79 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 15:01:55 -0000 Author: mav Date: Tue Jul 2 15:01:54 2019 New Revision: 349601 URL: https://svnweb.freebsd.org/changeset/base/349601 Log: Include sys/lock.h, as told by man page. MFC after: 1 week Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Tue Jul 2 14:53:51 2019 (r349600) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Tue Jul 2 15:01:54 2019 (r349601) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Tue Jul 2 16:44:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBFBF15D8044; Tue, 2 Jul 2019 16:44:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 916AC8D292; Tue, 2 Jul 2019 16:44:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A15B26F86; Tue, 2 Jul 2019 16:44:05 +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 x62Gi5mi017979; Tue, 2 Jul 2019 16:44:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62Gi5Mn017978; Tue, 2 Jul 2019 16:44:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201907021644.x62Gi5Mn017978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jul 2019 16:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349602 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 349602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 916AC8D292 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 16:44:06 -0000 Author: emaste Date: Tue Jul 2 16:44:04 2019 New Revision: 349602 URL: https://svnweb.freebsd.org/changeset/base/349602 Log: if_muge: set IFCAP_VLAN_MTU to maintain 1500 MTU with vlan use PR: 238665 Submitted by: Ralf MFC after: 1 week Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Tue Jul 2 15:01:54 2019 (r349601) +++ head/sys/dev/usb/net/if_muge.c Tue Jul 2 16:44:04 2019 (r349602) @@ -1610,6 +1610,7 @@ muge_attach_post_sub(struct usb_ether *ue) * however currently only RX checksum is supported in the driver * (see top of file). */ + ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_hwassist = 0; if (MUGE_DEFAULT_RX_CSUM_ENABLE) ifp->if_capabilities |= IFCAP_RXCSUM; From owner-svn-src-all@freebsd.org Tue Jul 2 16:54:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7302615D8405; Tue, 2 Jul 2019 16:54:47 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16BF78D945; Tue, 2 Jul 2019 16:54:47 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4D212712E; Tue, 2 Jul 2019 16:54:46 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62Gsk3G023722; Tue, 2 Jul 2019 16:54:46 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62GskQq023721; Tue, 2 Jul 2019 16:54:46 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201907021654.x62GskQq023721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Tue, 2 Jul 2019 16:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349603 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: wblock X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 349603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 16BF78D945 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 16:54:47 -0000 Author: wblock (doc committer) Date: Tue Jul 2 16:54:46 2019 New Revision: 349603 URL: https://svnweb.freebsd.org/changeset/base/349603 Log: MFC r349600. Correct name of vmm(4) pptdevs variable. Modified: stable/12/usr.sbin/bhyve/bhyve.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/12/usr.sbin/bhyve/bhyve.8 Tue Jul 2 16:44:04 2019 (r349602) +++ stable/12/usr.sbin/bhyve/bhyve.8 Tue Jul 2 16:54:46 2019 (r349603) @@ -345,7 +345,7 @@ Guest memory must be wired using the option when a pass-through device is configured. .Pp The host device must have been reserved at boot-time using the -.Va pptdev +.Va pptdevs loader variable as described in .Xr vmm 4 . .Pp From owner-svn-src-all@freebsd.org Tue Jul 2 16:56:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20FE915D84F2; Tue, 2 Jul 2019 16:56:28 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B62658DBD9; Tue, 2 Jul 2019 16:56:27 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BEED27131; Tue, 2 Jul 2019 16:56:27 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62GuRrF023871; Tue, 2 Jul 2019 16:56:27 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62GuRsZ023870; Tue, 2 Jul 2019 16:56:27 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201907021656.x62GuRsZ023870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Tue, 2 Jul 2019 16:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349604 - stable/11/usr.sbin/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: wblock X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve X-SVN-Commit-Revision: 349604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B62658DBD9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 16:56:28 -0000 Author: wblock (doc committer) Date: Tue Jul 2 16:56:27 2019 New Revision: 349604 URL: https://svnweb.freebsd.org/changeset/base/349604 Log: MFC r349600. Correct name of vmm(4) pptdevs variable. Modified: stable/11/usr.sbin/bhyve/bhyve.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/11/usr.sbin/bhyve/bhyve.8 Tue Jul 2 16:54:46 2019 (r349603) +++ stable/11/usr.sbin/bhyve/bhyve.8 Tue Jul 2 16:56:27 2019 (r349604) @@ -308,7 +308,7 @@ Guest memory must be wired using the option when a pass-through device is configured. .Pp The host device must have been reserved at boot-time using the -.Va pptdev +.Va pptdevs loader variable as described in .Xr vmm 4 . .Pp From owner-svn-src-all@freebsd.org Tue Jul 2 17:23:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E85AB15D8DFA; Tue, 2 Jul 2019 17:23:38 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89D658EB54; Tue, 2 Jul 2019 17:23:38 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60D5227668; Tue, 2 Jul 2019 17:23:38 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62HNcGI039756; Tue, 2 Jul 2019 17:23:38 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62HNcUo039755; Tue, 2 Jul 2019 17:23:38 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201907021723.x62HNcUo039755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Tue, 2 Jul 2019 17:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349605 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 349605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 89D658EB54 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 17:23:39 -0000 Author: zeising (doc,ports committer) Date: Tue Jul 2 17:23:37 2019 New Revision: 349605 URL: https://svnweb.freebsd.org/changeset/base/349605 Log: MFC 349133 349146 349150: document PCIOCATTACHED r349133: pci(4): Document PCIOCATTACHED Document the PCIOCATTACHED ioctl(2) in the pci(4) manual. PCIOCATTACHED is used to query if a driver has attached to a PCI. Reviewed by: bcr, imp Differential Revision: https://reviews.freebsd.org/D20652 r349146: pci.4: wordsmith and add missing words Add missing words after PCI in the description of the PCIOCWRITE and PCIOCATTACHED ioctls. Use singular in PCIOCREAD, we only read one register at the time. Reviewed by: bcr, bjk, rgrimes, cem Differential Revision: https://reviews.freebsd.org/D20671 r349150: pci.4: Use plural configuration registers It is customary to use plural when talking about PCI configure registers. Reported by: scottl Modified: stable/12/share/man/man4/pci.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/pci.4 ============================================================================== --- stable/12/share/man/man4/pci.4 Tue Jul 2 16:56:27 2019 (r349604) +++ stable/12/share/man/man4/pci.4 Tue Jul 2 17:23:37 2019 (r349605) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2018 +.Dd June 17, 2019 .Dt PCI 4 .Os .Sh NAME @@ -290,7 +290,7 @@ This .Xr ioctl 2 reads the .Tn PCI -configuration registers specified by the passed-in +configuration register specified by the passed-in .Va pci_io structure. The @@ -307,7 +307,7 @@ from the ioctl. .It pi_reg The .Tn PCI -configuration register the user would like to access. +configuration registers the user would like to access. .It pi_width The width, in bytes, of the data the user would like to read. This value @@ -323,7 +323,7 @@ This .Xr ioctl 2 allows users to write to the .Tn PCI -specified in the passed-in +configuration registers specified in the passed-in .Va pci_io structure. The @@ -333,6 +333,26 @@ The limitations on data width described for reading registers, above, also apply to writing .Tn PCI configuration registers. +.It PCIOCATTACHED +This +.Xr ioctl 2 +allows users to query if a driver is attached to the +.Tn PCI +device specified in the passed-in +.Va pci_io +structure. +The +.Va pci_io +structure is described above, however, the +.Va pi_reg +and +.Va pi_width +fields are not used. +The status of the device is stored in the +.Va pi_data +field. +A value of 0 indicates no driver is attached, while a value larger than 0 +indicates that a driver is attached. .It PCIOCBARMMAP This .Xr ioctl 2 From owner-svn-src-all@freebsd.org Tue Jul 2 17:24:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9D6D15D8E75; Tue, 2 Jul 2019 17:24:26 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6144D8ECB4; Tue, 2 Jul 2019 17:24:26 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C41D2766A; Tue, 2 Jul 2019 17:24:26 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62HOQ8J039839; Tue, 2 Jul 2019 17:24:26 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62HOQhm039838; Tue, 2 Jul 2019 17:24:26 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201907021724.x62HOQhm039838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Tue, 2 Jul 2019 17:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349606 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 349606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6144D8ECB4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 17:24:27 -0000 Author: zeising (doc,ports committer) Date: Tue Jul 2 17:24:25 2019 New Revision: 349606 URL: https://svnweb.freebsd.org/changeset/base/349606 Log: MFC 349133 349146 349150: document PCIOCATTACHED r349133: pci(4): Document PCIOCATTACHED Document the PCIOCATTACHED ioctl(2) in the pci(4) manual. PCIOCATTACHED is used to query if a driver has attached to a PCI. Reviewed by: bcr, imp Differential Revision: https://reviews.freebsd.org/D20652 r349146: pci.4: wordsmith and add missing words Add missing words after PCI in the description of the PCIOCWRITE and PCIOCATTACHED ioctls. Use singular in PCIOCREAD, we only read one register at the time. Reviewed by: bcr, bjk, rgrimes, cem Differential Revision: https://reviews.freebsd.org/D20671 r349150: pci.4: Use plural configuration registers It is customary to use plural when talking about PCI configure registers. Reported by: scottl Merge conflicts manually. Modified: stable/11/share/man/man4/pci.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/pci.4 ============================================================================== --- stable/11/share/man/man4/pci.4 Tue Jul 2 17:23:37 2019 (r349605) +++ stable/11/share/man/man4/pci.4 Tue Jul 2 17:24:25 2019 (r349606) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 8, 2016 +.Dd June 17, 2019 .Dt PCI 4 .Os .Sh NAME @@ -290,7 +290,7 @@ This .Xr ioctl 2 reads the .Tn PCI -configuration registers specified by the passed-in +configuration register specified by the passed-in .Va pci_io structure. The @@ -307,7 +307,7 @@ from the ioctl. .It pi_reg The .Tn PCI -configuration register the user would like to access. +configuration registers the user would like to access. .It pi_width The width, in bytes, of the data the user would like to read. This value @@ -323,7 +323,7 @@ This .Xr ioctl 2 allows users to write to the .Tn PCI -specified in the passed-in +configuration registers specified in the passed-in .Va pci_io structure. The @@ -334,6 +334,26 @@ reading registers, above, also apply to writing .Tn PCI configuration registers. .El +.It PCIOCATTACHED +This +.Xr ioctl 2 +allows users to query if a driver is attached to the +.Tn PCI +device specified in the passed-in +.Va pci_io +structure. +The +.Va pci_io +structure is described above, however, the +.Va pi_reg +and +.Va pi_width +fields are not used. +The status of the device is stored in the +.Va pi_data +field. +A value of 0 indicates no driver is attached, while a value larger than 0 +indicates that a driver is attached. .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 From owner-svn-src-all@freebsd.org Tue Jul 2 17:48:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E611D15D955D; Tue, 2 Jul 2019 17:48:28 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C2338F7FF; Tue, 2 Jul 2019 17:48:28 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 765A9279C0; Tue, 2 Jul 2019 17:48:28 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62HmSJN050612; Tue, 2 Jul 2019 17:48:28 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62HmSIV050611; Tue, 2 Jul 2019 17:48:28 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201907021748.x62HmSIV050611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Tue, 2 Jul 2019 17:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349607 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 349607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8C2338F7FF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 17:48:29 -0000 Author: zeising (doc,ports committer) Date: Tue Jul 2 17:48:27 2019 New Revision: 349607 URL: https://svnweb.freebsd.org/changeset/base/349607 Log: pci(4): Use plural configuration registers Change to use registers instead of register, as it is customary to use plural when talking about PCI registers. This was missed in r349150. MFC after: 3 days Modified: head/share/man/man4/pci.4 Modified: head/share/man/man4/pci.4 ============================================================================== --- head/share/man/man4/pci.4 Tue Jul 2 17:24:25 2019 (r349606) +++ head/share/man/man4/pci.4 Tue Jul 2 17:48:27 2019 (r349607) @@ -290,7 +290,7 @@ This .Xr ioctl 2 reads the .Tn PCI -configuration register specified by the passed-in +configuration registers specified by the passed-in .Va pci_io structure. The From owner-svn-src-all@freebsd.org Tue Jul 2 19:01:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E469615DABC5; Tue, 2 Jul 2019 19:01:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 878986B62C; Tue, 2 Jul 2019 19:01:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 610A862F; Tue, 2 Jul 2019 19:01:15 +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 x62J1FSj087998; Tue, 2 Jul 2019 19:01:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62J1FbK087997; Tue, 2 Jul 2019 19:01:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907021901.x62J1FbK087997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 2 Jul 2019 19:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349608 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 878986B62C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 19:01:16 -0000 Author: kib Date: Tue Jul 2 19:01:14 2019 New Revision: 349608 URL: https://svnweb.freebsd.org/changeset/base/349608 Log: Use traditional 'p' local to designate td->td_proc in kern_mmap. Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D20795 Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Tue Jul 2 17:48:27 2019 (r349607) +++ head/sys/vm/vm_mmap.c Tue Jul 2 19:01:14 2019 (r349608) @@ -187,6 +187,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t l { struct vmspace *vms; struct file *fp; + struct proc *p; vm_offset_t addr; vm_size_t pageoff, size; vm_prot_t cap_maxprot; @@ -199,6 +200,9 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t l prot = PROT_EXTRACT(prot); if (max_prot != 0 && (max_prot & prot) != prot) return (EINVAL); + + p = td->td_proc; + /* * Always honor PROT_MAX if set. If not, default to all * permissions unless we're implying maximum permissions. @@ -209,7 +213,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t l max_prot = (imply_prot_max && prot != PROT_NONE) ? prot : _PROT_ALL; - vms = td->td_proc->p_vmspace; + vms = p->p_vmspace; fp = NULL; AUDIT_ARG_FD(fd); addr = addr0; @@ -229,7 +233,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t l * pos. */ if (!SV_CURPROC_FLAG(SV_AOUT)) { - if ((len == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) || + if ((len == 0 && p->p_osrel >= P_OSREL_MAP_ANON) || ((flags & MAP_ANON) != 0 && (fd != -1 || pos != 0))) return (EINVAL); } else { @@ -375,7 +379,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t l if (error != 0) goto done; if ((flags & (MAP_SHARED | MAP_PRIVATE)) == 0 && - td->td_proc->p_osrel >= P_OSREL_MAP_FSTRICT) { + p->p_osrel >= P_OSREL_MAP_FSTRICT) { error = EINVAL; goto done; } From owner-svn-src-all@freebsd.org Tue Jul 2 19:07:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A9D315DAE06; Tue, 2 Jul 2019 19:07:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF3FF6BA00; Tue, 2 Jul 2019 19:07:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5A487A3; Tue, 2 Jul 2019 19:07: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 x62J7JC8092808; Tue, 2 Jul 2019 19:07:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62J7IdO092798; Tue, 2 Jul 2019 19:07:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907021907.x62J7IdO092798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 2 Jul 2019 19:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349609 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys sys/vm X-SVN-Commit-Revision: 349609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EF3FF6BA00 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 19:07:20 -0000 Author: kib Date: Tue Jul 2 19:07:17 2019 New Revision: 349609 URL: https://svnweb.freebsd.org/changeset/base/349609 Log: Control implicit PROT_MAX() using procctl(2) and the FreeBSD note feature bit. In particular, allocate the bit to opt-out the image from implicit PROTMAX enablement. Provide procctl(2) verbs to set and query implicit PROTMAX handling. The knobs mimic the same per-image flag and per-process controls for ASLR. Reviewed by: emaste, markj (previous version) Discussed with: brooks Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D20795 Modified: head/lib/libc/sys/procctl.2 head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_procctl.c head/sys/sys/elf_common.h head/sys/sys/proc.h head/sys/sys/procctl.h head/sys/sys/syscallsubr.h head/sys/vm/vm_mmap.c Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Tue Jul 2 19:01:14 2019 (r349608) +++ head/lib/libc/sys/procctl.2 Tue Jul 2 19:07:17 2019 (r349609) @@ -94,7 +94,7 @@ Same notes as for .Dv PROC_ASLR_FORCE_ENABLE apply. .It Dv PROC_ASLR_NOFORCE -Use system-wide configured policy for ASLR. +Use the system-wide configured policy for ASLR. .El .It Dv PROC_ASLR_STATUS Returns the current status of ASLR enablement for the target process. @@ -112,6 +112,47 @@ If the currently executed image in the process itself the .Dv PROC_ASLR_ACTIVE flag is or-ed with the value listed above. +.It Dv PROC_PROTMAX_CTL +Controls implicit application of PROT_MAX protection equal to the +.Fa prot +argument of the +.Xr mmap 2 +syscall, in the target process. +The +.Va arg +parameter must point to the integer variable holding one of the following +values: +.Bl -tag -width PROC_PROTMAX_FORCE_DISABLE +.It Dv PROC_PROTMAX_FORCE_ENABLE +Enables implicit PROT_MAX application, +even if it is disabled system-wide by the sysctl +.Va vm.imply_prot_max . +The image flag might still prevent the enablement. +.It Dv PROC_ASLR_FORCE_DISABLE +Request that implicit application of PROT_MAX be disabled. +Same notes as for +.Dv PROC_PROTMAX_FORCE_ENABLE +apply. +.It Dv PROC_PROTMAX_NOFORCE +Use the system-wide configured policy for PROT_MAX. +.El +.It Dv PROC_PROTMAX_STATUS +Returns the current status of implicit PROT_MAX enablement for the +target process. +The +.Va arg +parameter must point to the integer variable, where one of the +following values is written: +.Bl -tag -width PROC_PROTMAX_FORCE_DISABLE +.It Dv PROC_PROTMAX_FORCE_ENABLE +.It Dv PROC_PROTMAX_FORCE_DISABLE +.It Dv PROC_PROTMAX_NOFORCE +.El +.Pp +If the currently executed image in the process itself has implicit PROT_MAX +application enabled, the +.Dv PROC_PROTMAX_ACTIVE +flag is or-ed with the value listed above. .It Dv PROC_SPROTECT Set process protection state. This is used to mark a process as protected from being killed if the system @@ -575,6 +616,8 @@ or invalid signal number. .Xr cap_enter 2, .Xr kill 2 , .Xr ktrace 2 , +.Xr mmap 2 , +.Xr mprotect 2 , .Xr ptrace 2 , .Xr wait 2 , .Xr capsicum 4 , Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Jul 2 19:01:14 2019 (r349608) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Jul 2 19:07:17 2019 (r349609) @@ -3333,6 +3333,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ switch (uap->com) { case PROC_ASLR_CTL: + case PROC_PROTMAX_CTL: case PROC_SPROTECT: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: @@ -3365,6 +3366,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ data = &x.rk; break; case PROC_ASLR_STATUS: + case PROC_PROTMAX_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: data = &flags; @@ -3394,6 +3396,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_ error = error1; break; case PROC_ASLR_STATUS: + case PROC_PROTMAX_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: if (error == 0) Modified: head/sys/kern/kern_procctl.c ============================================================================== --- head/sys/kern/kern_procctl.c Tue Jul 2 19:01:14 2019 (r349608) +++ head/sys/kern/kern_procctl.c Tue Jul 2 19:07:17 2019 (r349609) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -419,6 +420,51 @@ trapcap_status(struct thread *td, struct proc *p, int } static int +protmax_ctl(struct thread *td, struct proc *p, int state) +{ + PROC_LOCK_ASSERT(p, MA_OWNED); + + switch (state) { + case PROC_PROTMAX_FORCE_ENABLE: + p->p_flag2 &= ~P2_PROTMAX_DISABLE; + p->p_flag2 |= P2_PROTMAX_ENABLE; + break; + case PROC_PROTMAX_FORCE_DISABLE: + p->p_flag2 |= P2_PROTMAX_DISABLE; + p->p_flag2 &= ~P2_PROTMAX_ENABLE; + break; + case PROC_PROTMAX_NOFORCE: + p->p_flag2 &= ~(P2_PROTMAX_ENABLE | P2_PROTMAX_DISABLE); + break; + default: + return (EINVAL); + } + return (0); +} + +static int +protmax_status(struct thread *td, struct proc *p, int *data) +{ + int d; + + switch (p->p_flag2 & (P2_PROTMAX_ENABLE | P2_PROTMAX_DISABLE)) { + case 0: + d = PROC_ASLR_NOFORCE; + break; + case P2_PROTMAX_ENABLE: + d = PROC_PROTMAX_FORCE_ENABLE; + break; + case P2_PROTMAX_DISABLE: + d = PROC_PROTMAX_FORCE_DISABLE; + break; + } + if (kern_mmap_maxprot(p, PROT_READ) == PROT_READ) + d |= PROC_PROTMAX_ACTIVE; + *data = d; + return (0); +} + +static int aslr_ctl(struct thread *td, struct proc *p, int state) { @@ -500,6 +546,7 @@ sys_procctl(struct thread *td, struct procctl_args *ua switch (uap->com) { case PROC_ASLR_CTL: + case PROC_PROTMAX_CTL: case PROC_SPROTECT: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: @@ -530,6 +577,7 @@ sys_procctl(struct thread *td, struct procctl_args *ua data = &x.rk; break; case PROC_ASLR_STATUS: + case PROC_PROTMAX_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: data = &flags; @@ -558,6 +606,7 @@ sys_procctl(struct thread *td, struct procctl_args *ua error = error1; break; case PROC_ASLR_STATUS: + case PROC_PROTMAX_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: if (error == 0) @@ -583,6 +632,10 @@ kern_procctl_single(struct thread *td, struct proc *p, return (aslr_status(td, p, data)); case PROC_SPROTECT: return (protect_set(td, p, *(int *)data)); + case PROC_PROTMAX_CTL: + return (protmax_ctl(td, p, *(int *)data)); + case PROC_PROTMAX_STATUS: + return (protmax_status(td, p, data)); case PROC_REAP_ACQUIRE: return (reap_acquire(td, p)); case PROC_REAP_RELEASE: @@ -618,6 +671,8 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t switch (com) { case PROC_ASLR_CTL: case PROC_ASLR_STATUS: + case PROC_PROTMAX_CTL: + case PROC_PROTMAX_STATUS: case PROC_REAP_ACQUIRE: case PROC_REAP_RELEASE: case PROC_REAP_STATUS: @@ -669,6 +724,8 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t break; case PROC_ASLR_CTL: case PROC_ASLR_STATUS: + case PROC_PROTMAX_CTL: + case PROC_PROTMAX_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: tree_locked = false; Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Tue Jul 2 19:01:14 2019 (r349608) +++ head/sys/sys/elf_common.h Tue Jul 2 19:07:17 2019 (r349609) @@ -777,6 +777,7 @@ typedef struct { /* NT_FREEBSD_FEATURE_CTL desc[0] bits */ #define NT_FREEBSD_FCTL_ASLR_DISABLE 0x00000001 +#define NT_FREEBSD_FCTL_PROTMAX_DISABLE 0x00000002 /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Jul 2 19:01:14 2019 (r349608) +++ head/sys/sys/proc.h Tue Jul 2 19:07:17 2019 (r349609) @@ -761,6 +761,8 @@ struct proc { #define P2_ASLR_ENABLE 0x00000040 /* Force enable ASLR. */ #define P2_ASLR_DISABLE 0x00000080 /* Force disable ASLR. */ #define P2_ASLR_IGNSTART 0x00000100 /* Enable ASLR to consume sbrk area. */ +#define P2_PROTMAX_ENABLE 0x00000200 /* Force enable implied PROT_MAX. */ +#define P2_PROTMAX_DISABLE 0x00000400 /* Force disable implied PROT_MAX. */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ Modified: head/sys/sys/procctl.h ============================================================================== --- head/sys/sys/procctl.h Tue Jul 2 19:01:14 2019 (r349608) +++ head/sys/sys/procctl.h Tue Jul 2 19:07:17 2019 (r349609) @@ -59,6 +59,8 @@ #define PROC_PDEATHSIG_STATUS 12 /* get parent death signal */ #define PROC_ASLR_CTL 13 /* en/dis ASLR */ #define PROC_ASLR_STATUS 14 /* query ASLR status */ +#define PROC_PROTMAX_CTL 15 /* en/dis implicit PROT_MAX */ +#define PROC_PROTMAX_STATUS 16 /* query implicit PROT_MAX status */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) @@ -126,6 +128,11 @@ struct procctl_reaper_kill { #define PROC_ASLR_FORCE_DISABLE 2 #define PROC_ASLR_NOFORCE 3 #define PROC_ASLR_ACTIVE 0x80000000 + +#define PROC_PROTMAX_FORCE_ENABLE 1 +#define PROC_PROTMAX_FORCE_DISABLE 2 +#define PROC_PROTMAX_NOFORCE 3 +#define PROC_PROTMAX_ACTIVE 0x80000000 #ifndef _KERNEL __BEGIN_DECLS Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Tue Jul 2 19:01:14 2019 (r349608) +++ head/sys/sys/syscallsubr.h Tue Jul 2 19:07:17 2019 (r349609) @@ -175,6 +175,7 @@ int kern_mlock(struct proc *proc, struct ucred *cred, size_t len); int kern_mmap(struct thread *td, uintptr_t addr, size_t len, int prot, int flags, int fd, off_t pos); +int kern_mmap_maxprot(struct proc *p, int prot); int kern_mprotect(struct thread *td, uintptr_t addr, size_t size, int prot); int kern_msgctl(struct thread *, int, int, struct msqid_ds *); int kern_msgrcv(struct thread *, int, void *, size_t, long, int, long *); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Tue Jul 2 19:01:14 2019 (r349608) +++ head/sys/vm/vm_mmap.c Tue Jul 2 19:07:17 2019 (r349609) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -182,6 +183,19 @@ sys_mmap(struct thread *td, struct mmap_args *uap) } int +kern_mmap_maxprot(struct proc *p, int prot) +{ + + if ((p->p_flag2 & P2_PROTMAX_DISABLE) != 0 || + (p->p_fctl0 & NT_FREEBSD_FCTL_PROTMAX_DISABLE) != 0) + return (_PROT_ALL); + if (((p->p_flag2 & P2_PROTMAX_ENABLE) != 0 || imply_prot_max) && + prot != PROT_NONE) + return (prot); + return (_PROT_ALL); +} + +int kern_mmap(struct thread *td, uintptr_t addr0, size_t len, int prot, int flags, int fd, off_t pos) { @@ -206,12 +220,9 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t l /* * Always honor PROT_MAX if set. If not, default to all * permissions unless we're implying maximum permissions. - * - * XXX: should be tunable per process and ABI. */ if (max_prot == 0) - max_prot = (imply_prot_max && prot != PROT_NONE) ? - prot : _PROT_ALL; + max_prot = kern_mmap_maxprot(p, prot); vms = p->p_vmspace; fp = NULL; From owner-svn-src-all@freebsd.org Tue Jul 2 19:12:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD36115DB01E; Tue, 2 Jul 2019 19:12:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F1716BEB8; Tue, 2 Jul 2019 19:12:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2272E918; Tue, 2 Jul 2019 19:12:03 +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 x62JC3UO096458; Tue, 2 Jul 2019 19:12:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62JC2Cu096456; Tue, 2 Jul 2019 19:12:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907021912.x62JC2Cu096456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 2 Jul 2019 19:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349610 - head/usr.bin/proccontrol X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.bin/proccontrol X-SVN-Commit-Revision: 349610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F1716BEB8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 19:12:03 -0000 Author: kib Date: Tue Jul 2 19:12:02 2019 New Revision: 349610 URL: https://svnweb.freebsd.org/changeset/base/349610 Log: Add implicit PROT_MAX() knob to proccontrol(1). Reviewed by: emaste, markj (previous version) Discussed with: brooks Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D20795 Modified: head/usr.bin/proccontrol/proccontrol.1 head/usr.bin/proccontrol/proccontrol.c Modified: head/usr.bin/proccontrol/proccontrol.1 ============================================================================== --- head/usr.bin/proccontrol/proccontrol.1 Tue Jul 2 19:07:17 2019 (r349609) +++ head/usr.bin/proccontrol/proccontrol.1 Tue Jul 2 19:12:02 2019 (r349610) @@ -66,6 +66,9 @@ Note that process is only allowed to enable tracing fo not for any other process. .It Ar trapcap Controls the signalling of capability mode access violations. +.It Ar protmax +Controls the implicit PROT_MAX application for +.Xr mmap 2 . .It Ar kpti Controls the KPTI enable, AMD64 only. .El Modified: head/usr.bin/proccontrol/proccontrol.c ============================================================================== --- head/usr.bin/proccontrol/proccontrol.c Tue Jul 2 19:07:17 2019 (r349609) +++ head/usr.bin/proccontrol/proccontrol.c Tue Jul 2 19:12:02 2019 (r349610) @@ -43,6 +43,7 @@ enum { MODE_INVALID, MODE_TRACE, MODE_TRAPCAP, + MODE_PROTMAX, #ifdef PROC_KPTI_CTL MODE_KPTI, #endif @@ -72,7 +73,7 @@ static void __dead2 usage(void) { - fprintf(stderr, "Usage: proccontrol -m (aslr|trace|trapcap" + fprintf(stderr, "Usage: proccontrol -m (aslr|protmax|trace|trapcap" KPTI_USAGE") [-q] " "[-s (enable|disable)] [-p pid | command]\n"); exit(1); @@ -94,6 +95,8 @@ main(int argc, char *argv[]) case 'm': if (strcmp(optarg, "aslr") == 0) mode = MODE_ASLR; + else if (strcmp(optarg, "protmax") == 0) + mode = MODE_PROTMAX; else if (strcmp(optarg, "trace") == 0) mode = MODE_TRACE; else if (strcmp(optarg, "trapcap") == 0) @@ -147,6 +150,9 @@ main(int argc, char *argv[]) case MODE_TRAPCAP: error = procctl(P_PID, pid, PROC_TRAPCAP_STATUS, &arg); break; + case MODE_PROTMAX: + error = procctl(P_PID, pid, PROC_PROTMAX_STATUS, &arg); + break; #ifdef PROC_KPTI_CTL case MODE_KPTI: error = procctl(P_PID, pid, PROC_KPTI_STATUS, &arg); @@ -194,6 +200,23 @@ main(int argc, char *argv[]) break; } break; + case MODE_PROTMAX: + switch (arg & ~PROC_PROTMAX_ACTIVE) { + case PROC_PROTMAX_FORCE_ENABLE: + printf("force enabled"); + break; + case PROC_PROTMAX_FORCE_DISABLE: + printf("force disabled"); + break; + case PROC_PROTMAX_NOFORCE: + printf("not forced"); + break; + } + if ((arg & PROC_PROTMAX_ACTIVE) != 0) + printf(", active\n"); + else + printf(", not active\n"); + break; #ifdef PROC_KPTI_CTL case MODE_KPTI: switch (arg & ~PROC_KPTI_STATUS_ACTIVE) { @@ -227,6 +250,11 @@ main(int argc, char *argv[]) arg = enable ? PROC_TRAPCAP_CTL_ENABLE : PROC_TRAPCAP_CTL_DISABLE; error = procctl(P_PID, pid, PROC_TRAPCAP_CTL, &arg); + break; + case MODE_PROTMAX: + arg = enable ? PROC_PROTMAX_FORCE_ENABLE : + PROC_PROTMAX_FORCE_DISABLE; + error = procctl(P_PID, pid, PROC_PROTMAX_CTL, &arg); break; #ifdef PROC_KPTI_CTL case MODE_KPTI: From owner-svn-src-all@freebsd.org Tue Jul 2 19:32:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC4B915DB7A4; Tue, 2 Jul 2019 19:32:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 478AE6CEA4; Tue, 2 Jul 2019 19:32:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C9E7CF3; Tue, 2 Jul 2019 19:32:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62JWm26008956; Tue, 2 Jul 2019 19:32:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62JWmRv008955; Tue, 2 Jul 2019 19:32:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907021932.x62JWmRv008955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 2 Jul 2019 19:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349611 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 349611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 478AE6CEA4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 19:32:49 -0000 Author: kib Date: Tue Jul 2 19:32:48 2019 New Revision: 349611 URL: https://svnweb.freebsd.org/changeset/base/349611 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Tue Jul 2 19:12:02 2019 (r349610) +++ head/sys/kern/kern_umtx.c Tue Jul 2 19:32:48 2019 (r349611) @@ -2893,7 +2893,8 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock break; } - if (!(state & URWLOCK_WRITE_OWNER) && URWLOCK_READER_COUNT(state) == 0) { + if ((state & URWLOCK_WRITE_OWNER) == 0 && + URWLOCK_READER_COUNT(state) == 0) { umtxq_unbusy_unlocked(&uq->uq_key); error = umtxq_check_susp(td); if (error != 0) @@ -2908,9 +2909,10 @@ sleep: error = EFAULT; break; } - suword32(&rwlock->rw_blocked_writers, blocked_writers+1); + suword32(&rwlock->rw_blocked_writers, blocked_writers + 1); - while ((state & URWLOCK_WRITE_OWNER) || URWLOCK_READER_COUNT(state) != 0) { + while ((state & URWLOCK_WRITE_OWNER) || + URWLOCK_READER_COUNT(state) != 0) { umtxq_lock(&uq->uq_key); umtxq_insert_queue(uq, UMTX_EXCLUSIVE_QUEUE); umtxq_unbusy(&uq->uq_key); From owner-svn-src-all@freebsd.org Tue Jul 2 19:51:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB13D15DBF90; Tue, 2 Jul 2019 19:51:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AC6D6D706; Tue, 2 Jul 2019 19:51: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55A3E1003; Tue, 2 Jul 2019 19:51: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 x62JpfDW018485; Tue, 2 Jul 2019 19:51:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62JpfAl018483; Tue, 2 Jul 2019 19:51:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907021951.x62JpfAl018483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 2 Jul 2019 19:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349612 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8AC6D6D706 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 19:51:42 -0000 Author: markj Date: Tue Jul 2 19:51:40 2019 New Revision: 349612 URL: https://svnweb.freebsd.org/changeset/base/349612 Log: Mark pages allocated from the per-CPU cache. Only free pages to the cache when they were allocated from that cache. This mitigates rapid fragmentation of physical memory seen during poudriere's dependency calculation phase. In particular, pages belonging to broken reservations are no longer freed to the per-CPU cache, so they get a chance to coalesce with freed pages during the break. Otherwise, the optimized CoW handler may create object chains in which multiple objects contain pages from the same reservation, and the order in which we do object termination means that the reservation is broken before all of those pages are freed, so some of them end up in the per-CPU cache and thus permanently fragment physical memory. The flag may also be useful for eliding calls to vm_reserv_free_page(), thus avoiding memory accesses for data that is likely not present in the CPU caches. Reviewed by: alc Discussed with: jeff MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20763 Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Jul 2 19:32:48 2019 (r349611) +++ head/sys/vm/vm_page.c Tue Jul 2 19:51:40 2019 (r349612) @@ -1812,8 +1812,9 @@ vm_page_alloc_domain_after(vm_object_t object, vm_pind if (object != NULL) VM_OBJECT_ASSERT_WLOCKED(object); -again: + flags = 0; m = NULL; +again: #if VM_NRESERVLEVEL > 0 /* * Can we allocate the page from a reservation? @@ -1829,8 +1830,10 @@ again: vmd = VM_DOMAIN(domain); if (object != NULL && vmd->vmd_pgcache != NULL) { m = uma_zalloc(vmd->vmd_pgcache, M_NOWAIT); - if (m != NULL) + if (m != NULL) { + flags |= PG_PCPU_CACHE; goto found; + } } if (vm_domain_allocate(vmd, req, 1)) { /* @@ -1858,10 +1861,8 @@ again: } /* - * At this point we had better have found a good page. + * At this point we had better have found a good page. */ - KASSERT(m != NULL, ("missing page")); - found: vm_page_dequeue(m); vm_page_alloc_check(m); @@ -1869,10 +1870,8 @@ found: /* * Initialize the page. Only the PG_ZERO flag is inherited. */ - flags = 0; if ((req & VM_ALLOC_ZERO) != 0) - flags = PG_ZERO; - flags &= m->flags; + flags |= (m->flags & PG_ZERO); if ((req & VM_ALLOC_NODUMP) != 0) flags |= PG_NODUMP; m->flags = flags; @@ -2018,6 +2017,7 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pin * Can we allocate the pages without the number of free pages falling * below the lower bound for the allocation class? */ + m_ret = NULL; again: #if VM_NRESERVLEVEL > 0 /* @@ -2031,7 +2031,6 @@ again: goto found; } #endif - m_ret = NULL; vmd = VM_DOMAIN(domain); if (vm_domain_allocate(vmd, req, npages)) { /* @@ -3506,7 +3505,7 @@ vm_page_free_toq(vm_page_t m) return; vmd = vm_pagequeue_domain(m); - if (m->pool == VM_FREEPOOL_DEFAULT && vmd->vmd_pgcache != NULL) { + if ((m->flags & PG_PCPU_CACHE) != 0 && vmd->vmd_pgcache != NULL) { uma_zfree(vmd->vmd_pgcache, m); return; } Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Tue Jul 2 19:32:48 2019 (r349611) +++ head/sys/vm/vm_page.h Tue Jul 2 19:51:40 2019 (r349612) @@ -379,6 +379,7 @@ extern struct mtx_padalign pa_lock[]; * Page flags. If changed at any other time than page allocation or * freeing, the modification must be protected by the vm_page lock. */ +#define PG_PCPU_CACHE 0x0001 /* was allocated from per-CPU caches */ #define PG_FICTITIOUS 0x0004 /* physical page doesn't exist */ #define PG_ZERO 0x0008 /* page is zeroed */ #define PG_MARKER 0x0010 /* special queue marker page */ From owner-svn-src-all@freebsd.org Tue Jul 2 20:32:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27ACF15DCB64; Tue, 2 Jul 2019 20:32:36 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C20556ED38; Tue, 2 Jul 2019 20:32:35 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 705461702; Tue, 2 Jul 2019 20:32:35 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62KWZbe040672; Tue, 2 Jul 2019 20:32:35 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62KWZQD040671; Tue, 2 Jul 2019 20:32:35 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201907022032.x62KWZQD040671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 2 Jul 2019 20:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349613 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 349613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C20556ED38 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 20:32:36 -0000 Author: tsoome Date: Tue Jul 2 20:32:35 2019 New Revision: 349613 URL: https://svnweb.freebsd.org/changeset/base/349613 Log: efihttp: mac and err can be used uninitialized While there, also check if mac != NULL, and use pointer compare for ipv4 and dns. Modified: head/stand/efi/libefi/efihttp.c Modified: head/stand/efi/libefi/efihttp.c ============================================================================== --- head/stand/efi/libefi/efihttp.c Tue Jul 2 19:51:40 2019 (r349612) +++ head/stand/efi/libefi/efihttp.c Tue Jul 2 20:32:35 2019 (r349613) @@ -127,9 +127,11 @@ setup_ipv4_config2(EFI_HANDLE handle, MAC_ADDR_DEVICE_ (void **)&ip4config2, IH, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL); if (EFI_ERROR(status)) return (efi_status_to_errno(status)); - if (ipv4) { - setenv("boot.netif.hwaddr", - ether_sprintf((u_char *)mac->MacAddress.Addr), 1); + if (ipv4 != NULL) { + if (mac != NULL) { + setenv("boot.netif.hwaddr", + ether_sprintf((u_char *)mac->MacAddress.Addr), 1); + } setenv("boot.netif.ip", inet_ntoa(*(struct in_addr *)ipv4->LocalIpAddress.Addr), 1); setenv("boot.netif.netmask", @@ -160,7 +162,7 @@ setup_ipv4_config2(EFI_HANDLE handle, MAC_ADDR_DEVICE_ return (efi_status_to_errno(status)); } - if (dns) { + if (dns != NULL) { status = ip4config2->SetData(ip4config2, Ip4Config2DataTypeDnsServer, sizeof(EFI_IPv4_ADDRESS), &dns->DnsServerIp); @@ -252,6 +254,7 @@ efihttp_dev_open(struct open_file *f, ...) status = BS->LocateDevicePath(&httpsb_guid, &devpath, &handle); if (EFI_ERROR(status)) return (efi_status_to_errno(status)); + mac = NULL; ipv4 = NULL; dns = NULL; uri = NULL; @@ -662,7 +665,7 @@ static int efihttp_fs_read(struct open_file *f, void *buf, size_t size, size_t *resid) { size_t res; - int err; + int err = 0; while (size > 0) { err = _efihttp_fs_read(f, buf, size, &res); From owner-svn-src-all@freebsd.org Tue Jul 2 21:03:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2C1915DDB83; Tue, 2 Jul 2019 21:03:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6495770376; Tue, 2 Jul 2019 21:03:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B7A11C1D; Tue, 2 Jul 2019 21:03:07 +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 x62L37vh056739; Tue, 2 Jul 2019 21:03:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62L37Od056738; Tue, 2 Jul 2019 21:03:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907022103.x62L37Od056738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 2 Jul 2019 21:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349614 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 349614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6495770376 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 21:03:08 -0000 Author: kib Date: Tue Jul 2 21:03:06 2019 New Revision: 349614 URL: https://svnweb.freebsd.org/changeset/base/349614 Log: More style. Re-wrap long lines, reformat comments, remove excessive blank line. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Tue Jul 2 20:32:35 2019 (r349613) +++ head/sys/kern/kern_umtx.c Tue Jul 2 21:03:06 2019 (r349614) @@ -1059,7 +1059,6 @@ do_lock_normal(struct thread *td, struct umutex *m, ui if (owner == UMUTEX_RB_NOTRECOV) return (ENOTRECOVERABLE); - /* * Try the uncontested case. This should be * done in userland. @@ -2658,7 +2657,8 @@ do_rw_rdlock(struct thread *td, struct urwlock *rwlock /* try to lock it */ while (!(state & wrflags)) { - if (__predict_false(URWLOCK_READER_COUNT(state) == URWLOCK_MAX_READERS)) { + if (__predict_false(URWLOCK_READER_COUNT(state) == + URWLOCK_MAX_READERS)) { umtx_key_release(&uq->uq_key); return (EAGAIN); } @@ -2725,7 +2725,10 @@ do_rw_rdlock(struct thread *td, struct urwlock *rwlock } sleep: - /* contention bit is set, before sleeping, increase read waiter count */ + /* + * Contention bit is set, before sleeping, increase + * read waiter count. + */ rv = fueword32(&rwlock->rw_blocked_readers, &blocked_readers); if (rv == -1) { @@ -2829,7 +2832,8 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock umtx_key_release(&uq->uq_key); return (EFAULT); } - while (!(state & URWLOCK_WRITE_OWNER) && URWLOCK_READER_COUNT(state) == 0) { + while ((state & URWLOCK_WRITE_OWNER) == 0 && + URWLOCK_READER_COUNT(state) == 0) { rv = casueword32(&rwlock->rw_state, state, &oldstate, state | URWLOCK_WRITE_OWNER); if (rv == -1) { @@ -2865,8 +2869,8 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock umtxq_unlock(&uq->uq_key); /* - * re-read the state, in case it changed between the try-lock above - * and the check below + * Re-read the state, in case it changed between the + * try-lock above and the check below. */ rv = fueword32(&rwlock->rw_state, &state); if (rv == -1) From owner-svn-src-all@freebsd.org Tue Jul 2 22:11:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ADC115DED4C; Tue, 2 Jul 2019 22:11:08 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C485471F18; Tue, 2 Jul 2019 22:11:07 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E4F6273F; Tue, 2 Jul 2019 22:11:07 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62MB7wc088173; Tue, 2 Jul 2019 22:11:07 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62MB7Wo088172; Tue, 2 Jul 2019 22:11:07 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201907022211.x62MB7Wo088172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 2 Jul 2019 22:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349615 - head/libexec/rtld-elf/rtld-libc X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/libexec/rtld-elf/rtld-libc X-SVN-Commit-Revision: 349615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C485471F18 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 22:11:08 -0000 Author: arichardson Date: Tue Jul 2 22:11:07 2019 New Revision: 349615 URL: https://svnweb.freebsd.org/changeset/base/349615 Log: Fix build race when building rtld I found this on one of the CheriBSD Jenkins builders. Using beforelinking instead of ${PROG} should fix the dependency for the DEBUG_FILES case. Reviewed by: brooks Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- head/libexec/rtld-elf/rtld-libc/Makefile.inc Tue Jul 2 21:03:06 2019 (r349614) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Tue Jul 2 22:11:07 2019 (r349615) @@ -98,4 +98,4 @@ rtld_libc.a: ${LIBC_NOSSP_PIC} ${SRCTOP}/libexec/rtld- ${AR} cr ${.OBJDIR}/${.TARGET} ${_rtld_libc_objs} CLEANFILES+=rtld_libc.a LDADD+=${.OBJDIR}/rtld_libc.a -${PROG}: rtld_libc.a +beforelinking: rtld_libc.a From owner-svn-src-all@freebsd.org Tue Jul 2 22:57:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B017015DF82D; Tue, 2 Jul 2019 22:57:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52189732DE; Tue, 2 Jul 2019 22:57:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37C3A2F4A; Tue, 2 Jul 2019 22:57:25 +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 x62MvPFZ014436; Tue, 2 Jul 2019 22:57:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62MvO48014435; Tue, 2 Jul 2019 22:57:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201907022257.x62MvO48014435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jul 2019 22:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349616 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 349616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 52189732DE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 22:57:25 -0000 Author: jhb Date: Tue Jul 2 22:57:24 2019 New Revision: 349616 URL: https://svnweb.freebsd.org/changeset/base/349616 Log: Fix description of debug.obsolete_panic. MFC after: 1 week Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Tue Jul 2 22:11:07 2019 (r349615) +++ head/sys/kern/subr_bus.c Tue Jul 2 22:57:24 2019 (r349616) @@ -5922,8 +5922,9 @@ devctl2_init(void) */ static int obsolete_panic = 0; SYSCTL_INT(_debug, OID_AUTO, obsolete_panic, CTLFLAG_RWTUN, &obsolete_panic, 0, - "Bus debug level"); -/* 0 - don't panic, 1 - panic if already obsolete, 2 - panic if deprecated */ + "Panic when obsolete features are used (0 = never, 1 = if osbolete, " + "2 = if deprecated)"); + static void gone_panic(int major, int running, const char *msg) { From owner-svn-src-all@freebsd.org Tue Jul 2 22:58:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E70DE15DF89A; Tue, 2 Jul 2019 22:58:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D3A37342F; Tue, 2 Jul 2019 22:58:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 663F52F4B; Tue, 2 Jul 2019 22:58:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62MwM8x014516; Tue, 2 Jul 2019 22:58:22 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62MwMhW014515; Tue, 2 Jul 2019 22:58:22 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201907022258.x62MwMhW014515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jul 2019 22:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349617 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 349617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8D3A37342F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 22:58:23 -0000 Author: jhb Date: Tue Jul 2 22:58:21 2019 New Revision: 349617 URL: https://svnweb.freebsd.org/changeset/base/349617 Log: Invoke ext_free function when freeing an unmapped mbuf. Fix a mis-merge when extracting the unmapped mbuf changes from Netflix's in-kernel TLS changes where the call to the function that freed the backing pages from an unmapped mbuf was missed. Sponsored by: Chelsio Communications Modified: head/sys/kern/kern_mbuf.c Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Tue Jul 2 22:57:24 2019 (r349616) +++ head/sys/kern/kern_mbuf.c Tue Jul 2 22:58:21 2019 (r349617) @@ -1282,6 +1282,9 @@ mb_free_ext(struct mbuf *m) uma_zfree(zone_mbuf, mref); break; case EXT_PGS: + KASSERT(mref->m_ext.ext_free != NULL, + ("%s: ext_free not set", __func__)); + mref->m_ext.ext_free(mref); uma_zfree(zone_extpgs, mref->m_ext.ext_pgs); uma_zfree(zone_mbuf, mref); break; From owner-svn-src-all@freebsd.org Tue Jul 2 23:02:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 481DF15DFAA9; Tue, 2 Jul 2019 23:02:53 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC1E173849; Tue, 2 Jul 2019 23:02:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B792630EA; Tue, 2 Jul 2019 23:02:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62N2qKZ019500; Tue, 2 Jul 2019 23:02:52 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62N2qKm019499; Tue, 2 Jul 2019 23:02:52 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201907022302.x62N2qKm019499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 2 Jul 2019 23:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349618 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 349618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DC1E173849 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 23:02:53 -0000 Author: alc Date: Tue Jul 2 23:02:52 2019 New Revision: 349618 URL: https://svnweb.freebsd.org/changeset/base/349618 Log: Implement pmap_copy(). (This includes the changes applied to the amd64 pmap_copy() in r349585.) Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D20790 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Tue Jul 2 22:58:21 2019 (r349617) +++ head/sys/arm64/arm64/pmap.c Tue Jul 2 23:02:52 2019 (r349618) @@ -3875,12 +3875,153 @@ pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t * in the destination map. * * This routine is only advisory and need not do anything. + * + * Because the executable mappings created by this routine are copied, + * it should not have to flush the instruction cache. */ - void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, vm_offset_t src_addr) { + struct rwlock *lock; + struct spglist free; + pd_entry_t *l0, *l1, *l2, srcptepaddr; + pt_entry_t *dst_pte, ptetemp, *src_pte; + vm_offset_t addr, end_addr, va_next; + vm_page_t dst_l2pg, dstmpte, srcmpte; + + if (dst_addr != src_addr) + return; + end_addr = src_addr + len; + lock = NULL; + if (dst_pmap < src_pmap) { + PMAP_LOCK(dst_pmap); + PMAP_LOCK(src_pmap); + } else { + PMAP_LOCK(src_pmap); + PMAP_LOCK(dst_pmap); + } + for (addr = src_addr; addr < end_addr; addr = va_next) { + l0 = pmap_l0(src_pmap, addr); + if (pmap_load(l0) == 0) { + va_next = (addr + L0_SIZE) & ~L0_OFFSET; + if (va_next < addr) + va_next = end_addr; + continue; + } + l1 = pmap_l0_to_l1(l0, addr); + if (pmap_load(l1) == 0) { + va_next = (addr + L1_SIZE) & ~L1_OFFSET; + if (va_next < addr) + va_next = end_addr; + continue; + } + va_next = (addr + L2_SIZE) & ~L2_OFFSET; + if (va_next < addr) + va_next = end_addr; + l2 = pmap_l1_to_l2(l1, addr); + srcptepaddr = pmap_load(l2); + if (srcptepaddr == 0) + continue; + if ((srcptepaddr & ATTR_DESCR_MASK) == L2_BLOCK) { + if ((addr & L2_OFFSET) != 0 || + addr + L2_SIZE > end_addr) + continue; + dst_l2pg = pmap_alloc_l2(dst_pmap, addr, NULL); + if (dst_l2pg == NULL) + break; + l2 = (pd_entry_t *) + PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dst_l2pg)); + l2 = &l2[pmap_l2_index(addr)]; + if (pmap_load(l2) == 0 && + ((srcptepaddr & ATTR_SW_MANAGED) == 0 || + pmap_pv_insert_l2(dst_pmap, addr, srcptepaddr, + PMAP_ENTER_NORECLAIM, &lock))) { + (void)pmap_load_store(l2, srcptepaddr & + ~ATTR_SW_WIRED); + pmap_resident_count_inc(dst_pmap, L2_SIZE / + PAGE_SIZE); + atomic_add_long(&pmap_l2_mappings, 1); + } else + dst_l2pg->wire_count--; + continue; + } + KASSERT((srcptepaddr & ATTR_DESCR_MASK) == L2_TABLE, + ("pmap_copy: invalid L2 entry")); + srcptepaddr &= ~ATTR_MASK; + srcmpte = PHYS_TO_VM_PAGE(srcptepaddr); + KASSERT(srcmpte->wire_count > 0, + ("pmap_copy: source page table page is unused")); + if (va_next > end_addr) + va_next = end_addr; + src_pte = (pt_entry_t *)PHYS_TO_DMAP(srcptepaddr); + src_pte = &src_pte[pmap_l3_index(addr)]; + dstmpte = NULL; + for (; addr < va_next; addr += PAGE_SIZE, src_pte++) { + ptetemp = pmap_load(src_pte); + + /* + * We only virtual copy managed pages. + */ + if ((ptetemp & ATTR_SW_MANAGED) == 0) + continue; + + if (dstmpte != NULL) { + KASSERT(dstmpte->pindex == pmap_l2_pindex(addr), + ("dstmpte pindex/addr mismatch")); + dstmpte->wire_count++; + } else if ((dstmpte = pmap_alloc_l3(dst_pmap, addr, + NULL)) == NULL) + goto out; + dst_pte = (pt_entry_t *) + PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dstmpte)); + dst_pte = &dst_pte[pmap_l3_index(addr)]; + if (pmap_load(dst_pte) == 0 && + pmap_try_insert_pv_entry(dst_pmap, addr, + PHYS_TO_VM_PAGE(ptetemp & ~ATTR_MASK), &lock)) { + /* + * Clear the wired, modified, and accessed + * (referenced) bits during the copy. + * + * XXX not yet + */ + (void)pmap_load_store(dst_pte, ptetemp & + ~ATTR_SW_WIRED); + pmap_resident_count_inc(dst_pmap, 1); + } else { + SLIST_INIT(&free); + if (pmap_unwire_l3(dst_pmap, addr, dstmpte, + &free)) { + /* + * Although "addr" is not mapped, + * paging-structure caches could + * nonetheless have entries that refer + * to the freed page table pages. + * Invalidate those entries. + * + * XXX redundant invalidation + */ + pmap_invalidate_page(dst_pmap, addr); + vm_page_free_pages_toq(&free, true); + } + goto out; + } + /* Have we copied all of the valid mappings? */ + if (dstmpte->wire_count >= srcmpte->wire_count) + break; + } + } +out: + /* + * XXX This barrier may not be needed because the destination pmap is + * not active. + */ + dsb(ishst); + + if (lock != NULL) + rw_wunlock(lock); + PMAP_UNLOCK(src_pmap); + PMAP_UNLOCK(dst_pmap); } /* From owner-svn-src-all@freebsd.org Tue Jul 2 23:56:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA1A215E0914; Tue, 2 Jul 2019 23:56:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70DAE753A8; Tue, 2 Jul 2019 23:56:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 474BF3BD1; Tue, 2 Jul 2019 23:56:38 +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 x62NucZn045582; Tue, 2 Jul 2019 23:56:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62Nuc7F045581; Tue, 2 Jul 2019 23:56:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201907022356.x62Nuc7F045581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jul 2019 23:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349619 - head/lib/libc/iconv X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/iconv X-SVN-Commit-Revision: 349619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 70DAE753A8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 23:56:39 -0000 Author: emaste Date: Tue Jul 2 23:56:37 2019 New Revision: 349619 URL: https://svnweb.freebsd.org/changeset/base/349619 Log: libc: correct iconv buffer overflow admbugs: 920 Submitted by: Andrea Venturoli, gabor Reported by: Andrea Venturoli , NetFence Security: CVE-2019-5600 Security: FreeBSD-SA-19:09.iconv Modified: head/lib/libc/iconv/citrus_none.c Modified: head/lib/libc/iconv/citrus_none.c ============================================================================== --- head/lib/libc/iconv/citrus_none.c Tue Jul 2 23:02:52 2019 (r349618) +++ head/lib/libc/iconv/citrus_none.c Tue Jul 2 23:56:37 2019 (r349619) @@ -144,7 +144,7 @@ _citrus_NONE_stdenc_cstomb(struct _citrus_stdenc * __r s[2] = (char)(idx >> 16); *nresult = 3; } else { - if (n < 3) { + if (n < 4) { *nresult = (size_t)-1; return (E2BIG); } From owner-svn-src-all@freebsd.org Tue Jul 2 23:59:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BC9415E0B75; Tue, 2 Jul 2019 23:59:48 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D652B75527; Tue, 2 Jul 2019 23:59:47 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 549063BD3; Tue, 2 Jul 2019 23:59:47 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x62Nxlt2045774; Tue, 2 Jul 2019 23:59:47 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x62Nxkps045767; Tue, 2 Jul 2019 23:59:46 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201907022359.x62Nxkps045767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 2 Jul 2019 23:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349620 - in releng: 11.2/contrib/tzdata 11.3/contrib/tzdata 12.0/contrib/tzdata X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 11.2/contrib/tzdata 11.3/contrib/tzdata 12.0/contrib/tzdata X-SVN-Commit-Revision: 349620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D652B75527 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2019 23:59:48 -0000 Author: gordon Date: Tue Jul 2 23:59:45 2019 New Revision: 349620 URL: https://svnweb.freebsd.org/changeset/base/349620 Log: Import tzdata 2019b. Approved by: so Approved by: re (implicit) Security: FreeBSD-EN-19:12.tzdata Modified: releng/11.2/contrib/tzdata/Makefile releng/11.2/contrib/tzdata/NEWS releng/11.2/contrib/tzdata/africa releng/11.2/contrib/tzdata/antarctica releng/11.2/contrib/tzdata/asia releng/11.2/contrib/tzdata/australasia releng/11.2/contrib/tzdata/backzone releng/11.2/contrib/tzdata/checktab.awk releng/11.2/contrib/tzdata/europe releng/11.2/contrib/tzdata/factory releng/11.2/contrib/tzdata/northamerica releng/11.2/contrib/tzdata/pacificnew releng/11.2/contrib/tzdata/southamerica releng/11.2/contrib/tzdata/systemv releng/11.2/contrib/tzdata/theory.html releng/11.2/contrib/tzdata/version releng/11.2/contrib/tzdata/zishrink.awk releng/11.2/contrib/tzdata/zone.tab releng/11.2/contrib/tzdata/zone1970.tab releng/11.2/contrib/tzdata/zoneinfo2tdf.pl releng/11.3/contrib/tzdata/Makefile releng/11.3/contrib/tzdata/NEWS releng/11.3/contrib/tzdata/africa releng/11.3/contrib/tzdata/antarctica releng/11.3/contrib/tzdata/asia releng/11.3/contrib/tzdata/australasia releng/11.3/contrib/tzdata/backzone releng/11.3/contrib/tzdata/checktab.awk releng/11.3/contrib/tzdata/europe releng/11.3/contrib/tzdata/factory releng/11.3/contrib/tzdata/northamerica releng/11.3/contrib/tzdata/pacificnew releng/11.3/contrib/tzdata/southamerica releng/11.3/contrib/tzdata/systemv releng/11.3/contrib/tzdata/theory.html releng/11.3/contrib/tzdata/version releng/11.3/contrib/tzdata/zishrink.awk releng/11.3/contrib/tzdata/zone.tab releng/11.3/contrib/tzdata/zone1970.tab releng/11.3/contrib/tzdata/zoneinfo2tdf.pl releng/12.0/contrib/tzdata/Makefile releng/12.0/contrib/tzdata/NEWS releng/12.0/contrib/tzdata/africa releng/12.0/contrib/tzdata/antarctica releng/12.0/contrib/tzdata/asia releng/12.0/contrib/tzdata/australasia releng/12.0/contrib/tzdata/backzone releng/12.0/contrib/tzdata/checktab.awk releng/12.0/contrib/tzdata/europe releng/12.0/contrib/tzdata/factory releng/12.0/contrib/tzdata/northamerica releng/12.0/contrib/tzdata/pacificnew releng/12.0/contrib/tzdata/southamerica releng/12.0/contrib/tzdata/systemv releng/12.0/contrib/tzdata/theory.html releng/12.0/contrib/tzdata/version releng/12.0/contrib/tzdata/zishrink.awk releng/12.0/contrib/tzdata/zone.tab releng/12.0/contrib/tzdata/zone1970.tab releng/12.0/contrib/tzdata/zoneinfo2tdf.pl Modified: releng/11.2/contrib/tzdata/Makefile ============================================================================== --- releng/11.2/contrib/tzdata/Makefile Tue Jul 2 23:56:37 2019 (r349619) +++ releng/11.2/contrib/tzdata/Makefile Tue Jul 2 23:59:45 2019 (r349620) @@ -35,11 +35,13 @@ DATAFORM= main LOCALTIME= GMT -# If you want something other than Eastern United States time as a template -# for handling ruleless POSIX-style timezone environment variables, +# The POSIXRULES macro controls interpretation of nonstandard and obsolete +# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules. +# In the reference implementation, if you want something other than Eastern +# United States time as a template for handling these settings, you can # change the line below (after finding the timezone you want in the # one of the $(TDATA) source files, or adding it to a source file). -# A ruleless environment setting like TZ='CST6CDT' uses the rules in the +# A setting like TZ='EET-2EEST' is supposed to use the rules in the # template file to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. @@ -49,6 +51,17 @@ LOCALTIME= GMT # Use the command # make zonenames # to get a list of the values you can use for POSIXRULES. +# +# If POSIXRULES is empty, no template is installed; this is the intended +# future default for POSIXRULES. +# +# Nonempty POSIXRULES is obsolete and should not be relied on, because: +# * It does not work correctly in popular implementations such as GNU/Linux. +# * It does not work in the tzdb implementation for timestamps after 2037. +# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions +# at standard time or UT rather than at local time. +# In short, software should avoid ruleless settings like TZ='EET-2EEST' +# and so should not depend on the value of POSIXRULES. POSIXRULES= America/New_York @@ -231,6 +244,13 @@ LDLIBS= # other than simply getting garbage data # -DUSE_LTZ=0 to build zdump with the system time zone library # Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below. +# -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and +# similarly for "fat". Fat TZif files work around incompatibilities +# and bugs in some TZif readers, notably readers that mishandle 64-bit +# data in TZif files. Slim TZif files are more efficient and do not +# work around these incompatibilities and bugs. If not given, the +# current default is "fat" but this is intended to change as readers +# requiring fat files often mishandle timestamps after 2037 anyway. # -DZIC_MAX_ABBR_LEN_WO_WARN=3 # (or some other number) to set the maximum time zone abbreviation length # that zic will accept without a warning (the default is 6) @@ -364,7 +384,9 @@ ZIC= $(zic) $(ZFLAGS) # To shrink the size of installed TZif files, # append "-r @N" to omit data before N-seconds-after-the-Epoch. -# See the zic man page for more about -r. +# You can also append "-b slim" if that is not already the default; +# see ZIC_BLOAT_DEFAULT above. +# See the zic man page for more about -b and -r. ZFLAGS= # How to use zic to install TZif files. @@ -388,6 +410,9 @@ KSHELL= /bin/bash # Name of curl , used for HTML validation. CURL= curl +# Name of GNU Privacy Guard , used to sign distributions. +GPG= gpg + # The path where SGML DTDs are kept and the catalog file(s) to use when # validating HTML 4.01. The default should work on both Debian and Red Hat. SGML_TOPDIR= /usr @@ -562,7 +587,9 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(LIBDIR)' \ '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' - $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) \ + $(ZIC_INSTALL) -l $(LOCALTIME) \ + `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ + ` $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -781,12 +808,6 @@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu - $(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c - $(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \ - LC_ALL=C sort -c - $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ - LC_ALL=C sort -cu touch $@ check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi @@ -1051,7 +1072,7 @@ tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz $(ALL_ASC): - gpg2 --armor --detach-sign $? + $(GPG) --armor --detach-sign $? TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T typecheck: typecheck_long_long typecheck_unsigned Modified: releng/11.2/contrib/tzdata/NEWS ============================================================================== --- releng/11.2/contrib/tzdata/NEWS Tue Jul 2 23:56:37 2019 (r349619) +++ releng/11.2/contrib/tzdata/NEWS Tue Jul 2 23:59:45 2019 (r349620) @@ -1,8 +1,102 @@ News for the tz database -Release 20198 - 2019-03-25 22:01:33 -0700 +Release 2019b - 2019-07-01 00:09:53 -0700 Briefly: + Brazil no longer observes DST. + 'zic -b slim' outputs smaller TZif files; please try it out. + Palestine's 2019 spring-forward transition was on 03-29, not 03-30. + + Changes to future timestamps + + Brazil has canceled DST and will stay on standard time indefinitely. + (Thanks to Steffen Thorsen, Marcus Diniz, and Daniel Soares de + Oliveira.) + + Predictions for Morocco now go through 2087 instead of 2037, to + work around a problem on newlib when using TZif files output by + zic 2019a or earlier. (Problem reported by David Gauchard.) + + Changes to past and future timestamps + + Palestine's 2019 spring transition was 03-29 at 00:00, not 03-30 + at 01:00. (Thanks to Sharef Mustafa and Even Scharning.) Guess + future transitions to be March's last Friday at 00:00. + + Changes to past timestamps + + Hong Kong's 1941-06-15 spring-forward transition was at 03:00, not + 03:30. Its 1945 transition from JST to HKT was on 11-18 at 02:00, + not 09-15 at 00:00. In 1946 its spring-forward transition was on + 04-21 at 00:00, not the previous day at 03:30. From 1946 through + 1952 its fall-back transitions occurred at 04:30, not at 03:30. + In 1947 its fall-back transition was on 11-30, not 12-30. + (Thanks to P Chan.) + + Changes to past time zone abbreviations + + Italy's 1866 transition to Rome Mean Time was on December 12, not + September 22. This affects only the time zone abbreviation for + Europe/Rome between those dates. (Thanks to Stephen Trainor and + Luigi Rosa.) + + Changes affecting metadata only + + Add info about the Crimea situation in zone1970.tab and zone.tab. + (Problem reported by Serhii Demediuk.) + + Changes to code + + zic's new -b option supports a way to control data bloat and to + test for year-2038 bugs in software that reads TZif files. + 'zic -b fat' and 'zic -b slim' generate larger and smaller output; + for example, changing from fat to slim shrinks the Europe/London + file from 3648 to 1599 bytes, saving about 56%. Fat and slim + files represent the same set of timestamps and use the same TZif + format as documented in tzfile(5) and in Internet RFC 8536. + Fat format attempts to work around bugs or incompatibilities in + older software, notably software that mishandles 64-bit TZif data + or uses obsolete TZ strings like "EET-2EEST" that lack DST rules. + Slim format is more efficient and does not work around 64-bit bugs + or obsolete TZ strings. Currently zic defaults to fat format + unless you compile with -DZIC_BLOAT_DEFAULT=\"slim\"; this + out-of-the-box default is intended to change in future releases + as the buggy software often mishandles timestamps anyway. + + zic no longer treats a set of rules ending in 2037 specially. + Previously, zic assumed that such a ruleset meant that future + timestamps could not be predicted, and therefore omitted a + POSIX-like TZ string in the TZif output. The old behavior is no + longer needed for current tzdata, and caused problems with newlib + when used with older tzdata (reported by David Gauchard). + + zic no longer generates some artifact transitions. For example, + Europe/London no longer has a no-op transition in January 1996. + + Changes to build procedure + + tzdata.zi now assumes zic 2017c or later. This shrinks tzdata.zi + by a percent or so. + + Changes to documentation and commentary + + The Makefile now documents the POSIXRULES macro as being obsolete, + and similarly, zic's -p POSIXRULES option is now documented as + being obsolete. Although the POSIXRULES feature still exists and + works as before, in practice it is rarely used for its intended + purpose, and it does not work either in the default reference + implementation (for timestamps after 2037) or in common + implementations such as GNU/Linux (for contemporary timestamps). + Since POSIXRULES was designed primarily as a temporary transition + facility for System V platforms that died off decades ago, it is + being decommissioned rather than institutionalized. + + New info on Bonin Islands and Marcus (thanks to Wakaba and Phake Nick). + + +Release 2019a - 2019-03-25 22:01:33 -0700 + + Briefly: Palestine "springs forward" on 2019-03-30 instead of 2019-03-23. Metlakatla "fell back" to rejoin Alaska Time on 2019-01-20 at 02:00. @@ -481,7 +575,7 @@ Release 2018d - 2018-03-22 07:05:46 -0700 The code is a bit more portable to MS-Windows. Installers can compile with -DRESERVE_STD_EXT_IDS on MS-Windows platforms that reserve identifiers like 'localtime'. (Thanks to Manuela - Friedrich). + Friedrich.) Changes to documentation and commentary @@ -2276,7 +2370,7 @@ Release 2014f - 2014-08-05 17:42:36 -0700 warlord Jin Shuren in the data. Commentary about the coverage of each Russian zone has been standardized. - (Thanks to Tim Parenti). + (Thanks to Tim Parenti.) There is new commentary about contemporary timekeeping in Ethiopia. @@ -2724,7 +2818,7 @@ Release 2013e - 2013-09-19 23:50:04 -0700 Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46. This affects Europe/Zurich timestamps from 1853 to 1894. (Thanks - to Alois Treindl). + to Alois Treindl.) Change the date of the circa-1850 Zurich transition from 1849-09-12 to 1853-07-16, overriding Shanks with data from Messerli about @@ -3034,7 +3128,7 @@ Release 2013a - 2013-02-27 09:20:35 -0800 (Thanks to Arthur David Olson.) Improve the commentary about which districts observe what times - in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson). + in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson.) Add web page links to tz.js. Modified: releng/11.2/contrib/tzdata/africa ============================================================================== --- releng/11.2/contrib/tzdata/africa Tue Jul 2 23:56:37 2019 (r349619) +++ releng/11.2/contrib/tzdata/africa Tue Jul 2 23:59:45 2019 (r349620) @@ -89,7 +89,7 @@ Rule Algeria 1980 only - Apr 25 0:00 1:00 S Rule Algeria 1980 only - Oct 31 2:00 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 0:00 Algeria WE%sT 1940 Feb 25 2:00 @@ -124,7 +124,7 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 # For now, ignore that and follow the 1911-05-26 Portuguese decree # (see Europe/Lisbon). # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia -2:00 - -02 1942 Sep -2:00 1:00 -01 1945 Oct 15 @@ -135,7 +135,7 @@ Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2 # See Africa/Lagos. # Chad -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena 1:00 - WAT 1979 Oct 14 1:00 1:00 WAST 1980 Mar 8 @@ -151,7 +151,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Dja # See Africa/Lagos. # Côte d'Ivoire / Ivory Coast -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Abidjan -0:16:08 - LMT 1912 0:00 - GMT Link Africa/Abidjan Africa/Bamako # Mali @@ -356,7 +356,7 @@ Rule Egypt 2014 only - Jun 26 24:00 0 - Rule Egypt 2014 only - Jul 31 24:00 1:00 S Rule Egypt 2014 only - Sep lastThu 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct 2:00 Egypt EE%sT @@ -414,7 +414,7 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Ghana 1920 1942 - Sep 1 0:00 0:20 - Rule Ghana 1920 1942 - Dec 31 0:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 0:00 Ghana GMT/+0020 @@ -428,13 +428,13 @@ Zone Africa/Accra -0:00:52 - LMT 1918 # evidently confusing the date of the Portuguese decree # (see Europe/Lisbon) with the date that it took effect. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u -1:00 - -01 1975 0:00 - GMT # Kenya -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 2:30 - +0230 1940 @@ -469,7 +469,7 @@ Link Africa/Nairobi Indian/Mayotte # Use the abbreviation "MMT" before 1972, as the more-accurate numeric # abbreviation "-004430" would be one byte over the POSIX limit. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time -0:44:30 - MMT 1972 Jan 7 # approximately MMT @@ -519,7 +519,7 @@ Rule Libya 1997 only - Apr 4 0:00 1:00 S Rule Libya 1997 only - Oct 4 0:00 0 - Rule Libya 2013 only - Mar lastFri 1:00 1:00 S Rule Libya 2013 only - Oct lastFri 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tripoli 0:52:44 - LMT 1920 1:00 Libya CE%sT 1959 2:00 - EET 1982 @@ -629,7 +629,7 @@ Rule Mauritius 1982 only - Oct 10 0:00 1:00 - Rule Mauritius 1983 only - Mar 21 0:00 0 - Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 - Rule Mauritius 2009 only - Mar lastSun 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez @@ -860,18 +860,24 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # the week end after.... The government does not announce yet the decision # about this temporary change. But it s 99% sure that it will be the case, # as in previous years. An unofficial survey was done these days, showing -# that 64% of asked peopke are ok for moving from +1 to +0 during Ramadan. +# that 64% of asked people are ok for moving from +1 to +0 during Ramadan. # https://leconomiste.com/article/1035870-enquete-l-economiste-sunergia-64-des-marocains-plebiscitent-le-gmt-pendant-ramadan + +# From Naoufal Semlali (2019-04-16): +# Morocco will be on GMT starting from Sunday, May 5th 2019 at 3am. +# The switch to GMT+1 will occur on Sunday, June 9th 2019 at 2am.... +# http://fr.le360.ma/societe/voici-la-date-du-retour-a-lheure-legale-au-maroc-188222 # -# From Paul Eggert (2018-11-01): -# For now, guess that Morocco will fall back at 03:00 the last Sunday -# before Ramadan, and spring forward at 02:00 the first Sunday after +# From Paul Eggert (2019-05-20): +# This agrees with our 2018-11-01 guess that the Moroccan government +# would continue the practice of falling back at 03:00 the last Sunday +# before Ramadan, and of springing forward at 02:00 the first Sunday after # Ramadan, as this has been the practice since 2012. To implement this, -# transition dates for 2019 through 2037 were determined by running the -# following program under GNU Emacs 26.1. +# transition dates for 2019 through 2087 were determined by running the +# following program under GNU Emacs 26.2. # (let ((islamic-year 1440)) # (require 'cal-islam) -# (while (< islamic-year 1460) +# (while (< islamic-year 1511) # (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) # (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) # (sunday 0)) @@ -970,8 +976,114 @@ Rule Morocco 2036 only - Oct 19 3:00 -1:00 - Rule Morocco 2036 only - Nov 23 2:00 0 - Rule Morocco 2037 only - Oct 4 3:00 -1:00 - Rule Morocco 2037 only - Nov 15 2:00 0 - +Rule Morocco 2038 only - Sep 26 3:00 -1:00 - +Rule Morocco 2038 only - Oct 31 2:00 0 - +Rule Morocco 2039 only - Sep 18 3:00 -1:00 - +Rule Morocco 2039 only - Oct 23 2:00 0 - +Rule Morocco 2040 only - Sep 2 3:00 -1:00 - +Rule Morocco 2040 only - Oct 14 2:00 0 - +Rule Morocco 2041 only - Aug 25 3:00 -1:00 - +Rule Morocco 2041 only - Sep 29 2:00 0 - +Rule Morocco 2042 only - Aug 10 3:00 -1:00 - +Rule Morocco 2042 only - Sep 21 2:00 0 - +Rule Morocco 2043 only - Aug 2 3:00 -1:00 - +Rule Morocco 2043 only - Sep 6 2:00 0 - +Rule Morocco 2044 only - Jul 24 3:00 -1:00 - +Rule Morocco 2044 only - Aug 28 2:00 0 - +Rule Morocco 2045 only - Jul 9 3:00 -1:00 - +Rule Morocco 2045 only - Aug 20 2:00 0 - +Rule Morocco 2046 only - Jul 1 3:00 -1:00 - +Rule Morocco 2046 only - Aug 5 2:00 0 - +Rule Morocco 2047 only - Jun 23 3:00 -1:00 - +Rule Morocco 2047 only - Jul 28 2:00 0 - +Rule Morocco 2048 only - Jun 7 3:00 -1:00 - +Rule Morocco 2048 only - Jul 19 2:00 0 - +Rule Morocco 2049 only - May 30 3:00 -1:00 - +Rule Morocco 2049 only - Jul 4 2:00 0 - +Rule Morocco 2050 only - May 15 3:00 -1:00 - +Rule Morocco 2050 only - Jun 26 2:00 0 - +Rule Morocco 2051 only - May 7 3:00 -1:00 - +Rule Morocco 2051 only - Jun 11 2:00 0 - +Rule Morocco 2052 only - Apr 28 3:00 -1:00 - +Rule Morocco 2052 only - Jun 2 2:00 0 - +Rule Morocco 2053 only - Apr 13 3:00 -1:00 - +Rule Morocco 2053 only - May 25 2:00 0 - +Rule Morocco 2054 only - Apr 5 3:00 -1:00 - +Rule Morocco 2054 only - May 10 2:00 0 - +Rule Morocco 2055 only - Mar 28 3:00 -1:00 - +Rule Morocco 2055 only - May 2 2:00 0 - +Rule Morocco 2056 only - Mar 12 3:00 -1:00 - +Rule Morocco 2056 only - Apr 23 2:00 0 - +Rule Morocco 2057 only - Mar 4 3:00 -1:00 - +Rule Morocco 2057 only - Apr 8 2:00 0 - +Rule Morocco 2058 only - Feb 17 3:00 -1:00 - +Rule Morocco 2058 only - Mar 31 2:00 0 - +Rule Morocco 2059 only - Feb 9 3:00 -1:00 - +Rule Morocco 2059 only - Mar 16 2:00 0 - +Rule Morocco 2060 only - Feb 1 3:00 -1:00 - +Rule Morocco 2060 only - Mar 7 2:00 0 - +Rule Morocco 2061 only - Jan 16 3:00 -1:00 - +Rule Morocco 2061 only - Feb 27 2:00 0 - +Rule Morocco 2062 only - Jan 8 3:00 -1:00 - +Rule Morocco 2062 only - Feb 12 2:00 0 - +Rule Morocco 2062 only - Dec 31 3:00 -1:00 - +Rule Morocco 2063 only - Feb 4 2:00 0 - +Rule Morocco 2063 only - Dec 16 3:00 -1:00 - +Rule Morocco 2064 only - Jan 20 2:00 0 - +Rule Morocco 2064 only - Dec 7 3:00 -1:00 - +Rule Morocco 2065 only - Jan 11 2:00 0 - +Rule Morocco 2065 only - Nov 22 3:00 -1:00 - +Rule Morocco 2066 only - Jan 3 2:00 0 - +Rule Morocco 2066 only - Nov 14 3:00 -1:00 - +Rule Morocco 2066 only - Dec 19 2:00 0 - +Rule Morocco 2067 only - Nov 6 3:00 -1:00 - +Rule Morocco 2067 only - Dec 11 2:00 0 - +Rule Morocco 2068 only - Oct 21 3:00 -1:00 - +Rule Morocco 2068 only - Dec 2 2:00 0 - +Rule Morocco 2069 only - Oct 13 3:00 -1:00 - +Rule Morocco 2069 only - Nov 17 2:00 0 - +Rule Morocco 2070 only - Oct 5 3:00 -1:00 - +Rule Morocco 2070 only - Nov 9 2:00 0 - +Rule Morocco 2071 only - Sep 20 3:00 -1:00 - +Rule Morocco 2071 only - Oct 25 2:00 0 - +Rule Morocco 2072 only - Sep 11 3:00 -1:00 - +Rule Morocco 2072 only - Oct 16 2:00 0 - +Rule Morocco 2073 only - Aug 27 3:00 -1:00 - +Rule Morocco 2073 only - Oct 8 2:00 0 - +Rule Morocco 2074 only - Aug 19 3:00 -1:00 - +Rule Morocco 2074 only - Sep 23 2:00 0 - +Rule Morocco 2075 only - Aug 11 3:00 -1:00 - +Rule Morocco 2075 only - Sep 15 2:00 0 - +Rule Morocco 2076 only - Jul 26 3:00 -1:00 - +Rule Morocco 2076 only - Sep 6 2:00 0 - +Rule Morocco 2077 only - Jul 18 3:00 -1:00 - +Rule Morocco 2077 only - Aug 22 2:00 0 - +Rule Morocco 2078 only - Jul 10 3:00 -1:00 - +Rule Morocco 2078 only - Aug 14 2:00 0 - +Rule Morocco 2079 only - Jun 25 3:00 -1:00 - +Rule Morocco 2079 only - Jul 30 2:00 0 - +Rule Morocco 2080 only - Jun 16 3:00 -1:00 - +Rule Morocco 2080 only - Jul 21 2:00 0 - +Rule Morocco 2081 only - Jun 1 3:00 -1:00 - +Rule Morocco 2081 only - Jul 13 2:00 0 - +Rule Morocco 2082 only - May 24 3:00 -1:00 - +Rule Morocco 2082 only - Jun 28 2:00 0 - +Rule Morocco 2083 only - May 16 3:00 -1:00 - +Rule Morocco 2083 only - Jun 20 2:00 0 - +Rule Morocco 2084 only - Apr 30 3:00 -1:00 - +Rule Morocco 2084 only - Jun 11 2:00 0 - +Rule Morocco 2085 only - Apr 22 3:00 -1:00 - +Rule Morocco 2085 only - May 27 2:00 0 - +Rule Morocco 2086 only - Apr 14 3:00 -1:00 - +Rule Morocco 2086 only - May 19 2:00 0 - +Rule Morocco 2087 only - Mar 30 3:00 -1:00 - +Rule Morocco 2087 only - May 4 2:00 0 - +# For dates after the somewhat-arbitrary cutoff of 2087, assume that +# Morocco will no longer observe DST. At some point this table will +# need to be extended, though quite possibly Morocco will change the +# rules first. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 0:00 Morocco +00/+01 1984 Mar 16 1:00 - +01 1986 @@ -1001,7 +1113,7 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aai # https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Maputo 2:10:20 - LMT 1903 Mar 2:00 - CAT Link Africa/Maputo Africa/Blantyre # Malawi @@ -1073,7 +1185,7 @@ Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 WAT #Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 WAT # End of rearguard section. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 @@ -1094,7 +1206,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 # See Africa/Lagos. # Nigeria -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Lagos 0:13:36 - LMT 1919 Sep 1:00 - WAT Link Africa/Lagos Africa/Bangui # Central African Republic @@ -1108,7 +1220,7 @@ Link Africa/Lagos Africa/Niamey # Niger Link Africa/Lagos Africa/Porto-Novo # Benin # Réunion -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis 4:00 - +04 # @@ -1168,7 +1280,7 @@ Zone Africa/Sao_Tome 0:26:56 - LMT 1884 # See Africa/Abidjan. # Seychelles -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria 4:00 - +04 # From Paul Eggert (2001-05-30): @@ -1188,7 +1300,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 - Rule SA 1943 1944 - Mar Sun>=15 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 1:30 - SAST 1903 Mar 2:00 SA SAST @@ -1223,14 +1335,14 @@ Rule Sudan 1970 only - May 1 0:00 1:00 S Rule Sudan 1970 1985 - Oct 15 0:00 0 - Rule Sudan 1971 only - Apr 30 0:00 1:00 S Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Khartoum 2:10:08 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT 2017 Nov 1 2:00 - CAT # South Sudan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Juba 2:06:28 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 3:00 - EAT @@ -1336,7 +1448,7 @@ Rule Tunisia 2006 2008 - Oct lastSun 2:00s 0 - # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. # Shanks & Pottenger say the 1911 switch was on Mar 9; go with Howse's Mar 11. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tunis 0:40:44 - LMT 1881 May 12 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time 1:00 Tunisia CE%sT Modified: releng/11.2/contrib/tzdata/antarctica ============================================================================== --- releng/11.2/contrib/tzdata/antarctica Tue Jul 2 23:56:37 2019 (r349619) +++ releng/11.2/contrib/tzdata/antarctica Tue Jul 2 23:59:45 2019 (r349620) @@ -13,7 +13,7 @@ # for information. # Unless otherwise specified, we have no time zone information. -# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited. +# FORMAT is '-00' and STDOFF is 0 for locations while uninhabited. # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -70,7 +70,7 @@ # Australian Antarctica Division informed us that Casey changed time # zone to UTC+11 in "the morning of 22nd October 2016". -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Casey 0 - -00 1969 8:00 - +08 2009 Oct 18 2:00 11:00 - +11 2010 Mar 5 2:00 @@ -142,7 +142,7 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13 # St Paul Island - near Amsterdam, uninhabited # fishing stations operated variously 1819/1931 # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français 5:00 - +05 # @@ -153,7 +153,7 @@ Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Françai # Another base at Port-Martin, 50km east, began operation in 1947. # It was destroyed by fire on 1952-01-14. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/DumontDUrville 0 - -00 1947 10:00 - +10 1952 Jan 14 0 - -00 1956 Nov @@ -181,7 +181,7 @@ Zone Antarctica/DumontDUrville 0 - -00 1947 # Syowa station, which is the first antarctic station of Japan, # was established on 1957-01-29. Since Syowa station is still the main # station of Japan, it's appropriate for the principal location. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Syowa 0 - -00 1957 Jan 29 3:00 - +03 # See: @@ -231,7 +231,7 @@ Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02 #Rule Troll 2004 max - Nov 7 1:00u 0:00 +00 # Remove the following line when uncommenting the above '#Rule' lines. Rule Troll 2004 max - Oct lastSun 1:00u 0:00 +00 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Troll 0 - -00 2005 Feb 12 0:00 Troll %s @@ -305,7 +305,7 @@ Zone Antarctica/Vostok 0 - -00 1957 Dec 16 # From Paul Eggert (2002-10-22) # says Rothera is -03 all year. # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Antarctica/Rothera 0 - -00 1976 Dec 1 -3:00 - -03 Modified: releng/11.2/contrib/tzdata/asia ============================================================================== --- releng/11.2/contrib/tzdata/asia Tue Jul 2 23:56:37 2019 (r349619) +++ releng/11.2/contrib/tzdata/asia Tue Jul 2 23:59:45 2019 (r349620) @@ -84,7 +84,7 @@ Rule RussiaAsia 1985 2010 - Mar lastSun 2:00s 1:00 - Rule RussiaAsia 1996 2010 - Oct lastSun 2:00s 0 - # Afghanistan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 4:00 - +04 1945 4:30 - +0430 @@ -117,7 +117,7 @@ Zone Asia/Kabul 4:36:48 - LMT 1890 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Armenia 2011 only - Mar lastSun 2:00s 1:00 - Rule Armenia 2011 only - Oct lastSun 2:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -143,7 +143,7 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 - Rule Azer 1997 2015 - Oct lastSun 5:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baku 3:19:24 - LMT 1924 May 2 3:00 - +03 1957 Mar 4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s @@ -231,7 +231,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 Rule Dhaka 2009 only - Jun 19 23:00 1:00 - Rule Dhaka 2009 only - Dec 31 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? 6:30 - +0630 1942 May 15 @@ -241,7 +241,7 @@ Zone Asia/Dhaka 6:01:40 - LMT 1890 6:00 Dhaka +06/+07 # Bhutan -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu 5:30 - +0530 1987 Oct 6:00 - +06 @@ -252,13 +252,13 @@ Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimb # We have no information as to when standard time was introduced; # assume it occurred in 1907, the same year as Mauritius (which # then contained the Chagos Archipelago). -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Chagos 4:49:40 - LMT 1907 5:00 - +05 1996 6:00 - +06 # Brunei -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan 7:30 - +0730 1933 8:00 - +08 @@ -273,7 +273,7 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri # of Greenwich." This refers to the period before Burma's transition to +0630, # a transition for which Shanks is the only source. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoon 6:24:47 - RMT 1920 # Rangoon local time 6:30 - +0630 1942 May @@ -561,7 +561,7 @@ Rule PRC 1987 1991 - Apr Sun>=11 2:00 1:00 D # that the sort of users who prefer Asia/Urumqi now typically ignored the # +08 mandate back then. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Beijing time, used throughout China; represented by Shanghai. Zone Asia/Shanghai 8:05:43 - LMT 1901 8:00 Shang C%sT 1949 May 28 @@ -652,11 +652,41 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # https://i.imgur.com/05KkvtC.png # * 1941-09-30, Hong Kong Daily Press, Winter Time Warning. # https://i.imgur.com/dge4kFJ.png -# Also, the Liberation day of Hong Kong after WWII which British rule -# over the territory resumed was August 30, 1945, which I think should -# be the termination date for the use of JST in the territory.... -# From Paul Eggert (2018-11-17): +# From P Chan (2018-12-31): +# * According to the Hong Kong Daylight-Saving Regulations, 1941, the +# 1941 spring-forward transition was at 03:00. +# http://sunzi.lib.hku.hk/hkgro/view/g1941/304271.pdf +# http://sunzi.lib.hku.hk/hkgro/view/g1941/305516.pdf +# * According to some articles from South China Morning Post, +08 was +# resumed on 1945-11-18 at 02:00. +# https://i.imgur.com/M2IsZ3c.png +# https://i.imgur.com/iOPqrVo.png +# https://i.imgur.com/fffcGDs.png +# * Some newspapers ... said the 1946 spring-forward transition was on +# 04-21 at 00:00. The Kung Sheung Evening News 1946-04-20 (Chinese) +# https://i.imgur.com/ZSzent0.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2FH7zGe%2FKF%2BFLYsuqGhRBfe p.4 +# The Kung Sheung Daily News 1946-04-21 (Chinese) +# https://i.imgur.com/7ecmRlcm.png +# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2BQBGt1%2BwUj5qG2GqtwR3Wh p.4 +# * According to the Summer Time Ordinance (1946), the fallback +# transitions between 1946 and 1952 were at 03:30 Standard Time (+08) +# http://oelawhk.lib.hku.hk/archive/files/bb74b06a74d5294620a15de560ab33c6.pdf +# * Some other laws and regulations related to DST from 1953 to 1979 +# Summer Time Ordinance 1953 +# https://i.imgur.com/IOlJMav.jpg +# Summer Time (Amendment) Ordinance 1965 +# https://i.imgur.com/8rofeLa.jpg +# Interpretation and General Clauses Ordinance (1966) +# https://i.imgur.com/joy3msj.jpg +# Emergency (Summer Time) Regulation 1973 +# Interpretation and General Clauses (Amendment) Ordinance 1977 +# https://i.imgur.com/RaNqnc4.jpg +# Resolution of the Legislative Council passed on 9 May 1979 +# https://www.legco.gov.hk/yr78-79/english/lc_sitg/hansard/h790509.pdf#page=39 + +# From Paul Eggert (2019-05-31): # Here are the dates given at # https://www.hko.gov.hk/gts/time/Summertime.htm # as of 2014-06-19: @@ -667,7 +697,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # 1944 Whole year # 1945 Whole year # 1946 20 Apr to 1 Dec -# 1947 13 Apr to 30 Dec +# 1947 13 Apr to 30 Nov # 1948 2 May to 31 Oct # 1949 3 Apr to 30 Oct # 1950 2 Apr to 29 Oct @@ -704,36 +734,28 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # The page does not give times of day for transitions, # or dates for the 1942 and 1945 transitions. # The Japanese occupation of Hong Kong began 1941-12-25. -# The Japanese surrender of Hong Kong was signed 1945-09-16; see: -# Heaver S. The days after the Pacific war ended: unsettling times -# in Hong Kong. Post Magazine. 2016-06-13. -# https://www.scmp.com/magazines/post-magazine/article/1852990/days-after-pacific-war-ended-unsettling-times-hong-kong -# For lack of anything better, use start of those days as the -# transition times. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule HK 1946 only - Apr 20 3:30 1:00 S -Rule HK 1946 only - Dec 1 3:30 0 - -Rule HK 1947 only - Apr 13 3:30 1:00 S -Rule HK 1947 only - Dec 30 3:30 0 - -Rule HK 1948 only - May 2 3:30 1:00 S -Rule HK 1948 1951 - Oct lastSun 3:30 0 - -Rule HK 1952 1953 - Nov Sun>=1 3:30 0 - +Rule HK 1946 only - Apr 21 0:00 1:00 S +Rule HK 1946 only - Dec 1 3:30s 0 - +Rule HK 1947 only - Apr 13 3:30s 1:00 S +Rule HK 1947 only - Nov 30 3:30s 0 - +Rule HK 1948 only - May 2 3:30s 1:00 S +Rule HK 1948 1952 - Oct Sun>=28 3:30s 0 - Rule HK 1949 1953 - Apr Sun>=1 3:30 1:00 S +Rule HK 1953 1964 - Oct Sun>=31 3:30 0 - Rule HK 1954 1964 - Mar Sun>=18 3:30 1:00 S -Rule HK 1954 only - Oct 31 3:30 0 - -Rule HK 1955 1964 - Nov Sun>=1 3:30 0 - Rule HK 1965 1976 - Apr Sun>=16 3:30 1:00 S Rule HK 1965 1976 - Oct Sun>=16 3:30 0 - Rule HK 1973 only - Dec 30 3:30 1:00 S -Rule HK 1979 only - May Sun>=8 3:30 1:00 S -Rule HK 1979 only - Oct Sun>=16 3:30 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Rule HK 1979 only - May 13 3:30 1:00 S +Rule HK 1979 only - Oct 21 3:30 0 - +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42 - 8:00 - HKT 1941 Jun 15 3:30 + 8:00 - HKT 1941 Jun 15 3:00 8:00 1:00 HKST 1941 Oct 1 4:00 8:30 - HKT 1941 Dec 25 - 9:00 - JST 1945 Sep 16 + 9:00 - JST 1945 Nov 18 2:00 8:00 HK HK%sT ############################################################################### @@ -857,7 +879,7 @@ Rule Taiwan 1974 1975 - Oct 1 0:00 0 S Rule Taiwan 1979 only - Jul 1 0:00 1:00 D Rule Taiwan 1979 only - Oct 1 0:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Taipei or Taibei or T'ai-pei Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 8:00 - CST 1937 Oct 1 @@ -995,7 +1017,7 @@ Rule Macau 1975 1976 - Apr Sun>=16 03:30 1:00 D Rule Macau 1979 only - May 13 03:30 1:00 D Rule Macau 1979 only - Oct Sun>=16 03:30 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Macau 7:34:10 - LMT 1904 Oct 30 8:00 - CST 1941 Dec 21 23:00 9:00 Macau +09/+10 1945 Sep 30 24:00 @@ -1034,7 +1056,7 @@ Rule Cyprus 1977 only - Sep 25 0:00 0 - Rule Cyprus 1978 only - Oct 2 0:00 0 - Rule Cyprus 1979 1997 - Sep lastSun 0:00 0 - Rule Cyprus 1981 1998 - Mar lastSun 0:00 1:00 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14 2:00 Cyprus EE%sT 1998 Sep 2:00 EUAsia EE%sT @@ -1083,7 +1105,7 @@ Link Asia/Nicosia Europe/Nicosia # Byalokoz 1919 says Georgia was 2:59:11. # Go with Byalokoz. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tbilisi 2:59:11 - LMT 1880 2:59:11 - TBMT 1924 May 2 # Tbilisi Mean Time 3:00 - +03 1957 Mar @@ -1120,7 +1142,7 @@ Zone Asia/Tbilisi 2:59:11 - LMT 1880 # which will be permanent, with no seasonal adjustment, will happen at # midnight on Saturday, September 16. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 8:00 - +08 1942 Feb 21 23:00 9:00 - +09 1976 May 3 @@ -1186,7 +1208,7 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 # time for 1870-1941. Shanks is our only (and dubious) source for the # 1941-1945 data. -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata 5:53:20 - HMT 1870 # Howrah Mean Time? 5:21:10 - MMT 1906 Jan 1 # Madras local time @@ -1238,7 +1260,7 @@ Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata # WITA - +08 - Waktu Indonesia Tengah (Indonesia central time) # WIT - +09 - Waktu Indonesia Timur (Indonesia eastern time) # -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] # Java, Sumatra Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, @@ -1314,9 +1336,9 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov # I used the following code in GNU Emacs 26.1 to generate the "Rule Iran" # lines from 2008 through 2087. Emacs 26.1 uses Ed Reingold's # cal-persia implementation of Birashk's approximation, which in the -# 2008-2087 range disagrees with the the astronomical Persian calendar -# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), -# so the following code special-case those years. See Table 15.1, page 264, of: +# 2008-2087 range disagrees with the astronomical Persian calendar +# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), so +# the following code special-cases those years. See Table 15.1, page 264, of: # Edward M. Reingold and Nachum Dershowitz, Calendrical Calculations: # The Ultimate Edition, Cambridge University Press (2018). # https://www.cambridge.org/fr/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition @@ -1510,7 +1532,7 @@ Rule Iran 2087 only - Sep 21 24:00 0 - Rule Iran 2088 max - Mar 20 24:00 1:00 - Rule Iran 2088 max - Sep 20 24:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time 3:30 - +0330 1977 Nov @@ -1555,7 +1577,7 @@ Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 - # Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 - Rule Iraq 1991 2007 - Oct 1 3:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? 3:00 - +03 1982 May @@ -1622,7 +1644,7 @@ Rule Zion 1975 only - Apr 20 0:00 1:00 D Rule Zion 1975 only - Aug 31 0:00 0 S # From Alois Treindl (2019-03-06): -# http://www.moin.gov.il/Documents/שעון קיץ/clock-50-years-7-2014.pdf +# http://www.moin.gov.il/Documents/שעון%20קיץ/clock-50-years-7-2014.pdf # From Isaac Starkman (2019-03-06): # Summer time was in that period in 1980 and 1984, see # https://www.ynet.co.il/articles/0,7340,L-3951073,00.html @@ -1760,32 +1782,15 @@ Rule Zion 2004 only - Sep 22 1:00 0 S # # ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps -# From Paul Eggert (2012-10-26): -# I used Ephraim Silverberg's dst-israel.el program -# (2005-02-20) -# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4, -# to generate the transitions from 2005 through 2012. -# (I replaced "lastFri" with "Fri>=26" by hand.) -# The spring transitions all correspond to the following Rule: -# -# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D -# -# but older zic implementations (e.g., Solaris 8) do not support -# "Fri>=26" to mean April 1 in years like 2005, so for now we list the -# springtime transitions explicitly. - # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Zion 2005 only - Apr 1 2:00 1:00 D +Rule Zion 2005 2012 - Apr Fri<=1 2:00 1:00 D Rule Zion 2005 only - Oct 9 2:00 0 S -Rule Zion 2006 2010 - Mar Fri>=26 2:00 1:00 D Rule Zion 2006 only - Oct 1 2:00 0 S Rule Zion 2007 only - Sep 16 2:00 0 S Rule Zion 2008 only - Oct 5 2:00 0 S Rule Zion 2009 only - Sep 27 2:00 0 S Rule Zion 2010 only - Sep 12 2:00 0 S -Rule Zion 2011 only - Apr 1 2:00 1:00 D Rule Zion 2011 only - Oct 2 2:00 0 S -Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D Rule Zion 2012 only - Sep 23 2:00 0 S # From Ephraim Silverberg (2013-06-27): @@ -1801,7 +1806,7 @@ Rule Zion 2012 only - Sep 23 2:00 0 S Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D Rule Zion 2013 max - Oct lastSun 2:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Jerusalem 2:20:54 - LMT 1880 2:20:40 - JMT 1918 # Jerusalem Mean Time? 2:00 Zion I%sT @@ -1893,7 +1898,7 @@ Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D # Central Time (UT+9). The adoption began on Oct 1, 1937. # https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u 9:00 Japan J%sT # Since 1938, all Japanese possessions have been like Asia/Tokyo, @@ -1996,7 +2001,7 @@ Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - Rule Jordan 2013 only - Dec 20 0:00 0 - Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S Rule Jordan 2014 max - Oct lastFri 0:00s 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 2:00 Jordan EE%sT @@ -2037,8 +2042,8 @@ Zone Asia/Amman 2:23:44 - LMT 1931 # text. # # According to Izvestia newspaper No. 68 (23334) from 1991-03-20 -# (page 6; available at http://libinfo.org/newsr/newsr2574.djvu via -# http://libinfo.org/index.php?id=58564) on 1991-03-31 at 2:00 during +# -- page 6; available at http://libinfo.org/newsr/newsr2574.djvu via +# http://libinfo.org/index.php?id=58564 -- on 1991-03-31 at 2:00 during # transition to "summer" time: # Republic of Georgia, Latvian SSR, Lithuanian SSR, SSR Moldova, # Estonian SSR; Komi ASSR; Kaliningrad oblast; Nenets autonomous okrug @@ -2054,7 +2059,7 @@ Zone Asia/Amman 2:23:44 - LMT 1931 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jul 3 00:00:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DAC815E0C38; Wed, 3 Jul 2019 00:00:40 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 415C8756A1; Wed, 3 Jul 2019 00:00:40 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B5203BE6; Wed, 3 Jul 2019 00:00:40 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6300deU045932; Wed, 3 Jul 2019 00:00:39 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6300dUD045930; Wed, 3 Jul 2019 00:00:39 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201907030000.x6300dUD045930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 3 Jul 2019 00:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349621 - in releng: 11.2/lib/libc/iconv 11.3/lib/libc/iconv 12.0/lib/libc/iconv X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 11.2/lib/libc/iconv 11.3/lib/libc/iconv 12.0/lib/libc/iconv X-SVN-Commit-Revision: 349621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 415C8756A1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:00:40 -0000 Author: gordon Date: Wed Jul 3 00:00:39 2019 New Revision: 349621 URL: https://svnweb.freebsd.org/changeset/base/349621 Log: Fix iconv buffer overflow. Approved by: so Approved by: re (implicit) Security: FreeBSD-SA-19:09.iconv Modified: releng/11.2/lib/libc/iconv/citrus_none.c releng/11.3/lib/libc/iconv/citrus_none.c releng/12.0/lib/libc/iconv/citrus_none.c Modified: releng/11.2/lib/libc/iconv/citrus_none.c ============================================================================== --- releng/11.2/lib/libc/iconv/citrus_none.c Tue Jul 2 23:59:45 2019 (r349620) +++ releng/11.2/lib/libc/iconv/citrus_none.c Wed Jul 3 00:00:39 2019 (r349621) @@ -142,7 +142,7 @@ _citrus_NONE_stdenc_cstomb(struct _citrus_stdenc * __r s[2] = (char)(idx >> 16); *nresult = 3; } else { - if (n < 3) { + if (n < 4) { *nresult = (size_t)-1; return (E2BIG); } Modified: releng/11.3/lib/libc/iconv/citrus_none.c ============================================================================== --- releng/11.3/lib/libc/iconv/citrus_none.c Tue Jul 2 23:59:45 2019 (r349620) +++ releng/11.3/lib/libc/iconv/citrus_none.c Wed Jul 3 00:00:39 2019 (r349621) @@ -142,7 +142,7 @@ _citrus_NONE_stdenc_cstomb(struct _citrus_stdenc * __r s[2] = (char)(idx >> 16); *nresult = 3; } else { - if (n < 3) { + if (n < 4) { *nresult = (size_t)-1; return (E2BIG); } Modified: releng/12.0/lib/libc/iconv/citrus_none.c ============================================================================== --- releng/12.0/lib/libc/iconv/citrus_none.c Tue Jul 2 23:59:45 2019 (r349620) +++ releng/12.0/lib/libc/iconv/citrus_none.c Wed Jul 3 00:00:39 2019 (r349621) @@ -144,7 +144,7 @@ _citrus_NONE_stdenc_cstomb(struct _citrus_stdenc * __r s[2] = (char)(idx >> 16); *nresult = 3; } else { - if (n < 3) { + if (n < 4) { *nresult = (size_t)-1; return (E2BIG); } From owner-svn-src-all@freebsd.org Wed Jul 3 00:01:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC46F15E0E59; Wed, 3 Jul 2019 00:01:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51827759BA; Wed, 3 Jul 2019 00:01: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B3E13D40; Wed, 3 Jul 2019 00:01: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 x6301d9l050154; Wed, 3 Jul 2019 00:01:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6301d4J050153; Wed, 3 Jul 2019 00:01:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201907030001.x6301d4J050153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jul 2019 00:01:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349622 - stable/12/lib/libc/iconv X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/lib/libc/iconv X-SVN-Commit-Revision: 349622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 51827759BA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:01:39 -0000 Author: emaste Date: Wed Jul 3 00:01:38 2019 New Revision: 349622 URL: https://svnweb.freebsd.org/changeset/base/349622 Log: MFC r349619: libc: correct iconv buffer overflow admbugs: 920 Submitted by: Andrea Venturoli, gabor Reported by: Andrea Venturoli , NetFence Approved by: so Security: CVE-2019-5600 Security: FreeBSD-SA-19:09.iconv Modified: stable/12/lib/libc/iconv/citrus_none.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/iconv/citrus_none.c ============================================================================== --- stable/12/lib/libc/iconv/citrus_none.c Wed Jul 3 00:00:39 2019 (r349621) +++ stable/12/lib/libc/iconv/citrus_none.c Wed Jul 3 00:01:38 2019 (r349622) @@ -144,7 +144,7 @@ _citrus_NONE_stdenc_cstomb(struct _citrus_stdenc * __r s[2] = (char)(idx >> 16); *nresult = 3; } else { - if (n < 3) { + if (n < 4) { *nresult = (size_t)-1; return (E2BIG); } From owner-svn-src-all@freebsd.org Wed Jul 3 00:02:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C741C15E0F1C; Wed, 3 Jul 2019 00:02:19 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EC1D75B6D; Wed, 3 Jul 2019 00:02:19 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 446383D6E; Wed, 3 Jul 2019 00:02:19 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6302JrX051205; Wed, 3 Jul 2019 00:02:19 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6302GDH051192; Wed, 3 Jul 2019 00:02:16 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201907030002.x6302GDH051192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 3 Jul 2019 00:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349623 - in releng: 11.2/sbin/fsck_ffs 11.2/sys/ufs/ufs 12.0/sbin/fsck_ffs 12.0/sys/ufs/ufs X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 11.2/sbin/fsck_ffs 11.2/sys/ufs/ufs 12.0/sbin/fsck_ffs 12.0/sys/ufs/ufs X-SVN-Commit-Revision: 349623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6EC1D75B6D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:02:20 -0000 Author: gordon Date: Wed Jul 3 00:02:16 2019 New Revision: 349623 URL: https://svnweb.freebsd.org/changeset/base/349623 Log: Fix kernel stack disclosure in UFS/FFS. Approved by: so Security: FreeBSD-SA-19:10.ufs Security: CVE-2019-5601 Modified: releng/11.2/sbin/fsck_ffs/dir.c releng/11.2/sbin/fsck_ffs/fsck.h releng/11.2/sbin/fsck_ffs/fsck_ffs.8 releng/11.2/sbin/fsck_ffs/globs.c releng/11.2/sbin/fsck_ffs/main.c releng/11.2/sys/ufs/ufs/dir.h releng/11.2/sys/ufs/ufs/ufs_lookup.c releng/12.0/sbin/fsck_ffs/dir.c releng/12.0/sbin/fsck_ffs/fsck.h releng/12.0/sbin/fsck_ffs/fsck_ffs.8 releng/12.0/sbin/fsck_ffs/globs.c releng/12.0/sbin/fsck_ffs/main.c releng/12.0/sys/ufs/ufs/dir.h releng/12.0/sys/ufs/ufs/ufs_lookup.c Modified: releng/11.2/sbin/fsck_ffs/dir.c ============================================================================== --- releng/11.2/sbin/fsck_ffs/dir.c Wed Jul 3 00:01:38 2019 (r349622) +++ releng/11.2/sbin/fsck_ffs/dir.c Wed Jul 3 00:02:16 2019 (r349623) @@ -145,14 +145,23 @@ fsck_readdir(struct inodesc *idesc) struct direct *dp, *ndp; struct bufarea *bp; long size, blksiz, fix, dploc; + int dc; blksiz = idesc->id_numfrags * sblock.fs_fsize; bp = getdirblk(idesc->id_blkno, blksiz); if (idesc->id_loc % DIRBLKSIZ == 0 && idesc->id_filesize > 0 && idesc->id_loc < blksiz) { dp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); - if (dircheck(idesc, dp)) + if ((dc = dircheck(idesc, dp)) > 0) { + if (dc == 2) { + /* + * dircheck() cleared unused directory space. + * Mark the buffer as dirty to write it out. + */ + dirty(bp); + } goto dpok; + } if (idesc->id_fix == IGNORE) return (0); fix = dofix(idesc, "DIRECTORY CORRUPTED"); @@ -179,19 +188,26 @@ dpok: if ((idesc->id_loc % DIRBLKSIZ) == 0) return (dp); ndp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); - if (idesc->id_loc < blksiz && idesc->id_filesize > 0 && - dircheck(idesc, ndp) == 0) { - size = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); - idesc->id_loc += size; - idesc->id_filesize -= size; - if (idesc->id_fix == IGNORE) - return (0); - fix = dofix(idesc, "DIRECTORY CORRUPTED"); - bp = getdirblk(idesc->id_blkno, blksiz); - dp = (struct direct *)(bp->b_un.b_buf + dploc); - dp->d_reclen += size; - if (fix) + if (idesc->id_loc < blksiz && idesc->id_filesize > 0) { + if ((dc = dircheck(idesc, ndp)) == 0) { + size = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); + idesc->id_loc += size; + idesc->id_filesize -= size; + if (idesc->id_fix == IGNORE) + return (0); + fix = dofix(idesc, "DIRECTORY CORRUPTED"); + bp = getdirblk(idesc->id_blkno, blksiz); + dp = (struct direct *)(bp->b_un.b_buf + dploc); + dp->d_reclen += size; + if (fix) + dirty(bp); + } else if (dc == 2) { + /* + * dircheck() cleared unused directory space. + * Mark the buffer as dirty to write it out. + */ dirty(bp); + } } return (dp); } @@ -199,6 +215,11 @@ dpok: /* * Verify that a directory entry is valid. * This is a superset of the checks made in the kernel. + * Also optionally clears padding and unused directory space. + * + * Returns 0 if the entry is bad, 1 if the entry is good and no changes + * were made, and 2 if the entry is good but modified to clear out padding + * and unused space and needs to be written back to disk. */ static int dircheck(struct inodesc *idesc, struct direct *dp) @@ -207,15 +228,39 @@ dircheck(struct inodesc *idesc, struct direct *dp) char *cp; u_char type; u_int8_t namlen; - int spaceleft; + int spaceleft, modified, unused; + modified = 0; spaceleft = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); if (dp->d_reclen == 0 || dp->d_reclen > spaceleft || - (dp->d_reclen & 0x3) != 0) + (dp->d_reclen & (DIR_ROUNDUP - 1)) != 0) goto bad; - if (dp->d_ino == 0) - return (1); + if (dp->d_ino == 0) { + /* + * Special case of an unused directory entry. Normally + * the kernel would coalesce unused space with the previous + * entry by extending its d_reclen, but there are situations + * (e.g. fsck) where that doesn't occur. + * If we're clearing out directory cruft (-z flag), then make + * sure this entry gets fully cleared as well. + */ + if (zflag && fswritefd >= 0) { + if (dp->d_type != 0) { + dp->d_type = 0; + modified = 1; + } + if (dp->d_namlen != 0) { + dp->d_namlen = 0; + modified = 1; + } + if (dp->d_name[0] != '\0') { + dp->d_name[0] = '\0'; + modified = 1; + } + } + goto good; + } size = DIRSIZ(0, dp); namlen = dp->d_namlen; type = dp->d_type; @@ -229,7 +274,37 @@ dircheck(struct inodesc *idesc, struct direct *dp) goto bad; if (*cp != '\0') goto bad; + +good: + if (zflag && fswritefd >= 0) { + /* + * Clear unused directory entry space, including the d_name + * padding. + */ + /* First figure the number of pad bytes. */ + unused = roundup2(namlen + 1, DIR_ROUNDUP) - (namlen + 1); + + /* Add in the free space to the end of the record. */ + unused += dp->d_reclen - DIRSIZ(0, dp); + + /* + * Now clear out the unused space, keeping track if we actually + * changed anything. + */ + for (cp = &dp->d_name[namlen + 1]; unused > 0; unused--, cp++) { + if (*cp != '\0') { + *cp = '\0'; + modified = 1; + } + } + + if (modified) { + return 2; + } + } + return (1); + bad: if (debug) printf("Bad dir: ino %d reclen %d namlen %d type %d name %s\n", Modified: releng/11.2/sbin/fsck_ffs/fsck.h ============================================================================== --- releng/11.2/sbin/fsck_ffs/fsck.h Wed Jul 3 00:01:38 2019 (r349622) +++ releng/11.2/sbin/fsck_ffs/fsck.h Wed Jul 3 00:02:16 2019 (r349623) @@ -310,6 +310,7 @@ extern ufs2_daddr_t bflag; /* location of alternate s extern int debug; /* output debugging info */ extern int Eflag; /* delete empty data blocks */ extern int Zflag; /* zero empty data blocks */ +extern int zflag; /* zero unused directory space */ extern int inoopt; /* trim out unused inodes */ extern char ckclean; /* only do work if not cleanly unmounted */ extern int cvtlevel; /* convert to newer file system format */ Modified: releng/11.2/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- releng/11.2/sbin/fsck_ffs/fsck_ffs.8 Wed Jul 3 00:01:38 2019 (r349622) +++ releng/11.2/sbin/fsck_ffs/fsck_ffs.8 Wed Jul 3 00:02:16 2019 (r349623) @@ -29,7 +29,7 @@ .\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd January 13, 2018 +.Dd May 3, 2019 .Dt FSCK_FFS 8 .Os .Sh NAME @@ -38,7 +38,7 @@ .Nd file system consistency check and interactive repair .Sh SYNOPSIS .Nm -.Op Fl BCdEFfnpRrSyZ +.Op Fl BCdEFfnpRrSyZz .Op Fl b Ar block .Op Fl c Ar level .Op Fl m Ar mode @@ -301,6 +301,9 @@ If both and .Fl Z are specified, blocks are first zeroed and then erased. +.It Fl z +Clear unused directory space. +The cleared space includes deleted file names and name padding. .El .Pp Inconsistencies checked are as follows: Modified: releng/11.2/sbin/fsck_ffs/globs.c ============================================================================== --- releng/11.2/sbin/fsck_ffs/globs.c Wed Jul 3 00:01:38 2019 (r349622) +++ releng/11.2/sbin/fsck_ffs/globs.c Wed Jul 3 00:02:16 2019 (r349623) @@ -82,6 +82,7 @@ ufs2_daddr_t bflag; /* location of alternate super bl int debug; /* output debugging info */ int Eflag; /* delete empty data blocks */ int Zflag; /* zero empty data blocks */ +int zflag; /* zero unused directory space */ int inoopt; /* trim out unused inodes */ char ckclean; /* only do work if not cleanly unmounted */ int cvtlevel; /* convert to newer file system format */ Modified: releng/11.2/sbin/fsck_ffs/main.c ============================================================================== --- releng/11.2/sbin/fsck_ffs/main.c Wed Jul 3 00:01:38 2019 (r349622) +++ releng/11.2/sbin/fsck_ffs/main.c Wed Jul 3 00:02:16 2019 (r349623) @@ -86,7 +86,7 @@ main(int argc, char *argv[]) sync(); skipclean = 1; inoopt = 0; - while ((ch = getopt(argc, argv, "b:Bc:CdEfFm:npRrSyZ")) != -1) { + while ((ch = getopt(argc, argv, "b:Bc:CdEfFm:npRrSyZz")) != -1) { switch (ch) { case 'b': skipclean = 0; @@ -161,6 +161,10 @@ main(int argc, char *argv[]) case 'Z': Zflag++; + break; + + case 'z': + zflag++; break; default: Modified: releng/11.2/sys/ufs/ufs/dir.h ============================================================================== --- releng/11.2/sys/ufs/ufs/dir.h Wed Jul 3 00:01:38 2019 (r349622) +++ releng/11.2/sys/ufs/ufs/dir.h Wed Jul 3 00:02:16 2019 (r349623) @@ -105,13 +105,11 @@ struct direct { * The DIRSIZ macro gives the minimum record length which will hold * the directory entry. This requires the amount of space in struct direct * without the d_name field, plus enough space for the name with a terminating - * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary. - * - * + * null byte (dp->d_namlen + 1), rounded up to a 4 byte boundary. */ -#define DIRECTSIZ(namlen) \ - ((__offsetof(struct direct, d_name) + \ - ((namlen)+1)*sizeof(((struct direct *)0)->d_name[0]) + 3) & ~3) +#define DIR_ROUNDUP 4 /* Directory name roundup size */ +#define DIRECTSIZ(namlen) \ + (roundup2(__offsetof(struct direct, d_name) + (namlen) + 1, DIR_ROUNDUP)) #if (BYTE_ORDER == LITTLE_ENDIAN) #define DIRSIZ(oldfmt, dp) \ ((oldfmt) ? DIRECTSIZ((dp)->d_type) : DIRECTSIZ((dp)->d_namlen)) Modified: releng/11.2/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- releng/11.2/sys/ufs/ufs/ufs_lookup.c Wed Jul 3 00:01:38 2019 (r349622) +++ releng/11.2/sys/ufs/ufs/ufs_lookup.c Wed Jul 3 00:02:16 2019 (r349623) @@ -823,14 +823,21 @@ ufs_makedirentry(ip, cnp, newdirp) struct componentname *cnp; struct direct *newdirp; { + u_int namelen; -#ifdef INVARIANTS - if ((cnp->cn_flags & SAVENAME) == 0) - panic("ufs_makedirentry: missing name"); -#endif + namelen = (unsigned)cnp->cn_namelen; + KASSERT((cnp->cn_flags & SAVENAME) != 0, + ("ufs_makedirentry: missing name")); + KASSERT(namelen <= MAXNAMLEN, + ("ufs_makedirentry: name too long")); newdirp->d_ino = ip->i_number; - newdirp->d_namlen = cnp->cn_namelen; - bcopy(cnp->cn_nameptr, newdirp->d_name, (unsigned)cnp->cn_namelen + 1); + newdirp->d_namlen = namelen; + + /* Zero out after-name padding */ + *(u_int32_t *)(&newdirp->d_name[namelen & ~(DIR_ROUNDUP - 1)]) = 0; + + bcopy(cnp->cn_nameptr, newdirp->d_name, namelen); + if (ITOV(ip)->v_mount->mnt_maxsymlinklen > 0) newdirp->d_type = IFTODT(ip->i_mode); else { @@ -1209,16 +1216,21 @@ ufs_dirremove(dvp, ip, flags, isrmdir) if (ip && rep->d_ino != ip->i_number) panic("ufs_dirremove: ip %ju does not match dirent ino %ju\n", (uintmax_t)ip->i_number, (uintmax_t)rep->d_ino); - if (dp->i_count == 0) { + /* + * Zero out the file directory entry metadata to reduce disk + * scavenging disclosure. + */ + bzero(&rep->d_name[0], rep->d_namlen); + rep->d_namlen = 0; + rep->d_type = 0; + rep->d_ino = 0; + + if (dp->i_count != 0) { /* - * First entry in block: set d_ino to zero. - */ - ep->d_ino = 0; - } else { - /* * Collapse new free space into previous entry. */ ep->d_reclen += rep->d_reclen; + rep->d_reclen = 0; } #ifdef UFS_DIRHASH if (dp->i_dirhash != NULL) Modified: releng/12.0/sbin/fsck_ffs/dir.c ============================================================================== --- releng/12.0/sbin/fsck_ffs/dir.c Wed Jul 3 00:01:38 2019 (r349622) +++ releng/12.0/sbin/fsck_ffs/dir.c Wed Jul 3 00:02:16 2019 (r349623) @@ -147,14 +147,23 @@ fsck_readdir(struct inodesc *idesc) struct direct *dp, *ndp; struct bufarea *bp; long size, blksiz, fix, dploc; + int dc; blksiz = idesc->id_numfrags * sblock.fs_fsize; bp = getdirblk(idesc->id_blkno, blksiz); if (idesc->id_loc % DIRBLKSIZ == 0 && idesc->id_filesize > 0 && idesc->id_loc < blksiz) { dp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); - if (dircheck(idesc, dp)) + if ((dc = dircheck(idesc, dp)) > 0) { + if (dc == 2) { + /* + * dircheck() cleared unused directory space. + * Mark the buffer as dirty to write it out. + */ + dirty(bp); + } goto dpok; + } if (idesc->id_fix == IGNORE) return (0); fix = dofix(idesc, "DIRECTORY CORRUPTED"); @@ -181,19 +190,26 @@ dpok: if ((idesc->id_loc % DIRBLKSIZ) == 0) return (dp); ndp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); - if (idesc->id_loc < blksiz && idesc->id_filesize > 0 && - dircheck(idesc, ndp) == 0) { - size = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); - idesc->id_loc += size; - idesc->id_filesize -= size; - if (idesc->id_fix == IGNORE) - return (0); - fix = dofix(idesc, "DIRECTORY CORRUPTED"); - bp = getdirblk(idesc->id_blkno, blksiz); - dp = (struct direct *)(bp->b_un.b_buf + dploc); - dp->d_reclen += size; - if (fix) + if (idesc->id_loc < blksiz && idesc->id_filesize > 0) { + if ((dc = dircheck(idesc, ndp)) == 0) { + size = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); + idesc->id_loc += size; + idesc->id_filesize -= size; + if (idesc->id_fix == IGNORE) + return (0); + fix = dofix(idesc, "DIRECTORY CORRUPTED"); + bp = getdirblk(idesc->id_blkno, blksiz); + dp = (struct direct *)(bp->b_un.b_buf + dploc); + dp->d_reclen += size; + if (fix) + dirty(bp); + } else if (dc == 2) { + /* + * dircheck() cleared unused directory space. + * Mark the buffer as dirty to write it out. + */ dirty(bp); + } } return (dp); } @@ -201,6 +217,11 @@ dpok: /* * Verify that a directory entry is valid. * This is a superset of the checks made in the kernel. + * Also optionally clears padding and unused directory space. + * + * Returns 0 if the entry is bad, 1 if the entry is good and no changes + * were made, and 2 if the entry is good but modified to clear out padding + * and unused space and needs to be written back to disk. */ static int dircheck(struct inodesc *idesc, struct direct *dp) @@ -209,15 +230,39 @@ dircheck(struct inodesc *idesc, struct direct *dp) char *cp; u_char type; u_int8_t namlen; - int spaceleft; + int spaceleft, modified, unused; + modified = 0; spaceleft = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); if (dp->d_reclen == 0 || dp->d_reclen > spaceleft || - (dp->d_reclen & 0x3) != 0) + (dp->d_reclen & (DIR_ROUNDUP - 1)) != 0) goto bad; - if (dp->d_ino == 0) - return (1); + if (dp->d_ino == 0) { + /* + * Special case of an unused directory entry. Normally + * the kernel would coalesce unused space with the previous + * entry by extending its d_reclen, but there are situations + * (e.g. fsck) where that doesn't occur. + * If we're clearing out directory cruft (-z flag), then make + * sure this entry gets fully cleared as well. + */ + if (zflag && fswritefd >= 0) { + if (dp->d_type != 0) { + dp->d_type = 0; + modified = 1; + } + if (dp->d_namlen != 0) { + dp->d_namlen = 0; + modified = 1; + } + if (dp->d_name[0] != '\0') { + dp->d_name[0] = '\0'; + modified = 1; + } + } + goto good; + } size = DIRSIZ(0, dp); namlen = dp->d_namlen; type = dp->d_type; @@ -231,7 +276,37 @@ dircheck(struct inodesc *idesc, struct direct *dp) goto bad; if (*cp != '\0') goto bad; + +good: + if (zflag && fswritefd >= 0) { + /* + * Clear unused directory entry space, including the d_name + * padding. + */ + /* First figure the number of pad bytes. */ + unused = roundup2(namlen + 1, DIR_ROUNDUP) - (namlen + 1); + + /* Add in the free space to the end of the record. */ + unused += dp->d_reclen - DIRSIZ(0, dp); + + /* + * Now clear out the unused space, keeping track if we actually + * changed anything. + */ + for (cp = &dp->d_name[namlen + 1]; unused > 0; unused--, cp++) { + if (*cp != '\0') { + *cp = '\0'; + modified = 1; + } + } + + if (modified) { + return 2; + } + } + return (1); + bad: if (debug) printf("Bad dir: ino %d reclen %d namlen %d type %d name %s\n", Modified: releng/12.0/sbin/fsck_ffs/fsck.h ============================================================================== --- releng/12.0/sbin/fsck_ffs/fsck.h Wed Jul 3 00:01:38 2019 (r349622) +++ releng/12.0/sbin/fsck_ffs/fsck.h Wed Jul 3 00:02:16 2019 (r349623) @@ -312,6 +312,7 @@ extern off_t bflag; /* location of alternate super b extern int debug; /* output debugging info */ extern int Eflag; /* delete empty data blocks */ extern int Zflag; /* zero empty data blocks */ +extern int zflag; /* zero unused directory space */ extern int inoopt; /* trim out unused inodes */ extern char ckclean; /* only do work if not cleanly unmounted */ extern int cvtlevel; /* convert to newer file system format */ Modified: releng/12.0/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- releng/12.0/sbin/fsck_ffs/fsck_ffs.8 Wed Jul 3 00:01:38 2019 (r349622) +++ releng/12.0/sbin/fsck_ffs/fsck_ffs.8 Wed Jul 3 00:02:16 2019 (r349623) @@ -29,7 +29,7 @@ .\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd January 13, 2018 +.Dd May 3, 2019 .Dt FSCK_FFS 8 .Os .Sh NAME @@ -38,7 +38,7 @@ .Nd file system consistency check and interactive repair .Sh SYNOPSIS .Nm -.Op Fl BCdEFfnpRrSyZ +.Op Fl BCdEFfnpRrSyZz .Op Fl b Ar block .Op Fl c Ar level .Op Fl m Ar mode @@ -301,6 +301,9 @@ If both and .Fl Z are specified, blocks are first zeroed and then erased. +.It Fl z +Clear unused directory space. +The cleared space includes deleted file names and name padding. .El .Pp Inconsistencies checked are as follows: Modified: releng/12.0/sbin/fsck_ffs/globs.c ============================================================================== --- releng/12.0/sbin/fsck_ffs/globs.c Wed Jul 3 00:01:38 2019 (r349622) +++ releng/12.0/sbin/fsck_ffs/globs.c Wed Jul 3 00:02:16 2019 (r349623) @@ -84,6 +84,7 @@ off_t bflag; /* location of alternate super block */ int debug; /* output debugging info */ int Eflag; /* delete empty data blocks */ int Zflag; /* zero empty data blocks */ +int zflag; /* zero unused directory space */ int inoopt; /* trim out unused inodes */ char ckclean; /* only do work if not cleanly unmounted */ int cvtlevel; /* convert to newer file system format */ Modified: releng/12.0/sbin/fsck_ffs/main.c ============================================================================== --- releng/12.0/sbin/fsck_ffs/main.c Wed Jul 3 00:01:38 2019 (r349622) +++ releng/12.0/sbin/fsck_ffs/main.c Wed Jul 3 00:02:16 2019 (r349623) @@ -89,7 +89,7 @@ main(int argc, char *argv[]) sync(); skipclean = 1; inoopt = 0; - while ((ch = getopt(argc, argv, "b:Bc:CdEfFm:npRrSyZ")) != -1) { + while ((ch = getopt(argc, argv, "b:Bc:CdEfFm:npRrSyZz")) != -1) { switch (ch) { case 'b': skipclean = 0; @@ -164,6 +164,10 @@ main(int argc, char *argv[]) case 'Z': Zflag++; + break; + + case 'z': + zflag++; break; default: Modified: releng/12.0/sys/ufs/ufs/dir.h ============================================================================== --- releng/12.0/sys/ufs/ufs/dir.h Wed Jul 3 00:01:38 2019 (r349622) +++ releng/12.0/sys/ufs/ufs/dir.h Wed Jul 3 00:02:16 2019 (r349623) @@ -108,13 +108,11 @@ struct direct { * The DIRSIZ macro gives the minimum record length which will hold * the directory entry. This requires the amount of space in struct direct * without the d_name field, plus enough space for the name with a terminating - * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary. - * - * + * null byte (dp->d_namlen + 1), rounded up to a 4 byte boundary. */ -#define DIRECTSIZ(namlen) \ - ((__offsetof(struct direct, d_name) + \ - ((namlen)+1)*sizeof(((struct direct *)0)->d_name[0]) + 3) & ~3) +#define DIR_ROUNDUP 4 /* Directory name roundup size */ +#define DIRECTSIZ(namlen) \ + (roundup2(__offsetof(struct direct, d_name) + (namlen) + 1, DIR_ROUNDUP)) #if (BYTE_ORDER == LITTLE_ENDIAN) #define DIRSIZ(oldfmt, dp) \ ((oldfmt) ? DIRECTSIZ((dp)->d_type) : DIRECTSIZ((dp)->d_namlen)) Modified: releng/12.0/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- releng/12.0/sys/ufs/ufs/ufs_lookup.c Wed Jul 3 00:01:38 2019 (r349622) +++ releng/12.0/sys/ufs/ufs/ufs_lookup.c Wed Jul 3 00:02:16 2019 (r349623) @@ -825,14 +825,21 @@ ufs_makedirentry(ip, cnp, newdirp) struct componentname *cnp; struct direct *newdirp; { + u_int namelen; -#ifdef INVARIANTS - if ((cnp->cn_flags & SAVENAME) == 0) - panic("ufs_makedirentry: missing name"); -#endif + namelen = (unsigned)cnp->cn_namelen; + KASSERT((cnp->cn_flags & SAVENAME) != 0, + ("ufs_makedirentry: missing name")); + KASSERT(namelen <= UFS_MAXNAMLEN, + ("ufs_makedirentry: name too long")); newdirp->d_ino = ip->i_number; - newdirp->d_namlen = cnp->cn_namelen; - bcopy(cnp->cn_nameptr, newdirp->d_name, (unsigned)cnp->cn_namelen + 1); + newdirp->d_namlen = namelen; + + /* Zero out after-name padding */ + *(u_int32_t *)(&newdirp->d_name[namelen & ~(DIR_ROUNDUP - 1)]) = 0; + + bcopy(cnp->cn_nameptr, newdirp->d_name, namelen); + if (ITOV(ip)->v_mount->mnt_maxsymlinklen > 0) newdirp->d_type = IFTODT(ip->i_mode); else { @@ -1211,16 +1218,21 @@ ufs_dirremove(dvp, ip, flags, isrmdir) if (ip && rep->d_ino != ip->i_number) panic("ufs_dirremove: ip %ju does not match dirent ino %ju\n", (uintmax_t)ip->i_number, (uintmax_t)rep->d_ino); - if (dp->i_count == 0) { + /* + * Zero out the file directory entry metadata to reduce disk + * scavenging disclosure. + */ + bzero(&rep->d_name[0], rep->d_namlen); + rep->d_namlen = 0; + rep->d_type = 0; + rep->d_ino = 0; + + if (dp->i_count != 0) { /* - * First entry in block: set d_ino to zero. - */ - ep->d_ino = 0; - } else { - /* * Collapse new free space into previous entry. */ ep->d_reclen += rep->d_reclen; + rep->d_reclen = 0; } #ifdef UFS_DIRHASH if (dp->i_dirhash != NULL) From owner-svn-src-all@freebsd.org Wed Jul 3 00:03:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2537515E0FCA; Wed, 3 Jul 2019 00:03:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCF2075D6B; Wed, 3 Jul 2019 00:03:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9743E3D84; Wed, 3 Jul 2019 00:03:14 +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 x6303EVj051295; Wed, 3 Jul 2019 00:03:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6303Eqt051294; Wed, 3 Jul 2019 00:03:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201907030003.x6303Eqt051294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jul 2019 00:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349624 - stable/11/lib/libc/iconv X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/lib/libc/iconv X-SVN-Commit-Revision: 349624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BCF2075D6B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:03:15 -0000 Author: emaste Date: Wed Jul 3 00:03:14 2019 New Revision: 349624 URL: https://svnweb.freebsd.org/changeset/base/349624 Log: MFC r349619: libc: correct iconv buffer overflow admbugs: 920 Submitted by: Andrea Venturoli, gabor Reported by: Andrea Venturoli , NetFence Approved by: so Security: CVE-2019-5600 Security: FreeBSD-SA-19:09.iconv Modified: stable/11/lib/libc/iconv/citrus_none.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/iconv/citrus_none.c ============================================================================== --- stable/11/lib/libc/iconv/citrus_none.c Wed Jul 3 00:02:16 2019 (r349623) +++ stable/11/lib/libc/iconv/citrus_none.c Wed Jul 3 00:03:14 2019 (r349624) @@ -142,7 +142,7 @@ _citrus_NONE_stdenc_cstomb(struct _citrus_stdenc * __r s[2] = (char)(idx >> 16); *nresult = 3; } else { - if (n < 3) { + if (n < 4) { *nresult = (size_t)-1; return (E2BIG); } From owner-svn-src-all@freebsd.org Wed Jul 3 00:03:58 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98B4015E1048; Wed, 3 Jul 2019 00:03:58 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 441A175E7D; Wed, 3 Jul 2019 00:03:58 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 164313D85; Wed, 3 Jul 2019 00:03:58 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6303wCU051380; Wed, 3 Jul 2019 00:03:58 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6303tCt051366; Wed, 3 Jul 2019 00:03:55 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201907030003.x6303tCt051366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 3 Jul 2019 00:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349625 - in releng: 11.2/sys/cam/scsi 11.2/sys/compat/linux 11.2/sys/dev/mcd 11.2/sys/dev/scd 11.2/sys/sys 11.3/sys/cam/scsi 11.3/sys/compat/linux 11.3/sys/dev/mcd 11.3/sys/dev/scd 11.... X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 11.2/sys/cam/scsi 11.2/sys/compat/linux 11.2/sys/dev/mcd 11.2/sys/dev/scd 11.2/sys/sys 11.3/sys/cam/scsi 11.3/sys/compat/linux 11.3/sys/dev/mcd 11.3/sys/dev/scd 11.3/sys/sys 12.0/sys/cam/sc... X-SVN-Commit-Revision: 349625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 441A175E7D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:03:59 -0000 Author: gordon Date: Wed Jul 3 00:03:55 2019 New Revision: 349625 URL: https://svnweb.freebsd.org/changeset/base/349625 Log: Fix privilege escalation in cd(4) driver. Approved by: so Approved by: re (implicit) Security: FreeBSD-SA-19:11.cd_ioctl Security: CVE-2019-5602 Modified: releng/11.2/sys/cam/scsi/scsi_cd.c releng/11.2/sys/compat/linux/linux_ioctl.c releng/11.2/sys/dev/mcd/mcd.c releng/11.2/sys/dev/scd/scd.c releng/11.2/sys/sys/cdio.h releng/11.3/sys/cam/scsi/scsi_cd.c releng/11.3/sys/compat/linux/linux_ioctl.c releng/11.3/sys/dev/mcd/mcd.c releng/11.3/sys/dev/scd/scd.c releng/11.3/sys/sys/cdio.h releng/12.0/sys/cam/scsi/scsi_cd.c releng/12.0/sys/compat/linux/linux_ioctl.c releng/12.0/sys/sys/cdio.h Modified: releng/11.2/sys/cam/scsi/scsi_cd.c ============================================================================== --- releng/11.2/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.2/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:03:55 2019 (r349625) @@ -1281,7 +1281,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f struct cam_periph *periph; struct cd_softc *softc; - int nocopyout, error = 0; + int error = 0; periph = (struct cam_periph *)dp->d_drv1; cam_periph_lock(periph); @@ -1323,7 +1323,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f */ cam_periph_unlock(periph); - nocopyout = 0; switch (cmd) { case CDIOCPLAYTRACKS: @@ -1499,9 +1498,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f cam_periph_unlock(periph); } break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - nocopyout = 1; - /* Fallthrough */ case CDIOCREADSUBCHANNEL: { struct ioc_read_subchannel *args @@ -1546,13 +1542,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f data->header.data_len[1] + sizeof(struct cd_sub_channel_header))); cam_periph_unlock(periph); - if (nocopyout == 0) { - if (copyout(data, args->data, len) != 0) { - error = EFAULT; - } - } else { - bcopy(data, args->data, len); - } + error = copyout(data, args->data, len); free(data, M_SCSICD); } break; Modified: releng/11.2/sys/compat/linux/linux_ioctl.c ============================================================================== --- releng/11.2/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.2/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:03:55 2019 (r349625) @@ -1546,16 +1546,26 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioct struct ioc_read_subchannel bsdsc; struct cd_sub_channel_info bsdinfo; + error = copyin((void *)args->arg, &sc, sizeof(sc)); + if (error) + break; + + /* + * Invoke the native ioctl and bounce the returned data through + * the userspace buffer. This works because the Linux structure + * is the same size as our structures for the subchannel header + * and position data. + */ bsdsc.address_format = CD_LBA_FORMAT; bsdsc.data_format = CD_CURRENT_POSITION; bsdsc.track = 0; - bsdsc.data_len = sizeof(bsdinfo); - bsdsc.data = &bsdinfo; - error = fo_ioctl(fp, CDIOCREADSUBCHANNEL_SYSSPACE, - (caddr_t)&bsdsc, td->td_ucred, td); + bsdsc.data_len = sizeof(sc); + bsdsc.data = (void *)args->arg; + error = fo_ioctl(fp, CDIOCREADSUBCHANNEL, (caddr_t)&bsdsc, + td->td_ucred, td); if (error) break; - error = copyin((void *)args->arg, &sc, sizeof(sc)); + error = copyin((void *)args->arg, &bsdinfo, sizeof(bsdinfo)); if (error) break; sc.cdsc_audiostatus = bsdinfo.header.audio_status; Modified: releng/11.2/sys/dev/mcd/mcd.c ============================================================================== --- releng/11.2/sys/dev/mcd/mcd.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.2/sys/dev/mcd/mcd.c Wed Jul 3 00:03:55 2019 (r349625) @@ -134,8 +134,7 @@ static void mcd_soft_reset(struct mcd_softc *); static int mcd_hard_reset(struct mcd_softc *); static int mcd_setmode(struct mcd_softc *, int mode); static int mcd_getqchan(struct mcd_softc *, struct mcd_qchninfo *q); -static int mcd_subchan(struct mcd_softc *, struct ioc_read_subchannel *sc, - int nocopyout); +static int mcd_subchan(struct mcd_softc *, struct ioc_read_subchannel *sc); static int mcd_toc_header(struct mcd_softc *, struct ioc_toc_header *th); static int mcd_read_toc(struct mcd_softc *); static int mcd_toc_entrys(struct mcd_softc *, struct ioc_read_toc_entry *te); @@ -482,10 +481,8 @@ MCD_TRACE("ioctl called 0x%lx\n", cmd); case CDIOCPLAYMSF: r = mcd_playmsf(sc, (struct ioc_play_msf *) addr); break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - return mcd_subchan(sc, (struct ioc_read_subchannel *) addr, 1); case CDIOCREADSUBCHANNEL: - return mcd_subchan(sc, (struct ioc_read_subchannel *) addr, 0); + return mcd_subchan(sc, (struct ioc_read_subchannel *) addr); case CDIOREADTOCHEADER: r = mcd_toc_header(sc, (struct ioc_toc_header *) addr); break; @@ -1411,7 +1408,7 @@ mcd_getqchan(struct mcd_softc *sc, struct mcd_qchninfo } static int -mcd_subchan(struct mcd_softc *sc, struct ioc_read_subchannel *sch, int nocopyout) +mcd_subchan(struct mcd_softc *sc, struct ioc_read_subchannel *sch) { struct mcd_qchninfo q; struct cd_sub_channel_info data; @@ -1478,10 +1475,7 @@ mcd_subchan(struct mcd_softc *sc, struct ioc_read_subc } MCD_UNLOCK(sc); - if (nocopyout == 0) - return copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); - bcopy(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); - return (0); + return (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))); } static int Modified: releng/11.2/sys/dev/scd/scd.c ============================================================================== --- releng/11.2/sys/dev/scd/scd.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.2/sys/dev/scd/scd.c Wed Jul 3 00:03:55 2019 (r349625) @@ -130,7 +130,7 @@ static int scd_resume(struct scd_softc *); static int scd_playtracks(struct scd_softc *, struct ioc_play_track *pt); static int scd_playmsf(struct scd_softc *, struct ioc_play_msf *msf); static int scd_play(struct scd_softc *, struct ioc_play_msf *msf); -static int scd_subchan(struct scd_softc *, struct ioc_read_subchannel *sch, int nocopyout); +static int scd_subchan(struct scd_softc *, struct ioc_read_subchannel *sch); static int read_subcode(struct scd_softc *, struct sony_subchannel_position_data *sch); /* for xcdplayer */ @@ -357,10 +357,8 @@ scdioctl(struct cdev *dev, u_long cmd, caddr_t addr, i case CDIOCPLAYMSF: error = scd_playmsf(sc, (struct ioc_play_msf *) addr); break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 1); case CDIOCREADSUBCHANNEL: - return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 0); + return scd_subchan(sc, (struct ioc_read_subchannel *) addr); case CDIOREADTOCHEADER: error = scd_toc_header (sc, (struct ioc_toc_header *) addr); break; @@ -564,7 +562,7 @@ scd_eject(struct scd_softc *sc) } static int -scd_subchan(struct scd_softc *sc, struct ioc_read_subchannel *sch, int nocopyout) +scd_subchan(struct scd_softc *sc, struct ioc_read_subchannel *sch) { struct sony_subchannel_position_data q; struct cd_sub_channel_info data; @@ -594,12 +592,8 @@ scd_subchan(struct scd_softc *sc, struct ioc_read_subc data.what.position.absaddr.msf.frame = bcd2bin(q.abs_msf[2]); SCD_UNLOCK(sc); - if (nocopyout == 0) { - if (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))!=0) - return (EFAULT); - } else { - bcopy(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); - } + if (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))!=0) + return (EFAULT); return (0); } Modified: releng/11.2/sys/sys/cdio.h ============================================================================== --- releng/11.2/sys/sys/cdio.h Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.2/sys/sys/cdio.h Wed Jul 3 00:03:55 2019 (r349625) @@ -274,11 +274,4 @@ struct ioc_capability { /*<2>*/ #define CDIOCCAPABILITY _IOR('c',30,struct ioc_capability) /*<2>*/ -/* - * Special version of CDIOCREADSUBCHANNEL which assumes that - * ioc_read_subchannel->data points to the kernel memory. For - * use in compatibility layers. - */ -#define CDIOCREADSUBCHANNEL_SYSSPACE _IOWR('c', 31, struct ioc_read_subchannel) - #endif /* !_SYS_CDIO_H_ */ Modified: releng/11.3/sys/cam/scsi/scsi_cd.c ============================================================================== --- releng/11.3/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.3/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:03:55 2019 (r349625) @@ -1281,7 +1281,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f struct cam_periph *periph; struct cd_softc *softc; - int nocopyout, error = 0; + int error = 0; periph = (struct cam_periph *)dp->d_drv1; cam_periph_lock(periph); @@ -1323,7 +1323,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f */ cam_periph_unlock(periph); - nocopyout = 0; switch (cmd) { case CDIOCPLAYTRACKS: @@ -1499,9 +1498,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f cam_periph_unlock(periph); } break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - nocopyout = 1; - /* Fallthrough */ case CDIOCREADSUBCHANNEL: { struct ioc_read_subchannel *args @@ -1546,13 +1542,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f data->header.data_len[1] + sizeof(struct cd_sub_channel_header))); cam_periph_unlock(periph); - if (nocopyout == 0) { - if (copyout(data, args->data, len) != 0) { - error = EFAULT; - } - } else { - bcopy(data, args->data, len); - } + error = copyout(data, args->data, len); free(data, M_SCSICD); } break; Modified: releng/11.3/sys/compat/linux/linux_ioctl.c ============================================================================== --- releng/11.3/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.3/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:03:55 2019 (r349625) @@ -1549,16 +1549,26 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioct struct ioc_read_subchannel bsdsc; struct cd_sub_channel_info bsdinfo; + error = copyin((void *)args->arg, &sc, sizeof(sc)); + if (error) + break; + + /* + * Invoke the native ioctl and bounce the returned data through + * the userspace buffer. This works because the Linux structure + * is the same size as our structures for the subchannel header + * and position data. + */ bsdsc.address_format = CD_LBA_FORMAT; bsdsc.data_format = CD_CURRENT_POSITION; bsdsc.track = 0; - bsdsc.data_len = sizeof(bsdinfo); - bsdsc.data = &bsdinfo; - error = fo_ioctl(fp, CDIOCREADSUBCHANNEL_SYSSPACE, - (caddr_t)&bsdsc, td->td_ucred, td); + bsdsc.data_len = sizeof(sc); + bsdsc.data = (void *)args->arg; + error = fo_ioctl(fp, CDIOCREADSUBCHANNEL, (caddr_t)&bsdsc, + td->td_ucred, td); if (error) break; - error = copyin((void *)args->arg, &sc, sizeof(sc)); + error = copyin((void *)args->arg, &bsdinfo, sizeof(bsdinfo)); if (error) break; sc.cdsc_audiostatus = bsdinfo.header.audio_status; Modified: releng/11.3/sys/dev/mcd/mcd.c ============================================================================== --- releng/11.3/sys/dev/mcd/mcd.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.3/sys/dev/mcd/mcd.c Wed Jul 3 00:03:55 2019 (r349625) @@ -134,8 +134,7 @@ static void mcd_soft_reset(struct mcd_softc *); static int mcd_hard_reset(struct mcd_softc *); static int mcd_setmode(struct mcd_softc *, int mode); static int mcd_getqchan(struct mcd_softc *, struct mcd_qchninfo *q); -static int mcd_subchan(struct mcd_softc *, struct ioc_read_subchannel *sc, - int nocopyout); +static int mcd_subchan(struct mcd_softc *, struct ioc_read_subchannel *sc); static int mcd_toc_header(struct mcd_softc *, struct ioc_toc_header *th); static int mcd_read_toc(struct mcd_softc *); static int mcd_toc_entrys(struct mcd_softc *, struct ioc_read_toc_entry *te); @@ -482,10 +481,8 @@ MCD_TRACE("ioctl called 0x%lx\n", cmd); case CDIOCPLAYMSF: r = mcd_playmsf(sc, (struct ioc_play_msf *) addr); break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - return mcd_subchan(sc, (struct ioc_read_subchannel *) addr, 1); case CDIOCREADSUBCHANNEL: - return mcd_subchan(sc, (struct ioc_read_subchannel *) addr, 0); + return mcd_subchan(sc, (struct ioc_read_subchannel *) addr); case CDIOREADTOCHEADER: r = mcd_toc_header(sc, (struct ioc_toc_header *) addr); break; @@ -1411,7 +1408,7 @@ mcd_getqchan(struct mcd_softc *sc, struct mcd_qchninfo } static int -mcd_subchan(struct mcd_softc *sc, struct ioc_read_subchannel *sch, int nocopyout) +mcd_subchan(struct mcd_softc *sc, struct ioc_read_subchannel *sch) { struct mcd_qchninfo q; struct cd_sub_channel_info data; @@ -1478,10 +1475,7 @@ mcd_subchan(struct mcd_softc *sc, struct ioc_read_subc } MCD_UNLOCK(sc); - if (nocopyout == 0) - return copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); - bcopy(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); - return (0); + return (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))); } static int Modified: releng/11.3/sys/dev/scd/scd.c ============================================================================== --- releng/11.3/sys/dev/scd/scd.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.3/sys/dev/scd/scd.c Wed Jul 3 00:03:55 2019 (r349625) @@ -130,7 +130,7 @@ static int scd_resume(struct scd_softc *); static int scd_playtracks(struct scd_softc *, struct ioc_play_track *pt); static int scd_playmsf(struct scd_softc *, struct ioc_play_msf *msf); static int scd_play(struct scd_softc *, struct ioc_play_msf *msf); -static int scd_subchan(struct scd_softc *, struct ioc_read_subchannel *sch, int nocopyout); +static int scd_subchan(struct scd_softc *, struct ioc_read_subchannel *sch); static int read_subcode(struct scd_softc *, struct sony_subchannel_position_data *sch); /* for xcdplayer */ @@ -357,10 +357,8 @@ scdioctl(struct cdev *dev, u_long cmd, caddr_t addr, i case CDIOCPLAYMSF: error = scd_playmsf(sc, (struct ioc_play_msf *) addr); break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 1); case CDIOCREADSUBCHANNEL: - return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 0); + return scd_subchan(sc, (struct ioc_read_subchannel *) addr); case CDIOREADTOCHEADER: error = scd_toc_header (sc, (struct ioc_toc_header *) addr); break; @@ -564,7 +562,7 @@ scd_eject(struct scd_softc *sc) } static int -scd_subchan(struct scd_softc *sc, struct ioc_read_subchannel *sch, int nocopyout) +scd_subchan(struct scd_softc *sc, struct ioc_read_subchannel *sch) { struct sony_subchannel_position_data q; struct cd_sub_channel_info data; @@ -594,12 +592,8 @@ scd_subchan(struct scd_softc *sc, struct ioc_read_subc data.what.position.absaddr.msf.frame = bcd2bin(q.abs_msf[2]); SCD_UNLOCK(sc); - if (nocopyout == 0) { - if (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))!=0) - return (EFAULT); - } else { - bcopy(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); - } + if (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))!=0) + return (EFAULT); return (0); } Modified: releng/11.3/sys/sys/cdio.h ============================================================================== --- releng/11.3/sys/sys/cdio.h Wed Jul 3 00:03:14 2019 (r349624) +++ releng/11.3/sys/sys/cdio.h Wed Jul 3 00:03:55 2019 (r349625) @@ -274,11 +274,4 @@ struct ioc_capability { /*<2>*/ #define CDIOCCAPABILITY _IOR('c',30,struct ioc_capability) /*<2>*/ -/* - * Special version of CDIOCREADSUBCHANNEL which assumes that - * ioc_read_subchannel->data points to the kernel memory. For - * use in compatibility layers. - */ -#define CDIOCREADSUBCHANNEL_SYSSPACE _IOWR('c', 31, struct ioc_read_subchannel) - #endif /* !_SYS_CDIO_H_ */ Modified: releng/12.0/sys/cam/scsi/scsi_cd.c ============================================================================== --- releng/12.0/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/12.0/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:03:55 2019 (r349625) @@ -1314,7 +1314,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f struct cam_periph *periph; struct cd_softc *softc; - int nocopyout, error = 0; + int error = 0; periph = (struct cam_periph *)dp->d_drv1; cam_periph_lock(periph); @@ -1356,7 +1356,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f */ cam_periph_unlock(periph); - nocopyout = 0; switch (cmd) { case CDIOCPLAYTRACKS: @@ -1532,9 +1531,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f cam_periph_unlock(periph); } break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - nocopyout = 1; - /* Fallthrough */ case CDIOCREADSUBCHANNEL: { struct ioc_read_subchannel *args @@ -1579,13 +1575,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f data->header.data_len[1] + sizeof(struct cd_sub_channel_header))); cam_periph_unlock(periph); - if (nocopyout == 0) { - if (copyout(data, args->data, len) != 0) { - error = EFAULT; - } - } else { - bcopy(data, args->data, len); - } + error = copyout(data, args->data, len); free(data, M_SCSICD); } break; Modified: releng/12.0/sys/compat/linux/linux_ioctl.c ============================================================================== --- releng/12.0/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:03:14 2019 (r349624) +++ releng/12.0/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:03:55 2019 (r349625) @@ -1544,16 +1544,26 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioct struct ioc_read_subchannel bsdsc; struct cd_sub_channel_info bsdinfo; + error = copyin((void *)args->arg, &sc, sizeof(sc)); + if (error) + break; + + /* + * Invoke the native ioctl and bounce the returned data through + * the userspace buffer. This works because the Linux structure + * is the same size as our structures for the subchannel header + * and position data. + */ bsdsc.address_format = CD_LBA_FORMAT; bsdsc.data_format = CD_CURRENT_POSITION; bsdsc.track = 0; - bsdsc.data_len = sizeof(bsdinfo); - bsdsc.data = &bsdinfo; - error = fo_ioctl(fp, CDIOCREADSUBCHANNEL_SYSSPACE, - (caddr_t)&bsdsc, td->td_ucred, td); + bsdsc.data_len = sizeof(sc); + bsdsc.data = (void *)args->arg; + error = fo_ioctl(fp, CDIOCREADSUBCHANNEL, (caddr_t)&bsdsc, + td->td_ucred, td); if (error) break; - error = copyin((void *)args->arg, &sc, sizeof(sc)); + error = copyin((void *)args->arg, &bsdinfo, sizeof(bsdinfo)); if (error) break; sc.cdsc_audiostatus = bsdinfo.header.audio_status; Modified: releng/12.0/sys/sys/cdio.h ============================================================================== --- releng/12.0/sys/sys/cdio.h Wed Jul 3 00:03:14 2019 (r349624) +++ releng/12.0/sys/sys/cdio.h Wed Jul 3 00:03:55 2019 (r349625) @@ -274,11 +274,4 @@ struct ioc_capability { /*<2>*/ #define CDIOCCAPABILITY _IOR('c',30,struct ioc_capability) /*<2>*/ -/* - * Special version of CDIOCREADSUBCHANNEL which assumes that - * ioc_read_subchannel->data points to the kernel memory. For - * use in compatibility layers. - */ -#define CDIOCREADSUBCHANNEL_SYSSPACE _IOWR('c', 31, struct ioc_read_subchannel) - #endif /* !_SYS_CDIO_H_ */ From owner-svn-src-all@freebsd.org Wed Jul 3 00:04:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED18A15E10E9; Wed, 3 Jul 2019 00:04:52 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9489275FD8; Wed, 3 Jul 2019 00:04:52 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54B743D86; Wed, 3 Jul 2019 00:04:52 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6304qc3051463; Wed, 3 Jul 2019 00:04:52 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6304pi4051457; Wed, 3 Jul 2019 00:04:51 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201907030004.x6304pi4051457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 3 Jul 2019 00:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349626 - in releng: 11.2 11.2/sys/conf 11.3 11.3/sys/conf 12.0 12.0/sys/conf X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 11.2 11.2/sys/conf 11.3 11.3/sys/conf 12.0 12.0/sys/conf X-SVN-Commit-Revision: 349626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9489275FD8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:04:53 -0000 Author: gordon Date: Wed Jul 3 00:04:50 2019 New Revision: 349626 URL: https://svnweb.freebsd.org/changeset/base/349626 Log: Update UPDATING and bump newvers.sh Approved by: so Approved by: re (implicit) Modified: releng/11.2/UPDATING releng/11.2/sys/conf/newvers.sh releng/11.3/UPDATING releng/11.3/sys/conf/newvers.sh releng/12.0/UPDATING releng/12.0/sys/conf/newvers.sh Modified: releng/11.2/UPDATING ============================================================================== --- releng/11.2/UPDATING Wed Jul 3 00:03:55 2019 (r349625) +++ releng/11.2/UPDATING Wed Jul 3 00:04:50 2019 (r349626) @@ -16,6 +16,19 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20190702 p11 FreeBSD-EN-19:12.tzdata + FreeBSD-SA-19:09.iconv + FreeBSD-SA-19:10.ufs + FreeBSD-SA-19:11.cd_ioctl + + Import tzdata 2019b. [EN-19:12.tzdata] + + Fix iconv buffer overflow. [SA-19:09.iconv] + + Fix kernel stack disclosure in UFS/FFS. [SA-19:10.ufs] + + Fix privilege escalation in cd(4) driver. [SA-19:11.cd_ioctl] + 20190514 p10 FreeBSD-EN-19:08.tzdata FreeBSD-EN-19:09.xinstall FreeBSD-SA-19:03.wpa Modified: releng/11.2/sys/conf/newvers.sh ============================================================================== --- releng/11.2/sys/conf/newvers.sh Wed Jul 3 00:03:55 2019 (r349625) +++ releng/11.2/sys/conf/newvers.sh Wed Jul 3 00:04:50 2019 (r349626) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.2" -BRANCH="RELEASE-p10" +BRANCH="RELEASE-p11" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/11.3/UPDATING ============================================================================== --- releng/11.3/UPDATING Wed Jul 3 00:03:55 2019 (r349625) +++ releng/11.3/UPDATING Wed Jul 3 00:04:50 2019 (r349626) @@ -16,6 +16,16 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20190702 p1 FreeBSD-EN-19:12.tzdata + FreeBSD-SA-19:09.iconv + FreeBSD-SA-19:11.cd_ioctl + + Import tzdata 2019b. [EN-19:12.tzdata] + + Fix iconv buffer overflow. [SA-19:09.iconv] + + Fix privilege escalation in cd(4) driver. [SA-19:11.cd_ioctl] + 20190426: CARP now sets DSCP value CS7(Network Traffic) in the flowlabel field of packets by default instead of only setting TOS_LOWDELAY in IPv4, Modified: releng/11.3/sys/conf/newvers.sh ============================================================================== --- releng/11.3/sys/conf/newvers.sh Wed Jul 3 00:03:55 2019 (r349625) +++ releng/11.3/sys/conf/newvers.sh Wed Jul 3 00:04:50 2019 (r349626) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="RC3" +BRANCH="RC3-p1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/12.0/UPDATING ============================================================================== --- releng/12.0/UPDATING Wed Jul 3 00:03:55 2019 (r349625) +++ releng/12.0/UPDATING Wed Jul 3 00:04:50 2019 (r349626) @@ -16,6 +16,19 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20190702 p7 FreeBSD-EN-19:12.tzdata + FreeBSD-SA-19:09.iconv + FreeBSD-SA-19:10.ufs + FreeBSD-SA-19:11.cd_ioctl + + Import tzdata 2019b. [EN-19:12.tzdata] + + Fix iconv buffer overflow. [SA-19:09.iconv] + + Fix kernel stack disclosure in UFS/FFS. [SA-19:10.ufs] + + Fix privilege escalation in cd(4) driver. [SA-19:11.cd_ioctl] + 20190619 p6 FreeBSD-EN-19:11.net FreeBSD-SA-19:08.rack Modified: releng/12.0/sys/conf/newvers.sh ============================================================================== --- releng/12.0/sys/conf/newvers.sh Wed Jul 3 00:03:55 2019 (r349625) +++ releng/12.0/sys/conf/newvers.sh Wed Jul 3 00:04:50 2019 (r349626) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="RELEASE-p6" +BRANCH="RELEASE-p7" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Wed Jul 3 00:10:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C359515E137A; Wed, 3 Jul 2019 00:10:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A795763F1; Wed, 3 Jul 2019 00:10:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 458823D90; Wed, 3 Jul 2019 00:10:02 +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 x630A2fg052023; Wed, 3 Jul 2019 00:10:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x630A19M052020; Wed, 3 Jul 2019 00:10:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907030010.x630A19M052020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 00:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349627 - in head/sys: cam/scsi compat/linux sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: cam/scsi compat/linux sys X-SVN-Commit-Revision: 349627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6A795763F1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:10:03 -0000 Author: markj Date: Wed Jul 3 00:10:01 2019 New Revision: 349627 URL: https://svnweb.freebsd.org/changeset/base/349627 Log: Remove the CDIOCREADSUBCHANNEL_SYSSPACE ioctl. This was added for emulation of Linux's CDROMSUBCHNL, but allows users with read access to a cd(4) device to overwrite kernel memory provided that the driver detects some media present. Reimplement CDROMSUBCHNL by bouncing the data from CDIOCREADSUBCHANNEL through the linux_cdrom_subchnl structure passed from userspace. admbugs: 768 Reported by: Alex Fortune Security: CVE-2019-5602 Security: FreeBSD-SA-19:11.cd_ioctl Modified: head/sys/cam/scsi/scsi_cd.c head/sys/compat/linux/linux_ioctl.c head/sys/sys/cdio.h Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:04:50 2019 (r349626) +++ head/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:10:01 2019 (r349627) @@ -1314,7 +1314,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f struct cam_periph *periph; struct cd_softc *softc; - int nocopyout, error = 0; + int error = 0; periph = (struct cam_periph *)dp->d_drv1; cam_periph_lock(periph); @@ -1356,7 +1356,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f */ cam_periph_unlock(periph); - nocopyout = 0; switch (cmd) { case CDIOCPLAYTRACKS: @@ -1532,9 +1531,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f cam_periph_unlock(periph); } break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - nocopyout = 1; - /* Fallthrough */ case CDIOCREADSUBCHANNEL: { struct ioc_read_subchannel *args @@ -1579,13 +1575,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f data->header.data_len[1] + sizeof(struct cd_sub_channel_header))); cam_periph_unlock(periph); - if (nocopyout == 0) { - if (copyout(data, args->data, len) != 0) { - error = EFAULT; - } - } else { - bcopy(data, args->data, len); - } + error = copyout(data, args->data, len); free(data, M_SCSICD); } break; Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:04:50 2019 (r349626) +++ head/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:10:01 2019 (r349627) @@ -1489,16 +1489,26 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioct struct ioc_read_subchannel bsdsc; struct cd_sub_channel_info bsdinfo; + error = copyin((void *)args->arg, &sc, sizeof(sc)); + if (error) + break; + + /* + * Invoke the native ioctl and bounce the returned data through + * the userspace buffer. This works because the Linux structure + * is the same size as our structures for the subchannel header + * and position data. + */ bsdsc.address_format = CD_LBA_FORMAT; bsdsc.data_format = CD_CURRENT_POSITION; bsdsc.track = 0; - bsdsc.data_len = sizeof(bsdinfo); - bsdsc.data = &bsdinfo; - error = fo_ioctl(fp, CDIOCREADSUBCHANNEL_SYSSPACE, - (caddr_t)&bsdsc, td->td_ucred, td); + bsdsc.data_len = sizeof(sc); + bsdsc.data = (void *)args->arg; + error = fo_ioctl(fp, CDIOCREADSUBCHANNEL, (caddr_t)&bsdsc, + td->td_ucred, td); if (error) break; - error = copyin((void *)args->arg, &sc, sizeof(sc)); + error = copyin((void *)args->arg, &bsdinfo, sizeof(bsdinfo)); if (error) break; sc.cdsc_audiostatus = bsdinfo.header.audio_status; Modified: head/sys/sys/cdio.h ============================================================================== --- head/sys/sys/cdio.h Wed Jul 3 00:04:50 2019 (r349626) +++ head/sys/sys/cdio.h Wed Jul 3 00:10:01 2019 (r349627) @@ -274,11 +274,4 @@ struct ioc_capability { /*<2>*/ #define CDIOCCAPABILITY _IOR('c',30,struct ioc_capability) /*<2>*/ -/* - * Special version of CDIOCREADSUBCHANNEL which assumes that - * ioc_read_subchannel->data points to the kernel memory. For - * use in compatibility layers. - */ -#define CDIOCREADSUBCHANNEL_SYSSPACE _IOWR('c', 31, struct ioc_read_subchannel) - #endif /* !_SYS_CDIO_H_ */ From owner-svn-src-all@freebsd.org Wed Jul 3 00:11:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB9BC15E1574; Wed, 3 Jul 2019 00:11:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C6B276605; Wed, 3 Jul 2019 00:11:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57DEB3DDF; Wed, 3 Jul 2019 00:11:32 +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 x630BWiX056861; Wed, 3 Jul 2019 00:11:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x630BVqB056859; Wed, 3 Jul 2019 00:11:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907030011.x630BVqB056859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 00:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349628 - in stable/12/sys: cam/scsi compat/linux sys X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: cam/scsi compat/linux sys X-SVN-Commit-Revision: 349628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7C6B276605 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:11:33 -0000 Author: markj Date: Wed Jul 3 00:11:31 2019 New Revision: 349628 URL: https://svnweb.freebsd.org/changeset/base/349628 Log: MFC r349627: Remove the CDIOCREADSUBCHANNEL_SYSSPACE ioctl. admbugs: 768 Reported by: Alex Fortune Approved by: so Security: CVE-2019-5602 Security: FreeBSD-SA-19:11.cd_ioctl Modified: stable/12/sys/cam/scsi/scsi_cd.c stable/12/sys/compat/linux/linux_ioctl.c stable/12/sys/sys/cdio.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/12/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:10:01 2019 (r349627) +++ stable/12/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:11:31 2019 (r349628) @@ -1314,7 +1314,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f struct cam_periph *periph; struct cd_softc *softc; - int nocopyout, error = 0; + int error = 0; periph = (struct cam_periph *)dp->d_drv1; cam_periph_lock(periph); @@ -1356,7 +1356,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f */ cam_periph_unlock(periph); - nocopyout = 0; switch (cmd) { case CDIOCPLAYTRACKS: @@ -1532,9 +1531,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f cam_periph_unlock(periph); } break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - nocopyout = 1; - /* Fallthrough */ case CDIOCREADSUBCHANNEL: { struct ioc_read_subchannel *args @@ -1579,13 +1575,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f data->header.data_len[1] + sizeof(struct cd_sub_channel_header))); cam_periph_unlock(periph); - if (nocopyout == 0) { - if (copyout(data, args->data, len) != 0) { - error = EFAULT; - } - } else { - bcopy(data, args->data, len); - } + error = copyout(data, args->data, len); free(data, M_SCSICD); } break; Modified: stable/12/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/12/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:10:01 2019 (r349627) +++ stable/12/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:11:31 2019 (r349628) @@ -1546,16 +1546,26 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioct struct ioc_read_subchannel bsdsc; struct cd_sub_channel_info bsdinfo; + error = copyin((void *)args->arg, &sc, sizeof(sc)); + if (error) + break; + + /* + * Invoke the native ioctl and bounce the returned data through + * the userspace buffer. This works because the Linux structure + * is the same size as our structures for the subchannel header + * and position data. + */ bsdsc.address_format = CD_LBA_FORMAT; bsdsc.data_format = CD_CURRENT_POSITION; bsdsc.track = 0; - bsdsc.data_len = sizeof(bsdinfo); - bsdsc.data = &bsdinfo; - error = fo_ioctl(fp, CDIOCREADSUBCHANNEL_SYSSPACE, - (caddr_t)&bsdsc, td->td_ucred, td); + bsdsc.data_len = sizeof(sc); + bsdsc.data = (void *)args->arg; + error = fo_ioctl(fp, CDIOCREADSUBCHANNEL, (caddr_t)&bsdsc, + td->td_ucred, td); if (error) break; - error = copyin((void *)args->arg, &sc, sizeof(sc)); + error = copyin((void *)args->arg, &bsdinfo, sizeof(bsdinfo)); if (error) break; sc.cdsc_audiostatus = bsdinfo.header.audio_status; Modified: stable/12/sys/sys/cdio.h ============================================================================== --- stable/12/sys/sys/cdio.h Wed Jul 3 00:10:01 2019 (r349627) +++ stable/12/sys/sys/cdio.h Wed Jul 3 00:11:31 2019 (r349628) @@ -274,11 +274,4 @@ struct ioc_capability { /*<2>*/ #define CDIOCCAPABILITY _IOR('c',30,struct ioc_capability) /*<2>*/ -/* - * Special version of CDIOCREADSUBCHANNEL which assumes that - * ioc_read_subchannel->data points to the kernel memory. For - * use in compatibility layers. - */ -#define CDIOCREADSUBCHANNEL_SYSSPACE _IOWR('c', 31, struct ioc_read_subchannel) - #endif /* !_SYS_CDIO_H_ */ From owner-svn-src-all@freebsd.org Wed Jul 3 00:12:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B336215E15F5; Wed, 3 Jul 2019 00:12:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 592D476931; Wed, 3 Jul 2019 00:12:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F8733F39; Wed, 3 Jul 2019 00:12:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x630Cq9v056959; Wed, 3 Jul 2019 00:12:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x630Cp09056954; Wed, 3 Jul 2019 00:12:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907030012.x630Cp09056954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 00:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349629 - in stable/11/sys: cam/scsi compat/linux dev/mcd dev/scd sys X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/sys: cam/scsi compat/linux dev/mcd dev/scd sys X-SVN-Commit-Revision: 349629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 592D476931 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:12:52 -0000 Author: markj Date: Wed Jul 3 00:12:50 2019 New Revision: 349629 URL: https://svnweb.freebsd.org/changeset/base/349629 Log: MFC r349627: Remove the CDIOCREADSUBCHANNEL_SYSSPACE ioctl. admbugs: 768 Reported by: Alex Fortune Approved by: so Security: CVE-2019-5602 Security: FreeBSD-SA-19:11.cd_ioctl Modified: stable/11/sys/cam/scsi/scsi_cd.c stable/11/sys/compat/linux/linux_ioctl.c stable/11/sys/dev/mcd/mcd.c stable/11/sys/dev/scd/scd.c stable/11/sys/sys/cdio.h Modified: stable/11/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:11:31 2019 (r349628) +++ stable/11/sys/cam/scsi/scsi_cd.c Wed Jul 3 00:12:50 2019 (r349629) @@ -1281,7 +1281,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f struct cam_periph *periph; struct cd_softc *softc; - int nocopyout, error = 0; + int error = 0; periph = (struct cam_periph *)dp->d_drv1; cam_periph_lock(periph); @@ -1323,7 +1323,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f */ cam_periph_unlock(periph); - nocopyout = 0; switch (cmd) { case CDIOCPLAYTRACKS: @@ -1499,9 +1498,6 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f cam_periph_unlock(periph); } break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - nocopyout = 1; - /* Fallthrough */ case CDIOCREADSUBCHANNEL: { struct ioc_read_subchannel *args @@ -1546,13 +1542,7 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int f data->header.data_len[1] + sizeof(struct cd_sub_channel_header))); cam_periph_unlock(periph); - if (nocopyout == 0) { - if (copyout(data, args->data, len) != 0) { - error = EFAULT; - } - } else { - bcopy(data, args->data, len); - } + error = copyout(data, args->data, len); free(data, M_SCSICD); } break; Modified: stable/11/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/11/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:11:31 2019 (r349628) +++ stable/11/sys/compat/linux/linux_ioctl.c Wed Jul 3 00:12:50 2019 (r349629) @@ -1549,16 +1549,26 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioct struct ioc_read_subchannel bsdsc; struct cd_sub_channel_info bsdinfo; + error = copyin((void *)args->arg, &sc, sizeof(sc)); + if (error) + break; + + /* + * Invoke the native ioctl and bounce the returned data through + * the userspace buffer. This works because the Linux structure + * is the same size as our structures for the subchannel header + * and position data. + */ bsdsc.address_format = CD_LBA_FORMAT; bsdsc.data_format = CD_CURRENT_POSITION; bsdsc.track = 0; - bsdsc.data_len = sizeof(bsdinfo); - bsdsc.data = &bsdinfo; - error = fo_ioctl(fp, CDIOCREADSUBCHANNEL_SYSSPACE, - (caddr_t)&bsdsc, td->td_ucred, td); + bsdsc.data_len = sizeof(sc); + bsdsc.data = (void *)args->arg; + error = fo_ioctl(fp, CDIOCREADSUBCHANNEL, (caddr_t)&bsdsc, + td->td_ucred, td); if (error) break; - error = copyin((void *)args->arg, &sc, sizeof(sc)); + error = copyin((void *)args->arg, &bsdinfo, sizeof(bsdinfo)); if (error) break; sc.cdsc_audiostatus = bsdinfo.header.audio_status; Modified: stable/11/sys/dev/mcd/mcd.c ============================================================================== --- stable/11/sys/dev/mcd/mcd.c Wed Jul 3 00:11:31 2019 (r349628) +++ stable/11/sys/dev/mcd/mcd.c Wed Jul 3 00:12:50 2019 (r349629) @@ -134,8 +134,7 @@ static void mcd_soft_reset(struct mcd_softc *); static int mcd_hard_reset(struct mcd_softc *); static int mcd_setmode(struct mcd_softc *, int mode); static int mcd_getqchan(struct mcd_softc *, struct mcd_qchninfo *q); -static int mcd_subchan(struct mcd_softc *, struct ioc_read_subchannel *sc, - int nocopyout); +static int mcd_subchan(struct mcd_softc *, struct ioc_read_subchannel *sc); static int mcd_toc_header(struct mcd_softc *, struct ioc_toc_header *th); static int mcd_read_toc(struct mcd_softc *); static int mcd_toc_entrys(struct mcd_softc *, struct ioc_read_toc_entry *te); @@ -482,10 +481,8 @@ MCD_TRACE("ioctl called 0x%lx\n", cmd); case CDIOCPLAYMSF: r = mcd_playmsf(sc, (struct ioc_play_msf *) addr); break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - return mcd_subchan(sc, (struct ioc_read_subchannel *) addr, 1); case CDIOCREADSUBCHANNEL: - return mcd_subchan(sc, (struct ioc_read_subchannel *) addr, 0); + return mcd_subchan(sc, (struct ioc_read_subchannel *) addr); case CDIOREADTOCHEADER: r = mcd_toc_header(sc, (struct ioc_toc_header *) addr); break; @@ -1411,7 +1408,7 @@ mcd_getqchan(struct mcd_softc *sc, struct mcd_qchninfo } static int -mcd_subchan(struct mcd_softc *sc, struct ioc_read_subchannel *sch, int nocopyout) +mcd_subchan(struct mcd_softc *sc, struct ioc_read_subchannel *sch) { struct mcd_qchninfo q; struct cd_sub_channel_info data; @@ -1478,10 +1475,7 @@ mcd_subchan(struct mcd_softc *sc, struct ioc_read_subc } MCD_UNLOCK(sc); - if (nocopyout == 0) - return copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); - bcopy(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); - return (0); + return (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))); } static int Modified: stable/11/sys/dev/scd/scd.c ============================================================================== --- stable/11/sys/dev/scd/scd.c Wed Jul 3 00:11:31 2019 (r349628) +++ stable/11/sys/dev/scd/scd.c Wed Jul 3 00:12:50 2019 (r349629) @@ -130,7 +130,7 @@ static int scd_resume(struct scd_softc *); static int scd_playtracks(struct scd_softc *, struct ioc_play_track *pt); static int scd_playmsf(struct scd_softc *, struct ioc_play_msf *msf); static int scd_play(struct scd_softc *, struct ioc_play_msf *msf); -static int scd_subchan(struct scd_softc *, struct ioc_read_subchannel *sch, int nocopyout); +static int scd_subchan(struct scd_softc *, struct ioc_read_subchannel *sch); static int read_subcode(struct scd_softc *, struct sony_subchannel_position_data *sch); /* for xcdplayer */ @@ -357,10 +357,8 @@ scdioctl(struct cdev *dev, u_long cmd, caddr_t addr, i case CDIOCPLAYMSF: error = scd_playmsf(sc, (struct ioc_play_msf *) addr); break; - case CDIOCREADSUBCHANNEL_SYSSPACE: - return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 1); case CDIOCREADSUBCHANNEL: - return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 0); + return scd_subchan(sc, (struct ioc_read_subchannel *) addr); case CDIOREADTOCHEADER: error = scd_toc_header (sc, (struct ioc_toc_header *) addr); break; @@ -564,7 +562,7 @@ scd_eject(struct scd_softc *sc) } static int -scd_subchan(struct scd_softc *sc, struct ioc_read_subchannel *sch, int nocopyout) +scd_subchan(struct scd_softc *sc, struct ioc_read_subchannel *sch) { struct sony_subchannel_position_data q; struct cd_sub_channel_info data; @@ -594,12 +592,8 @@ scd_subchan(struct scd_softc *sc, struct ioc_read_subc data.what.position.absaddr.msf.frame = bcd2bin(q.abs_msf[2]); SCD_UNLOCK(sc); - if (nocopyout == 0) { - if (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))!=0) - return (EFAULT); - } else { - bcopy(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len)); - } + if (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))!=0) + return (EFAULT); return (0); } Modified: stable/11/sys/sys/cdio.h ============================================================================== --- stable/11/sys/sys/cdio.h Wed Jul 3 00:11:31 2019 (r349628) +++ stable/11/sys/sys/cdio.h Wed Jul 3 00:12:50 2019 (r349629) @@ -274,11 +274,4 @@ struct ioc_capability { /*<2>*/ #define CDIOCCAPABILITY _IOR('c',30,struct ioc_capability) /*<2>*/ -/* - * Special version of CDIOCREADSUBCHANNEL which assumes that - * ioc_read_subchannel->data points to the kernel memory. For - * use in compatibility layers. - */ -#define CDIOCREADSUBCHANNEL_SYSSPACE _IOWR('c', 31, struct ioc_read_subchannel) - #endif /* !_SYS_CDIO_H_ */ From owner-svn-src-all@freebsd.org Wed Jul 3 00:32:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 764AA15E21B2; Wed, 3 Jul 2019 00:32:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1474D77419; Wed, 3 Jul 2019 00:32:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B12B342DB; Wed, 3 Jul 2019 00:32:42 +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 x630WgW5067378; Wed, 3 Jul 2019 00:32:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x630Wg0I067377; Wed, 3 Jul 2019 00:32:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907030032.x630Wg0I067377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 00:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349630 - stable/12/sbin/dhclient X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sbin/dhclient X-SVN-Commit-Revision: 349630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1474D77419 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:32:43 -0000 Author: markj Date: Wed Jul 3 00:32:42 2019 New Revision: 349630 URL: https://svnweb.freebsd.org/changeset/base/349630 Log: MFC r349438: Avoid a divide-by-zero when bad checksum counters overflow. Modified: stable/12/sbin/dhclient/packet.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/dhclient/packet.c ============================================================================== --- stable/12/sbin/dhclient/packet.c Wed Jul 3 00:12:50 2019 (r349629) +++ stable/12/sbin/dhclient/packet.c Wed Jul 3 00:32:42 2019 (r349630) @@ -183,7 +183,7 @@ decode_udp_ip_header(unsigned char *buf, int bufix, st ip_packets_seen++; if (wrapsum(checksum(buf + bufix, ip_len, 0)) != 0) { ip_packets_bad_checksum++; - if (ip_packets_seen > 4 && + if (ip_packets_seen > 4 && ip_packets_bad_checksum != 0 && (ip_packets_seen / ip_packets_bad_checksum) < 2) { note("%d bad IP checksums seen in %d packets", ip_packets_bad_checksum, ip_packets_seen); @@ -235,7 +235,7 @@ decode_udp_ip_header(unsigned char *buf, int bufix, st udp_packets_seen++; if (usum && usum != sum) { udp_packets_bad_checksum++; - if (udp_packets_seen > 4 && + if (udp_packets_seen > 4 && udp_packets_bad_checksum != 0 && (udp_packets_seen / udp_packets_bad_checksum) < 2) { note("%d bad udp checksums in %d packets", udp_packets_bad_checksum, udp_packets_seen); From owner-svn-src-all@freebsd.org Wed Jul 3 00:35:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2346515E229A; Wed, 3 Jul 2019 00:35:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD1A577638; Wed, 3 Jul 2019 00:35: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8971242DC; Wed, 3 Jul 2019 00:35: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 x630ZFqR067552; Wed, 3 Jul 2019 00:35:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x630ZFlX067551; Wed, 3 Jul 2019 00:35:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907030035.x630ZFlX067551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 00:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349631 - stable/11/sbin/dhclient X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sbin/dhclient X-SVN-Commit-Revision: 349631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD1A577638 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:35:16 -0000 Author: markj Date: Wed Jul 3 00:35:14 2019 New Revision: 349631 URL: https://svnweb.freebsd.org/changeset/base/349631 Log: MFC r349438: Avoid a divide-by-zero when bad checksum counters overflow. Modified: stable/11/sbin/dhclient/packet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/dhclient/packet.c ============================================================================== --- stable/11/sbin/dhclient/packet.c Wed Jul 3 00:32:42 2019 (r349630) +++ stable/11/sbin/dhclient/packet.c Wed Jul 3 00:35:14 2019 (r349631) @@ -181,7 +181,7 @@ decode_udp_ip_header(unsigned char *buf, int bufix, st ip_packets_seen++; if (wrapsum(checksum(buf + bufix, ip_len, 0)) != 0) { ip_packets_bad_checksum++; - if (ip_packets_seen > 4 && + if (ip_packets_seen > 4 && ip_packets_bad_checksum != 0 && (ip_packets_seen / ip_packets_bad_checksum) < 2) { note("%d bad IP checksums seen in %d packets", ip_packets_bad_checksum, ip_packets_seen); @@ -233,7 +233,7 @@ decode_udp_ip_header(unsigned char *buf, int bufix, st udp_packets_seen++; if (usum && usum != sum) { udp_packets_bad_checksum++; - if (udp_packets_seen > 4 && + if (udp_packets_seen > 4 && udp_packets_bad_checksum != 0 && (udp_packets_seen / udp_packets_bad_checksum) < 2) { note("%d bad udp checksums in %d packets", udp_packets_bad_checksum, udp_packets_seen); From owner-svn-src-all@freebsd.org Wed Jul 3 00:36:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 050A915E231B; Wed, 3 Jul 2019 00:36:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D2977778E; Wed, 3 Jul 2019 00:36:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7794342DD; Wed, 3 Jul 2019 00:36:01 +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 x630a1D7067629; Wed, 3 Jul 2019 00:36:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x630a1EK067628; Wed, 3 Jul 2019 00:36:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907030036.x630a1EK067628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 00:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349632 - stable/12/sbin/dhclient X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sbin/dhclient X-SVN-Commit-Revision: 349632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9D2977778E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:36:02 -0000 Author: markj Date: Wed Jul 3 00:36:00 2019 New Revision: 349632 URL: https://svnweb.freebsd.org/changeset/base/349632 Log: MFC r349439: Free DHCP options with length zero. Modified: stable/12/sbin/dhclient/options.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/dhclient/options.c ============================================================================== --- stable/12/sbin/dhclient/options.c Wed Jul 3 00:35:14 2019 (r349631) +++ stable/12/sbin/dhclient/options.c Wed Jul 3 00:36:00 2019 (r349632) @@ -896,6 +896,5 @@ do_packet(struct interface_info *interface, struct dhc /* Free the data associated with the options. */ for (i = 0; i < 256; i++) - if (tp.options[i].len && tp.options[i].data) - free(tp.options[i].data); + free(tp.options[i].data); } From owner-svn-src-all@freebsd.org Wed Jul 3 00:36:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15FD515E23D2; Wed, 3 Jul 2019 00:36:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B046D778E9; Wed, 3 Jul 2019 00:36:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B5D842E1; Wed, 3 Jul 2019 00:36:34 +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 x630aYqm067694; Wed, 3 Jul 2019 00:36:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x630aYdP067693; Wed, 3 Jul 2019 00:36:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907030036.x630aYdP067693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 00:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349633 - stable/11/sbin/dhclient X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sbin/dhclient X-SVN-Commit-Revision: 349633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B046D778E9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:36:35 -0000 Author: markj Date: Wed Jul 3 00:36:34 2019 New Revision: 349633 URL: https://svnweb.freebsd.org/changeset/base/349633 Log: MFC r349439: Free DHCP options with length zero. Modified: stable/11/sbin/dhclient/options.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/dhclient/options.c ============================================================================== --- stable/11/sbin/dhclient/options.c Wed Jul 3 00:36:00 2019 (r349632) +++ stable/11/sbin/dhclient/options.c Wed Jul 3 00:36:34 2019 (r349633) @@ -894,6 +894,5 @@ do_packet(struct interface_info *interface, struct dhc /* Free the data associated with the options. */ for (i = 0; i < 256; i++) - if (tp.options[i].len && tp.options[i].data) - free(tp.options[i].data); + free(tp.options[i].data); } From owner-svn-src-all@freebsd.org Wed Jul 3 00:58:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D600E15E3143; Wed, 3 Jul 2019 00:58:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7964280C40; Wed, 3 Jul 2019 00:58: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54ED84630; Wed, 3 Jul 2019 00:58:11 +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 x630wBMR077988; Wed, 3 Jul 2019 00:58:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x630wBlY077987; Wed, 3 Jul 2019 00:58:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201907030058.x630wBlY077987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Jul 2019 00:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349634 - releng/11.3/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/11.3/release/doc/en_US.ISO8859-1/relnotes X-SVN-Commit-Revision: 349634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7964280C40 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 00:58:12 -0000 Author: gjb Date: Wed Jul 3 00:58:10 2019 New Revision: 349634 URL: https://svnweb.freebsd.org/changeset/base/349634 Log: Document r349620, tzdata 2019b. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 3 00:36:34 2019 (r349633) +++ releng/11.3/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Jul 3 00:58:10 2019 (r349634) @@ -293,9 +293,6 @@ The &man.ntpd.8; utilities have been updated to version 4.2.8p13. - Timezone data files have been updated to - version 2019a. - The clang, llvm, lld, @@ -340,6 +337,9 @@ variable has been added to &man.rc.subr.8;, which defaults to the path of the service being executed in case the service needs to re-invoke itself. + + Timezone data files have been updated to + version 2019b. From owner-svn-src-all@freebsd.org Wed Jul 3 01:00:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D42A15E3438; Wed, 3 Jul 2019 01:00:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55D4981020; Wed, 3 Jul 2019 01:00:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20E874755; Wed, 3 Jul 2019 01:00:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6310n3o079044; Wed, 3 Jul 2019 01:00:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6310mEC079023; Wed, 3 Jul 2019 01:00:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201907030100.x6310mEC079023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Jul 2019 01:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349635 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 349635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 55D4981020 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 01:00:49 -0000 Author: gjb Date: Wed Jul 3 01:00:48 2019 New Revision: 349635 URL: https://svnweb.freebsd.org/changeset/base/349635 Log: Document EN-19:12, SA-19:09-11. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml ============================================================================== --- stable/11/release/doc/share/xml/errata.xml Wed Jul 3 00:58:10 2019 (r349634) +++ stable/11/release/doc/share/xml/errata.xml Wed Jul 3 01:00:48 2019 (r349635) @@ -142,6 +142,14 @@ &man.install.1; broken with partially matching relative paths + + + FreeBSD-EN-19:12.tzdata + 2 July 2019 + Timezone database information + update + Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Wed Jul 3 00:58:10 2019 (r349634) +++ stable/11/release/doc/share/xml/security.xml Wed Jul 3 01:00:48 2019 (r349635) @@ -130,6 +130,27 @@ 14 May 2019 Microarchitectural Data Sampling + + + FreeBSD-SA-19:09.iconv + 2 July 2019 + &man.iconv.3; buffer overflow + + + + FreeBSD-SA-19:10.ufs + 2 July 2019 + Kernel stack disclosure + + + + FreeBSD-SA-19:11.cd_ioctl + 2 July 2019 + Privilege escalation in &man.cd.4; + From owner-svn-src-all@freebsd.org Wed Jul 3 01:04:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D56315E39C0; Wed, 3 Jul 2019 01:04:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0092E81766; Wed, 3 Jul 2019 01:04:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C92C547D8; Wed, 3 Jul 2019 01:04:11 +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 x6314BGd082979; Wed, 3 Jul 2019 01:04:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6314BPi082978; Wed, 3 Jul 2019 01:04:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201907030104.x6314BPi082978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Jul 2019 01:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349636 - releng/11.3/release/doc/share/xml X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/11.3/release/doc/share/xml X-SVN-Commit-Revision: 349636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0092E81766 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 01:04:12 -0000 Author: gjb Date: Wed Jul 3 01:04:11 2019 New Revision: 349636 URL: https://svnweb.freebsd.org/changeset/base/349636 Log: Document SA-19:09, SA-19:11. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/share/xml/security.xml Modified: releng/11.3/release/doc/share/xml/security.xml ============================================================================== --- releng/11.3/release/doc/share/xml/security.xml Wed Jul 3 01:00:48 2019 (r349635) +++ releng/11.3/release/doc/share/xml/security.xml Wed Jul 3 01:04:11 2019 (r349636) @@ -130,6 +130,20 @@ 14 May 2019 Microarchitectural Data Sampling + + + FreeBSD-SA-19:09.iconv + 2 July 2019 + &man.iconv.3; buffer overflow + + + + FreeBSD-SA-19:11.cd_ioctl + 2 July 2019 + Privilege escalation in &man.cd.4; + From owner-svn-src-all@freebsd.org Wed Jul 3 01:40:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6E6515E6403; Wed, 3 Jul 2019 01:40:30 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4999A83C88; Wed, 3 Jul 2019 01:40:30 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DC9C4CDD; Wed, 3 Jul 2019 01:40:30 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x631eT4E099111; Wed, 3 Jul 2019 01:40:29 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x631eTLN099110; Wed, 3 Jul 2019 01:40:29 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201907030140.x631eTLN099110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Wed, 3 Jul 2019 01:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349637 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: ganbold X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 349637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4999A83C88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 01:40:30 -0000 Author: ganbold Date: Wed Jul 3 01:40:29 2019 New Revision: 349637 URL: https://svnweb.freebsd.org/changeset/base/349637 Log: Fix build error introduced by r349596. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jul 3 01:04:11 2019 (r349636) +++ head/sys/conf/files Wed Jul 3 01:40:29 2019 (r349637) @@ -1712,7 +1712,7 @@ dev/fdt/fdt_slicer.c optional fdt cfi | fdt mx25l | f dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "${FDT_DTS_FILE:T:R}.dtb" dev/fdt/simplebus.c optional fdt -dev/fdt/simple_mfd.c optional fdt +dev/fdt/simple_mfd.c optional syscon fdt dev/filemon/filemon.c optional filemon dev/firewire/firewire.c optional firewire dev/firewire/fwcrom.c optional firewire From owner-svn-src-all@freebsd.org Wed Jul 3 03:42:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACFEF15C2442; Wed, 3 Jul 2019 03:42:52 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5148887D26; Wed, 3 Jul 2019 03:42:52 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45E976333; Wed, 3 Jul 2019 03:42:52 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x633gqOk067713; Wed, 3 Jul 2019 03:42:52 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x633gqiG067712; Wed, 3 Jul 2019 03:42:52 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201907030342.x633gqiG067712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Wed, 3 Jul 2019 03:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349638 - head/sys/arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: ganbold X-SVN-Commit-Paths: head/sys/arm64/rockchip X-SVN-Commit-Revision: 349638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5148887D26 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 03:42:52 -0000 Author: ganbold Date: Wed Jul 3 03:42:51 2019 New Revision: 349638 URL: https://svnweb.freebsd.org/changeset/base/349638 Log: Subclass Rockchip's General Register Files driver from Simple MFD driver. Modified: head/sys/arm64/rockchip/rk_grf.c Modified: head/sys/arm64/rockchip/rk_grf.c ============================================================================== --- head/sys/arm64/rockchip/rk_grf.c Wed Jul 3 01:40:29 2019 (r349637) +++ head/sys/arm64/rockchip/rk_grf.c Wed Jul 3 03:42:51 2019 (r349638) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "opt_soc.h" @@ -77,7 +77,7 @@ static device_method_t rk_grf_methods[] = { }; DEFINE_CLASS_1(rk_grf, rk_grf_driver, rk_grf_methods, - sizeof(struct syscon_generic_softc), syscon_generic_driver); + sizeof(struct simple_mfd_softc), simple_mfd_driver); static devclass_t rk_grf_devclass; EARLY_DRIVER_MODULE(rk_grf, simplebus, rk_grf_driver, rk_grf_devclass, From owner-svn-src-all@freebsd.org Wed Jul 3 09:06:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 331A415CD049; Wed, 3 Jul 2019 09:06:40 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8B8569F27; Wed, 3 Jul 2019 09:06:39 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9965398FB; Wed, 3 Jul 2019 09:06:39 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6396dZJ034496; Wed, 3 Jul 2019 09:06:39 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6396ds0034495; Wed, 3 Jul 2019 09:06:39 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201907030906.x6396ds0034495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 3 Jul 2019 09:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349639 - head X-SVN-Group: head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 349639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C8B8569F27 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.935,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:06:40 -0000 Author: tijl Date: Wed Jul 3 09:06:39 2019 New Revision: 349639 URL: https://svnweb.freebsd.org/changeset/base/349639 Log: Also remove lib32 version of libprivateifconfig after r344530. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jul 3 03:42:51 2019 (r349638) +++ head/ObsoleteFiles.inc Wed Jul 3 09:06:39 2019 (r349639) @@ -388,6 +388,8 @@ OLD_FILES+=usr/include/sys/seq.h # 20190222: libifconfig made INTERNALLIB OLD_FILES+=usr/lib/libprivateifconfig.a OLD_FILES+=usr/lib/libprivateifconfig_p.a +OLD_FILES+=usr/lib32/libprivateifconfig.a +OLD_FILES+=usr/lib32/libprivateifconfig_p.a # 20190131: pfil(9) changed OLD_FILES+=usr/share/man/man9/pfil_hook_get.9.gz OLD_FILES+=usr/share/man/man9/pfil_rlock.9.gz From owner-svn-src-all@freebsd.org Wed Jul 3 09:08:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FC0215CD16A; Wed, 3 Jul 2019 09:08:18 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31D326A112; Wed, 3 Jul 2019 09:08:18 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D24198FD; Wed, 3 Jul 2019 09:08:18 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6398H4u034602; Wed, 3 Jul 2019 09:08:17 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6398HJo034601; Wed, 3 Jul 2019 09:08:17 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201907030908.x6398HJo034601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 3 Jul 2019 09:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349640 - head X-SVN-Group: head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 349640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 31D326A112 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.935,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:08:18 -0000 Author: tijl Date: Wed Jul 3 09:08:17 2019 New Revision: 349640 URL: https://svnweb.freebsd.org/changeset/base/349640 Log: Also remove lib32 version of libcasper.so.0. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jul 3 09:06:39 2019 (r349639) +++ head/ObsoleteFiles.inc Wed Jul 3 09:08:17 2019 (r349640) @@ -825,6 +825,7 @@ OLD_FILES+=usr/share/man/man3/arc4random_stir.3.gz OLD_FILES+=usr/bin/send-pr # 20180725: Cleanup old libcasper.so.0 OLD_LIBS+=lib/libcasper.so.0 +OLD_LIBS+=lib32/libcasper.so.0 # 20180722: indent(1) option renamed, test files follow OLD_FILES+=usr/bin/indent/tests/nsac.0 OLD_FILES+=usr/bin/indent/tests/nsac.0.pro From owner-svn-src-all@freebsd.org Wed Jul 3 09:14:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4190315CD50E; Wed, 3 Jul 2019 09:14:40 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBB596AA78; Wed, 3 Jul 2019 09:14:39 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B88B69AB6; Wed, 3 Jul 2019 09:14:39 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x639EdxP039668; Wed, 3 Jul 2019 09:14:39 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x639Edrv039667; Wed, 3 Jul 2019 09:14:39 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201907030914.x639Edrv039667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 3 Jul 2019 09:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349641 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 349641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DBB596AA78 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.935,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:14:40 -0000 Author: tijl Date: Wed Jul 3 09:14:39 2019 New Revision: 349641 URL: https://svnweb.freebsd.org/changeset/base/349641 Log: Also remove lib32 versions of libradius. MFC after: 1 week Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Jul 3 09:08:17 2019 (r349640) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Jul 3 09:14:39 2019 (r349641) @@ -8321,6 +8321,12 @@ OLD_LIBS+=usr/lib/libradius.so.4 OLD_FILES+=usr/lib/libradius_p.a OLD_FILES+=usr/lib/pam_radius.so OLD_LIBS+=usr/lib/pam_radius.so.6 +OLD_FILES+=usr/lib32/libradius.a +OLD_FILES+=usr/lib32/libradius.so +OLD_LIBS+=usr/lib32/libradius.so.4 +OLD_FILES+=usr/lib32/libradius_p.a +OLD_FILES+=usr/lib32/pam_radius.so +OLD_LIBS+=usr/lib32/pam_radius.so.6 OLD_FILES+=usr/include/radlib.h OLD_FILES+=usr/include/radlib_vs.h OLD_FILES+=usr/share/man/man3/libradius.3.gz From owner-svn-src-all@freebsd.org Wed Jul 3 09:43:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF01C15CDEA1; Wed, 3 Jul 2019 09:43:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82A9D6BB17; Wed, 3 Jul 2019 09:43:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DC4D9FBA; Wed, 3 Jul 2019 09:43:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x639hRYZ055378; Wed, 3 Jul 2019 09:43:27 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x639hRlu055377; Wed, 3 Jul 2019 09:43:27 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907030943.x639hRlu055377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Jul 2019 09:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349642 - stable/12/sbin/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sbin/ipfw X-SVN-Commit-Revision: 349642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 82A9D6BB17 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:43:28 -0000 Author: ae Date: Wed Jul 3 09:43:26 2019 New Revision: 349642 URL: https://svnweb.freebsd.org/changeset/base/349642 Log: MFC r349364: Restore ipfw(8)'s compact output support broken after r331668. Also modify it a bit. Now -c option omits only 'from any to any' part and works for different protocols (not just for ip). Reported by: Dmitry Selivanov Modified: stable/12/sbin/ipfw/ipfw2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipfw2.c ============================================================================== --- stable/12/sbin/ipfw/ipfw2.c Wed Jul 3 09:14:39 2019 (r349641) +++ stable/12/sbin/ipfw/ipfw2.c Wed Jul 3 09:43:26 2019 (r349642) @@ -2223,6 +2223,8 @@ show_static_rule(struct cmdline_opts *co, struct forma } print_proto(bp, fo, &state); + if (co->do_compact != 0 && (rule->flags & IPFW_RULE_NOOPT)) + goto justopts; /* Print source */ bprintf(bp, " from"); @@ -4395,6 +4397,8 @@ chkarg: } OR_BLOCK(get_proto); + first_cmd = cmd; /* update pointer to use in compact form */ + /* * "from", mandatory */ @@ -4466,6 +4470,8 @@ chkarg: cmd = next_cmd(cmd, &cblen); } } + if (first_cmd == cmd) + rule->flags |= IPFW_RULE_NOOPT; read_options: prev = NULL; From owner-svn-src-all@freebsd.org Wed Jul 3 09:45:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BC6915CE043; Wed, 3 Jul 2019 09:45:03 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C29FE6BE1B; Wed, 3 Jul 2019 09:45:02 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9ED469FC2; Wed, 3 Jul 2019 09:45:02 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x639j2Rh055660; Wed, 3 Jul 2019 09:45:02 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x639j2Lq055659; Wed, 3 Jul 2019 09:45:02 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907030945.x639j2Lq055659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Jul 2019 09:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349643 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 349643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C29FE6BE1B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:45:03 -0000 Author: ae Date: Wed Jul 3 09:45:02 2019 New Revision: 349643 URL: https://svnweb.freebsd.org/changeset/base/349643 Log: MFC r349365: Mark default rule with IPFW_RULE_NOOPT flag, so it can be showed in compact form. Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Wed Jul 3 09:43:26 2019 (r349642) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Wed Jul 3 09:45:02 2019 (r349643) @@ -3327,6 +3327,7 @@ vnet_ipfw_init(const void *unused) /* fill and insert the default rule */ rule = ipfw_alloc_rule(chain, sizeof(struct ip_fw)); + rule->flags |= IPFW_RULE_NOOPT; rule->cmd_len = 1; rule->cmd[0].len = 1; rule->cmd[0].opcode = default_to_accept ? O_ACCEPT : O_DENY; From owner-svn-src-all@freebsd.org Wed Jul 3 09:46:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17A8915CE0F3; Wed, 3 Jul 2019 09:46:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1E926BF7C; Wed, 3 Jul 2019 09:46:30 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 896739FC4; Wed, 3 Jul 2019 09:46:30 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x639kUfk055770; Wed, 3 Jul 2019 09:46:30 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x639kUVP055769; Wed, 3 Jul 2019 09:46:30 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907030946.x639kUVP055769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Jul 2019 09:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349644 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 349644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B1E926BF7C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:46:31 -0000 Author: ae Date: Wed Jul 3 09:46:30 2019 New Revision: 349644 URL: https://svnweb.freebsd.org/changeset/base/349644 Log: MFC r349366: Follow the RFC 3128 and drop short TCP fragments with offset = 1. Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Wed Jul 3 09:45:02 2019 (r349643) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Wed Jul 3 09:46:30 2019 (r349644) @@ -1688,6 +1688,11 @@ do { \ default: break; } + } else { + if (offset == 1 && proto == IPPROTO_TCP) { + /* RFC 3128 */ + goto pullup_failed; + } } ip = mtod(m, struct ip *); From owner-svn-src-all@freebsd.org Wed Jul 3 09:48:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85CF115CE1A0; Wed, 3 Jul 2019 09:48:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 240A86C0F0; Wed, 3 Jul 2019 09:48:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 084109FC5; Wed, 3 Jul 2019 09:48:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x639mK9q055899; Wed, 3 Jul 2019 09:48:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x639mKWg055897; Wed, 3 Jul 2019 09:48:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907030948.x639mKWg055897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 09:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349645 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 349645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 240A86C0F0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:48:21 -0000 Author: hselasky Date: Wed Jul 3 09:48:20 2019 New Revision: 349645 URL: https://svnweb.freebsd.org/changeset/base/349645 Log: Remove dead code added after r348743 in the LinuxKPI. The LINUXKPI_VERSION macro is not defined for any compiled LinuxKPI code which basically means __GFP_NOTWIRED is never checked when allocating pages. This should work fine with the existing external DRM code as long as the page wiring and unwiring is balanced. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/gfp.h head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/include/linux/gfp.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/gfp.h Wed Jul 3 09:46:30 2019 (r349644) +++ head/sys/compat/linuxkpi/common/include/linux/gfp.h Wed Jul 3 09:48:20 2019 (r349645) @@ -58,9 +58,6 @@ #define __GFP_NO_KSWAPD 0 #define __GFP_WAIT M_WAITOK #define __GFP_DMA32 (1U << 24) /* LinuxKPI only */ -#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION == 50000 -#define __GFP_NOTWIRED (1U << 25) -#endif #define __GFP_BITS_SHIFT 25 #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) #define __GFP_NOFAIL M_WAITOK @@ -101,9 +98,6 @@ static inline struct page * alloc_page(gfp_t flags) { -#ifdef __GFP_NOTWIRED - flags |= __GFP_NOTWIRED; -#endif return (linux_alloc_pages(flags, 0)); } @@ -111,9 +105,6 @@ static inline struct page * alloc_pages(gfp_t flags, unsigned int order) { -#ifdef __GFP_NOTWIRED - flags |= __GFP_NOTWIRED; -#endif return (linux_alloc_pages(flags, order)); } @@ -121,9 +112,6 @@ static inline struct page * alloc_pages_node(int node_id, gfp_t flags, unsigned int order) { -#ifdef __GFP_NOTWIRED - flags |= __GFP_NOTWIRED; -#endif return (linux_alloc_pages(flags, order)); } Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Wed Jul 3 09:46:30 2019 (r349644) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Wed Jul 3 09:48:20 2019 (r349645) @@ -93,10 +93,6 @@ linux_alloc_pages(gfp_t flags, unsigned int order) unsigned long npages = 1UL << order; int req = VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_NORMAL; -#ifdef __GFP_NOTWIRED - if ((flags & __GFP_NOTWIRED) != 0) - req &= ~VM_ALLOC_WIRED; -#endif if ((flags & M_ZERO) != 0) req |= VM_ALLOC_ZERO; if (order == 0 && (flags & GFP_DMA32) == 0) { From owner-svn-src-all@freebsd.org Wed Jul 3 09:48:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 057C715CE1A4; Wed, 3 Jul 2019 09:48:23 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FED16C0F1; Wed, 3 Jul 2019 09:48:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B2509FC6; Wed, 3 Jul 2019 09:48:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x639mMTF055943; Wed, 3 Jul 2019 09:48:22 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x639mMUK055942; Wed, 3 Jul 2019 09:48:22 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907030948.x639mMUK055942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Jul 2019 09:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349646 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 349646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9FED16C0F1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:48:23 -0000 Author: ae Date: Wed Jul 3 09:48:22 2019 New Revision: 349646 URL: https://svnweb.freebsd.org/changeset/base/349646 Log: MFC r349364: Restore ipfw(8)'s compact output support broken after r331668. Also modify it a bit. Now -c option omits only 'from any to any' part and works for different protocols (not just for ip). Reported by: Dmitry Selivanov Modified: stable/11/sbin/ipfw/ipfw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw2.c ============================================================================== --- stable/11/sbin/ipfw/ipfw2.c Wed Jul 3 09:48:20 2019 (r349645) +++ stable/11/sbin/ipfw/ipfw2.c Wed Jul 3 09:48:22 2019 (r349646) @@ -2223,6 +2223,8 @@ show_static_rule(struct cmdline_opts *co, struct forma } print_proto(bp, fo, &state); + if (co->do_compact != 0 && (rule->flags & IPFW_RULE_NOOPT)) + goto justopts; /* Print source */ bprintf(bp, " from"); @@ -4395,6 +4397,8 @@ chkarg: } OR_BLOCK(get_proto); + first_cmd = cmd; /* update pointer to use in compact form */ + /* * "from", mandatory */ @@ -4466,6 +4470,8 @@ chkarg: cmd = next_cmd(cmd, &cblen); } } + if (first_cmd == cmd) + rule->flags |= IPFW_RULE_NOOPT; read_options: prev = NULL; From owner-svn-src-all@freebsd.org Wed Jul 3 09:49:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91C5A15CE2A5; Wed, 3 Jul 2019 09:49:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 380846C34F; Wed, 3 Jul 2019 09:49:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 137C29FC8; Wed, 3 Jul 2019 09:49:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x639nle3056055; Wed, 3 Jul 2019 09:49:47 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x639nlJu056054; Wed, 3 Jul 2019 09:49:47 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907030949.x639nlJu056054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Jul 2019 09:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349647 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 349647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 380846C34F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:49:48 -0000 Author: ae Date: Wed Jul 3 09:49:47 2019 New Revision: 349647 URL: https://svnweb.freebsd.org/changeset/base/349647 Log: MFC r349365: Mark default rule with IPFW_RULE_NOOPT flag, so it can be showed in compact form. Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Wed Jul 3 09:48:22 2019 (r349646) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Wed Jul 3 09:49:47 2019 (r349647) @@ -3325,6 +3325,7 @@ vnet_ipfw_init(const void *unused) /* fill and insert the default rule */ rule = ipfw_alloc_rule(chain, sizeof(struct ip_fw)); + rule->flags |= IPFW_RULE_NOOPT; rule->cmd_len = 1; rule->cmd[0].len = 1; rule->cmd[0].opcode = default_to_accept ? O_ACCEPT : O_DENY; From owner-svn-src-all@freebsd.org Wed Jul 3 09:52:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A17415CE3DD; Wed, 3 Jul 2019 09:52:00 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C47746C731; Wed, 3 Jul 2019 09:51:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9947DA142; Wed, 3 Jul 2019 09:51:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x639pxnr060155; Wed, 3 Jul 2019 09:51:59 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x639pxUu060154; Wed, 3 Jul 2019 09:51:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907030951.x639pxUu060154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Jul 2019 09:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349648 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 349648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C47746C731 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 09:52:00 -0000 Author: ae Date: Wed Jul 3 09:51:59 2019 New Revision: 349648 URL: https://svnweb.freebsd.org/changeset/base/349648 Log: MFC r349366: Follow the RFC 3128 and drop short TCP fragments with offset = 1. Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Wed Jul 3 09:49:47 2019 (r349647) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Wed Jul 3 09:51:59 2019 (r349648) @@ -1686,6 +1686,11 @@ do { \ default: break; } + } else { + if (offset == 1 && proto == IPPROTO_TCP) { + /* RFC 3128 */ + goto pullup_failed; + } } ip = mtod(m, struct ip *); From owner-svn-src-all@freebsd.org Wed Jul 3 16:06:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 185AD15D872A; Wed, 3 Jul 2019 16:06:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9D9D81D20; Wed, 3 Jul 2019 16:06:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 417AFE157; Wed, 3 Jul 2019 16:06:12 +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 x63G6CQr054628; Wed, 3 Jul 2019 16:06:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63G6BOf054625; Wed, 3 Jul 2019 16:06:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201907031606.x63G6BOf054625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 3 Jul 2019 16:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349649 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 349649 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B9D9D81D20 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:06:13 -0000 Author: jhb Date: Wed Jul 3 16:06:11 2019 New Revision: 349649 URL: https://svnweb.freebsd.org/changeset/base/349649 Log: Use unmapped (M_NOMAP) mbufs for zero-copy AIO writes via TOE. Previously the TOE code used its own custom unmapped mbufs via EXT_FLAG_VENDOR1. The old version always wired the entire AIO request buffer first for the duration of the AIO operation and constructed multiple mbufs which used the wired buffer as an external buffer. The new version determines how much room is available in the socket buffer and only wires the pages needed for the available room building chains of M_NOMAP mbufs. This means that a large AIO write will now limit the amount of wired memory it uses to the size of the socket buffer. Reviewed by: gallatin, np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20839 Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_tls.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jul 3 09:51:59 2019 (r349648) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Jul 3 16:06:11 2019 (r349649) @@ -76,28 +76,6 @@ __FBSDID("$FreeBSD$"); static void t4_aiotx_cancel(struct kaiocb *job); static void t4_aiotx_queue_toep(struct socket *so, struct toepcb *toep); -static size_t -aiotx_mbuf_pgoff(struct mbuf *m) -{ - struct aiotx_buffer *ab; - - MPASS(IS_AIOTX_MBUF(m)); - ab = m->m_ext.ext_arg1; - return ((ab->ps.offset + (uintptr_t)m->m_ext.ext_arg2) % PAGE_SIZE); -} - -static vm_page_t * -aiotx_mbuf_pages(struct mbuf *m) -{ - struct aiotx_buffer *ab; - int npages; - - MPASS(IS_AIOTX_MBUF(m)); - ab = m->m_ext.ext_arg1; - npages = (ab->ps.offset + (uintptr_t)m->m_ext.ext_arg2) / PAGE_SIZE; - return (ab->ps.pages + npages); -} - void send_flowc_wr(struct toepcb *toep, struct flowc_tx_params *ftxp) { @@ -647,10 +625,7 @@ write_tx_sgl(void *dst, struct mbuf *start, struct mbu i = -1; for (m = start; m != stop; m = m->m_next) { - if (IS_AIOTX_MBUF(m)) - rc = sglist_append_vmpages(&sg, aiotx_mbuf_pages(m), - aiotx_mbuf_pgoff(m), m->m_len); - else if (m->m_flags & M_NOMAP) + if (m->m_flags & M_NOMAP) rc = sglist_append_mb_ext_pgs(&sg, m); else rc = sglist_append(&sg, mtod(m, void *), m->m_len); @@ -713,7 +688,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep struct sockbuf *sb = &so->so_snd; int tx_credits, shove, compl, sowwakeup; struct ofld_tx_sdesc *txsd; - bool aiotx_mbuf_seen; + bool nomap_mbuf_seen; INP_WLOCK_ASSERT(inp); KASSERT(toep->flags & TPF_FLOWC_WR_SENT, @@ -766,14 +741,11 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep plen = 0; nsegs = 0; max_nsegs_1mbuf = 0; /* max # of SGL segments in any one mbuf */ - aiotx_mbuf_seen = false; + nomap_mbuf_seen = false; for (m = sndptr; m != NULL; m = m->m_next) { int n; - if (IS_AIOTX_MBUF(m)) - n = sglist_count_vmpages(aiotx_mbuf_pages(m), - aiotx_mbuf_pgoff(m), m->m_len); - else if (m->m_flags & M_NOMAP) + if (m->m_flags & M_NOMAP) n = sglist_count_mb_ext_pgs(m); else n = sglist_count(mtod(m, void *), m->m_len); @@ -802,8 +774,8 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep break; } - if (IS_AIOTX_MBUF(m)) - aiotx_mbuf_seen = true; + if (m->m_flags & M_NOMAP) + nomap_mbuf_seen = true; if (max_nsegs_1mbuf < n) max_nsegs_1mbuf = n; sb_sndptr = m; /* new sb->sb_sndptr if all goes well */ @@ -852,7 +824,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep panic("%s: excess tx.", __func__); shove = m == NULL && !(tp->t_flags & TF_MORETOCOME); - if (plen <= max_imm && !aiotx_mbuf_seen) { + if (plen <= max_imm && !nomap_mbuf_seen) { /* Immediate data tx */ @@ -1910,71 +1882,94 @@ t4_uninit_cpl_io_handlers(void) } /* - * Use the 'backend3' field in AIO jobs to store the amount of data - * sent by the AIO job so far and the 'backend4' field to hold an - * error that should be reported when the job is completed. + * Use the 'backend1' field in AIO jobs to hold an error that should + * be reported when the job is completed, the 'backend3' field to + * store the amount of data sent by the AIO job so far, and the + * 'backend4' field to hold a reference count on the job. + * + * Each unmapped mbuf holds a reference on the job as does the queue + * so long as the job is queued. */ +#define aio_error backend1 #define aio_sent backend3 -#define aio_error backend4 +#define aio_refs backend4 #define jobtotid(job) \ (((struct toepcb *)(so_sototcpcb((job)->fd_file->f_data)->t_toe))->tid) - + static void -free_aiotx_buffer(struct aiotx_buffer *ab) +aiotx_free_job(struct kaiocb *job) { - struct kaiocb *job; long status; int error; - if (refcount_release(&ab->refcount) == 0) + if (refcount_release(&job->aio_refs) == 0) return; - job = ab->job; - error = job->aio_error; + error = (intptr_t)job->aio_error; status = job->aio_sent; - vm_page_unhold_pages(ab->ps.pages, ab->ps.npages); - free(ab, M_CXGBE); #ifdef VERBOSE_TRACES CTR5(KTR_CXGBE, "%s: tid %d completed %p len %ld, error %d", __func__, jobtotid(job), job, status, error); #endif - if (error == ECANCELED && status != 0) + if (error != 0 && status != 0) error = 0; if (error == ECANCELED) aio_cancel(job); else if (error) aio_complete(job, -1, error); - else + else { + job->msgsnd = 1; aio_complete(job, status, 0); + } } static void -t4_aiotx_mbuf_free(struct mbuf *m) +aiotx_free_pgs(struct mbuf *m) { - struct aiotx_buffer *ab = m->m_ext.ext_arg1; + struct mbuf_ext_pgs *ext_pgs; + struct kaiocb *job; + struct mtx *mtx; + vm_page_t pg; + MBUF_EXT_PGS_ASSERT(m); + ext_pgs = m->m_ext.ext_pgs; + job = m->m_ext.ext_arg1; #ifdef VERBOSE_TRACES CTR3(KTR_CXGBE, "%s: completed %d bytes for tid %d", __func__, - m->m_len, jobtotid(ab->job)); + m->m_len, jobtotid(job)); #endif - free_aiotx_buffer(ab); + + mtx = NULL; + for (int i = 0; i < ext_pgs->npgs; i++) { + pg = PHYS_TO_VM_PAGE(ext_pgs->pa[i]); + vm_page_change_lock(pg, &mtx); + vm_page_unhold(pg); + } + if (mtx != NULL) + mtx_unlock(mtx); + + aiotx_free_job(job); } /* - * Hold the buffer backing an AIO request and return an AIO transmit - * buffer. + * Allocate a chain of unmapped mbufs describing the next 'len' bytes + * of an AIO job. */ -static int -hold_aio(struct kaiocb *job) +static struct mbuf * +alloc_aiotx_mbuf(struct kaiocb *job, int len) { - struct aiotx_buffer *ab; struct vmspace *vm; + vm_page_t pgs[MBUF_PEXT_MAX_PGS]; + struct mbuf *m, *top, *last; + struct mbuf_ext_pgs *ext_pgs; vm_map_t map; - vm_offset_t start, end, pgoff; - int n; + vm_offset_t start; + int i, mlen, npages, pgoff; - MPASS(job->backend1 == NULL); + KASSERT(job->aio_sent + len <= job->uaiocb.aio_nbytes, + ("%s(%p, %d): request to send beyond end of buffer", __func__, + job, len)); /* * The AIO subsystem will cancel and drain all requests before @@ -1983,35 +1978,65 @@ hold_aio(struct kaiocb *job) */ vm = job->userproc->p_vmspace; map = &vm->vm_map; - start = (uintptr_t)job->uaiocb.aio_buf; + start = (uintptr_t)job->uaiocb.aio_buf + job->aio_sent; pgoff = start & PAGE_MASK; - end = round_page(start + job->uaiocb.aio_nbytes); - start = trunc_page(start); - n = atop(end - start); - ab = malloc(sizeof(*ab) + n * sizeof(vm_page_t), M_CXGBE, M_WAITOK | - M_ZERO); - refcount_init(&ab->refcount, 1); - ab->ps.pages = (vm_page_t *)(ab + 1); - ab->ps.npages = vm_fault_quick_hold_pages(map, start, end - start, - VM_PROT_WRITE, ab->ps.pages, n); - if (ab->ps.npages < 0) { - free(ab, M_CXGBE); - return (EFAULT); - } + top = NULL; + last = NULL; + while (len > 0) { + mlen = imin(len, MBUF_PEXT_MAX_PGS * PAGE_SIZE - pgoff); + KASSERT(mlen == len || (start + mlen & PAGE_MASK) == 0, + ("%s: next start (%#jx + %#x) is not page aligned", + __func__, (uintmax_t)start, mlen)); - KASSERT(ab->ps.npages == n, - ("hold_aio: page count mismatch: %d vs %d", ab->ps.npages, n)); + npages = vm_fault_quick_hold_pages(map, start, mlen, + VM_PROT_WRITE, pgs, nitems(pgs)); + if (npages < 0) + break; - ab->ps.offset = pgoff; - ab->ps.len = job->uaiocb.aio_nbytes; - ab->job = job; - job->backend1 = ab; + m = mb_alloc_ext_pgs(M_WAITOK, false, aiotx_free_pgs); + if (m == NULL) { + vm_page_unhold_pages(pgs, npages); + break; + } + + ext_pgs = m->m_ext.ext_pgs; + ext_pgs->first_pg_off = pgoff; + ext_pgs->npgs = npages; + if (npages == 1) { + KASSERT(mlen + pgoff <= PAGE_SIZE, + ("%s: single page is too large (off %d len %d)", + __func__, pgoff, mlen)); + ext_pgs->last_pg_len = mlen; + } else { + ext_pgs->last_pg_len = mlen - (PAGE_SIZE - pgoff) - + (npages - 2) * PAGE_SIZE; + } + for (i = 0; i < npages; i++) + ext_pgs->pa[i] = VM_PAGE_TO_PHYS(pgs[i]); + + m->m_len = mlen; + m->m_ext.ext_size = npages * PAGE_SIZE; + m->m_ext.ext_arg1 = job; + refcount_acquire(&job->aio_refs); + #ifdef VERBOSE_TRACES - CTR5(KTR_CXGBE, "%s: tid %d, new pageset %p for job %p, npages %d", - __func__, jobtotid(job), &ab->ps, job, ab->ps.npages); + CTR5(KTR_CXGBE, "%s: tid %d, new mbuf %p for job %p, npages %d", + __func__, jobtotid(job), m, job, npages); #endif - return (0); + + if (top == NULL) + top = m; + else + last->m_next = m; + last = m; + + len -= mlen; + start += mlen; + pgoff = 0; + } + + return (top); } static void @@ -2020,18 +2045,16 @@ t4_aiotx_process_job(struct toepcb *toep, struct socke struct adapter *sc; struct sockbuf *sb; struct file *fp; - struct aiotx_buffer *ab; struct inpcb *inp; struct tcpcb *tp; struct mbuf *m; - int error; + int error, len; bool moretocome, sendmore; sc = td_adapter(toep->td); sb = &so->so_snd; SOCKBUF_UNLOCK(sb); fp = job->fd_file; - ab = job->backend1; m = NULL; #ifdef MAC @@ -2040,23 +2063,12 @@ t4_aiotx_process_job(struct toepcb *toep, struct socke goto out; #endif - if (ab == NULL) { - error = hold_aio(job); - if (error != 0) - goto out; - ab = job->backend1; - } - /* Inline sosend_generic(). */ - job->msgsnd = 1; - error = sblock(sb, SBL_WAIT); MPASS(error == 0); sendanother: - m = m_get(M_WAITOK, MT_DATA); - SOCKBUF_LOCK(sb); if (so->so_snd.sb_state & SBS_CANTSENDMORE) { SOCKBUF_UNLOCK(sb); @@ -2105,14 +2117,14 @@ sendanother: * Write as much data as the socket permits, but no more than a * a single sndbuf at a time. */ - m->m_len = sbspace(sb); - if (m->m_len > ab->ps.len - job->aio_sent) { - m->m_len = ab->ps.len - job->aio_sent; + len = sbspace(sb); + if (len > job->uaiocb.aio_nbytes - job->aio_sent) { + len = job->uaiocb.aio_nbytes - job->aio_sent; moretocome = false; } else moretocome = true; - if (m->m_len > sc->tt.sndbuf) { - m->m_len = sc->tt.sndbuf; + if (len > sc->tt.sndbuf) { + len = sc->tt.sndbuf; sendmore = true; } else sendmore = false; @@ -2120,8 +2132,15 @@ sendanother: if (!TAILQ_EMPTY(&toep->aiotx_jobq)) moretocome = true; SOCKBUF_UNLOCK(sb); - MPASS(m->m_len != 0); + MPASS(len != 0); + m = alloc_aiotx_mbuf(job, len); + if (m == NULL) { + sbunlock(sb); + error = EFAULT; + goto out; + } + /* Inlined tcp_usr_send(). */ inp = toep->inp; @@ -2133,12 +2152,8 @@ sendanother: goto out; } - refcount_acquire(&ab->refcount); - m_extadd(m, NULL, ab->ps.len, t4_aiotx_mbuf_free, ab, - (void *)(uintptr_t)job->aio_sent, 0, EXT_NET_DRV); - m->m_ext.ext_flags |= EXT_FLAG_AIOTX; - job->aio_sent += m->m_len; - + job->aio_sent += m_length(m, NULL); + sbappendstream(sb, m, 0); m = NULL; @@ -2160,8 +2175,8 @@ sendanother: goto out; /* - * If this is a non-blocking socket and the request has not - * been fully completed, requeue it until the socket is ready + * If this is a blocking socket and the request has not been + * fully completed, requeue it until the socket is ready * again. */ if (job->aio_sent < job->uaiocb.aio_nbytes && @@ -2177,22 +2192,18 @@ sendanother: } /* - * If the request will not be requeued, drop a reference on - * the aiotx buffer. Any mbufs in flight should still - * contain a reference, but this drops the reference that the - * job owns while it is waiting to queue mbufs to the socket. + * If the request will not be requeued, drop the queue's + * reference to the job. Any mbufs in flight should still + * hold a reference, but this drops the reference that the + * queue owns while it is waiting to queue mbufs to the + * socket. */ - free_aiotx_buffer(ab); + aiotx_free_job(job); out: if (error) { - if (ab != NULL) { - job->aio_error = error; - free_aiotx_buffer(ab); - } else { - MPASS(job->aio_sent == 0); - aio_complete(job, -1, error); - } + job->aio_error = (void *)(intptr_t)error; + aiotx_free_job(job); } if (m != NULL) m_free(m); @@ -2246,7 +2257,6 @@ t4_aiotx_queue_toep(struct socket *so, struct toepcb * static void t4_aiotx_cancel(struct kaiocb *job) { - struct aiotx_buffer *ab; struct socket *so; struct sockbuf *sb; struct tcpcb *tp; @@ -2263,11 +2273,8 @@ t4_aiotx_cancel(struct kaiocb *job) TAILQ_REMOVE(&toep->aiotx_jobq, job, list); SOCKBUF_UNLOCK(sb); - ab = job->backend1; - if (ab != NULL) - free_aiotx_buffer(ab); - else - aio_cancel(job); + job->aio_error = (void *)(intptr_t)ECANCELED; + aiotx_free_job(job); } int @@ -2293,6 +2300,7 @@ t4_aio_queue_aiotx(struct socket *so, struct kaiocb *j #endif if (!aio_set_cancel_function(job, t4_aiotx_cancel)) panic("new job was cancelled"); + refcount_init(&job->aio_refs, 1); TAILQ_INSERT_TAIL(&toep->aiotx_jobq, job, list); if (sowriteable(so)) t4_aiotx_queue_toep(so, toep); Modified: head/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tls.c Wed Jul 3 09:51:59 2019 (r349648) +++ head/sys/dev/cxgbe/tom/t4_tls.c Wed Jul 3 16:06:11 2019 (r349649) @@ -1193,7 +1193,6 @@ t4_push_tls_records(struct adapter *sc, struct toepcb /* Read the header of the next TLS record. */ sndptr = sbsndmbuf(sb, tls_ofld->sb_off, &sndptroff); - MPASS(!IS_AIOTX_MBUF(sndptr)); m_copydata(sndptr, sndptroff, sizeof(thdr), (caddr_t)&thdr); tls_size = htons(thdr.length); plen = TLS_HEADER_LENGTH + tls_size; Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Wed Jul 3 09:51:59 2019 (r349648) +++ head/sys/dev/cxgbe/tom/t4_tom.h Wed Jul 3 16:06:11 2019 (r349649) @@ -127,11 +127,6 @@ TAILQ_HEAD(pagesetq, pageset); #define PS_WIRED 0x0001 /* Pages wired rather than held. */ #define PS_PPODS_WRITTEN 0x0002 /* Page pods written to the card. */ -#define EXT_FLAG_AIOTX EXT_FLAG_VENDOR1 - -#define IS_AIOTX_MBUF(m) \ - ((m)->m_flags & M_EXT && (m)->m_ext.ext_flags & EXT_FLAG_AIOTX) - struct ddp_buffer { struct pageset *ps; @@ -151,12 +146,6 @@ struct ddp_pcb { struct task requeue_task; struct kaiocb *queueing; struct mtx lock; -}; - -struct aiotx_buffer { - struct pageset ps; - struct kaiocb *job; - int refcount; }; struct toepcb { From owner-svn-src-all@freebsd.org Wed Jul 3 16:11:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 644DF15D8952; Wed, 3 Jul 2019 16:11:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 076938209C; Wed, 3 Jul 2019 16:11:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-4.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 668189BCE; Wed, 3 Jul 2019 16:11:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r349640 - head To: Tijl Coosemans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201907030908.x6398HJo034601@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <7a7b5dec-437b-7e29-1cf2-97389abf4cd2@FreeBSD.org> Date: Wed, 3 Jul 2019 09:11:53 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <201907030908.x6398HJo034601@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 076938209C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.963,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:11:56 -0000 On 7/3/19 2:08 AM, Tijl Coosemans wrote: > Author: tijl > Date: Wed Jul 3 09:08:17 2019 > New Revision: 349640 > URL: https://svnweb.freebsd.org/changeset/base/349640 > > Log: > Also remove lib32 version of libcasper.so.0. > > Modified: > head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Wed Jul 3 09:06:39 2019 (r349639) > +++ head/ObsoleteFiles.inc Wed Jul 3 09:08:17 2019 (r349640) > @@ -825,6 +825,7 @@ OLD_FILES+=usr/share/man/man3/arc4random_stir.3.gz > OLD_FILES+=usr/bin/send-pr > # 20180725: Cleanup old libcasper.so.0 > OLD_LIBS+=lib/libcasper.so.0 > +OLD_LIBS+=lib32/libcasper.so.0 Should this be usr/lib32 instead of lib32? -- John Baldwin From owner-svn-src-all@freebsd.org Wed Jul 3 16:14:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 717F115D8A5D; Wed, 3 Jul 2019 16:14:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1693D82400; Wed, 3 Jul 2019 16:14:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-4.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 75F359BCF; Wed, 3 Jul 2019 16:14:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r349641 - head/tools/build/mk To: Tijl Coosemans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201907030914.x639Edrv039667@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <7c395528-4094-5d85-2b3f-2d84cce2fa3e@FreeBSD.org> Date: Wed, 3 Jul 2019 09:14:48 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <201907030914.x639Edrv039667@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 1693D82400 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:14:50 -0000 On 7/3/19 2:14 AM, Tijl Coosemans wrote: > Author: tijl > Date: Wed Jul 3 09:14:39 2019 > New Revision: 349641 > URL: https://svnweb.freebsd.org/changeset/base/349641 > > Log: > Also remove lib32 versions of libradius. > > MFC after: 1 week I do wonder if we shouldn't try to make OLD_LIBS a bit smarter by having it expand to also include the lib32 (and libsoft) variants. Having some kind of helper to deal with the non-dynamic libs would also be nice (it would remove libfoo.a, libfoo_p.a, and libfoo.so which always live in /usr/lib, /usr/lib32, and /usr/libsoft). -- John Baldwin From owner-svn-src-all@freebsd.org Wed Jul 3 16:23:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1374715D8EA6; Wed, 3 Jul 2019 16:23:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A989A829B2; Wed, 3 Jul 2019 16:23:06 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B07CE4BB; Wed, 3 Jul 2019 16:23:06 +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 x63GN6gd065067; Wed, 3 Jul 2019 16:23:06 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63GN6NX065066; Wed, 3 Jul 2019 16:23:06 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031623.x63GN6NX065066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 16:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349650 - in stable: 11/lib/libsqlite3 12/lib/libsqlite3 X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/lib/libsqlite3 12/lib/libsqlite3 X-SVN-Commit-Revision: 349650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A989A829B2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:23:07 -0000 Author: cy Date: Wed Jul 3 16:23:06 2019 New Revision: 349650 URL: https://svnweb.freebsd.org/changeset/base/349650 Log: MFC r342972: Disable FTS3, FTS4, and RTREE in bundled and private sqlite3. Suggested by: delphij@ Reviewed by: delphij@ (for secteam@) Differential Revision: https://reviews.freebsd.org/D18786 Modified: stable/11/lib/libsqlite3/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libsqlite3/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libsqlite3/Makefile ============================================================================== --- stable/11/lib/libsqlite3/Makefile Wed Jul 3 16:06:11 2019 (r349649) +++ stable/11/lib/libsqlite3/Makefile Wed Jul 3 16:23:06 2019 (r349650) @@ -32,9 +32,6 @@ CFLAGS+= -I${SQLITE} \ -DHAVE_STRERROR_R=1 \ -DHAVE_POSIX_FALLOCATE=1 \ -D_REENTRANT=1 \ - -DSQLITE_THREADSAFE=1 \ - -DSQLITE_ENABLE_FTS3 \ - -DSQLITE_ENABLE_FTS4 \ - -DSQLITE_ENABLE_RTREE + -DSQLITE_THREADSAFE=1 .include From owner-svn-src-all@freebsd.org Wed Jul 3 16:23:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B7E715D8EAC; Wed, 3 Jul 2019 16:23:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 205A3829B4; Wed, 3 Jul 2019 16:23:07 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EED87E4BC; Wed, 3 Jul 2019 16:23:06 +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 x63GN66g065073; Wed, 3 Jul 2019 16:23:06 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63GN6hU065072; Wed, 3 Jul 2019 16:23:06 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031623.x63GN6hU065072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 16:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349650 - in stable: 11/lib/libsqlite3 12/lib/libsqlite3 X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/lib/libsqlite3 12/lib/libsqlite3 X-SVN-Commit-Revision: 349650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 205A3829B4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:23:07 -0000 Author: cy Date: Wed Jul 3 16:23:06 2019 New Revision: 349650 URL: https://svnweb.freebsd.org/changeset/base/349650 Log: MFC r342972: Disable FTS3, FTS4, and RTREE in bundled and private sqlite3. Suggested by: delphij@ Reviewed by: delphij@ (for secteam@) Differential Revision: https://reviews.freebsd.org/D18786 Modified: stable/12/lib/libsqlite3/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libsqlite3/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libsqlite3/Makefile ============================================================================== --- stable/12/lib/libsqlite3/Makefile Wed Jul 3 16:06:11 2019 (r349649) +++ stable/12/lib/libsqlite3/Makefile Wed Jul 3 16:23:06 2019 (r349650) @@ -33,9 +33,6 @@ CFLAGS+= -I${SQLITE} \ -DHAVE_STRERROR_R=1 \ -DHAVE_POSIX_FALLOCATE=1 \ -D_REENTRANT=1 \ - -DSQLITE_THREADSAFE=1 \ - -DSQLITE_ENABLE_FTS3 \ - -DSQLITE_ENABLE_FTS4 \ - -DSQLITE_ENABLE_RTREE + -DSQLITE_THREADSAFE=1 .include From owner-svn-src-all@freebsd.org Wed Jul 3 16:43:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57AD915D9962; Wed, 3 Jul 2019 16:43:42 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A753A83A32; Wed, 3 Jul 2019 16:43:41 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82B2DE82D; Wed, 3 Jul 2019 16:43:41 +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 x63GhfsG075543; Wed, 3 Jul 2019 16:43:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63GhfMe075541; Wed, 3 Jul 2019 16:43:41 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031643.x63GhfMe075541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 16:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349651 - in stable/12/libexec/rc: . rc.d X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable/12/libexec/rc: . rc.d X-SVN-Commit-Revision: 349651 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A753A83A32 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:43:42 -0000 Author: cy Date: Wed Jul 3 16:43:40 2019 New Revision: 349651 URL: https://svnweb.freebsd.org/changeset/base/349651 Log: MFC r349153: Allow the hostapd program to be specified. This allows users to use hostapd from ports instead of the one in base. The default is the hostapd in base. PR: 238571 Modified: stable/12/libexec/rc/rc.conf stable/12/libexec/rc/rc.d/hostapd Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.conf ============================================================================== --- stable/12/libexec/rc/rc.conf Wed Jul 3 16:23:06 2019 (r349650) +++ stable/12/libexec/rc/rc.conf Wed Jul 3 16:43:40 2019 (r349651) @@ -275,6 +275,7 @@ ppp_user="root" # Which user to run ppp as # profile3 uses default ppp_mode and ppp_nat ### Network daemon (miscellaneous) ### +hostapd_program="/usr/sbin/hostapd" hostapd_enable="NO" # Run hostap daemon. syslogd_enable="YES" # Run syslog daemon (or NO). syslogd_program="/usr/sbin/syslogd" # path to syslogd, if you want a different one. Modified: stable/12/libexec/rc/rc.d/hostapd ============================================================================== --- stable/12/libexec/rc/rc.d/hostapd Wed Jul 3 16:23:06 2019 (r349650) +++ stable/12/libexec/rc/rc.d/hostapd Wed Jul 3 16:43:40 2019 (r349651) @@ -11,7 +11,7 @@ name="hostapd" desc="Authenticator for IEEE 802.11 networks" -command="/usr/sbin/${name}" +command=${hostapd_program} ifn="$2" if [ -z "$ifn" ]; then From owner-svn-src-all@freebsd.org Wed Jul 3 16:48:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6F8B15D9BD5; Wed, 3 Jul 2019 16:48:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50F4E83D38; Wed, 3 Jul 2019 16:48:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED539E837; Wed, 3 Jul 2019 16:48:46 +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 x63GmkJH075990; Wed, 3 Jul 2019 16:48:46 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Gmk0k075989; Wed, 3 Jul 2019 16:48:46 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031648.x63Gmk0k075989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 16:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349652 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 50F4E83D38 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:48:47 -0000 Author: cy Date: Wed Jul 3 16:48:46 2019 New Revision: 349652 URL: https://svnweb.freebsd.org/changeset/base/349652 Log: MFC r349331: Clean out duplicate definitions of TCP macros also found in netinet/tcp.h. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Wed Jul 3 16:43:40 2019 (r349651) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Wed Jul 3 16:48:46 2019 (r349652) @@ -828,37 +828,6 @@ typedef struct tcpiphdr tcpiphdr_t; #undef IPOPT_AH #define IPOPT_AH 256+IPPROTO_AH -#ifndef TCPOPT_EOL -# define TCPOPT_EOL 0 -#endif -#ifndef TCPOPT_NOP -# define TCPOPT_NOP 1 -#endif -#ifndef TCPOPT_MAXSEG -# define TCPOPT_MAXSEG 2 -#endif -#ifndef TCPOLEN_MAXSEG -# define TCPOLEN_MAXSEG 4 -#endif -#ifndef TCPOPT_WINDOW -# define TCPOPT_WINDOW 3 -#endif -#ifndef TCPOLEN_WINDOW -# define TCPOLEN_WINDOW 3 -#endif -#ifndef TCPOPT_SACK_PERMITTED -# define TCPOPT_SACK_PERMITTED 4 -#endif -#ifndef TCPOLEN_SACK_PERMITTED -# define TCPOLEN_SACK_PERMITTED 2 -#endif -#ifndef TCPOPT_SACK -# define TCPOPT_SACK 5 -#endif -#ifndef TCPOPT_TIMESTAMP -# define TCPOPT_TIMESTAMP 8 -#endif - #ifndef ICMP_MINLEN # define ICMP_MINLEN 8 #endif From owner-svn-src-all@freebsd.org Wed Jul 3 16:48:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 120B215D9BDA; Wed, 3 Jul 2019 16:48:48 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5C6483D42; Wed, 3 Jul 2019 16:48:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48904E838; Wed, 3 Jul 2019 16:48:47 +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 x63GmlN3075996; Wed, 3 Jul 2019 16:48:47 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63GmlS5075995; Wed, 3 Jul 2019 16:48:47 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031648.x63GmlS5075995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 16:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349652 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A5C6483D42 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:48:48 -0000 Author: cy Date: Wed Jul 3 16:48:46 2019 New Revision: 349652 URL: https://svnweb.freebsd.org/changeset/base/349652 Log: MFC r349331: Clean out duplicate definitions of TCP macros also found in netinet/tcp.h. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Wed Jul 3 16:43:40 2019 (r349651) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Wed Jul 3 16:48:46 2019 (r349652) @@ -829,37 +829,6 @@ typedef struct tcpiphdr tcpiphdr_t; #undef IPOPT_AH #define IPOPT_AH 256+IPPROTO_AH -#ifndef TCPOPT_EOL -# define TCPOPT_EOL 0 -#endif -#ifndef TCPOPT_NOP -# define TCPOPT_NOP 1 -#endif -#ifndef TCPOPT_MAXSEG -# define TCPOPT_MAXSEG 2 -#endif -#ifndef TCPOLEN_MAXSEG -# define TCPOLEN_MAXSEG 4 -#endif -#ifndef TCPOPT_WINDOW -# define TCPOPT_WINDOW 3 -#endif -#ifndef TCPOLEN_WINDOW -# define TCPOLEN_WINDOW 3 -#endif -#ifndef TCPOPT_SACK_PERMITTED -# define TCPOPT_SACK_PERMITTED 4 -#endif -#ifndef TCPOLEN_SACK_PERMITTED -# define TCPOLEN_SACK_PERMITTED 2 -#endif -#ifndef TCPOPT_SACK -# define TCPOPT_SACK 5 -#endif -#ifndef TCPOPT_TIMESTAMP -# define TCPOPT_TIMESTAMP 8 -#endif - #ifndef ICMP_MINLEN # define ICMP_MINLEN 8 #endif From owner-svn-src-all@freebsd.org Wed Jul 3 16:54:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E89F15DA073; Wed, 3 Jul 2019 16:54:00 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03C9F84617; Wed, 3 Jul 2019 16:54:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6D8DE9DD; Wed, 3 Jul 2019 16:53:59 +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 x63Grx3B081265; Wed, 3 Jul 2019 16:53:59 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63GrxK0081264; Wed, 3 Jul 2019 16:53:59 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031653.x63GrxK0081264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 16:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349653 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 03C9F84617 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:54:00 -0000 Author: cy Date: Wed Jul 3 16:53:59 2019 New Revision: 349653 URL: https://svnweb.freebsd.org/changeset/base/349653 Log: MFC r349362: The definition of icmptypes in ip_compt.h is dead code as it already use the icmptypes in ip_icmp.h. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Wed Jul 3 16:48:46 2019 (r349652) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Wed Jul 3 16:53:59 2019 (r349653) @@ -828,159 +828,9 @@ typedef struct tcpiphdr tcpiphdr_t; #undef IPOPT_AH #define IPOPT_AH 256+IPPROTO_AH -#ifndef ICMP_MINLEN -# define ICMP_MINLEN 8 -#endif -#ifndef ICMP_ECHOREPLY -# define ICMP_ECHOREPLY 0 -#endif -#ifndef ICMP_UNREACH -# define ICMP_UNREACH 3 -#endif -#ifndef ICMP_UNREACH_NET -# define ICMP_UNREACH_NET 0 -#endif -#ifndef ICMP_UNREACH_HOST -# define ICMP_UNREACH_HOST 1 -#endif -#ifndef ICMP_UNREACH_PROTOCOL -# define ICMP_UNREACH_PROTOCOL 2 -#endif -#ifndef ICMP_UNREACH_PORT -# define ICMP_UNREACH_PORT 3 -#endif -#ifndef ICMP_UNREACH_NEEDFRAG -# define ICMP_UNREACH_NEEDFRAG 4 -#endif -#ifndef ICMP_UNREACH_SRCFAIL -# define ICMP_UNREACH_SRCFAIL 5 -#endif -#ifndef ICMP_UNREACH_NET_UNKNOWN -# define ICMP_UNREACH_NET_UNKNOWN 6 -#endif -#ifndef ICMP_UNREACH_HOST_UNKNOWN -# define ICMP_UNREACH_HOST_UNKNOWN 7 -#endif -#ifndef ICMP_UNREACH_ISOLATED -# define ICMP_UNREACH_ISOLATED 8 -#endif -#ifndef ICMP_UNREACH_NET_PROHIB -# define ICMP_UNREACH_NET_PROHIB 9 -#endif -#ifndef ICMP_UNREACH_HOST_PROHIB -# define ICMP_UNREACH_HOST_PROHIB 10 -#endif -#ifndef ICMP_UNREACH_TOSNET -# define ICMP_UNREACH_TOSNET 11 -#endif -#ifndef ICMP_UNREACH_TOSHOST -# define ICMP_UNREACH_TOSHOST 12 -#endif -#ifndef ICMP_UNREACH_ADMIN_PROHIBIT -# define ICMP_UNREACH_ADMIN_PROHIBIT 13 -#endif -#ifndef ICMP_UNREACH_FILTER -# define ICMP_UNREACH_FILTER 13 -#endif -#ifndef ICMP_UNREACH_HOST_PRECEDENCE -# define ICMP_UNREACH_HOST_PRECEDENCE 14 -#endif -#ifndef ICMP_UNREACH_PRECEDENCE_CUTOFF -# define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 -#endif -#ifndef ICMP_SOURCEQUENCH -# define ICMP_SOURCEQUENCH 4 -#endif -#ifndef ICMP_REDIRECT_NET -# define ICMP_REDIRECT_NET 0 -#endif -#ifndef ICMP_REDIRECT_HOST -# define ICMP_REDIRECT_HOST 1 -#endif -#ifndef ICMP_REDIRECT_TOSNET -# define ICMP_REDIRECT_TOSNET 2 -#endif -#ifndef ICMP_REDIRECT_TOSHOST -# define ICMP_REDIRECT_TOSHOST 3 -#endif -#ifndef ICMP_ALTHOSTADDR -# define ICMP_ALTHOSTADDR 6 -#endif -#ifndef ICMP_TIMXCEED -# define ICMP_TIMXCEED 11 -#endif -#ifndef ICMP_TIMXCEED_INTRANS -# define ICMP_TIMXCEED_INTRANS 0 -#endif -#ifndef ICMP_TIMXCEED_REASS -# define ICMP_TIMXCEED_REASS 1 -#endif -#ifndef ICMP_PARAMPROB -# define ICMP_PARAMPROB 12 -#endif -#ifndef ICMP_PARAMPROB_ERRATPTR -# define ICMP_PARAMPROB_ERRATPTR 0 -#endif -#ifndef ICMP_PARAMPROB_OPTABSENT -# define ICMP_PARAMPROB_OPTABSENT 1 -#endif -#ifndef ICMP_PARAMPROB_LENGTH -# define ICMP_PARAMPROB_LENGTH 2 -#endif -#ifndef ICMP_TSTAMP -# define ICMP_TSTAMP 13 -#endif -#ifndef ICMP_TSTAMPREPLY -# define ICMP_TSTAMPREPLY 14 -#endif -#ifndef ICMP_IREQ -# define ICMP_IREQ 15 -#endif -#ifndef ICMP_IREQREPLY -# define ICMP_IREQREPLY 16 -#endif -#ifndef ICMP_MASKREQ -# define ICMP_MASKREQ 17 -#endif -#ifndef ICMP_MASKREPLY -# define ICMP_MASKREPLY 18 -#endif -#ifndef ICMP_TRACEROUTE -# define ICMP_TRACEROUTE 30 -#endif -#ifndef ICMP_DATACONVERR -# define ICMP_DATACONVERR 31 -#endif -#ifndef ICMP_MOBILE_REDIRECT -# define ICMP_MOBILE_REDIRECT 32 -#endif -#ifndef ICMP_IPV6_WHEREAREYOU -# define ICMP_IPV6_WHEREAREYOU 33 -#endif -#ifndef ICMP_IPV6_IAMHERE -# define ICMP_IPV6_IAMHERE 34 -#endif -#ifndef ICMP_MOBILE_REGREQUEST -# define ICMP_MOBILE_REGREQUEST 35 -#endif -#ifndef ICMP_MOBILE_REGREPLY -# define ICMP_MOBILE_REGREPLY 36 -#endif -#ifndef ICMP_SKIP -# define ICMP_SKIP 39 -#endif -#ifndef ICMP_PHOTURIS -# define ICMP_PHOTURIS 40 -#endif -#ifndef ICMP_PHOTURIS_UNKNOWN_INDEX -# define ICMP_PHOTURIS_UNKNOWN_INDEX 1 -#endif -#ifndef ICMP_PHOTURIS_AUTH_FAILED -# define ICMP_PHOTURIS_AUTH_FAILED 2 -#endif -#ifndef ICMP_PHOTURIS_DECRYPT_FAILED -# define ICMP_PHOTURIS_DECRYPT_FAILED 3 -#endif +# define ICMP_UNREACH_ADMIN_PROHIBIT ICMP_UNREACH_FILTER_PROHIB +# define ICMP_UNREACH_FILTER ICMP_UNREACH_FILTER_PROHIB + #ifndef IPVERSION # define IPVERSION 4 #endif From owner-svn-src-all@freebsd.org Wed Jul 3 16:54:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10FEE15DA07A; Wed, 3 Jul 2019 16:54:01 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A554B84619; Wed, 3 Jul 2019 16:54:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 412ADE9DE; Wed, 3 Jul 2019 16:54:00 +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 x63Gs0Ui081275; Wed, 3 Jul 2019 16:54:00 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Gs0SE081274; Wed, 3 Jul 2019 16:54:00 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031654.x63Gs0SE081274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 16:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349653 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A554B84619 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 16:54:01 -0000 Author: cy Date: Wed Jul 3 16:53:59 2019 New Revision: 349653 URL: https://svnweb.freebsd.org/changeset/base/349653 Log: MFC r349362: The definition of icmptypes in ip_compt.h is dead code as it already use the icmptypes in ip_icmp.h. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Wed Jul 3 16:48:46 2019 (r349652) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Wed Jul 3 16:53:59 2019 (r349653) @@ -829,159 +829,9 @@ typedef struct tcpiphdr tcpiphdr_t; #undef IPOPT_AH #define IPOPT_AH 256+IPPROTO_AH -#ifndef ICMP_MINLEN -# define ICMP_MINLEN 8 -#endif -#ifndef ICMP_ECHOREPLY -# define ICMP_ECHOREPLY 0 -#endif -#ifndef ICMP_UNREACH -# define ICMP_UNREACH 3 -#endif -#ifndef ICMP_UNREACH_NET -# define ICMP_UNREACH_NET 0 -#endif -#ifndef ICMP_UNREACH_HOST -# define ICMP_UNREACH_HOST 1 -#endif -#ifndef ICMP_UNREACH_PROTOCOL -# define ICMP_UNREACH_PROTOCOL 2 -#endif -#ifndef ICMP_UNREACH_PORT -# define ICMP_UNREACH_PORT 3 -#endif -#ifndef ICMP_UNREACH_NEEDFRAG -# define ICMP_UNREACH_NEEDFRAG 4 -#endif -#ifndef ICMP_UNREACH_SRCFAIL -# define ICMP_UNREACH_SRCFAIL 5 -#endif -#ifndef ICMP_UNREACH_NET_UNKNOWN -# define ICMP_UNREACH_NET_UNKNOWN 6 -#endif -#ifndef ICMP_UNREACH_HOST_UNKNOWN -# define ICMP_UNREACH_HOST_UNKNOWN 7 -#endif -#ifndef ICMP_UNREACH_ISOLATED -# define ICMP_UNREACH_ISOLATED 8 -#endif -#ifndef ICMP_UNREACH_NET_PROHIB -# define ICMP_UNREACH_NET_PROHIB 9 -#endif -#ifndef ICMP_UNREACH_HOST_PROHIB -# define ICMP_UNREACH_HOST_PROHIB 10 -#endif -#ifndef ICMP_UNREACH_TOSNET -# define ICMP_UNREACH_TOSNET 11 -#endif -#ifndef ICMP_UNREACH_TOSHOST -# define ICMP_UNREACH_TOSHOST 12 -#endif -#ifndef ICMP_UNREACH_ADMIN_PROHIBIT -# define ICMP_UNREACH_ADMIN_PROHIBIT 13 -#endif -#ifndef ICMP_UNREACH_FILTER -# define ICMP_UNREACH_FILTER 13 -#endif -#ifndef ICMP_UNREACH_HOST_PRECEDENCE -# define ICMP_UNREACH_HOST_PRECEDENCE 14 -#endif -#ifndef ICMP_UNREACH_PRECEDENCE_CUTOFF -# define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 -#endif -#ifndef ICMP_SOURCEQUENCH -# define ICMP_SOURCEQUENCH 4 -#endif -#ifndef ICMP_REDIRECT_NET -# define ICMP_REDIRECT_NET 0 -#endif -#ifndef ICMP_REDIRECT_HOST -# define ICMP_REDIRECT_HOST 1 -#endif -#ifndef ICMP_REDIRECT_TOSNET -# define ICMP_REDIRECT_TOSNET 2 -#endif -#ifndef ICMP_REDIRECT_TOSHOST -# define ICMP_REDIRECT_TOSHOST 3 -#endif -#ifndef ICMP_ALTHOSTADDR -# define ICMP_ALTHOSTADDR 6 -#endif -#ifndef ICMP_TIMXCEED -# define ICMP_TIMXCEED 11 -#endif -#ifndef ICMP_TIMXCEED_INTRANS -# define ICMP_TIMXCEED_INTRANS 0 -#endif -#ifndef ICMP_TIMXCEED_REASS -# define ICMP_TIMXCEED_REASS 1 -#endif -#ifndef ICMP_PARAMPROB -# define ICMP_PARAMPROB 12 -#endif -#ifndef ICMP_PARAMPROB_ERRATPTR -# define ICMP_PARAMPROB_ERRATPTR 0 -#endif -#ifndef ICMP_PARAMPROB_OPTABSENT -# define ICMP_PARAMPROB_OPTABSENT 1 -#endif -#ifndef ICMP_PARAMPROB_LENGTH -# define ICMP_PARAMPROB_LENGTH 2 -#endif -#ifndef ICMP_TSTAMP -# define ICMP_TSTAMP 13 -#endif -#ifndef ICMP_TSTAMPREPLY -# define ICMP_TSTAMPREPLY 14 -#endif -#ifndef ICMP_IREQ -# define ICMP_IREQ 15 -#endif -#ifndef ICMP_IREQREPLY -# define ICMP_IREQREPLY 16 -#endif -#ifndef ICMP_MASKREQ -# define ICMP_MASKREQ 17 -#endif -#ifndef ICMP_MASKREPLY -# define ICMP_MASKREPLY 18 -#endif -#ifndef ICMP_TRACEROUTE -# define ICMP_TRACEROUTE 30 -#endif -#ifndef ICMP_DATACONVERR -# define ICMP_DATACONVERR 31 -#endif -#ifndef ICMP_MOBILE_REDIRECT -# define ICMP_MOBILE_REDIRECT 32 -#endif -#ifndef ICMP_IPV6_WHEREAREYOU -# define ICMP_IPV6_WHEREAREYOU 33 -#endif -#ifndef ICMP_IPV6_IAMHERE -# define ICMP_IPV6_IAMHERE 34 -#endif -#ifndef ICMP_MOBILE_REGREQUEST -# define ICMP_MOBILE_REGREQUEST 35 -#endif -#ifndef ICMP_MOBILE_REGREPLY -# define ICMP_MOBILE_REGREPLY 36 -#endif -#ifndef ICMP_SKIP -# define ICMP_SKIP 39 -#endif -#ifndef ICMP_PHOTURIS -# define ICMP_PHOTURIS 40 -#endif -#ifndef ICMP_PHOTURIS_UNKNOWN_INDEX -# define ICMP_PHOTURIS_UNKNOWN_INDEX 1 -#endif -#ifndef ICMP_PHOTURIS_AUTH_FAILED -# define ICMP_PHOTURIS_AUTH_FAILED 2 -#endif -#ifndef ICMP_PHOTURIS_DECRYPT_FAILED -# define ICMP_PHOTURIS_DECRYPT_FAILED 3 -#endif +# define ICMP_UNREACH_ADMIN_PROHIBIT ICMP_UNREACH_FILTER_PROHIB +# define ICMP_UNREACH_FILTER ICMP_UNREACH_FILTER_PROHIB + #ifndef IPVERSION # define IPVERSION 4 #endif From owner-svn-src-all@freebsd.org Wed Jul 3 17:04:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28DE615DA64E; Wed, 3 Jul 2019 17:04:45 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C071084DA1; Wed, 3 Jul 2019 17:04:44 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91E64EBCB; Wed, 3 Jul 2019 17:04:44 +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 x63H4iqD086735; Wed, 3 Jul 2019 17:04:44 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63H4iFG086734; Wed, 3 Jul 2019 17:04:44 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031704.x63H4iFG086734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 17:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349654 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C071084DA1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 17:04:45 -0000 Author: cy Date: Wed Jul 3 17:04:44 2019 New Revision: 349654 URL: https://svnweb.freebsd.org/changeset/base/349654 Log: MFC r349399-349400,349567-349568: Prompted by r349366, ipfilter is also does not conform to RFC 3128 by dropping TCP fragments with offset = 1. In addition to dropping these fragments, add a DTrace probe to allow for more detailed monitoring and diagnosis if required. Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Wed Jul 3 16:53:59 2019 (r349653) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Wed Jul 3 17:04:44 2019 (r349654) @@ -1728,6 +1728,10 @@ ipf_pr_ipv4hdr(fin) fi->fi_flx |= FI_FRAG; off &= IP_OFFMASK; + if (off == 1 && p == IPPROTO_TCP) { + fin->fin_flx |= FI_SHORT; /* RFC 3128 */ + DT1(ipf_fi_tcp_frag_off_1, fr_info_t *, fin); + } if (off != 0) { fin->fin_flx |= FI_FRAGBODY; off <<= 3; From owner-svn-src-all@freebsd.org Wed Jul 3 17:04:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CA3715DA652; Wed, 3 Jul 2019 17:04:45 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F20284DA2; Wed, 3 Jul 2019 17:04:45 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D834AEBCC; Wed, 3 Jul 2019 17:04:44 +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 x63H4ike086741; Wed, 3 Jul 2019 17:04:44 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63H4iAX086740; Wed, 3 Jul 2019 17:04:44 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031704.x63H4iAX086740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 17:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349654 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F20284DA2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 17:04:45 -0000 Author: cy Date: Wed Jul 3 17:04:44 2019 New Revision: 349654 URL: https://svnweb.freebsd.org/changeset/base/349654 Log: MFC r349399-349400,349567-349568: Prompted by r349366, ipfilter is also does not conform to RFC 3128 by dropping TCP fragments with offset = 1. In addition to dropping these fragments, add a DTrace probe to allow for more detailed monitoring and diagnosis if required. Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/fil.c Wed Jul 3 16:53:59 2019 (r349653) +++ stable/12/sys/contrib/ipfilter/netinet/fil.c Wed Jul 3 17:04:44 2019 (r349654) @@ -1728,6 +1728,10 @@ ipf_pr_ipv4hdr(fin) fi->fi_flx |= FI_FRAG; off &= IP_OFFMASK; + if (off == 1 && p == IPPROTO_TCP) { + fin->fin_flx |= FI_SHORT; /* RFC 3128 */ + DT1(ipf_fi_tcp_frag_off_1, fr_info_t *, fin); + } if (off != 0) { fin->fin_flx |= FI_FRAGBODY; off <<= 3; From owner-svn-src-all@freebsd.org Wed Jul 3 17:09:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CFB715DA7D2; Wed, 3 Jul 2019 17:09:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B7FDF850F7; Wed, 3 Jul 2019 17:09:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 918DBEBCF; Wed, 3 Jul 2019 17:09:42 +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 x63H9gn7087036; Wed, 3 Jul 2019 17:09:42 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63H9gKU087032; Wed, 3 Jul 2019 17:09:42 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031709.x63H9gKU087032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 17:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349655 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B7FDF850F7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 17:09:43 -0000 Author: cy Date: Wed Jul 3 17:09:41 2019 New Revision: 349655 URL: https://svnweb.freebsd.org/changeset/base/349655 Log: MFC r349401: While working on PR/238796 I discovered an unused variable in frdest, the next hop structure. It is likely this contributes to PR/238796 though other factors remain to be investigated. PR: 238796 Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Wed Jul 3 17:04:44 2019 (r349654) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Wed Jul 3 17:09:41 2019 (r349655) @@ -7480,10 +7480,6 @@ ipf_resolvedest(softc, base, fdp, v) } fdp->fd_ptr = ifp; - if ((ifp != NULL) && (ifp != (void *)-1)) { - fdp->fd_local = ipf_deliverlocal(softc, v, ifp, &fdp->fd_ip6); - } - return errval; } Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jul 3 17:04:44 2019 (r349654) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jul 3 17:09:41 2019 (r349655) @@ -560,7 +560,6 @@ typedef struct frdest { addrfamily_t fd_addr; fr_dtypes_t fd_type; int fd_name; - int fd_local; } frdest_t; #define fd_ip6 fd_addr.adf_addr From owner-svn-src-all@freebsd.org Wed Jul 3 17:09:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6D5F15DA7D6; Wed, 3 Jul 2019 17:09:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CDC1850F8; Wed, 3 Jul 2019 17:09:43 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44368EBD0; Wed, 3 Jul 2019 17:09:43 +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 x63H9hTT087045; Wed, 3 Jul 2019 17:09:43 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63H9grI087041; Wed, 3 Jul 2019 17:09:42 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031709.x63H9grI087041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 17:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349655 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 349655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6CDC1850F8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 17:09:44 -0000 Author: cy Date: Wed Jul 3 17:09:41 2019 New Revision: 349655 URL: https://svnweb.freebsd.org/changeset/base/349655 Log: MFC r349401: While working on PR/238796 I discovered an unused variable in frdest, the next hop structure. It is likely this contributes to PR/238796 though other factors remain to be investigated. PR: 238796 Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/fil.c Wed Jul 3 17:04:44 2019 (r349654) +++ stable/12/sys/contrib/ipfilter/netinet/fil.c Wed Jul 3 17:09:41 2019 (r349655) @@ -7480,10 +7480,6 @@ ipf_resolvedest(softc, base, fdp, v) } fdp->fd_ptr = ifp; - if ((ifp != NULL) && (ifp != (void *)-1)) { - fdp->fd_local = ipf_deliverlocal(softc, v, ifp, &fdp->fd_ip6); - } - return errval; } Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jul 3 17:04:44 2019 (r349654) +++ stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Wed Jul 3 17:09:41 2019 (r349655) @@ -560,7 +560,6 @@ typedef struct frdest { addrfamily_t fd_addr; fr_dtypes_t fd_type; int fd_name; - int fd_local; } frdest_t; #define fd_ip6 fd_addr.adf_addr From owner-svn-src-all@freebsd.org Wed Jul 3 17:24:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9550915DAF7C; Wed, 3 Jul 2019 17:24:25 +0000 (UTC) (envelope-from seanc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C44785CCE; Wed, 3 Jul 2019 17:24:25 +0000 (UTC) (envelope-from seanc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14B4FEF49; Wed, 3 Jul 2019 17:24:25 +0000 (UTC) (envelope-from seanc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63HOO7n097268; Wed, 3 Jul 2019 17:24:24 GMT (envelope-from seanc@FreeBSD.org) Received: (from seanc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63HOOtm097267; Wed, 3 Jul 2019 17:24:24 GMT (envelope-from seanc@FreeBSD.org) Message-Id: <201907031724.x63HOOtm097267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: seanc set sender to seanc@FreeBSD.org using -f From: Sean Chittenden Date: Wed, 3 Jul 2019 17:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349656 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: seanc X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 349656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3C44785CCE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 17:24:25 -0000 Author: seanc (ports committer) Date: Wed Jul 3 17:24:24 2019 New Revision: 349656 URL: https://svnweb.freebsd.org/changeset/base/349656 Log: bhyve/audio: don't leak resources on failed initialization. Coverity CID: 1402793 Approved by: markj, jhb, bhyve Differential Revision: https://reviews.freebsd.org/D20841 Modified: head/usr.sbin/bhyve/audio.c Modified: head/usr.sbin/bhyve/audio.c ============================================================================== --- head/usr.sbin/bhyve/audio.c Wed Jul 3 17:09:41 2019 (r349655) +++ head/usr.sbin/bhyve/audio.c Wed Jul 3 17:24:24 2019 (r349656) @@ -103,6 +103,7 @@ audio_init(const char *dev_name, uint8_t dir) if (aud->fd == -1) { DPRINTF("Failed to open dev: %s, errno: %d\n", aud->dev_name, errno); + free(aud); return (NULL); } From owner-svn-src-all@freebsd.org Wed Jul 3 17:34:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9478A15DB30C; Wed, 3 Jul 2019 17:34:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33C4F862D0; Wed, 3 Jul 2019 17:34:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0011FF10F; Wed, 3 Jul 2019 17:34:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63HYQl8002870; Wed, 3 Jul 2019 17:34:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63HYQL2002869; Wed, 3 Jul 2019 17:34:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201907031734.x63HYQL2002869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jul 2019 17:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349657 - stable/12/sys/dev/nand X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/nand X-SVN-Commit-Revision: 349657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 33C4F862D0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 17:34:27 -0000 Author: emaste Date: Wed Jul 3 17:34:26 2019 New Revision: 349657 URL: https://svnweb.freebsd.org/changeset/base/349657 Log: MFC r349268: nandsim: correct test to avoid out-of-bounds access Previously nandsim_chip_status returned EINVAL iff both of user-provided chip->ctrl_num and chip->num were out of bounds. If only one failed the bounds check arbitrary memory would be read and returned. The NAND framework is not built by default, nandsim is not intended for production use (it is a simulator), and the nandsim device has root-only permissions. admbugs: 827 Reported by: Daniel Hodson of elttam Security: kernel information leak or DoS Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/dev/nand/nandsim.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nand/nandsim.c ============================================================================== --- stable/12/sys/dev/nand/nandsim.c Wed Jul 3 17:24:24 2019 (r349656) +++ stable/12/sys/dev/nand/nandsim.c Wed Jul 3 17:34:26 2019 (r349657) @@ -295,7 +295,7 @@ nandsim_chip_status(struct sim_chip *chip) nand_debug(NDBG_SIM,"status for chip num:%d at ctrl:%d", chip->num, chip->ctrl_num); - if (chip->ctrl_num >= MAX_SIM_DEV && + if (chip->ctrl_num >= MAX_SIM_DEV || chip->num >= MAX_CTRL_CS) return (EINVAL); From owner-svn-src-all@freebsd.org Wed Jul 3 17:35:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1EB615DB37A; Wed, 3 Jul 2019 17:35:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 680FC86410; Wed, 3 Jul 2019 17:35:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42734F110; Wed, 3 Jul 2019 17:35:24 +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 x63HZOEd002974; Wed, 3 Jul 2019 17:35:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63HZO5a002973; Wed, 3 Jul 2019 17:35:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201907031735.x63HZO5a002973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jul 2019 17:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349658 - stable/11/sys/dev/nand X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/nand X-SVN-Commit-Revision: 349658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 680FC86410 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 17:35:24 -0000 Author: emaste Date: Wed Jul 3 17:35:23 2019 New Revision: 349658 URL: https://svnweb.freebsd.org/changeset/base/349658 Log: MFC r349268: nandsim: correct test to avoid out-of-bounds access Previously nandsim_chip_status returned EINVAL iff both of user-provided chip->ctrl_num and chip->num were out of bounds. If only one failed the bounds check arbitrary memory would be read and returned. The NAND framework is not built by default, nandsim is not intended for production use (it is a simulator), and the nandsim device has root-only permissions. admbugs: 827 Reported by: Daniel Hodson of elttam Security: kernel information leak or DoS Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/nand/nandsim.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nand/nandsim.c ============================================================================== --- stable/11/sys/dev/nand/nandsim.c Wed Jul 3 17:34:26 2019 (r349657) +++ stable/11/sys/dev/nand/nandsim.c Wed Jul 3 17:35:23 2019 (r349658) @@ -293,7 +293,7 @@ nandsim_chip_status(struct sim_chip *chip) nand_debug(NDBG_SIM,"status for chip num:%d at ctrl:%d", chip->num, chip->ctrl_num); - if (chip->ctrl_num >= MAX_SIM_DEV && + if (chip->ctrl_num >= MAX_SIM_DEV || chip->num >= MAX_CTRL_CS) return (EINVAL); From owner-svn-src-all@freebsd.org Wed Jul 3 18:11:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFB6415DBD10; Wed, 3 Jul 2019 18:11:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5799D87516; Wed, 3 Jul 2019 18:11:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43604F75B; Wed, 3 Jul 2019 18:11:23 +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 x63IBNRb021537; Wed, 3 Jul 2019 18:11:23 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IBNJt021536; Wed, 3 Jul 2019 18:11:23 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031811.x63IBNJt021536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 18:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r349659 - in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Commit-Revision: 349659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5799D87516 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:11:24 -0000 Author: cy Date: Wed Jul 3 18:11:22 2019 New Revision: 349659 URL: https://svnweb.freebsd.org/changeset/base/349659 Log: MFC r349448: Fix a typo. PR/238816 initially addressed updates to usage() however it has now become a shopping list of fixes to ipmon man pages and usage(). PR: 238816 Modified: stable/10/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/man/ipmon.8 stable/12/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/contrib/ipfilter/man/ipmon.8 ============================================================================== --- stable/10/contrib/ipfilter/man/ipmon.8 Wed Jul 3 17:35:23 2019 (r349658) +++ stable/10/contrib/ipfilter/man/ipmon.8 Wed Jul 3 18:11:22 2019 (r349659) @@ -27,7 +27,7 @@ ipmon \- monitors /dev/ipl for logged packets .LP \fBipmon\fP opens \fB/dev/ipl\fP for reading and awaits data to be saved from the packet filter. The binary data read from the device is reprinted in -human readable for, however, IP#'s are not mapped back to hostnames, nor are +human readable form, however, IP#'s are not mapped back to hostnames, nor are ports mapped back to service names. The output goes to standard output by default or a filename, if given on the command line. Should the \fB\-s\fP option be used, output is instead sent to \fBsyslogd(8)\fP. Messages sent From owner-svn-src-all@freebsd.org Wed Jul 3 18:11:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 191B615DBD07; Wed, 3 Jul 2019 18:11:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B387E87510; Wed, 3 Jul 2019 18:11:22 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F736F755; Wed, 3 Jul 2019 18:11:22 +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 x63IBMEx021525; Wed, 3 Jul 2019 18:11:22 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IBMr3021524; Wed, 3 Jul 2019 18:11:22 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031811.x63IBMr3021524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 18:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349659 - in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Commit-Revision: 349659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B387E87510 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:11:23 -0000 Author: cy Date: Wed Jul 3 18:11:22 2019 New Revision: 349659 URL: https://svnweb.freebsd.org/changeset/base/349659 Log: MFC r349448: Fix a typo. PR/238816 initially addressed updates to usage() however it has now become a shopping list of fixes to ipmon man pages and usage(). PR: 238816 Modified: stable/11/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/man/ipmon.8 stable/12/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/contrib/ipfilter/man/ipmon.8 ============================================================================== --- stable/11/contrib/ipfilter/man/ipmon.8 Wed Jul 3 17:35:23 2019 (r349658) +++ stable/11/contrib/ipfilter/man/ipmon.8 Wed Jul 3 18:11:22 2019 (r349659) @@ -27,7 +27,7 @@ ipmon \- monitors /dev/ipl for logged packets .LP \fBipmon\fP opens \fB/dev/ipl\fP for reading and awaits data to be saved from the packet filter. The binary data read from the device is reprinted in -human readable for, however, IP#'s are not mapped back to hostnames, nor are +human readable form, however, IP#'s are not mapped back to hostnames, nor are ports mapped back to service names. The output goes to standard output by default or a filename, if given on the command line. Should the \fB\-s\fP option be used, output is instead sent to \fBsyslogd(8)\fP. Messages sent From owner-svn-src-all@freebsd.org Wed Jul 3 18:11:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8563D15DBD0B; Wed, 3 Jul 2019 18:11:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3F187512; Wed, 3 Jul 2019 18:11:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0917DF756; Wed, 3 Jul 2019 18:11:23 +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 x63IBM4r021531; Wed, 3 Jul 2019 18:11:22 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IBMII021530; Wed, 3 Jul 2019 18:11:22 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907031811.x63IBMII021530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 3 Jul 2019 18:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349659 - in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Commit-Revision: 349659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2D3F187512 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:11:23 -0000 Author: cy Date: Wed Jul 3 18:11:22 2019 New Revision: 349659 URL: https://svnweb.freebsd.org/changeset/base/349659 Log: MFC r349448: Fix a typo. PR/238816 initially addressed updates to usage() however it has now become a shopping list of fixes to ipmon man pages and usage(). PR: 238816 Modified: stable/12/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/man/ipmon.8 stable/11/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/contrib/ipfilter/man/ipmon.8 ============================================================================== --- stable/12/contrib/ipfilter/man/ipmon.8 Wed Jul 3 17:35:23 2019 (r349658) +++ stable/12/contrib/ipfilter/man/ipmon.8 Wed Jul 3 18:11:22 2019 (r349659) @@ -27,7 +27,7 @@ ipmon \- monitors /dev/ipl for logged packets .LP \fBipmon\fP opens \fB/dev/ipl\fP for reading and awaits data to be saved from the packet filter. The binary data read from the device is reprinted in -human readable for, however, IP#'s are not mapped back to hostnames, nor are +human readable form, however, IP#'s are not mapped back to hostnames, nor are ports mapped back to service names. The output goes to standard output by default or a filename, if given on the command line. Should the \fB\-s\fP option be used, output is instead sent to \fBsyslogd(8)\fP. Messages sent From owner-svn-src-all@freebsd.org Wed Jul 3 18:14:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C856E15DC15E; Wed, 3 Jul 2019 18:14:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C34187C47; Wed, 3 Jul 2019 18:14:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4577BF7C3; Wed, 3 Jul 2019 18:14: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 x63IE1ru023961; Wed, 3 Jul 2019 18:14:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IE1Ys023960; Wed, 3 Jul 2019 18:14:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031814.x63IE1Ys023960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349660 - stable/12/sys/fs/cuse X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/fs/cuse X-SVN-Commit-Revision: 349660 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6C34187C47 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:14:02 -0000 Author: hselasky Date: Wed Jul 3 18:14:00 2019 New Revision: 349660 URL: https://svnweb.freebsd.org/changeset/base/349660 Log: MFC r349367: Fix for deadlock situation in cuse(3) The final server unref should be done by the server thread to prevent deadlock in the client cdevpriv destructor, which cannot destroy itself. Sponsored by: Mellanox Technologies Modified: stable/12/sys/fs/cuse/cuse.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/cuse/cuse.c ============================================================================== --- stable/12/sys/fs/cuse/cuse.c Wed Jul 3 18:11:22 2019 (r349659) +++ stable/12/sys/fs/cuse/cuse.c Wed Jul 3 18:14:00 2019 (r349660) @@ -699,12 +699,38 @@ cuse_server_unref(struct cuse_server *pcs) free(pcs, M_CUSE); } +static int +cuse_server_do_close(struct cuse_server *pcs) +{ + int retval; + + cuse_lock(); + cuse_server_is_closing(pcs); + /* final client wakeup, if any */ + cuse_server_wakeup_all_client_locked(pcs); + + knlist_clear(&pcs->selinfo.si_note, 1); + + retval = pcs->refs; + cuse_unlock(); + + return (retval); +} + static void cuse_server_free(void *arg) { struct cuse_server *pcs = arg; - /* drop refcount */ + /* + * The final server unref should be done by the server thread + * to prevent deadlock in the client cdevpriv destructor, + * which cannot destroy itself. + */ + while (cuse_server_do_close(pcs) != 1) + pause("W", hz); + + /* drop final refcount */ cuse_server_unref(pcs); } @@ -746,21 +772,10 @@ static int cuse_server_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { struct cuse_server *pcs; - int error; - error = cuse_server_get(&pcs); - if (error != 0) - goto done; + if (cuse_server_get(&pcs) == 0) + cuse_server_do_close(pcs); - cuse_lock(); - cuse_server_is_closing(pcs); - /* final client wakeup, if any */ - cuse_server_wakeup_all_client_locked(pcs); - - knlist_clear(&pcs->selinfo.si_note, 1); - cuse_unlock(); - -done: return (0); } From owner-svn-src-all@freebsd.org Wed Jul 3 18:15:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 504D715DC1E7; Wed, 3 Jul 2019 18:15:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E97F687DF3; Wed, 3 Jul 2019 18:15:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C4AB1F7C5; Wed, 3 Jul 2019 18:15:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63IF0wM024067; Wed, 3 Jul 2019 18:15:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IF0X0024066; Wed, 3 Jul 2019 18:15:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031815.x63IF0X0024066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349661 - stable/11/sys/fs/cuse X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/fs/cuse X-SVN-Commit-Revision: 349661 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E97F687DF3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:15:01 -0000 Author: hselasky Date: Wed Jul 3 18:15:00 2019 New Revision: 349661 URL: https://svnweb.freebsd.org/changeset/base/349661 Log: MFC r349367: Fix for deadlock situation in cuse(3) The final server unref should be done by the server thread to prevent deadlock in the client cdevpriv destructor, which cannot destroy itself. Sponsored by: Mellanox Technologies Modified: stable/11/sys/fs/cuse/cuse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/cuse/cuse.c ============================================================================== --- stable/11/sys/fs/cuse/cuse.c Wed Jul 3 18:14:00 2019 (r349660) +++ stable/11/sys/fs/cuse/cuse.c Wed Jul 3 18:15:00 2019 (r349661) @@ -701,12 +701,38 @@ cuse_server_unref(struct cuse_server *pcs) free(pcs, M_CUSE); } +static int +cuse_server_do_close(struct cuse_server *pcs) +{ + int retval; + + cuse_lock(); + cuse_server_is_closing(pcs); + /* final client wakeup, if any */ + cuse_server_wakeup_all_client_locked(pcs); + + knlist_clear(&pcs->selinfo.si_note, 1); + + retval = pcs->refs; + cuse_unlock(); + + return (retval); +} + static void cuse_server_free(void *arg) { struct cuse_server *pcs = arg; - /* drop refcount */ + /* + * The final server unref should be done by the server thread + * to prevent deadlock in the client cdevpriv destructor, + * which cannot destroy itself. + */ + while (cuse_server_do_close(pcs) != 1) + pause("W", hz); + + /* drop final refcount */ cuse_server_unref(pcs); } @@ -748,21 +774,10 @@ static int cuse_server_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { struct cuse_server *pcs; - int error; - error = cuse_server_get(&pcs); - if (error != 0) - goto done; + if (cuse_server_get(&pcs) == 0) + cuse_server_do_close(pcs); - cuse_lock(); - cuse_server_is_closing(pcs); - /* final client wakeup, if any */ - cuse_server_wakeup_all_client_locked(pcs); - - knlist_clear(&pcs->selinfo.si_note, 1); - cuse_unlock(); - -done: return (0); } From owner-svn-src-all@freebsd.org Wed Jul 3 18:16:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 305BF15DC28E; Wed, 3 Jul 2019 18:16:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C92BD87F5E; Wed, 3 Jul 2019 18:16:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3B5DF7C6; Wed, 3 Jul 2019 18:16:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63IGASO024170; Wed, 3 Jul 2019 18:16:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IGAUh024169; Wed, 3 Jul 2019 18:16:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031816.x63IGAUh024169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349662 - stable/12/sys/fs/cuse X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/fs/cuse X-SVN-Commit-Revision: 349662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C92BD87F5E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:16:11 -0000 Author: hselasky Date: Wed Jul 3 18:16:10 2019 New Revision: 349662 URL: https://svnweb.freebsd.org/changeset/base/349662 Log: MFC r349368: Free all allocated unit IDs in cuse(3) after the client character devices have been destroyed to avoid creating character devices with identical name. Sponsored by: Mellanox Technologies Modified: stable/12/sys/fs/cuse/cuse.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/cuse/cuse.c ============================================================================== --- stable/12/sys/fs/cuse/cuse.c Wed Jul 3 18:15:00 2019 (r349661) +++ stable/12/sys/fs/cuse/cuse.c Wed Jul 3 18:16:10 2019 (r349662) @@ -671,14 +671,14 @@ cuse_server_unref(struct cuse_server *pcs) TAILQ_REMOVE(&cuse_server_head, pcs, entry); - cuse_free_unit_by_id_locked(pcs, -1); - while ((pcsd = TAILQ_FIRST(&pcs->hdev)) != NULL) { TAILQ_REMOVE(&pcs->hdev, pcsd, entry); cuse_unlock(); cuse_server_free_dev(pcsd); cuse_lock(); } + + cuse_free_unit_by_id_locked(pcs, -1); while ((mem = TAILQ_FIRST(&pcs->hmem)) != NULL) { TAILQ_REMOVE(&pcs->hmem, mem, entry); From owner-svn-src-all@freebsd.org Wed Jul 3 18:16:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0886D15DC30C; Wed, 3 Jul 2019 18:16:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2CBD8808C; Wed, 3 Jul 2019 18:16:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93EE9F7C7; Wed, 3 Jul 2019 18:16:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63IGqk9024254; Wed, 3 Jul 2019 18:16:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IGqlD024253; Wed, 3 Jul 2019 18:16:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031816.x63IGqlD024253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349663 - stable/11/sys/fs/cuse X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/fs/cuse X-SVN-Commit-Revision: 349663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A2CBD8808C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:16:53 -0000 Author: hselasky Date: Wed Jul 3 18:16:52 2019 New Revision: 349663 URL: https://svnweb.freebsd.org/changeset/base/349663 Log: MFC r349368: Free all allocated unit IDs in cuse(3) after the client character devices have been destroyed to avoid creating character devices with identical name. Sponsored by: Mellanox Technologies Modified: stable/11/sys/fs/cuse/cuse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/cuse/cuse.c ============================================================================== --- stable/11/sys/fs/cuse/cuse.c Wed Jul 3 18:16:10 2019 (r349662) +++ stable/11/sys/fs/cuse/cuse.c Wed Jul 3 18:16:52 2019 (r349663) @@ -673,14 +673,14 @@ cuse_server_unref(struct cuse_server *pcs) TAILQ_REMOVE(&cuse_server_head, pcs, entry); - cuse_free_unit_by_id_locked(pcs, -1); - while ((pcsd = TAILQ_FIRST(&pcs->hdev)) != NULL) { TAILQ_REMOVE(&pcs->hdev, pcsd, entry); cuse_unlock(); cuse_server_free_dev(pcsd); cuse_lock(); } + + cuse_free_unit_by_id_locked(pcs, -1); while ((mem = TAILQ_FIRST(&pcs->hmem)) != NULL) { TAILQ_REMOVE(&pcs->hmem, mem, entry); From owner-svn-src-all@freebsd.org Wed Jul 3 18:18:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C13815DC3F8; Wed, 3 Jul 2019 18:18:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F350F8822B; Wed, 3 Jul 2019 18:18:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5851F7CE; Wed, 3 Jul 2019 18:18:05 +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 x63II5Us024362; Wed, 3 Jul 2019 18:18:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63II54C024361; Wed, 3 Jul 2019 18:18:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031818.x63II54C024361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349664 - stable/12/usr.sbin/usbdump X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/usr.sbin/usbdump X-SVN-Commit-Revision: 349664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F350F8822B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:18:06 -0000 Author: hselasky Date: Wed Jul 3 18:18:05 2019 New Revision: 349664 URL: https://svnweb.freebsd.org/changeset/base/349664 Log: MFC r349370: Fix parsing of corrupt data in usbdump(8). Check that the transfer type array lookup is within bounds to avoid segfault. PR: 238801 Sponsored by: Mellanox Technologies Modified: stable/12/usr.sbin/usbdump/usbdump.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/usbdump/usbdump.c ============================================================================== --- stable/12/usr.sbin/usbdump/usbdump.c Wed Jul 3 18:16:52 2019 (r349663) +++ stable/12/usr.sbin/usbdump/usbdump.c Wed Jul 3 18:18:05 2019 (r349664) @@ -149,7 +149,9 @@ static const char *errstr_table[USB_ERR_MAX] = { [USB_ERR_NOT_LOCKED] = "NOT_LOCKED", }; -static const char *xfertype_table[4] = { +#define USB_XFERTYPE_MAX 4 + +static const char *xfertype_table[USB_XFERTYPE_MAX] = { [UE_CONTROL] = "CTRL", [UE_ISOCHRONOUS] = "ISOC", [UE_BULK] = "BULK", @@ -320,6 +322,15 @@ usb_speedstr(uint8_t speed) return (speed_table[speed]); } +static const char * +usb_xferstr(uint8_t type) +{ + if (type >= USB_XFERTYPE_MAX || xfertype_table[type] == NULL) + return ("UNKN"); + else + return (xfertype_table[type]); +} + static void print_flags(uint32_t flags) { @@ -496,7 +507,7 @@ print_apacket(const struct header_32 *hdr, const uint8 (int)len, buf, tv.tv_usec, (int)up->up_busunit, (int)up->up_address, (up->up_type == USBPF_XFERTAP_SUBMIT) ? "SUBM" : "DONE", - xfertype_table[up->up_xfertype], + usb_xferstr(up->up_xfertype), (unsigned int)up->up_endpoint, usb_speedstr(up->up_speed), (int)up->up_frames, From owner-svn-src-all@freebsd.org Wed Jul 3 18:18:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A240A15DC465; Wed, 3 Jul 2019 18:18:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497B08836D; Wed, 3 Jul 2019 18:18:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24684F7D0; Wed, 3 Jul 2019 18:18:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63IIhL8024458; Wed, 3 Jul 2019 18:18:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IIha8024456; Wed, 3 Jul 2019 18:18:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031818.x63IIha8024456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349665 - stable/11/usr.sbin/usbdump X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/usr.sbin/usbdump X-SVN-Commit-Revision: 349665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 497B08836D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:18:43 -0000 Author: hselasky Date: Wed Jul 3 18:18:42 2019 New Revision: 349665 URL: https://svnweb.freebsd.org/changeset/base/349665 Log: MFC r349370: Fix parsing of corrupt data in usbdump(8). Check that the transfer type array lookup is within bounds to avoid segfault. PR: 238801 Sponsored by: Mellanox Technologies Modified: stable/11/usr.sbin/usbdump/usbdump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/usbdump/usbdump.c ============================================================================== --- stable/11/usr.sbin/usbdump/usbdump.c Wed Jul 3 18:18:05 2019 (r349664) +++ stable/11/usr.sbin/usbdump/usbdump.c Wed Jul 3 18:18:42 2019 (r349665) @@ -149,7 +149,9 @@ static const char *errstr_table[USB_ERR_MAX] = { [USB_ERR_NOT_LOCKED] = "NOT_LOCKED", }; -static const char *xfertype_table[4] = { +#define USB_XFERTYPE_MAX 4 + +static const char *xfertype_table[USB_XFERTYPE_MAX] = { [UE_CONTROL] = "CTRL", [UE_ISOCHRONOUS] = "ISOC", [UE_BULK] = "BULK", @@ -320,6 +322,15 @@ usb_speedstr(uint8_t speed) return (speed_table[speed]); } +static const char * +usb_xferstr(uint8_t type) +{ + if (type >= USB_XFERTYPE_MAX || xfertype_table[type] == NULL) + return ("UNKN"); + else + return (xfertype_table[type]); +} + static void print_flags(uint32_t flags) { @@ -496,7 +507,7 @@ print_apacket(const struct header_32 *hdr, const uint8 (int)len, buf, tv.tv_usec, (int)up->up_busunit, (int)up->up_address, (up->up_type == USBPF_XFERTAP_SUBMIT) ? "SUBM" : "DONE", - xfertype_table[up->up_xfertype], + usb_xferstr(up->up_xfertype), (unsigned int)up->up_endpoint, usb_speedstr(up->up_speed), (int)up->up_frames, From owner-svn-src-all@freebsd.org Wed Jul 3 18:19:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49A2F15DC4F6; Wed, 3 Jul 2019 18:19:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1B22884DE; Wed, 3 Jul 2019 18:19:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABFA4F7D2; Wed, 3 Jul 2019 18:19:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63IJTrg024560; Wed, 3 Jul 2019 18:19:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IJTcG024559; Wed, 3 Jul 2019 18:19:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031819.x63IJTcG024559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r349666 - stable/10/usr.sbin/usbdump X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/usr.sbin/usbdump X-SVN-Commit-Revision: 349666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D1B22884DE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:19:30 -0000 Author: hselasky Date: Wed Jul 3 18:19:29 2019 New Revision: 349666 URL: https://svnweb.freebsd.org/changeset/base/349666 Log: MFC r349370: Fix parsing of corrupt data in usbdump(8). Check that the transfer type array lookup is within bounds to avoid segfault. PR: 238801 Sponsored by: Mellanox Technologies Modified: stable/10/usr.sbin/usbdump/usbdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/usbdump/usbdump.c ============================================================================== --- stable/10/usr.sbin/usbdump/usbdump.c Wed Jul 3 18:18:42 2019 (r349665) +++ stable/10/usr.sbin/usbdump/usbdump.c Wed Jul 3 18:19:29 2019 (r349666) @@ -148,7 +148,9 @@ static const char *errstr_table[USB_ERR_MAX] = { [USB_ERR_NOT_LOCKED] = "NOT_LOCKED", }; -static const char *xfertype_table[4] = { +#define USB_XFERTYPE_MAX 4 + +static const char *xfertype_table[USB_XFERTYPE_MAX] = { [UE_CONTROL] = "CTRL", [UE_ISOCHRONOUS] = "ISOC", [UE_BULK] = "BULK", @@ -319,6 +321,15 @@ usb_speedstr(uint8_t speed) return (speed_table[speed]); } +static const char * +usb_xferstr(uint8_t type) +{ + if (type >= USB_XFERTYPE_MAX || xfertype_table[type] == NULL) + return ("UNKN"); + else + return (xfertype_table[type]); +} + static void print_flags(uint32_t flags) { @@ -495,7 +506,7 @@ print_apacket(const struct header_32 *hdr, const uint8 (int)len, buf, tv.tv_usec, (int)up->up_busunit, (int)up->up_address, (up->up_type == USBPF_XFERTAP_SUBMIT) ? "SUBM" : "DONE", - xfertype_table[up->up_xfertype], + usb_xferstr(up->up_xfertype), (unsigned int)up->up_endpoint, usb_speedstr(up->up_speed), (int)up->up_frames, From owner-svn-src-all@freebsd.org Wed Jul 3 18:23:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14C5E15DC763; Wed, 3 Jul 2019 18:23:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEAC68890D; Wed, 3 Jul 2019 18:23:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82201F976; Wed, 3 Jul 2019 18:23:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63INblN029592; Wed, 3 Jul 2019 18:23:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63INbw4029591; Wed, 3 Jul 2019 18:23:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031823.x63INbw4029591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349667 - stable/12/lib/libusb X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/lib/libusb X-SVN-Commit-Revision: 349667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AEAC68890D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:23:38 -0000 Author: hselasky Date: Wed Jul 3 18:23:36 2019 New Revision: 349667 URL: https://svnweb.freebsd.org/changeset/base/349667 Log: MFC r349409 and r349410: Fix support for LIBUSB_HOTPLUG_ENUMERATE in libusb. Currently all devices are enumerated regardless of of the LIBUSB_HOTPLUG_ENUMERATE flag. Make sure when the flag is not specified no arrival events are generated for currently enumerated devices. Sponsored by: Mellanox Technologies Modified: stable/12/lib/libusb/libusb10.h stable/12/lib/libusb/libusb10_hotplug.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libusb/libusb10.h ============================================================================== --- stable/12/lib/libusb/libusb10.h Wed Jul 3 18:19:29 2019 (r349666) +++ stable/12/lib/libusb/libusb10.h Wed Jul 3 18:23:36 2019 (r349667) @@ -89,6 +89,8 @@ struct libusb_hotplug_callback_handle_struct { void *user_data; }; +TAILQ_HEAD(libusb_device_head, libusb_device); + struct libusb_context { int debug; int debug_fixed; @@ -106,7 +108,7 @@ struct libusb_context { TAILQ_HEAD(, libusb_super_pollfd) pollfds; TAILQ_HEAD(, libusb_super_transfer) tr_done; TAILQ_HEAD(, libusb_hotplug_callback_handle_struct) hotplug_cbh; - TAILQ_HEAD(, libusb_device) hotplug_devs; + struct libusb_device_head hotplug_devs; struct libusb_super_pollfd ctx_poll; Modified: stable/12/lib/libusb/libusb10_hotplug.c ============================================================================== --- stable/12/lib/libusb/libusb10_hotplug.c Wed Jul 3 18:19:29 2019 (r349666) +++ stable/12/lib/libusb/libusb10_hotplug.c Wed Jul 3 18:23:36 2019 (r349667) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2016 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2016-2019 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -85,20 +85,35 @@ libusb_hotplug_filter(libusb_context *ctx, libusb_hotp return (pcbh->fn(ctx, dev, event, pcbh->user_data)); } +static int +libusb_hotplug_enumerate(libusb_context *ctx, struct libusb_device_head *phead) +{ + libusb_device **ppdev; + ssize_t count; + ssize_t x; + + count = libusb_get_device_list(ctx, &ppdev); + if (count < 0) + return (-1); + + for (x = 0; x != count; x++) + TAILQ_INSERT_TAIL(phead, ppdev[x], hotplug_entry); + + libusb_free_device_list(ppdev, 0); + return (0); +} + static void * libusb_hotplug_scan(void *arg) { - TAILQ_HEAD(, libusb_device) hotplug_devs; + struct libusb_device_head hotplug_devs; libusb_hotplug_callback_handle acbh; libusb_hotplug_callback_handle bcbh; libusb_context *ctx = arg; - libusb_device **ppdev; libusb_device *temp; libusb_device *adev; libusb_device *bdev; unsigned do_loop = 1; - ssize_t count; - ssize_t x; while (do_loop) { usleep(4000000); @@ -108,14 +123,8 @@ libusb_hotplug_scan(void *arg) TAILQ_INIT(&hotplug_devs); if (ctx->hotplug_handler != NO_THREAD) { - count = libusb_get_device_list(ctx, &ppdev); - if (count < 0) + if (libusb_hotplug_enumerate(ctx, &hotplug_devs) < 0) continue; - for (x = 0; x != count; x++) { - TAILQ_INSERT_TAIL(&hotplug_devs, ppdev[x], - hotplug_entry); - } - libusb_free_device_list(ppdev, 0); } else { do_loop = 0; } @@ -191,6 +200,8 @@ int libusb_hotplug_register_callback(libusb_context *c HOTPLUG_LOCK(ctx); if (ctx->hotplug_handler == NO_THREAD) { + libusb_hotplug_enumerate(ctx, &ctx->hotplug_devs); + if (pthread_create(&ctx->hotplug_handler, NULL, &libusb_hotplug_scan, ctx) != 0) ctx->hotplug_handler = NO_THREAD; From owner-svn-src-all@freebsd.org Wed Jul 3 18:25:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4505115DC7EC; Wed, 3 Jul 2019 18:25:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEC2988A6C; Wed, 3 Jul 2019 18:25:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B84AEF977; Wed, 3 Jul 2019 18:25:05 +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 x63IP5Bt029717; Wed, 3 Jul 2019 18:25:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IP5NL029715; Wed, 3 Jul 2019 18:25:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031825.x63IP5NL029715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349668 - stable/11/lib/libusb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/lib/libusb X-SVN-Commit-Revision: 349668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DEC2988A6C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:25:06 -0000 Author: hselasky Date: Wed Jul 3 18:25:05 2019 New Revision: 349668 URL: https://svnweb.freebsd.org/changeset/base/349668 Log: MFC r349409 and r349410: Fix support for LIBUSB_HOTPLUG_ENUMERATE in libusb. Currently all devices are enumerated regardless of of the LIBUSB_HOTPLUG_ENUMERATE flag. Make sure when the flag is not specified no arrival events are generated for currently enumerated devices. Sponsored by: Mellanox Technologies Modified: stable/11/lib/libusb/libusb10.h stable/11/lib/libusb/libusb10_hotplug.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libusb/libusb10.h ============================================================================== --- stable/11/lib/libusb/libusb10.h Wed Jul 3 18:23:36 2019 (r349667) +++ stable/11/lib/libusb/libusb10.h Wed Jul 3 18:25:05 2019 (r349668) @@ -87,6 +87,8 @@ struct libusb_hotplug_callback_handle_struct { void *user_data; }; +TAILQ_HEAD(libusb_device_head, libusb_device); + struct libusb_context { int debug; int debug_fixed; @@ -104,7 +106,7 @@ struct libusb_context { TAILQ_HEAD(, libusb_super_pollfd) pollfds; TAILQ_HEAD(, libusb_super_transfer) tr_done; TAILQ_HEAD(, libusb_hotplug_callback_handle_struct) hotplug_cbh; - TAILQ_HEAD(, libusb_device) hotplug_devs; + struct libusb_device_head hotplug_devs; struct libusb_super_pollfd ctx_poll; Modified: stable/11/lib/libusb/libusb10_hotplug.c ============================================================================== --- stable/11/lib/libusb/libusb10_hotplug.c Wed Jul 3 18:23:36 2019 (r349667) +++ stable/11/lib/libusb/libusb10_hotplug.c Wed Jul 3 18:25:05 2019 (r349668) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2016 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2016-2019 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -85,20 +85,35 @@ libusb_hotplug_filter(libusb_context *ctx, libusb_hotp return (pcbh->fn(ctx, dev, event, pcbh->user_data)); } +static int +libusb_hotplug_enumerate(libusb_context *ctx, struct libusb_device_head *phead) +{ + libusb_device **ppdev; + ssize_t count; + ssize_t x; + + count = libusb_get_device_list(ctx, &ppdev); + if (count < 0) + return (-1); + + for (x = 0; x != count; x++) + TAILQ_INSERT_TAIL(phead, ppdev[x], hotplug_entry); + + libusb_free_device_list(ppdev, 0); + return (0); +} + static void * libusb_hotplug_scan(void *arg) { - TAILQ_HEAD(, libusb_device) hotplug_devs; + struct libusb_device_head hotplug_devs; libusb_hotplug_callback_handle acbh; libusb_hotplug_callback_handle bcbh; libusb_context *ctx = arg; - libusb_device **ppdev; libusb_device *temp; libusb_device *adev; libusb_device *bdev; unsigned do_loop = 1; - ssize_t count; - ssize_t x; while (do_loop) { usleep(4000000); @@ -108,14 +123,8 @@ libusb_hotplug_scan(void *arg) TAILQ_INIT(&hotplug_devs); if (ctx->hotplug_handler != NO_THREAD) { - count = libusb_get_device_list(ctx, &ppdev); - if (count < 0) + if (libusb_hotplug_enumerate(ctx, &hotplug_devs) < 0) continue; - for (x = 0; x != count; x++) { - TAILQ_INSERT_TAIL(&hotplug_devs, ppdev[x], - hotplug_entry); - } - libusb_free_device_list(ppdev, 0); } else { do_loop = 0; } @@ -191,6 +200,8 @@ int libusb_hotplug_register_callback(libusb_context *c HOTPLUG_LOCK(ctx); if (ctx->hotplug_handler == NO_THREAD) { + libusb_hotplug_enumerate(ctx, &ctx->hotplug_devs); + if (pthread_create(&ctx->hotplug_handler, NULL, &libusb_hotplug_scan, ctx) != 0) ctx->hotplug_handler = NO_THREAD; From owner-svn-src-all@freebsd.org Wed Jul 3 18:26:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A54815DC87F; Wed, 3 Jul 2019 18:26:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 003A088BD7; Wed, 3 Jul 2019 18:26:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD4FDF978; Wed, 3 Jul 2019 18:26:07 +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 x63IQ7bU029815; Wed, 3 Jul 2019 18:26:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IQ7PT029814; Wed, 3 Jul 2019 18:26:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031826.x63IQ7PT029814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r349669 - stable/10/lib/libusb X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/lib/libusb X-SVN-Commit-Revision: 349669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 003A088BD7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:26:08 -0000 Author: hselasky Date: Wed Jul 3 18:26:07 2019 New Revision: 349669 URL: https://svnweb.freebsd.org/changeset/base/349669 Log: MFC r349409 and r349410: Fix support for LIBUSB_HOTPLUG_ENUMERATE in libusb. Currently all devices are enumerated regardless of of the LIBUSB_HOTPLUG_ENUMERATE flag. Make sure when the flag is not specified no arrival events are generated for currently enumerated devices. Sponsored by: Mellanox Technologies Modified: stable/10/lib/libusb/libusb10.h stable/10/lib/libusb/libusb10_hotplug.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb10.h ============================================================================== --- stable/10/lib/libusb/libusb10.h Wed Jul 3 18:25:05 2019 (r349668) +++ stable/10/lib/libusb/libusb10.h Wed Jul 3 18:26:07 2019 (r349669) @@ -87,6 +87,8 @@ struct libusb_hotplug_callback_handle_struct { void *user_data; }; +TAILQ_HEAD(libusb_device_head, libusb_device); + struct libusb_context { int debug; int debug_fixed; @@ -104,7 +106,7 @@ struct libusb_context { TAILQ_HEAD(, libusb_super_pollfd) pollfds; TAILQ_HEAD(, libusb_super_transfer) tr_done; TAILQ_HEAD(, libusb_hotplug_callback_handle_struct) hotplug_cbh; - TAILQ_HEAD(, libusb_device) hotplug_devs; + struct libusb_device_head hotplug_devs; struct libusb_super_pollfd ctx_poll; Modified: stable/10/lib/libusb/libusb10_hotplug.c ============================================================================== --- stable/10/lib/libusb/libusb10_hotplug.c Wed Jul 3 18:25:05 2019 (r349668) +++ stable/10/lib/libusb/libusb10_hotplug.c Wed Jul 3 18:26:07 2019 (r349669) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2016 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2016-2019 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -85,20 +85,35 @@ libusb_hotplug_filter(libusb_context *ctx, libusb_hotp return (pcbh->fn(ctx, dev, event, pcbh->user_data)); } +static int +libusb_hotplug_enumerate(libusb_context *ctx, struct libusb_device_head *phead) +{ + libusb_device **ppdev; + ssize_t count; + ssize_t x; + + count = libusb_get_device_list(ctx, &ppdev); + if (count < 0) + return (-1); + + for (x = 0; x != count; x++) + TAILQ_INSERT_TAIL(phead, ppdev[x], hotplug_entry); + + libusb_free_device_list(ppdev, 0); + return (0); +} + static void * libusb_hotplug_scan(void *arg) { - TAILQ_HEAD(, libusb_device) hotplug_devs; + struct libusb_device_head hotplug_devs; libusb_hotplug_callback_handle acbh; libusb_hotplug_callback_handle bcbh; libusb_context *ctx = arg; - libusb_device **ppdev; libusb_device *temp; libusb_device *adev; libusb_device *bdev; unsigned do_loop = 1; - ssize_t count; - ssize_t x; while (do_loop) { usleep(4000000); @@ -108,14 +123,8 @@ libusb_hotplug_scan(void *arg) TAILQ_INIT(&hotplug_devs); if (ctx->hotplug_handler != NO_THREAD) { - count = libusb_get_device_list(ctx, &ppdev); - if (count < 0) + if (libusb_hotplug_enumerate(ctx, &hotplug_devs) < 0) continue; - for (x = 0; x != count; x++) { - TAILQ_INSERT_TAIL(&hotplug_devs, ppdev[x], - hotplug_entry); - } - libusb_free_device_list(ppdev, 0); } else { do_loop = 0; } @@ -191,6 +200,8 @@ int libusb_hotplug_register_callback(libusb_context *c HOTPLUG_LOCK(ctx); if (ctx->hotplug_handler == NO_THREAD) { + libusb_hotplug_enumerate(ctx, &ctx->hotplug_devs); + if (pthread_create(&ctx->hotplug_handler, NULL, &libusb_hotplug_scan, ctx) != 0) ctx->hotplug_handler = NO_THREAD; From owner-svn-src-all@freebsd.org Wed Jul 3 18:29:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06D9115DC954; Wed, 3 Jul 2019 18:29:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F78E88D41; Wed, 3 Jul 2019 18:29:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79A24F97B; Wed, 3 Jul 2019 18:29: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 x63ITIO7029989; Wed, 3 Jul 2019 18:29:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63ITIai029988; Wed, 3 Jul 2019 18:29:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907031829.x63ITIai029988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jul 2019 18:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349670 - stable/12/sys/dev/pci X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/pci X-SVN-Commit-Revision: 349670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9F78E88D41 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:29:19 -0000 Author: hselasky Date: Wed Jul 3 18:29:18 2019 New Revision: 349670 URL: https://svnweb.freebsd.org/changeset/base/349670 Log: MFC r349522: Need to apply the PCIM_BAR_MEM_BASE mask to the physical memory address before returning it to the user. Some of the least significant bits have special meaning and should be masked away. Discussed with: kib@ Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/pci/pci_user.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/pci/pci_user.c ============================================================================== --- stable/12/sys/dev/pci/pci_user.c Wed Jul 3 18:26:07 2019 (r349669) +++ stable/12/sys/dev/pci/pci_user.c Wed Jul 3 18:29:18 2019 (r349670) @@ -855,6 +855,7 @@ pci_bar_mmap(device_t pcidev, struct pci_bar_mmap *pbm struct thread *td; struct sglist *sg; struct pci_map *pm; + vm_paddr_t membase; vm_paddr_t pbase; vm_size_t plen; vm_offset_t addr; @@ -877,8 +878,9 @@ pci_bar_mmap(device_t pcidev, struct pci_bar_mmap *pbm return (EBUSY); /* XXXKIB enable if _ACTIVATE */ if (!PCI_BAR_MEM(pm->pm_value)) return (EIO); - pbase = trunc_page(pm->pm_value); - plen = round_page(pm->pm_value + ((pci_addr_t)1 << pm->pm_size)) - + membase = pm->pm_value & PCIM_BAR_MEM_BASE; + pbase = trunc_page(membase); + plen = round_page(membase + ((pci_addr_t)1 << pm->pm_size)) - pbase; prot = VM_PROT_READ | (((pbm->pbm_flags & PCIIO_BAR_MMAP_RW) != 0) ? VM_PROT_WRITE : 0); @@ -910,7 +912,7 @@ pci_bar_mmap(device_t pcidev, struct pci_bar_mmap *pbm } pbm->pbm_map_base = (void *)addr; pbm->pbm_map_length = plen; - pbm->pbm_bar_off = pm->pm_value - pbase; + pbm->pbm_bar_off = membase - pbase; pbm->pbm_bar_length = (pci_addr_t)1 << pm->pm_size; out: From owner-svn-src-all@freebsd.org Wed Jul 3 18:46:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AAF515DCEB6; Wed, 3 Jul 2019 18:46:40 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B184889716; Wed, 3 Jul 2019 18:46:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CF05FCDF; Wed, 3 Jul 2019 18:46:39 +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 x63IkdUr040504; Wed, 3 Jul 2019 18:46:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63IkdBZ040503; Wed, 3 Jul 2019 18:46:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907031846.x63IkdBZ040503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 18:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349671 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B184889716 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:46:40 -0000 Author: markj Date: Wed Jul 3 18:46:39 2019 New Revision: 349671 URL: https://svnweb.freebsd.org/changeset/base/349671 Log: Cache the next queue element when traversing a page queue. When QUEUE_MACRO_DEBUG_TRASH is configured, removing a queue element invalidates its queue linkage pointers. vm_pageout_collect_batch() was relying on these pointers remaining valid after a removal, so modify it to fetch the next queued page before dequeuing the current page. Submitted by: Don Morris Reviewed by: cem, vangyzen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20842 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Jul 3 18:29:18 2019 (r349670) +++ head/sys/vm/vm_pageout.c Wed Jul 3 18:46:39 2019 (r349671) @@ -266,7 +266,7 @@ static __always_inline void vm_pageout_collect_batch(struct scan_state *ss, const bool dequeue) { struct vm_pagequeue *pq; - vm_page_t m, marker; + vm_page_t m, marker, n; marker = ss->marker; pq = ss->pq; @@ -277,7 +277,8 @@ vm_pageout_collect_batch(struct scan_state *ss, const vm_pagequeue_lock(pq); for (m = TAILQ_NEXT(marker, plinks.q); m != NULL && ss->scanned < ss->maxscan && ss->bq.bq_cnt < VM_BATCHQUEUE_SIZE; - m = TAILQ_NEXT(m, plinks.q), ss->scanned++) { + m = n, ss->scanned++) { + n = TAILQ_NEXT(m, plinks.q); if ((m->flags & PG_MARKER) == 0) { KASSERT((m->aflags & PGA_ENQUEUED) != 0, ("page %p not enqueued", m)); From owner-svn-src-all@freebsd.org Wed Jul 3 18:53:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4887815DD379; Wed, 3 Jul 2019 18:53:06 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0D8E8A65B; Wed, 3 Jul 2019 18:53:05 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6810FE9D; Wed, 3 Jul 2019 18:53: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 x63Ir4kZ047039; Wed, 3 Jul 2019 18:53:04 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Ir40H047038; Wed, 3 Jul 2019 18:53:04 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201907031853.x63Ir40H047038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 3 Jul 2019 18:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349672 - stable/12/sys/powerpc/powerpc X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/12/sys/powerpc/powerpc X-SVN-Commit-Revision: 349672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E0D8E8A65B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 18:53:06 -0000 Author: jhibbits Date: Wed Jul 3 18:53:04 2019 New Revision: 349672 URL: https://svnweb.freebsd.org/changeset/base/349672 Log: MFC r344958,r344960,r344961 r344958: powerpc: Print data address register on alignment exceptions r344960: powerpc: Print trap frame address for fatal traps r344961: powerpc: Print trap frame address in ddb backtraces Modified: stable/12/sys/powerpc/powerpc/db_trace.c stable/12/sys/powerpc/powerpc/trap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/powerpc/powerpc/db_trace.c ============================================================================== --- stable/12/sys/powerpc/powerpc/db_trace.c Wed Jul 3 18:46:39 2019 (r349671) +++ stable/12/sys/powerpc/powerpc/db_trace.c Wed Jul 3 18:53:04 2019 (r349672) @@ -276,7 +276,7 @@ db_backtrace(struct thread *td, db_addr_t fp, int coun if (tf->exc == EXC_DSI) db_printf(" sr=%#x", (uint32_t)tf->cpu.aim.dsisr); - db_printf("\n"); + db_printf(" frame=%p\n", tf); stackframe = (db_addr_t) tf->fixreg[1]; if (kernel_only && (tf->srr1 & PSL_PR)) break; Modified: stable/12/sys/powerpc/powerpc/trap.c ============================================================================== --- stable/12/sys/powerpc/powerpc/trap.c Wed Jul 3 18:46:39 2019 (r349671) +++ stable/12/sys/powerpc/powerpc/trap.c Wed Jul 3 18:53:04 2019 (r349672) @@ -515,6 +515,7 @@ printtrap(u_int vector, struct trapframe *frame, int i case EXC_DSE: case EXC_DSI: case EXC_DTMISS: + case EXC_ALI: printf(" virtual address = 0x%" PRIxPTR "\n", frame->dar); break; case EXC_ISE: @@ -532,6 +533,7 @@ printtrap(u_int vector, struct trapframe *frame, int i printf(" current msr = 0x%" PRIxPTR "\n", mfmsr()); printf(" lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", frame->lr, frame->lr - (register_t)(__startkernel - KERNBASE)); + printf(" frame = %p\n", frame); printf(" curthread = %p\n", curthread); if (curthread != NULL) printf(" pid = %d, comm = %s\n", From owner-svn-src-all@freebsd.org Wed Jul 3 19:01:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8392715DD947; Wed, 3 Jul 2019 19:01:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23ABD8ADA6; Wed, 3 Jul 2019 19:01:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3A2EFEF4; Wed, 3 Jul 2019 19:01:41 +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 x63J1fcm049019; Wed, 3 Jul 2019 19:01:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63J1fgP049017; Wed, 3 Jul 2019 19:01:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201907031901.x63J1fgP049017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 3 Jul 2019 19:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349673 - in stable/12/sys/powerpc: include powerpc X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in stable/12/sys/powerpc: include powerpc X-SVN-Commit-Revision: 349673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 23ABD8ADA6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:01:42 -0000 Author: jhibbits Date: Wed Jul 3 19:01:41 2019 New Revision: 349673 URL: https://svnweb.freebsd.org/changeset/base/349673 Log: MFC r345829,345831,349402 r345829: powerpc: Apply r178139 from sparc64 to powerpc's fpu_sqrt r345831: powerpc: Allow emulating optional FPU instructions on CPUs with an FPU r349402: powerpc/booke: Handle misaligned floating point loads/stores as on AIM Modified: stable/12/sys/powerpc/include/trap.h stable/12/sys/powerpc/powerpc/trap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/powerpc/include/trap.h ============================================================================== --- stable/12/sys/powerpc/include/trap.h Wed Jul 3 18:53:04 2019 (r349672) +++ stable/12/sys/powerpc/include/trap.h Wed Jul 3 19:01:41 2019 (r349673) @@ -127,7 +127,7 @@ /* Macros to extract register information */ #define EXC_ALI_RST(dsisr) ((dsisr >> 5) & 0x1f) /* source or target */ #define EXC_ALI_RA(dsisr) (dsisr & 0x1f) -#define EXC_ALI_SPE_REG(instr) ((instr >> 21) & 0x1f) +#define EXC_ALI_INST_RST(instr) ((instr >> 21) & 0x1f) /* * SRR1 bits for program exception traps. These identify what caused Modified: stable/12/sys/powerpc/powerpc/trap.c ============================================================================== --- stable/12/sys/powerpc/powerpc/trap.c Wed Jul 3 18:53:04 2019 (r349672) +++ stable/12/sys/powerpc/powerpc/trap.c Wed Jul 3 19:01:41 2019 (r349673) @@ -832,7 +832,7 @@ static int fix_unaligned(struct thread *td, struct trapframe *frame) { struct thread *fputhread; -#ifdef __SPE__ +#ifdef BOOKE uint32_t inst; #endif int indicator, reg; @@ -843,7 +843,7 @@ fix_unaligned(struct thread *td, struct trapframe *fra if (indicator & ESR_SPE) { if (copyin((void *)frame->srr0, &inst, sizeof(inst)) != 0) return (-1); - reg = EXC_ALI_SPE_REG(inst); + reg = EXC_ALI_INST_RST(inst); fpr = (double *)td->td_pcb->pcb_vec.vr[reg]; fputhread = PCPU_GET(vecthread); @@ -873,12 +873,22 @@ fix_unaligned(struct thread *td, struct trapframe *fra return (0); } #else +#ifdef BOOKE + indicator = (frame->cpu.booke.esr & ESR_ST) ? EXC_ALI_STFD : EXC_ALI_LFD; +#else indicator = EXC_ALI_OPCODE_INDICATOR(frame->cpu.aim.dsisr); +#endif switch (indicator) { case EXC_ALI_LFD: case EXC_ALI_STFD: +#ifdef BOOKE + if (copyin((void *)frame->srr0, &inst, sizeof(inst)) != 0) + return (-1); + reg = EXC_ALI_INST_RST(inst); +#else reg = EXC_ALI_RST(frame->cpu.aim.dsisr); +#endif fpr = &td->td_pcb->pcb_fpu.fpr[reg].fpr; fputhread = PCPU_GET(fputhread); From owner-svn-src-all@freebsd.org Wed Jul 3 19:07:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93D6415DDB73; Wed, 3 Jul 2019 19:07:43 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3919A8B1AC; Wed, 3 Jul 2019 19:07:43 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0EFBE18043; Wed, 3 Jul 2019 19:07:43 +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 x63J7gq5052517; Wed, 3 Jul 2019 19:07:42 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63J7gKB052515; Wed, 3 Jul 2019 19:07:42 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201907031907.x63J7gKB052515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 3 Jul 2019 19:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349674 - stable/12/sys/powerpc/cpufreq X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/12/sys/powerpc/cpufreq X-SVN-Commit-Revision: 349674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3919A8B1AC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:07:43 -0000 Author: jhibbits Date: Wed Jul 3 19:07:42 2019 New Revision: 349674 URL: https://svnweb.freebsd.org/changeset/base/349674 Log: MFC r344915: powerpc: Fix cpufreq statement scoping The second statements on the lines are not guarded by the `if' condition. This triggers a warning with newer gcc. It's relatively harmless given the usage, but incorrect. Instead, wrap the statements so they're properly guarded. Modified: stable/12/sys/powerpc/cpufreq/dfs.c stable/12/sys/powerpc/cpufreq/pcr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/powerpc/cpufreq/dfs.c ============================================================================== --- stable/12/sys/powerpc/cpufreq/dfs.c Wed Jul 3 19:01:41 2019 (r349673) +++ stable/12/sys/powerpc/cpufreq/dfs.c Wed Jul 3 19:07:42 2019 (r349674) @@ -157,8 +157,10 @@ dfs_settings(device_t dev, struct cf_setting *sets, in sets[0].freq = 10000; sets[0].dev = dev; sets[1].freq = 5000; sets[1].dev = dev; - if (sc->dfs4) - sets[2].freq = 2500; sets[2].dev = dev; + if (sc->dfs4) { + sets[2].freq = 2500; + sets[2].dev = dev; + } *count = states; return (0); Modified: stable/12/sys/powerpc/cpufreq/pcr.c ============================================================================== --- stable/12/sys/powerpc/cpufreq/pcr.c Wed Jul 3 19:01:41 2019 (r349673) +++ stable/12/sys/powerpc/cpufreq/pcr.c Wed Jul 3 19:07:42 2019 (r349674) @@ -251,8 +251,10 @@ pcr_settings(device_t dev, struct cf_setting *sets, in sets[0].freq = 10000; sets[0].dev = dev; sets[1].freq = 5000; sets[1].dev = dev; - if (sc->nmodes > 2) - sets[2].freq = 2500; sets[2].dev = dev; + if (sc->nmodes > 2) { + sets[2].freq = 2500; + sets[2].dev = dev; + } *count = sc->nmodes; return (0); From owner-svn-src-all@freebsd.org Wed Jul 3 19:21:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F65315DE03F; Wed, 3 Jul 2019 19:21:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 117FE8B9DC; Wed, 3 Jul 2019 19:21: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1C5618228; Wed, 3 Jul 2019 19:21:03 +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 x63JL3qd059748; Wed, 3 Jul 2019 19:21:03 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JL3YB059747; Wed, 3 Jul 2019 19:21:03 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201907031921.x63JL3YB059747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 3 Jul 2019 19:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349675 - stable/12/sys/cddl/dev/dtrace/powerpc X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/12/sys/cddl/dev/dtrace/powerpc X-SVN-Commit-Revision: 349675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 117FE8B9DC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:21:04 -0000 Author: jhibbits Date: Wed Jul 3 19:21:03 2019 New Revision: 349675 URL: https://svnweb.freebsd.org/changeset/base/349675 Log: MFC r346173,r347943 r346173: powerpc/dtrace: Fix dtrace powerpc asm, and simplify stack walking r347943: powerpc/dtrace: Actually fix stack traces Modified: stable/12/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S stable/12/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S ============================================================================== --- stable/12/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Wed Jul 3 19:07:42 2019 (r349674) +++ stable/12/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Wed Jul 3 19:21:03 2019 (r349675) @@ -148,14 +148,19 @@ dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_ volatile uint16_t *flags) */ ASENTRY_NOPROF(dtrace_copystr) - addme %r7,%r3 - addme %r8,%r4 + subi %r7,%r3,1 + subi %r8,%r4,1 1: lbzu %r3,1(%r7) stbu %r3,1(%r8) - addme %r5,%r5 + subi %r5,%r5,1 +#ifdef __powerpc64__ + cmpldi %r5,0 +#else + cmplwi %r5,0 +#endif beq 2f - or %r3,%r3,%r3 + cmplwi %r3,0 beq 2f andi. %r0,%r5,0x0fff beq 2f @@ -174,3 +179,13 @@ ASENTRY_NOPROF(dtrace_caller) li %r3, -1 blr END(dtrace_caller) + +/* +greg_t +dtrace_getfp(void) +*/ +ASENTRY_NOPROF(dtrace_getfp) + mr %r3,%r31 + blr +END(dtrace_getfp) + Modified: stable/12/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c ============================================================================== --- stable/12/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Wed Jul 3 19:07:42 2019 (r349674) +++ stable/12/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Wed Jul 3 19:21:03 2019 (r349675) @@ -61,8 +61,10 @@ #define FRAME_OFFSET 8 #endif -#define INKERNEL(x) ((x) <= VM_MAX_KERNEL_ADDRESS && \ - (x) >= VM_MIN_KERNEL_ADDRESS) +#define INKERNEL(x) (((x) <= VM_MAX_KERNEL_ADDRESS && \ + (x) >= VM_MIN_KERNEL_ADDRESS) || \ + (PMAP_HAS_DMAP && (x) >= DMAP_BASE_ADDRESS && \ + (x) <= DMAP_MAX_ADDRESS)) static __inline int dtrace_sp_inkernel(uintptr_t sp) @@ -70,6 +72,9 @@ dtrace_sp_inkernel(uintptr_t sp) struct trapframe *frame; vm_offset_t callpc; + /* Not within the kernel, or not aligned. */ + if (!INKERNEL(sp) || (sp & 0xf) != 0) + return (0); #ifdef __powerpc64__ callpc = *(vm_offset_t *)(sp + RETURN_OFFSET64); #else @@ -84,8 +89,6 @@ dtrace_sp_inkernel(uintptr_t sp) */ if (callpc + OFFSET == (vm_offset_t) &trapexit || callpc + OFFSET == (vm_offset_t) &asttrapexit) { - if (sp == 0) - return (0); frame = (struct trapframe *)(sp + FRAME_OFFSET); return ((frame->srr1 & PSL_PR) == 0); @@ -94,11 +97,10 @@ dtrace_sp_inkernel(uintptr_t sp) return (1); } -static __inline uintptr_t -dtrace_next_sp(uintptr_t sp) +static __inline void +dtrace_next_sp_pc(uintptr_t sp, uintptr_t *nsp, uintptr_t *pc) { vm_offset_t callpc; - uintptr_t *r1; struct trapframe *frame; #ifdef __powerpc64__ @@ -115,47 +117,20 @@ dtrace_next_sp(uintptr_t sp) callpc + OFFSET == (vm_offset_t) &asttrapexit)) { /* Access the trap frame */ frame = (struct trapframe *)(sp + FRAME_OFFSET); - r1 = (uintptr_t *)frame->fixreg[1]; - if (r1 == NULL) - return (0); - return (*r1); - } - return (*(uintptr_t*)sp); -} - -static __inline uintptr_t -dtrace_get_pc(uintptr_t sp) -{ - struct trapframe *frame; - vm_offset_t callpc; - -#ifdef __powerpc64__ - callpc = *(vm_offset_t *)(sp + RETURN_OFFSET64); -#else - callpc = *(vm_offset_t *)(sp + RETURN_OFFSET); -#endif - - /* - * trapexit() and asttrapexit() are sentinels - * for kernel stack tracing. - */ - if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit)) { - /* Access the trap frame */ - frame = (struct trapframe *)(sp + FRAME_OFFSET); - return (frame->srr0); + if (nsp != NULL) + *nsp = frame->fixreg[1]; + if (pc != NULL) + *pc = frame->srr0; + return; } - return (callpc); + if (nsp != NULL) + *nsp = *(uintptr_t *)sp; + if (pc != NULL) + *pc = callpc; } -greg_t -dtrace_getfp(void) -{ - return (greg_t)__builtin_frame_address(0); -} - void dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes, uint32_t *intrpc) @@ -171,7 +146,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in aframes++; - sp = dtrace_getfp(); + sp = (uintptr_t)__builtin_frame_address(0); while (depth < pcstack_limit) { if (sp <= osp) @@ -179,7 +154,8 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in if (!dtrace_sp_inkernel(sp)) break; - callpc = dtrace_get_pc(sp); + osp = sp; + dtrace_next_sp_pc(osp, &sp, &callpc); if (aframes > 0) { aframes--; @@ -190,9 +166,6 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in else { pcstack[depth++] = callpc; } - - osp = sp; - sp = dtrace_next_sp(sp); } for (; depth < pcstack_limit; depth++) { @@ -443,7 +416,7 @@ uint64_t dtrace_getarg(int arg, int aframes) { uintptr_t val; - uintptr_t *fp = (uintptr_t *)dtrace_getfp(); + uintptr_t *fp = (uintptr_t *)__builtin_frame_address(0); uintptr_t *stack; int i; @@ -457,8 +430,8 @@ dtrace_getarg(int arg, int aframes) fp = (uintptr_t *)*fp; /* - * On ppc32 AIM, and booke, trapexit() is the immediately following - * label. On ppc64 AIM trapexit() follows a nop. + * On ppc32 trapexit() is the immediately following label. On + * ppc64 AIM trapexit() follows a nop. */ #ifdef __powerpc64__ if ((long)(fp[2]) + 4 == (long)trapexit) { @@ -531,9 +504,7 @@ dtrace_getstackdepth(int aframes) vm_offset_t callpc; osp = PAGE_SIZE; - aframes++; - sp = dtrace_getfp(); - depth++; + sp = (uintptr_t)__builtin_frame_address(0); for(;;) { if (sp <= osp) break; @@ -541,17 +512,14 @@ dtrace_getstackdepth(int aframes) if (!dtrace_sp_inkernel(sp)) break; - if (aframes == 0) - depth++; - else - aframes--; + depth++; osp = sp; - sp = dtrace_next_sp(sp); + dtrace_next_sp_pc(sp, &sp, NULL); } if (depth < aframes) return (0); - return (depth); + return (depth - aframes); } ulong_t From owner-svn-src-all@freebsd.org Wed Jul 3 19:22:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9513315DE263; Wed, 3 Jul 2019 19:22:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B83B8BC2A; Wed, 3 Jul 2019 19:22:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C7B718393; Wed, 3 Jul 2019 19:22:26 +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 x63JMPaB062874; Wed, 3 Jul 2019 19:22:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JMP8P062873; Wed, 3 Jul 2019 19:22:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031922.x63JMP8P062873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349676 - stable/12/lib/libc/gen X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/lib/libc/gen X-SVN-Commit-Revision: 349676 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3B83B8BC2A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:22:26 -0000 Author: kib Date: Wed Jul 3 19:22:25 2019 New Revision: 349676 URL: https://svnweb.freebsd.org/changeset/base/349676 Log: MFC r349297: Remove redundand 'else' and 'return'. Modified: stable/12/lib/libc/gen/libc_dlopen.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/gen/libc_dlopen.c ============================================================================== --- stable/12/lib/libc/gen/libc_dlopen.c Wed Jul 3 19:21:03 2019 (r349675) +++ stable/12/lib/libc/gen/libc_dlopen.c Wed Jul 3 19:22:25 2019 (r349676) @@ -48,8 +48,8 @@ libc_dlopen(const char *path, int mode) if (__libc_restricted_mode) { _rtld_error("Service unavailable -- libc in restricted mode"); return (NULL); - } else - return (dlopen(path, mode)); + } + return (dlopen(path, mode)); } void @@ -57,6 +57,5 @@ __FreeBSD_libc_enter_restricted_mode(void) { __libc_restricted_mode = 1; - return; } From owner-svn-src-all@freebsd.org Wed Jul 3 19:22:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D40315DE3CD; Wed, 3 Jul 2019 19:22:46 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 869528BDFF; Wed, 3 Jul 2019 19:22:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 581DB1839B; Wed, 3 Jul 2019 19:22:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63JMjbZ062944; Wed, 3 Jul 2019 19:22:45 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JMiAa062941; Wed, 3 Jul 2019 19:22:44 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201907031922.x63JMiAa062941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 3 Jul 2019 19:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349677 - in head: sys/kern tools/test/callout_free X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: in head: sys/kern tools/test/callout_free X-SVN-Commit-Revision: 349677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 869528BDFF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:22:46 -0000 Author: vangyzen Date: Wed Jul 3 19:22:44 2019 New Revision: 349677 URL: https://svnweb.freebsd.org/changeset/base/349677 Log: Save the last callout function executed on each CPU Save the last callout function pointer (and its argument) executed on each CPU for inspection by a debugger. Add a ddb `show callout_last` command to show these pointers. Add a kernel module that I used for testing that command. Relocate `ce_migration_cpu` to reduce padding and therefore preserve the size of `struct callout_cpu` (320 bytes on amd64) despite the added members. This should help diagnose reference-after-free bugs where the callout's mutex has already been freed when `softclock_call_cc` tries to unlock it. You might hope that the pointer would still be available, but it isn't. The argument to that function is on the stack (because `softclock_call_cc` uses it later), and that might be enough in some cases, but even then, it's very laborious. A pointer to the callout is saved right before these newly added fields, but that callout might have been freed. We still have the pointer to its associated mutex, and the name within might be enough, but it might also have been freed. Reviewed by: markj jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20794 Added: head/tools/test/callout_free/ head/tools/test/callout_free/Makefile (contents, props changed) head/tools/test/callout_free/callout_free.c (contents, props changed) Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Wed Jul 3 19:22:25 2019 (r349676) +++ head/sys/kern/kern_timeout.c Wed Jul 3 19:22:44 2019 (r349677) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #ifdef DDB #include +#include #include #endif @@ -143,12 +144,14 @@ u_int callwheelsize, callwheelmask; struct cc_exec { struct callout *cc_curr; void (*cc_drain)(void *); + void *cc_last_func; + void *cc_last_arg; #ifdef SMP void (*ce_migration_func)(void *); void *ce_migration_arg; - int ce_migration_cpu; sbintime_t ce_migration_time; sbintime_t ce_migration_prec; + int ce_migration_cpu; #endif bool cc_cancel; bool cc_waiting; @@ -177,6 +180,8 @@ struct callout_cpu { #define callout_migrating(c) ((c)->c_iflags & CALLOUT_DFRMIGRATION) #define cc_exec_curr(cc, dir) cc->cc_exec_entity[dir].cc_curr +#define cc_exec_last_func(cc, dir) cc->cc_exec_entity[dir].cc_last_func +#define cc_exec_last_arg(cc, dir) cc->cc_exec_entity[dir].cc_last_arg #define cc_exec_drain(cc, dir) cc->cc_exec_entity[dir].cc_drain #define cc_exec_next(cc) cc->cc_next #define cc_exec_cancel(cc, dir) cc->cc_exec_entity[dir].cc_cancel @@ -686,6 +691,8 @@ softclock_call_cc(struct callout *c, struct callout_cp c->c_iflags &= ~CALLOUT_PENDING; cc_exec_curr(cc, direct) = c; + cc_exec_last_func(cc, direct) = c_func; + cc_exec_last_arg(cc, direct) = c_arg; cc_exec_cancel(cc, direct) = false; cc_exec_drain(cc, direct) = NULL; CC_UNLOCK(cc); @@ -1669,5 +1676,43 @@ DB_SHOW_COMMAND(callout, db_show_callout) } _show_callout((struct callout *)addr); +} + +static void +_show_last_callout(int cpu, int direct, const char *dirstr) +{ + struct callout_cpu *cc; + void *func, *arg; + + cc = CC_CPU(cpu); + func = cc_exec_last_func(cc, direct); + arg = cc_exec_last_arg(cc, direct); + db_printf("cpu %d last%s callout function: %p ", cpu, dirstr, func); + db_printsym((db_expr_t)func, DB_STGY_ANY); + db_printf("\ncpu %d last%s callout argument: %p\n", cpu, dirstr, arg); +} + +DB_SHOW_COMMAND(callout_last, db_show_callout_last) +{ + int cpu, last; + + if (have_addr) { + if (addr < 0 || addr > mp_maxid || CPU_ABSENT(addr)) { + db_printf("no such cpu: %d\n", (int)addr); + return; + } + cpu = last = addr; + } else { + cpu = 0; + last = mp_maxid; + } + + while (cpu <= last) { + if (!CPU_ABSENT(cpu)) { + _show_last_callout(cpu, 0, ""); + _show_last_callout(cpu, 1, " direct"); + } + cpu++; + } } #endif /* DDB */ Added: head/tools/test/callout_free/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/callout_free/Makefile Wed Jul 3 19:22:44 2019 (r349677) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +KMOD= callout_free +SRCS= callout_free.c + +.include Added: head/tools/test/callout_free/callout_free.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/callout_free/callout_free.c Wed Jul 3 19:22:44 2019 (r349677) @@ -0,0 +1,87 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Eric van Gyzen + * + * 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$ + */ + +/* + * Free a pending callout. This was useful for testing the + * "show callout_last" ddb command. + */ + +#include +#include +#include +#include +#include +#include +#include + +static struct callout callout_free; +static struct mtx callout_free_mutex; +static int callout_free_arg; + +static void +callout_free_func(void *arg) +{ + printf("squirrel!\n"); + mtx_destroy(&callout_free_mutex); + memset(&callout_free, 'C', sizeof(callout_free)); +} + +static int +callout_free_load(module_t mod, int cmd, void *arg) +{ + int error; + + switch (cmd) { + case MOD_LOAD: + mtx_init(&callout_free_mutex, "callout_free", NULL, MTX_DEF); + /* + * Do not pass CALLOUT_RETURNUNLOCKED so the callout + * subsystem will unlock the "destroyed" mutex. + */ + callout_init_mtx(&callout_free, &callout_free_mutex, 0); + printf("callout_free_func = %p\n", callout_free_func); + printf("callout_free_arg = %p\n", &callout_free_arg); + callout_reset(&callout_free, hz/10, callout_free_func, + &callout_free_arg); + error = 0; + break; + + case MOD_UNLOAD: + error = 0; + break; + + default: + error = EOPNOTSUPP; + break; + } + + return (error); +} + +DEV_MODULE(callout_free, callout_free_load, NULL); From owner-svn-src-all@freebsd.org Wed Jul 3 19:23:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B94C615DE4B4; Wed, 3 Jul 2019 19:23:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59A3A8BF4F; Wed, 3 Jul 2019 19:23:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35DFD183A2; Wed, 3 Jul 2019 19:23:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63JNLLj063027; Wed, 3 Jul 2019 19:23:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JNLKI063026; Wed, 3 Jul 2019 19:23:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031923.x63JNLKI063026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349678 - stable/11/lib/libc/gen X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libc/gen X-SVN-Commit-Revision: 349678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 59A3A8BF4F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:23:21 -0000 Author: kib Date: Wed Jul 3 19:23:20 2019 New Revision: 349678 URL: https://svnweb.freebsd.org/changeset/base/349678 Log: MFC r349297: Remove redundand 'else' and 'return'. Modified: stable/11/lib/libc/gen/libc_dlopen.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/libc_dlopen.c ============================================================================== --- stable/11/lib/libc/gen/libc_dlopen.c Wed Jul 3 19:22:44 2019 (r349677) +++ stable/11/lib/libc/gen/libc_dlopen.c Wed Jul 3 19:23:20 2019 (r349678) @@ -47,8 +47,8 @@ libc_dlopen(const char *path, int mode) if (__libc_restricted_mode) { _rtld_error("Service unavailable -- libc in restricted mode"); return (NULL); - } else - return (dlopen(path, mode)); + } + return (dlopen(path, mode)); } void @@ -56,6 +56,5 @@ __FreeBSD_libc_enter_restricted_mode(void) { __libc_restricted_mode = 1; - return; } From owner-svn-src-all@freebsd.org Wed Jul 3 19:24:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD43615DE5BA; Wed, 3 Jul 2019 19:24:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E2998C14B; Wed, 3 Jul 2019 19:24:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D14A183A3; Wed, 3 Jul 2019 19:24:52 +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 x63JOphj063138; Wed, 3 Jul 2019 19:24:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JOp9H063134; Wed, 3 Jul 2019 19:24:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031924.x63JOp9H063134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349679 - in stable/12/lib: libc/gen libc/include libthr/thread X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/lib: libc/gen libc/include libthr/thread X-SVN-Commit-Revision: 349679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E2998C14B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:24:52 -0000 Author: kib Date: Wed Jul 3 19:24:50 2019 New Revision: 349679 URL: https://svnweb.freebsd.org/changeset/base/349679 Log: MFC r349299: Add libc stub for pthread_getthreadid_np(3). PR: 238650 Modified: stable/12/lib/libc/gen/Symbol.map stable/12/lib/libc/gen/_pthread_stubs.c stable/12/lib/libc/include/libc_private.h stable/12/lib/libthr/thread/thr_init.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/gen/Symbol.map ============================================================================== --- stable/12/lib/libc/gen/Symbol.map Wed Jul 3 19:23:20 2019 (r349678) +++ stable/12/lib/libc/gen/Symbol.map Wed Jul 3 19:24:50 2019 (r349679) @@ -338,6 +338,7 @@ FBSD_1.2 { getutxid; getutxline; getutxuser; + pthread_getthreadid_np; pututxline; sem_close; sem_destroy; Modified: stable/12/lib/libc/gen/_pthread_stubs.c ============================================================================== --- stable/12/lib/libc/gen/_pthread_stubs.c Wed Jul 3 19:23:20 2019 (r349678) +++ stable/12/lib/libc/gen/_pthread_stubs.c Wed Jul 3 19:24:50 2019 (r349679) @@ -130,6 +130,7 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEX_CONSISTENT */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEXATTR_GETROBUST */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEXATTR_SETROBUST */ + {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_GETTHREADID_NP */ }; /* @@ -248,6 +249,7 @@ STUB_FUNC1(pthread_rwlock_trywrlock, PJT_RWLOCK_TRYWRL STUB_FUNC1(pthread_rwlock_unlock, PJT_RWLOCK_UNLOCK, int, void *) STUB_FUNC1(pthread_rwlock_wrlock, PJT_RWLOCK_WRLOCK, int, void *) STUB_FUNC(pthread_self, PJT_SELF, pthread_t) +STUB_FUNC(pthread_getthreadid_np, PJT_GETTHREADID_NP, int) STUB_FUNC2(pthread_setspecific, PJT_SETSPECIFIC, int, pthread_key_t, void *) STUB_FUNC3(pthread_sigmask, PJT_SIGMASK, int, int, void *, void *) STUB_FUNC3(pthread_atfork, PJT_ATFORK, int, void *, void *, void*) Modified: stable/12/lib/libc/include/libc_private.h ============================================================================== --- stable/12/lib/libc/include/libc_private.h Wed Jul 3 19:23:20 2019 (r349678) +++ stable/12/lib/libc/include/libc_private.h Wed Jul 3 19:24:50 2019 (r349679) @@ -176,6 +176,7 @@ typedef enum { PJT_MUTEX_CONSISTENT, PJT_MUTEXATTR_GETROBUST, PJT_MUTEXATTR_SETROBUST, + PJT_GETTHREADID_NP, PJT_MAX } pjt_index_t; Modified: stable/12/lib/libthr/thread/thr_init.c ============================================================================== --- stable/12/lib/libthr/thread/thr_init.c Wed Jul 3 19:23:20 2019 (r349678) +++ stable/12/lib/libthr/thread/thr_init.c Wed Jul 3 19:24:50 2019 (r349679) @@ -272,6 +272,7 @@ static pthread_func_t jmp_table[][2] = { {DUAL_ENTRY(_pthread_mutex_consistent)},/* PJT_MUTEX_CONSISTENT */ {DUAL_ENTRY(_pthread_mutexattr_getrobust)},/* PJT_MUTEXATTR_GETROBUST */ {DUAL_ENTRY(_pthread_mutexattr_setrobust)},/* PJT_MUTEXATTR_SETROBUST */ + {DUAL_ENTRY(_pthread_getthreadid_np)}, /* PJT_GETTHREADID_NP */ }; static int init_once = 0; From owner-svn-src-all@freebsd.org Wed Jul 3 19:25:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAF4C15DE63D; Wed, 3 Jul 2019 19:25:58 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65E0F8C28F; Wed, 3 Jul 2019 19:25:58 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 426CD183A5; Wed, 3 Jul 2019 19:25:58 +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 x63JPwcU063272; Wed, 3 Jul 2019 19:25:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JPwQU063271; Wed, 3 Jul 2019 19:25:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201907031925.x63JPwQU063271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 3 Jul 2019 19:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349680 - stable/12/sys/powerpc/booke X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/12/sys/powerpc/booke X-SVN-Commit-Revision: 349680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 65E0F8C28F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:25:59 -0000 Author: jhibbits Date: Wed Jul 3 19:25:57 2019 New Revision: 349680 URL: https://svnweb.freebsd.org/changeset/base/349680 Log: MFC r347167,r348079 Book-E pmap r347167: powerpc/booke: Use #ifdef __powerpc64__ instead of hw_direct_map in places r348079: powerpc/booke: Use wrtee instead of msr to restore EE bit Modified: stable/12/sys/powerpc/booke/pmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/powerpc/booke/pmap.c ============================================================================== --- stable/12/sys/powerpc/booke/pmap.c Wed Jul 3 19:24:50 2019 (r349679) +++ stable/12/sys/powerpc/booke/pmap.c Wed Jul 3 19:25:57 2019 (r349680) @@ -2973,19 +2973,19 @@ mmu_booke_zero_page_area(mmu_t mmu, vm_page_t m, int o /* XXX KASSERT off and size are within a single page? */ - if (hw_direct_map) { - va = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); - bzero((caddr_t)va + off, size); - } else { - mtx_lock(&zero_page_mutex); - va = zero_page_va; +#ifdef __powerpc64__ + va = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); + bzero((caddr_t)va + off, size); +#else + mtx_lock(&zero_page_mutex); + va = zero_page_va; - mmu_booke_kenter(mmu, va, VM_PAGE_TO_PHYS(m)); - bzero((caddr_t)va + off, size); - mmu_booke_kremove(mmu, va); + mmu_booke_kenter(mmu, va, VM_PAGE_TO_PHYS(m)); + bzero((caddr_t)va + off, size); + mmu_booke_kremove(mmu, va); - mtx_unlock(&zero_page_mutex); - } + mtx_unlock(&zero_page_mutex); +#endif } /* @@ -2996,23 +2996,24 @@ mmu_booke_zero_page(mmu_t mmu, vm_page_t m) { vm_offset_t off, va; - if (hw_direct_map) { - va = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); - } else { - va = zero_page_va; - mtx_lock(&zero_page_mutex); +#ifdef __powerpc64__ + va = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); - mmu_booke_kenter(mmu, va, VM_PAGE_TO_PHYS(m)); - } + for (off = 0; off < PAGE_SIZE; off += cacheline_size) + __asm __volatile("dcbz 0,%0" :: "r"(va + off)); +#else + va = zero_page_va; + mtx_lock(&zero_page_mutex); + mmu_booke_kenter(mmu, va, VM_PAGE_TO_PHYS(m)); + for (off = 0; off < PAGE_SIZE; off += cacheline_size) __asm __volatile("dcbz 0,%0" :: "r"(va + off)); - if (!hw_direct_map) { - mmu_booke_kremove(mmu, va); + mmu_booke_kremove(mmu, va); - mtx_unlock(&zero_page_mutex); - } + mtx_unlock(&zero_page_mutex); +#endif } /* @@ -3025,23 +3026,23 @@ mmu_booke_copy_page(mmu_t mmu, vm_page_t sm, vm_page_t { vm_offset_t sva, dva; +#ifdef __powerpc64__ + sva = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(sm)); + dva = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dm)); + memcpy((caddr_t)dva, (caddr_t)sva, PAGE_SIZE); +#else + mtx_lock(©_page_mutex); + mmu_booke_kenter(mmu, sva, VM_PAGE_TO_PHYS(sm)); + mmu_booke_kenter(mmu, dva, VM_PAGE_TO_PHYS(dm)); sva = copy_page_src_va; dva = copy_page_dst_va; - if (hw_direct_map) { - sva = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(sm)); - dva = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dm)); - } else { - mtx_lock(©_page_mutex); - mmu_booke_kenter(mmu, sva, VM_PAGE_TO_PHYS(sm)); - mmu_booke_kenter(mmu, dva, VM_PAGE_TO_PHYS(dm)); - } memcpy((caddr_t)dva, (caddr_t)sva, PAGE_SIZE); - if (!hw_direct_map) { - mmu_booke_kremove(mmu, dva); - mmu_booke_kremove(mmu, sva); - mtx_unlock(©_page_mutex); - } + + mmu_booke_kremove(mmu, dva); + mmu_booke_kremove(mmu, sva); + mtx_unlock(©_page_mutex); +#endif } static inline void @@ -3052,39 +3053,55 @@ mmu_booke_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offs vm_offset_t a_pg_offset, b_pg_offset; int cnt; - if (hw_direct_map) { - a_cp = (caddr_t)((uintptr_t)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*ma)) + - a_offset); - b_cp = (caddr_t)((uintptr_t)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*mb)) + - b_offset); - bcopy(a_cp, b_cp, xfersize); - } else { - mtx_lock(©_page_mutex); - while (xfersize > 0) { - a_pg_offset = a_offset & PAGE_MASK; - cnt = min(xfersize, PAGE_SIZE - a_pg_offset); - mmu_booke_kenter(mmu, copy_page_src_va, - VM_PAGE_TO_PHYS(ma[a_offset >> PAGE_SHIFT])); - a_cp = (char *)copy_page_src_va + a_pg_offset; - b_pg_offset = b_offset & PAGE_MASK; - cnt = min(cnt, PAGE_SIZE - b_pg_offset); - mmu_booke_kenter(mmu, copy_page_dst_va, - VM_PAGE_TO_PHYS(mb[b_offset >> PAGE_SHIFT])); - b_cp = (char *)copy_page_dst_va + b_pg_offset; - bcopy(a_cp, b_cp, cnt); - mmu_booke_kremove(mmu, copy_page_dst_va); - mmu_booke_kremove(mmu, copy_page_src_va); - a_offset += cnt; - b_offset += cnt; - xfersize -= cnt; - } - mtx_unlock(©_page_mutex); +#ifdef __powerpc64__ + vm_page_t pa, pb; + + while (xfersize > 0) { + a_pg_offset = a_offset & PAGE_MASK; + pa = ma[a_offset >> PAGE_SHIFT]; + b_pg_offset = b_offset & PAGE_MASK; + pb = mb[b_offset >> PAGE_SHIFT]; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + a_cp = (caddr_t)((uintptr_t)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pa)) + + a_pg_offset); + b_cp = (caddr_t)((uintptr_t)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pb)) + + b_pg_offset); + bcopy(a_cp, b_cp, cnt); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; } +#else + mtx_lock(©_page_mutex); + while (xfersize > 0) { + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + mmu_booke_kenter(mmu, copy_page_src_va, + VM_PAGE_TO_PHYS(ma[a_offset >> PAGE_SHIFT])); + a_cp = (char *)copy_page_src_va + a_pg_offset; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + mmu_booke_kenter(mmu, copy_page_dst_va, + VM_PAGE_TO_PHYS(mb[b_offset >> PAGE_SHIFT])); + b_cp = (char *)copy_page_dst_va + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + mmu_booke_kremove(mmu, copy_page_dst_va); + mmu_booke_kremove(mmu, copy_page_src_va); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } + mtx_unlock(©_page_mutex); +#endif } static vm_offset_t mmu_booke_quick_enter_page(mmu_t mmu, vm_page_t m) { +#ifdef __powerpc64__ + return (PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m))); +#else vm_paddr_t paddr; vm_offset_t qaddr; uint32_t flags; @@ -3092,9 +3109,6 @@ mmu_booke_quick_enter_page(mmu_t mmu, vm_page_t m) paddr = VM_PAGE_TO_PHYS(m); - if (hw_direct_map) - return (PHYS_TO_DMAP(paddr)); - flags = PTE_SR | PTE_SW | PTE_SX | PTE_WIRED | PTE_VALID; flags |= tlb_calc_wimg(paddr, pmap_page_get_memattr(m)) << PTE_MAS2_SHIFT; flags |= PTE_PS_4KB; @@ -3121,16 +3135,15 @@ mmu_booke_quick_enter_page(mmu_t mmu, vm_page_t m) __syncicache((void *)qaddr, PAGE_SIZE); return (qaddr); +#endif } static void mmu_booke_quick_remove_page(mmu_t mmu, vm_offset_t addr) { +#ifndef __powerpc64__ pte_t *pte; - if (hw_direct_map) - return; - pte = pte_find(mmu, kernel_pmap, addr); KASSERT(PCPU_GET(qmap_addr) == addr, @@ -3140,6 +3153,7 @@ mmu_booke_quick_remove_page(mmu_t mmu, vm_offset_t add *pte = 0; critical_exit(); +#endif } /* @@ -3890,7 +3904,7 @@ tlb1_read_entry(tlb_entry_t *entry, unsigned int slot) entry->mas7 = 0; break; } - mtmsr(msr); + __asm __volatile("wrtee %0" :: "r"(msr)); entry->virt = entry->mas2 & MAS2_EPN_MASK; entry->phys = ((vm_paddr_t)(entry->mas7 & MAS7_RPN) << 32) | @@ -3965,7 +3979,7 @@ tlb1_write_entry(tlb_entry_t *e, unsigned int idx) msr = mfmsr(); __asm __volatile("wrteei 0"); tlb1_write_entry_int(&args); - mtmsr(msr); + __asm __volatile("wrtee %0" :: "r"(msr)); } } @@ -4364,7 +4378,7 @@ tid_flush(tlbtid_t tid) mtspr(SPR_MAS6, tid << MAS6_SPID0_SHIFT); /* tlbilxpid */ __asm __volatile("isync; .long 0x7c000024; isync; msync"); - mtmsr(msr); + __asm __volatile("wrtee %0" :: "r"(msr)); return; } @@ -4389,7 +4403,7 @@ tid_flush(tlbtid_t tid) mtspr(SPR_MAS1, mas1); __asm __volatile("isync; tlbwe; isync; msync"); } - mtmsr(msr); + __asm __volatile("wrtee %0" :: "r"(msr)); } #ifdef DDB From owner-svn-src-all@freebsd.org Wed Jul 3 19:27:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6A2115DE72B; Wed, 3 Jul 2019 19:27:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D01F8C419; Wed, 3 Jul 2019 19:27:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46502183A6; Wed, 3 Jul 2019 19:27:35 +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 x63JRZ0i063405; Wed, 3 Jul 2019 19:27:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JRZ1n063404; Wed, 3 Jul 2019 19:27:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031927.x63JRZ1n063404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349681 - stable/12/sys/amd64/amd64 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/amd64/amd64 X-SVN-Commit-Revision: 349681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6D01F8C419 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:27:36 -0000 Author: kib Date: Wed Jul 3 19:27:34 2019 New Revision: 349681 URL: https://svnweb.freebsd.org/changeset/base/349681 Log: MFC r349427: amd64 pmap: Fix pkru handling in pmap_remove(). Modified: stable/12/sys/amd64/amd64/pmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/pmap.c ============================================================================== --- stable/12/sys/amd64/amd64/pmap.c Wed Jul 3 19:25:57 2019 (r349680) +++ stable/12/sys/amd64/amd64/pmap.c Wed Jul 3 19:27:34 2019 (r349681) @@ -4533,6 +4533,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t pmap_delayed_invl_started(); PMAP_LOCK(pmap); + pmap_pkru_on_remove(pmap, sva, eva); /* * special handling of removing one page. a very @@ -4626,7 +4627,6 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t out: if (anyvalid) pmap_invalidate_all(pmap); - pmap_pkru_on_remove(pmap, sva, eva); PMAP_UNLOCK(pmap); pmap_delayed_invl_finished(); vm_page_free_pages_toq(&free, true); From owner-svn-src-all@freebsd.org Wed Jul 3 19:28:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADEE415DE7B0; Wed, 3 Jul 2019 19:28:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 524878C581; Wed, 3 Jul 2019 19:28:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 010CE183A7; Wed, 3 Jul 2019 19:28:48 +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 x63JSlG2063512; Wed, 3 Jul 2019 19:28:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JSlZf063511; Wed, 3 Jul 2019 19:28:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031928.x63JSlZf063511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349682 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 349682 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 524878C581 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:28:48 -0000 Author: kib Date: Wed Jul 3 19:28:47 2019 New Revision: 349682 URL: https://svnweb.freebsd.org/changeset/base/349682 Log: MFC r349511: Typo. Modified: stable/12/lib/libc/sys/procctl.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/procctl.2 ============================================================================== --- stable/12/lib/libc/sys/procctl.2 Wed Jul 3 19:27:34 2019 (r349681) +++ stable/12/lib/libc/sys/procctl.2 Wed Jul 3 19:28:47 2019 (r349682) @@ -91,7 +91,7 @@ The image flag and set-uid might prevent ASLR enableme .It Dv PROC_ASLR_FORCE_DISABLE Request that ASLR is disabled after execution. Same notes as for -.Dv PROC_ASKR_FORCE_ENABLE +.Dv PROC_ASLR_FORCE_ENABLE apply. .It Dv PROC_ASLR_NOFORCE Use system-wide configured policy for ASLR. From owner-svn-src-all@freebsd.org Wed Jul 3 19:29:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DDAC15DE84A; Wed, 3 Jul 2019 19:29:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 432C78C6EC; Wed, 3 Jul 2019 19:29:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19DB2183A8; Wed, 3 Jul 2019 19:29:54 +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 x63JTrEm063612; Wed, 3 Jul 2019 19:29:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JTr1T063611; Wed, 3 Jul 2019 19:29:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031929.x63JTr1T063611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349683 - stable/12/usr.bin/proccontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/usr.bin/proccontrol X-SVN-Commit-Revision: 349683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 432C78C6EC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:29:54 -0000 Author: kib Date: Wed Jul 3 19:29:53 2019 New Revision: 349683 URL: https://svnweb.freebsd.org/changeset/base/349683 Log: MFC r349512: Mention proccontrol(1) -m kpti. Modified: stable/12/usr.bin/proccontrol/proccontrol.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/proccontrol/proccontrol.1 ============================================================================== --- stable/12/usr.bin/proccontrol/proccontrol.1 Wed Jul 3 19:28:47 2019 (r349682) +++ stable/12/usr.bin/proccontrol/proccontrol.1 Wed Jul 3 19:29:53 2019 (r349683) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2019 +.Dd June 28, 2019 .Dt PROCCONTROL 1 .Os .Sh NAME @@ -66,6 +66,8 @@ Note that process is only allowed to enable tracing fo not for any other process. .It Ar trapcap Controls the signalling of capability mode access violations. +.It Ar kpti +Controls the KPTI enable, AMD64 only. .El .Pp The From owner-svn-src-all@freebsd.org Wed Jul 3 19:31:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4C7615DE93E; Wed, 3 Jul 2019 19:31:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78CCF8CACE; Wed, 3 Jul 2019 19:31:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55275184EE; Wed, 3 Jul 2019 19:31:12 +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 x63JVCXg065411; Wed, 3 Jul 2019 19:31:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JVC8P065409; Wed, 3 Jul 2019 19:31:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031931.x63JVC8P065409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349684 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 349684 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 78CCF8CACE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:31:13 -0000 Author: kib Date: Wed Jul 3 19:31:11 2019 New Revision: 349684 URL: https://svnweb.freebsd.org/changeset/base/349684 Log: MFC r349519: Style. Modified: stable/12/sys/kern/kern_umtx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_umtx.c ============================================================================== --- stable/12/sys/kern/kern_umtx.c Wed Jul 3 19:29:53 2019 (r349683) +++ stable/12/sys/kern/kern_umtx.c Wed Jul 3 19:31:11 2019 (r349684) @@ -2624,7 +2624,8 @@ do_cv_broadcast(struct thread *td, struct ucond *cv) } static int -do_rw_rdlock(struct thread *td, struct urwlock *rwlock, long fflag, struct _umtx_time *timeout) +do_rw_rdlock(struct thread *td, struct urwlock *rwlock, long fflag, + struct _umtx_time *timeout) { struct abs_timeout timo; struct umtx_q *uq; From owner-svn-src-all@freebsd.org Wed Jul 3 19:31:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A4E715DE9B8; Wed, 3 Jul 2019 19:31:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F6268CC40; Wed, 3 Jul 2019 19:31:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C50118516; Wed, 3 Jul 2019 19:31:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63JVllV065949; Wed, 3 Jul 2019 19:31:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JVltc065933; Wed, 3 Jul 2019 19:31:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031931.x63JVltc065933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349685 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 349685 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F6268CC40 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:31:48 -0000 Author: kib Date: Wed Jul 3 19:31:47 2019 New Revision: 349685 URL: https://svnweb.freebsd.org/changeset/base/349685 Log: MFC r349519: Style. Modified: stable/11/sys/kern/kern_umtx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_umtx.c ============================================================================== --- stable/11/sys/kern/kern_umtx.c Wed Jul 3 19:31:11 2019 (r349684) +++ stable/11/sys/kern/kern_umtx.c Wed Jul 3 19:31:47 2019 (r349685) @@ -2631,7 +2631,8 @@ do_cv_broadcast(struct thread *td, struct ucond *cv) } static int -do_rw_rdlock(struct thread *td, struct urwlock *rwlock, long fflag, struct _umtx_time *timeout) +do_rw_rdlock(struct thread *td, struct urwlock *rwlock, long fflag, + struct _umtx_time *timeout) { struct abs_timeout timo; struct umtx_q *uq; From owner-svn-src-all@freebsd.org Wed Jul 3 19:32:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67D3A15DEA39; Wed, 3 Jul 2019 19:32:27 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 099438CE04; Wed, 3 Jul 2019 19:32:27 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB4B018550; Wed, 3 Jul 2019 19:32:26 +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 x63JWQqC068562; Wed, 3 Jul 2019 19:32:26 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JWQN9068558; Wed, 3 Jul 2019 19:32:26 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201907031932.x63JWQN9068558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 3 Jul 2019 19:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349686 - in stable/12/sys/powerpc: aim include powerpc X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in stable/12/sys/powerpc: aim include powerpc X-SVN-Commit-Revision: 349686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 099438CE04 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:32:27 -0000 Author: jhibbits Date: Wed Jul 3 19:32:25 2019 New Revision: 349686 URL: https://svnweb.freebsd.org/changeset/base/349686 Log: MFC r346777: powerpc: Add POWER8NVL definition The POWER8NVL (POWER8 NVLink) architecturally behaves identically to the POWER8, with a different PVR identifier. Mark it as such, so it shows up appropriately to the user. Reported by: Alexey Kardashevskiy Modified: stable/12/sys/powerpc/aim/aim_machdep.c stable/12/sys/powerpc/aim/mp_cpudep.c stable/12/sys/powerpc/include/spr.h stable/12/sys/powerpc/powerpc/cpu.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/powerpc/aim/aim_machdep.c ============================================================================== --- stable/12/sys/powerpc/aim/aim_machdep.c Wed Jul 3 19:31:47 2019 (r349685) +++ stable/12/sys/powerpc/aim/aim_machdep.c Wed Jul 3 19:32:25 2019 (r349686) @@ -213,6 +213,7 @@ aim_early_init(vm_offset_t fdt, vm_offset_t toc, vm_of case IBMPOWER7PLUS: case IBMPOWER8: case IBMPOWER8E: + case IBMPOWER8NVL: case IBMPOWER9: /* XXX: get from ibm,slb-size in device tree */ n_slbs = 32; Modified: stable/12/sys/powerpc/aim/mp_cpudep.c ============================================================================== --- stable/12/sys/powerpc/aim/mp_cpudep.c Wed Jul 3 19:31:47 2019 (r349685) +++ stable/12/sys/powerpc/aim/mp_cpudep.c Wed Jul 3 19:32:25 2019 (r349686) @@ -89,6 +89,7 @@ cpudep_ap_early_bootstrap(void) break; case IBMPOWER8: case IBMPOWER8E: + case IBMPOWER8NVL: case IBMPOWER9: #ifdef __powerpc64__ if (mfmsr() & PSL_HV) { @@ -398,6 +399,7 @@ cpudep_ap_setup() case IBMPOWER7PLUS: case IBMPOWER8: case IBMPOWER8E: + case IBMPOWER8NVL: case IBMPOWER9: #ifdef __powerpc64__ if (mfmsr() & PSL_HV) { Modified: stable/12/sys/powerpc/include/spr.h ============================================================================== --- stable/12/sys/powerpc/include/spr.h Wed Jul 3 19:31:47 2019 (r349685) +++ stable/12/sys/powerpc/include/spr.h Wed Jul 3 19:32:25 2019 (r349686) @@ -188,6 +188,7 @@ #define IBMPOWERPCA2 0x0049 #define IBMPOWER7PLUS 0x004a #define IBMPOWER8E 0x004b +#define IBMPOWER8NVL 0x004c #define IBMPOWER8 0x004d #define IBMPOWER9 0x004e #define MPC860 0x0050 Modified: stable/12/sys/powerpc/powerpc/cpu.c ============================================================================== --- stable/12/sys/powerpc/powerpc/cpu.c Wed Jul 3 19:31:47 2019 (r349685) +++ stable/12/sys/powerpc/powerpc/cpu.c Wed Jul 3 19:32:25 2019 (r349686) @@ -171,6 +171,13 @@ static const struct cputab models[] = { PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HTM | PPC_FEATURE2_DSCR | PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | PPC_FEATURE2_HAS_VEC_CRYPTO | PPC_FEATURE2_HTM_NOSC, cpu_powerx_setup }, + { "IBM POWER8NVL", IBMPOWER8NVL, REVFMT_MAJMIN, + PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | PPC_FEATURE_ARCH_2_05 | + PPC_FEATURE_ARCH_2_06 | PPC_FEATURE_HAS_VSX | PPC_FEATURE_TRUE_LE, + PPC_FEATURE2_ARCH_2_07 | PPC_FEATURE2_HTM | PPC_FEATURE2_DSCR | + PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | PPC_FEATURE2_HAS_VEC_CRYPTO | + PPC_FEATURE2_HTM_NOSC, cpu_powerx_setup }, { "IBM POWER8", IBMPOWER8, REVFMT_MAJMIN, PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | PPC_FEATURE_ARCH_2_05 | @@ -666,6 +673,7 @@ cpu_powerx_setup(int cpuid, uint16_t vers) switch (vers) { case IBMPOWER8: case IBMPOWER8E: + case IBMPOWER8NVL: cpu_idle_hook = cpu_idle_powerx; mtspr(SPR_LPCR, mfspr(SPR_LPCR) | LPCR_PECE_WAKESET); isync(); From owner-svn-src-all@freebsd.org Wed Jul 3 19:34:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E066E15DEC1D; Wed, 3 Jul 2019 19:34:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84EB48CFA0; Wed, 3 Jul 2019 19:34:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55EF818558; Wed, 3 Jul 2019 19:34:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63JYIP7068728; Wed, 3 Jul 2019 19:34:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JYIRh068727; Wed, 3 Jul 2019 19:34:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031934.x63JYIRh068727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349687 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 349687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 84EB48CFA0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:34:19 -0000 Author: kib Date: Wed Jul 3 19:34:17 2019 New Revision: 349687 URL: https://svnweb.freebsd.org/changeset/base/349687 Log: MFC r349320, r349324: coredump: avoid writing to core files not owned by the effective user. PR: 68905 admbugs: 358 Modified: stable/12/sys/kern/kern_sig.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_sig.c ============================================================================== --- stable/12/sys/kern/kern_sig.c Wed Jul 3 19:32:25 2019 (r349686) +++ stable/12/sys/kern/kern_sig.c Wed Jul 3 19:34:17 2019 (r349687) @@ -3400,10 +3400,16 @@ corefile_open_last(struct thread *td, char *name, int } if (oldvp != NULL) { - if (nextvp == NULL) - nextvp = oldvp; - else + if (nextvp == NULL) { + if ((td->td_proc->p_flag & P_SUGID) != 0) { + error = EFAULT; + vnode_close_locked(td, oldvp); + } else { + nextvp = oldvp; + } + } else { vnode_close_locked(td, oldvp); + } } if (error != 0) { if (nextvp != NULL) @@ -3523,6 +3529,8 @@ corefile_open(const char *comm, uid_t uid, pid_t pid, oflags = VN_OPEN_NOAUDIT | VN_OPEN_NAMECACHE | (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0); flags = O_CREAT | FWRITE | O_NOFOLLOW; + if ((td->td_proc->p_flag & P_SUGID) != 0) + flags |= O_EXCL; NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td); error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, @@ -3599,10 +3607,11 @@ coredump(struct thread *td) /* * Don't dump to non-regular files or files with links. - * Do not dump into system files. + * Do not dump into system files. Effective user must own the corefile. */ if (vp->v_type != VREG || VOP_GETATTR(vp, &vattr, cred) != 0 || - vattr.va_nlink != 1 || (vp->v_vflag & VV_SYSTEM) != 0) { + vattr.va_nlink != 1 || (vp->v_vflag & VV_SYSTEM) != 0 || + vattr.va_uid != cred->cr_uid) { VOP_UNLOCK(vp, 0); error = EFAULT; goto out; From owner-svn-src-all@freebsd.org Wed Jul 3 19:42:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0099915DEF0F; Wed, 3 Jul 2019 19:42:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99CCA8D694; Wed, 3 Jul 2019 19:42: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5BB981870E; Wed, 3 Jul 2019 19:42: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 x63Jgbsa074028; Wed, 3 Jul 2019 19:42:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JgajB074025; Wed, 3 Jul 2019 19:42:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031942.x63JgajB074025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349688 - in stable/11/lib: libc/gen libc/include libthr/thread X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/lib: libc/gen libc/include libthr/thread X-SVN-Commit-Revision: 349688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 99CCA8D694 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:42:38 -0000 Author: kib Date: Wed Jul 3 19:42:36 2019 New Revision: 349688 URL: https://svnweb.freebsd.org/changeset/base/349688 Log: MFC r349299: Add libc stub for pthread_getthreadid_np(3). PR: 238650 Modified: stable/11/lib/libc/gen/Symbol.map stable/11/lib/libc/gen/_pthread_stubs.c stable/11/lib/libc/include/libc_private.h stable/11/lib/libthr/thread/thr_init.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/Symbol.map ============================================================================== --- stable/11/lib/libc/gen/Symbol.map Wed Jul 3 19:34:17 2019 (r349687) +++ stable/11/lib/libc/gen/Symbol.map Wed Jul 3 19:42:36 2019 (r349688) @@ -365,6 +365,7 @@ FBSD_1.2 { getutxid; getutxline; getutxuser; + pthread_getthreadid_np; pututxline; sem_close; sem_destroy; Modified: stable/11/lib/libc/gen/_pthread_stubs.c ============================================================================== --- stable/11/lib/libc/gen/_pthread_stubs.c Wed Jul 3 19:34:17 2019 (r349687) +++ stable/11/lib/libc/gen/_pthread_stubs.c Wed Jul 3 19:42:36 2019 (r349688) @@ -128,6 +128,7 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEX_CONSISTENT */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEXATTR_GETROBUST */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEXATTR_SETROBUST */ + {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_GETTHREADID_NP */ }; /* @@ -246,6 +247,7 @@ STUB_FUNC1(pthread_rwlock_trywrlock, PJT_RWLOCK_TRYWRL STUB_FUNC1(pthread_rwlock_unlock, PJT_RWLOCK_UNLOCK, int, void *) STUB_FUNC1(pthread_rwlock_wrlock, PJT_RWLOCK_WRLOCK, int, void *) STUB_FUNC(pthread_self, PJT_SELF, pthread_t) +STUB_FUNC(pthread_getthreadid_np, PJT_GETTHREADID_NP, int) STUB_FUNC2(pthread_setspecific, PJT_SETSPECIFIC, int, pthread_key_t, void *) STUB_FUNC3(pthread_sigmask, PJT_SIGMASK, int, int, void *, void *) STUB_FUNC3(pthread_atfork, PJT_ATFORK, int, void *, void *, void*) Modified: stable/11/lib/libc/include/libc_private.h ============================================================================== --- stable/11/lib/libc/include/libc_private.h Wed Jul 3 19:34:17 2019 (r349687) +++ stable/11/lib/libc/include/libc_private.h Wed Jul 3 19:42:36 2019 (r349688) @@ -174,6 +174,7 @@ typedef enum { PJT_MUTEX_CONSISTENT, PJT_MUTEXATTR_GETROBUST, PJT_MUTEXATTR_SETROBUST, + PJT_GETTHREADID_NP, PJT_MAX } pjt_index_t; Modified: stable/11/lib/libthr/thread/thr_init.c ============================================================================== --- stable/11/lib/libthr/thread/thr_init.c Wed Jul 3 19:34:17 2019 (r349687) +++ stable/11/lib/libthr/thread/thr_init.c Wed Jul 3 19:42:36 2019 (r349688) @@ -270,6 +270,7 @@ static pthread_func_t jmp_table[][2] = { {DUAL_ENTRY(_pthread_mutex_consistent)},/* PJT_MUTEX_CONSISTENT */ {DUAL_ENTRY(_pthread_mutexattr_getrobust)},/* PJT_MUTEXATTR_GETROBUST */ {DUAL_ENTRY(_pthread_mutexattr_setrobust)},/* PJT_MUTEXATTR_SETROBUST */ + {DUAL_ENTRY(_pthread_getthreadid_np)}, /* PJT_GETTHREADID_NP */ }; static int init_once = 0; From owner-svn-src-all@freebsd.org Wed Jul 3 19:46:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9072715DF10D; Wed, 3 Jul 2019 19:46:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B1E78DA32; Wed, 3 Jul 2019 19:46:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05EAF18726; Wed, 3 Jul 2019 19:46:06 +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 x63Jk5tI074374; Wed, 3 Jul 2019 19:46:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Jk5qQ074373; Wed, 3 Jul 2019 19:46:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907031946.x63Jk5qQ074373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jul 2019 19:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349689 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 349689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2B1E78DA32 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:46:06 -0000 Author: kib Date: Wed Jul 3 19:46:05 2019 New Revision: 349689 URL: https://svnweb.freebsd.org/changeset/base/349689 Log: MFC r349320, r349324: coredump: avoid writing to core files not owned by the effective user. PR: 68905 admbugs: 358 Modified: stable/11/sys/kern/kern_sig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Wed Jul 3 19:42:36 2019 (r349688) +++ stable/11/sys/kern/kern_sig.c Wed Jul 3 19:46:05 2019 (r349689) @@ -3380,10 +3380,16 @@ corefile_open_last(struct thread *td, char *name, int } if (oldvp != NULL) { - if (nextvp == NULL) - nextvp = oldvp; - else + if (nextvp == NULL) { + if ((td->td_proc->p_flag & P_SUGID) != 0) { + error = EFAULT; + vnode_close_locked(td, oldvp); + } else { + nextvp = oldvp; + } + } else { vnode_close_locked(td, oldvp); + } } if (error != 0) { if (nextvp != NULL) @@ -3492,6 +3498,8 @@ corefile_open(const char *comm, uid_t uid, pid_t pid, oflags = VN_OPEN_NOAUDIT | VN_OPEN_NAMECACHE | (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0); flags = O_CREAT | FWRITE | O_NOFOLLOW; + if ((td->td_proc->p_flag & P_SUGID) != 0) + flags |= O_EXCL; NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td); error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, @@ -3589,10 +3597,11 @@ coredump(struct thread *td) /* * Don't dump to non-regular files or files with links. - * Do not dump into system files. + * Do not dump into system files. Effective user must own the corefile. */ if (vp->v_type != VREG || VOP_GETATTR(vp, &vattr, cred) != 0 || - vattr.va_nlink != 1 || (vp->v_vflag & VV_SYSTEM) != 0) { + vattr.va_nlink != 1 || (vp->v_vflag & VV_SYSTEM) != 0 || + vattr.va_uid != cred->cr_uid) { VOP_UNLOCK(vp, 0); error = EFAULT; goto out; From owner-svn-src-all@freebsd.org Wed Jul 3 19:50:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BB2415DF2AA; Wed, 3 Jul 2019 19:50:23 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 103FD8DCA1; Wed, 3 Jul 2019 19:50:23 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8DB51872C; Wed, 3 Jul 2019 19:50:22 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63JoMfW074680; Wed, 3 Jul 2019 19:50:22 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JoMsV074679; Wed, 3 Jul 2019 19:50:22 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201907031950.x63JoMsV074679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 3 Jul 2019 19:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349690 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 349690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 103FD8DCA1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:50:23 -0000 Author: vangyzen Date: Wed Jul 3 19:50:22 2019 New Revision: 349690 URL: https://svnweb.freebsd.org/changeset/base/349690 Log: MFC r349278 bhyve: Fix vtscsi maximum segment config The seg_max value reported to the guest should be two less than the host's maximum, in order to leave room for the request and the response. This is analogous to r347033 for virtio_block. We hit the "too many segments to enqueue" assertion on OneFS because we increase MAXPHYS to 256 KB. Reviewed by: bryanv Discussed with: cem jhb rgrimes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20529 Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Wed Jul 3 19:46:05 2019 (r349689) +++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Wed Jul 3 19:50:22 2019 (r349690) @@ -309,7 +309,8 @@ pci_vtscsi_reset(void *vsc) /* initialize config structure */ sc->vss_config = (struct pci_vtscsi_config){ .num_queues = VTSCSI_REQUESTQ, - .seg_max = VTSCSI_MAXSEG, + /* Leave room for the request and the response. */ + .seg_max = VTSCSI_MAXSEG - 2, .max_sectors = 2, .cmd_per_lun = 1, .event_info_size = sizeof(struct pci_vtscsi_event), From owner-svn-src-all@freebsd.org Wed Jul 3 19:52:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A56115DF49F; Wed, 3 Jul 2019 19:52:25 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D8558E05E; Wed, 3 Jul 2019 19:52:25 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2BBEF188BD; Wed, 3 Jul 2019 19:52:25 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63JqPpV079881; Wed, 3 Jul 2019 19:52:25 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JqPPi079880; Wed, 3 Jul 2019 19:52:25 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201907031952.x63JqPPi079880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 3 Jul 2019 19:52:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349691 - stable/12/sys/dev/virtio/scsi X-SVN-Group: stable-12 X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: stable/12/sys/dev/virtio/scsi X-SVN-Commit-Revision: 349691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D8558E05E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:52:25 -0000 Author: vangyzen Date: Wed Jul 3 19:52:24 2019 New Revision: 349691 URL: https://svnweb.freebsd.org/changeset/base/349691 Log: MFC r349285 VirtIO SCSI: validate seg_max on attach Until head r349278 (stable/12 r349690), bhyve presented a seg_max to the guest that was too large. Detect this case and clamp it to the virtqueue size. Otherwise, we would fail the "too many segments to enqueue" assertion in virtqueue_enqueue(). I hit this by running a guest with a MAXPHYS of 256 KB. Reviewed by: bryanv cem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20703 Modified: stable/12/sys/dev/virtio/scsi/virtio_scsi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- stable/12/sys/dev/virtio/scsi/virtio_scsi.c Wed Jul 3 19:50:22 2019 (r349690) +++ stable/12/sys/dev/virtio/scsi/virtio_scsi.c Wed Jul 3 19:52:24 2019 (r349691) @@ -81,6 +81,7 @@ static void vtscsi_read_config(struct vtscsi_softc *, struct virtio_scsi_config *); static int vtscsi_maximum_segments(struct vtscsi_softc *, int); static int vtscsi_alloc_virtqueues(struct vtscsi_softc *); +static void vtscsi_check_sizes(struct vtscsi_softc *); static void vtscsi_write_device_config(struct vtscsi_softc *); static int vtscsi_reinit(struct vtscsi_softc *); @@ -314,6 +315,8 @@ vtscsi_attach(device_t dev) goto fail; } + vtscsi_check_sizes(sc); + error = vtscsi_init_event_vq(sc); if (error) { device_printf(dev, "cannot populate the eventvq\n"); @@ -478,6 +481,26 @@ vtscsi_alloc_virtqueues(struct vtscsi_softc *sc) "%s request", device_get_nameunit(dev)); return (virtio_alloc_virtqueues(dev, 0, nvqs, vq_info)); +} + +static void +vtscsi_check_sizes(struct vtscsi_softc *sc) +{ + int rqsize; + + if ((sc->vtscsi_flags & VTSCSI_FLAG_INDIRECT) == 0) { + /* + * Ensure the assertions in virtqueue_enqueue(), + * even if the hypervisor reports a bad seg_max. + */ + rqsize = virtqueue_size(sc->vtscsi_request_vq); + if (sc->vtscsi_max_nsegs > rqsize) { + device_printf(sc->vtscsi_dev, + "clamping seg_max (%d %d)\n", sc->vtscsi_max_nsegs, + rqsize); + sc->vtscsi_max_nsegs = rqsize; + } + } } static void From owner-svn-src-all@freebsd.org Wed Jul 3 19:54:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E505315DF55E; Wed, 3 Jul 2019 19:54:38 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87A498E25A; Wed, 3 Jul 2019 19:54:38 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D1DB188C9; Wed, 3 Jul 2019 19:54:38 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63JscJT080047; Wed, 3 Jul 2019 19:54:38 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Jsc7F080046; Wed, 3 Jul 2019 19:54:38 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907031954.x63Jsc7F080046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 3 Jul 2019 19:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349692 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 349692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 87A498E25A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:54:39 -0000 Author: vmaffione Date: Wed Jul 3 19:54:37 2019 New Revision: 349692 URL: https://svnweb.freebsd.org/changeset/base/349692 Log: MFC r348834 bhyve: vtnet: simplify thread synchronization On vtnet device reset it is necessary to wait for threads to stop TX and RX processing. However, the rx_in_progress variable (used for to wait for RX processing to stop) is actually useless, and can be removed. Acquiring and releasing the RX lock is enough to synchronize correctly. Moreover, it is possible to reset the device while holding both TX and RX locks, so that the "resetting" variable becomes unnecessary for the RX thread, and can be protected by the TX lock (instead of being volatile). Reviewed by: jhb, markj Differential Revision: https://reviews.freebsd.org/D20543 Modified: stable/12/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 19:52:24 2019 (r349691) +++ stable/12/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 19:54:37 2019 (r349692) @@ -147,14 +147,13 @@ struct pci_vtnet_softc { struct nm_desc *vsc_nmd; int vsc_rx_ready; - volatile int resetting; /* set and checked outside lock */ + int resetting; /* protected by tx_mtx */ uint64_t vsc_features; /* negotiated features */ struct virtio_net_config vsc_config; pthread_mutex_t rx_mtx; - int rx_in_progress; int rx_vhdrlen; int rx_merge; /* merged rx bufs in use */ @@ -186,62 +185,39 @@ static struct virtio_consts vtnet_vi_consts = { VTNET_S_HOSTCAPS, /* our capabilities */ }; -/* - * If the transmit thread is active then stall until it is done. - */ static void -pci_vtnet_txwait(struct pci_vtnet_softc *sc) +pci_vtnet_reset(void *vsc) { + struct pci_vtnet_softc *sc = vsc; + DPRINTF(("vtnet: device reset requested !\n")); + + /* Acquire the RX lock to block RX processing. */ + pthread_mutex_lock(&sc->rx_mtx); + + /* Set sc->resetting and give a chance to the TX thread to stop. */ pthread_mutex_lock(&sc->tx_mtx); + sc->resetting = 1; while (sc->tx_in_progress) { pthread_mutex_unlock(&sc->tx_mtx); usleep(10000); pthread_mutex_lock(&sc->tx_mtx); } - pthread_mutex_unlock(&sc->tx_mtx); -} -/* - * If the receive thread is active then stall until it is done. - */ -static void -pci_vtnet_rxwait(struct pci_vtnet_softc *sc) -{ - - pthread_mutex_lock(&sc->rx_mtx); - while (sc->rx_in_progress) { - pthread_mutex_unlock(&sc->rx_mtx); - usleep(10000); - pthread_mutex_lock(&sc->rx_mtx); - } - pthread_mutex_unlock(&sc->rx_mtx); -} - -static void -pci_vtnet_reset(void *vsc) -{ - struct pci_vtnet_softc *sc = vsc; - - DPRINTF(("vtnet: device reset requested !\n")); - - sc->resetting = 1; - - /* - * Wait for the transmit and receive threads to finish their - * processing. - */ - pci_vtnet_txwait(sc); - pci_vtnet_rxwait(sc); - sc->vsc_rx_ready = 0; sc->rx_merge = 1; sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); - /* now reset rings, MSI-X vectors, and negotiated capabilities */ + /* + * Now reset rings, MSI-X vectors, and negotiated capabilities. + * Do that with the TX lock held, since we need to reset + * sc->resetting. + */ vi_reset_dev(&sc->vsc_vs); sc->resetting = 0; + pthread_mutex_unlock(&sc->tx_mtx); + pthread_mutex_unlock(&sc->rx_mtx); } /* @@ -315,9 +291,9 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc *sc) /* * But, will be called when the rx ring hasn't yet - * been set up or the guest is resetting the device. + * been set up. */ - if (!sc->vsc_rx_ready || sc->resetting) { + if (!sc->vsc_rx_ready) { /* * Drop the packet and try later. */ @@ -512,9 +488,9 @@ pci_vtnet_netmap_rx(struct pci_vtnet_softc *sc) /* * But, will be called when the rx ring hasn't yet - * been set up or the guest is resetting the device. + * been set up. */ - if (!sc->vsc_rx_ready || sc->resetting) { + if (!sc->vsc_rx_ready) { /* * Drop the packet and try later. */ @@ -591,9 +567,7 @@ pci_vtnet_rx_callback(int fd, enum ev_type type, void struct pci_vtnet_softc *sc = param; pthread_mutex_lock(&sc->rx_mtx); - sc->rx_in_progress = 1; sc->pci_vtnet_rx(sc); - sc->rx_in_progress = 0; pthread_mutex_unlock(&sc->rx_mtx); } @@ -918,7 +892,6 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * sc->rx_merge = 1; sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); - sc->rx_in_progress = 0; pthread_mutex_init(&sc->rx_mtx, NULL); /* From owner-svn-src-all@freebsd.org Wed Jul 3 19:54:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5730E15DF5B8; Wed, 3 Jul 2019 19:54:57 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0D068E36A; Wed, 3 Jul 2019 19:54:56 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE5A0188CA; Wed, 3 Jul 2019 19:54:56 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63JsuW2080107; Wed, 3 Jul 2019 19:54:56 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Jsu3w080106; Wed, 3 Jul 2019 19:54:56 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201907031954.x63Jsu3w080106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 3 Jul 2019 19:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349693 - stable/11/sys/dev/virtio/scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: stable/11/sys/dev/virtio/scsi X-SVN-Commit-Revision: 349693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F0D068E36A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:54:57 -0000 Author: vangyzen Date: Wed Jul 3 19:54:56 2019 New Revision: 349693 URL: https://svnweb.freebsd.org/changeset/base/349693 Log: MFC r349285 VirtIO SCSI: validate seg_max on attach Until head r349278 (stable/12 r349690), bhyve presented a seg_max to the guest that was too large. Detect this case and clamp it to the virtqueue size. Otherwise, we would fail the "too many segments to enqueue" assertion in virtqueue_enqueue(). I hit this by running a guest with a MAXPHYS of 256 KB. Reviewed by: bryanv cem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20703 Modified: stable/11/sys/dev/virtio/scsi/virtio_scsi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- stable/11/sys/dev/virtio/scsi/virtio_scsi.c Wed Jul 3 19:54:37 2019 (r349692) +++ stable/11/sys/dev/virtio/scsi/virtio_scsi.c Wed Jul 3 19:54:56 2019 (r349693) @@ -79,6 +79,7 @@ static void vtscsi_read_config(struct vtscsi_softc *, struct virtio_scsi_config *); static int vtscsi_maximum_segments(struct vtscsi_softc *, int); static int vtscsi_alloc_virtqueues(struct vtscsi_softc *); +static void vtscsi_check_sizes(struct vtscsi_softc *); static void vtscsi_write_device_config(struct vtscsi_softc *); static int vtscsi_reinit(struct vtscsi_softc *); @@ -312,6 +313,8 @@ vtscsi_attach(device_t dev) goto fail; } + vtscsi_check_sizes(sc); + error = vtscsi_init_event_vq(sc); if (error) { device_printf(dev, "cannot populate the eventvq\n"); @@ -476,6 +479,26 @@ vtscsi_alloc_virtqueues(struct vtscsi_softc *sc) "%s request", device_get_nameunit(dev)); return (virtio_alloc_virtqueues(dev, 0, nvqs, vq_info)); +} + +static void +vtscsi_check_sizes(struct vtscsi_softc *sc) +{ + int rqsize; + + if ((sc->vtscsi_flags & VTSCSI_FLAG_INDIRECT) == 0) { + /* + * Ensure the assertions in virtqueue_enqueue(), + * even if the hypervisor reports a bad seg_max. + */ + rqsize = virtqueue_size(sc->vtscsi_request_vq); + if (sc->vtscsi_max_nsegs > rqsize) { + device_printf(sc->vtscsi_dev, + "clamping seg_max (%d %d)\n", sc->vtscsi_max_nsegs, + rqsize); + sc->vtscsi_max_nsegs = rqsize; + } + } } static void From owner-svn-src-all@freebsd.org Wed Jul 3 19:56:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E2EA15DF692; Wed, 3 Jul 2019 19:56:07 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13E008E519; Wed, 3 Jul 2019 19:56:07 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3AB3188CB; Wed, 3 Jul 2019 19:56:06 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63Ju6U2080254; Wed, 3 Jul 2019 19:56:06 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Ju5g7080248; Wed, 3 Jul 2019 19:56:05 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907031956.x63Ju5g7080248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 3 Jul 2019 19:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349694 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 349694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 13E008E519 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:56:07 -0000 Author: vmaffione Date: Wed Jul 3 19:56:05 2019 New Revision: 349694 URL: https://svnweb.freebsd.org/changeset/base/349694 Log: MFC r348929 bhyve: virtio: introduce vq_kick_enable() and vq_kick_disable() The VirtIO standard supports two schemes for notification suppression: a notification enable bit and a more sophisticated one (event_idx) that also supports delayed notifications. Currently bhyve fully supports only the first scheme. This patch hides the notification suppression internals by means of two inline routines, vq_kick_enable() and vq_kick_disable(), and makes the code more readable. Moreover, further improve readability by replacing the call to mb() with a call to atomic_thread_fence_seq_cst(), which is already used in virtio.c Reviewed by: pmooney_pfmooney.com, bryanv Differential Revision: https://reviews.freebsd.org/D20581 Modified: stable/12/usr.sbin/bhyve/pci_virtio_console.c stable/12/usr.sbin/bhyve/pci_virtio_net.c stable/12/usr.sbin/bhyve/pci_virtio_scsi.c stable/12/usr.sbin/bhyve/virtio.c stable/12/usr.sbin/bhyve/virtio.h Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_console.c Wed Jul 3 19:54:56 2019 (r349693) +++ stable/12/usr.sbin/bhyve/pci_virtio_console.c Wed Jul 3 19:56:05 2019 (r349694) @@ -604,7 +604,7 @@ pci_vtcon_notify_rx(void *vsc, struct vqueue_info *vq) if (!port->vsp_rx_ready) { port->vsp_rx_ready = 1; - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); } } Modified: stable/12/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 19:54:56 2019 (r349693) +++ stable/12/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 19:56:05 2019 (r349694) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifndef NETMAP_WITH_LIBS #define NETMAP_WITH_LIBS @@ -582,7 +581,7 @@ pci_vtnet_ping_rxq(void *vsc, struct vqueue_info *vq) */ if (sc->vsc_rx_ready == 0) { sc->vsc_rx_ready = 1; - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); } } @@ -628,7 +627,7 @@ pci_vtnet_ping_txq(void *vsc, struct vqueue_info *vq) /* Signal the tx thread for processing */ pthread_mutex_lock(&sc->tx_mtx); - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); if (sc->tx_in_progress == 0) pthread_cond_signal(&sc->tx_cond); pthread_mutex_unlock(&sc->tx_mtx); @@ -657,8 +656,7 @@ pci_vtnet_tx_thread(void *param) for (;;) { /* note - tx mutex is locked here */ while (sc->resetting || !vq_has_descs(vq)) { - vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; - mb(); + vq_kick_enable(vq); if (!sc->resetting && vq_has_descs(vq)) break; @@ -666,7 +664,7 @@ pci_vtnet_tx_thread(void *param) error = pthread_cond_wait(&sc->tx_cond, &sc->tx_mtx); assert(error == 0); } - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); sc->tx_in_progress = 1; pthread_mutex_unlock(&sc->tx_mtx); Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Wed Jul 3 19:54:56 2019 (r349693) +++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c Wed Jul 3 19:56:05 2019 (r349694) @@ -582,7 +582,7 @@ static void pci_vtscsi_eventq_notify(void *vsc, struct vqueue_info *vq) { - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); } static void Modified: stable/12/usr.sbin/bhyve/virtio.c ============================================================================== --- stable/12/usr.sbin/bhyve/virtio.c Wed Jul 3 19:54:56 2019 (r349693) +++ stable/12/usr.sbin/bhyve/virtio.c Wed Jul 3 19:56:05 2019 (r349694) @@ -428,7 +428,8 @@ vq_relchain(struct vqueue_info *vq, uint16_t idx, uint /* * Ensure the used descriptor is visible before updating the index. - * This is necessary on ISAs with memory ordering less strict than x86. + * This is necessary on ISAs with memory ordering less strict than x86 + * (and even on x86 to act as a compiler barrier). */ atomic_thread_fence_rel(); vuh->vu_idx = uidx; Modified: stable/12/usr.sbin/bhyve/virtio.h ============================================================================== --- stable/12/usr.sbin/bhyve/virtio.h Wed Jul 3 19:54:56 2019 (r349693) +++ stable/12/usr.sbin/bhyve/virtio.h Wed Jul 3 19:56:05 2019 (r349694) @@ -31,6 +31,8 @@ #ifndef _VIRTIO_H_ #define _VIRTIO_H_ +#include + /* * These are derived from several virtio specifications. * @@ -445,6 +447,26 @@ vq_interrupt(struct virtio_softc *vs, struct vqueue_in pci_lintr_assert(vs->vs_pi); VS_UNLOCK(vs); } +} + +static inline void +vq_kick_enable(struct vqueue_info *vq) +{ + + vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; + /* + * Full memory barrier to make sure the store to vu_flags + * happens before the load from va_idx, which results from + * a subsequent call to vq_has_descs(). + */ + atomic_thread_fence_seq_cst(); +} + +static inline void +vq_kick_disable(struct vqueue_info *vq) +{ + + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; } struct iovec; From owner-svn-src-all@freebsd.org Wed Jul 3 19:57:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62EB315DF75D; Wed, 3 Jul 2019 19:57:25 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 055AD8E6A8; Wed, 3 Jul 2019 19:57:25 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E33C1188CE; Wed, 3 Jul 2019 19:57:24 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63JvOn5080403; Wed, 3 Jul 2019 19:57:24 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63JvOkR080399; Wed, 3 Jul 2019 19:57:24 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907031957.x63JvOkR080399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 3 Jul 2019 19:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349695 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 349695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 055AD8E6A8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:57:25 -0000 Author: vmaffione Date: Wed Jul 3 19:57:23 2019 New Revision: 349695 URL: https://svnweb.freebsd.org/changeset/base/349695 Log: MFC r349019 bhyve: move common code to net_utils.c Both virtio_net and e82545 network frontends have code to validate and generate MAC addresses. These functionalities are replicated in the two files, so we move them in a separate compilation unit. Reviewed by: rgrimes, bryanv, imp, kevans Differential Revision: https://reviews.freebsd.org/D20626 Added: stable/12/usr.sbin/bhyve/net_utils.c - copied unchanged from r349019, head/usr.sbin/bhyve/net_utils.c stable/12/usr.sbin/bhyve/net_utils.h - copied unchanged from r349019, head/usr.sbin/bhyve/net_utils.h Modified: stable/12/usr.sbin/bhyve/Makefile stable/12/usr.sbin/bhyve/pci_e82545.c stable/12/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/Makefile ============================================================================== --- stable/12/usr.sbin/bhyve/Makefile Wed Jul 3 19:56:05 2019 (r349694) +++ stable/12/usr.sbin/bhyve/Makefile Wed Jul 3 19:57:23 2019 (r349695) @@ -32,6 +32,7 @@ SRCS= \ mem.c \ mevent.c \ mptbl.c \ + net_utils.c \ pci_ahci.c \ pci_e82545.c \ pci_emul.c \ Copied: stable/12/usr.sbin/bhyve/net_utils.c (from r349019, head/usr.sbin/bhyve/net_utils.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/bhyve/net_utils.c Wed Jul 3 19:57:23 2019 (r349695, copy of r349019, head/usr.sbin/bhyve/net_utils.c) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 2011 NetApp, Inc. + * + * 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$ + */ + +#include "net_utils.h" +#include "bhyverun.h" +#include +#include +#include +#include +#include + +int +net_parsemac(char *mac_str, uint8_t *mac_addr) +{ + struct ether_addr *ea; + char *tmpstr; + char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; + + tmpstr = strsep(&mac_str,"="); + + if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { + ea = ether_aton(mac_str); + + if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || + memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { + fprintf(stderr, "Invalid MAC %s\n", mac_str); + return (EINVAL); + } else + memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); + } + + return (0); +} + +void +net_genmac(struct pci_devinst *pi, uint8_t *macaddr) +{ + /* + * The default MAC address is the standard NetApp OUI of 00-a0-98, + * followed by an MD5 of the PCI slot/func number and dev name + */ + MD5_CTX mdctx; + unsigned char digest[16]; + char nstr[80]; + + snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, + pi->pi_func, vmname); + + MD5Init(&mdctx); + MD5Update(&mdctx, nstr, (unsigned int)strlen(nstr)); + MD5Final(digest, &mdctx); + + macaddr[0] = 0x00; + macaddr[1] = 0xa0; + macaddr[2] = 0x98; + macaddr[3] = digest[0]; + macaddr[4] = digest[1]; + macaddr[5] = digest[2]; +} Copied: stable/12/usr.sbin/bhyve/net_utils.h (from r349019, head/usr.sbin/bhyve/net_utils.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/bhyve/net_utils.h Wed Jul 3 19:57:23 2019 (r349695, copy of r349019, head/usr.sbin/bhyve/net_utils.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2019 Vincenzo Maffione + * + * 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 _NET_UTILS_H_ +#define _NET_UTILS_H_ + +#include +#include "pci_emul.h" + +void net_genmac(struct pci_devinst *pi, uint8_t *macaddr); +int net_parsemac(char *mac_str, uint8_t *mac_addr); + +#endif /* _NET_UTILS_H_ */ Modified: stable/12/usr.sbin/bhyve/pci_e82545.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_e82545.c Wed Jul 3 19:56:05 2019 (r349694) +++ stable/12/usr.sbin/bhyve/pci_e82545.c Wed Jul 3 19:57:23 2019 (r349695) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include "bhyverun.h" #include "pci_emul.h" #include "mevent.h" +#include "net_utils.h" /* Hardware/register definitions XXX: move some to common code. */ #define E82545_VENDOR_ID_INTEL 0x8086 @@ -2256,38 +2257,16 @@ e82545_open_tap(struct e82545_softc *sc, char *opts) } static int -e82545_parsemac(char *mac_str, uint8_t *mac_addr) -{ - struct ether_addr *ea; - char *tmpstr; - char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; - - tmpstr = strsep(&mac_str,"="); - if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { - ea = ether_aton(mac_str); - if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || - memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { - fprintf(stderr, "Invalid MAC %s\n", mac_str); - return (1); - } else - memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); - } - return (0); -} - -static int e82545_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { - DPRINTF("Loading with options: %s\r\n", opts); - - MD5_CTX mdctx; - unsigned char digest[16]; char nstr[80]; struct e82545_softc *sc; char *devname; char *vtopts; int mac_provided; + DPRINTF("Loading with options: %s\r\n", opts); + /* Setup our softc */ sc = calloc(1, sizeof(*sc)); @@ -2337,7 +2316,7 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, (void) strsep(&vtopts, ","); if (vtopts != NULL) { - err = e82545_parsemac(vtopts, sc->esc_mac.octet); + err = net_parsemac(vtopts, sc->esc_mac.octet); if (err != 0) { free(devname); return (err); @@ -2352,24 +2331,8 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, free(devname); } - /* - * The default MAC address is the standard NetApp OUI of 00-a0-98, - * followed by an MD5 of the PCI slot/func number and dev name - */ if (!mac_provided) { - snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, - pi->pi_func, vmname); - - MD5Init(&mdctx); - MD5Update(&mdctx, nstr, strlen(nstr)); - MD5Final(digest, &mdctx); - - sc->esc_mac.octet[0] = 0x00; - sc->esc_mac.octet[1] = 0xa0; - sc->esc_mac.octet[2] = 0x98; - sc->esc_mac.octet[3] = digest[0]; - sc->esc_mac.octet[4] = digest[1]; - sc->esc_mac.octet[5] = digest[2]; + net_genmac(pi, sc->esc_mac.octet); } /* H/w initiated reset */ Modified: stable/12/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 19:56:05 2019 (r349694) +++ stable/12/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 19:57:23 2019 (r349695) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include "pci_emul.h" #include "mevent.h" #include "virtio.h" +#include "net_utils.h" #define VTNET_RINGSZ 1024 @@ -695,29 +696,6 @@ pci_vtnet_ping_ctlq(void *vsc, struct vqueue_info *vq) } #endif -static int -pci_vtnet_parsemac(char *mac_str, uint8_t *mac_addr) -{ - struct ether_addr *ea; - char *tmpstr; - char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; - - tmpstr = strsep(&mac_str,"="); - - if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { - ea = ether_aton(mac_str); - - if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || - memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { - fprintf(stderr, "Invalid MAC %s\n", mac_str); - return (EINVAL); - } else - memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); - } - - return (0); -} - static void pci_vtnet_tap_setup(struct pci_vtnet_softc *sc, char *devname) { @@ -792,9 +770,6 @@ pci_vtnet_netmap_setup(struct pci_vtnet_softc *sc, cha static int pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { - MD5_CTX mdctx; - unsigned char digest[16]; - char nstr[80]; char tname[MAXCOMLEN + 1]; struct pci_vtnet_softc *sc; char *devname; @@ -831,7 +806,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * (void) strsep(&vtopts, ","); if (vtopts != NULL) { - err = pci_vtnet_parsemac(vtopts, sc->vsc_config.mac); + err = net_parsemac(vtopts, sc->vsc_config.mac); if (err != 0) { free(devname); return (err); @@ -848,24 +823,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * free(devname); } - /* - * The default MAC address is the standard NetApp OUI of 00-a0-98, - * followed by an MD5 of the PCI slot/func number and dev name - */ if (!mac_provided) { - snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, - pi->pi_func, vmname); - - MD5Init(&mdctx); - MD5Update(&mdctx, nstr, strlen(nstr)); - MD5Final(digest, &mdctx); - - sc->vsc_config.mac[0] = 0x00; - sc->vsc_config.mac[1] = 0xa0; - sc->vsc_config.mac[2] = 0x98; - sc->vsc_config.mac[3] = digest[0]; - sc->vsc_config.mac[4] = digest[1]; - sc->vsc_config.mac[5] = digest[2]; + net_genmac(pi, sc->vsc_config.mac); } /* initialize config space */ From owner-svn-src-all@freebsd.org Wed Jul 3 19:59:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CFCD15DF7F8; Wed, 3 Jul 2019 19:59:49 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D616A8E80B; Wed, 3 Jul 2019 19:59:48 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D38F188CF; Wed, 3 Jul 2019 19:59:48 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63Jxms6080576; Wed, 3 Jul 2019 19:59:48 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Jxmxr080575; Wed, 3 Jul 2019 19:59:48 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907031959.x63Jxmxr080575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 3 Jul 2019 19:59:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349696 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 349696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D616A8E80B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 19:59:49 -0000 Author: vmaffione Date: Wed Jul 3 19:59:48 2019 New Revision: 349696 URL: https://svnweb.freebsd.org/changeset/base/349696 Log: MFC r349175 bhyve: vtnet: fix locking on receive The vsc_rx_ready and the RX virtqueue is protected by the rx_mtx lock. However, pci_vtnet_ping_rxq() (currently called only once after each device reset) accesses those without acquiring the lock. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D20609 Modified: stable/12/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/12/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 19:57:23 2019 (r349695) +++ stable/12/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 19:59:48 2019 (r349696) @@ -580,10 +580,12 @@ pci_vtnet_ping_rxq(void *vsc, struct vqueue_info *vq) /* * A qnotify means that the rx process can now begin */ + pthread_mutex_lock(&sc->rx_mtx); if (sc->vsc_rx_ready == 0) { sc->vsc_rx_ready = 1; vq_kick_disable(vq); } + pthread_mutex_unlock(&sc->rx_mtx); } static void From owner-svn-src-all@freebsd.org Wed Jul 3 20:00:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1476715DF83A; Wed, 3 Jul 2019 20:00:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A22218E8CF; Wed, 3 Jul 2019 19:59:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACEE4188D0; Wed, 3 Jul 2019 19:59:56 +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 x63JxurT080630; Wed, 3 Jul 2019 19:59:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Jxu4q080629; Wed, 3 Jul 2019 19:59:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201907031959.x63Jxu4q080629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jul 2019 19:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349697 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349697 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A22218E8CF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:00:00 -0000 Author: emaste Date: Wed Jul 3 19:59:56 2019 New Revision: 349697 URL: https://svnweb.freebsd.org/changeset/base/349697 Log: correct pmap_ts_referenced return type pmap_ts_referenced returns a count, not a boolean, and is supposed to have int as the return type not boolean_t. This worked previously because boolean_t is an int typedef. Discussed with: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/pmap.h Modified: head/sys/vm/pmap.h ============================================================================== --- head/sys/vm/pmap.h Wed Jul 3 19:59:48 2019 (r349696) +++ head/sys/vm/pmap.h Wed Jul 3 19:59:56 2019 (r349697) @@ -164,7 +164,7 @@ void pmap_remove_all(vm_page_t m); void pmap_remove_pages(pmap_t); void pmap_remove_write(vm_page_t m); void pmap_sync_icache(pmap_t, vm_offset_t, vm_size_t); -boolean_t pmap_ts_referenced(vm_page_t m); +int pmap_ts_referenced(vm_page_t m); void pmap_unwire(pmap_t pmap, vm_offset_t start, vm_offset_t end); void pmap_zero_page(vm_page_t); void pmap_zero_page_area(vm_page_t, int off, int size); From owner-svn-src-all@freebsd.org Wed Jul 3 20:05:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8C1115DFB4D; Wed, 3 Jul 2019 20:05:26 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A09F8EF81; Wed, 3 Jul 2019 20:05:26 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2286F18A88; Wed, 3 Jul 2019 20:05:26 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63K5QZC085757; Wed, 3 Jul 2019 20:05:26 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63K5QNu085756; Wed, 3 Jul 2019 20:05:26 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907032005.x63K5QNu085756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 3 Jul 2019 20:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349698 - stable/11/usr.sbin/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve X-SVN-Commit-Revision: 349698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4A09F8EF81 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:05:26 -0000 Author: vmaffione Date: Wed Jul 3 20:05:25 2019 New Revision: 349698 URL: https://svnweb.freebsd.org/changeset/base/349698 Log: MFC r348834 bhyve: vtnet: simplify thread synchronization On vtnet device reset it is necessary to wait for threads to stop TX and RX processing. However, the rx_in_progress variable (used for to wait for RX processing to stop) is actually useless, and can be removed. Acquiring and releasing the RX lock is enough to synchronize correctly. Moreover, it is possible to reset the device while holding both TX and RX locks, so that the "resetting" variable becomes unnecessary for the RX thread, and can be protected by the TX lock (instead of being volatile). Reviewed by: jhb, markj Differential Revision: https://reviews.freebsd.org/D20543 Modified: stable/11/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/11/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 19:59:56 2019 (r349697) +++ stable/11/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 20:05:25 2019 (r349698) @@ -147,14 +147,13 @@ struct pci_vtnet_softc { struct nm_desc *vsc_nmd; int vsc_rx_ready; - volatile int resetting; /* set and checked outside lock */ + int resetting; /* protected by tx_mtx */ uint64_t vsc_features; /* negotiated features */ struct virtio_net_config vsc_config; pthread_mutex_t rx_mtx; - int rx_in_progress; int rx_vhdrlen; int rx_merge; /* merged rx bufs in use */ @@ -186,62 +185,39 @@ static struct virtio_consts vtnet_vi_consts = { VTNET_S_HOSTCAPS, /* our capabilities */ }; -/* - * If the transmit thread is active then stall until it is done. - */ static void -pci_vtnet_txwait(struct pci_vtnet_softc *sc) +pci_vtnet_reset(void *vsc) { + struct pci_vtnet_softc *sc = vsc; + DPRINTF(("vtnet: device reset requested !\n")); + + /* Acquire the RX lock to block RX processing. */ + pthread_mutex_lock(&sc->rx_mtx); + + /* Set sc->resetting and give a chance to the TX thread to stop. */ pthread_mutex_lock(&sc->tx_mtx); + sc->resetting = 1; while (sc->tx_in_progress) { pthread_mutex_unlock(&sc->tx_mtx); usleep(10000); pthread_mutex_lock(&sc->tx_mtx); } - pthread_mutex_unlock(&sc->tx_mtx); -} -/* - * If the receive thread is active then stall until it is done. - */ -static void -pci_vtnet_rxwait(struct pci_vtnet_softc *sc) -{ - - pthread_mutex_lock(&sc->rx_mtx); - while (sc->rx_in_progress) { - pthread_mutex_unlock(&sc->rx_mtx); - usleep(10000); - pthread_mutex_lock(&sc->rx_mtx); - } - pthread_mutex_unlock(&sc->rx_mtx); -} - -static void -pci_vtnet_reset(void *vsc) -{ - struct pci_vtnet_softc *sc = vsc; - - DPRINTF(("vtnet: device reset requested !\n")); - - sc->resetting = 1; - - /* - * Wait for the transmit and receive threads to finish their - * processing. - */ - pci_vtnet_txwait(sc); - pci_vtnet_rxwait(sc); - sc->vsc_rx_ready = 0; sc->rx_merge = 1; sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); - /* now reset rings, MSI-X vectors, and negotiated capabilities */ + /* + * Now reset rings, MSI-X vectors, and negotiated capabilities. + * Do that with the TX lock held, since we need to reset + * sc->resetting. + */ vi_reset_dev(&sc->vsc_vs); sc->resetting = 0; + pthread_mutex_unlock(&sc->tx_mtx); + pthread_mutex_unlock(&sc->rx_mtx); } /* @@ -315,9 +291,9 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc *sc) /* * But, will be called when the rx ring hasn't yet - * been set up or the guest is resetting the device. + * been set up. */ - if (!sc->vsc_rx_ready || sc->resetting) { + if (!sc->vsc_rx_ready) { /* * Drop the packet and try later. */ @@ -512,9 +488,9 @@ pci_vtnet_netmap_rx(struct pci_vtnet_softc *sc) /* * But, will be called when the rx ring hasn't yet - * been set up or the guest is resetting the device. + * been set up. */ - if (!sc->vsc_rx_ready || sc->resetting) { + if (!sc->vsc_rx_ready) { /* * Drop the packet and try later. */ @@ -591,9 +567,7 @@ pci_vtnet_rx_callback(int fd, enum ev_type type, void struct pci_vtnet_softc *sc = param; pthread_mutex_lock(&sc->rx_mtx); - sc->rx_in_progress = 1; sc->pci_vtnet_rx(sc); - sc->rx_in_progress = 0; pthread_mutex_unlock(&sc->rx_mtx); } @@ -918,7 +892,6 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * sc->rx_merge = 1; sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); - sc->rx_in_progress = 0; pthread_mutex_init(&sc->rx_mtx, NULL); /* From owner-svn-src-all@freebsd.org Wed Jul 3 20:14:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A01815DFE1C; Wed, 3 Jul 2019 20:14:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F9DE8F7A1; Wed, 3 Jul 2019 20:14:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE5E118C52; Wed, 3 Jul 2019 20:14:43 +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 x63KEh0v091246; Wed, 3 Jul 2019 20:14:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63KEhrU091245; Wed, 3 Jul 2019 20:14:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032014.x63KEhrU091245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349699 - stable/12/sys/fs/smbfs X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/fs/smbfs X-SVN-Commit-Revision: 349699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F9DE8F7A1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:14:44 -0000 Author: markj Date: Wed Jul 3 20:14:43 2019 New Revision: 349699 URL: https://svnweb.freebsd.org/changeset/base/349699 Log: MFC r349334: Remove a lingering use of splbio(). Modified: stable/12/sys/fs/smbfs/smbfs_io.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/smbfs/smbfs_io.c ============================================================================== --- stable/12/sys/fs/smbfs/smbfs_io.c Wed Jul 3 20:05:25 2019 (r349698) +++ stable/12/sys/fs/smbfs/smbfs_io.c Wed Jul 3 20:14:43 2019 (r349699) @@ -375,9 +375,6 @@ smbfs_doio(struct vnode *vp, struct buf *bp, struct uc */ if (error == EINTR || (!error && (bp->b_flags & B_NEEDCOMMIT))) { - int s; - - s = splbio(); bp->b_flags &= ~(B_INVAL|B_NOCACHE); if ((bp->b_flags & B_ASYNC) == 0) bp->b_flags |= B_EINTR; @@ -387,7 +384,6 @@ smbfs_doio(struct vnode *vp, struct buf *bp, struct uc } if ((bp->b_flags & B_ASYNC) == 0) bp->b_flags |= B_EINTR; - splx(s); } else { if (error) { bp->b_ioflags |= BIO_ERROR; From owner-svn-src-all@freebsd.org Wed Jul 3 20:15:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFEAE15DFE5A; Wed, 3 Jul 2019 20:15:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4589A8F8D1; Wed, 3 Jul 2019 20:15:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 214F318C53; Wed, 3 Jul 2019 20:15:10 +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 x63KFAIp091319; Wed, 3 Jul 2019 20:15:10 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63KF9a5091318; Wed, 3 Jul 2019 20:15:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032015.x63KF9a5091318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349700 - stable/12/sys/ufs/ffs X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/ufs/ffs X-SVN-Commit-Revision: 349700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4589A8F8D1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:15:11 -0000 Author: markj Date: Wed Jul 3 20:15:09 2019 New Revision: 349700 URL: https://svnweb.freebsd.org/changeset/base/349700 Log: MFC r349419: Remove references to splbio in ffs_softdep.c. Modified: stable/12/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/12/sys/ufs/ffs/ffs_softdep.c Wed Jul 3 20:14:43 2019 (r349699) +++ stable/12/sys/ufs/ffs/ffs_softdep.c Wed Jul 3 20:15:09 2019 (r349700) @@ -2098,7 +2098,6 @@ pagedep_find(pagedephd, ino, lbn, pagedeppp) * Look up a pagedep. Return 1 if found, 0 otherwise. * If not found, allocate if DEPALLOC flag is passed. * Found or allocated entry is returned in pagedeppp. - * This routine must be called with splbio interrupts blocked. */ static int pagedep_lookup(mp, bp, ino, lbn, flags, pagedeppp) @@ -2190,7 +2189,6 @@ inodedep_find(inodedephd, inum, inodedeppp) * Look up an inodedep. Return 1 if found, 0 if not found. * If not found, allocate if DEPALLOC flag is passed. * Found or allocated entry is returned in inodedeppp. - * This routine must be called with splbio interrupts blocked. */ static int inodedep_lookup(mp, inum, flags, inodedeppp) @@ -5466,7 +5464,6 @@ jnewblk_merge(new, old, wkhd) /* * Replace an old allocdirect dependency with a newer one. - * This routine must be called with splbio interrupts blocked. */ static void allocdirect_merge(adphead, newadp, oldadp) @@ -7519,7 +7516,6 @@ free_newblk(newblk) /* * Free a newdirblk. Clear the NEWBLOCK flag on its associated pagedep. - * This routine must be called with splbio interrupts blocked. */ static void free_newdirblk(newdirblk) @@ -7650,7 +7646,6 @@ softdep_freefile(pvp, ino, mode) /* * Check to see if an inode has never been written to disk. If * so free the inodedep and return success, otherwise return failure. - * This routine must be called with splbio interrupts blocked. * * If we still have a bitmap dependency, then the inode has never * been written to disk. Drop the dependency as it is no longer @@ -8882,8 +8877,7 @@ cancel_diradd(dap, dirrem, jremref, dotremref, dotdotr } /* - * Free a diradd dependency structure. This routine must be called - * with splbio interrupts blocked. + * Free a diradd dependency structure. */ static void free_diradd(dap, wkhd) @@ -11168,9 +11162,7 @@ softdep_disk_write_complete(bp) } /* - * Called from within softdep_disk_write_complete above. Note that - * this routine is always called from interrupt level with further - * splbio interrupts blocked. + * Called from within softdep_disk_write_complete above. */ static void handle_allocdirect_partdone(adp, wkhd) @@ -11182,6 +11174,7 @@ handle_allocdirect_partdone(adp, wkhd) struct inodedep *inodedep; long bsize; + LOCK_OWNED(VFSTOUFS(adp->ad_block.nb_list.wk_mp)); if ((adp->ad_state & ALLCOMPLETE) != ALLCOMPLETE) return; /* @@ -11788,7 +11781,6 @@ handle_written_indirdep(indirdep, bp, bpp, flags) /* * Process a diradd entry after its dependent inode has been written. - * This routine must be called with splbio interrupts blocked. */ static void diradd_inode_written(dap, inodedep) @@ -11796,6 +11788,7 @@ diradd_inode_written(dap, inodedep) struct inodedep *inodedep; { + LOCK_OWNED(VFSTOUFS(dap->da_list.wk_mp)); dap->da_state |= COMPLETE; complete_diradd(dap); WORKLIST_INSERT(&inodedep->id_pendinghd, &dap->da_list); @@ -12356,8 +12349,7 @@ retry: /* * Merge the a new inode dependency list (such as id_newinoupdt) into an - * old inode dependency list (such as id_inoupdt). This routine must be - * called with splbio interrupts blocked. + * old inode dependency list (such as id_inoupdt). */ static void merge_inode_lists(newlisthead, oldlisthead) @@ -12367,6 +12359,8 @@ merge_inode_lists(newlisthead, oldlisthead) struct allocdirect *listadp, *newadp; newadp = TAILQ_FIRST(newlisthead); + if (newadp != NULL) + LOCK_OWNED(VFSTOUFS(newadp->ad_block.nb_list.wk_mp)); for (listadp = TAILQ_FIRST(oldlisthead); listadp && newadp;) { if (listadp->ad_offset < newadp->ad_offset) { listadp = TAILQ_NEXT(listadp, ad_next); @@ -12861,7 +12855,6 @@ out: /* * Flush the dependencies associated with an inodedep. - * Called with splbio blocked. */ static int flush_inodedep_deps(vp, mp, ino) @@ -12926,7 +12919,6 @@ restart: /* * Flush an inode dependency list. - * Called with splbio blocked. */ static int flush_deplist(listhead, waitfor, errorp) @@ -13068,7 +13060,6 @@ flush_newblk_dep(vp, mp, lbn) /* * Eliminate a pagedep dependency by flushing out all its diradd dependencies. - * Called with splbio blocked. */ static int flush_pagedep_deps(pvp, mp, diraddhdp) From owner-svn-src-all@freebsd.org Wed Jul 3 20:17:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44C0615DFF17; Wed, 3 Jul 2019 20:17:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E05F48FA52; Wed, 3 Jul 2019 20:17:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99C8718C54; Wed, 3 Jul 2019 20:17:28 +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 x63KHS9F091460; Wed, 3 Jul 2019 20:17:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63KHRpp091453; Wed, 3 Jul 2019 20:17:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032017.x63KHRpp091453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349701 - in stable/12/sys: amd64/sgx dev/drm2/ttm vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: amd64/sgx dev/drm2/ttm vm X-SVN-Commit-Revision: 349701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E05F48FA52 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:17:29 -0000 Author: markj Date: Wed Jul 3 20:17:26 2019 New Revision: 349701 URL: https://svnweb.freebsd.org/changeset/base/349701 Log: MFC r349432: Add a return value to vm_page_remove(). Modified: stable/12/sys/amd64/sgx/sgx.c stable/12/sys/dev/drm2/ttm/ttm_bo_vm.c stable/12/sys/vm/device_pager.c stable/12/sys/vm/vm_fault.c stable/12/sys/vm/vm_object.c stable/12/sys/vm/vm_page.c stable/12/sys/vm/vm_page.h Modified: stable/12/sys/amd64/sgx/sgx.c ============================================================================== --- stable/12/sys/amd64/sgx/sgx.c Wed Jul 3 20:15:09 2019 (r349700) +++ stable/12/sys/amd64/sgx/sgx.c Wed Jul 3 20:17:26 2019 (r349701) @@ -358,7 +358,7 @@ sgx_page_remove(struct sgx_softc *sc, vm_page_t p) uint64_t offs; vm_page_lock(p); - vm_page_remove(p); + (void)vm_page_remove(p); vm_page_unlock(p); dprintf("%s: p->pidx %ld\n", __func__, p->pindex); Modified: stable/12/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- stable/12/sys/dev/drm2/ttm/ttm_bo_vm.c Wed Jul 3 20:15:09 2019 (r349700) +++ stable/12/sys/dev/drm2/ttm/ttm_bo_vm.c Wed Jul 3 20:17:26 2019 (r349701) @@ -115,7 +115,7 @@ ttm_bo_vm_fault(vm_object_t vm_obj, vm_ooffset_t offse vm_object_pip_add(vm_obj, 1); if (*mres != NULL) { vm_page_lock(*mres); - vm_page_remove(*mres); + (void)vm_page_remove(*mres); vm_page_unlock(*mres); } retry: Modified: stable/12/sys/vm/device_pager.c ============================================================================== --- stable/12/sys/vm/device_pager.c Wed Jul 3 20:15:09 2019 (r349700) +++ stable/12/sys/vm/device_pager.c Wed Jul 3 20:17:26 2019 (r349701) @@ -236,7 +236,7 @@ cdev_pager_free_page(vm_object_t object, vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("unmanaged %p", m)); pmap_remove_all(m); vm_page_lock(m); - vm_page_remove(m); + (void)vm_page_remove(m); vm_page_unlock(m); } else if (object->type == OBJT_DEVICE) dev_pager_free_page(object, m); Modified: stable/12/sys/vm/vm_fault.c ============================================================================== --- stable/12/sys/vm/vm_fault.c Wed Jul 3 20:15:09 2019 (r349700) +++ stable/12/sys/vm/vm_fault.c Wed Jul 3 20:17:26 2019 (r349701) @@ -1144,7 +1144,7 @@ readrest: fs.object == fs.first_object->backing_object) { vm_page_lock(fs.m); vm_page_dequeue(fs.m); - vm_page_remove(fs.m); + (void)vm_page_remove(fs.m); vm_page_unlock(fs.m); vm_page_lock(fs.first_m); vm_page_replace_checked(fs.m, fs.first_object, Modified: stable/12/sys/vm/vm_object.c ============================================================================== --- stable/12/sys/vm/vm_object.c Wed Jul 3 20:15:09 2019 (r349700) +++ stable/12/sys/vm/vm_object.c Wed Jul 3 20:17:26 2019 (r349701) @@ -1595,10 +1595,8 @@ vm_object_collapse_scan(vm_object_t object, int op) vm_page_lock(p); KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); - if (!vm_page_wired(p)) + if (vm_page_remove(p)) vm_page_free(p); - else - vm_page_remove(p); vm_page_unlock(p); continue; } @@ -1639,10 +1637,8 @@ vm_object_collapse_scan(vm_object_t object, int op) vm_page_lock(p); KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); - if (!vm_page_wired(p)) + if (vm_page_remove(p)) vm_page_free(p); - else - vm_page_remove(p); vm_page_unlock(p); continue; } Modified: stable/12/sys/vm/vm_page.c ============================================================================== --- stable/12/sys/vm/vm_page.c Wed Jul 3 20:15:09 2019 (r349700) +++ stable/12/sys/vm/vm_page.c Wed Jul 3 20:17:26 2019 (r349701) @@ -1454,20 +1454,21 @@ vm_page_insert_radixdone(vm_page_t m, vm_object_t obje * vm_page_remove: * * Removes the specified page from its containing object, but does not - * invalidate any backing storage. + * invalidate any backing storage. Return true if the page may be safely + * freed and false otherwise. * * The object must be locked. The page must be locked if it is managed. */ -void +bool vm_page_remove(vm_page_t m) { vm_object_t object; vm_page_t mrem; + object = m->object; + if ((m->oflags & VPO_UNMANAGED) == 0) vm_page_assert_locked(m); - if ((object = m->object) == NULL) - return; VM_OBJECT_ASSERT_WLOCKED(object); if (vm_page_xbusied(m)) vm_page_xunbusy_maybelocked(m); @@ -1491,6 +1492,7 @@ vm_page_remove(vm_page_t m) vdrop(object->handle); m->object = NULL; + return (!vm_page_wired(m)); } /* @@ -1661,7 +1663,7 @@ vm_page_rename(vm_page_t m, vm_object_t new_object, vm */ m->pindex = opidx; vm_page_lock(m); - vm_page_remove(m); + (void)vm_page_remove(m); /* Return back to the new pindex to complete vm_page_insert(). */ m->pindex = new_pindex; @@ -3434,7 +3436,8 @@ vm_page_free_prep(vm_page_t m) if (vm_page_sbusied(m)) panic("vm_page_free_prep: freeing busy page %p", m); - vm_page_remove(m); + if (m->object != NULL) + (void)vm_page_remove(m); /* * If fictitious remove object association and Modified: stable/12/sys/vm/vm_page.h ============================================================================== --- stable/12/sys/vm/vm_page.h Wed Jul 3 20:15:09 2019 (r349700) +++ stable/12/sys/vm/vm_page.h Wed Jul 3 20:17:26 2019 (r349701) @@ -559,7 +559,7 @@ bool vm_page_reclaim_contig(int req, u_long npages, vm bool vm_page_reclaim_contig_domain(int domain, int req, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary); void vm_page_reference(vm_page_t m); -void vm_page_remove (vm_page_t); +bool vm_page_remove(vm_page_t); int vm_page_rename (vm_page_t, vm_object_t, vm_pindex_t); vm_page_t vm_page_replace(vm_page_t mnew, vm_object_t object, vm_pindex_t pindex); From owner-svn-src-all@freebsd.org Wed Jul 3 20:18:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4144415DFF5F; Wed, 3 Jul 2019 20:18:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD49A8FB7A; Wed, 3 Jul 2019 20:18:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A08C218C55; Wed, 3 Jul 2019 20:18:05 +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 x63KI5es091526; Wed, 3 Jul 2019 20:18:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63KI5sY091525; Wed, 3 Jul 2019 20:18:05 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032018.x63KI5sY091525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349702 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 349702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DD49A8FB7A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:18:06 -0000 Author: markj Date: Wed Jul 3 20:18:05 2019 New Revision: 349702 URL: https://svnweb.freebsd.org/changeset/base/349702 Log: Add mergeinfo missed in r349701. Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-all@freebsd.org Wed Jul 3 20:18:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66AA115DFFCE; Wed, 3 Jul 2019 20:18:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CAEF8FCAB; Wed, 3 Jul 2019 20:18:50 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD36D18C56; Wed, 3 Jul 2019 20:18: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 x63KInuu091599; Wed, 3 Jul 2019 20:18:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63KInW3091598; Wed, 3 Jul 2019 20:18:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032018.x63KInW3091598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349703 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 349703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0CAEF8FCAB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:18:50 -0000 Author: markj Date: Wed Jul 3 20:18:49 2019 New Revision: 349703 URL: https://svnweb.freebsd.org/changeset/base/349703 Log: MFC r349218: Group vm_page_activate()'s definition with other related functions. Modified: stable/12/sys/vm/vm_page.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_page.c ============================================================================== --- stable/12/sys/vm/vm_page.c Wed Jul 3 20:18:05 2019 (r349702) +++ stable/12/sys/vm/vm_page.c Wed Jul 3 20:18:49 2019 (r349703) @@ -3372,35 +3372,6 @@ vm_page_requeue(vm_page_t m) } /* - * vm_page_activate: - * - * Put the specified page on the active list (if appropriate). - * Ensure that act_count is at least ACT_INIT but do not otherwise - * mess with it. - * - * The page must be locked. - */ -void -vm_page_activate(vm_page_t m) -{ - - vm_page_assert_locked(m); - - if (vm_page_wired(m) || (m->oflags & VPO_UNMANAGED) != 0) - return; - if (vm_page_queue(m) == PQ_ACTIVE) { - if (m->act_count < ACT_INIT) - m->act_count = ACT_INIT; - return; - } - - vm_page_dequeue(m); - if (m->act_count < ACT_INIT) - m->act_count = ACT_INIT; - vm_page_enqueue(m, PQ_ACTIVE); -} - -/* * vm_page_free_prep: * * Prepares the given page to be put on the free list, @@ -3649,6 +3620,35 @@ vm_page_unwire_noq(vm_page_t m) return (true); } else return (false); +} + +/* + * vm_page_activate: + * + * Put the specified page on the active list (if appropriate). + * Ensure that act_count is at least ACT_INIT but do not otherwise + * mess with it. + * + * The page must be locked. + */ +void +vm_page_activate(vm_page_t m) +{ + + vm_page_assert_locked(m); + + if (vm_page_wired(m) || (m->oflags & VPO_UNMANAGED) != 0) + return; + if (vm_page_queue(m) == PQ_ACTIVE) { + if (m->act_count < ACT_INIT) + m->act_count = ACT_INIT; + return; + } + + vm_page_dequeue(m); + if (m->act_count < ACT_INIT) + m->act_count = ACT_INIT; + vm_page_enqueue(m, PQ_ACTIVE); } /* From owner-svn-src-all@freebsd.org Wed Jul 3 20:22:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B1EC15E0298; Wed, 3 Jul 2019 20:22:38 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00E3B68349; Wed, 3 Jul 2019 20:22:38 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF59718E0B; Wed, 3 Jul 2019 20:22:37 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63KMb64096551; Wed, 3 Jul 2019 20:22:37 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63KMbhq096548; Wed, 3 Jul 2019 20:22:37 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907032022.x63KMbhq096548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 3 Jul 2019 20:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349704 - stable/11/usr.sbin/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve X-SVN-Commit-Revision: 349704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 00E3B68349 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:22:38 -0000 Author: vmaffione Date: Wed Jul 3 20:22:36 2019 New Revision: 349704 URL: https://svnweb.freebsd.org/changeset/base/349704 Log: MFC r348929 bhyve: virtio: introduce vq_kick_enable() and vq_kick_disable() The VirtIO standard supports two schemes for notification suppression: a notification enable bit and a more sophisticated one (event_idx) that also supports delayed notifications. Currently bhyve fully supports only the first scheme. This patch hides the notification suppression internals by means of two inline routines, vq_kick_enable() and vq_kick_disable(), and makes the code more readable. Moreover, further improve readability by replacing the call to mb() with a call to atomic_thread_fence_seq_cst(), which is already used in virtio.c Reviewed by: pmooney_pfmooney.com, bryanv Differential Revision: https://reviews.freebsd.org/D20581 Modified: stable/11/usr.sbin/bhyve/pci_virtio_console.c stable/11/usr.sbin/bhyve/pci_virtio_net.c stable/11/usr.sbin/bhyve/virtio.c stable/11/usr.sbin/bhyve/virtio.h Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- stable/11/usr.sbin/bhyve/pci_virtio_console.c Wed Jul 3 20:18:49 2019 (r349703) +++ stable/11/usr.sbin/bhyve/pci_virtio_console.c Wed Jul 3 20:22:36 2019 (r349704) @@ -581,7 +581,7 @@ pci_vtcon_notify_rx(void *vsc, struct vqueue_info *vq) if (!port->vsp_rx_ready) { port->vsp_rx_ready = 1; - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); } } Modified: stable/11/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/11/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 20:18:49 2019 (r349703) +++ stable/11/usr.sbin/bhyve/pci_virtio_net.c Wed Jul 3 20:22:36 2019 (r349704) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifndef NETMAP_WITH_LIBS #define NETMAP_WITH_LIBS @@ -582,7 +581,7 @@ pci_vtnet_ping_rxq(void *vsc, struct vqueue_info *vq) */ if (sc->vsc_rx_ready == 0) { sc->vsc_rx_ready = 1; - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); } } @@ -628,7 +627,7 @@ pci_vtnet_ping_txq(void *vsc, struct vqueue_info *vq) /* Signal the tx thread for processing */ pthread_mutex_lock(&sc->tx_mtx); - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); if (sc->tx_in_progress == 0) pthread_cond_signal(&sc->tx_cond); pthread_mutex_unlock(&sc->tx_mtx); @@ -657,8 +656,7 @@ pci_vtnet_tx_thread(void *param) for (;;) { /* note - tx mutex is locked here */ while (sc->resetting || !vq_has_descs(vq)) { - vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; - mb(); + vq_kick_enable(vq); if (!sc->resetting && vq_has_descs(vq)) break; @@ -666,7 +664,7 @@ pci_vtnet_tx_thread(void *param) error = pthread_cond_wait(&sc->tx_cond, &sc->tx_mtx); assert(error == 0); } - vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; + vq_kick_disable(vq); sc->tx_in_progress = 1; pthread_mutex_unlock(&sc->tx_mtx); Modified: stable/11/usr.sbin/bhyve/virtio.c ============================================================================== --- stable/11/usr.sbin/bhyve/virtio.c Wed Jul 3 20:18:49 2019 (r349703) +++ stable/11/usr.sbin/bhyve/virtio.c Wed Jul 3 20:22:36 2019 (r349704) @@ -428,7 +428,8 @@ vq_relchain(struct vqueue_info *vq, uint16_t idx, uint /* * Ensure the used descriptor is visible before updating the index. - * This is necessary on ISAs with memory ordering less strict than x86. + * This is necessary on ISAs with memory ordering less strict than x86 + * (and even on x86 to act as a compiler barrier). */ atomic_thread_fence_rel(); vuh->vu_idx = uidx; Modified: stable/11/usr.sbin/bhyve/virtio.h ============================================================================== --- stable/11/usr.sbin/bhyve/virtio.h Wed Jul 3 20:18:49 2019 (r349703) +++ stable/11/usr.sbin/bhyve/virtio.h Wed Jul 3 20:22:36 2019 (r349704) @@ -31,6 +31,8 @@ #ifndef _VIRTIO_H_ #define _VIRTIO_H_ +#include + /* * These are derived from several virtio specifications. * @@ -444,6 +446,26 @@ vq_interrupt(struct virtio_softc *vs, struct vqueue_in pci_lintr_assert(vs->vs_pi); VS_UNLOCK(vs); } +} + +static inline void +vq_kick_enable(struct vqueue_info *vq) +{ + + vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; + /* + * Full memory barrier to make sure the store to vu_flags + * happens before the load from va_idx, which results from + * a subsequent call to vq_has_descs(). + */ + atomic_thread_fence_seq_cst(); +} + +static inline void +vq_kick_disable(struct vqueue_info *vq) +{ + + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; } struct iovec; From owner-svn-src-all@freebsd.org Wed Jul 3 20:52:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9D6215E0CBB; Wed, 3 Jul 2019 20:52:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 644A66AAB4; Wed, 3 Jul 2019 20:52:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 331B8192D8; Wed, 3 Jul 2019 20:52:08 +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 x63Kq8b3011539; Wed, 3 Jul 2019 20:52:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Kq8PH011520; Wed, 3 Jul 2019 20:52:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032052.x63Kq8PH011520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349705 - stable/12/contrib/elftoolchain/elfcopy X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/elfcopy X-SVN-Commit-Revision: 349705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 644A66AAB4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:52:09 -0000 Author: markj Date: Wed Jul 3 20:52:07 2019 New Revision: 349705 URL: https://svnweb.freebsd.org/changeset/base/349705 Log: MFC r349423 elfcopy: Provide a size hint when creating the section string table. Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- stable/12/contrib/elftoolchain/elfcopy/sections.c Wed Jul 3 20:22:36 2019 (r349704) +++ stable/12/contrib/elftoolchain/elfcopy/sections.c Wed Jul 3 20:52:07 2019 (r349705) @@ -1398,8 +1398,24 @@ update_shdr(struct elfcopy *ecp, int update_link) void init_shstrtab(struct elfcopy *ecp) { + Elf_Scn *shstrtab; + GElf_Shdr shdr; struct section *s; + size_t indx, sizehint; + if (elf_getshstrndx(ecp->ein, &indx) != 0) { + shstrtab = elf_getscn(ecp->ein, indx); + if (shstrtab == NULL) + errx(EXIT_FAILURE, "elf_getscn failed: %s", + elf_errmsg(-1)); + if (gelf_getshdr(shstrtab, &shdr) != &shdr) + errx(EXIT_FAILURE, "gelf_getshdr failed: %s", + elf_errmsg(-1)); + sizehint = shdr.sh_size; + } else { + sizehint = 0; + } + if ((ecp->shstrtab = calloc(1, sizeof(*ecp->shstrtab))) == NULL) err(EXIT_FAILURE, "calloc failed"); s = ecp->shstrtab; @@ -1410,7 +1426,7 @@ init_shstrtab(struct elfcopy *ecp) s->loadable = 0; s->type = SHT_STRTAB; s->vma = 0; - s->strtab = elftc_string_table_create(0); + s->strtab = elftc_string_table_create(sizehint); add_to_shstrtab(ecp, ""); add_to_shstrtab(ecp, ".symtab"); From owner-svn-src-all@freebsd.org Wed Jul 3 20:52:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60FFF15E0CD1; Wed, 3 Jul 2019 20:52:11 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0461A6AABF; Wed, 3 Jul 2019 20:52:11 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFF2D192DD; Wed, 3 Jul 2019 20:52:10 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63KqAhB013099; Wed, 3 Jul 2019 20:52:10 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63KqAH5013098; Wed, 3 Jul 2019 20:52:10 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201907032052.x63KqAH5013098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 3 Jul 2019 20:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349706 - head X-SVN-Group: head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 349706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0461A6AABF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:52:11 -0000 Author: tijl Date: Wed Jul 3 20:52:10 2019 New Revision: 349706 URL: https://svnweb.freebsd.org/changeset/base/349706 Log: Fix path of lib32 libcasper. Reported by: jhb MFC after: 1 week Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jul 3 20:52:07 2019 (r349705) +++ head/ObsoleteFiles.inc Wed Jul 3 20:52:10 2019 (r349706) @@ -825,7 +825,7 @@ OLD_FILES+=usr/share/man/man3/arc4random_stir.3.gz OLD_FILES+=usr/bin/send-pr # 20180725: Cleanup old libcasper.so.0 OLD_LIBS+=lib/libcasper.so.0 -OLD_LIBS+=lib32/libcasper.so.0 +OLD_LIBS+=usr/lib32/libcasper.so.0 # 20180722: indent(1) option renamed, test files follow OLD_FILES+=usr/bin/indent/tests/nsac.0 OLD_FILES+=usr/bin/indent/tests/nsac.0.pro From owner-svn-src-all@freebsd.org Wed Jul 3 20:53:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7061715E0D67; Wed, 3 Jul 2019 20:53:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12A706AD58; Wed, 3 Jul 2019 20:53:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5A15192F7; Wed, 3 Jul 2019 20:53:05 +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 x63Kr5qv013179; Wed, 3 Jul 2019 20:53:05 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Kr5x5013178; Wed, 3 Jul 2019 20:53:05 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032053.x63Kr5x5013178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349707 - stable/12/contrib/elftoolchain/libelftc X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/libelftc X-SVN-Commit-Revision: 349707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 12A706AD58 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:53:06 -0000 Author: markj Date: Wed Jul 3 20:53:05 2019 New Revision: 349707 URL: https://svnweb.freebsd.org/changeset/base/349707 Log: MFC r349420 libelftc: Micro-optimize string table insertion. Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c Wed Jul 3 20:52:10 2019 (r349706) +++ stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c Wed Jul 3 20:53:05 2019 (r349707) @@ -119,7 +119,7 @@ elftc_string_table_add_to_pool(Elftc_String_Table *st, st->st_string_pool_size = newsize; } - strcpy(st->st_string_pool + stlen, string); + memcpy(st->st_string_pool + stlen, string, len); ELFTC_STRING_TABLE_UPDATE_LENGTH(st, stlen + len); return (stlen); From owner-svn-src-all@freebsd.org Wed Jul 3 20:53:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF1E715E0DB3; Wed, 3 Jul 2019 20:53:19 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay119.isp.belgacom.be (mailrelay119.isp.belgacom.be [195.238.20.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 234B46AE5F; Wed, 3 Jul 2019 20:53:18 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3ARTbKaxOzHyGcuLYEnaAl6mtUPXoX/o7sNwtQ0K?= =?us-ascii?q?IMzox0I/n+rarrMEGX3/hxlliBBdydt6sezbGO+Pm9BSQp2tWoiDg6aptCVh?= =?us-ascii?q?sI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFR?= =?us-ascii?q?rhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagf79+Nhu7oRneusULgYZvJbs6xw?= =?us-ascii?q?fUrHdPZ+lY335jK0iJnxb76Mew/Zpj/DpVtvk86cNOUrj0crohQ7BAAzsoL2?= =?us-ascii?q?465MvwtRneVgSP/WcTUn8XkhVTHQfI6gzxU4rrvSv7sup93zSaPdHzQLspVz?= =?us-ascii?q?mu87tnRRn1gyoBKjU38nzYitZogaxVoByvuQFxzY3Wb4GbO/VxYqzTcMgGRW?= =?us-ascii?q?dDQspdSzBNDp+iY4YJEuEPPfxYr474p1YWsxW8AA2sD/7xxz9PgX/2xrM10+?= =?us-ascii?q?E7HgHAxwwrAtUDsGjVrNX3MKcfSuC7zLPWwjrdcv5YxDnz5JLPchA7rvGBRL?= =?us-ascii?q?R9etffx0koEgPKlFSQqYr9MjObzOQCrXaU4PF7Ve2ykWInrBtxojepy8wxiY?= =?us-ascii?q?fJnpoYx1TZ+Slj3Yo4J9+1RFRlbdOrEJZcrSKXO5ZwT8g/WW9nojw6xacDuZ?= =?us-ascii?q?OjeSgKz4koyADHZvycdoiI/grjVOGMITdknH5leKywhxK18UW4ye3zTM200F?= =?us-ascii?q?dPriVbiNnMsWoB1wDS6siFTvtx5Fuu2TGI1wDI9O5EJFo7lazAK5I7xb4wjJ?= =?us-ascii?q?UTvVzCHi/whkr2kLebe0E59uSy9ujqYLfrqoWCO4J7igzyKKcjltGnDeQ9KA?= =?us-ascii?q?cOXmyb+eqm1L3k+E30WKlKjvw0kqndq53aK94bqbCnDABOyYYs9gyzDzC80N?= =?us-ascii?q?QXhXUHNk5KeAqbj4j1PFHDOOv4Dem5g1i1izdr3ezJMqThAprTNHfMjazsfb?= =?us-ascii?q?hn60FC1gU81stf6I9OBrEGOvLzVVf7tMbEAR8hLwy03+HnBc1m1oMAX2KDG7?= =?us-ascii?q?SZMLnOvlOR/O0vJ+2MaZQbuDbnNfcq+eXhjWQkllMHeqmpx5QXYmiiHvt6O0?= =?us-ascii?q?WZfWbsgtAZHGcRpAoxUPXmh0GFUT5WYnayXr485i0lB4K8FofOXY6tgKaf0y?= =?us-ascii?q?ilBZJWfX1JBkqLEXfyeIWOQ+0MZz6KIs99jjwEUqCsS40h1R61rwL6xaBnIf?= =?us-ascii?q?TK9SIDrpLsycJ55+rJlRE9pnRICJG/1GGLB0t9mm8XRjl+iKJ/q2RT0FqO+5?= =?us-ascii?q?NUxftCGooAyelOV1IG0pqU5Ot9EN33UwTaNoOVSVSiavu8DDwbdf53xMUBNR?= =?us-ascii?q?UuU+6+hwzOinL5S4QekKaGUcQ5?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BGAAB0FR1d/1H1sVtmGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBVQMBAQEBCwGCFkcSEYEEFBSNF4lgAQGCDjUBihKOLIF7CQE?= =?us-ascii?q?BAgEBAQEBKwwBAYRAAoIfJjYHDgEDAQEFAQEBAQUBbIo3DII6IoJvAQU6HCM?= =?us-ascii?q?QCw4GBAklD0gGE4Mjgg4LpmKEMgELAYR0gQoGgTQBi3WBf4QjPoREhWIElF2?= =?us-ascii?q?VXgmCGIZWjR0nl3GEEZBckXUMJYFYTTAIgyeLRoVBPQMwjg0BAQ?= X-IPAS-Result: =?us-ascii?q?A2BGAAB0FR1d/1H1sVtmGgEBAQEBAgEBAQEHAgEBAQGBV?= =?us-ascii?q?QMBAQEBCwGCFkcSEYEEFBSNF4lgAQGCDjUBihKOLIF7CQEBAgEBAQEBKwwBA?= =?us-ascii?q?YRAAoIfJjYHDgEDAQEFAQEBAQUBbIo3DII6IoJvAQU6HCMQCw4GBAklD0gGE?= =?us-ascii?q?4Mjgg4LpmKEMgELAYR0gQoGgTQBi3WBf4QjPoREhWIElF2VXgmCGIZWjR0nl?= =?us-ascii?q?3GEEZBckXUMJYFYTTAIgyeLRoVBPQMwjg0BAQ?= Received: from 81.245-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.245.81]) by relay.skynet.be with ESMTP; 03 Jul 2019 22:52:53 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x63KqpMK088372; Wed, 3 Jul 2019 22:52:52 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Wed, 3 Jul 2019 22:52:51 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r349640 - head Message-ID: <20190703225251.07a1c4e5@kalimero.tijl.coosemans.org> In-Reply-To: <7a7b5dec-437b-7e29-1cf2-97389abf4cd2@FreeBSD.org> References: <201907030908.x6398HJo034601@repo.freebsd.org> <7a7b5dec-437b-7e29-1cf2-97389abf4cd2@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 234B46AE5F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:53:20 -0000 On Wed, 3 Jul 2019 09:11:53 -0700 John Baldwin wrote: > On 7/3/19 2:08 AM, Tijl Coosemans wrote: >> Author: tijl >> Date: Wed Jul 3 09:08:17 2019 >> New Revision: 349640 >> URL: https://svnweb.freebsd.org/changeset/base/349640 >> >> Log: >> Also remove lib32 version of libcasper.so.0. >> >> Modified: >> head/ObsoleteFiles.inc >> >> Modified: head/ObsoleteFiles.inc >> ============================================================================== >> --- head/ObsoleteFiles.inc Wed Jul 3 09:06:39 2019 (r349639) >> +++ head/ObsoleteFiles.inc Wed Jul 3 09:08:17 2019 (r349640) >> @@ -825,6 +825,7 @@ OLD_FILES+=usr/share/man/man3/arc4random_stir.3.gz >> OLD_FILES+=usr/bin/send-pr >> # 20180725: Cleanup old libcasper.so.0 >> OLD_LIBS+=lib/libcasper.so.0 >> +OLD_LIBS+=lib32/libcasper.so.0 > > Should this be usr/lib32 instead of lib32? Yes, fixed in r349706. From owner-svn-src-all@freebsd.org Wed Jul 3 20:54:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03E3B15E0EDC; Wed, 3 Jul 2019 20:54:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C2F26B030; Wed, 3 Jul 2019 20:54:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B2E7192FA; Wed, 3 Jul 2019 20:54: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 x63KsbHR013291; Wed, 3 Jul 2019 20:54:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63KsaZn013285; Wed, 3 Jul 2019 20:54:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032054.x63KsaZn013285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349708 - stable/12/contrib/elftoolchain/libelftc X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/libelftc X-SVN-Commit-Revision: 349708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9C2F26B030 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:54:38 -0000 Author: markj Date: Wed Jul 3 20:54:36 2019 New Revision: 349708 URL: https://svnweb.freebsd.org/changeset/base/349708 Log: MFC r349421: libelftc: Consistently use size_t for string table offsets and sizes. Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 stable/12/contrib/elftoolchain/libelftc/libelftc.h Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c Wed Jul 3 20:53:05 2019 (r349707) +++ stable/12/contrib/elftoolchain/libelftc/elftc_string_table.c Wed Jul 3 20:54:36 2019 (r349708) @@ -44,7 +44,7 @@ ELFTC_VCSID("$Id: elftc_string_table.c 2869 2013-01-06 #define ELFTC_STRING_TABLE_POOL_SIZE_INCREMENT (4*1024) struct _Elftc_String_Table_Entry { - int ste_idx; + ssize_t ste_idx; SLIST_ENTRY(_Elftc_String_Table_Entry) ste_next; }; @@ -64,9 +64,9 @@ struct _Elftc_String_Table_Entry { } while (0) struct _Elftc_String_Table { - unsigned int st_len; /* length and flags */ + size_t st_len; /* length and flags */ int st_nbuckets; - int st_string_pool_size; + size_t st_string_pool_size; char *st_string_pool; SLIST_HEAD(_Elftc_String_Table_Bucket, _Elftc_String_Table_Entry) st_buckets[]; @@ -86,7 +86,7 @@ elftc_string_table_find_hash_entry(Elftc_String_Table *rhashindex = hashindex; SLIST_FOREACH(ste, &st->st_buckets[hashindex], ste_next) { - s = st->st_string_pool + abs(ste->ste_idx); + s = st->st_string_pool + labs(ste->ste_idx); assert(s > st->st_string_pool && s < st->st_string_pool + st->st_string_pool_size); @@ -102,7 +102,7 @@ static int elftc_string_table_add_to_pool(Elftc_String_Table *st, const char *string) { char *newpool; - int len, newsize, stlen; + size_t len, newsize, stlen; len = strlen(string) + 1; /* length, including the trailing NUL */ stlen = ELFTC_STRING_TABLE_LENGTH(st); @@ -126,10 +126,10 @@ elftc_string_table_add_to_pool(Elftc_String_Table *st, } Elftc_String_Table * -elftc_string_table_create(int sizehint) +elftc_string_table_create(size_t sizehint) { - int n, nbuckets, tablesize; struct _Elftc_String_Table *st; + int n, nbuckets, tablesize; if (sizehint < ELFTC_STRING_TABLE_DEFAULT_SIZE) sizehint = ELFTC_STRING_TABLE_DEFAULT_SIZE; @@ -173,13 +173,13 @@ elftc_string_table_destroy(Elftc_String_Table *st) } Elftc_String_Table * -elftc_string_table_from_section(Elf_Scn *scn, int sizehint) +elftc_string_table_from_section(Elf_Scn *scn, size_t sizehint) { - int len; Elf_Data *d; GElf_Shdr sh; const char *s, *end; Elftc_String_Table *st; + size_t len; /* Verify the type of the section passed in. */ if (gelf_getshdr(scn, &sh) == NULL || @@ -235,7 +235,8 @@ elftc_string_table_image(Elftc_String_Table *st, size_ char *r, *s, *end; struct _Elftc_String_Table_Entry *ste; struct _Elftc_String_Table_Bucket *head; - int copied, hashindex, offset, length, newsize; + size_t copied, offset, length, newsize; + int hashindex; /* * For the common case of a string table has not seen @@ -303,8 +304,9 @@ elftc_string_table_image(Elftc_String_Table *st, size_ size_t elftc_string_table_insert(Elftc_String_Table *st, const char *string) { - int hashindex, idx; struct _Elftc_String_Table_Entry *ste; + ssize_t idx; + int hashindex; hashindex = 0; @@ -326,7 +328,7 @@ elftc_string_table_insert(Elftc_String_Table *st, cons idx = ste->ste_idx; if (idx < 0) /* Undelete. */ - ste->ste_idx = idx = (- idx); + ste->ste_idx = idx = -idx; return (idx); } @@ -334,8 +336,9 @@ elftc_string_table_insert(Elftc_String_Table *st, cons size_t elftc_string_table_lookup(Elftc_String_Table *st, const char *string) { - int hashindex, idx; struct _Elftc_String_Table_Entry *ste; + ssize_t idx; + int hashindex; ste = elftc_string_table_find_hash_entry(st, string, &hashindex); @@ -350,17 +353,17 @@ elftc_string_table_lookup(Elftc_String_Table *st, cons int elftc_string_table_remove(Elftc_String_Table *st, const char *string) { - int idx; struct _Elftc_String_Table_Entry *ste; + ssize_t idx; ste = elftc_string_table_find_hash_entry(st, string, NULL); if (ste == NULL || (idx = ste->ste_idx) < 0) return (ELFTC_FAILURE); - assert(idx > 0 && idx < (int) ELFTC_STRING_TABLE_LENGTH(st)); + assert(idx > 0 && (size_t)idx < ELFTC_STRING_TABLE_LENGTH(st)); - ste->ste_idx = (- idx); + ste->ste_idx = -idx; ELFTC_STRING_TABLE_SET_COMPACTION_FLAG(st); Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 Wed Jul 3 20:53:05 2019 (r349707) +++ stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 Wed Jul 3 20:54:36 2019 (r349708) @@ -24,7 +24,7 @@ .\" .\" $Id: elftc_string_table_create.3 3645 2018-10-15 20:17:14Z jkoshy $ .\" -.Dd January 5, 2013 +.Dd June 19, 2019 .Dt ELFTC_STRING_TABLE_CREATE 3 .Os .Sh NAME @@ -40,11 +40,11 @@ .Sh SYNOPSIS .In libelftc.h .Ft "Elftc_String_Table *" -.Fn elftc_string_table_create "int sizehint" +.Fn elftc_string_table_create "size_t sizehint" .Ft int .Fn elftc_string_table_destroy "Elftc_String_Table *table" .Ft "Elftc_String_Table *" -.Fn elftc_string_table_from_section "Elf_Scn *scn" "int sizehint" +.Fn elftc_string_table_from_section "Elf_Scn *scn" "size_t sizehint" .Ft "const char *" .Fo elftc_string_table_image .Fa "Elftc_String_Table *table" Modified: stable/12/contrib/elftoolchain/libelftc/libelftc.h ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/libelftc.h Wed Jul 3 20:53:05 2019 (r349707) +++ stable/12/contrib/elftoolchain/libelftc/libelftc.h Wed Jul 3 20:54:36 2019 (r349708) @@ -77,10 +77,10 @@ int elftc_demangle(const char *_mangledname, char *_b size_t _bufsize, unsigned int _flags); const char *elftc_reloc_type_str(unsigned int mach, unsigned int type); int elftc_set_timestamps(const char *_filename, struct stat *_sb); -Elftc_String_Table *elftc_string_table_create(int _hint); +Elftc_String_Table *elftc_string_table_create(size_t _sizehint); void elftc_string_table_destroy(Elftc_String_Table *_table); Elftc_String_Table *elftc_string_table_from_section(Elf_Scn *_scn, - int _hint); + size_t _sizehint); const char *elftc_string_table_image(Elftc_String_Table *_table, size_t *_sz); size_t elftc_string_table_insert(Elftc_String_Table *_table, From owner-svn-src-all@freebsd.org Wed Jul 3 20:54:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5054B15E0F2C; Wed, 3 Jul 2019 20:54:53 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E85656B133; Wed, 3 Jul 2019 20:54:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C27E1192FC; Wed, 3 Jul 2019 20:54:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63KsqbH013346; Wed, 3 Jul 2019 20:54:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63KsqRn013345; Wed, 3 Jul 2019 20:54:52 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032054.x63KsqRn013345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349709 - stable/12/contrib/elftoolchain/libelftc X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/libelftc X-SVN-Commit-Revision: 349709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E85656B133 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:54:53 -0000 Author: markj Date: Wed Jul 3 20:54:52 2019 New Revision: 349709 URL: https://svnweb.freebsd.org/changeset/base/349709 Log: MFC r349422: libelftc: Fix the documented prototype for elftc_string_table_destroy(). Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 Wed Jul 3 20:54:36 2019 (r349708) +++ stable/12/contrib/elftoolchain/libelftc/elftc_string_table_create.3 Wed Jul 3 20:54:52 2019 (r349709) @@ -41,7 +41,7 @@ .In libelftc.h .Ft "Elftc_String_Table *" .Fn elftc_string_table_create "size_t sizehint" -.Ft int +.Ft void .Fn elftc_string_table_destroy "Elftc_String_Table *table" .Ft "Elftc_String_Table *" .Fn elftc_string_table_from_section "Elf_Scn *scn" "size_t sizehint" From owner-svn-src-all@freebsd.org Wed Jul 3 20:55:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BB5215E0F7B; Wed, 3 Jul 2019 20:55:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F24246B25D; Wed, 3 Jul 2019 20:55:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA597192FD; Wed, 3 Jul 2019 20:55:08 +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 x63Kt8WJ013437; Wed, 3 Jul 2019 20:55:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63Kt8Ng013436; Wed, 3 Jul 2019 20:55:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032055.x63Kt8Ng013436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 20:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349710 - stable/12/contrib/elftoolchain/libdwarf X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/libdwarf X-SVN-Commit-Revision: 349710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F24246B25D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:55:09 -0000 Author: markj Date: Wed Jul 3 20:55:08 2019 New Revision: 349710 URL: https://svnweb.freebsd.org/changeset/base/349710 Log: MFC r349424: libdwarf: Use the cached strtab pointer when reading string attributes. Modified: stable/12/contrib/elftoolchain/libdwarf/libdwarf_attr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/libdwarf/libdwarf_attr.c ============================================================================== --- stable/12/contrib/elftoolchain/libdwarf/libdwarf_attr.c Wed Jul 3 20:54:52 2019 (r349709) +++ stable/12/contrib/elftoolchain/libdwarf/libdwarf_attr.c Wed Jul 3 20:55:08 2019 (r349710) @@ -100,7 +100,6 @@ _dwarf_attr_init(Dwarf_Debug dbg, Dwarf_Section *ds, u uint64_t form, int indirect, Dwarf_Error *error) { struct _Dwarf_Attribute atref; - Dwarf_Section *str; int ret; ret = DW_DLE_NONE; @@ -183,9 +182,7 @@ _dwarf_attr_init(Dwarf_Debug dbg, Dwarf_Section *ds, u break; case DW_FORM_strp: atref.u[0].u64 = dbg->read(ds->ds_data, offsetp, dwarf_size); - str = _dwarf_find_section(dbg, ".debug_str"); - assert(str != NULL); - atref.u[1].s = (char *) str->ds_data + atref.u[0].u64; + atref.u[1].s = _dwarf_strtab_get_table(dbg) + atref.u[0].u64; break; case DW_FORM_ref_sig8: atref.u[0].u64 = 8; From owner-svn-src-all@freebsd.org Wed Jul 3 21:01:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4541315E11FA; Wed, 3 Jul 2019 21:01:16 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay119.isp.belgacom.be (mailrelay119.isp.belgacom.be [195.238.20.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F2A76B4DF; Wed, 3 Jul 2019 21:01:15 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AsAoXkxBBr4icGE8vl1X0UyQJP3N1i/DPJgcQr6?= =?us-ascii?q?AfoPdwSPX+osbcNUDSrc9gkEXOFd2Cra4d0ayN6+u5BDJIyK3CmUhKSIZLWR?= =?us-ascii?q?4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBx?= =?us-ascii?q?rwKxd+KPjrFY7OlcS30P2594HObwlSizexfK1+IA+4oAnNucUanItvJ6cswR?= =?us-ascii?q?bVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPX?= =?us-ascii?q?w7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RD?= =?us-ascii?q?qv47t3RBLulSwKMSMy/mPKhcxqlK9VrhKvqQJizYDXYo6VOvVxcb/Sc94BWW?= =?us-ascii?q?pMXNpdWzBdDo+gcYcCCfcKM+ZCr4n6olsDtQWwBwyoBOjy1DJIgXj23bYk3O?= =?us-ascii?q?QkCw7G2hcgFM8JvXTIrdX1NqMSXPu1wqnS0zrMce5b1yrz5oTSdRAhu/6MUK?= =?us-ascii?q?t2fMHMx0cvEAbFgU+RqYzjJz6V2P4NvHaF4OV7TuKglnQrqwZrojigwMonl4?= =?us-ascii?q?rHhpoNx13A6Cl12ps5KN+6RUJhf9KpH5tduzuZOodrRM4pXntmtzwgyrIcvJ?= =?us-ascii?q?62ZC0KyJM6yBHBc/GHaI2I4g77VOaWPDd4mGppeLKhiBa29kit0u78WdOw0F?= =?us-ascii?q?ZLqypKjMPMtncX2xzP68iHSP998l291jaI0ADT8f9LIUUumqrdMJ4t2Lkwlo?= =?us-ascii?q?AcsUjbHy/2nlv5jLOOe0gg5+Sk8fnrb7fkq5OGKYN5hQHzPr4tl8CiGeg4Nx?= =?us-ascii?q?IBX2mf+eSyzr3j+kj5Ta1Wjv03kKnZtIvXJcoBpqGnHQBayZ0j5AulAzehyt?= =?us-ascii?q?QYkmELLEhZdxKfk4jpJ1bOLejjDfehhVSgiSxrx+raMbH4ApXCMGLMn6r6cL?= =?us-ascii?q?Zz8U5T1hQ8wstE551JEL0BJ+jzWkDpvtzCEhA5KxC0w/rgCNhlzYMeR2SPDr?= =?us-ascii?q?aCMKPIrVCE//ggI+2IZIIOtjb9MeYq6OD1gn8ihFARZ66p3YEYaHqgBPRpP1?= =?us-ascii?q?2ZYWbwgtcGCWoKpRA+Q/DzhFKeVj5TYnOyX6Mg5jEnFo2mF5zDS5ujgLybwi?= =?us-ascii?q?i0AIZZZntbBVyWFnfobYqEUe8WaC2OOs9hjiAEVb+5Ro8j1RGhrxT3y7R9Lu?= =?us-ascii?q?XK5CIXronj28Vv6+3UjxEy+m88M8PI8WaNSSlel2cEWD4wlPR9oUZV5E2O3I?= =?us-ascii?q?JDr7pfD9MFtN1TVQJvCXnYh8d9DMv/XwvHZZ/dVFekRv2IGzw8ZOkdhdgUbB?= =?us-ascii?q?AuSJ2Zkhnf0n/yUPcunLuRCcls/w=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AwAACMFh1d/1H1sVtmGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBVAQBAQEBCwGCFkcSEYEEFBSNF4lgAQGCDjUBihKOLIF7CQE?= =?us-ascii?q?BAgEBAQEBKwwBAYRAAoIfJjUIDgEDAQEFAQEBAQUBbIo3DII6IoJvAQU6HCM?= =?us-ascii?q?QCw4GBAklD0gGE4Mjgg4LpmKEMgELAYR0gRCBNAGLdYF/hCM+iiYElF2VXgm?= =?us-ascii?q?CGIZWjR0ngxeUWoQRkFyRcAMzgVhNMAiDJwmLPYFdg2Q9AzCODQEB?= X-IPAS-Result: =?us-ascii?q?A2AwAACMFh1d/1H1sVtmGgEBAQEBAgEBAQEHAgEBAQGBV?= =?us-ascii?q?AQBAQEBCwGCFkcSEYEEFBSNF4lgAQGCDjUBihKOLIF7CQEBAgEBAQEBKwwBA?= =?us-ascii?q?YRAAoIfJjUIDgEDAQEFAQEBAQUBbIo3DII6IoJvAQU6HCMQCw4GBAklD0gGE?= =?us-ascii?q?4Mjgg4LpmKEMgELAYR0gRCBNAGLdYF/hCM+iiYElF2VXgmCGIZWjR0ngxeUW?= =?us-ascii?q?oQRkFyRcAMzgVhNMAiDJwmLPYFdg2Q9AzCODQEB?= Received: from 81.245-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.245.81]) by relay.skynet.be with ESMTP; 03 Jul 2019 23:01:13 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x63L1DVX088422; Wed, 3 Jul 2019 23:01:13 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Wed, 3 Jul 2019 23:01:12 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r349641 - head/tools/build/mk Message-ID: <20190703230112.4f2b771a@kalimero.tijl.coosemans.org> In-Reply-To: <7c395528-4094-5d85-2b3f-2d84cce2fa3e@FreeBSD.org> References: <201907030914.x639Edrv039667@repo.freebsd.org> <7c395528-4094-5d85-2b3f-2d84cce2fa3e@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6F2A76B4DF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 21:01:16 -0000 On Wed, 3 Jul 2019 09:14:48 -0700 John Baldwin wrote: > On 7/3/19 2:14 AM, Tijl Coosemans wrote: >> Author: tijl >> Date: Wed Jul 3 09:14:39 2019 >> New Revision: 349641 >> URL: https://svnweb.freebsd.org/changeset/base/349641 >> >> Log: >> Also remove lib32 versions of libradius. >> >> MFC after: 1 week > > I do wonder if we shouldn't try to make OLD_LIBS a bit > smarter by having it expand to also include the lib32 > (and libsoft) variants. Having some kind of helper > to deal with the non-dynamic libs would also be nice > (it would remove libfoo.a, libfoo_p.a, and libfoo.so > which always live in /usr/lib, /usr/lib32, and /usr/libsoft). I hope this file just goes away with base packages. From owner-svn-src-all@freebsd.org Wed Jul 3 21:05:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1375015E1340; Wed, 3 Jul 2019 21:05:42 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE5A46B9E0; Wed, 3 Jul 2019 21:05: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7853D194B8; Wed, 3 Jul 2019 21:05: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 x63L5fFY018881; Wed, 3 Jul 2019 21:05:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63L5f6d018880; Wed, 3 Jul 2019 21:05:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907032105.x63L5f6d018880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jul 2019 21:05:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349711 - head/sys/dev/iwm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/iwm X-SVN-Commit-Revision: 349711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE5A46B9E0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 21:05:42 -0000 Author: markj Date: Wed Jul 3 21:05:40 2019 New Revision: 349711 URL: https://svnweb.freebsd.org/changeset/base/349711 Log: iwm: Drain callouts after stopping the device during detach. Otherwise there is a window where they may be rescheduled. This typically manifested as a page fault shortly after unloading if_iwm.ko. Close the race by draining callouts after calling iwm_stop_device(), which is also what Dragonfly does. Change whitespace to reduce gratuitous diffs with Dragonfly. Reported and tested by: seanc MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Jul 3 20:55:08 2019 (r349710) +++ head/sys/dev/iwm/if_iwm.c Wed Jul 3 21:05:40 2019 (r349711) @@ -6330,12 +6330,9 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211 if (!sc->sc_attached) return 0; sc->sc_attached = 0; - - if (do_net80211) + if (do_net80211) { ieee80211_draintask(&sc->sc_ic, &sc->sc_es_task); - - callout_drain(&sc->sc_led_blink_to); - callout_drain(&sc->sc_watchdog_to); + } iwm_stop_device(sc); if (do_net80211) { IWM_LOCK(sc); @@ -6343,6 +6340,8 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211 IWM_UNLOCK(sc); ieee80211_ifdetach(&sc->sc_ic); } + callout_drain(&sc->sc_led_blink_to); + callout_drain(&sc->sc_watchdog_to); iwm_phy_db_free(sc->sc_phy_db); sc->sc_phy_db = NULL; From owner-svn-src-all@freebsd.org Wed Jul 3 21:30:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE17715E18A4; Wed, 3 Jul 2019 21:30:19 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64F4D6C556; Wed, 3 Jul 2019 21:30:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F1A41981D; Wed, 3 Jul 2019 21:30:19 +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 x63LUIuw029325; Wed, 3 Jul 2019 21:30:18 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63LUI8c029324; Wed, 3 Jul 2019 21:30:18 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201907032130.x63LUI8c029324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 3 Jul 2019 21:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349712 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 349712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 64F4D6C556 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 21:30:19 -0000 Author: jhibbits Date: Wed Jul 3 21:30:18 2019 New Revision: 349712 URL: https://svnweb.freebsd.org/changeset/base/349712 Log: MFC r348299 kern/CTF: link_elf_ctf_get() on big endian platforms Check the CTF magic number in big endian platforms. This lets DTrace FBT handle types correctly on these platforms. Modified: stable/12/sys/kern/kern_ctf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_ctf.c ============================================================================== --- stable/12/sys/kern/kern_ctf.c Wed Jul 3 21:05:40 2019 (r349711) +++ stable/12/sys/kern/kern_ctf.c Wed Jul 3 21:30:18 2019 (r349712) @@ -193,8 +193,12 @@ link_elf_ctf_get(linker_file_t lf, linker_ctf_t *lc) NOCRED, NULL, td)) != 0) goto out; - /* Check the CTF magic number. (XXX check for big endian!) */ + /* Check the CTF magic number. */ +#ifdef __LITTLE_ENDIAN__ if (ctf_hdr[0] != 0xf1 || ctf_hdr[1] != 0xcf) { +#else + if (ctf_hdr[0] != 0xcf || ctf_hdr[1] != 0xf1) { +#endif printf("%s(%d): module %s has invalid format\n", __func__, __LINE__, lf->pathname); error = EFTYPE; From owner-svn-src-all@freebsd.org Wed Jul 3 22:41:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B250E15E2AE2; Wed, 3 Jul 2019 22:41:55 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 588E76E471; Wed, 3 Jul 2019 22:41:55 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34CD91A446; Wed, 3 Jul 2019 22:41:55 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x63MftF6069723; Wed, 3 Jul 2019 22:41:55 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x63MftaM069722; Wed, 3 Jul 2019 22:41:55 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201907032241.x63MftaM069722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Wed, 3 Jul 2019 22:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349713 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 588E76E471 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 22:41:55 -0000 Author: dougm Date: Wed Jul 3 22:41:54 2019 New Revision: 349713 URL: https://svnweb.freebsd.org/changeset/base/349713 Log: Eliminate a goto and a label in vm_map_wire_locked by inserting an 'else'. Reviewed by: alc Approved by: kib, markj (mentors, implicit) Differential Revision: https://reviews.freebsd.org/D20845 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Jul 3 21:30:18 2019 (r349712) +++ head/sys/vm/vm_map.c Wed Jul 3 22:41:54 2019 (r349713) @@ -3170,9 +3170,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm rv = KERN_INVALID_ADDRESS; goto done; } - goto next_entry; - } - if (entry->wired_count == 0) { + } else if (entry->wired_count == 0) { entry->wired_count++; npages = atop(entry->end - entry->start); @@ -3250,7 +3248,6 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm * Check the map for holes in the specified region. * If VM_MAP_WIRE_HOLESOK was specified, skip this check. */ - next_entry: if ((flags & VM_MAP_WIRE_HOLESOK) == 0 && entry->end < end && entry->next->start > entry->end) { end = entry->end; From owner-svn-src-all@freebsd.org Thu Jul 4 02:51:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 494F115E7180; Thu, 4 Jul 2019 02:51:36 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E26E475738; Thu, 4 Jul 2019 02:51:35 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDCB41CDC6; Thu, 4 Jul 2019 02:51:35 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x642pZ3A099144; Thu, 4 Jul 2019 02:51:35 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x642pZch099141; Thu, 4 Jul 2019 02:51:35 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201907040251.x642pZch099141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Thu, 4 Jul 2019 02:51:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349714 - head/sys/dev/proto X-SVN-Group: head X-SVN-Commit-Author: marcel X-SVN-Commit-Paths: head/sys/dev/proto X-SVN-Commit-Revision: 349714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E26E475738 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 02:51:36 -0000 Author: marcel Date: Thu Jul 4 02:51:34 2019 New Revision: 349714 URL: https://svnweb.freebsd.org/changeset/base/349714 Log: Lock busdma operations and serialize detach against open/close Use sx to allow M_WAITOK allocations (suggested by markj). admbugs: 782 Reviewed by: markj Modified: head/sys/dev/proto/proto.h head/sys/dev/proto/proto_busdma.c head/sys/dev/proto/proto_busdma.h head/sys/dev/proto/proto_core.c Modified: head/sys/dev/proto/proto.h ============================================================================== --- head/sys/dev/proto/proto.h Wed Jul 3 22:41:54 2019 (r349713) +++ head/sys/dev/proto/proto.h Thu Jul 4 02:51:34 2019 (r349714) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014, 2015 Marcel Moolenaar + * Copyright (c) 2014, 2015, 2019 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,8 @@ #define PROTO_RES_BUSDMA 11 struct proto_res { - int r_type; + u_int r_type:8; + u_int r_opened:1; int r_rid; union { struct resource *res; @@ -47,13 +48,14 @@ struct proto_res { void *cookie; struct cdev *cdev; } r_u; - uintptr_t r_opened; }; struct proto_softc { device_t sc_dev; struct proto_res sc_res[PROTO_RES_MAX]; int sc_rescnt; + int sc_opencnt; + struct mtx sc_mtx; }; extern devclass_t proto_devclass; Modified: head/sys/dev/proto/proto_busdma.c ============================================================================== --- head/sys/dev/proto/proto_busdma.c Wed Jul 3 22:41:54 2019 (r349713) +++ head/sys/dev/proto/proto_busdma.c Thu Jul 4 02:51:34 2019 (r349714) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Marcel Moolenaar + * Copyright (c) 2015, 2019 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -355,6 +356,7 @@ proto_busdma_attach(struct proto_softc *sc) struct proto_busdma *busdma; busdma = malloc(sizeof(*busdma), M_PROTO_BUSDMA, M_WAITOK | M_ZERO); + sx_init(&busdma->sxlck, "proto-busdma"); return (busdma); } @@ -363,6 +365,7 @@ proto_busdma_detach(struct proto_softc *sc, struct pro { proto_busdma_cleanup(sc, busdma); + sx_destroy(&busdma->sxlck); free(busdma, M_PROTO_BUSDMA); return (0); } @@ -373,10 +376,12 @@ proto_busdma_cleanup(struct proto_softc *sc, struct pr struct proto_md *md, *md1; struct proto_tag *tag, *tag1; + sx_xlock(&busdma->sxlck); LIST_FOREACH_SAFE(md, &busdma->mds, mds, md1) proto_busdma_md_destroy_internal(busdma, md); LIST_FOREACH_SAFE(tag, &busdma->tags, tags, tag1) proto_busdma_tag_destroy(busdma, tag); + sx_xunlock(&busdma->sxlck); return (0); } @@ -388,6 +393,8 @@ proto_busdma_ioctl(struct proto_softc *sc, struct prot struct proto_md *md; int error; + sx_xlock(&busdma->sxlck); + error = 0; switch (ioc->request) { case PROTO_IOC_BUSDMA_TAG_CREATE: @@ -470,6 +477,9 @@ proto_busdma_ioctl(struct proto_softc *sc, struct prot error = EINVAL; break; } + + sx_xunlock(&busdma->sxlck); + return (error); } @@ -477,11 +487,20 @@ int proto_busdma_mmap_allowed(struct proto_busdma *busdma, vm_paddr_t physaddr) { struct proto_md *md; + int result; + sx_xlock(&busdma->sxlck); + + result = 0; LIST_FOREACH(md, &busdma->mds, mds) { if (physaddr >= trunc_page(md->physaddr) && - physaddr <= trunc_page(md->physaddr + md->tag->maxsz)) - return (1); + physaddr <= trunc_page(md->physaddr + md->tag->maxsz)) { + result = 1; + break; + } } - return (0); + + sx_xunlock(&busdma->sxlck); + + return (result); } Modified: head/sys/dev/proto/proto_busdma.h ============================================================================== --- head/sys/dev/proto/proto_busdma.h Wed Jul 3 22:41:54 2019 (r349713) +++ head/sys/dev/proto/proto_busdma.h Thu Jul 4 02:51:34 2019 (r349714) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Marcel Moolenaar + * Copyright (c) 2015, 2019 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,6 +60,7 @@ struct proto_busdma { LIST_HEAD(,proto_tag) tags; LIST_HEAD(,proto_md) mds; bus_dma_tag_t bd_roottag; + struct sx sxlck; }; struct proto_busdma *proto_busdma_attach(struct proto_softc *); Modified: head/sys/dev/proto/proto_core.c ============================================================================== --- head/sys/dev/proto/proto_core.c Wed Jul 3 22:41:54 2019 (r349713) +++ head/sys/dev/proto/proto_core.c Thu Jul 4 02:51:34 2019 (r349714) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014, 2015 Marcel Moolenaar + * Copyright (c) 2014, 2015, 2019 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -184,6 +184,7 @@ proto_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; + mtx_init(&sc->sc_mtx, "proto-softc", NULL, MTX_DEF); for (res = 0; res < sc->sc_rescnt; res++) { r = sc->sc_res + res; @@ -231,15 +232,16 @@ proto_detach(device_t dev) sc = device_get_softc(dev); - /* Don't detach if we have open device files. */ - for (res = 0; res < sc->sc_rescnt; res++) { - r = sc->sc_res + res; - if (r->r_opened) - return (EBUSY); - } + mtx_lock(&sc->sc_mtx); + if (sc->sc_opencnt == 0) + sc->sc_opencnt = -1; + mtx_unlock(&sc->sc_mtx); + if (sc->sc_opencnt > 0) + return (EBUSY); for (res = 0; res < sc->sc_rescnt; res++) { r = sc->sc_res + res; + switch (r->r_type) { case SYS_RES_IRQ: /* XXX TODO */ @@ -252,21 +254,25 @@ proto_detach(device_t dev) break; case SYS_RES_MEMORY: case SYS_RES_IOPORT: + destroy_dev(r->r_u.cdev); bus_release_resource(dev, r->r_type, r->r_rid, r->r_d.res); - destroy_dev(r->r_u.cdev); break; case PROTO_RES_PCICFG: destroy_dev(r->r_u.cdev); break; case PROTO_RES_BUSDMA: - proto_busdma_detach(sc, r->r_d.busdma); destroy_dev(r->r_u.cdev); + proto_busdma_detach(sc, r->r_d.busdma); break; } r->r_type = PROTO_RES_UNUSED; } + mtx_lock(&sc->sc_mtx); sc->sc_rescnt = 0; + sc->sc_opencnt = 0; + mtx_unlock(&sc->sc_mtx); + mtx_destroy(&sc->sc_mtx); return (0); } @@ -278,11 +284,23 @@ static int proto_open(struct cdev *cdev, int oflags, int devtype, struct thread *td) { struct proto_res *r; + struct proto_softc *sc; + int error; - r = cdev->si_drv2; - if (!atomic_cmpset_acq_ptr(&r->r_opened, 0UL, (uintptr_t)td->td_proc)) - return (EBUSY); - return (0); + sc = cdev->si_drv1; + mtx_lock(&sc->sc_mtx); + if (sc->sc_opencnt >= 0) { + r = cdev->si_drv2; + if (!r->r_opened) { + r->r_opened = 1; + sc->sc_opencnt++; + error = 0; + } else + error = EBUSY; + } else + error = ENXIO; + mtx_unlock(&sc->sc_mtx); + return (error); } static int @@ -290,14 +308,24 @@ proto_close(struct cdev *cdev, int fflag, int devtype, { struct proto_res *r; struct proto_softc *sc; + int error; sc = cdev->si_drv1; - r = cdev->si_drv2; - if (!atomic_cmpset_acq_ptr(&r->r_opened, (uintptr_t)td->td_proc, 0UL)) - return (ENXIO); - if (r->r_type == PROTO_RES_BUSDMA) - proto_busdma_cleanup(sc, r->r_d.busdma); - return (0); + mtx_lock(&sc->sc_mtx); + if (sc->sc_opencnt > 0) { + r = cdev->si_drv2; + if (r->r_opened) { + if (r->r_type == PROTO_RES_BUSDMA) + proto_busdma_cleanup(sc, r->r_d.busdma); + r->r_opened = 0; + sc->sc_opencnt--; + error = 0; + } else + error = ENXIO; + } else + error = ENXIO; + mtx_unlock(&sc->sc_mtx); + return (error); } static int From owner-svn-src-all@freebsd.org Thu Jul 4 03:04:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3296315E7C2E; Thu, 4 Jul 2019 03:04:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD0C07633D; Thu, 4 Jul 2019 03:04:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A71381D0FD; Thu, 4 Jul 2019 03:04:42 +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 x6434geh008059; Thu, 4 Jul 2019 03:04:42 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6434g8k008057; Thu, 4 Jul 2019 03:04:42 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907040304.x6434g8k008057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 4 Jul 2019 03:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349715 - in stable: 11/sbin/ipf/ipmon 11/tools/build/mk 12/sbin/ipf/ipmon 12/tools/build/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sbin/ipf/ipmon 11/tools/build/mk 12/sbin/ipf/ipmon 12/tools/build/mk X-SVN-Commit-Revision: 349715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CD0C07633D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 03:04:43 -0000 Author: cy Date: Thu Jul 4 03:04:41 2019 New Revision: 349715 URL: https://svnweb.freebsd.org/changeset/base/349715 Log: MFC r349449, r349452: Add the ipmon.5 man page and link ipmon.conf.5 to it. PR/238816 initially addressed updates to usage() however the PR has morphed into a shopping list of updates to usage() and man pages. PR: 238816 Modified: stable/11/sbin/ipf/ipmon/Makefile stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sbin/ipf/ipmon/Makefile stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/11/sbin/ipf/ipmon/Makefile ============================================================================== --- stable/11/sbin/ipf/ipmon/Makefile Thu Jul 4 02:51:34 2019 (r349714) +++ stable/11/sbin/ipf/ipmon/Makefile Thu Jul 4 03:04:41 2019 (r349715) @@ -3,7 +3,8 @@ PACKAGE= ipf PROG= ipmon SRCS= ${GENHDRS} ipmon.c ipmon_y.c ipmon_l.c -MAN= ipmon.8 +MAN= ipmon.5 ipmon.8 +MLINKS= ipmon.5 ipmon.conf.5 CFLAGS+= -DLOGFAC=LOG_LOCAL0 -I. Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Thu Jul 4 02:51:34 2019 (r349714) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Thu Jul 4 03:04:41 2019 (r349715) @@ -3415,6 +3415,8 @@ OLD_FILES+=usr/share/man/man5/ipf.5.gz OLD_FILES+=usr/share/man/man5/ipf.conf.5.gz OLD_FILES+=usr/share/man/man5/ipf6.conf.5.gz OLD_FILES+=usr/share/man/man5/ipfilter.5.gz +OLD_FILES+=usr/share/man/man8/ipmon.5.gz +OLD_FILES+=usr/share/man/man5/ipmon.conf.5.gz OLD_FILES+=usr/share/man/man5/ipnat.5.gz OLD_FILES+=usr/share/man/man5/ipnat.conf.5.gz OLD_FILES+=usr/share/man/man5/ippool.5.gz From owner-svn-src-all@freebsd.org Thu Jul 4 03:04:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B579615E7C33; Thu, 4 Jul 2019 03:04:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B45A7633E; Thu, 4 Jul 2019 03:04:43 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 362121D0FE; Thu, 4 Jul 2019 03:04:43 +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 x6434hi1008066; Thu, 4 Jul 2019 03:04:43 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6434giZ008064; Thu, 4 Jul 2019 03:04:42 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907040304.x6434giZ008064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 4 Jul 2019 03:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349715 - in stable: 11/sbin/ipf/ipmon 11/tools/build/mk 12/sbin/ipf/ipmon 12/tools/build/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sbin/ipf/ipmon 11/tools/build/mk 12/sbin/ipf/ipmon 12/tools/build/mk X-SVN-Commit-Revision: 349715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5B45A7633E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 03:04:43 -0000 Author: cy Date: Thu Jul 4 03:04:41 2019 New Revision: 349715 URL: https://svnweb.freebsd.org/changeset/base/349715 Log: MFC r349449, r349452: Add the ipmon.5 man page and link ipmon.conf.5 to it. PR/238816 initially addressed updates to usage() however the PR has morphed into a shopping list of updates to usage() and man pages. PR: 238816 Modified: stable/12/sbin/ipf/ipmon/Makefile stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sbin/ipf/ipmon/Makefile stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/12/sbin/ipf/ipmon/Makefile ============================================================================== --- stable/12/sbin/ipf/ipmon/Makefile Thu Jul 4 02:51:34 2019 (r349714) +++ stable/12/sbin/ipf/ipmon/Makefile Thu Jul 4 03:04:41 2019 (r349715) @@ -3,7 +3,8 @@ PACKAGE= ipf PROG= ipmon SRCS= ${GENHDRS} ipmon.c ipmon_y.c ipmon_l.c -MAN= ipmon.8 +MAN= ipmon.5 ipmon.8 +MLINKS= ipmon.5 ipmon.conf.5 CFLAGS+= -DLOGFAC=LOG_LOCAL0 -I. Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Thu Jul 4 02:51:34 2019 (r349714) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Thu Jul 4 03:04:41 2019 (r349715) @@ -3338,6 +3338,8 @@ OLD_FILES+=usr/share/man/man5/ipf.5.gz OLD_FILES+=usr/share/man/man5/ipf.conf.5.gz OLD_FILES+=usr/share/man/man5/ipf6.conf.5.gz OLD_FILES+=usr/share/man/man5/ipfilter.5.gz +OLD_FILES+=usr/share/man/man8/ipmon.5.gz +OLD_FILES+=usr/share/man/man5/ipmon.conf.5.gz OLD_FILES+=usr/share/man/man5/ipnat.5.gz OLD_FILES+=usr/share/man/man5/ipnat.conf.5.gz OLD_FILES+=usr/share/man/man5/ippool.5.gz From owner-svn-src-all@freebsd.org Thu Jul 4 03:08:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F30815E7E4E; Thu, 4 Jul 2019 03:08:15 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4C1A766B9; Thu, 4 Jul 2019 03:08:14 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A02F61D112; Thu, 4 Jul 2019 03:08:14 +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 x6438EqT008284; Thu, 4 Jul 2019 03:08:14 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6438EVl008283; Thu, 4 Jul 2019 03:08:14 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907040308.x6438EVl008283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 4 Jul 2019 03:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349716 - in stable: 11/contrib/ipfilter/tools 12/contrib/ipfilter/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter/tools 12/contrib/ipfilter/tools X-SVN-Commit-Revision: 349716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4C1A766B9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 03:08:15 -0000 Author: cy Date: Thu Jul 4 03:08:14 2019 New Revision: 349716 URL: https://svnweb.freebsd.org/changeset/base/349716 Log: MFC r349450-349451: Update usage() to refect the current state of ipmon. PR: 238816 Modified: stable/11/contrib/ipfilter/tools/ipmon.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/ipfilter/tools/ipmon.c Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/ipfilter/tools/ipmon.c ============================================================================== --- stable/11/contrib/ipfilter/tools/ipmon.c Thu Jul 4 03:04:41 2019 (r349715) +++ stable/11/contrib/ipfilter/tools/ipmon.c Thu Jul 4 03:08:14 2019 (r349716) @@ -1438,7 +1438,10 @@ printipflog: static void usage(prog) char *prog; { - fprintf(stderr, "%s: [-NFhstvxX] [-f ]\n", prog); + fprintf(stderr, "Usage: %s [ -abDFhnpstvxX ] [ -B ] [ -C ]\n" + "\t[ -f ] [ -L ] [ -N ]\n" + "\t[ -o [NSI] ] [ -O [NSI] ] [ -P ] [ -S ]\n" + "\t[ ]\n", prog); exit(1); } From owner-svn-src-all@freebsd.org Thu Jul 4 03:08:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9897115E7E52; Thu, 4 Jul 2019 03:08:15 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E6BE766BA; Thu, 4 Jul 2019 03:08:15 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B5EA1D113; Thu, 4 Jul 2019 03:08:15 +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 x6438EFJ008290; Thu, 4 Jul 2019 03:08:14 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6438Ebm008289; Thu, 4 Jul 2019 03:08:14 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907040308.x6438Ebm008289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 4 Jul 2019 03:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349716 - in stable: 11/contrib/ipfilter/tools 12/contrib/ipfilter/tools X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter/tools 12/contrib/ipfilter/tools X-SVN-Commit-Revision: 349716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E6BE766BA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 03:08:15 -0000 Author: cy Date: Thu Jul 4 03:08:14 2019 New Revision: 349716 URL: https://svnweb.freebsd.org/changeset/base/349716 Log: MFC r349450-349451: Update usage() to refect the current state of ipmon. PR: 238816 Modified: stable/12/contrib/ipfilter/tools/ipmon.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/tools/ipmon.c Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/ipfilter/tools/ipmon.c ============================================================================== --- stable/12/contrib/ipfilter/tools/ipmon.c Thu Jul 4 03:04:41 2019 (r349715) +++ stable/12/contrib/ipfilter/tools/ipmon.c Thu Jul 4 03:08:14 2019 (r349716) @@ -1438,7 +1438,10 @@ printipflog: static void usage(prog) char *prog; { - fprintf(stderr, "%s: [-NFhstvxX] [-f ]\n", prog); + fprintf(stderr, "Usage: %s [ -abDFhnpstvxX ] [ -B ] [ -C ]\n" + "\t[ -f ] [ -L ] [ -N ]\n" + "\t[ -o [NSI] ] [ -O [NSI] ] [ -P ] [ -S ]\n" + "\t[ ]\n", prog); exit(1); } From owner-svn-src-all@freebsd.org Thu Jul 4 07:29:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A78915CB21A; Thu, 4 Jul 2019 07:29:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C187E84C01; Thu, 4 Jul 2019 07:29: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98AD11FC9A; Thu, 4 Jul 2019 07:29: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 x647TMWV042513; Thu, 4 Jul 2019 07:29:22 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x647TIWe042494; Thu, 4 Jul 2019 07:29:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201907040729.x647TIWe042494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 4 Jul 2019 07:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349717 - stable/12/contrib/bzip2 X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/contrib/bzip2 X-SVN-Commit-Revision: 349717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C187E84C01 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 07:29:23 -0000 Author: delphij Date: Thu Jul 4 07:29:18 2019 New Revision: 349717 URL: https://svnweb.freebsd.org/changeset/base/349717 Log: MFC r349505: Upgrade to Bzip2 version 1.0.7. Modified: stable/12/contrib/bzip2/CHANGES stable/12/contrib/bzip2/LICENSE stable/12/contrib/bzip2/README stable/12/contrib/bzip2/README.COMPILATION.PROBLEMS stable/12/contrib/bzip2/blocksort.c stable/12/contrib/bzip2/bzip2.1 stable/12/contrib/bzip2/bzip2.c stable/12/contrib/bzip2/bzip2recover.c stable/12/contrib/bzip2/bzlib.c stable/12/contrib/bzip2/bzlib.h stable/12/contrib/bzip2/bzlib_private.h stable/12/contrib/bzip2/compress.c stable/12/contrib/bzip2/crctable.c stable/12/contrib/bzip2/decompress.c stable/12/contrib/bzip2/huffman.c stable/12/contrib/bzip2/randtable.c stable/12/contrib/bzip2/spewG.c stable/12/contrib/bzip2/unzcrash.c stable/12/contrib/bzip2/words2 Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/bzip2/CHANGES ============================================================================== --- stable/12/contrib/bzip2/CHANGES Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/CHANGES Thu Jul 4 07:29:18 2019 (r349717) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -325,3 +325,16 @@ Security fix only. Fixes CERT-FI 20469 as it applies Izdebski. * Make the documentation build on Ubuntu 10.04 + +1.0.7 (27 Jun 19) +~~~~~~~~~~~~~~~~~ + +* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH + +* bzip2: Fix return value when combining --test,-t and -q. + +* bzip2recover: Fix buffer overflow for large argv[0] + +* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189) + +* Make sure nSelectors is not out of range (CVE-2019-12900) Modified: stable/12/contrib/bzip2/LICENSE ============================================================================== --- stable/12/contrib/bzip2/LICENSE Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/LICENSE Thu Jul 4 07:29:18 2019 (r349717) @@ -36,7 +36,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUD NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Julian Seward, jseward@bzip.org -bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Julian Seward, jseward@acm.org +bzip2/libbzip2 version 1.0.7 of 27 June 2019 -------------------------------------------------------------------------- Modified: stable/12/contrib/bzip2/README ============================================================================== --- stable/12/contrib/bzip2/README Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/README Thu Jul 4 07:29:18 2019 (r349717) @@ -6,8 +6,8 @@ This version is fully compatible with the previous pub This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.6 of 6 September 2010 -Copyright (C) 1996-2010 Julian Seward +bzip2/libbzip2 version 1.0.7 of 27 June 2019 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in this file. @@ -73,7 +73,7 @@ HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. It's difficult for me to support compilation on all these platforms. My approach is to collect binaries for these platforms, and put them -on the master web site (http://www.bzip.org). Look there. However +on the master web site (https://sourceware.org/bzip2/). Look there. However (FWIW), bzip2-1.0.X is very standard ANSI C and should compile unmodified with MS Visual C. If you have difficulties building, you might want to read README.COMPILATION.PROBLEMS. @@ -161,43 +161,22 @@ WHAT'S NEW IN 0.9.5 ? * Many small improvements in file and flag handling. * A Y2K statement. -WHAT'S NEW IN 1.0.0 ? +WHAT'S NEW IN 1.0.x ? See the CHANGES file. -WHAT'S NEW IN 1.0.2 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.3 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.4 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.5 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.6 ? - - See the CHANGES file. - - I hope you find bzip2 useful. Feel free to contact me at - jseward@bzip.org + jseward@acm.org if you have any suggestions or queries. Many people mailed me with comments, suggestions and patches after the releases of bzip-0.15, bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this feedback. I thank you for your comments. -bzip2's "home" is http://www.bzip.org/ +bzip2's "home" is https://sourceware.org/bzip2/ Julian Seward -jseward@bzip.org +jseward@acm.org Cambridge, UK. 18 July 1996 (version 0.15) @@ -213,3 +192,4 @@ Cambridge, UK. 20 December 2006 (bzip2, version 1.0.4) 10 December 2007 (bzip2, version 1.0.5) 6 Sept 2010 (bzip2, version 1.0.6) +27 June 2019 (bzip2, version 1.0.7) Modified: stable/12/contrib/bzip2/README.COMPILATION.PROBLEMS ============================================================================== --- stable/12/contrib/bzip2/README.COMPILATION.PROBLEMS Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/README.COMPILATION.PROBLEMS Thu Jul 4 07:29:18 2019 (r349717) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.6 of 6 September 2010 -Copyright (C) 1996-2010 Julian Seward +bzip2/libbzip2 version 1.0.7 of 27 June 2019 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -12,7 +12,7 @@ This program is released under the terms of the licens in the file LICENSE. ------------------------------------------------------------------ -bzip2-1.0.6 should compile without problems on the vast majority of +bzip2 should compile without problems on the vast majority of platforms. Using the supplied Makefile, I've built and tested it myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ 6.0 and nmake, you can build a native Win32 version too. Large file Modified: stable/12/contrib/bzip2/blocksort.c ============================================================================== --- stable/12/contrib/bzip2/blocksort.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/blocksort.c Thu Jul 4 07:29:18 2019 (r349717) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap, bhtab [ 0 .. 2+(nblock/32) ] destroyed */ -#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) -#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) -#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) +#define SET_BH(zz) bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31)) +#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31)) +#define ISSET_BH(zz) (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31))) #define WORD_BH(zz) bhtab[(zz) >> 5] #define UNALIGNED_BH(zz) ((zz) & 0x01f) Modified: stable/12/contrib/bzip2/bzip2.1 ============================================================================== --- stable/12/contrib/bzip2/bzip2.1 Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/bzip2.1 Thu Jul 4 07:29:18 2019 (r349717) @@ -1,6 +1,6 @@ .TH bzip2 1 .SH NAME -bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6 +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.7 .br bzcat \- decompresses files to stdout .br @@ -404,7 +404,7 @@ I/O error messages are not as helpful as they could be tries hard to detect I/O errors and exit cleanly, but the details of what the problem is sometimes seem rather misleading. -This manual page pertains to version 1.0.6 of +This manual page pertains to version 1.0.7 of .I bzip2. Compressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions @@ -426,9 +426,9 @@ with MaybeUInt64 set to be an unsigned 64-bit integer. .SH AUTHOR -Julian Seward, jsewardbzip.org. +Julian Seward, jseward@acm.org. -http://www.bzip.org +https://sourceware.org/bzip2/ The ideas embodied in .I bzip2 Modified: stable/12/contrib/bzip2/bzip2.c ============================================================================== --- stable/12/contrib/bzip2/bzip2.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/bzip2.c Thu Jul 4 07:29:18 2019 (r349717) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -554,7 +554,7 @@ static Bool testStream ( FILE *zStream ) { BZFILE* bzf = NULL; - Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i; + Int32 bzerr, bzerr_dummy, ret, streamNo, i; UChar obuf[5000]; UChar unused[BZ_MAX_UNUSED]; Int32 nUnused; @@ -577,7 +577,7 @@ Bool testStream ( FILE *zStream ) streamNo++; while (bzerr == BZ_OK) { - nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 ); + BZ2_bzRead ( &bzerr, bzf, obuf, 5000 ); if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler; } if (bzerr != BZ_STREAM_END) goto errhandler; @@ -749,7 +749,7 @@ void panic ( const Char* s ) "\n%s: PANIC -- internal consistency error:\n" "\t%s\n" "\tThis is a BUG. Please report it to me at:\n" - "\tjseward@bzip.org\n", + "\tjseward@acm.org\n", progName, s ); showFileNames(); cleanUpAndFail( 3 ); @@ -829,7 +829,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n ) " The user's manual, Section 4.3, has more info on (1) and (2).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (1)\n" - " or (2), feel free to report it to me at: jseward@bzip.org.\n" + " or (2), feel free to report it to me at: jseward@acm.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" @@ -852,7 +852,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n ) " The user's manual, Section 4.3, has more info on (2) and (3).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (2)\n" - " or (3), feel free to report it to me at: jseward@bzip.org.\n" + " or (3), feel free to report it to me at: jseward@acm.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" @@ -1609,7 +1609,7 @@ void license ( void ) " \n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms set out in the LICENSE file, which is included\n" - " in the bzip2-1.0.6 source distribution.\n" + " in the bzip2 source distribution.\n" " \n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -2005,12 +2005,14 @@ IntNative main ( IntNative argc, Char *argv[] ) testf ( aa->name ); } } - if (testFailsExist && noisy) { - fprintf ( stderr, - "\n" - "You can use the `bzip2recover' program to attempt to recover\n" - "data from undamaged sections of corrupted files.\n\n" - ); + if (testFailsExist) { + if (noisy) { + fprintf ( stderr, + "\n" + "You can use the `bzip2recover' program to attempt to recover\n" + "data from undamaged sections of corrupted files.\n\n" + ); + } setExit(2); exit(exitValue); } Modified: stable/12/contrib/bzip2/bzip2recover.c ============================================================================== --- stable/12/contrib/bzip2/bzip2recover.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/bzip2recover.c Thu Jul 4 07:29:18 2019 (r349717) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -309,11 +309,12 @@ Int32 main ( Int32 argc, Char** argv ) UInt32 buffHi, buffLo, blockCRC; Char* p; - strcpy ( progName, argv[0] ); + strncpy ( progName, argv[0], BZ_MAX_FILENAME-1); + progName[BZ_MAX_FILENAME-1]='\0'; inFileName[0] = outFileName[0] = 0; fprintf ( stderr, - "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" ); + "bzip2recover 1.0.7: extracts blocks from damaged .bz2 files.\n" ); if (argc != 2) { fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", @@ -457,6 +458,7 @@ Int32 main ( Int32 argc, Char** argv ) bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); bsPutUInt32 ( bsWr, blockCRC ); bsClose ( bsWr ); + outFile = NULL; } if (wrBlock >= rbCtr) break; wrBlock++; Modified: stable/12/contrib/bzip2/bzlib.c ============================================================================== --- stable/12/contrib/bzip2/bzlib.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/bzlib.c Thu Jul 4 07:29:18 2019 (r349717) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -47,7 +47,7 @@ void BZ2_bz__AssertH__fail ( int errcode ) fprintf(stderr, "\n\nbzip2/libbzip2: internal error number %d.\n" "This is a bug in bzip2/libbzip2, %s.\n" - "Please report it to me at: jseward@bzip.org. If this happened\n" + "Please report it to me at: jseward@acm.org. If this happened\n" "when you were using some program which uses libbzip2 as a\n" "component, you should also report this bug to the author(s)\n" "of that program. Please make an effort to report this bug;\n" Modified: stable/12/contrib/bzip2/bzlib.h ============================================================================== --- stable/12/contrib/bzip2/bzlib.h Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/bzlib.h Thu Jul 4 07:29:18 2019 (r349717) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/12/contrib/bzip2/bzlib_private.h ============================================================================== --- stable/12/contrib/bzip2/bzlib_private.h Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/bzlib_private.h Thu Jul 4 07:29:18 2019 (r349717) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.6, 6-Sept-2010" +#define BZ_VERSION "1.0.7, 27-Jun-2019" typedef char Char; typedef unsigned char Bool; Modified: stable/12/contrib/bzip2/compress.c ============================================================================== --- stable/12/contrib/bzip2/compress.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/compress.c Thu Jul 4 07:29:18 2019 (r349717) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/12/contrib/bzip2/crctable.c ============================================================================== --- stable/12/contrib/bzip2/crctable.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/crctable.c Thu Jul 4 07:29:18 2019 (r349717) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/12/contrib/bzip2/decompress.c ============================================================================== --- stable/12/contrib/bzip2/decompress.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/decompress.c Thu Jul 4 07:29:18 2019 (r349717) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -285,9 +285,9 @@ Int32 BZ2_decompress ( DState* s ) /*--- Now the selectors ---*/ GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); - if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); + if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR); GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); - if (nSelectors < 1) RETURN(BZ_DATA_ERROR); + if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR); for (i = 0; i < nSelectors; i++) { j = 0; while (True) { Modified: stable/12/contrib/bzip2/huffman.c ============================================================================== --- stable/12/contrib/bzip2/huffman.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/huffman.c Thu Jul 4 07:29:18 2019 (r349717) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/12/contrib/bzip2/randtable.c ============================================================================== --- stable/12/contrib/bzip2/randtable.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/randtable.c Thu Jul 4 07:29:18 2019 (r349717) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/12/contrib/bzip2/spewG.c ============================================================================== --- stable/12/contrib/bzip2/spewG.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/spewG.c Thu Jul 4 07:29:18 2019 (r349717) @@ -13,8 +13,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/12/contrib/bzip2/unzcrash.c ============================================================================== --- stable/12/contrib/bzip2/unzcrash.c Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/unzcrash.c Thu Jul 4 07:29:18 2019 (r349717) @@ -17,8 +17,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/12/contrib/bzip2/words2 ============================================================================== --- stable/12/contrib/bzip2/words2 Thu Jul 4 03:08:14 2019 (r349716) +++ stable/12/contrib/bzip2/words2 Thu Jul 4 07:29:18 2019 (r349717) @@ -1,5 +1,5 @@ Checking test results. If any of the four "cmp"s which follow report any differences, something is wrong. If you can't easily -figure out what, please let me know (jseward@bzip.org). +figure out what, please let me know (jseward@acm.org). From owner-svn-src-all@freebsd.org Thu Jul 4 07:32:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E866A15CB4E4; Thu, 4 Jul 2019 07:32:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97C178500E; Thu, 4 Jul 2019 07:32:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 442A11FE31; Thu, 4 Jul 2019 07:32:29 +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 x647WTaS047699; Thu, 4 Jul 2019 07:32:29 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x647WPwR047678; Thu, 4 Jul 2019 07:32:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201907040732.x647WPwR047678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 4 Jul 2019 07:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349718 - stable/11/contrib/bzip2 X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/contrib/bzip2 X-SVN-Commit-Revision: 349718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 97C178500E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 07:32:30 -0000 Author: delphij Date: Thu Jul 4 07:32:25 2019 New Revision: 349718 URL: https://svnweb.freebsd.org/changeset/base/349718 Log: MFC r349505: Upgrade to Bzip2 version 1.0.7. Modified: stable/11/contrib/bzip2/CHANGES stable/11/contrib/bzip2/LICENSE stable/11/contrib/bzip2/README stable/11/contrib/bzip2/README.COMPILATION.PROBLEMS stable/11/contrib/bzip2/blocksort.c stable/11/contrib/bzip2/bzip2.1 stable/11/contrib/bzip2/bzip2.c stable/11/contrib/bzip2/bzip2recover.c stable/11/contrib/bzip2/bzlib.c stable/11/contrib/bzip2/bzlib.h stable/11/contrib/bzip2/bzlib_private.h stable/11/contrib/bzip2/compress.c stable/11/contrib/bzip2/crctable.c stable/11/contrib/bzip2/decompress.c stable/11/contrib/bzip2/huffman.c stable/11/contrib/bzip2/randtable.c stable/11/contrib/bzip2/spewG.c stable/11/contrib/bzip2/unzcrash.c stable/11/contrib/bzip2/words2 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/bzip2/CHANGES ============================================================================== --- stable/11/contrib/bzip2/CHANGES Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/CHANGES Thu Jul 4 07:32:25 2019 (r349718) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -325,3 +325,16 @@ Security fix only. Fixes CERT-FI 20469 as it applies Izdebski. * Make the documentation build on Ubuntu 10.04 + +1.0.7 (27 Jun 19) +~~~~~~~~~~~~~~~~~ + +* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH + +* bzip2: Fix return value when combining --test,-t and -q. + +* bzip2recover: Fix buffer overflow for large argv[0] + +* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189) + +* Make sure nSelectors is not out of range (CVE-2019-12900) Modified: stable/11/contrib/bzip2/LICENSE ============================================================================== --- stable/11/contrib/bzip2/LICENSE Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/LICENSE Thu Jul 4 07:32:25 2019 (r349718) @@ -36,7 +36,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUD NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Julian Seward, jseward@bzip.org -bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Julian Seward, jseward@acm.org +bzip2/libbzip2 version 1.0.7 of 27 June 2019 -------------------------------------------------------------------------- Modified: stable/11/contrib/bzip2/README ============================================================================== --- stable/11/contrib/bzip2/README Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/README Thu Jul 4 07:32:25 2019 (r349718) @@ -6,8 +6,8 @@ This version is fully compatible with the previous pub This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.6 of 6 September 2010 -Copyright (C) 1996-2010 Julian Seward +bzip2/libbzip2 version 1.0.7 of 27 June 2019 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in this file. @@ -73,7 +73,7 @@ HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. It's difficult for me to support compilation on all these platforms. My approach is to collect binaries for these platforms, and put them -on the master web site (http://www.bzip.org). Look there. However +on the master web site (https://sourceware.org/bzip2/). Look there. However (FWIW), bzip2-1.0.X is very standard ANSI C and should compile unmodified with MS Visual C. If you have difficulties building, you might want to read README.COMPILATION.PROBLEMS. @@ -161,43 +161,22 @@ WHAT'S NEW IN 0.9.5 ? * Many small improvements in file and flag handling. * A Y2K statement. -WHAT'S NEW IN 1.0.0 ? +WHAT'S NEW IN 1.0.x ? See the CHANGES file. -WHAT'S NEW IN 1.0.2 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.3 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.4 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.5 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.6 ? - - See the CHANGES file. - - I hope you find bzip2 useful. Feel free to contact me at - jseward@bzip.org + jseward@acm.org if you have any suggestions or queries. Many people mailed me with comments, suggestions and patches after the releases of bzip-0.15, bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this feedback. I thank you for your comments. -bzip2's "home" is http://www.bzip.org/ +bzip2's "home" is https://sourceware.org/bzip2/ Julian Seward -jseward@bzip.org +jseward@acm.org Cambridge, UK. 18 July 1996 (version 0.15) @@ -213,3 +192,4 @@ Cambridge, UK. 20 December 2006 (bzip2, version 1.0.4) 10 December 2007 (bzip2, version 1.0.5) 6 Sept 2010 (bzip2, version 1.0.6) +27 June 2019 (bzip2, version 1.0.7) Modified: stable/11/contrib/bzip2/README.COMPILATION.PROBLEMS ============================================================================== --- stable/11/contrib/bzip2/README.COMPILATION.PROBLEMS Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/README.COMPILATION.PROBLEMS Thu Jul 4 07:32:25 2019 (r349718) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.6 of 6 September 2010 -Copyright (C) 1996-2010 Julian Seward +bzip2/libbzip2 version 1.0.7 of 27 June 2019 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -12,7 +12,7 @@ This program is released under the terms of the licens in the file LICENSE. ------------------------------------------------------------------ -bzip2-1.0.6 should compile without problems on the vast majority of +bzip2 should compile without problems on the vast majority of platforms. Using the supplied Makefile, I've built and tested it myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ 6.0 and nmake, you can build a native Win32 version too. Large file Modified: stable/11/contrib/bzip2/blocksort.c ============================================================================== --- stable/11/contrib/bzip2/blocksort.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/blocksort.c Thu Jul 4 07:32:25 2019 (r349718) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap, bhtab [ 0 .. 2+(nblock/32) ] destroyed */ -#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) -#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) -#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) +#define SET_BH(zz) bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31)) +#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31)) +#define ISSET_BH(zz) (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31))) #define WORD_BH(zz) bhtab[(zz) >> 5] #define UNALIGNED_BH(zz) ((zz) & 0x01f) Modified: stable/11/contrib/bzip2/bzip2.1 ============================================================================== --- stable/11/contrib/bzip2/bzip2.1 Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/bzip2.1 Thu Jul 4 07:32:25 2019 (r349718) @@ -1,6 +1,6 @@ .TH bzip2 1 .SH NAME -bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6 +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.7 .br bzcat \- decompresses files to stdout .br @@ -404,7 +404,7 @@ I/O error messages are not as helpful as they could be tries hard to detect I/O errors and exit cleanly, but the details of what the problem is sometimes seem rather misleading. -This manual page pertains to version 1.0.6 of +This manual page pertains to version 1.0.7 of .I bzip2. Compressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions @@ -426,9 +426,9 @@ with MaybeUInt64 set to be an unsigned 64-bit integer. .SH AUTHOR -Julian Seward, jsewardbzip.org. +Julian Seward, jseward@acm.org. -http://www.bzip.org +https://sourceware.org/bzip2/ The ideas embodied in .I bzip2 Modified: stable/11/contrib/bzip2/bzip2.c ============================================================================== --- stable/11/contrib/bzip2/bzip2.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/bzip2.c Thu Jul 4 07:32:25 2019 (r349718) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -554,7 +554,7 @@ static Bool testStream ( FILE *zStream ) { BZFILE* bzf = NULL; - Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i; + Int32 bzerr, bzerr_dummy, ret, streamNo, i; UChar obuf[5000]; UChar unused[BZ_MAX_UNUSED]; Int32 nUnused; @@ -577,7 +577,7 @@ Bool testStream ( FILE *zStream ) streamNo++; while (bzerr == BZ_OK) { - nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 ); + BZ2_bzRead ( &bzerr, bzf, obuf, 5000 ); if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler; } if (bzerr != BZ_STREAM_END) goto errhandler; @@ -749,7 +749,7 @@ void panic ( const Char* s ) "\n%s: PANIC -- internal consistency error:\n" "\t%s\n" "\tThis is a BUG. Please report it to me at:\n" - "\tjseward@bzip.org\n", + "\tjseward@acm.org\n", progName, s ); showFileNames(); cleanUpAndFail( 3 ); @@ -829,7 +829,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n ) " The user's manual, Section 4.3, has more info on (1) and (2).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (1)\n" - " or (2), feel free to report it to me at: jseward@bzip.org.\n" + " or (2), feel free to report it to me at: jseward@acm.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" @@ -852,7 +852,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n ) " The user's manual, Section 4.3, has more info on (2) and (3).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (2)\n" - " or (3), feel free to report it to me at: jseward@bzip.org.\n" + " or (3), feel free to report it to me at: jseward@acm.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" @@ -1609,7 +1609,7 @@ void license ( void ) " \n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms set out in the LICENSE file, which is included\n" - " in the bzip2-1.0.6 source distribution.\n" + " in the bzip2 source distribution.\n" " \n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -2005,12 +2005,14 @@ IntNative main ( IntNative argc, Char *argv[] ) testf ( aa->name ); } } - if (testFailsExist && noisy) { - fprintf ( stderr, - "\n" - "You can use the `bzip2recover' program to attempt to recover\n" - "data from undamaged sections of corrupted files.\n\n" - ); + if (testFailsExist) { + if (noisy) { + fprintf ( stderr, + "\n" + "You can use the `bzip2recover' program to attempt to recover\n" + "data from undamaged sections of corrupted files.\n\n" + ); + } setExit(2); exit(exitValue); } Modified: stable/11/contrib/bzip2/bzip2recover.c ============================================================================== --- stable/11/contrib/bzip2/bzip2recover.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/bzip2recover.c Thu Jul 4 07:32:25 2019 (r349718) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -309,11 +309,12 @@ Int32 main ( Int32 argc, Char** argv ) UInt32 buffHi, buffLo, blockCRC; Char* p; - strcpy ( progName, argv[0] ); + strncpy ( progName, argv[0], BZ_MAX_FILENAME-1); + progName[BZ_MAX_FILENAME-1]='\0'; inFileName[0] = outFileName[0] = 0; fprintf ( stderr, - "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" ); + "bzip2recover 1.0.7: extracts blocks from damaged .bz2 files.\n" ); if (argc != 2) { fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", @@ -457,6 +458,7 @@ Int32 main ( Int32 argc, Char** argv ) bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); bsPutUInt32 ( bsWr, blockCRC ); bsClose ( bsWr ); + outFile = NULL; } if (wrBlock >= rbCtr) break; wrBlock++; Modified: stable/11/contrib/bzip2/bzlib.c ============================================================================== --- stable/11/contrib/bzip2/bzlib.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/bzlib.c Thu Jul 4 07:32:25 2019 (r349718) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -47,7 +47,7 @@ void BZ2_bz__AssertH__fail ( int errcode ) fprintf(stderr, "\n\nbzip2/libbzip2: internal error number %d.\n" "This is a bug in bzip2/libbzip2, %s.\n" - "Please report it to me at: jseward@bzip.org. If this happened\n" + "Please report it to me at: jseward@acm.org. If this happened\n" "when you were using some program which uses libbzip2 as a\n" "component, you should also report this bug to the author(s)\n" "of that program. Please make an effort to report this bug;\n" Modified: stable/11/contrib/bzip2/bzlib.h ============================================================================== --- stable/11/contrib/bzip2/bzlib.h Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/bzlib.h Thu Jul 4 07:32:25 2019 (r349718) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/11/contrib/bzip2/bzlib_private.h ============================================================================== --- stable/11/contrib/bzip2/bzlib_private.h Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/bzlib_private.h Thu Jul 4 07:32:25 2019 (r349718) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.6, 6-Sept-2010" +#define BZ_VERSION "1.0.7, 27-Jun-2019" typedef char Char; typedef unsigned char Bool; Modified: stable/11/contrib/bzip2/compress.c ============================================================================== --- stable/11/contrib/bzip2/compress.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/compress.c Thu Jul 4 07:32:25 2019 (r349718) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/11/contrib/bzip2/crctable.c ============================================================================== --- stable/11/contrib/bzip2/crctable.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/crctable.c Thu Jul 4 07:32:25 2019 (r349718) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/11/contrib/bzip2/decompress.c ============================================================================== --- stable/11/contrib/bzip2/decompress.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/decompress.c Thu Jul 4 07:32:25 2019 (r349718) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -285,9 +285,9 @@ Int32 BZ2_decompress ( DState* s ) /*--- Now the selectors ---*/ GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); - if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); + if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR); GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); - if (nSelectors < 1) RETURN(BZ_DATA_ERROR); + if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR); for (i = 0; i < nSelectors; i++) { j = 0; while (True) { Modified: stable/11/contrib/bzip2/huffman.c ============================================================================== --- stable/11/contrib/bzip2/huffman.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/huffman.c Thu Jul 4 07:32:25 2019 (r349718) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/11/contrib/bzip2/randtable.c ============================================================================== --- stable/11/contrib/bzip2/randtable.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/randtable.c Thu Jul 4 07:32:25 2019 (r349718) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/11/contrib/bzip2/spewG.c ============================================================================== --- stable/11/contrib/bzip2/spewG.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/spewG.c Thu Jul 4 07:32:25 2019 (r349718) @@ -13,8 +13,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/11/contrib/bzip2/unzcrash.c ============================================================================== --- stable/11/contrib/bzip2/unzcrash.c Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/unzcrash.c Thu Jul 4 07:32:25 2019 (r349718) @@ -17,8 +17,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/11/contrib/bzip2/words2 ============================================================================== --- stable/11/contrib/bzip2/words2 Thu Jul 4 07:29:18 2019 (r349717) +++ stable/11/contrib/bzip2/words2 Thu Jul 4 07:32:25 2019 (r349718) @@ -1,5 +1,5 @@ Checking test results. If any of the four "cmp"s which follow report any differences, something is wrong. If you can't easily -figure out what, please let me know (jseward@bzip.org). +figure out what, please let me know (jseward@acm.org). From owner-svn-src-all@freebsd.org Thu Jul 4 07:36:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74C3915CB5E1; Thu, 4 Jul 2019 07:36:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11E30851B6; Thu, 4 Jul 2019 07:36:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9F771FE3C; Thu, 4 Jul 2019 07:36:13 +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 x647aDbM047934; Thu, 4 Jul 2019 07:36:13 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x647aAmu047916; Thu, 4 Jul 2019 07:36:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201907040736.x647aAmu047916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 4 Jul 2019 07:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r349719 - stable/10/contrib/bzip2 X-SVN-Group: stable-10 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/10/contrib/bzip2 X-SVN-Commit-Revision: 349719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 11E30851B6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 07:36:14 -0000 Author: delphij Date: Thu Jul 4 07:36:09 2019 New Revision: 349719 URL: https://svnweb.freebsd.org/changeset/base/349719 Log: MFC r349505: Upgrade to Bzip2 version 1.0.7. Modified: stable/10/contrib/bzip2/CHANGES stable/10/contrib/bzip2/LICENSE stable/10/contrib/bzip2/README stable/10/contrib/bzip2/README.COMPILATION.PROBLEMS stable/10/contrib/bzip2/blocksort.c stable/10/contrib/bzip2/bzip2.1 stable/10/contrib/bzip2/bzip2.c stable/10/contrib/bzip2/bzip2recover.c stable/10/contrib/bzip2/bzlib.c stable/10/contrib/bzip2/bzlib.h stable/10/contrib/bzip2/bzlib_private.h stable/10/contrib/bzip2/compress.c stable/10/contrib/bzip2/crctable.c stable/10/contrib/bzip2/decompress.c stable/10/contrib/bzip2/huffman.c stable/10/contrib/bzip2/randtable.c stable/10/contrib/bzip2/spewG.c stable/10/contrib/bzip2/unzcrash.c stable/10/contrib/bzip2/words2 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/bzip2/CHANGES ============================================================================== --- stable/10/contrib/bzip2/CHANGES Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/CHANGES Thu Jul 4 07:36:09 2019 (r349719) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -325,3 +325,16 @@ Security fix only. Fixes CERT-FI 20469 as it applies Izdebski. * Make the documentation build on Ubuntu 10.04 + +1.0.7 (27 Jun 19) +~~~~~~~~~~~~~~~~~ + +* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH + +* bzip2: Fix return value when combining --test,-t and -q. + +* bzip2recover: Fix buffer overflow for large argv[0] + +* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189) + +* Make sure nSelectors is not out of range (CVE-2019-12900) Modified: stable/10/contrib/bzip2/LICENSE ============================================================================== --- stable/10/contrib/bzip2/LICENSE Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/LICENSE Thu Jul 4 07:36:09 2019 (r349719) @@ -36,7 +36,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUD NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Julian Seward, jseward@bzip.org -bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Julian Seward, jseward@acm.org +bzip2/libbzip2 version 1.0.7 of 27 June 2019 -------------------------------------------------------------------------- Modified: stable/10/contrib/bzip2/README ============================================================================== --- stable/10/contrib/bzip2/README Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/README Thu Jul 4 07:36:09 2019 (r349719) @@ -6,8 +6,8 @@ This version is fully compatible with the previous pub This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.6 of 6 September 2010 -Copyright (C) 1996-2010 Julian Seward +bzip2/libbzip2 version 1.0.7 of 27 June 2019 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in this file. @@ -73,7 +73,7 @@ HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. It's difficult for me to support compilation on all these platforms. My approach is to collect binaries for these platforms, and put them -on the master web site (http://www.bzip.org). Look there. However +on the master web site (https://sourceware.org/bzip2/). Look there. However (FWIW), bzip2-1.0.X is very standard ANSI C and should compile unmodified with MS Visual C. If you have difficulties building, you might want to read README.COMPILATION.PROBLEMS. @@ -161,43 +161,22 @@ WHAT'S NEW IN 0.9.5 ? * Many small improvements in file and flag handling. * A Y2K statement. -WHAT'S NEW IN 1.0.0 ? +WHAT'S NEW IN 1.0.x ? See the CHANGES file. -WHAT'S NEW IN 1.0.2 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.3 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.4 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.5 ? - - See the CHANGES file. - -WHAT'S NEW IN 1.0.6 ? - - See the CHANGES file. - - I hope you find bzip2 useful. Feel free to contact me at - jseward@bzip.org + jseward@acm.org if you have any suggestions or queries. Many people mailed me with comments, suggestions and patches after the releases of bzip-0.15, bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this feedback. I thank you for your comments. -bzip2's "home" is http://www.bzip.org/ +bzip2's "home" is https://sourceware.org/bzip2/ Julian Seward -jseward@bzip.org +jseward@acm.org Cambridge, UK. 18 July 1996 (version 0.15) @@ -213,3 +192,4 @@ Cambridge, UK. 20 December 2006 (bzip2, version 1.0.4) 10 December 2007 (bzip2, version 1.0.5) 6 Sept 2010 (bzip2, version 1.0.6) +27 June 2019 (bzip2, version 1.0.7) Modified: stable/10/contrib/bzip2/README.COMPILATION.PROBLEMS ============================================================================== --- stable/10/contrib/bzip2/README.COMPILATION.PROBLEMS Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/README.COMPILATION.PROBLEMS Thu Jul 4 07:36:09 2019 (r349719) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.6 of 6 September 2010 -Copyright (C) 1996-2010 Julian Seward +bzip2/libbzip2 version 1.0.7 of 27 June 2019 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -12,7 +12,7 @@ This program is released under the terms of the licens in the file LICENSE. ------------------------------------------------------------------ -bzip2-1.0.6 should compile without problems on the vast majority of +bzip2 should compile without problems on the vast majority of platforms. Using the supplied Makefile, I've built and tested it myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ 6.0 and nmake, you can build a native Win32 version too. Large file Modified: stable/10/contrib/bzip2/blocksort.c ============================================================================== --- stable/10/contrib/bzip2/blocksort.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/blocksort.c Thu Jul 4 07:36:09 2019 (r349719) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap, bhtab [ 0 .. 2+(nblock/32) ] destroyed */ -#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) -#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) -#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) +#define SET_BH(zz) bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31)) +#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31)) +#define ISSET_BH(zz) (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31))) #define WORD_BH(zz) bhtab[(zz) >> 5] #define UNALIGNED_BH(zz) ((zz) & 0x01f) Modified: stable/10/contrib/bzip2/bzip2.1 ============================================================================== --- stable/10/contrib/bzip2/bzip2.1 Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/bzip2.1 Thu Jul 4 07:36:09 2019 (r349719) @@ -1,7 +1,7 @@ .PU .TH bzip2 1 .SH NAME -bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6 +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.7 .br bzcat \- decompresses files to stdout .br @@ -405,7 +405,7 @@ I/O error messages are not as helpful as they could be tries hard to detect I/O errors and exit cleanly, but the details of what the problem is sometimes seem rather misleading. -This manual page pertains to version 1.0.6 of +This manual page pertains to version 1.0.7 of .I bzip2. Compressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions @@ -427,9 +427,9 @@ with MaybeUInt64 set to be an unsigned 64-bit integer. .SH AUTHOR -Julian Seward, jsewardbzip.org. +Julian Seward, jseward@acm.org. -http://www.bzip.org +https://sourceware.org/bzip2/ The ideas embodied in .I bzip2 Modified: stable/10/contrib/bzip2/bzip2.c ============================================================================== --- stable/10/contrib/bzip2/bzip2.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/bzip2.c Thu Jul 4 07:36:09 2019 (r349719) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -554,7 +554,7 @@ static Bool testStream ( FILE *zStream ) { BZFILE* bzf = NULL; - Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i; + Int32 bzerr, bzerr_dummy, ret, streamNo, i; UChar obuf[5000]; UChar unused[BZ_MAX_UNUSED]; Int32 nUnused; @@ -577,7 +577,7 @@ Bool testStream ( FILE *zStream ) streamNo++; while (bzerr == BZ_OK) { - nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 ); + BZ2_bzRead ( &bzerr, bzf, obuf, 5000 ); if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler; } if (bzerr != BZ_STREAM_END) goto errhandler; @@ -749,7 +749,7 @@ void panic ( const Char* s ) "\n%s: PANIC -- internal consistency error:\n" "\t%s\n" "\tThis is a BUG. Please report it to me at:\n" - "\tjseward@bzip.org\n", + "\tjseward@acm.org\n", progName, s ); showFileNames(); cleanUpAndFail( 3 ); @@ -829,7 +829,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n ) " The user's manual, Section 4.3, has more info on (1) and (2).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (1)\n" - " or (2), feel free to report it to me at: jseward@bzip.org.\n" + " or (2), feel free to report it to me at: jseward@acm.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" @@ -852,7 +852,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n ) " The user's manual, Section 4.3, has more info on (2) and (3).\n" " \n" " If you suspect this is a bug in bzip2, or are unsure about (2)\n" - " or (3), feel free to report it to me at: jseward@bzip.org.\n" + " or (3), feel free to report it to me at: jseward@acm.org.\n" " Section 4.3 of the user's manual describes the info a useful\n" " bug report should have. If the manual is available on your\n" " system, please try and read it before mailing me. If you don't\n" @@ -1609,7 +1609,7 @@ void license ( void ) " \n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms set out in the LICENSE file, which is included\n" - " in the bzip2-1.0.6 source distribution.\n" + " in the bzip2 source distribution.\n" " \n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -2005,12 +2005,14 @@ IntNative main ( IntNative argc, Char *argv[] ) testf ( aa->name ); } } - if (testFailsExist && noisy) { - fprintf ( stderr, - "\n" - "You can use the `bzip2recover' program to attempt to recover\n" - "data from undamaged sections of corrupted files.\n\n" - ); + if (testFailsExist) { + if (noisy) { + fprintf ( stderr, + "\n" + "You can use the `bzip2recover' program to attempt to recover\n" + "data from undamaged sections of corrupted files.\n\n" + ); + } setExit(2); exit(exitValue); } Modified: stable/10/contrib/bzip2/bzip2recover.c ============================================================================== --- stable/10/contrib/bzip2/bzip2recover.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/bzip2recover.c Thu Jul 4 07:36:09 2019 (r349719) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -309,11 +309,12 @@ Int32 main ( Int32 argc, Char** argv ) UInt32 buffHi, buffLo, blockCRC; Char* p; - strcpy ( progName, argv[0] ); + strncpy ( progName, argv[0], BZ_MAX_FILENAME-1); + progName[BZ_MAX_FILENAME-1]='\0'; inFileName[0] = outFileName[0] = 0; fprintf ( stderr, - "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" ); + "bzip2recover 1.0.7: extracts blocks from damaged .bz2 files.\n" ); if (argc != 2) { fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", @@ -457,6 +458,7 @@ Int32 main ( Int32 argc, Char** argv ) bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); bsPutUInt32 ( bsWr, blockCRC ); bsClose ( bsWr ); + outFile = NULL; } if (wrBlock >= rbCtr) break; wrBlock++; Modified: stable/10/contrib/bzip2/bzlib.c ============================================================================== --- stable/10/contrib/bzip2/bzlib.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/bzlib.c Thu Jul 4 07:36:09 2019 (r349719) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -47,7 +47,7 @@ void BZ2_bz__AssertH__fail ( int errcode ) fprintf(stderr, "\n\nbzip2/libbzip2: internal error number %d.\n" "This is a bug in bzip2/libbzip2, %s.\n" - "Please report it to me at: jseward@bzip.org. If this happened\n" + "Please report it to me at: jseward@acm.org. If this happened\n" "when you were using some program which uses libbzip2 as a\n" "component, you should also report this bug to the author(s)\n" "of that program. Please make an effort to report this bug;\n" Modified: stable/10/contrib/bzip2/bzlib.h ============================================================================== --- stable/10/contrib/bzip2/bzlib.h Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/bzlib.h Thu Jul 4 07:36:09 2019 (r349719) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/10/contrib/bzip2/bzlib_private.h ============================================================================== --- stable/10/contrib/bzip2/bzlib_private.h Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/bzlib_private.h Thu Jul 4 07:36:09 2019 (r349719) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.6, 6-Sept-2010" +#define BZ_VERSION "1.0.7, 27-Jun-2019" typedef char Char; typedef unsigned char Bool; Modified: stable/10/contrib/bzip2/compress.c ============================================================================== --- stable/10/contrib/bzip2/compress.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/compress.c Thu Jul 4 07:36:09 2019 (r349719) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/10/contrib/bzip2/crctable.c ============================================================================== --- stable/10/contrib/bzip2/crctable.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/crctable.c Thu Jul 4 07:36:09 2019 (r349719) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/10/contrib/bzip2/decompress.c ============================================================================== --- stable/10/contrib/bzip2/decompress.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/decompress.c Thu Jul 4 07:36:09 2019 (r349719) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -285,9 +285,9 @@ Int32 BZ2_decompress ( DState* s ) /*--- Now the selectors ---*/ GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); - if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); + if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR); GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); - if (nSelectors < 1) RETURN(BZ_DATA_ERROR); + if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR); for (i = 0; i < nSelectors; i++) { j = 0; while (True) { Modified: stable/10/contrib/bzip2/huffman.c ============================================================================== --- stable/10/contrib/bzip2/huffman.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/huffman.c Thu Jul 4 07:36:09 2019 (r349719) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/10/contrib/bzip2/randtable.c ============================================================================== --- stable/10/contrib/bzip2/randtable.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/randtable.c Thu Jul 4 07:36:09 2019 (r349719) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/10/contrib/bzip2/spewG.c ============================================================================== --- stable/10/contrib/bzip2/spewG.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/spewG.c Thu Jul 4 07:36:09 2019 (r349719) @@ -13,8 +13,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/10/contrib/bzip2/unzcrash.c ============================================================================== --- stable/10/contrib/bzip2/unzcrash.c Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/unzcrash.c Thu Jul 4 07:36:09 2019 (r349719) @@ -17,8 +17,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.7 of 27 June 2019 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: stable/10/contrib/bzip2/words2 ============================================================================== --- stable/10/contrib/bzip2/words2 Thu Jul 4 07:32:25 2019 (r349718) +++ stable/10/contrib/bzip2/words2 Thu Jul 4 07:36:09 2019 (r349719) @@ -1,5 +1,5 @@ Checking test results. If any of the four "cmp"s which follow report any differences, something is wrong. If you can't easily -figure out what, please let me know (jseward@bzip.org). +figure out what, please let me know (jseward@acm.org). From owner-svn-src-all@freebsd.org Thu Jul 4 08:40:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F194D15CCEBA; Thu, 4 Jul 2019 08:40:11 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58CB686BDD; Thu, 4 Jul 2019 08:40:11 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 255542082D; Thu, 4 Jul 2019 08:40:11 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x648eBmn079173; Thu, 4 Jul 2019 08:40:11 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x648eA3k079171; Thu, 4 Jul 2019 08:40:10 GMT (envelope-from des@FreeBSD.org) Message-Id: <201907040840.x648eA3k079171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 4 Jul 2019 08:40:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349720 - in head/contrib/unbound: . cachedb compat contrib daemon dns64 dnscrypt dnstap doc edns-subnet iterator libunbound respip services services/cache sldns smallapp util util/data... X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: in head/contrib/unbound: . cachedb compat contrib daemon dns64 dnscrypt dnstap doc edns-subnet iterator libunbound respip services services/cache sldns smallapp util util/data util/storage validator X-SVN-Commit-Revision: 349720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 58CB686BDD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 08:40:12 -0000 Author: des Date: Thu Jul 4 08:40:10 2019 New Revision: 349720 URL: https://svnweb.freebsd.org/changeset/base/349720 Log: Upgrade Unbound to 1.9.2. Added: head/contrib/unbound/.travis.yml - copied unchanged from r349559, vendor/unbound/dist/.travis.yml head/contrib/unbound/README.md - copied unchanged from r349559, vendor/unbound/dist/README.md head/contrib/unbound/contrib/unbound-fuzzme.patch - copied unchanged from r343835, vendor/unbound/dist/contrib/unbound-fuzzme.patch Modified: head/contrib/unbound/Makefile.in head/contrib/unbound/aclocal.m4 head/contrib/unbound/cachedb/cachedb.c head/contrib/unbound/compat/arc4random.c head/contrib/unbound/config.guess head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/config.sub head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/contrib/README head/contrib/unbound/contrib/fastrpz.patch head/contrib/unbound/contrib/libunbound.so.conf head/contrib/unbound/contrib/unbound.init head/contrib/unbound/daemon/daemon.c head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/stats.c head/contrib/unbound/daemon/unbound.c head/contrib/unbound/daemon/worker.c head/contrib/unbound/dns64/dns64.c head/contrib/unbound/dnscrypt/dnscrypt.c head/contrib/unbound/dnstap/dnstap.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3 head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8 head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8 head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8 head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1 head/contrib/unbound/doc/unbound-host.1.in head/contrib/unbound/doc/unbound.8 head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5 head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/doc/unbound.doxygen head/contrib/unbound/edns-subnet/addrtree.c head/contrib/unbound/edns-subnet/addrtree.h head/contrib/unbound/edns-subnet/subnetmod.c head/contrib/unbound/edns-subnet/subnetmod.h head/contrib/unbound/install-sh head/contrib/unbound/iterator/iter_fwd.c head/contrib/unbound/iterator/iter_hints.c head/contrib/unbound/iterator/iter_scrub.c head/contrib/unbound/iterator/iter_utils.c head/contrib/unbound/iterator/iter_utils.h head/contrib/unbound/iterator/iterator.c head/contrib/unbound/iterator/iterator.h head/contrib/unbound/libunbound/libunbound.c head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/libunbound/ubsyms.def head/contrib/unbound/libunbound/unbound.h head/contrib/unbound/ltmain.sh head/contrib/unbound/respip/respip.c head/contrib/unbound/services/authzone.c head/contrib/unbound/services/authzone.h head/contrib/unbound/services/cache/dns.c head/contrib/unbound/services/cache/infra.c head/contrib/unbound/services/cache/infra.h head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/listen_dnsport.h head/contrib/unbound/services/localzone.c head/contrib/unbound/services/localzone.h head/contrib/unbound/services/mesh.c head/contrib/unbound/services/mesh.h head/contrib/unbound/services/modstack.c head/contrib/unbound/services/outside_network.c head/contrib/unbound/services/outside_network.h head/contrib/unbound/sldns/wire2str.c head/contrib/unbound/smallapp/unbound-checkconf.c head/contrib/unbound/smallapp/unbound-control-setup.sh head/contrib/unbound/smallapp/unbound-control-setup.sh.in head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/util/alloc.c head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.y head/contrib/unbound/util/data/msgencode.c head/contrib/unbound/util/data/msgreply.c head/contrib/unbound/util/data/msgreply.h head/contrib/unbound/util/edns.c head/contrib/unbound/util/fptr_wlist.c head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/log.c head/contrib/unbound/util/log.h head/contrib/unbound/util/mini_event.c head/contrib/unbound/util/net_help.c head/contrib/unbound/util/net_help.h head/contrib/unbound/util/netevent.c head/contrib/unbound/util/netevent.h head/contrib/unbound/util/storage/lookup3.c head/contrib/unbound/util/ub_event.c head/contrib/unbound/validator/val_neg.c Directory Properties: head/contrib/unbound/ (props changed) Copied: head/contrib/unbound/.travis.yml (from r349559, vendor/unbound/dist/.travis.yml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/.travis.yml Thu Jul 4 08:40:10 2019 (r349720, copy of r349559, vendor/unbound/dist/.travis.yml) @@ -0,0 +1,16 @@ +sudo: false +language: c +compiler: + - gcc +addons: + apt: + packages: + - libssl-dev + - libevent-dev + - libexpat-dev + - clang +script: + - ./configure --enable-debug --disable-flto + - make + - make test + - (cd testdata/clang-analysis.tdir; bash clang-analysis.test) Modified: head/contrib/unbound/Makefile.in ============================================================================== --- head/contrib/unbound/Makefile.in Thu Jul 4 07:36:09 2019 (r349719) +++ head/contrib/unbound/Makefile.in Thu Jul 4 08:40:10 2019 (r349720) @@ -482,9 +482,9 @@ doc: if test -n "$(doxygen)"; then \ $(doxygen) $(srcdir)/doc/unbound.doxygen; fi if test "$(WITH_PYUNBOUND)" = "yes" -o "$(WITH_PYTHONMODULE)" = "yes"; \ - then if test -x "`which sphinx-build 2>&1`"; then \ - sphinx-build -b html pythonmod/doc doc/html/pythonmod; \ - sphinx-build -b html libunbound/python/doc doc/html/pyunbound;\ + then if test -x "`which sphinx-build-$(PY_MAJOR_VERSION) 2>&1`"; then \ + sphinx-build-$(PY_MAJOR_VERSION) -b html pythonmod/doc doc/html/pythonmod; \ + sphinx-build-$(PY_MAJOR_VERSION) -b html libunbound/python/doc doc/html/pyunbound;\ fi ;\ fi @@ -613,6 +613,8 @@ depend: -e 's?$$(srcdir)/util/configparser.c?util/configparser.c?g' \ -e 's?$$(srcdir)/util/configparser.h?util/configparser.h?g' \ -e 's?$$(srcdir)/dnstap/dnstap_config.h??g' \ + -e 's?$$(srcdir)/dnstap/dnstap.pb-c.c?dnstap/dnstap.pb-c.c?g' \ + -e 's?$$(srcdir)/dnstap/dnstap.pb-c.h?dnstap/dnstap.pb-c.h?g' \ -e 's?$$(srcdir)/dnscrypt/dnscrypt_config.h??g' \ -e 's?$$(srcdir)/pythonmod/pythonmod.h?$$(PYTHONMOD_HEADER)?g' \ -e 's?$$(srcdir)/edns-subnet/subnetmod.h $$(srcdir)/edns-subnet/subnet-whitelist.h $$(srcdir)/edns-subnet/edns-subnet.h $$(srcdir)/edns-subnet/addrtree.h?$$(SUBNET_HEADER)?g' \ @@ -634,214 +636,201 @@ depend: # Dependencies dns.lo dns.o: $(srcdir)/services/cache/dns.c config.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h $(srcdir)/validator/val_utils.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/util/data/msgreply.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/data/dname.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/locks.h $(srcdir)/validator/val_utils.h $(srcdir)/sldns/pkthdr.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h infra.lo infra.o: $(srcdir)/services/cache/infra.c config.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lookup3.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h rrset.lo rrset.o: $(srcdir)/services/cache/rrset.c config.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/regional.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/net_help.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/regional.h $(srcdir)/util/alloc.h $(srcdir)/util/net_help.h as112.lo as112.o: $(srcdir)/util/as112.c $(srcdir)/util/as112.h dname.lo dname.o: $(srcdir)/util/data/dname.c config.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/storage/lookup3.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/storage/lookup3.h $(srcdir)/sldns/sbuffer.h msgencode.lo msgencode.o: $(srcdir)/util/data/msgencode.c config.h $(srcdir)/util/data/msgencode.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h \ - $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h $(srcdir)/services/localzone.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/services/localzone.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/module.h $(srcdir)/services/view.h msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h \ - $(srcdir)/util/regional.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/module.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/module.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ + $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h iterator.lo iterator.o: $(srcdir)/iterator/iterator.c config.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_scrub.h \ - $(srcdir)/iterator/iter_priv.h $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/services/authzone.h \ - $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/random.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/iterator/iter_utils.h \ + $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_donotq.h \ + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_scrub.h $(srcdir)/iterator/iter_priv.h \ + $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/random.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/sbuffer.h iter_delegpt.lo iter_delegpt.o: $(srcdir)/iterator/iter_delegpt.c config.h $(srcdir)/iterator/iter_delegpt.h \ $(srcdir)/util/log.h $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h iter_donotq.lo iter_donotq.o: $(srcdir)/iterator/iter_donotq.c config.h $(srcdir)/iterator/iter_donotq.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h iter_fwd.lo iter_fwd.o: $(srcdir)/iterator/iter_fwd.c config.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h iter_hints.lo iter_hints.o: $(srcdir)/iterator/iter_hints.c config.h $(srcdir)/iterator/iter_hints.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/wire2str.h iter_priv.lo iter_priv.o: $(srcdir)/iterator/iter_priv.c config.h $(srcdir)/iterator/iter_priv.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h iter_resptype.lo iter_resptype.o: $(srcdir)/iterator/iter_resptype.c config.h \ $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h iter_scrub.lo iter_scrub.o: $(srcdir)/iterator/iter_scrub.c config.h $(srcdir)/iterator/iter_scrub.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/iterator/iter_priv.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/iterator/iter_priv.h $(srcdir)/util/rbtree.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h $(srcdir)/sldns/sbuffer.h iter_utils.lo iter_utils.o: $(srcdir)/iterator/iter_utils.c config.h $(srcdir)/iterator/iter_utils.h \ $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/iterator/iter_hints.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_priv.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/random.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ - $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/sldns/str2wire.h + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/validator/val_anchor.h \ + $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h listen_dnsport.lo listen_dnsport.o: $(srcdir)/services/listen_dnsport.c config.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ - $(srcdir)/util/as112.h + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/as112.h mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/services/modstack.h $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/edns.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/util/data/dname.h $(srcdir)/respip/respip.h + $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/util/edns.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/view.h $(srcdir)/util/data/dname.h $(srcdir)/respip/respip.h \ + $(srcdir)/services/listen_dnsport.h modstack.lo modstack.o: $(srcdir)/services/modstack.c config.h $(srcdir)/services/modstack.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h \ - $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/respip/respip.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(PYTHONMOD_HEADER) \ - $(srcdir)/cachedb/cachedb.h $(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/edns-subnet/subnetmod.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/net_help.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/edns-subnet/addrtree.h $(srcdir)/edns-subnet/edns-subnet.h -view.lo view.o: $(srcdir)/services/view.c config.h $(srcdir)/services/view.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/respip/respip.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/view.h $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h +view.lo view.o: $(srcdir)/services/view.c config.h $(srcdir)/services/view.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ + $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/random.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h $(srcdir)/dnstap/dnstap.h \ alloc.lo alloc.o: $(srcdir)/util/alloc.c config.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/regional.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h + $(srcdir)/util/regional.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/configyyrename.h $(srcdir)/util/config_file.h util/configparser.h \ $(srcdir)/util/net_help.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ - $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/wire2str.h \ - $(srcdir)/sldns/parseutil.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/util/iana_ports.inc + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/util/iana_ports.inc configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h util/configparser.h configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/util/shm_side/shm_main.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ - $(srcdir)/daemon/worker.h \ - $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/util/rtt.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h + $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h \ + $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h authzone.lo authzone.o: $(srcdir)/services/authzone.c config.h $(srcdir)/services/authzone.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ @@ -852,10 +841,9 @@ authzone.lo authzone.o: $(srcdir)/services/authzone.c $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_secalgo.h fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/outside_network.h $(srcdir)/services/localzone.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/services/authzone.h \ @@ -867,299 +855,251 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist. $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/unbound-event.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/respip/respip.h \ - $(PYTHONMOD_HEADER) $(srcdir)/cachedb/cachedb.h $(srcdir)/ipsecmod/ipsecmod.h \ - $(srcdir)/edns-subnet/subnetmod.h $(srcdir)/util/net_help.h $(srcdir)/edns-subnet/addrtree.h \ - $(srcdir)/edns-subnet/edns-subnet.h -locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h -log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/sldns/sbuffer.h + $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h +locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h +log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/ub_event.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/tcp_conn_limit.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/ub_event.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/tcp_conn_limit.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/dnstap/dnstap.h \ - \ + $(srcdir)/services/listen_dnsport.h \ net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ + $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h \ random.lo random.o: $(srcdir)/util/random.c config.h $(srcdir)/util/random.h $(srcdir)/util/log.h rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c config.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h regional.lo regional.o: $(srcdir)/util/regional.c config.h $(srcdir)/util/log.h $(srcdir)/util/regional.h rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h -edns.lo edns.o: $(srcdir)/util/edns.c config.h $(srcdir)/util/config_file.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/regional.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h +edns.lo edns.o: $(srcdir)/util/edns.c config.h $(srcdir)/util/edns.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h dnstree.lo dnstree.o: $(srcdir)/util/storage/dnstree.c config.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/net_help.h + $(srcdir)/util/log.h $(srcdir)/util/net_help.h lookup3.lo lookup3.o: $(srcdir)/util/storage/lookup3.c config.h $(srcdir)/util/storage/lookup3.h lruhash.lo lruhash.o: $(srcdir)/util/storage/lruhash.c config.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h slabhash.lo slabhash.o: $(srcdir)/util/storage/slabhash.c config.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h tcp_conn_limit.lo tcp_conn_limit.o: $(srcdir)/util/tcp_conn_limit.c config.h $(srcdir)/util/regional.h \ $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/tcp_conn_limit.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/services/localzone.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h $(srcdir)/sldns/str2wire.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h $(srcdir)/sldns/str2wire.h timehist.lo timehist.o: $(srcdir)/util/timehist.c config.h $(srcdir)/util/timehist.h $(srcdir)/util/log.h tube.lo tube.o: $(srcdir)/util/tube.c config.h $(srcdir)/util/tube.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ - $(srcdir)/util/ub_event.h + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/ub_event.h ub_event.lo ub_event.o: $(srcdir)/util/ub_event.c config.h $(srcdir)/util/ub_event.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/tube.h \ - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/util/tube.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h ub_event_pluggable.lo ub_event_pluggable.o: $(srcdir)/util/ub_event_pluggable.c config.h $(srcdir)/util/ub_event.h \ $(srcdir)/libunbound/unbound-event.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ - $(srcdir)/util/rbtree.h + $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h winsock_event.lo winsock_event.o: $(srcdir)/util/winsock_event.c config.h autotrust.lo autotrust.o: $(srcdir)/validator/autotrust.c config.h $(srcdir)/validator/autotrust.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/sldns/pkthdr.h $(srcdir)/validator/val_sigcrypt.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/dname.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/services/modstack.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/validator/val_kcache.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h \ $(srcdir)/sldns/keyraw.h \ val_anchor.lo val_anchor.o: $(srcdir)/validator/val_anchor.c config.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/validator/autotrust.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_sigcrypt.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/validator/autotrust.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/util/as112.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/sldns/str2wire.h validator.lo validator.o: $(srcdir)/validator/validator.c config.h $(srcdir)/validator/validator.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h \ $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/validator/val_kcache.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_nsec.h \ $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_neg.h $(srcdir)/validator/val_sigcrypt.h \ $(srcdir)/validator/autotrust.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ $(srcdir)/services/modstack.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h val_kcache.lo val_kcache.o: $(srcdir)/validator/val_kcache.c config.h $(srcdir)/validator/val_kcache.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/validator/val_kentry.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h + $(srcdir)/validator/val_kentry.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h val_kentry.lo val_kentry.o: $(srcdir)/validator/val_kentry.c config.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h \ - $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ val_neg.lo val_neg.o: $(srcdir)/validator/val_neg.c config.h \ - $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/rbtree.h $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/net_help.h \ + $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_utils.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/cache/dns.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h val_nsec3.lo val_nsec3.o: $(srcdir)/validator/val_nsec3.c config.h $(srcdir)/validator/val_nsec3.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/validator/val_secalgo.h \ - $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/validator/val_kentry.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/validator/val_nsec.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/validator/val_nsec.h $(srcdir)/sldns/sbuffer.h val_nsec.lo val_nsec.o: $(srcdir)/validator/val_nsec.c config.h $(srcdir)/validator/val_nsec.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/validator/val_utils.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h + $(srcdir)/validator/val_utils.h $(srcdir)/sldns/pkthdr.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h val_secalgo.lo val_secalgo.o: $(srcdir)/validator/val_secalgo.c config.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_secalgo.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ $(srcdir)/sldns/sbuffer.h \ val_sigcrypt.lo val_sigcrypt.o: $(srcdir)/validator/val_sigcrypt.c config.h \ $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/validator/val_secalgo.h \ + $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h \ val_utils.lo val_utils.o: $(srcdir)/validator/val_utils.c config.h $(srcdir)/validator/val_utils.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/util/rbtree.h $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_neg.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ - $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/sldns/parseutil.h dns64.lo dns64.o: $(srcdir)/dns64/dns64.c config.h $(srcdir)/dns64/dns64.h $(srcdir)/util/module.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/data/dname.h $(srcdir)/sldns/str2wire.h -edns-subnet.lo edns-subnet.o: $(srcdir)/edns-subnet/edns-subnet.c config.h \ - $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h -subnetmod.lo subnetmod.o: $(srcdir)/edns-subnet/subnetmod.c config.h $(srcdir)/edns-subnet/subnetmod.h \ - $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/util/alloc.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/edns-subnet/addrtree.h $(srcdir)/edns-subnet/edns-subnet.h \ - $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/services/modstack.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/data/dname.h \ + $(srcdir)/sldns/str2wire.h +edns-subnet.lo edns-subnet.o: $(srcdir)/edns-subnet/edns-subnet.c config.h +subnetmod.lo subnetmod.o: $(srcdir)/edns-subnet/subnetmod.c config.h addrtree.lo addrtree.o: $(srcdir)/edns-subnet/addrtree.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/edns-subnet/addrtree.h -subnet-whitelist.lo subnet-whitelist.o: $(srcdir)/edns-subnet/subnet-whitelist.c config.h \ - $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ - $(srcdir)/edns-subnet/subnet-whitelist.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h -cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h $(srcdir)/cachedb/cachedb.h $(srcdir)/util/module.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/cachedb/redis.h $(srcdir)/util/regional.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/util/data/msgencode.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/validator/val_neg.h $(srcdir)/util/rbtree.h \ - $(srcdir)/validator/val_secalgo.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ - $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/sbuffer.h -redis.lo redis.o: $(srcdir)/cachedb/redis.c config.h $(srcdir)/cachedb/redis.h $(srcdir)/cachedb/cachedb.h \ - $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/edns-subnet/addrtree.h +subnet-whitelist.lo subnet-whitelist.o: $(srcdir)/edns-subnet/subnet-whitelist.c config.h +cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h +redis.lo redis.o: $(srcdir)/cachedb/redis.c config.h respip.lo respip.o: $(srcdir)/respip/respip.c config.h $(srcdir)/services/localzone.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h $(srcdir)/services/cache/dns.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/module.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/sldns/str2wire.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/respip/respip.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h -dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h $(srcdir)/sldns/sbuffer.h \ +dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ - $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/storage/lookup3.h + $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/dnstap/dnstap.h \ + dnstap/dnstap.pb-c.h +dnstap.pb-c.lo dnstap.pb-c.o: dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h \ + ipsecmod.lo ipsecmod.o: $(srcdir)/ipsecmod/ipsecmod.c config.h $(srcdir)/ipsecmod/ipsecmod.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/rbtree.h \ - $(srcdir)/ipsecmod/ipsecmod-whitelist.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ - $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/sldns/wire2str.h + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/rbtree.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/services/cache/dns.h $(srcdir)/sldns/wire2str.h ipsecmod-whitelist.lo ipsecmod-whitelist.o: $(srcdir)/ipsecmod/ipsecmod-whitelist.c config.h \ $(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/rbtree.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/data/dname.h $(srcdir)/sldns/str2wire.h + $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/rbtree.h \ + $(srcdir)/ipsecmod/ipsecmod-whitelist.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/regional.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/sldns/str2wire.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/testcode/unitmain.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/sldns/rrdef.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/unitmain.h \ + $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h unitdname.lo unitdname.o: $(srcdir)/testcode/unitdname.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h unitlruhash.lo unitlruhash.o: $(srcdir)/testcode/unitlruhash.c config.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/storage/slabhash.h + $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ - $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/timehist.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/random.h $(srcdir)/respip/respip.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/view.h + $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h $(srcdir)/util/timehist.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/libunbound/unbound.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/random.h $(srcdir)/respip/respip.h \ + $(srcdir)/services/localzone.h $(srcdir)/services/view.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ - $(srcdir)/testcode/readhex.h $(srcdir)/testcode/testpkts.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/sldns/wire2str.h + $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/testcode/readhex.h \ + $(srcdir)/testcode/testpkts.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h unitneg.lo unitneg.o: $(srcdir)/testcode/unitneg.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/data/dname.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/validator/val_neg.h $(srcdir)/util/rbtree.h $(srcdir)/sldns/rrdef.h + $(srcdir)/util/data/dname.h $(srcdir)/testcode/unitmain.h $(srcdir)/validator/val_neg.h $(srcdir)/util/rbtree.h \ + $(srcdir)/sldns/rrdef.h unitregional.lo unitregional.o: $(srcdir)/testcode/unitregional.c config.h $(srcdir)/testcode/unitmain.h \ $(srcdir)/util/log.h $(srcdir)/util/regional.h unitslabhash.lo unitslabhash.o: $(srcdir)/testcode/unitslabhash.c config.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/util/log.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h + $(srcdir)/util/log.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h unitverify.lo unitverify.o: $(srcdir)/testcode/unitverify.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_nsec3.h \ $(srcdir)/util/rbtree.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h \ @@ -1173,49 +1113,42 @@ testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h unitldns.lo unitldns.o: $(srcdir)/testcode/unitldns.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h -unitecs.lo unitecs.o: $(srcdir)/testcode/unitecs.c config.h $(srcdir)/util/log.h $(srcdir)/util/module.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/testcode/unitmain.h $(srcdir)/edns-subnet/addrtree.h \ - $(srcdir)/edns-subnet/subnetmod.h $(srcdir)/services/outbound_list.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/storage/slabhash.h $(srcdir)/edns-subnet/edns-subnet.h +unitecs.lo unitecs.o: $(srcdir)/testcode/unitecs.c config.h unitauth.lo unitauth.o: $(srcdir)/testcode/unitauth.c config.h $(srcdir)/services/authzone.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ - $(srcdir)/testcode/unitmain.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/testcode/unitmain.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/sbuffer.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/locks.h \ - $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/module.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h + $(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h \ $(srcdir)/daemon/cachedump.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h \ - $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h -daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ - $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/testcode/checklocks.h \ - $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ - $(srcdir)/daemon/remote.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/sldns/str2wire.h +daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/daemon/worker.h \ + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h \ + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h \ $(srcdir)/util/config_file.h $(srcdir)/util/shm_side/shm_main.h $(srcdir)/util/storage/lookup3.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/tcp_conn_limit.h $(srcdir)/services/listen_dnsport.h \ @@ -1226,11 +1159,10 @@ remote.lo remote.o: $(srcdir)/daemon/remote.c config.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h $(srcdir)/util/config_file.h \ $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ @@ -1244,35 +1176,34 @@ remote.lo remote.o: $(srcdir)/daemon/remote.c config.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ - $(srcdir)/services/modstack.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/outside_network.h $(srcdir)/services/listen_dnsport.h $(srcdir)/util/config_file.h \ $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rtt.h $(srcdir)/services/authzone.h $(srcdir)/validator/val_kcache.h \ - $(srcdir)/validator/val_neg.h + $(srcdir)/validator/val_neg.h \ + unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h \ - $(srcdir)/util/locks.h $(srcdir)/testcode/checklocks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ - $(srcdir)/daemon/remote.h \ + $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h + $(srcdir)/services/cache/rrset.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/ub_event.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h \ @@ -1286,27 +1217,26 @@ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/libunbound/libworker.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/shm_side/shm_main.h testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/testcode/checklocks.h $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h \ + $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/daemon/remote.h \ - $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/daemon/daemon.h \ - $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/services/listen_dnsport.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 4 10:16:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C229015CF945; Thu, 4 Jul 2019 10:16:45 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 637728A096; Thu, 4 Jul 2019 10:16:45 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CE35218C9; Thu, 4 Jul 2019 10:16:45 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64AGj7c031374; Thu, 4 Jul 2019 10:16:45 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64AGjEm031373; Thu, 4 Jul 2019 10:16:45 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201907041016.x64AGjEm031373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Thu, 4 Jul 2019 10:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349721 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 349721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 637728A096 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 10:16:45 -0000 Author: tijl Date: Thu Jul 4 10:16:44 2019 New Revision: 349721 URL: https://svnweb.freebsd.org/changeset/base/349721 Log: MFC r349548: Build lib32 libl. The library is built from usr.bin/lex/lib. It would be better to move this directory to lib/libl, but this requires more extensive changes to Makefile.inc1. This simple fix can be MFCed quickly. PR: 238874 Reviewed by: imp Modified: stable/12/Makefile.libcompat Directory Properties: stable/12/ (props changed) Modified: stable/12/Makefile.libcompat ============================================================================== --- stable/12/Makefile.libcompat Thu Jul 4 08:40:10 2019 (r349720) +++ stable/12/Makefile.libcompat Thu Jul 4 10:16:44 2019 (r349721) @@ -136,6 +136,7 @@ LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR= _LC_LIBDIRS.yes= lib _LC_LIBDIRS.yes+= gnu/lib +_LC_LIBDIRS.yes+= usr.bin/lex/lib _LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib _LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib _LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib From owner-svn-src-all@freebsd.org Thu Jul 4 10:41:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A4EA15D04AE; Thu, 4 Jul 2019 10:41:10 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C5C628ADCA; Thu, 4 Jul 2019 10:41:09 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A10A021C5B; Thu, 4 Jul 2019 10:41:09 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64Af9a6043120; Thu, 4 Jul 2019 10:41:09 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64Af9g4043119; Thu, 4 Jul 2019 10:41:09 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201907041041.x64Af9g4043119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Thu, 4 Jul 2019 10:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349722 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 349722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C5C628ADCA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 10:41:10 -0000 Author: tijl Date: Thu Jul 4 10:41:09 2019 New Revision: 349722 URL: https://svnweb.freebsd.org/changeset/base/349722 Log: MFC r349548: Build lib32 libl. The library is built from usr.bin/lex/lib. It would be better to move this directory to lib/libl, but this requires more extensive changes to Makefile.inc1. This simple fix can be MFCed quickly. PR: 238874 Reviewed by: imp Modified: stable/11/Makefile.libcompat Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.libcompat ============================================================================== --- stable/11/Makefile.libcompat Thu Jul 4 10:16:44 2019 (r349721) +++ stable/11/Makefile.libcompat Thu Jul 4 10:41:09 2019 (r349722) @@ -115,6 +115,7 @@ LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR= -DLIBRARIES_ONLY _LC_LIBDIRS.yes= lib gnu/lib +_LC_LIBDIRS.yes+= usr.bin/lex/lib _LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib _LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib _LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib From owner-svn-src-all@freebsd.org Thu Jul 4 12:31:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C605C15D4A78; Thu, 4 Jul 2019 12:31:25 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E30F90391; Thu, 4 Jul 2019 12:31:25 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4395122EF7; Thu, 4 Jul 2019 12:31:25 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64CVPZJ003517; Thu, 4 Jul 2019 12:31:25 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64CVPxV003516; Thu, 4 Jul 2019 12:31:25 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201907041231.x64CVPxV003516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Thu, 4 Jul 2019 12:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349723 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 349723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E30F90391 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 12:31:26 -0000 Author: luporl Date: Thu Jul 4 12:31:24 2019 New Revision: 349723 URL: https://svnweb.freebsd.org/changeset/base/349723 Log: [PPC64] pseries llan: fix MAC address There was an issue in pseries llan driver, that resulted in the first 2 bytes of the MAC address getting stripped, and the last 2 being always 0. In most cases the network interface still worked, despite the MAC being different of what was specified to QEMU, but when some other host or DHCP server expected a specific MAC, this would fail. This change fixes this by shifting right by 2 the local-mac-address read from device tree, if its length is 6 instead of 8, as observed in QEMU DT, that always presents a 6 bytes value for this property. PR: 237471 Reported by: Alfredo Dal'Ava Junior Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D20843 Modified: head/sys/powerpc/pseries/phyp_llan.c Modified: head/sys/powerpc/pseries/phyp_llan.c ============================================================================== --- head/sys/powerpc/pseries/phyp_llan.c Thu Jul 4 10:41:09 2019 (r349722) +++ head/sys/powerpc/pseries/phyp_llan.c Thu Jul 4 12:31:24 2019 (r349723) @@ -157,14 +157,23 @@ llan_attach(device_t dev) struct llan_softc *sc; phandle_t node; int error, i; + ssize_t len; sc = device_get_softc(dev); sc->dev = dev; /* Get firmware properties */ node = ofw_bus_get_node(dev); - OF_getprop(node, "local-mac-address", sc->mac_address, + len = OF_getprop(node, "local-mac-address", sc->mac_address, sizeof(sc->mac_address)); + /* If local-mac-address property has only 6 bytes (ETHER_ADDR_LEN) + * instead of 8 (sizeof(sc->mac_address)), then its value must be + * shifted 2 bytes to the right. */ + if (len == ETHER_ADDR_LEN) { + bcopy(sc->mac_address, &sc->mac_address[2], len); + /* Zero out the first 2 bytes. */ + bzero(sc->mac_address, 2); + } OF_getencprop(node, "reg", &sc->unit, sizeof(sc->unit)); mtx_init(&sc->io_lock, "llan", NULL, MTX_DEF); @@ -504,7 +513,7 @@ llan_set_multicast(struct llan_softc *sc) { struct ifnet *ifp = sc->ifp; struct ifmultiaddr *inm; - uint64_t macaddr; + uint64_t macaddr = 0; mtx_assert(&sc->io_lock, MA_OWNED); From owner-svn-src-all@freebsd.org Thu Jul 4 12:40:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B737E15D4D5B; Thu, 4 Jul 2019 12:40:39 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 587C7906EF; Thu, 4 Jul 2019 12:40:39 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 326A123073; Thu, 4 Jul 2019 12:40:39 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64CedsA005636; Thu, 4 Jul 2019 12:40:39 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64CedlO005635; Thu, 4 Jul 2019 12:40:39 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201907041240.x64CedlO005635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Thu, 4 Jul 2019 12:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349724 - stable/12/stand/ofw/libofw X-SVN-Group: stable-12 X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: stable/12/stand/ofw/libofw X-SVN-Commit-Revision: 349724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 587C7906EF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 12:40:39 -0000 Author: luporl Date: Thu Jul 4 12:40:38 2019 New Revision: 349724 URL: https://svnweb.freebsd.org/changeset/base/349724 Log: MFC r349188 [PPC] Fix loader input with newer QEMU versions At least since version 4.0.0, QEMU became bug-compatible with PowerVM's vty, by inserting a \0 after every \r. As this confuses loader's interpreter and as a \0 coming from the console doesn't seem reasonable, it's now being filtered at OFW console input. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D20676 Modified: stable/12/stand/ofw/libofw/ofw_console.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/ofw/libofw/ofw_console.c ============================================================================== --- stable/12/stand/ofw/libofw/ofw_console.c Thu Jul 4 12:31:24 2019 (r349723) +++ stable/12/stand/ofw/libofw/ofw_console.c Thu Jul 4 12:40:38 2019 (r349724) @@ -97,7 +97,11 @@ ofw_cons_getchar() return l; } - if (OF_read(stdin, &ch, 1) > 0) + /* At least since version 4.0.0, QEMU became bug-compatible + * with PowerVM's vty, by inserting a \0 after every \r. + * As this confuses loader's interpreter and as a \0 coming + * from the console doesn't seem reasonable, it's filtered here. */ + if (OF_read(stdin, &ch, 1) > 0 && ch != '\0') return (ch); return (-1); From owner-svn-src-all@freebsd.org Thu Jul 4 13:20:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 052A215D55D3; Thu, 4 Jul 2019 13:20:33 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99F1F91632; Thu, 4 Jul 2019 13:20:32 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FCEA23703; Thu, 4 Jul 2019 13:20:32 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64DKWUK026295; Thu, 4 Jul 2019 13:20:32 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64DKWhu026294; Thu, 4 Jul 2019 13:20:32 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201907041320.x64DKWhu026294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 4 Jul 2019 13:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349725 - stable/12/libexec/rc X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/libexec/rc X-SVN-Commit-Revision: 349725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 99F1F91632 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 13:20:33 -0000 Author: eugen Date: Thu Jul 4 13:20:32 2019 New Revision: 349725 URL: https://svnweb.freebsd.org/changeset/base/349725 Log: MFC r345970: network.subr: improve configuration of cloned gif(4) interfaces ifconfig(8) syntax allows to specify only single address_family, so we need additional invocation of ifconfig to support configuration of cloned gif interface that may use different address families for its internal and external addresses. Also, ifconfig(8) does not allow to omit "inet6" keyword for address family specifying IPv6 addresses as outer addresses of the interface. Also, address_family is not "parameter" and it has to go before parameters including "tunnel" keyword, so "ifconfig gif0 tunnel inet6 $oip1 $oip2" would be wrong syntax and only "ifconfig gif0 inet6 tunnel $oip1 $oip2" is right. With this change, the following works: gifconfig_gif0="inet6 2a00::1 2a01::1" ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" Modified: stable/12/libexec/rc/network.subr Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/network.subr ============================================================================== --- stable/12/libexec/rc/network.subr Thu Jul 4 12:40:38 2019 (r349724) +++ stable/12/libexec/rc/network.subr Thu Jul 4 13:20:32 2019 (r349725) @@ -1323,7 +1323,7 @@ wlan_down() # clone_up() { - local _list ifn ifopt _iflist _n tmpargs + local _list ifn ifopt _iflist _inet6 _n tmpargs _list= _iflist=$* @@ -1389,9 +1389,21 @@ clone_up() esac if [ $? -eq 0 ]; then _list="$_list $ifn" + tmpargs=$(get_if_var $ifn gifconfig_IF) + _inet6='' + case "$tmpargs" in + '') + ;; + inet6[[:space:]]*) + tmpargs=${tmpargs#inet6} + _inet6=inet6 + # FALLTHROUGH + ;& + *) + ${IFCONFIG_CMD} $ifn $_inet6 tunnel $tmpargs + ;; + esac fi - tmpargs=$(get_if_var $ifn gifconfig_IF) - eval ifconfig_${ifn}=\"\$ifconfig_${ifn} tunnel \$tmpargs\" done if [ -n "${_list# }" ]; then echo "Created clone interfaces: ${_list# }." From owner-svn-src-all@freebsd.org Thu Jul 4 13:23:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0E7515D5881; Thu, 4 Jul 2019 13:23:19 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62C2491B22; Thu, 4 Jul 2019 13:23:19 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D2F92389D; Thu, 4 Jul 2019 13:23:19 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64DNJhf031208; Thu, 4 Jul 2019 13:23:19 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64DNJAO031207; Thu, 4 Jul 2019 13:23:19 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201907041323.x64DNJAO031207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 4 Jul 2019 13:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349726 - stable/11/etc X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/etc X-SVN-Commit-Revision: 349726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 62C2491B22 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 13:23:20 -0000 Author: eugen Date: Thu Jul 4 13:23:18 2019 New Revision: 349726 URL: https://svnweb.freebsd.org/changeset/base/349726 Log: MFC r345970: network.subr: improve configuration of cloned gif(4) interfaces ifconfig(8) syntax allows to specify only single address_family, so we need additional invocation of ifconfig to support configuration of cloned gif interface that may use different address families for its internal and external addresses. Also, ifconfig(8) does not allow to omit "inet6" keyword for address family specifying IPv6 addresses as outer addresses of the interface. Also, address_family is not "parameter" and it has to go before parameters including "tunnel" keyword, so "ifconfig gif0 tunnel inet6 $oip1 $oip2" would be wrong syntax and only "ifconfig gif0 inet6 tunnel $oip1 $oip2" is right. With this change, the following works: gifconfig_gif0="inet6 2a00::1 2a01::1" ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" Modified: stable/11/etc/network.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/network.subr ============================================================================== --- stable/11/etc/network.subr Thu Jul 4 13:20:32 2019 (r349725) +++ stable/11/etc/network.subr Thu Jul 4 13:23:18 2019 (r349726) @@ -1338,7 +1338,7 @@ wlan_down() # clone_up() { - local _list ifn ifopt _iflist _n tmpargs + local _list ifn ifopt _iflist _inet6 _n tmpargs _list= _iflist=$* @@ -1404,9 +1404,21 @@ clone_up() esac if [ $? -eq 0 ]; then _list="$_list $ifn" + tmpargs=$(get_if_var $ifn gifconfig_IF) + _inet6='' + case "$tmpargs" in + '') + ;; + inet6[[:space:]]*) + tmpargs=${tmpargs#inet6} + _inet6=inet6 + # FALLTHROUGH + ;& + *) + ${IFCONFIG_CMD} $ifn $_inet6 tunnel $tmpargs + ;; + esac fi - tmpargs=$(get_if_var $ifn gifconfig_IF) - eval ifconfig_${ifn}=\"\$ifconfig_${ifn} tunnel \$tmpargs\" done if [ -n "${_list# }" ]; then echo "Created clone interfaces: ${_list# }." From owner-svn-src-all@freebsd.org Thu Jul 4 13:57:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0D5615D64FF; Thu, 4 Jul 2019 13:57:07 +0000 (UTC) (envelope-from roger.pau@citrix.com) Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "esa6.hc3370-68.iphmx.com", Issuer "HydrantID SSL ICA G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD03192B89; Thu, 4 Jul 2019 13:57:05 +0000 (UTC) (envelope-from roger.pau@citrix.com) Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: Hic6kaWk23BjxSvrSyC6DrJouxWoubJAkP4CHeJN+89ZVNwBJtbUz3Bc0yi+bClpmj4e5ZR2sD 0EWoYP8y6vDWx4de4ppQ+/jH9Oz/3xxwZk5xOddveptdwVw3+7PHV5QVMGmuU7dcWhBHtjFT0Z n5JJtVxlfQ6sitjTb48U66YCk6EL5JbbyHgWfCLu0qEHuEzC1yiMJdCMWxyyqr+Db6XG4MJZRV gLJBtFAER2+s34sM8x5OT1DppSzPrlkzZq7rzqUcNdjwRGHvtwZMh1l8I4+jtrraasCv8tqda4 wj0= X-SBRS: 2.7 X-MesageID: 2623967 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.63,451,1557201600"; d="scan'208";a="2623967" Date: Thu, 4 Jul 2019 15:56:49 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Mark Johnston CC: , , Subject: Re: svn commit: r349423 - head/contrib/elftoolchain/elfcopy Message-ID: <20190704135649.dsjxkuvj6j25ywdw@Air-de-Roger> References: <201906261635.x5QGZbJ7051084@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <201906261635.x5QGZbJ7051084@repo.freebsd.org> User-Agent: NeoMutt/20180716 X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL02.citrite.net (10.69.22.126) X-Rspamd-Queue-Id: AD03192B89 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of roger.pau@citrix.com designates 216.71.155.175 as permitted sender) smtp.mailfrom=roger.pau@citrix.com X-Spamd-Result: default: False [-3.68 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:216.71.155.175]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[citrix.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE(-0.85)[ip: (-1.24), ipnet: 216.71.154.0/23(-1.80), asn: 16417(-1.15), country: US(-0.06)]; MX_GOOD(-0.01)[cached: mx1.hc3370-68.iphmx.com]; NEURAL_HAM_SHORT(-0.92)[-0.920,0]; RCVD_COUNT_ZERO(0.00)[0]; RCVD_IN_DNSWL_LOW(-0.10)[175.155.71.216.list.dnswl.org : 127.0.3.1]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:16417, ipnet:216.71.154.0/23, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 13:57:08 -0000 On Wed, Jun 26, 2019 at 04:35:37PM +0000, Mark Johnston wrote: > Author: markj > Date: Wed Jun 26 16:35:37 2019 > New Revision: 349423 > URL: https://svnweb.freebsd.org/changeset/base/349423 > > Log: > elfcopy: Provide a size hint when creating the section string table. > > Use the input file's .shstrtab size as the hint if it exists. This > gives a small performance improvement when processing files with > many sections. This change breaks the Xen build using objcopy. I have a very simple test case, pick the file from: https://people.freebsd.org/~royger/buildid.ihex Then do: $ objcopy -I ihex -O binary buildid.ihex buildid.o objcopy: elf_nextscn failed: Invalid argument This used to work before this change, and now fails. Thanks, Roger. From owner-svn-src-all@freebsd.org Thu Jul 4 14:04:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D97A15D679F; Thu, 4 Jul 2019 14:04:09 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42A9B92FD5; Thu, 4 Jul 2019 14:04:09 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B9BF23F4F; Thu, 4 Jul 2019 14:04:09 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64E48A6051887; Thu, 4 Jul 2019 14:04:08 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64E48DN051883; Thu, 4 Jul 2019 14:04:08 GMT (envelope-from br@FreeBSD.org) Message-Id: <201907041404.x64E48DN051883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 4 Jul 2019 14:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349727 - in head/sys/dev: altera/softdma xdma xilinx X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: in head/sys/dev: altera/softdma xdma xilinx X-SVN-Commit-Revision: 349727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 42A9B92FD5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 14:04:09 -0000 Author: br Date: Thu Jul 4 14:04:08 2019 New Revision: 349727 URL: https://svnweb.freebsd.org/changeset/base/349727 Log: Negate the logic of XCHAN_CAP_NOBUFS macro and rename it to XCHAN_CAP_BOUNCE. The only application that uses bounce buffering for now is the Government Furnished Equipment (GFE) P2's dma core (AXIDMA) with its own dedicated cacheless bounce buffer. Sponsored by: DARPA, AFRL Modified: head/sys/dev/altera/softdma/softdma.c head/sys/dev/xdma/xdma.h head/sys/dev/xdma/xdma_sg.c head/sys/dev/xilinx/axidma.c Modified: head/sys/dev/altera/softdma/softdma.c ============================================================================== --- head/sys/dev/altera/softdma/softdma.c Thu Jul 4 13:23:18 2019 (r349726) +++ head/sys/dev/altera/softdma/softdma.c Thu Jul 4 14:04:08 2019 (r349727) @@ -616,7 +616,6 @@ softdma_channel_alloc(device_t dev, struct xdma_channe if (chan->used == 0) { chan->xchan = xchan; xchan->chan = (void *)chan; - xchan->caps |= XCHAN_CAP_NOBUFS; xchan->caps |= XCHAN_CAP_NOSEG; chan->index = i; chan->idx_head = 0; Modified: head/sys/dev/xdma/xdma.h ============================================================================== --- head/sys/dev/xdma/xdma.h Thu Jul 4 13:23:18 2019 (r349726) +++ head/sys/dev/xdma/xdma.h Thu Jul 4 14:04:08 2019 (r349727) @@ -137,7 +137,7 @@ struct xdma_channel { uint32_t caps; #define XCHAN_CAP_BUSDMA (1 << 0) #define XCHAN_CAP_NOSEG (1 << 1) -#define XCHAN_CAP_NOBUFS (1 << 2) +#define XCHAN_CAP_BOUNCE (1 << 2) /* A real hardware driver channel. */ void *chan; Modified: head/sys/dev/xdma/xdma_sg.c ============================================================================== --- head/sys/dev/xdma/xdma_sg.c Thu Jul 4 13:23:18 2019 (r349726) +++ head/sys/dev/xdma/xdma_sg.c Thu Jul 4 14:04:08 2019 (r349727) @@ -290,7 +290,7 @@ xdma_prep_sg(xdma_channel_t *xchan, uint32_t xr_num, } /* Allocate buffers if required. */ - if ((xchan->caps & XCHAN_CAP_NOBUFS) == 0) { + if (xchan->caps & (XCHAN_CAP_BUSDMA | XCHAN_CAP_BOUNCE)) { ret = xchan_bufs_alloc(xchan); if (ret != 0) { device_printf(xdma->dev, @@ -347,9 +347,8 @@ xchan_seg_done(xdma_channel_t *xchan, bus_dmamap_sync(xchan->dma_tag_bufs, b->map, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(xchan->dma_tag_bufs, b->map); - } else { - if ((xchan->caps & XCHAN_CAP_NOBUFS) == 0 && - xr->req_type == XR_TYPE_MBUF && + } else if (xchan->caps & XCHAN_CAP_BOUNCE) { + if (xr->req_type == XR_TYPE_MBUF && xr->direction == XDMA_DEV_TO_MEM) m_copyback(xr->m, 0, st->transferred, (void *)xr->buf.vaddr); @@ -494,13 +493,14 @@ _xdma_load_data(xdma_channel_t *xchan, struct xdma_req switch (xr->req_type) { case XR_TYPE_MBUF: - if ((xchan->caps & XCHAN_CAP_NOBUFS) == 0) { + if (xchan->caps & XCHAN_CAP_BUSDMA) + seg[0].ds_addr = mtod(m, bus_addr_t); + else if (xchan->caps & XCHAN_CAP_BOUNCE) { if (xr->direction == XDMA_MEM_TO_DEV) m_copydata(m, 0, m->m_pkthdr.len, (void *)xr->buf.vaddr); seg[0].ds_addr = (bus_addr_t)xr->buf.paddr; - } else - seg[0].ds_addr = mtod(m, bus_addr_t); + } seg[0].ds_len = m->m_pkthdr.len; break; case XR_TYPE_BIO: @@ -626,7 +626,7 @@ xdma_queue_submit_sg(xdma_channel_t *xchan) sg = xchan->sg; - if ((xchan->caps & XCHAN_CAP_NOBUFS) == 0 && + if ((xchan->caps & (XCHAN_CAP_BOUNCE | XCHAN_CAP_BUSDMA)) && (xchan->flags & XCHAN_BUFS_ALLOCATED) == 0) { device_printf(xdma->dev, "%s: Can't submit a transfer: no bufs\n", Modified: head/sys/dev/xilinx/axidma.c ============================================================================== --- head/sys/dev/xilinx/axidma.c Thu Jul 4 13:23:18 2019 (r349726) +++ head/sys/dev/xilinx/axidma.c Thu Jul 4 14:04:08 2019 (r349727) @@ -399,6 +399,7 @@ axidma_channel_alloc(device_t dev, struct xdma_channel if (axidma_reset(sc, data->id) != 0) return (-1); chan->xchan = xchan; + xchan->caps |= XCHAN_CAP_BOUNCE; xchan->chan = (void *)chan; chan->sc = sc; chan->used = true; From owner-svn-src-all@freebsd.org Thu Jul 4 14:15:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4C3F15D6A1A; Thu, 4 Jul 2019 14:15:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 598B1934B6; Thu, 4 Jul 2019 14:15:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D916240F0; Thu, 4 Jul 2019 14:15:05 +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 x64EF5rd057350; Thu, 4 Jul 2019 14:15:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64EF404057347; Thu, 4 Jul 2019 14:15:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201907041415.x64EF404057347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Jul 2019 14:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349728 - in head/sys: arm/amlogic/aml8726 dev/mmc/host mips/ingenic X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm/amlogic/aml8726 dev/mmc/host mips/ingenic X-SVN-Commit-Revision: 349728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 598B1934B6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 14:15:05 -0000 Author: imp Date: Thu Jul 4 14:15:04 2019 New Revision: 349728 URL: https://svnweb.freebsd.org/changeset/base/349728 Log: Implement missing MMCBR ivars All MMCBR bridges have to implement all the MMCBR variables. This implements them for everybody that currently doesn't. A common routine for this should be written. Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.c head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c head/sys/dev/mmc/host/dwmmc.c head/sys/mips/ingenic/jz4780_mmc.c Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mmc.c Thu Jul 4 14:04:08 2019 (r349727) +++ head/sys/arm/amlogic/aml8726/aml8726_mmc.c Thu Jul 4 14:15:04 2019 (r349728) @@ -965,15 +965,26 @@ aml8726_mmc_read_ivar(device_t bus, device_t child, case MMCBR_IVAR_POWER_MODE: *(int *)result = sc->host.ios.power_mode; break; + case MMCBR_IVAR_RETUNE_REQ: + *(int *)result = return_req_none; case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_VCCQ: + *result = sc->sc_host.ios.vccq; + break; case MMCBR_IVAR_CAPS: *(int *)result = sc->host.caps; break; + case MMCBR_IVAR_TIMING: + *(int *)result = sc->sc_host.ios.timing; + break; case MMCBR_IVAR_MAX_DATA: *(int *)result = AML_MMC_MAX_DMA / MMC_SECTOR_SIZE; break; + case MMCBR_IVAR_MAX_BUSY_TIMEOUT: + *(int *)result = 1000000; /* 1s max */ + break; default: return (EINVAL); } @@ -1011,6 +1022,12 @@ aml8726_mmc_write_ivar(device_t bus, device_t child, break; case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; + break; + case MMCBR_IVAR_VCCQ: + sc->sc_host.ios.vccq = value; + break; + case MMCBR_IVAR_TIMING: + sc->sc_host.ios.timing = value; break; /* These are read-only */ case MMCBR_IVAR_CAPS: Modified: head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu Jul 4 14:04:08 2019 (r349727) +++ head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu Jul 4 14:15:04 2019 (r349728) @@ -1245,15 +1245,27 @@ aml8726_sdxc_read_ivar(device_t bus, device_t child, case MMCBR_IVAR_POWER_MODE: *(int *)result = sc->host.ios.power_mode; break; + case MMCBR_IVAR_RETUNE_REQ: + *(int *)result = return_req_none; + break; case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_VCCQ: + *result = sc->host.ios.vccq; + break; case MMCBR_IVAR_CAPS: *(int *)result = sc->host.caps; break; + case MMCBR_IVAR_TIMING: + *(int *)result = sc->host.ios.timing; + break; case MMCBR_IVAR_MAX_DATA: *(int *)result = AML_SDXC_MAX_DMA / MMC_SECTOR_SIZE; break; + case MMCBR_IVAR_MAX_BUSY_TIMEOUT: + *(int *)result = 1000000; /* 1s max */ + break; default: return (EINVAL); } @@ -1291,6 +1303,12 @@ aml8726_sdxc_write_ivar(device_t bus, device_t child, break; case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; + break; + case MMCBR_IVAR_VCCQ: + sc->host.ios.vccq = value; + break; + case MMCBR_IVAR_TIMING: + sc->host.ios.timing = value; break; /* These are read-only */ case MMCBR_IVAR_CAPS: Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Thu Jul 4 14:04:08 2019 (r349727) +++ head/sys/dev/mmc/host/dwmmc.c Thu Jul 4 14:15:04 2019 (r349728) @@ -1091,6 +1091,9 @@ dwmmc_read_ivar(device_t bus, device_t child, int whic case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_VCCQ: + *(int *)result = sc->host.ios.vccq; + break; case MMCBR_IVAR_CAPS: *(int *)result = sc->host.caps; break; @@ -1141,10 +1144,8 @@ dwmmc_write_ivar(device_t bus, device_t child, int whi case MMCBR_IVAR_TIMING: sc->host.ios.timing = value; break; - - /* Not handled */ case MMCBR_IVAR_VCCQ: - return (0); + sc->sc_host.ios.vccq = value; break; /* These are read-only */ case MMCBR_IVAR_CAPS: Modified: head/sys/mips/ingenic/jz4780_mmc.c ============================================================================== --- head/sys/mips/ingenic/jz4780_mmc.c Thu Jul 4 14:04:08 2019 (r349727) +++ head/sys/mips/ingenic/jz4780_mmc.c Thu Jul 4 14:15:04 2019 (r349728) @@ -774,17 +774,26 @@ jz4780_mmc_read_ivar(device_t bus, device_t child, int case MMCBR_IVAR_POWER_MODE: *(int *)result = sc->sc_host.ios.power_mode; break; + case MMCBR_IVAR_RETUNE_REQ: + *(int *)result = return_req_none; + break; case MMCBR_IVAR_VDD: *(int *)result = sc->sc_host.ios.vdd; break; + case MMCBR_IVAR_VCCQ: + *result = sc->sc_host.ios.vccq; + break; case MMCBR_IVAR_CAPS: *(int *)result = sc->sc_host.caps; break; + case MMCBR_IVAR_TIMING: + *(int *)result = sc->sc_host.ios.timing; + break; case MMCBR_IVAR_MAX_DATA: *(int *)result = 65535; break; - case MMCBR_IVAR_TIMING: - *(int *)result = sc->sc_host.ios.timing; + case MMCBR_IVAR_MAX_BUSY_TIMEOUT: + *(int *)result = 1000000; /* 1s max */ break; } @@ -824,6 +833,9 @@ jz4780_mmc_write_ivar(device_t bus, device_t child, in break; case MMCBR_IVAR_VDD: sc->sc_host.ios.vdd = value; + break; + case MMCBR_IVAR_VCCQ: + sc->sc_host.ios.vccq = value; break; case MMCBR_IVAR_TIMING: sc->sc_host.ios.timing = value; From owner-svn-src-all@freebsd.org Thu Jul 4 14:51:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A70015D74A7; Thu, 4 Jul 2019 14:51:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2174F94503; Thu, 4 Jul 2019 14:51:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1585C2467C; Thu, 4 Jul 2019 14:51:45 +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 x64EpiK5076037; Thu, 4 Jul 2019 14:51:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64EpiEa076036; Thu, 4 Jul 2019 14:51:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201907041451.x64EpiEa076036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 4 Jul 2019 14:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349729 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 349729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2174F94503 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 14:51:45 -0000 Author: bdrewery Date: Thu Jul 4 14:51:44 2019 New Revision: 349729 URL: https://svnweb.freebsd.org/changeset/base/349729 Log: Consider *clean targets as non-build targets as well. MFC after: 2 weeks Sponsored by: DellEMC Modified: head/share/mk/bsd.init.mk head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.init.mk ============================================================================== --- head/share/mk/bsd.init.mk Thu Jul 4 14:15:04 2019 (r349728) +++ head/share/mk/bsd.init.mk Thu Jul 4 14:51:44 2019 (r349729) @@ -58,11 +58,12 @@ $xGRP= ${_gid} # things like 'make all install' or 'make foo install'. # - non-build targets are called .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \ - ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) + ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) && !make(*clean) _SKIP_BUILD= not building at level 0 .elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ ${.TARGETS:Mclean*} == ${.TARGETS} || \ + ${.TARGETS:M*clean} == ${.TARGETS} || \ ${.TARGETS:Mdestroy*} == ${.TARGETS} || \ ${.TARGETS:Mobj} == ${.TARGETS} || \ make(analyze) || make(print-dir) Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Thu Jul 4 14:15:04 2019 (r349728) +++ head/share/mk/bsd.sys.mk Thu Jul 4 14:51:44 2019 (r349729) @@ -284,7 +284,7 @@ PHONY_NOTMAIN = analyze afterdepend afterinstall all b .NOTMAIN: ${PHONY_NOTMAIN:Nall} .if ${MK_STAGING} != "no" -.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*)) +.if defined(_SKIP_BUILD) || (!make(all) && !make(clean*) && !make(*clean)) _SKIP_STAGING?= yes .endif .if ${_SKIP_STAGING:Uno} == "yes" From owner-svn-src-all@freebsd.org Thu Jul 4 14:56:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AAD115D75B8; Thu, 4 Jul 2019 14:56:38 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C1E79477F; Thu, 4 Jul 2019 14:56:37 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd44.google.com with SMTP id s7so13327964iob.11; Thu, 04 Jul 2019 07:56:37 -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:content-transfer-encoding:in-reply-to :user-agent; bh=YUD+yROtQGAg2gRUjLOynKW9CQNfydepZgHMrXGgs+E=; b=EgvNc4wv1oSK3mdN1j9hQa1MmKT1jXNC1zIy9WIj4SjOPkXoq5JND3RF0c7sG/UEpp S2mDqWSOkG6wOssq0ZKSZFyRf/AgUiTJP2ma/jjYcjHK/BTqlz3jfDToxcg++CRqmbMW xURAGMIJlEacmtuYz8FIMvVu6sShxiLg1M3CJie3y3ofNTmZw6miXMH6BtiFPzGnSows d7VjcauvcC8C3vy/ogagM0cHb3xAm26tOjFgJb3PnbrCmh0hbz1A4vmYl11zsb3M2GCs xQ0cj4pwcVTqhDoHC88amHle/S5QwenbAYZilCLfUDGJs7scNa9zhdY1hJY5AyIqX8Fd VoNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=YUD+yROtQGAg2gRUjLOynKW9CQNfydepZgHMrXGgs+E=; b=mK1Pmd/2ezcogAR5WymfUh6eUBzMzH1yrCIJF+P5kawJzifYqzVZzSmbzU3gYHM1mz XlZXBBIGSG7Gapegmk6wRrAKJQL7474Z2rmH4KVIprGv+Q8EPFTxOn4mnGuYzTDvOFM8 DeSkWKwBKqeeuxveGkTDM6KN/AehLL4r16ZBUCqu6qeJ4TalXQLhvNgTQlrjw8Z+xgM8 7TebNfSA+XKk7vX4lWAJU6iKBC5mlQngQa4JHgA060iAMNdixHQMzbwdg5n0sMTwkyt4 cUNQ6EIwAnHVLlNTDSoxeIFpQZK//ov66mL1KYUTQKU7zEEOlJxU7N/DkUTZz7S5pXqY vhqg== X-Gm-Message-State: APjAAAXLVuZF8Rg+Nl+gasPZhM5/j6SV2DfpDFeWKk5WmeeHmf46WsJf LXwMk0TvNBxwkSvb4EhpTDA= X-Google-Smtp-Source: APXvYqwKj4TGt4AbjKRgqDTko05bmibT6V0fhZJR3ReP8o/vt0+XZ5vwxylLO+1G72ycvjXvBUlN+g== X-Received: by 2002:a02:b384:: with SMTP id p4mr50655004jan.125.1562252196971; Thu, 04 Jul 2019 07:56:36 -0700 (PDT) Received: from raichu (toroon0560w-lp140-05-70-29-85-38.dsl.bell.ca. [70.29.85.38]) by smtp.gmail.com with ESMTPSA id l5sm7951295ioq.83.2019.07.04.07.56.35 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 04 Jul 2019 07:56:35 -0700 (PDT) Sender: Mark Johnston Date: Thu, 4 Jul 2019 10:56:31 -0400 From: Mark Johnston To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r349423 - head/contrib/elftoolchain/elfcopy Message-ID: <20190704145631.GA63719@raichu> References: <201906261635.x5QGZbJ7051084@repo.freebsd.org> <20190704135649.dsjxkuvj6j25ywdw@Air-de-Roger> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190704135649.dsjxkuvj6j25ywdw@Air-de-Roger> User-Agent: Mutt/1.12.0 (2019-05-25) X-Rspamd-Queue-Id: 8C1E79477F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.949,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 14:56:38 -0000 On Thu, Jul 04, 2019 at 03:56:49PM +0200, Roger Pau Monn wrote: > On Wed, Jun 26, 2019 at 04:35:37PM +0000, Mark Johnston wrote: > > Author: markj > > Date: Wed Jun 26 16:35:37 2019 > > New Revision: 349423 > > URL: https://svnweb.freebsd.org/changeset/base/349423 > > > > Log: > > elfcopy: Provide a size hint when creating the section string table. > > > > Use the input file's .shstrtab size as the hint if it exists. This > > gives a small performance improvement when processing files with > > many sections. > > This change breaks the Xen build using objcopy. I have a very simple > test case, pick the file from: > > https://people.freebsd.org/~royger/buildid.ihex > > Then do: > > $ objcopy -I ihex -O binary buildid.ihex buildid.o > objcopy: elf_nextscn failed: Invalid argument > > This used to work before this change, and now fails. Thanks, I posted a patch here: https://reviews.freebsd.org/D20852 From owner-svn-src-all@freebsd.org Thu Jul 4 15:07:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45A5615D7878; Thu, 4 Jul 2019 15:07:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF20994C2C; Thu, 4 Jul 2019 15:07:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C47B82497F; Thu, 4 Jul 2019 15:07:19 +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 x64F7JbM084610; Thu, 4 Jul 2019 15:07:19 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64F7J3w084609; Thu, 4 Jul 2019 15:07:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907041507.x64F7J3w084609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 4 Jul 2019 15:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349730 - head/contrib/elftoolchain/elfcopy X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/contrib/elftoolchain/elfcopy X-SVN-Commit-Revision: 349730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DF20994C2C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 15:07:20 -0000 Author: markj Date: Thu Jul 4 15:07:19 2019 New Revision: 349730 URL: https://svnweb.freebsd.org/changeset/base/349730 Log: elfcopy: Clear errors after fetching the shstrtab index. Otherwise a future call to elf_errno() will return a non-zero value. update_shdr(), for example, treats any errors associated with the ELF descriptor as fatal. Clear the error per the first example in elf_errmsg.3. Convert to elf_getshdrstrndx() while here since elf_getshstrndx() is apparently deprecated. Reported by: royger Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20852 Modified: head/contrib/elftoolchain/elfcopy/sections.c Modified: head/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/sections.c Thu Jul 4 14:51:44 2019 (r349729) +++ head/contrib/elftoolchain/elfcopy/sections.c Thu Jul 4 15:07:19 2019 (r349730) @@ -1403,7 +1403,7 @@ init_shstrtab(struct elfcopy *ecp) struct section *s; size_t indx, sizehint; - if (elf_getshstrndx(ecp->ein, &indx) != 0) { + if (elf_getshdrstrndx(ecp->ein, &indx) == 0) { shstrtab = elf_getscn(ecp->ein, indx); if (shstrtab == NULL) errx(EXIT_FAILURE, "elf_getscn failed: %s", @@ -1413,6 +1413,8 @@ init_shstrtab(struct elfcopy *ecp) elf_errmsg(-1)); sizehint = shdr.sh_size; } else { + /* Clear the error from elf_getshdrstrndx(3). */ + (void)elf_errno(); sizehint = 0; } From owner-svn-src-all@freebsd.org Thu Jul 4 15:09:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9996315D794F; Thu, 4 Jul 2019 15:09:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E6E994DB1; Thu, 4 Jul 2019 15:09:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1554024984; Thu, 4 Jul 2019 15:09:59 +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 x64F9wdL084754; Thu, 4 Jul 2019 15:09:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64F9wMN084753; Thu, 4 Jul 2019 15:09:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201907041509.x64F9wMN084753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Jul 2019 15:09:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349731 - head/sys/dev/mmc/host X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/mmc/host X-SVN-Commit-Revision: 349731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E6E994DB1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 15:09:59 -0000 Author: imp Date: Thu Jul 4 15:09:58 2019 New Revision: 349731 URL: https://svnweb.freebsd.org/changeset/base/349731 Log: Fix cut-and-pasto that slipped through my testing. Modified: head/sys/dev/mmc/host/dwmmc.c Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Thu Jul 4 15:07:19 2019 (r349730) +++ head/sys/dev/mmc/host/dwmmc.c Thu Jul 4 15:09:58 2019 (r349731) @@ -1145,7 +1145,7 @@ dwmmc_write_ivar(device_t bus, device_t child, int whi sc->host.ios.timing = value; break; case MMCBR_IVAR_VCCQ: - sc->sc_host.ios.vccq = value; + sc->host.ios.vccq = value; break; /* These are read-only */ case MMCBR_IVAR_CAPS: From owner-svn-src-all@freebsd.org Thu Jul 4 15:26:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C687115D7D44; Thu, 4 Jul 2019 15:26:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C421954C1; Thu, 4 Jul 2019 15:26:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A0CC24CD4; Thu, 4 Jul 2019 15:26:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64FQ3aV094742; Thu, 4 Jul 2019 15:26:03 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64FQ3Uw094741; Thu, 4 Jul 2019 15:26:03 GMT (envelope-from br@FreeBSD.org) Message-Id: <201907041526.x64FQ3Uw094741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 4 Jul 2019 15:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349732 - head/sys/dev/xdma X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/dev/xdma X-SVN-Commit-Revision: 349732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6C421954C1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 15:26:03 -0000 Author: br Date: Thu Jul 4 15:26:02 2019 New Revision: 349732 URL: https://svnweb.freebsd.org/changeset/base/349732 Log: Fix transfers that don't use busdma or bounce buffer (e.g. software dmas). Busdma data loaded by different function (the bug introduced in r349727). Sponsored by: DARPA, AFRL Modified: head/sys/dev/xdma/xdma_sg.c Modified: head/sys/dev/xdma/xdma_sg.c ============================================================================== --- head/sys/dev/xdma/xdma_sg.c Thu Jul 4 15:09:58 2019 (r349731) +++ head/sys/dev/xdma/xdma_sg.c Thu Jul 4 15:26:02 2019 (r349732) @@ -493,14 +493,13 @@ _xdma_load_data(xdma_channel_t *xchan, struct xdma_req switch (xr->req_type) { case XR_TYPE_MBUF: - if (xchan->caps & XCHAN_CAP_BUSDMA) - seg[0].ds_addr = mtod(m, bus_addr_t); - else if (xchan->caps & XCHAN_CAP_BOUNCE) { + if (xchan->caps & XCHAN_CAP_BOUNCE) { if (xr->direction == XDMA_MEM_TO_DEV) m_copydata(m, 0, m->m_pkthdr.len, (void *)xr->buf.vaddr); seg[0].ds_addr = (bus_addr_t)xr->buf.paddr; - } + } else + seg[0].ds_addr = mtod(m, bus_addr_t); seg[0].ds_len = m->m_pkthdr.len; break; case XR_TYPE_BIO: From owner-svn-src-all@freebsd.org Thu Jul 4 15:42:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5433D15D82B7; Thu, 4 Jul 2019 15:42:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF61C95DA7; Thu, 4 Jul 2019 15:42:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB4FB24FF3; Thu, 4 Jul 2019 15:42:02 +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 x64Fg23H004639; Thu, 4 Jul 2019 15:42:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64Fg2gQ004638; Thu, 4 Jul 2019 15:42:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907041542.x64Fg2gQ004638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 4 Jul 2019 15:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349733 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 349733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EF61C95DA7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 15:42:03 -0000 Author: markj Date: Thu Jul 4 15:42:02 2019 New Revision: 349733 URL: https://svnweb.freebsd.org/changeset/base/349733 Log: Defer funsetown() calls for a TTY to tty_rel_free(). We were otherwise failing to call funsetown() for some descriptors associated with a tty, such as pts descriptors. Then, if the descriptor is closed before the owner exits, we may get memory corruption. Reported by: syzbot+c9b6206303bf47bac87e@syzkaller.appspotmail.com Reviewed by: ed MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Thu Jul 4 15:26:02 2019 (r349732) +++ head/sys/kern/tty.c Thu Jul 4 15:42:02 2019 (r349733) @@ -238,9 +238,6 @@ ttydev_leave(struct tty *tp) tp->t_flags |= TF_OPENCLOSE; - /* Stop asynchronous I/O. */ - funsetown(&tp->t_sigio); - /* Remove console TTY. */ if (constty == tp) constty_clear(); @@ -1133,6 +1130,9 @@ tty_rel_free(struct tty *tp) tty_unlock(tp); return; } + + /* Stop asynchronous I/O. */ + funsetown(&tp->t_sigio); /* TTY can be deallocated. */ dev = tp->t_dev; From owner-svn-src-all@freebsd.org Thu Jul 4 17:13:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62A3B15D9A97; Thu, 4 Jul 2019 17:13:42 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05BC4699CD; Thu, 4 Jul 2019 17:13:42 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D469825F3A; Thu, 4 Jul 2019 17:13:41 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64HDfVm052833; Thu, 4 Jul 2019 17:13:41 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64HDfKJ052832; Thu, 4 Jul 2019 17:13:41 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201907041713.x64HDfKJ052832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Thu, 4 Jul 2019 17:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349734 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 349734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 05BC4699CD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 17:13:42 -0000 Author: mhorne Date: Thu Jul 4 17:13:41 2019 New Revision: 349734 URL: https://svnweb.freebsd.org/changeset/base/349734 Log: MFC r349481: Add some missing RISC-V ELF defines Approved by: markj (implicit) Modified: stable/12/sys/sys/elf_common.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/elf_common.h ============================================================================== --- stable/12/sys/sys/elf_common.h Thu Jul 4 15:42:02 2019 (r349733) +++ stable/12/sys/sys/elf_common.h Thu Jul 4 17:13:41 2019 (r349734) @@ -369,6 +369,15 @@ typedef struct { #define EF_PPC_RELOCATABLE 0x00010000 #define EF_PPC_RELOCATABLE_LIB 0x00008000 +#define EF_RISCV_RVC 0x00000001 +#define EF_RISCV_FLOAT_ABI_MASK 0x00000006 +#define EF_RISCV_FLOAT_ABI_SOFT 0x00000000 +#define EF_RISCV_FLOAT_ABI_SINGLE 0x000002 +#define EF_RISCV_FLOAT_ABI_DOUBLE 0x000004 +#define EF_RISCV_FLOAT_ABI_QUAD 0x00000006 +#define EF_RISCV_RVE 0x00000008 +#define EF_RISCV_TSO 0x00000010 + #define EF_SPARC_EXT_MASK 0x00ffff00 #define EF_SPARC_32PLUS 0x00000100 #define EF_SPARC_SUN_US1 0x00000200 @@ -1246,6 +1255,17 @@ typedef struct { #define R_RISCV_ALIGN 43 #define R_RISCV_RVC_BRANCH 44 #define R_RISCV_RVC_JUMP 45 +#define R_RISCV_RVC_LUI 46 +#define R_RISCV_GPREL_I 47 +#define R_RISCV_GPREL_S 48 +#define R_RISCV_TPREL_I 49 +#define R_RISCV_TPREL_S 50 +#define R_RISCV_RELAX 51 +#define R_RISCV_SUB6 52 +#define R_RISCV_SET6 53 +#define R_RISCV_SET8 54 +#define R_RISCV_SET16 55 +#define R_RISCV_SET32 56 #define R_SPARC_NONE 0 #define R_SPARC_8 1 From owner-svn-src-all@freebsd.org Thu Jul 4 17:15:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31E0815D9B59; Thu, 4 Jul 2019 17:15:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C69FA69B44; Thu, 4 Jul 2019 17:15:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9540A25F3C; Thu, 4 Jul 2019 17:15:36 +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 x64HFarQ052978; Thu, 4 Jul 2019 17:15:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64HFa3G052977; Thu, 4 Jul 2019 17:15:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201907041715.x64HFa3G052977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Jul 2019 17:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349735 - releng/11.3/release/doc/en_US.ISO8859-1/errata X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/11.3/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 349735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C69FA69B44 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 17:15:37 -0000 Author: gjb Date: Thu Jul 4 17:15:36 2019 New Revision: 349735 URL: https://svnweb.freebsd.org/changeset/base/349735 Log: Document three open issues affecting 11.3-RELEASE. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jul 4 17:13:41 2019 (r349734) +++ releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jul 4 17:15:36 2019 (r349735) @@ -97,7 +97,34 @@ - No open issues at this time. + [2019-07-04] An issue which can cause a crash when + connecting to a &man.bhyve.4; instance with + a VNC client under certain circumstances + had been reported. An errata notice is planned + post-release. + + + + [2019-07-04] An issue booting &man.bhyve.4; virtual + machines compiled with &man.clang.1; version 8.0.0 or later + had been reported late in the release cycle. An errata + notice is planned post-release. + + + + [2019-07-04] An issue when upgrading from &os; 11.3 + to &os; 12.0 (which occurred earlier in time, + comparatively), had been reported where the + com.delphix:spacemap_v2 &man.zpool.8; + feature does not exist on &os; 12.0, will fail to + import the ZFS pool. + + At this time, it is advised to defer migrating from + &os; 11.3 to &os; 12.x until &os; 12.1 is + available. + + Upgrading from earlier &os; 11.x releases to + &os; 12.0 are believed to be unaffected. From owner-svn-src-all@freebsd.org Thu Jul 4 17:17:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9572D15D9C23; Thu, 4 Jul 2019 17:17:02 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D12DF69D2C; Thu, 4 Jul 2019 17:17:01 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DB3C25F3F; Thu, 4 Jul 2019 17:17:01 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64HH1Rn053123; Thu, 4 Jul 2019 17:17:01 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64HH1de053121; Thu, 4 Jul 2019 17:17:01 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201907041717.x64HH1de053121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Thu, 4 Jul 2019 17:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349736 - in stable/12/contrib/elftoolchain: common readelf X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in stable/12/contrib/elftoolchain: common readelf X-SVN-Commit-Revision: 349736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D12DF69D2C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 17:17:02 -0000 Author: mhorne Date: Thu Jul 4 17:17:00 2019 New Revision: 349736 URL: https://svnweb.freebsd.org/changeset/base/349736 Log: MFC r349482,r349563: readelf: Add support for RISC-V specific e_flags Approved by: markj (mentor, implicit) Modified: stable/12/contrib/elftoolchain/common/elfdefinitions.h stable/12/contrib/elftoolchain/readelf/readelf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- stable/12/contrib/elftoolchain/common/elfdefinitions.h Thu Jul 4 17:15:36 2019 (r349735) +++ stable/12/contrib/elftoolchain/common/elfdefinitions.h Thu Jul 4 17:17:00 2019 (r349736) @@ -33,7 +33,7 @@ * See: http://www.sco.com/developers/gabi/latest/ch4.intro.html * - The May 1998 (version 1.5) draft of "The ELF-64 object format". * - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips, - * ia64, and powerpc processors. + * ia64, powerpc, and RISC-V processors. * - The "Linkers and Libraries Guide", from Sun Microsystems. */ @@ -426,6 +426,22 @@ _ELF_DEFINE_EF(EF_PPC_RELOCATABLE, 0x00010000UL, \ "-mrelocatable flag") \ _ELF_DEFINE_EF(EF_PPC_RELOCATABLE_LIB, 0x00008000UL, \ "-mrelocatable-lib flag") \ +_ELF_DEFINE_EF(EF_RISCV_RVC, 0x00000001UL, \ + "Compressed instruction extension") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_MASK, 0x00000006UL, \ + "Floating point ABI") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_SOFT, 0x00000000UL, \ + "Software emulated floating point") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_SINGLE, 0x00000002UL, \ + "Single precision floating point") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_DOUBLE, 0x00000004UL, \ + "Double precision floating point") \ +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_QUAD, 0x00000006UL, \ + "Quad precision floating point") \ +_ELF_DEFINE_EF(EF_RISCV_RVE, 0x00000008UL, \ + "RV32E embedded ABI") \ +_ELF_DEFINE_EF(EF_RISCV_TSO, 0x00000010UL, \ + "RVTSO memory consistency model") \ _ELF_DEFINE_EF(EF_SPARC_EXT_MASK, 0x00ffff00UL, \ "Vendor Extension mask") \ _ELF_DEFINE_EF(EF_SPARC_32PLUS, 0x00000100UL, \ Modified: stable/12/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/12/contrib/elftoolchain/readelf/readelf.c Thu Jul 4 17:15:36 2019 (r349735) +++ stable/12/contrib/elftoolchain/readelf/readelf.c Thu Jul 4 17:17:00 2019 (r349736) @@ -420,6 +420,13 @@ static struct eflags_desc powerpc_eflags_desc[] = { {0, NULL} }; +static struct eflags_desc riscv_eflags_desc[] = { + {EF_RISCV_RVC, "RVC"}, + {EF_RISCV_RVE, "RVE"}, + {EF_RISCV_TSO, "TSO"}, + {0, NULL} +}; + static struct eflags_desc sparc_eflags_desc[] = { {EF_SPARC_32PLUS, "v8+"}, {EF_SPARC_SUN_US1, "ultrasparcI"}, @@ -2279,6 +2286,23 @@ dump_eflags(struct readelf *re, uint64_t e_flags) case EM_PPC: case EM_PPC64: edesc = powerpc_eflags_desc; + break; + case EM_RISCV: + switch (e_flags & EF_RISCV_FLOAT_ABI_MASK) { + case EF_RISCV_FLOAT_ABI_SOFT: + printf(", soft-float ABI"); + break; + case EF_RISCV_FLOAT_ABI_SINGLE: + printf(", single-float ABI"); + break; + case EF_RISCV_FLOAT_ABI_DOUBLE: + printf(", double-float ABI"); + break; + case EF_RISCV_FLOAT_ABI_QUAD: + printf(", quad-float ABI"); + break; + } + edesc = riscv_eflags_desc; break; case EM_SPARC: case EM_SPARC32PLUS: From owner-svn-src-all@freebsd.org Thu Jul 4 17:19:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C51515D9D2B; Thu, 4 Jul 2019 17:19:10 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2E3B69EA4; Thu, 4 Jul 2019 17:19:09 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7340925F40; Thu, 4 Jul 2019 17:19:09 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64HJ9Un053260; Thu, 4 Jul 2019 17:19:09 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64HJ9lw053259; Thu, 4 Jul 2019 17:19:09 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201907041719.x64HJ9lw053259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Thu, 4 Jul 2019 17:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349737 - stable/12/contrib/elftoolchain/libelftc X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/libelftc X-SVN-Commit-Revision: 349737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A2E3B69EA4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 17:19:10 -0000 Author: mhorne Date: Thu Jul 4 17:19:08 2019 New Revision: 349737 URL: https://svnweb.freebsd.org/changeset/base/349737 Log: MFC r349483: libelftc: add RISC-V bfd targets Approved by: markj (mentor, implicit) Modified: stable/12/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 stable/12/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 Thu Jul 4 17:17:00 2019 (r349736) +++ stable/12/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 Thu Jul 4 17:19:08 2019 (r349737) @@ -76,6 +76,9 @@ Known descriptor names and their properties include: .It Li elf32-powerpc Ta ELF Ta MSB Ta 32 .It Li elf32-powerpc-freebsd Ta ELF Ta MSB Ta 32 .It Li elf32-powerpcle Ta ELF Ta LSB Ta 32 +.It Li elf32-riscv Ta ELF Ta LSB Ta 32 +.It Li elf64-riscv Ta ELF Ta LSB Ta 64 +.It Li elf64-riscv-freebsd Ta ELF Ta LSB Ta 64 .It Li elf32-sh Ta ELF Ta MSB Ta 32 .It Li elf32-shl Ta ELF Ta LSB Ta 32 .It Li elf32-sh-nbsd Ta ELF Ta MSB Ta 32 Modified: stable/12/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c ============================================================================== --- stable/12/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Thu Jul 4 17:17:00 2019 (r349736) +++ stable/12/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c Thu Jul 4 17:19:08 2019 (r349737) @@ -316,6 +316,31 @@ struct _Elftc_Bfd_Target _libelftc_targets[] = { }, { + .bt_name = "elf32-riscv", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2LSB, + .bt_elfclass = ELFCLASS32, + .bt_machine = EM_RISCV, + }, + + { + .bt_name = "elf64-riscv", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2LSB, + .bt_elfclass = ELFCLASS64, + .bt_machine = EM_RISCV, + }, + + { + .bt_name = "elf64-riscv-freebsd", + .bt_type = ETF_ELF, + .bt_byteorder = ELFDATA2MSB, + .bt_elfclass = ELFCLASS64, + .bt_machine = EM_RISCV, + .bt_osabi = ELFOSABI_FREEBSD, + }, + + { .bt_name = "elf64-sh64", .bt_type = ETF_ELF, .bt_byteorder = ELFDATA2MSB, From owner-svn-src-all@freebsd.org Thu Jul 4 17:22:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FF6A15D9F5B; Thu, 4 Jul 2019 17:22:47 +0000 (UTC) (envelope-from mhorne063@gmail.com) Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F5E36A2CE; Thu, 4 Jul 2019 17:22:46 +0000 (UTC) (envelope-from mhorne063@gmail.com) Received: by mail-ot1-x32c.google.com with SMTP id s20so6606689otp.4; Thu, 04 Jul 2019 10:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o4E9Kic7oKDNGUO+2oyNLGgSLhGHanHUmtiPWvA8rEI=; b=kCk/OjsWu6sWo13uxx+Q67ES5jsKyysPBdsblSBxgMCGRXGedGcigkoCZY5Kpz81Ii 6jRX/5DkDtczjOmg3kBWAC5q9TwR/Q68pVp6R3x5ZoO1s4X+6D7+Apf8vmyZYDofXGJx +1QpCTD5nTkio50xWNoaeTMwtogo5yDRzF252LnvRXYxvWAaYioCtty+P107Ts4Ug9ge WZC9hcX5vlk6bLecmtoF5Gfcp+bNuw6kkHChXzZIL4cbXU9Ij4+j6iZzuxrd8C5X9WkR EcJwODutj69km6JCclO0QRb078ozNNnLNEd6g12y8MUIrLidixQ3TOfSYXxhBb9vc4Iq vR3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o4E9Kic7oKDNGUO+2oyNLGgSLhGHanHUmtiPWvA8rEI=; b=qWQGSxjL1toOP03pgMhI3WbS68KEP9kMSV1xQB/2txmnrkL9vI9GZrUSTqC1VzQhHr eyEukCp9Q0rbV1A589nwDbxUAzmZNLzfD1Y+CG3vZTJABMeq/O7546blNAF3AmrHKh6e kg6MUHlUlLcgOc6ZndOoXxbvCz4v34ssP4LG/PJxXwrTSzCUcrUG15Y95h+YGo/gY0dS tnPMavGULMUJT/WMtowNuvMk/A9vgR10JZMQtTSvBmLe8dExI+kQdYdmsJ/CCO7iQ/v+ FuCtzFJ7OuYffRXmXY0LqW/VPUvXPq4nhrKPIcl8GV9HwoyCa/xLMCfoaFi1rtjHTujO VQaA== X-Gm-Message-State: APjAAAXuk+fQzLXvlzy8OqrRLmg2nQyKN8SCfZzwskxLU4yRa5Wdjkcd 0jdbm5ZJ9G0z8MbM3iY6koJYy9+2EvWiW08U+PM6eLNg X-Google-Smtp-Source: APXvYqwvhFz4LpOYp1vUViz1E2T1McHF5ht6qAstdMaKFLbGJeHla6zoNB9RIBc74zfCOJp/AWo52W3LkaY1XMpT6Cw= X-Received: by 2002:a05:6830:144e:: with SMTP id w14mr33005487otp.10.1562260965345; Thu, 04 Jul 2019 10:22:45 -0700 (PDT) MIME-Version: 1.0 References: <201907041717.x64HH1de053121@repo.freebsd.org> In-Reply-To: <201907041717.x64HH1de053121@repo.freebsd.org> From: Mitchell Horne Date: Thu, 4 Jul 2019 13:22:33 -0400 Message-ID: Subject: Re: svn commit: r349736 - in stable/12/contrib/elftoolchain: common readelf To: Mitchell Horne Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8F5E36A2CE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 17:22:47 -0000 On Thu, Jul 4, 2019 at 1:17 PM Mitchell Horne wrote: > > Author: mhorne > Date: Thu Jul 4 17:17:00 2019 > New Revision: 349736 > URL: https://svnweb.freebsd.org/changeset/base/349736 > > Log: > MFC r349482,r349563: Apologies, this should read r349482,r349562. The svn mergeinfo is correct however. > readelf: Add support for RISC-V specific e_flags > > Approved by: markj (mentor, implicit) > > Modified: > stable/12/contrib/elftoolchain/common/elfdefinitions.h > stable/12/contrib/elftoolchain/readelf/readelf.c > Directory Properties: > stable/12/ (props changed) > > Modified: stable/12/contrib/elftoolchain/common/elfdefinitions.h > ============================================================================== > --- stable/12/contrib/elftoolchain/common/elfdefinitions.h Thu Jul 4 17:15:36 2019 (r349735) > +++ stable/12/contrib/elftoolchain/common/elfdefinitions.h Thu Jul 4 17:17:00 2019 (r349736) > @@ -33,7 +33,7 @@ > * See: http://www.sco.com/developers/gabi/latest/ch4.intro.html > * - The May 1998 (version 1.5) draft of "The ELF-64 object format". > * - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips, > - * ia64, and powerpc processors. > + * ia64, powerpc, and RISC-V processors. > * - The "Linkers and Libraries Guide", from Sun Microsystems. > */ > > @@ -426,6 +426,22 @@ _ELF_DEFINE_EF(EF_PPC_RELOCATABLE, 0x00010000UL, \ > "-mrelocatable flag") \ > _ELF_DEFINE_EF(EF_PPC_RELOCATABLE_LIB, 0x00008000UL, \ > "-mrelocatable-lib flag") \ > +_ELF_DEFINE_EF(EF_RISCV_RVC, 0x00000001UL, \ > + "Compressed instruction extension") \ > +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_MASK, 0x00000006UL, \ > + "Floating point ABI") \ > +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_SOFT, 0x00000000UL, \ > + "Software emulated floating point") \ > +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_SINGLE, 0x00000002UL, \ > + "Single precision floating point") \ > +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_DOUBLE, 0x00000004UL, \ > + "Double precision floating point") \ > +_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_QUAD, 0x00000006UL, \ > + "Quad precision floating point") \ > +_ELF_DEFINE_EF(EF_RISCV_RVE, 0x00000008UL, \ > + "RV32E embedded ABI") \ > +_ELF_DEFINE_EF(EF_RISCV_TSO, 0x00000010UL, \ > + "RVTSO memory consistency model") \ > _ELF_DEFINE_EF(EF_SPARC_EXT_MASK, 0x00ffff00UL, \ > "Vendor Extension mask") \ > _ELF_DEFINE_EF(EF_SPARC_32PLUS, 0x00000100UL, \ > > Modified: stable/12/contrib/elftoolchain/readelf/readelf.c > ============================================================================== > --- stable/12/contrib/elftoolchain/readelf/readelf.c Thu Jul 4 17:15:36 2019 (r349735) > +++ stable/12/contrib/elftoolchain/readelf/readelf.c Thu Jul 4 17:17:00 2019 (r349736) > @@ -420,6 +420,13 @@ static struct eflags_desc powerpc_eflags_desc[] = { > {0, NULL} > }; > > +static struct eflags_desc riscv_eflags_desc[] = { > + {EF_RISCV_RVC, "RVC"}, > + {EF_RISCV_RVE, "RVE"}, > + {EF_RISCV_TSO, "TSO"}, > + {0, NULL} > +}; > + > static struct eflags_desc sparc_eflags_desc[] = { > {EF_SPARC_32PLUS, "v8+"}, > {EF_SPARC_SUN_US1, "ultrasparcI"}, > @@ -2279,6 +2286,23 @@ dump_eflags(struct readelf *re, uint64_t e_flags) > case EM_PPC: > case EM_PPC64: > edesc = powerpc_eflags_desc; > + break; > + case EM_RISCV: > + switch (e_flags & EF_RISCV_FLOAT_ABI_MASK) { > + case EF_RISCV_FLOAT_ABI_SOFT: > + printf(", soft-float ABI"); > + break; > + case EF_RISCV_FLOAT_ABI_SINGLE: > + printf(", single-float ABI"); > + break; > + case EF_RISCV_FLOAT_ABI_DOUBLE: > + printf(", double-float ABI"); > + break; > + case EF_RISCV_FLOAT_ABI_QUAD: > + printf(", quad-float ABI"); > + break; > + } > + edesc = riscv_eflags_desc; > break; > case EM_SPARC: > case EM_SPARC32PLUS: > From owner-svn-src-all@freebsd.org Thu Jul 4 17:24:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DCF015DA010; Thu, 4 Jul 2019 17:24:49 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4A0A6A4E0; Thu, 4 Jul 2019 17:24:48 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFB38260DF; Thu, 4 Jul 2019 17:24:48 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64HOmrq058303; Thu, 4 Jul 2019 17:24:48 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64HOmUc058302; Thu, 4 Jul 2019 17:24:48 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <201907041724.x64HOmUc058302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Thu, 4 Jul 2019 17:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349738 - stable/12/contrib/elftoolchain/readelf X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 349738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D4A0A6A4E0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 17:24:49 -0000 Author: mhorne Date: Thu Jul 4 17:24:48 2019 New Revision: 349738 URL: https://svnweb.freebsd.org/changeset/base/349738 Log: MFC r349563: readelf: Add RISC-V DWARF register aliases Approved by: markj (mentor, implicit) Modified: stable/12/contrib/elftoolchain/readelf/readelf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/12/contrib/elftoolchain/readelf/readelf.c Thu Jul 4 17:19:08 2019 (r349737) +++ stable/12/contrib/elftoolchain/readelf/readelf.c Thu Jul 4 17:24:48 2019 (r349738) @@ -2066,6 +2066,74 @@ dwarf_reg(unsigned int mach, unsigned int reg) case 49: return "ldtr"; default: return (NULL); } + case EM_RISCV: + switch (reg) { + case 0: return "zero"; + case 1: return "ra"; + case 2: return "sp"; + case 3: return "gp"; + case 4: return "tp"; + case 5: return "t0"; + case 6: return "t1"; + case 7: return "t2"; + case 8: return "s0"; + case 9: return "s1"; + case 10: return "a0"; + case 11: return "a1"; + case 12: return "a2"; + case 13: return "a3"; + case 14: return "a4"; + case 15: return "a5"; + case 16: return "a6"; + case 17: return "a7"; + case 18: return "s2"; + case 19: return "s3"; + case 20: return "s4"; + case 21: return "s5"; + case 22: return "s6"; + case 23: return "s7"; + case 24: return "s8"; + case 25: return "s9"; + case 26: return "s10"; + case 27: return "s11"; + case 28: return "t3"; + case 29: return "t4"; + case 30: return "t5"; + case 31: return "t6"; + case 32: return "ft0"; + case 33: return "ft1"; + case 34: return "ft2"; + case 35: return "ft3"; + case 36: return "ft4"; + case 37: return "ft5"; + case 38: return "ft6"; + case 39: return "ft7"; + case 40: return "fs0"; + case 41: return "fs1"; + case 42: return "fa0"; + case 43: return "fa1"; + case 44: return "fa2"; + case 45: return "fa3"; + case 46: return "fa4"; + case 47: return "fa5"; + case 48: return "fa6"; + case 49: return "fa7"; + case 50: return "fs2"; + case 51: return "fs3"; + case 52: return "fs4"; + case 53: return "fs5"; + case 54: return "fs6"; + case 55: return "fs7"; + case 56: return "fs8"; + case 57: return "fs9"; + case 58: return "fs10"; + case 59: return "fs11"; + case 60: return "ft8"; + case 61: return "ft9"; + case 62: return "ft10"; + case 63: return "ft11"; + default: return (NULL); + } case EM_X86_64: switch (reg) { case 0: return "rax"; From owner-svn-src-all@freebsd.org Thu Jul 4 18:20:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B47F215DB012; Thu, 4 Jul 2019 18:20:04 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A04A6C582; Thu, 4 Jul 2019 18:20:04 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D8DA26955; Thu, 4 Jul 2019 18:20:04 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64IK3n0086688; Thu, 4 Jul 2019 18:20:03 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64IK3cb086682; Thu, 4 Jul 2019 18:20:03 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907041820.x64IK3cb086682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 4 Jul 2019 18:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349739 - stable/11/usr.sbin/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve X-SVN-Commit-Revision: 349739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5A04A6C582 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 18:20:05 -0000 Author: vmaffione Date: Thu Jul 4 18:20:02 2019 New Revision: 349739 URL: https://svnweb.freebsd.org/changeset/base/349739 Log: MFC r349019 bhyve: move common code to net_utils.c Both virtio_net and e82545 network frontends have code to validate and generate MAC addresses. These functionalities are replicated in the two files, so we move them in a separate compilation unit. Reviewed by: rgrimes, bryanv, imp, kevans Differential Revision: https://reviews.freebsd.org/D20626 Added: stable/11/usr.sbin/bhyve/net_utils.c - copied unchanged from r349019, head/usr.sbin/bhyve/net_utils.c stable/11/usr.sbin/bhyve/net_utils.h - copied unchanged from r349019, head/usr.sbin/bhyve/net_utils.h Modified: stable/11/usr.sbin/bhyve/Makefile stable/11/usr.sbin/bhyve/pci_e82545.c stable/11/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/Makefile ============================================================================== --- stable/11/usr.sbin/bhyve/Makefile Thu Jul 4 17:24:48 2019 (r349738) +++ stable/11/usr.sbin/bhyve/Makefile Thu Jul 4 18:20:02 2019 (r349739) @@ -28,6 +28,7 @@ SRCS= \ mem.c \ mevent.c \ mptbl.c \ + net_utils.c \ pci_ahci.c \ pci_e82545.c \ pci_emul.c \ Copied: stable/11/usr.sbin/bhyve/net_utils.c (from r349019, head/usr.sbin/bhyve/net_utils.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.sbin/bhyve/net_utils.c Thu Jul 4 18:20:02 2019 (r349739, copy of r349019, head/usr.sbin/bhyve/net_utils.c) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 2011 NetApp, Inc. + * + * 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$ + */ + +#include "net_utils.h" +#include "bhyverun.h" +#include +#include +#include +#include +#include + +int +net_parsemac(char *mac_str, uint8_t *mac_addr) +{ + struct ether_addr *ea; + char *tmpstr; + char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; + + tmpstr = strsep(&mac_str,"="); + + if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { + ea = ether_aton(mac_str); + + if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || + memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { + fprintf(stderr, "Invalid MAC %s\n", mac_str); + return (EINVAL); + } else + memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); + } + + return (0); +} + +void +net_genmac(struct pci_devinst *pi, uint8_t *macaddr) +{ + /* + * The default MAC address is the standard NetApp OUI of 00-a0-98, + * followed by an MD5 of the PCI slot/func number and dev name + */ + MD5_CTX mdctx; + unsigned char digest[16]; + char nstr[80]; + + snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, + pi->pi_func, vmname); + + MD5Init(&mdctx); + MD5Update(&mdctx, nstr, (unsigned int)strlen(nstr)); + MD5Final(digest, &mdctx); + + macaddr[0] = 0x00; + macaddr[1] = 0xa0; + macaddr[2] = 0x98; + macaddr[3] = digest[0]; + macaddr[4] = digest[1]; + macaddr[5] = digest[2]; +} Copied: stable/11/usr.sbin/bhyve/net_utils.h (from r349019, head/usr.sbin/bhyve/net_utils.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.sbin/bhyve/net_utils.h Thu Jul 4 18:20:02 2019 (r349739, copy of r349019, head/usr.sbin/bhyve/net_utils.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2019 Vincenzo Maffione + * + * 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 _NET_UTILS_H_ +#define _NET_UTILS_H_ + +#include +#include "pci_emul.h" + +void net_genmac(struct pci_devinst *pi, uint8_t *macaddr); +int net_parsemac(char *mac_str, uint8_t *mac_addr); + +#endif /* _NET_UTILS_H_ */ Modified: stable/11/usr.sbin/bhyve/pci_e82545.c ============================================================================== --- stable/11/usr.sbin/bhyve/pci_e82545.c Thu Jul 4 17:24:48 2019 (r349738) +++ stable/11/usr.sbin/bhyve/pci_e82545.c Thu Jul 4 18:20:02 2019 (r349739) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include "bhyverun.h" #include "pci_emul.h" #include "mevent.h" +#include "net_utils.h" /* Hardware/register definitions XXX: move some to common code. */ #define E82545_VENDOR_ID_INTEL 0x8086 @@ -2256,38 +2257,16 @@ e82545_open_tap(struct e82545_softc *sc, char *opts) } static int -e82545_parsemac(char *mac_str, uint8_t *mac_addr) -{ - struct ether_addr *ea; - char *tmpstr; - char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; - - tmpstr = strsep(&mac_str,"="); - if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { - ea = ether_aton(mac_str); - if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || - memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { - fprintf(stderr, "Invalid MAC %s\n", mac_str); - return (1); - } else - memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); - } - return (0); -} - -static int e82545_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { - DPRINTF("Loading with options: %s\r\n", opts); - - MD5_CTX mdctx; - unsigned char digest[16]; char nstr[80]; struct e82545_softc *sc; char *devname; char *vtopts; int mac_provided; + DPRINTF("Loading with options: %s\r\n", opts); + /* Setup our softc */ sc = calloc(1, sizeof(*sc)); @@ -2337,7 +2316,7 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, (void) strsep(&vtopts, ","); if (vtopts != NULL) { - err = e82545_parsemac(vtopts, sc->esc_mac.octet); + err = net_parsemac(vtopts, sc->esc_mac.octet); if (err != 0) { free(devname); return (err); @@ -2352,24 +2331,8 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, free(devname); } - /* - * The default MAC address is the standard NetApp OUI of 00-a0-98, - * followed by an MD5 of the PCI slot/func number and dev name - */ if (!mac_provided) { - snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, - pi->pi_func, vmname); - - MD5Init(&mdctx); - MD5Update(&mdctx, nstr, strlen(nstr)); - MD5Final(digest, &mdctx); - - sc->esc_mac.octet[0] = 0x00; - sc->esc_mac.octet[1] = 0xa0; - sc->esc_mac.octet[2] = 0x98; - sc->esc_mac.octet[3] = digest[0]; - sc->esc_mac.octet[4] = digest[1]; - sc->esc_mac.octet[5] = digest[2]; + net_genmac(pi, sc->esc_mac.octet); } /* H/w initiated reset */ Modified: stable/11/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/11/usr.sbin/bhyve/pci_virtio_net.c Thu Jul 4 17:24:48 2019 (r349738) +++ stable/11/usr.sbin/bhyve/pci_virtio_net.c Thu Jul 4 18:20:02 2019 (r349739) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include "pci_emul.h" #include "mevent.h" #include "virtio.h" +#include "net_utils.h" #define VTNET_RINGSZ 1024 @@ -695,29 +696,6 @@ pci_vtnet_ping_ctlq(void *vsc, struct vqueue_info *vq) } #endif -static int -pci_vtnet_parsemac(char *mac_str, uint8_t *mac_addr) -{ - struct ether_addr *ea; - char *tmpstr; - char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; - - tmpstr = strsep(&mac_str,"="); - - if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { - ea = ether_aton(mac_str); - - if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || - memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { - fprintf(stderr, "Invalid MAC %s\n", mac_str); - return (EINVAL); - } else - memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); - } - - return (0); -} - static void pci_vtnet_tap_setup(struct pci_vtnet_softc *sc, char *devname) { @@ -792,9 +770,6 @@ pci_vtnet_netmap_setup(struct pci_vtnet_softc *sc, cha static int pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { - MD5_CTX mdctx; - unsigned char digest[16]; - char nstr[80]; char tname[MAXCOMLEN + 1]; struct pci_vtnet_softc *sc; char *devname; @@ -831,7 +806,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * (void) strsep(&vtopts, ","); if (vtopts != NULL) { - err = pci_vtnet_parsemac(vtopts, sc->vsc_config.mac); + err = net_parsemac(vtopts, sc->vsc_config.mac); if (err != 0) { free(devname); return (err); @@ -848,24 +823,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst * free(devname); } - /* - * The default MAC address is the standard NetApp OUI of 00-a0-98, - * followed by an MD5 of the PCI slot/func number and dev name - */ if (!mac_provided) { - snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, - pi->pi_func, vmname); - - MD5Init(&mdctx); - MD5Update(&mdctx, nstr, strlen(nstr)); - MD5Final(digest, &mdctx); - - sc->vsc_config.mac[0] = 0x00; - sc->vsc_config.mac[1] = 0xa0; - sc->vsc_config.mac[2] = 0x98; - sc->vsc_config.mac[3] = digest[0]; - sc->vsc_config.mac[4] = digest[1]; - sc->vsc_config.mac[5] = digest[2]; + net_genmac(pi, sc->vsc_config.mac); } /* initialize config space */ From owner-svn-src-all@freebsd.org Thu Jul 4 18:21:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BE5C15DB0BE; Thu, 4 Jul 2019 18:21:02 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D7216C72C; Thu, 4 Jul 2019 18:21:02 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAA9C2697F; Thu, 4 Jul 2019 18:21:01 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64IL182089038; Thu, 4 Jul 2019 18:21:01 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64IL1WB089037; Thu, 4 Jul 2019 18:21:01 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907041821.x64IL1WB089037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 4 Jul 2019 18:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349740 - stable/11/usr.sbin/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve X-SVN-Commit-Revision: 349740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0D7216C72C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 18:21:02 -0000 Author: vmaffione Date: Thu Jul 4 18:21:01 2019 New Revision: 349740 URL: https://svnweb.freebsd.org/changeset/base/349740 Log: bhyve: vtnet: fix locking on receive The vsc_rx_ready and the RX virtqueue is protected by the rx_mtx lock. However, pci_vtnet_ping_rxq() (currently called only once after each device reset) accesses those without acquiring the lock. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D20609 Modified: stable/11/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/11/usr.sbin/bhyve/pci_virtio_net.c Thu Jul 4 18:20:02 2019 (r349739) +++ stable/11/usr.sbin/bhyve/pci_virtio_net.c Thu Jul 4 18:21:01 2019 (r349740) @@ -580,10 +580,12 @@ pci_vtnet_ping_rxq(void *vsc, struct vqueue_info *vq) /* * A qnotify means that the rx process can now begin */ + pthread_mutex_lock(&sc->rx_mtx); if (sc->vsc_rx_ready == 0) { sc->vsc_rx_ready = 1; vq_kick_disable(vq); } + pthread_mutex_unlock(&sc->rx_mtx); } static void From owner-svn-src-all@freebsd.org Thu Jul 4 18:28:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82D5915DB3F4; Thu, 4 Jul 2019 18:28:50 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E374E6CBFF; Thu, 4 Jul 2019 18:28:49 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B75FE26B0A; Thu, 4 Jul 2019 18:28:49 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64ISnKm091880; Thu, 4 Jul 2019 18:28:49 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64ISnrU091879; Thu, 4 Jul 2019 18:28:49 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201907041828.x64ISnrU091879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Thu, 4 Jul 2019 18:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349741 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E374E6CBFF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 18:28:50 -0000 Author: dougm Date: Thu Jul 4 18:28:49 2019 New Revision: 349741 URL: https://svnweb.freebsd.org/changeset/base/349741 Log: Drop a temp variable from vm_map_insert, with no effect on the resulting amd64 machine code. Reviewed by: alc Approved by: kib, markj (mentors, implicit) Differential Revision: https://reviews.freebsd.org/D20849 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Jul 4 18:21:01 2019 (r349740) +++ head/sys/vm/vm_map.c Thu Jul 4 18:28:49 2019 (r349741) @@ -1422,7 +1422,7 @@ int vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset, vm_offset_t start, vm_offset_t end, vm_prot_t prot, vm_prot_t max, int cow) { - vm_map_entry_t new_entry, prev_entry, temp_entry; + vm_map_entry_t new_entry, prev_entry; struct ucred *cred; vm_eflags_t protoeflags; vm_inherit_t inheritance; @@ -1447,10 +1447,8 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_oof * Find the entry prior to the proposed starting address; if it's part * of an existing entry, this range is bogus. */ - if (vm_map_lookup_entry(map, start, &temp_entry)) + if (vm_map_lookup_entry(map, start, &prev_entry)) return (KERN_NO_SPACE); - - prev_entry = temp_entry; /* * Assert that the next entry doesn't overlap the end point. From owner-svn-src-all@freebsd.org Thu Jul 4 19:02:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AECD15DBDBE; Thu, 4 Jul 2019 19:02:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D46746DDD6; Thu, 4 Jul 2019 19:02:03 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADB73270AB; Thu, 4 Jul 2019 19:02:03 +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 x64J23wf011070; Thu, 4 Jul 2019 19:02:03 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64J23f3011067; Thu, 4 Jul 2019 19:02:03 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201907041902.x64J23f3011067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 4 Jul 2019 19:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349742 - stable/12/release/powerpc X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/12/release/powerpc X-SVN-Commit-Revision: 349742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D46746DDD6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 19:02:04 -0000 Author: jhibbits Date: Thu Jul 4 19:02:03 2019 New Revision: 349742 URL: https://svnweb.freebsd.org/changeset/base/349742 Log: MFC r347986: Update loader size on powerpc isos loader has grown to the point it's overflowing the existing 307200 bytes allocated to it in the HFS boot partition on the isos. Bump the space reservation up to 500k. Modified: stable/12/release/powerpc/generate-hfs.sh stable/12/release/powerpc/hfs-boot.bz2.uu Directory Properties: stable/12/ (props changed) Modified: stable/12/release/powerpc/generate-hfs.sh ============================================================================== --- stable/12/release/powerpc/generate-hfs.sh Thu Jul 4 18:28:49 2019 (r349741) +++ stable/12/release/powerpc/generate-hfs.sh Thu Jul 4 19:02:03 2019 (r349742) @@ -13,7 +13,7 @@ # $FreeBSD$ HFS_SIZE=400 #Size in 2048-byte blocks of the produced image -LOADER_SIZE=300k +LOADER_SIZE=500k # Generate 800K HFS image OUTPUT_FILE=hfs-boot Modified: stable/12/release/powerpc/hfs-boot.bz2.uu ============================================================================== --- stable/12/release/powerpc/hfs-boot.bz2.uu Thu Jul 4 18:28:49 2019 (r349741) +++ stable/12/release/powerpc/hfs-boot.bz2.uu Thu Jul 4 19:02:03 2019 (r349742) @@ -2,22 +2,22 @@ HFS boot filesystem created by generate-hfs.sh DO NOT EDIT $FreeBSD$ begin 644 hfs-boot.bz2 -M0EIH.3%!62936=#$Y.(``"___?_O_G)7!_Y]OW??5#]U_^!`0`,@1`!!``!@ -M(0!`3,`"L"4.2U"2(H9%/:*>TFDVU3RGZID'J&C3U,@T-&@`/1!H>IZC1D#( -M`D24TTRFC1D]*;$@!IZ@Q!IH-````#0&33":?J@<:&AH:`:`Q`T!D``&F@`: -M`9````PDI1J>0Q,H/1J&@```!D-`````T-``#SZHHR(+Y*Y9J*Z:4KK=T]W@ -M4RV\LG/;0XDPC7^`9DO3/3&*].462T,NO#AA9C,O\0!)^Q@@S6";2`!);?8(B6BR1(-7Q*8?>>HPQSBQE>M$A9K6FFW<:#6[D931J%U.F8*`0 -MD(,M80A(0;]K'X'SI]G(C)Y).AK_/0)D(2$$]JB$]]F').M4RF8O%[IHK[0O -MMQ?'>O[U8EM;>U",KY^*%FO9C05_435?.4*F[6AIL%&9C<9W&& -M[ZMP(TG!'*4Z>@6TM)0BS.D._O,WR9OJ728V48I;DD=8QGBE7J-&L^?=0JEF -MV2`B/)/D\)83IS@32(;!P,152U()0VGQH>2F$UC:M!D5`F#1W$\:KKDR[TQB -MN;N5B1;P!7:AG#1BP2%-Q$7I6QE,Y?NHIK_LR+HA]22HW0.8(^G4/X`Z@!Z6 -8#PQ(0))/`A(0.'VUG_\7D\*>4\HS2-`:`#0````>IH`>H!H-`$B23)H"8% +M!^DF@!ID`:-!H-``&@]3U-`#0]('``-!H:#0`:9!H9`TT``!D`&0&0`$DDIH +M-I-`]0#3U-!HT`'J-``````T-`:&(\F**;,&,E=GQ&[8L)7V[YZ^ZJR_.@4& +MU2XDPC+N!>EYZ/W&3#04SE<:P5525]GTO0!)[3!!B8)L`$@-R?/:TG2RBWBD +M0W-`28BS(@AF_JA3LX#"=D,6`8$FQH;$D(00T-/U)FN-$V.@D&`83,*F)5QB +M4FE2VQ0-(20@DF(-O(HKUH0H8CD,%=&+-^.M]B8!::Q1RF@RL&TP46*0U-B% +MB<50X!"$#S8DV:/)48JA*AC$4DI.CV$L!H)>35`M2ZH9QEA%Q`A30=L(-&8J4!RX`FT"S%(H51.1'GG@?L)8[-HK%K>HLXPST0\@K. +M.0JVBB]*R,L4EW?[61,+)QSE0`]`'!N]>P2IX`_7`^,`A"!])"$DG#MJ +,K_B[DBG"A(;3UI(( ` end From owner-svn-src-all@freebsd.org Thu Jul 4 19:12:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74A4115DC145; Thu, 4 Jul 2019 19:12:14 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1914E6E2AD; Thu, 4 Jul 2019 19:12:14 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA0D327391; Thu, 4 Jul 2019 19:12:13 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64JCDRg016917; Thu, 4 Jul 2019 19:12:13 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64JCDQf016916; Thu, 4 Jul 2019 19:12:13 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201907041912.x64JCDQf016916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Thu, 4 Jul 2019 19:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349743 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1914E6E2AD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 19:12:14 -0000 Author: dougm Date: Thu Jul 4 19:12:13 2019 New Revision: 349743 URL: https://svnweb.freebsd.org/changeset/base/349743 Log: Change boolean_t variables in vm_map_unwire and vm_map_wire_locked to bool. Drop result variable. Add holes_ok bool to replace repeated masking of flags parameter. Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20846 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Jul 4 19:02:03 2019 (r349742) +++ head/sys/vm/vm_map.c Thu Jul 4 19:12:13 2019 (r349743) @@ -2849,15 +2849,16 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs vm_offset_t saved_start; unsigned int last_timestamp; int rv; - boolean_t need_wakeup, result, user_unwire; + bool holes_ok, need_wakeup, user_unwire; if (start == end) return (KERN_SUCCESS); - user_unwire = (flags & VM_MAP_WIRE_USER) ? TRUE : FALSE; + holes_ok = (flags & VM_MAP_WIRE_HOLESOK) != 0; + user_unwire = (flags & VM_MAP_WIRE_USER) != 0; vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); if (!vm_map_lookup_entry(map, start, &first_entry)) { - if (flags & VM_MAP_WIRE_HOLESOK) + if (holes_ok) first_entry = first_entry->next; else { vm_map_unlock(map); @@ -2889,7 +2890,7 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs */ if (!vm_map_lookup_entry(map, saved_start, &tmp_entry)) { - if (flags & VM_MAP_WIRE_HOLESOK) + if (holes_ok) tmp_entry = tmp_entry->next; else { if (saved_start == start) { @@ -2926,9 +2927,9 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs entry->wiring_thread = curthread; /* * Check the map for holes in the specified region. - * If VM_MAP_WIRE_HOLESOK was specified, skip this check. + * If holes_ok, skip this check. */ - if (((flags & VM_MAP_WIRE_HOLESOK) == 0) && + if (!holes_ok && (entry->end < end && entry->next->start > entry->end)) { end = entry->end; rv = KERN_INVALID_ADDRESS; @@ -2947,17 +2948,15 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs } rv = KERN_SUCCESS; done: - need_wakeup = FALSE; - if (first_entry == NULL) { - result = vm_map_lookup_entry(map, start, &first_entry); - if (!result && (flags & VM_MAP_WIRE_HOLESOK)) - first_entry = first_entry->next; - else - KASSERT(result, ("vm_map_unwire: lookup failed")); + need_wakeup = false; + if (first_entry == NULL && + !vm_map_lookup_entry(map, start, &first_entry)) { + KASSERT(holes_ok, ("vm_map_unwire: lookup failed")); + first_entry = first_entry->next; } for (entry = first_entry; entry->start < end; entry = entry->next) { /* - * If VM_MAP_WIRE_HOLESOK was specified, an empty + * If holes_ok was specified, an empty * space in the unwired region could have been mapped * while the map lock was dropped for draining * MAP_ENTRY_IN_TRANSITION. Moreover, another thread @@ -2967,7 +2966,7 @@ done: */ if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 || entry->wiring_thread != curthread) { - KASSERT((flags & VM_MAP_WIRE_HOLESOK) != 0, + KASSERT(holes_ok, ("vm_map_unwire: !HOLESOK and new/changed entry")); continue; } @@ -2989,7 +2988,7 @@ done: entry->wiring_thread = NULL; if (entry->eflags & MAP_ENTRY_NEEDS_WAKEUP) { entry->eflags &= ~MAP_ENTRY_NEEDS_WAKEUP; - need_wakeup = TRUE; + need_wakeup = true; } vm_map_simplify_entry(map, entry); } @@ -3083,7 +3082,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm u_long npages; u_int last_timestamp; int rv; - boolean_t need_wakeup, result, user_wire; + bool holes_ok, need_wakeup, user_wire; vm_prot_t prot; VM_MAP_ASSERT_LOCKED(map); @@ -3093,10 +3092,11 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm prot = 0; if (flags & VM_MAP_WIRE_WRITE) prot |= VM_PROT_WRITE; - user_wire = (flags & VM_MAP_WIRE_USER) ? TRUE : FALSE; + holes_ok = (flags & VM_MAP_WIRE_HOLESOK) != 0; + user_wire = (flags & VM_MAP_WIRE_USER) != 0; VM_MAP_RANGE_CHECK(map, start, end); if (!vm_map_lookup_entry(map, start, &first_entry)) { - if (flags & VM_MAP_WIRE_HOLESOK) + if (holes_ok) first_entry = first_entry->next; else return (KERN_INVALID_ADDRESS); @@ -3126,7 +3126,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm */ if (!vm_map_lookup_entry(map, saved_start, &tmp_entry)) { - if (flags & VM_MAP_WIRE_HOLESOK) + if (holes_ok) tmp_entry = tmp_entry->next; else { if (saved_start == start) { @@ -3163,7 +3163,7 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm if ((entry->protection & (VM_PROT_READ | VM_PROT_EXECUTE)) == 0 || (entry->protection & prot) != prot) { entry->eflags |= MAP_ENTRY_WIRE_SKIPPED; - if ((flags & VM_MAP_WIRE_HOLESOK) == 0) { + if (!holes_ok) { end = entry->end; rv = KERN_INVALID_ADDRESS; goto done; @@ -3208,9 +3208,10 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm * may have been clipped, but NOT merged or * deleted. */ - result = vm_map_lookup_entry(map, saved_start, - &tmp_entry); - KASSERT(result, ("vm_map_wire: lookup failed")); + if (!vm_map_lookup_entry(map, saved_start, + &tmp_entry)) + KASSERT(false, + ("vm_map_wire: lookup failed")); if (entry == first_entry) first_entry = tmp_entry; else @@ -3244,9 +3245,9 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm } /* * Check the map for holes in the specified region. - * If VM_MAP_WIRE_HOLESOK was specified, skip this check. + * If holes_ok was specified, skip this check. */ - if ((flags & VM_MAP_WIRE_HOLESOK) == 0 && + if (!holes_ok && entry->end < end && entry->next->start > entry->end) { end = entry->end; rv = KERN_INVALID_ADDRESS; @@ -3256,17 +3257,15 @@ vm_map_wire_locked(vm_map_t map, vm_offset_t start, vm } rv = KERN_SUCCESS; done: - need_wakeup = FALSE; - if (first_entry == NULL) { - result = vm_map_lookup_entry(map, start, &first_entry); - if (!result && (flags & VM_MAP_WIRE_HOLESOK)) - first_entry = first_entry->next; - else - KASSERT(result, ("vm_map_wire: lookup failed")); + need_wakeup = false; + if (first_entry == NULL && + !vm_map_lookup_entry(map, start, &first_entry)) { + KASSERT(holes_ok, ("vm_map_wire: lookup failed")); + first_entry = first_entry->next; } for (entry = first_entry; entry->start < end; entry = entry->next) { /* - * If VM_MAP_WIRE_HOLESOK was specified, an empty + * If holes_ok was specified, an empty * space in the unwired region could have been mapped * while the map lock was dropped for faulting in the * pages or draining MAP_ENTRY_IN_TRANSITION. @@ -3276,7 +3275,7 @@ done: */ if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 || entry->wiring_thread != curthread) { - KASSERT((flags & VM_MAP_WIRE_HOLESOK) != 0, + KASSERT(holes_ok, ("vm_map_wire: !HOLESOK and new/changed entry")); continue; } @@ -3317,7 +3316,7 @@ done: entry->wiring_thread = NULL; if (entry->eflags & MAP_ENTRY_NEEDS_WAKEUP) { entry->eflags &= ~MAP_ENTRY_NEEDS_WAKEUP; - need_wakeup = TRUE; + need_wakeup = true; } vm_map_simplify_entry(map, entry); } From owner-svn-src-all@freebsd.org Thu Jul 4 19:17:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 553E115DC352; Thu, 4 Jul 2019 19:17:56 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA8836E6E7; Thu, 4 Jul 2019 19:17:55 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3EEF273D8; Thu, 4 Jul 2019 19:17:55 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64JHtsv018160; Thu, 4 Jul 2019 19:17:55 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64JHt2V018159; Thu, 4 Jul 2019 19:17:55 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201907041917.x64JHt2V018159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Thu, 4 Jul 2019 19:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349744 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EA8836E6E7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 19:17:56 -0000 Author: dougm Date: Thu Jul 4 19:17:55 2019 New Revision: 349744 URL: https://svnweb.freebsd.org/changeset/base/349744 Log: Replace a 'goto' with an 'else' in vm_map_wire_locked. Reviewed by: alc Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20855 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Jul 4 19:12:13 2019 (r349743) +++ head/sys/vm/vm_map.c Thu Jul 4 19:17:55 2019 (r349744) @@ -3280,10 +3280,9 @@ done: continue; } - if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) - goto next_entry_done; - - if (rv == KERN_SUCCESS) { + if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) { + /* do nothing */ + } else if (rv == KERN_SUCCESS) { if (user_wire) entry->eflags |= MAP_ENTRY_USER_WIRED; } else if (entry->wired_count == -1) { @@ -3306,7 +3305,6 @@ done: } else entry->wired_count--; } - next_entry_done: KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0, ("vm_map_wire: in-transition flag missing %p", entry)); KASSERT(entry->wiring_thread == curthread, From owner-svn-src-all@freebsd.org Thu Jul 4 19:25:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9989515DC768; Thu, 4 Jul 2019 19:25:31 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F1896ED4C; Thu, 4 Jul 2019 19:25:31 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18370275EA; Thu, 4 Jul 2019 19:25:31 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64JPUNo023620; Thu, 4 Jul 2019 19:25:30 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64JPUFM023619; Thu, 4 Jul 2019 19:25:30 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201907041925.x64JPUFM023619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Thu, 4 Jul 2019 19:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349745 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3F1896ED4C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 19:25:31 -0000 Author: dougm Date: Thu Jul 4 19:25:30 2019 New Revision: 349745 URL: https://svnweb.freebsd.org/changeset/base/349745 Log: Move an assignment, drop a label, and change gotos to break statements in vm_map_unwire. The code generated on amd86 is unchanged. Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20850 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Jul 4 19:17:55 2019 (r349744) +++ head/sys/vm/vm_map.c Thu Jul 4 19:25:30 2019 (r349745) @@ -2867,6 +2867,7 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs } last_timestamp = map->timestamp; entry = first_entry; + rv = KERN_SUCCESS; while (entry->start < end) { if (entry->eflags & MAP_ENTRY_IN_TRANSITION) { /* @@ -2902,7 +2903,7 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs } end = saved_start; rv = KERN_INVALID_ADDRESS; - goto done; + break; } } if (entry == first_entry) @@ -2933,7 +2934,7 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs (entry->end < end && entry->next->start > entry->end)) { end = entry->end; rv = KERN_INVALID_ADDRESS; - goto done; + break; } /* * If system unwiring, require that the entry is system wired. @@ -2942,12 +2943,10 @@ vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offs vm_map_entry_system_wired_count(entry) == 0) { end = entry->end; rv = KERN_INVALID_ARGUMENT; - goto done; + break; } entry = entry->next; } - rv = KERN_SUCCESS; -done: need_wakeup = false; if (first_entry == NULL && !vm_map_lookup_entry(map, start, &first_entry)) { From owner-svn-src-all@freebsd.org Thu Jul 4 19:40:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8BED15DCB79; Thu, 4 Jul 2019 19:40:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EF3C6F477; Thu, 4 Jul 2019 19:40:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74448277B3; Thu, 4 Jul 2019 19:40:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64Je1GN029299; Thu, 4 Jul 2019 19:40:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64Je1Uv029298; Thu, 4 Jul 2019 19:40:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201907041940.x64Je1Uv029298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 4 Jul 2019 19:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349746 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 349746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7EF3C6F477 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 19:40:02 -0000 Author: trasz Date: Thu Jul 4 19:40:01 2019 New Revision: 349746 URL: https://svnweb.freebsd.org/changeset/base/349746 Log: Fix linuxulator prlimit64(2) with pid == 0. This makes 'ulimit -a' return something reasonable, and helps linux binaries which attempt to close all the files, eg apt(8). Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20692 Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Thu Jul 4 19:25:30 2019 (r349745) +++ head/sys/compat/linux/linux_misc.c Thu Jul 4 19:40:01 2019 (r349746) @@ -2001,10 +2001,14 @@ linux_prlimit64(struct thread *td, struct linux_prlimi flags |= PGET_CANDEBUG; else flags |= PGET_CANSEE; - error = pget(args->pid, flags, &p); - if (error != 0) - return (error); - + if (args->pid == 0) { + p = td->td_proc; + PHOLD(p); + } else { + error = pget(args->pid, flags, &p); + if (error != 0) + return (error); + } if (args->old != NULL) { PROC_LOCK(p); lim_rlimit_proc(p, which, &rlim); From owner-svn-src-all@freebsd.org Thu Jul 4 19:44:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76AA415DCD90; Thu, 4 Jul 2019 19:44:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1930A6F8F5; Thu, 4 Jul 2019 19:44:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7C6027983; Thu, 4 Jul 2019 19:44:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64JiDbm034026; Thu, 4 Jul 2019 19:44:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64JiDna034025; Thu, 4 Jul 2019 19:44:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201907041944.x64JiDna034025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 4 Jul 2019 19:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349747 - head/sys/amd64/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/amd64/linux X-SVN-Commit-Revision: 349747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1930A6F8F5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 19:44:14 -0000 Author: trasz Date: Thu Jul 4 19:44:13 2019 New Revision: 349747 URL: https://svnweb.freebsd.org/changeset/base/349747 Log: Implement PTRACE_GETSIGINFO. This makes Linux strace(1) quieter in some cases (strace -f man id > /dev/null). Reviewed by: dchagin MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20691 Modified: head/sys/amd64/linux/linux_ptrace.c Modified: head/sys/amd64/linux/linux_ptrace.c ============================================================================== --- head/sys/amd64/linux/linux_ptrace.c Thu Jul 4 19:40:01 2019 (r349746) +++ head/sys/amd64/linux/linux_ptrace.c Thu Jul 4 19:44:13 2019 (r349747) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #define LINUX_PTRACE_DETACH 17 #define LINUX_PTRACE_SYSCALL 24 #define LINUX_PTRACE_SETOPTIONS 0x4200 +#define LINUX_PTRACE_GETSIGINFO 0x4202 #define LINUX_PTRACE_GETREGSET 0x4204 #define LINUX_PTRACE_SEIZE 0x4206 @@ -367,6 +368,31 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, } static int +linux_ptrace_getsiginfo(struct thread *td, pid_t pid, l_ulong data) +{ + struct ptrace_lwpinfo lwpinfo; + l_siginfo_t l_siginfo; + int error, sig; + + error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); + if (error != 0) { + linux_msg(td, "PT_LWPINFO failed with error %d", error); + return (error); + } + + if ((lwpinfo.pl_flags & PL_FLAG_SI) == 0) { + error = EINVAL; + linux_msg(td, "no PL_FLAG_SI, returning %d", error); + return (error); + } + + sig = bsd_to_linux_signal(lwpinfo.pl_siginfo.si_signo); + siginfo_to_lsiginfo(&lwpinfo.pl_siginfo, &l_siginfo, sig); + error = copyout(&l_siginfo, (void *)data, sizeof(l_siginfo)); + return (error); +} + +static int linux_ptrace_getregs(struct thread *td, pid_t pid, void *data) { struct ptrace_lwpinfo lwpinfo; @@ -579,6 +605,9 @@ linux_ptrace(struct thread *td, struct linux_ptrace_ar break; case LINUX_PTRACE_SETOPTIONS: error = linux_ptrace_setoptions(td, pid, uap->data); + break; + case LINUX_PTRACE_GETSIGINFO: + error = linux_ptrace_getsiginfo(td, pid, uap->data); break; case LINUX_PTRACE_GETREGSET: error = linux_ptrace_getregset(td, pid, uap->addr, uap->data); From owner-svn-src-all@freebsd.org Thu Jul 4 19:46:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 303F315DCE5A; Thu, 4 Jul 2019 19:46:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4EF36FA6B; Thu, 4 Jul 2019 19:46:58 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DE282798C; Thu, 4 Jul 2019 19:46: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 x64Jkwxs034180; Thu, 4 Jul 2019 19:46:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64Jkw4m034179; Thu, 4 Jul 2019 19:46:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201907041946.x64Jkw4m034179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 4 Jul 2019 19:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349748 - head/sys/amd64/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/amd64/linux X-SVN-Commit-Revision: 349748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4EF36FA6B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 19:46:59 -0000 Author: trasz Date: Thu Jul 4 19:46:58 2019 New Revision: 349748 URL: https://svnweb.freebsd.org/changeset/base/349748 Log: Add support for PTRACE_O_TRACEEXIT to linuxulator ptrace(2). This fixes strace 4.25 from Ubuntu 19.04. Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20689 Modified: head/sys/amd64/linux/linux_ptrace.c Modified: head/sys/amd64/linux/linux_ptrace.c ============================================================================== --- head/sys/amd64/linux/linux_ptrace.c Thu Jul 4 19:44:13 2019 (r349747) +++ head/sys/amd64/linux/linux_ptrace.c Thu Jul 4 19:46:58 2019 (r349748) @@ -72,6 +72,8 @@ __FBSDID("$FreeBSD$"); #define LINUX_PTRACE_GETREGSET 0x4204 #define LINUX_PTRACE_SEIZE 0x4206 +#define LINUX_PTRACE_EVENT_EXIT 6 + #define LINUX_PTRACE_O_TRACESYSGOOD 1 #define LINUX_PTRACE_O_TRACEFORK 2 #define LINUX_PTRACE_O_TRACEVFORK 4 @@ -139,6 +141,9 @@ linux_ptrace_status(struct thread *td, pid_t pid, int if ((pem->ptrace_flags & LINUX_PTRACE_O_TRACESYSGOOD) && lwpinfo.pl_flags & PL_FLAG_SCX) status |= (LINUX_SIGTRAP | 0x80) << 8; + if ((pem->ptrace_flags & LINUX_PTRACE_O_TRACEEXIT) && + lwpinfo.pl_flags & PL_FLAG_EXITED) + status |= (LINUX_SIGTRAP | LINUX_PTRACE_EVENT_EXIT << 8) << 8; LINUX_PEM_SUNLOCK(pem); return (status); @@ -359,9 +364,9 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, mask |= PTRACE_VFORK; /* XXX: Close enough? */ if (data & LINUX_PTRACE_O_TRACEEXIT) { - linux_msg(td, "PTRACE_O_TRACEEXIT not implemented; " - "returning EINVAL"); - return (EINVAL); + pem->ptrace_flags |= LINUX_PTRACE_O_TRACEEXIT; + } else { + pem->ptrace_flags &= ~LINUX_PTRACE_O_TRACEEXIT; } return (kern_ptrace(td, PT_SET_EVENT_MASK, pid, &mask, sizeof(mask))); From owner-svn-src-all@freebsd.org Thu Jul 4 19:52:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B25B515DD063; Thu, 4 Jul 2019 19:52:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 538526FEB6; Thu, 4 Jul 2019 19:52:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43FAB27B43; Thu, 4 Jul 2019 19:52:51 +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 x64JqpFe039551; Thu, 4 Jul 2019 19:52:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64JqpmI039550; Thu, 4 Jul 2019 19:52:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201907041952.x64JqpmI039550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Jul 2019 19:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349749 - stable/12/share/man/man9 X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/share/man/man9 X-SVN-Commit-Revision: 349749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 538526FEB6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 19:52:51 -0000 Author: emaste Date: Thu Jul 4 19:52:50 2019 New Revision: 349749 URL: https://svnweb.freebsd.org/changeset/base/349749 Log: MFC r349239, r349241: update vm_map_protect.9 Clarify that vm_map_protect cannot upgrade max_protection It's implied by the man page's RETURN VALUES section, but be explicit in the description that vm_map_protect can not set new protection bits that are already in each entry's max_protection. Clarify vm_map_protect max_protection downgrade As reported in review D20709 by brooks calling vm_map_protect to set a new max_protection value downgrades existing mappings if necessary (as opposed to returning an error). Sponsored by: The FreeBSD Foundation Modified: stable/12/share/man/man9/vm_map_protect.9 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/vm_map_protect.9 ============================================================================== --- stable/12/share/man/man9/vm_map_protect.9 Thu Jul 4 19:46:58 2019 (r349748) +++ stable/12/share/man/man9/vm_map_protect.9 Thu Jul 4 19:52:50 2019 (r349749) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 19, 2003 +.Dd June 20, 2019 .Dt VM_MAP_PROTECT 9 .Os .Sh NAME @@ -51,6 +51,11 @@ within the map .Fa map to .Fa new_prot . +The value specified by +.Fa new_prot +may not include any protection bits that are not set in +.Va max_protection +on every entry within the range. .Pp If .Fa set_max @@ -59,7 +64,12 @@ is TRUE, is treated as the new .Va max_protection setting for each underlying entry. -Otherwise, only the +Protection bits not included +.Fa new_prot +will be cleared from existing entries. +If +.Fa set_max +is FALSE only the .Va protection field is affected. .Pp From owner-svn-src-all@freebsd.org Thu Jul 4 20:16:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F41E915DD48A; Thu, 4 Jul 2019 20:16:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 53D3A706E5; Thu, 4 Jul 2019 20:16:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AB1227EE1; Thu, 4 Jul 2019 20:16:05 +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 x64KG503049906; Thu, 4 Jul 2019 20:16:05 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64KG4jZ049904; Thu, 4 Jul 2019 20:16:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201907042016.x64KG4jZ049904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 4 Jul 2019 20:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349750 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 349750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 53D3A706E5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 20:16:06 -0000 Author: trasz Date: Thu Jul 4 20:16:04 2019 New Revision: 349750 URL: https://svnweb.freebsd.org/changeset/base/349750 Log: Return ENOTSUP for Linux FS_IOC_FIEMAP ioctl. Linux man(1) calls it for no good reason; this avoids the console spam (eg '(man): ioctl fd=4, cmd=0x660b ('f',11) is not implemented'). Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20690 Modified: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Thu Jul 4 19:52:50 2019 (r349749) +++ head/sys/compat/linux/linux_ioctl.c Thu Jul 4 20:16:04 2019 (r349750) @@ -3593,6 +3593,7 @@ linux_ioctl(struct thread *td, struct linux_ioctl_args switch (args->cmd & 0xffff) { case LINUX_BTRFS_IOC_CLONE: + case LINUX_FS_IOC_FIEMAP: return (ENOTSUP); default: Modified: head/sys/compat/linux/linux_ioctl.h ============================================================================== --- head/sys/compat/linux/linux_ioctl.h Thu Jul 4 19:52:50 2019 (r349749) +++ head/sys/compat/linux/linux_ioctl.h Thu Jul 4 20:16:04 2019 (r349750) @@ -749,6 +749,7 @@ * Linux btrfs clone operation */ #define LINUX_BTRFS_IOC_CLONE 0x9409 /* 0x40049409 */ +#define LINUX_FS_IOC_FIEMAP 0x660b /* * Linux evdev ioctl min and max From owner-svn-src-all@freebsd.org Thu Jul 4 20:42:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B91BC15DDD50; Thu, 4 Jul 2019 20:42:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 580B671477; Thu, 4 Jul 2019 20:42: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 440DA47C; Thu, 4 Jul 2019 20:42: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 x64Kg9Sv065087; Thu, 4 Jul 2019 20:42:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64Kg94r065086; Thu, 4 Jul 2019 20:42:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201907042042.x64Kg94r065086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Jul 2019 20:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349751 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 349751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 580B671477 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 20:42:09 -0000 Author: emaste Date: Thu Jul 4 20:42:08 2019 New Revision: 349751 URL: https://svnweb.freebsd.org/changeset/base/349751 Log: Update Linux compat version to 2.6.36 New system calls between 2.6.32 and 2.6.26 are already implemented. This should be mostly NFC as far as contemporary Linux applications are concerned though, as Linux kernel 3.2 is the oldest supported by a number of popular distros today; work is in progress by others to enable support for those applications. Discussed with: trasz MFC after: 1 month Modified: head/sys/compat/linux/linux_mib.h Modified: head/sys/compat/linux/linux_mib.h ============================================================================== --- head/sys/compat/linux/linux_mib.h Thu Jul 4 20:16:04 2019 (r349750) +++ head/sys/compat/linux/linux_mib.h Thu Jul 4 20:42:08 2019 (r349751) @@ -48,7 +48,7 @@ int linux_kernver(struct thread *td); #define LINUX_KVERSION 2 #define LINUX_KPATCHLEVEL 6 -#define LINUX_KSUBLEVEL 32 +#define LINUX_KSUBLEVEL 36 #define LINUX_KERNVER(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define LINUX_VERSION_CODE LINUX_KERNVER(LINUX_KVERSION, \ From owner-svn-src-all@freebsd.org Thu Jul 4 21:11:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FB2A15DE3F2; Thu, 4 Jul 2019 21:11:46 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15E92720BA; Thu, 4 Jul 2019 21:11:46 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2CD79A5; Thu, 4 Jul 2019 21:11:45 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64LBjun079204; Thu, 4 Jul 2019 21:11:45 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64LBjX8079203; Thu, 4 Jul 2019 21:11:45 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907042111.x64LBjX8079203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 4 Jul 2019 21:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349752 - head/sys/dev/netmap X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/dev/netmap X-SVN-Commit-Revision: 349752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 15E92720BA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 21:11:46 -0000 Author: vmaffione Date: Thu Jul 4 21:11:45 2019 New Revision: 349752 URL: https://svnweb.freebsd.org/changeset/base/349752 Log: netmap: fix kernel pointer printing in netmap_generic.c Print the adapter name rather than the address of the adapter to avoid kernel address leakage. PR: Bug 238642 Submitted by: Fuqian Huang Reviewed by: vmaffione MFC after: 1 week Modified: head/sys/dev/netmap/netmap_generic.c Modified: head/sys/dev/netmap/netmap_generic.c ============================================================================== --- head/sys/dev/netmap/netmap_generic.c Thu Jul 4 20:42:08 2019 (r349751) +++ head/sys/dev/netmap/netmap_generic.c Thu Jul 4 21:11:45 2019 (r349752) @@ -1024,7 +1024,7 @@ generic_netmap_dtor(struct netmap_adapter *na) */ netmap_adapter_put(prev_na); } - nm_prinf("Native netmap adapter %p restored", prev_na); + nm_prinf("Native netmap adapter for %s restored", prev_na->name); } NM_RESTORE_NA(ifp, prev_na); /* @@ -1126,7 +1126,7 @@ generic_netmap_attach(struct ifnet *ifp) nm_os_generic_set_features(gna); - nm_prinf("Emulated adapter for %s created (prev was %p)", na->name, gna->prev); + nm_prinf("Emulated adapter for %s created (prev was %s)", na->name, gna->prev->name); return retval; } From owner-svn-src-all@freebsd.org Thu Jul 4 21:31:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9193E15DE99C; Thu, 4 Jul 2019 21:31:50 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38F2672C67; Thu, 4 Jul 2019 21:31:50 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13419D34; Thu, 4 Jul 2019 21:31:50 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x64LVn0M091758; Thu, 4 Jul 2019 21:31:49 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64LVnwP091757; Thu, 4 Jul 2019 21:31:49 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907042131.x64LVnwP091757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 4 Jul 2019 21:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349753 - head/sys/dev/netmap X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/dev/netmap X-SVN-Commit-Revision: 349753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 38F2672C67 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 21:31:50 -0000 Author: vmaffione Date: Thu Jul 4 21:31:49 2019 New Revision: 349753 URL: https://svnweb.freebsd.org/changeset/base/349753 Log: netmap: Remove pointer leakage in netmap_mem2.c PR: 238641 Submitted by: Fuqian Huang Reviewed by: vmaffione MFC after: 1 week Modified: head/sys/dev/netmap/netmap_mem2.c Modified: head/sys/dev/netmap/netmap_mem2.c ============================================================================== --- head/sys/dev/netmap/netmap_mem2.c Thu Jul 4 21:11:45 2019 (r349752) +++ head/sys/dev/netmap/netmap_mem2.c Thu Jul 4 21:31:49 2019 (r349753) @@ -2446,8 +2446,8 @@ netmap_mem_pt_guest_ifp_del(struct netmap_mem_d *nmd, } else { ptnmd->pt_ifs = curr->next; } - nm_prinf("removed (ifp=%p,nifp_offset=%u)", - curr->ifp, curr->nifp_offset); + nm_prinf("removed (ifp=%s,nifp_offset=%u)", + curr->ifp->if_xname, curr->nifp_offset); nm_os_free(curr); ret = 0; break; From owner-svn-src-all@freebsd.org Thu Jul 4 23:58:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6B5815E0A35; Thu, 4 Jul 2019 23:58:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18B037612E; Thu, 4 Jul 2019 23:58:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8C5F247F; Thu, 4 Jul 2019 23:58:12 +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 x64NwCw0064276; Thu, 4 Jul 2019 23:58:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x64NwCP9064273; Thu, 4 Jul 2019 23:58:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201907042358.x64NwCP9064273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Jul 2019 23:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r349754 - in releng/11.3: . lib/csu/common sys/conf X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in releng/11.3: . lib/csu/common sys/conf X-SVN-Commit-Revision: 349754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 18B037612E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 23:58:14 -0000 Author: gjb Date: Thu Jul 4 23:58:11 2019 New Revision: 349754 URL: https://svnweb.freebsd.org/changeset/base/349754 Log: - Switch releng/11.3 to -RELEASE. - Add the anticipated 11.3-RELEASE date to UPDATING. - Set a static __FreeBSD_version. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (Netgate) Modified: releng/11.3/UPDATING releng/11.3/lib/csu/common/crtbrand.c releng/11.3/sys/conf/newvers.sh Modified: releng/11.3/UPDATING ============================================================================== --- releng/11.3/UPDATING Thu Jul 4 21:31:49 2019 (r349753) +++ releng/11.3/UPDATING Thu Jul 4 23:58:11 2019 (r349754) @@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20190709: + 11.3-RELEASE. + 20190702 p1 FreeBSD-EN-19:12.tzdata FreeBSD-SA-19:09.iconv FreeBSD-SA-19:11.cd_ioctl Modified: releng/11.3/lib/csu/common/crtbrand.c ============================================================================== --- releng/11.3/lib/csu/common/crtbrand.c Thu Jul 4 21:31:49 2019 (r349753) +++ releng/11.3/lib/csu/common/crtbrand.c Thu Jul 4 23:58:11 2019 (r349754) @@ -63,5 +63,5 @@ static const struct { .descsz = sizeof(int32_t), .type = NT_FREEBSD_ABI_TAG, .name = NOTE_FREEBSD_VENDOR, - .desc = __FreeBSD_version + .desc = 1103000 }; Modified: releng/11.3/sys/conf/newvers.sh ============================================================================== --- releng/11.3/sys/conf/newvers.sh Thu Jul 4 21:31:49 2019 (r349753) +++ releng/11.3/sys/conf/newvers.sh Thu Jul 4 23:58:11 2019 (r349754) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="RC3-p1" +BRANCH="RELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Jul 5 00:55:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A90015E1B02; Fri, 5 Jul 2019 00:55:47 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B21277C79; Fri, 5 Jul 2019 00:55:47 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCC7E2E72; Fri, 5 Jul 2019 00:55:46 +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 x650tkt3096245; Fri, 5 Jul 2019 00:55:46 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x650tk2J096244; Fri, 5 Jul 2019 00:55:46 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201907050055.x650tk2J096244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 5 Jul 2019 00:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349755 - stable/12/usr.sbin/mountd X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/usr.sbin/mountd X-SVN-Commit-Revision: 349755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1B21277C79 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.935,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 00:55:47 -0000 Author: rmacklem Date: Fri Jul 5 00:55:46 2019 New Revision: 349755 URL: https://svnweb.freebsd.org/changeset/base/349755 Log: MFC: r348452 Replace a single linked list with a hash table of lists. mountd.c uses a single linked list of "struct exportlist" structures, where there is one of these for each exported file system on the NFS server. This list gets long if there are a large number of file systems exported and the list must be searched for each line in the exports file(s) when SIGHUP causes the exports file(s) to be reloaded. A simple benchmark that traverses SLIST() elements and compares two 32bit fields in the structure for equal (which is what the search is) appears to take a couple of nsec. So, for a server with 72000 exported file systems, this can take about 5sec during reload of the exports file(s). By replacing the single linked list with a hash table with a target of 10 elements per list, the time should be reduced to less than 1msec. Peter Errikson (who has a server with 72000+ exported file systems) ran a test program using 5 hashes to see how they worked. fnv_32_buf(fsid,..., 0) fnv_32_buf(fsid,..., FNV1_32_INIT) hash32_buf(fsid,..., 0) hash32_buf(fsid,..., HASHINIT) - plus simply using the low order bits of fsid.val[0]. The first three behaved about equally well, with the first one being slightly better than the others. It has an average variation of about 4.5% about the target list length and that is what this patch uses. Peter Errikson also tested this hash table version and found that the performance wasn't measurably improved by a larger hash table, so a load factor of 10 appears adequate. PR: 237860 Modified: stable/12/usr.sbin/mountd/mountd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/mountd/mountd.c ============================================================================== --- stable/12/usr.sbin/mountd/mountd.c Thu Jul 4 23:58:11 2019 (r349754) +++ stable/12/usr.sbin/mountd/mountd.c Fri Jul 5 00:55:46 2019 (r349755) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -234,7 +235,9 @@ static int xdr_fhs(XDR *, caddr_t); static int xdr_mlist(XDR *, caddr_t); static void terminate(int); -static struct exportlisthead exphead = SLIST_HEAD_INITIALIZER(&exphead); +#define EXPHASH(f) (fnv_32_buf((f), sizeof(fsid_t), 0) % exphashsize) +static struct exportlisthead *exphead = NULL; +static int exphashsize = 0; static SLIST_HEAD(, mountlist) mlhead = SLIST_HEAD_INITIALIZER(&mlhead); static char *exnames_default[2] = { _PATH_EXPORTS, NULL }; static char **exnames; @@ -1092,7 +1095,7 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *transp) if (bad) ep = NULL; else - ep = ex_search(&fsb.f_fsid, &exphead); + ep = ex_search(&fsb.f_fsid, exphead); hostset = defset = 0; if (ep && (chk_host(ep->ex_defdir, saddr, &defset, &hostset, &numsecflavors, &secflavorsp) || @@ -1307,21 +1310,23 @@ xdr_explist_common(XDR *xdrsp, caddr_t cp __unused, in int false = 0; int putdef; sigset_t sighup_mask; + int i; sigemptyset(&sighup_mask); sigaddset(&sighup_mask, SIGHUP); sigprocmask(SIG_BLOCK, &sighup_mask, NULL); - SLIST_FOREACH(ep, &exphead, entries) { - putdef = 0; - if (put_exlist(ep->ex_dirl, xdrsp, ep->ex_defdir, - &putdef, brief)) - goto errout; - if (ep->ex_defdir && putdef == 0 && - put_exlist(ep->ex_defdir, xdrsp, (struct dirlist *)NULL, - &putdef, brief)) - goto errout; - } + for (i = 0; i < exphashsize; i++) + SLIST_FOREACH(ep, &exphead[i], entries) { + putdef = 0; + if (put_exlist(ep->ex_dirl, xdrsp, ep->ex_defdir, + &putdef, brief)) + goto errout; + if (ep->ex_defdir && putdef == 0 && + put_exlist(ep->ex_defdir, xdrsp, NULL, + &putdef, brief)) + goto errout; + } sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); if (!xdr_bool(xdrsp, &false)) return (0); @@ -1545,7 +1550,7 @@ get_exportlist_one(void) * See if this directory is already * in the list. */ - ep = ex_search(&fsb.f_fsid, &exphead); + ep = ex_search(&fsb.f_fsid, exphead); if (ep == (struct exportlist *)NULL) { ep = get_exp(); ep->ex_fs = fsb.f_fsid; @@ -1700,7 +1705,7 @@ get_exportlist_one(void) } dirhead = (struct dirlist *)NULL; if ((ep->ex_flag & EX_LINKED) == 0) { - insert_exports(ep, &exphead); + insert_exports(ep, exphead); ep->ex_flag |= EX_LINKED; } @@ -1739,7 +1744,8 @@ get_exportlist(void) /* * First, get rid of the old list */ - free_exports(&exphead); + if (exphead != NULL) + free_exports(exphead); /* * and the old V4 root dir. @@ -1762,6 +1768,21 @@ get_exportlist(void) */ num = getmntinfo(&mntbufp, MNT_NOWAIT); + /* Allocate hash tables, for first call. */ + if (exphead == NULL) { + /* Target an average linked list length of 10. */ + exphashsize = num / 10; + if (exphashsize < 1) + exphashsize = 1; + else if (exphashsize > 100000) + exphashsize = 100000; + exphead = malloc(exphashsize * sizeof(*exphead)); + if (exphead == NULL) + errx(1, "Can't malloc hash table"); + + for (i = 0; i < exphashsize; i++) + SLIST_INIT(&exphead[i]); + } if (num > 0) { build_iovec(&iov, &iovlen, "fstype", NULL, 0); build_iovec(&iov, &iovlen, "fspath", NULL, 0); @@ -1806,8 +1827,10 @@ get_exportlist(void) static void insert_exports(struct exportlist *ep, struct exportlisthead *exhp) { + uint32_t i; - SLIST_INSERT_HEAD(exhp, ep, entries); + i = EXPHASH(&ep->ex_fs); + SLIST_INSERT_HEAD(&exhp[i], ep, entries); } /* @@ -1817,12 +1840,15 @@ static void free_exports(struct exportlisthead *exhp) { struct exportlist *ep, *ep2; + int i; - SLIST_FOREACH_SAFE(ep, exhp, entries, ep2) { - SLIST_REMOVE(exhp, ep, exportlist, entries); - free_exp(ep); + for (i = 0; i < exphashsize; i++) { + SLIST_FOREACH_SAFE(ep, &exhp[i], entries, ep2) { + SLIST_REMOVE(&exhp[i], ep, exportlist, entries); + free_exp(ep); + } + SLIST_INIT(&exhp[i]); } - SLIST_INIT(exhp); } /* @@ -1962,8 +1988,10 @@ static struct exportlist * ex_search(fsid_t *fsid, struct exportlisthead *exhp) { struct exportlist *ep; + uint32_t i; - SLIST_FOREACH(ep, exhp, entries) { + i = EXPHASH(fsid); + SLIST_FOREACH(ep, &exhp[i], entries) { if (ep->ex_fs.val[0] == fsid->val[0] && ep->ex_fs.val[1] == fsid->val[1]) return (ep); From owner-svn-src-all@freebsd.org Fri Jul 5 01:05:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 293F615E1D1C; Fri, 5 Jul 2019 01:05:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 834F780070; Fri, 5 Jul 2019 01:04:59 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5089C3013; Fri, 5 Jul 2019 01:04:59 +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 x6514xtb001325; Fri, 5 Jul 2019 01:04:59 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6514xhr001324; Fri, 5 Jul 2019 01:04:59 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201907050104.x6514xhr001324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 5 Jul 2019 01:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349756 - stable/11/usr.sbin/mountd X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/usr.sbin/mountd X-SVN-Commit-Revision: 349756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 834F780070 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.93)[-0.935,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 01:05:00 -0000 Author: rmacklem Date: Fri Jul 5 01:04:58 2019 New Revision: 349756 URL: https://svnweb.freebsd.org/changeset/base/349756 Log: MFC: r348452 Replace a single linked list with a hash table of lists. mountd.c uses a single linked list of "struct exportlist" structures, where there is one of these for each exported file system on the NFS server. This list gets long if there are a large number of file systems exported and the list must be searched for each line in the exports file(s) when SIGHUP causes the exports file(s) to be reloaded. A simple benchmark that traverses SLIST() elements and compares two 32bit fields in the structure for equal (which is what the search is) appears to take a couple of nsec. So, for a server with 72000 exported file systems, this can take about 5sec during reload of the exports file(s). By replacing the single linked list with a hash table with a target of 10 elements per list, the time should be reduced to less than 1msec. Peter Errikson (who has a server with 72000+ exported file systems) ran a test program using 5 hashes to see how they worked. fnv_32_buf(fsid,..., 0) fnv_32_buf(fsid,..., FNV1_32_INIT) hash32_buf(fsid,..., 0) hash32_buf(fsid,..., HASHINIT) - plus simply using the low order bits of fsid.val[0]. The first three behaved about equally well, with the first one being slightly better than the others. It has an average variation of about 4.5% about the target list length and that is what this patch uses. Peter Errikson also tested this hash table version and found that the performance wasn't measurably improved by a larger hash table, so a load factor of 10 appears adequate. PR: 237860 Modified: stable/11/usr.sbin/mountd/mountd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/mountd/mountd.c ============================================================================== --- stable/11/usr.sbin/mountd/mountd.c Fri Jul 5 00:55:46 2019 (r349755) +++ stable/11/usr.sbin/mountd/mountd.c Fri Jul 5 01:04:58 2019 (r349756) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -232,7 +233,9 @@ static int xdr_fhs(XDR *, caddr_t); static int xdr_mlist(XDR *, caddr_t); static void terminate(int); -static struct exportlisthead exphead = SLIST_HEAD_INITIALIZER(&exphead); +#define EXPHASH(f) (fnv_32_buf((f), sizeof(fsid_t), 0) % exphashsize) +static struct exportlisthead *exphead = NULL; +static int exphashsize = 0; static SLIST_HEAD(, mountlist) mlhead = SLIST_HEAD_INITIALIZER(&mlhead); static char *exnames_default[2] = { _PATH_EXPORTS, NULL }; static char **exnames; @@ -1090,7 +1093,7 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *transp) if (bad) ep = NULL; else - ep = ex_search(&fsb.f_fsid, &exphead); + ep = ex_search(&fsb.f_fsid, exphead); hostset = defset = 0; if (ep && (chk_host(ep->ex_defdir, saddr, &defset, &hostset, &numsecflavors, &secflavorsp) || @@ -1305,21 +1308,23 @@ xdr_explist_common(XDR *xdrsp, caddr_t cp __unused, in int false = 0; int putdef; sigset_t sighup_mask; + int i; sigemptyset(&sighup_mask); sigaddset(&sighup_mask, SIGHUP); sigprocmask(SIG_BLOCK, &sighup_mask, NULL); - SLIST_FOREACH(ep, &exphead, entries) { - putdef = 0; - if (put_exlist(ep->ex_dirl, xdrsp, ep->ex_defdir, - &putdef, brief)) - goto errout; - if (ep->ex_defdir && putdef == 0 && - put_exlist(ep->ex_defdir, xdrsp, (struct dirlist *)NULL, - &putdef, brief)) - goto errout; - } + for (i = 0; i < exphashsize; i++) + SLIST_FOREACH(ep, &exphead[i], entries) { + putdef = 0; + if (put_exlist(ep->ex_dirl, xdrsp, ep->ex_defdir, + &putdef, brief)) + goto errout; + if (ep->ex_defdir && putdef == 0 && + put_exlist(ep->ex_defdir, xdrsp, NULL, + &putdef, brief)) + goto errout; + } sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); if (!xdr_bool(xdrsp, &false)) return (0); @@ -1543,7 +1548,7 @@ get_exportlist_one(void) * See if this directory is already * in the list. */ - ep = ex_search(&fsb.f_fsid, &exphead); + ep = ex_search(&fsb.f_fsid, exphead); if (ep == (struct exportlist *)NULL) { ep = get_exp(); ep->ex_fs = fsb.f_fsid; @@ -1698,7 +1703,7 @@ get_exportlist_one(void) } dirhead = (struct dirlist *)NULL; if ((ep->ex_flag & EX_LINKED) == 0) { - insert_exports(ep, &exphead); + insert_exports(ep, exphead); ep->ex_flag |= EX_LINKED; } @@ -1737,7 +1742,8 @@ get_exportlist(void) /* * First, get rid of the old list */ - free_exports(&exphead); + if (exphead != NULL) + free_exports(exphead); /* * and the old V4 root dir. @@ -1760,6 +1766,21 @@ get_exportlist(void) */ num = getmntinfo(&mntbufp, MNT_NOWAIT); + /* Allocate hash tables, for first call. */ + if (exphead == NULL) { + /* Target an average linked list length of 10. */ + exphashsize = num / 10; + if (exphashsize < 1) + exphashsize = 1; + else if (exphashsize > 100000) + exphashsize = 100000; + exphead = malloc(exphashsize * sizeof(*exphead)); + if (exphead == NULL) + errx(1, "Can't malloc hash table"); + + for (i = 0; i < exphashsize; i++) + SLIST_INIT(&exphead[i]); + } if (num > 0) { build_iovec(&iov, &iovlen, "fstype", NULL, 0); build_iovec(&iov, &iovlen, "fspath", NULL, 0); @@ -1804,8 +1825,10 @@ get_exportlist(void) static void insert_exports(struct exportlist *ep, struct exportlisthead *exhp) { + uint32_t i; - SLIST_INSERT_HEAD(exhp, ep, entries); + i = EXPHASH(&ep->ex_fs); + SLIST_INSERT_HEAD(&exhp[i], ep, entries); } /* @@ -1815,12 +1838,15 @@ static void free_exports(struct exportlisthead *exhp) { struct exportlist *ep, *ep2; + int i; - SLIST_FOREACH_SAFE(ep, exhp, entries, ep2) { - SLIST_REMOVE(exhp, ep, exportlist, entries); - free_exp(ep); + for (i = 0; i < exphashsize; i++) { + SLIST_FOREACH_SAFE(ep, &exhp[i], entries, ep2) { + SLIST_REMOVE(&exhp[i], ep, exportlist, entries); + free_exp(ep); + } + SLIST_INIT(&exhp[i]); } - SLIST_INIT(exhp); } /* @@ -1960,8 +1986,10 @@ static struct exportlist * ex_search(fsid_t *fsid, struct exportlisthead *exhp) { struct exportlist *ep; + uint32_t i; - SLIST_FOREACH(ep, exhp, entries) { + i = EXPHASH(fsid); + SLIST_FOREACH(ep, &exhp[i], entries) { if (ep->ex_fs.val[0] == fsid->val[0] && ep->ex_fs.val[1] == fsid->val[1]) return (ep); From owner-svn-src-all@freebsd.org Fri Jul 5 01:19:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C1C815E2092; Fri, 5 Jul 2019 01:19:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3B0280521; Fri, 5 Jul 2019 01:19:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE9C631B2; Fri, 5 Jul 2019 01:19:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x651JSis006826; Fri, 5 Jul 2019 01:19:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x651JSJX006825; Fri, 5 Jul 2019 01:19:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907050119.x651JSJX006825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Jul 2019 01:19:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349757 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 349757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F3B0280521 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 01:19:29 -0000 Author: kib Date: Fri Jul 5 01:19:28 2019 New Revision: 349757 URL: https://svnweb.freebsd.org/changeset/base/349757 Log: MFC r349611, r349614: Style. Modified: stable/12/sys/kern/kern_umtx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_umtx.c ============================================================================== --- stable/12/sys/kern/kern_umtx.c Fri Jul 5 01:04:58 2019 (r349756) +++ stable/12/sys/kern/kern_umtx.c Fri Jul 5 01:19:28 2019 (r349757) @@ -1059,7 +1059,6 @@ do_lock_normal(struct thread *td, struct umutex *m, ui if (owner == UMUTEX_RB_NOTRECOV) return (ENOTRECOVERABLE); - /* * Try the uncontested case. This should be * done in userland. @@ -2658,7 +2657,8 @@ do_rw_rdlock(struct thread *td, struct urwlock *rwlock /* try to lock it */ while (!(state & wrflags)) { - if (__predict_false(URWLOCK_READER_COUNT(state) == URWLOCK_MAX_READERS)) { + if (__predict_false(URWLOCK_READER_COUNT(state) == + URWLOCK_MAX_READERS)) { umtx_key_release(&uq->uq_key); return (EAGAIN); } @@ -2725,7 +2725,10 @@ do_rw_rdlock(struct thread *td, struct urwlock *rwlock } sleep: - /* contention bit is set, before sleeping, increase read waiter count */ + /* + * Contention bit is set, before sleeping, increase + * read waiter count. + */ rv = fueword32(&rwlock->rw_blocked_readers, &blocked_readers); if (rv == -1) { @@ -2829,7 +2832,8 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock umtx_key_release(&uq->uq_key); return (EFAULT); } - while (!(state & URWLOCK_WRITE_OWNER) && URWLOCK_READER_COUNT(state) == 0) { + while ((state & URWLOCK_WRITE_OWNER) == 0 && + URWLOCK_READER_COUNT(state) == 0) { rv = casueword32(&rwlock->rw_state, state, &oldstate, state | URWLOCK_WRITE_OWNER); if (rv == -1) { @@ -2865,8 +2869,8 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock umtxq_unlock(&uq->uq_key); /* - * re-read the state, in case it changed between the try-lock above - * and the check below + * Re-read the state, in case it changed between the + * try-lock above and the check below. */ rv = fueword32(&rwlock->rw_state, &state); if (rv == -1) @@ -2893,7 +2897,8 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock break; } - if (!(state & URWLOCK_WRITE_OWNER) && URWLOCK_READER_COUNT(state) == 0) { + if ((state & URWLOCK_WRITE_OWNER) == 0 && + URWLOCK_READER_COUNT(state) == 0) { umtxq_unbusy_unlocked(&uq->uq_key); error = umtxq_check_susp(td); if (error != 0) @@ -2908,9 +2913,10 @@ sleep: error = EFAULT; break; } - suword32(&rwlock->rw_blocked_writers, blocked_writers+1); + suword32(&rwlock->rw_blocked_writers, blocked_writers + 1); - while ((state & URWLOCK_WRITE_OWNER) || URWLOCK_READER_COUNT(state) != 0) { + while ((state & URWLOCK_WRITE_OWNER) || + URWLOCK_READER_COUNT(state) != 0) { umtxq_lock(&uq->uq_key); umtxq_insert_queue(uq, UMTX_EXCLUSIVE_QUEUE); umtxq_unbusy(&uq->uq_key); From owner-svn-src-all@freebsd.org Fri Jul 5 01:22:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A60D15E2277; Fri, 5 Jul 2019 01:22:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E4AC808B8; Fri, 5 Jul 2019 01:22:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD7B83353; Fri, 5 Jul 2019 01:22:16 +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 x651MG73010966; Fri, 5 Jul 2019 01:22:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x651MGMP010965; Fri, 5 Jul 2019 01:22:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907050122.x651MGMP010965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Jul 2019 01:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349758 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 349758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E4AC808B8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 01:22:17 -0000 Author: kib Date: Fri Jul 5 01:22:16 2019 New Revision: 349758 URL: https://svnweb.freebsd.org/changeset/base/349758 Log: MFC r349611, r349614: Style. Modified: stable/11/sys/kern/kern_umtx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_umtx.c ============================================================================== --- stable/11/sys/kern/kern_umtx.c Fri Jul 5 01:19:28 2019 (r349757) +++ stable/11/sys/kern/kern_umtx.c Fri Jul 5 01:22:16 2019 (r349758) @@ -1066,7 +1066,6 @@ do_lock_normal(struct thread *td, struct umutex *m, ui if (owner == UMUTEX_RB_NOTRECOV) return (ENOTRECOVERABLE); - /* * Try the uncontested case. This should be * done in userland. @@ -2665,7 +2664,8 @@ do_rw_rdlock(struct thread *td, struct urwlock *rwlock /* try to lock it */ while (!(state & wrflags)) { - if (__predict_false(URWLOCK_READER_COUNT(state) == URWLOCK_MAX_READERS)) { + if (__predict_false(URWLOCK_READER_COUNT(state) == + URWLOCK_MAX_READERS)) { umtx_key_release(&uq->uq_key); return (EAGAIN); } @@ -2732,7 +2732,10 @@ do_rw_rdlock(struct thread *td, struct urwlock *rwlock } sleep: - /* contention bit is set, before sleeping, increase read waiter count */ + /* + * Contention bit is set, before sleeping, increase + * read waiter count. + */ rv = fueword32(&rwlock->rw_blocked_readers, &blocked_readers); if (rv == -1) { @@ -2836,7 +2839,8 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock umtx_key_release(&uq->uq_key); return (EFAULT); } - while (!(state & URWLOCK_WRITE_OWNER) && URWLOCK_READER_COUNT(state) == 0) { + while ((state & URWLOCK_WRITE_OWNER) == 0 && + URWLOCK_READER_COUNT(state) == 0) { rv = casueword32(&rwlock->rw_state, state, &oldstate, state | URWLOCK_WRITE_OWNER); if (rv == -1) { @@ -2872,8 +2876,8 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock umtxq_unlock(&uq->uq_key); /* - * re-read the state, in case it changed between the try-lock above - * and the check below + * Re-read the state, in case it changed between the + * try-lock above and the check below. */ rv = fueword32(&rwlock->rw_state, &state); if (rv == -1) @@ -2900,7 +2904,8 @@ do_rw_wrlock(struct thread *td, struct urwlock *rwlock break; } - if (!(state & URWLOCK_WRITE_OWNER) && URWLOCK_READER_COUNT(state) == 0) { + if ((state & URWLOCK_WRITE_OWNER) == 0 && + URWLOCK_READER_COUNT(state) == 0) { umtxq_unbusy_unlocked(&uq->uq_key); error = umtxq_check_susp(td); if (error != 0) @@ -2915,9 +2920,10 @@ sleep: error = EFAULT; break; } - suword32(&rwlock->rw_blocked_writers, blocked_writers+1); + suword32(&rwlock->rw_blocked_writers, blocked_writers + 1); - while ((state & URWLOCK_WRITE_OWNER) || URWLOCK_READER_COUNT(state) != 0) { + while ((state & URWLOCK_WRITE_OWNER) || + URWLOCK_READER_COUNT(state) != 0) { umtxq_lock(&uq->uq_key); umtxq_insert_queue(uq, UMTX_EXCLUSIVE_QUEUE); umtxq_unbusy(&uq->uq_key); From owner-svn-src-all@freebsd.org Fri Jul 5 04:24:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04F5615E4707; Fri, 5 Jul 2019 04:24:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94335849D6; Fri, 5 Jul 2019 04:24:10 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 668D2548F; Fri, 5 Jul 2019 04:24:10 +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 x654OAeQ005919; Fri, 5 Jul 2019 04:24:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x654OAFR005918; Fri, 5 Jul 2019 04:24:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907050424.x654OAFR005918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 5 Jul 2019 04:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349759 - in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Commit-Revision: 349759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 94335849D6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 04:24:11 -0000 Author: cy Date: Fri Jul 5 04:24:09 2019 New Revision: 349759 URL: https://svnweb.freebsd.org/changeset/base/349759 Log: MFC r349503-349504: Document the -B, binary logfile, and the -C config file options. Reference the ipmon.5 man page and ipmon.conf. PR: 238816 Modified: stable/11/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/man/ipmon.8 stable/12/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/contrib/ipfilter/man/ipmon.8 ============================================================================== --- stable/11/contrib/ipfilter/man/ipmon.8 Fri Jul 5 01:22:16 2019 (r349758) +++ stable/11/contrib/ipfilter/man/ipmon.8 Fri Jul 5 04:24:09 2019 (r349759) @@ -7,6 +7,10 @@ ipmon \- monitors /dev/ipl for logged packets [ .B \-abBDFhnpstvxX ] [ +.B "\-B " +] [ +.B "\-C " +] [ .B "\-N " ] [ .B "\-L " @@ -92,6 +96,10 @@ Enable logging of the raw, unformatted binary data to \fI\fP file. This can be read, later, using \fBipmon\fP with the \fB-f\fP option. .TP +.B \-C +This option specifies a file to be used to specify optional extra actions +when it sees specific log entries from the kernel. +.TP .B \-D Cause ipmon to turn itself into a daemon. Using subshells or backgrounding of ipmon is not required to turn it into an orphan so it can run indefinitely. @@ -178,9 +186,11 @@ recorded data. .br /dev/ipstate .br +/etc/ipmon.conf +.br /etc/services .SH SEE ALSO -ipl(4), ipf(8), ipfstat(8), ipnat(8) +ipl(4), ipmon(5), ipf(8), ipfstat(8), ipnat(8) .SH BUGS .PP If you find any, please send email to me at darrenr@pobox.com From owner-svn-src-all@freebsd.org Fri Jul 5 04:24:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 476DB15E470A; Fri, 5 Jul 2019 04:24:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DEBF6849D7; Fri, 5 Jul 2019 04:24:10 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5AE35490; Fri, 5 Jul 2019 04:24:10 +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 x654OAbk005925; Fri, 5 Jul 2019 04:24:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x654OAku005924; Fri, 5 Jul 2019 04:24:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907050424.x654OAku005924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 5 Jul 2019 04:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349759 - in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Commit-Revision: 349759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DEBF6849D7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 04:24:11 -0000 Author: cy Date: Fri Jul 5 04:24:09 2019 New Revision: 349759 URL: https://svnweb.freebsd.org/changeset/base/349759 Log: MFC r349503-349504: Document the -B, binary logfile, and the -C config file options. Reference the ipmon.5 man page and ipmon.conf. PR: 238816 Modified: stable/12/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/man/ipmon.8 stable/11/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/contrib/ipfilter/man/ipmon.8 ============================================================================== --- stable/12/contrib/ipfilter/man/ipmon.8 Fri Jul 5 01:22:16 2019 (r349758) +++ stable/12/contrib/ipfilter/man/ipmon.8 Fri Jul 5 04:24:09 2019 (r349759) @@ -7,6 +7,10 @@ ipmon \- monitors /dev/ipl for logged packets [ .B \-abBDFhnpstvxX ] [ +.B "\-B " +] [ +.B "\-C " +] [ .B "\-N " ] [ .B "\-L " @@ -92,6 +96,10 @@ Enable logging of the raw, unformatted binary data to \fI\fP file. This can be read, later, using \fBipmon\fP with the \fB-f\fP option. .TP +.B \-C +This option specifies a file to be used to specify optional extra actions +when it sees specific log entries from the kernel. +.TP .B \-D Cause ipmon to turn itself into a daemon. Using subshells or backgrounding of ipmon is not required to turn it into an orphan so it can run indefinitely. @@ -178,9 +186,11 @@ recorded data. .br /dev/ipstate .br +/etc/ipmon.conf +.br /etc/services .SH SEE ALSO -ipl(4), ipf(8), ipfstat(8), ipnat(8) +ipl(4), ipmon(5), ipf(8), ipfstat(8), ipnat(8) .SH BUGS .PP If you find any, please send email to me at darrenr@pobox.com From owner-svn-src-all@freebsd.org Fri Jul 5 04:24:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 945E315E4710; Fri, 5 Jul 2019 04:24:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34FF2849D8; Fri, 5 Jul 2019 04:24:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0EAA45491; Fri, 5 Jul 2019 04:24:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x654OAgD005931; Fri, 5 Jul 2019 04:24:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x654OAtp005930; Fri, 5 Jul 2019 04:24:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907050424.x654OAtp005930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 5 Jul 2019 04:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r349759 - in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/ipfilter/man 11/contrib/ipfilter/man 12/contrib/ipfilter/man X-SVN-Commit-Revision: 349759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 34FF2849D8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 04:24:11 -0000 Author: cy Date: Fri Jul 5 04:24:09 2019 New Revision: 349759 URL: https://svnweb.freebsd.org/changeset/base/349759 Log: MFC r349503-349504: Document the -B, binary logfile, and the -C config file options. Reference the ipmon.5 man page and ipmon.conf. PR: 238816 Modified: stable/10/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/man/ipmon.8 stable/12/contrib/ipfilter/man/ipmon.8 Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/contrib/ipfilter/man/ipmon.8 ============================================================================== --- stable/10/contrib/ipfilter/man/ipmon.8 Fri Jul 5 01:22:16 2019 (r349758) +++ stable/10/contrib/ipfilter/man/ipmon.8 Fri Jul 5 04:24:09 2019 (r349759) @@ -7,6 +7,10 @@ ipmon \- monitors /dev/ipl for logged packets [ .B \-abBDFhnpstvxX ] [ +.B "\-B " +] [ +.B "\-C " +] [ .B "\-N " ] [ .B "\-L " @@ -92,6 +96,10 @@ Enable logging of the raw, unformatted binary data to \fI\fP file. This can be read, later, using \fBipmon\fP with the \fB-f\fP option. .TP +.B \-C +This option specifies a file to be used to specify optional extra actions +when it sees specific log entries from the kernel. +.TP .B \-D Cause ipmon to turn itself into a daemon. Using subshells or backgrounding of ipmon is not required to turn it into an orphan so it can run indefinitely. @@ -178,9 +186,11 @@ recorded data. .br /dev/ipstate .br +/etc/ipmon.conf +.br /etc/services .SH SEE ALSO -ipl(4), ipf(8), ipfstat(8), ipnat(8) +ipl(4), ipmon(5), ipf(8), ipfstat(8), ipnat(8) .SH BUGS .PP If you find any, please send email to me at darrenr@pobox.com From owner-svn-src-all@freebsd.org Fri Jul 5 05:23:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B04215E5501; Fri, 5 Jul 2019 05:23:24 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0BB08624D; Fri, 5 Jul 2019 05:23:23 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74A905E8A; Fri, 5 Jul 2019 05:23:23 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x655NNDh037292; Fri, 5 Jul 2019 05:23:23 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x655NNKn037291; Fri, 5 Jul 2019 05:23:23 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201907050523.x655NNKn037291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 5 Jul 2019 05:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349760 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 349760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A0BB08624D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 05:23:24 -0000 Author: alc Date: Fri Jul 5 05:23:23 2019 New Revision: 349760 URL: https://svnweb.freebsd.org/changeset/base/349760 Log: Merge r349526 from amd64. When we protect an L3 entry, we only call vm_page_dirty() when, in fact, we are write protecting the page and the L3 entry has PTE_D set. However, pmap_protect() was always calling vm_page_dirty() when an L2 entry has PTE_D set. Handle L2 entries the same as L3 entries so that we won't perform unnecessary calls to vm_page_dirty(). Simplify the loop calling vm_page_dirty() on L2 entries. Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Fri Jul 5 04:24:09 2019 (r349759) +++ head/sys/riscv/riscv/pmap.c Fri Jul 5 05:23:23 2019 (r349760) @@ -2298,9 +2298,9 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t { pd_entry_t *l1, *l2, l2e; pt_entry_t *l3, l3e, mask; - vm_page_t m; + vm_page_t m, mt; vm_paddr_t pa; - vm_offset_t va, va_next; + vm_offset_t va_next; bool anychanged, pv_lists_locked; if ((prot & VM_PROT_READ) == VM_PROT_NONE) { @@ -2340,12 +2340,13 @@ resume: if ((l2e & PTE_RWX) != 0) { if (sva + L2_SIZE == va_next && eva >= va_next) { retryl2: - if ((l2e & (PTE_SW_MANAGED | PTE_D)) == + if ((prot & VM_PROT_WRITE) == 0 && + (l2e & (PTE_SW_MANAGED | PTE_D)) == (PTE_SW_MANAGED | PTE_D)) { pa = PTE_TO_PHYS(l2e); - for (va = sva, m = PHYS_TO_VM_PAGE(pa); - va < va_next; m++, va += PAGE_SIZE) - vm_page_dirty(m); + m = PHYS_TO_VM_PAGE(pa); + for (mt = m; mt < &m[Ln_ENTRIES]; mt++) + vm_page_dirty(mt); } if (!atomic_fcmpset_long(l2, &l2e, l2e & ~mask)) goto retryl2; From owner-svn-src-all@freebsd.org Fri Jul 5 10:31:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7A7C15EA1F5; Fri, 5 Jul 2019 10:31:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64CCC8FF0D; Fri, 5 Jul 2019 10:31:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 168FE9181; Fri, 5 Jul 2019 10:31:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x65AVdfp097274; Fri, 5 Jul 2019 10:31:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65AVc0V097267; Fri, 5 Jul 2019 10:31:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907051031.x65AVc0V097267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 5 Jul 2019 10:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349762 - in stable/12/sys: net netinet netinet6 netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys: net netinet netinet6 netpfil/pf X-SVN-Commit-Revision: 349762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 64CCC8FF0D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 10:31:40 -0000 Author: hselasky Date: Fri Jul 5 10:31:37 2019 New Revision: 349762 URL: https://svnweb.freebsd.org/changeset/base/349762 Log: MFC r349369: Convert all IPv4 and IPv6 multicast memberships into using a STAILQ instead of a linear array. The multicast memberships for the inpcb structure are protected by a non-sleepable lock, INP_WLOCK(), which needs to be dropped when calling the underlying possibly sleeping if_ioctl() method. When using a linear array to keep track of multicast memberships, the computed memory location of the multicast filter may suddenly change, due to concurrent insertion or removal of elements in the linear array. This in turn leads to various invalid memory access issues and kernel panics. To avoid this problem, put all multicast memberships on a STAILQ based list. Then the memory location of the IPv4 and IPv6 multicast filters become fixed during their lifetime and use after free and memory leak issues are easier to track, for example by: vmstat -m | grep multi All list manipulation has been factored into inline functions including some macros, to easily allow for a future hash-list implementation, if needed. This patch has been tested by pho@ . Differential Revision: https://reviews.freebsd.org/D20080 Reviewed by: markj @ Sponsored by: Mellanox Technologies Modified: stable/12/sys/net/if_vxlan.c stable/12/sys/netinet/in.h stable/12/sys/netinet/in_mcast.c stable/12/sys/netinet/in_pcb.c stable/12/sys/netinet/in_var.h stable/12/sys/netinet/ip_carp.c stable/12/sys/netinet/ip_mroute.c stable/12/sys/netinet/ip_var.h stable/12/sys/netinet6/in6.h stable/12/sys/netinet6/in6_ifattach.c stable/12/sys/netinet6/in6_mcast.c stable/12/sys/netinet6/in6_pcb.c stable/12/sys/netinet6/in6_var.h stable/12/sys/netinet6/ip6_var.h stable/12/sys/netpfil/pf/if_pfsync.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_vxlan.c ============================================================================== --- stable/12/sys/net/if_vxlan.c Fri Jul 5 06:53:12 2019 (r349761) +++ stable/12/sys/net/if_vxlan.c Fri Jul 5 10:31:37 2019 (r349762) @@ -1134,7 +1134,7 @@ vxlan_socket_mc_join_group(struct vxlan_socket *vso, * If we really need to, we can of course look in the INP's * membership list: * sotoinpcb(vso->vxlso_sock)->inp_moptions-> - * imo_membership[]->inm_ifp + * imo_head[]->imf_inm->inm_ifp * similarly to imo_match_group(). */ source->in4.sin_addr = local->in4.sin_addr; Modified: stable/12/sys/netinet/in.h ============================================================================== --- stable/12/sys/netinet/in.h Fri Jul 5 06:53:12 2019 (r349761) +++ stable/12/sys/netinet/in.h Fri Jul 5 10:31:37 2019 (r349762) @@ -505,13 +505,9 @@ __END_DECLS #define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ /* - * The imo_membership vector for each socket is now dynamically allocated at - * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized - * according to a power-of-two increment. + * Limit for IPv4 multicast memberships */ -#define IP_MIN_MEMBERSHIPS 31 #define IP_MAX_MEMBERSHIPS 4095 -#define IP_MAX_SOURCE_FILTER 1024 /* XXX to be unused */ /* * Default resource limits for IPv4 multicast source filtering. Modified: stable/12/sys/netinet/in_mcast.c ============================================================================== --- stable/12/sys/netinet/in_mcast.c Fri Jul 5 06:53:12 2019 (r349761) +++ stable/12/sys/netinet/in_mcast.c Fri Jul 5 10:31:37 2019 (r349762) @@ -94,7 +94,9 @@ static MALLOC_DEFINE(M_IPMSOURCE, "ip_msource", /* * Locking: - * - Lock order is: Giant, INP_WLOCK, IN_MULTI_LIST_LOCK, IGMP_LOCK, IF_ADDR_LOCK. + * + * - Lock order is: Giant, IN_MULTI_LOCK, INP_WLOCK, + * IN_MULTI_LIST_LOCK, IGMP_LOCK, IF_ADDR_LOCK. * - The IF_ADDR_LOCK is implicitly taken by inm_lookup() earlier, however * it can be taken by code in net/if.c also. * - ip_moptions and in_mfilter are covered by the INP_WLOCK. @@ -144,12 +146,11 @@ static int imf_prune(struct in_mfilter *, const struct static void imf_purge(struct in_mfilter *); static void imf_rollback(struct in_mfilter *); static void imf_reap(struct in_mfilter *); -static int imo_grow(struct ip_moptions *); -static size_t imo_match_group(const struct ip_moptions *, +static struct in_mfilter * + imo_match_group(const struct ip_moptions *, const struct ifnet *, const struct sockaddr *); static struct in_msource * - imo_match_source(const struct ip_moptions *, const size_t, - const struct sockaddr *); + imo_match_source(struct in_mfilter *, const struct sockaddr *); static void ims_merge(struct ip_msource *ims, const struct in_msource *lims, const int rollback); static int in_getmulti(struct ifnet *, const struct in_addr *, @@ -333,6 +334,26 @@ imf_init(struct in_mfilter *imf, const int st0, const imf->imf_st[1] = st1; } +struct in_mfilter * +ip_mfilter_alloc(const int mflags, const int st0, const int st1) +{ + struct in_mfilter *imf; + + imf = malloc(sizeof(*imf), M_INMFILTER, mflags); + if (imf != NULL) + imf_init(imf, st0, st1); + + return (imf); +} + +void +ip_mfilter_free(struct in_mfilter *imf) +{ + + imf_purge(imf); + free(imf, M_INMFILTER); +} + /* * Function for looking up an in_multi record for an IPv4 multicast address * on a given interface. ifp must be valid. If no record found, return NULL. @@ -378,89 +399,30 @@ inm_lookup(struct ifnet *ifp, const struct in_addr ina } /* - * Resize the ip_moptions vector to the next power-of-two minus 1. - * May be called with locks held; do not sleep. - */ -static int -imo_grow(struct ip_moptions *imo) -{ - struct in_multi **nmships; - struct in_multi **omships; - struct in_mfilter *nmfilters; - struct in_mfilter *omfilters; - size_t idx; - size_t newmax; - size_t oldmax; - - nmships = NULL; - nmfilters = NULL; - omships = imo->imo_membership; - omfilters = imo->imo_mfilters; - oldmax = imo->imo_max_memberships; - newmax = ((oldmax + 1) * 2) - 1; - - if (newmax <= IP_MAX_MEMBERSHIPS) { - nmships = (struct in_multi **)realloc(omships, - sizeof(struct in_multi *) * newmax, M_IPMOPTS, M_NOWAIT); - nmfilters = (struct in_mfilter *)realloc(omfilters, - sizeof(struct in_mfilter) * newmax, M_INMFILTER, M_NOWAIT); - if (nmships != NULL && nmfilters != NULL) { - /* Initialize newly allocated source filter heads. */ - for (idx = oldmax; idx < newmax; idx++) { - imf_init(&nmfilters[idx], MCAST_UNDEFINED, - MCAST_EXCLUDE); - } - imo->imo_max_memberships = newmax; - imo->imo_membership = nmships; - imo->imo_mfilters = nmfilters; - } - } - - if (nmships == NULL || nmfilters == NULL) { - if (nmships != NULL) - free(nmships, M_IPMOPTS); - if (nmfilters != NULL) - free(nmfilters, M_INMFILTER); - return (ETOOMANYREFS); - } - - return (0); -} - -/* * Find an IPv4 multicast group entry for this ip_moptions instance * which matches the specified group, and optionally an interface. * Return its index into the array, or -1 if not found. */ -static size_t +static struct in_mfilter * imo_match_group(const struct ip_moptions *imo, const struct ifnet *ifp, const struct sockaddr *group) { const struct sockaddr_in *gsin; - struct in_multi **pinm; - int idx; - int nmships; + struct in_mfilter *imf; + struct in_multi *inm; gsin = (const struct sockaddr_in *)group; - /* The imo_membership array may be lazy allocated. */ - if (imo->imo_membership == NULL || imo->imo_num_memberships == 0) - return (-1); - - nmships = imo->imo_num_memberships; - pinm = &imo->imo_membership[0]; - for (idx = 0; idx < nmships; idx++, pinm++) { - if (*pinm == NULL) + IP_MFILTER_FOREACH(imf, &imo->imo_head) { + inm = imf->imf_inm; + if (inm == NULL) continue; - if ((ifp == NULL || ((*pinm)->inm_ifp == ifp)) && - in_hosteq((*pinm)->inm_addr, gsin->sin_addr)) { + if ((ifp == NULL || (inm->inm_ifp == ifp)) && + in_hosteq(inm->inm_addr, gsin->sin_addr)) { break; } } - if (idx >= nmships) - idx = -1; - - return (idx); + return (imf); } /* @@ -471,23 +433,14 @@ imo_match_group(const struct ip_moptions *imo, const s * it exists, which may not be the desired behaviour. */ static struct in_msource * -imo_match_source(const struct ip_moptions *imo, const size_t gidx, - const struct sockaddr *src) +imo_match_source(struct in_mfilter *imf, const struct sockaddr *src) { struct ip_msource find; - struct in_mfilter *imf; struct ip_msource *ims; const sockunion_t *psa; KASSERT(src->sa_family == AF_INET, ("%s: !AF_INET", __func__)); - KASSERT(gidx != -1 && gidx < imo->imo_num_memberships, - ("%s: invalid index %d\n", __func__, (int)gidx)); - /* The imo_mfilters array may be lazy allocated. */ - if (imo->imo_mfilters == NULL) - return (NULL); - imf = &imo->imo_mfilters[gidx]; - /* Source trees are keyed in host byte order. */ psa = (const sockunion_t *)src; find.ims_haddr = ntohl(psa->sin.sin_addr.s_addr); @@ -506,14 +459,14 @@ int imo_multi_filter(const struct ip_moptions *imo, const struct ifnet *ifp, const struct sockaddr *group, const struct sockaddr *src) { - size_t gidx; + struct in_mfilter *imf; struct in_msource *ims; int mode; KASSERT(ifp != NULL, ("%s: null ifp", __func__)); - gidx = imo_match_group(imo, ifp, group); - if (gidx == -1) + imf = imo_match_group(imo, ifp, group); + if (imf == NULL) return (MCAST_NOTGMEMBER); /* @@ -525,8 +478,8 @@ imo_multi_filter(const struct ip_moptions *imo, const * NOTE: We are comparing group state here at IGMP t1 (now) * with socket-layer t0 (since last downcall). */ - mode = imo->imo_mfilters[gidx].imf_st[1]; - ims = imo_match_source(imo, gidx, src); + mode = imf->imf_st[1]; + ims = imo_match_source(imf, src); if ((ims == NULL && mode == MCAST_INCLUDE) || (ims != NULL && ims->imsl_st[0] != mode)) @@ -1451,7 +1404,6 @@ inp_block_unblock_source(struct inpcb *inp, struct soc struct ip_moptions *imo; struct in_msource *ims; struct in_multi *inm; - size_t idx; uint16_t fmode; int error, doblock; @@ -1530,21 +1482,19 @@ inp_block_unblock_source(struct inpcb *inp, struct soc if (!IN_MULTICAST(ntohl(gsa->sin.sin_addr.s_addr))) return (EINVAL); + IN_MULTI_LOCK(); + /* * Check if we are actually a member of this group. */ imo = inp_findmoptions(inp); - idx = imo_match_group(imo, ifp, &gsa->sa); - if (idx == -1 || imo->imo_mfilters == NULL) { + imf = imo_match_group(imo, ifp, &gsa->sa); + if (imf == NULL) { error = EADDRNOTAVAIL; goto out_inp_locked; } + inm = imf->imf_inm; - KASSERT(imo->imo_mfilters != NULL, - ("%s: imo_mfilters not allocated", __func__)); - imf = &imo->imo_mfilters[idx]; - inm = imo->imo_membership[idx]; - /* * Attempting to use the delta-based API on an * non exclusive-mode membership is an error. @@ -1561,7 +1511,7 @@ inp_block_unblock_source(struct inpcb *inp, struct soc * Asked to unblock, but nothing to unblock. * If adding a new block entry, allocate it. */ - ims = imo_match_source(imo, idx, &ssa->sa); + ims = imo_match_source(imf, &ssa->sa); if ((ims != NULL && doblock) || (ims == NULL && !doblock)) { CTR3(KTR_IGMPV3, "%s: source 0x%08x %spresent", __func__, ntohl(ssa->sin.sin_addr.s_addr), doblock ? "" : "not "); @@ -1592,14 +1542,13 @@ inp_block_unblock_source(struct inpcb *inp, struct soc /* * Begin state merge transaction at IGMP layer. */ - IN_MULTI_LOCK(); CTR1(KTR_IGMPV3, "%s: merge inm state", __func__); IN_MULTI_LIST_LOCK(); error = inm_merge(inm, imf); if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); IN_MULTI_LIST_UNLOCK(); - goto out_in_multi_locked; + goto out_imf_rollback; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); @@ -1608,9 +1557,6 @@ inp_block_unblock_source(struct inpcb *inp, struct soc if (error) CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); -out_in_multi_locked: - - IN_MULTI_UNLOCK(); out_imf_rollback: if (error) imf_rollback(imf); @@ -1621,6 +1567,7 @@ out_imf_rollback: out_inp_locked: INP_WUNLOCK(inp); + IN_MULTI_UNLOCK(); return (error); } @@ -1635,9 +1582,6 @@ static struct ip_moptions * inp_findmoptions(struct inpcb *inp) { struct ip_moptions *imo; - struct in_multi **immp; - struct in_mfilter *imfp; - size_t idx; INP_WLOCK(inp); if (inp->inp_moptions != NULL) @@ -1646,29 +1590,16 @@ inp_findmoptions(struct inpcb *inp) INP_WUNLOCK(inp); imo = malloc(sizeof(*imo), M_IPMOPTS, M_WAITOK); - immp = malloc(sizeof(*immp) * IP_MIN_MEMBERSHIPS, M_IPMOPTS, - M_WAITOK | M_ZERO); - imfp = malloc(sizeof(struct in_mfilter) * IP_MIN_MEMBERSHIPS, - M_INMFILTER, M_WAITOK); imo->imo_multicast_ifp = NULL; imo->imo_multicast_addr.s_addr = INADDR_ANY; imo->imo_multicast_vif = -1; imo->imo_multicast_ttl = IP_DEFAULT_MULTICAST_TTL; imo->imo_multicast_loop = in_mcast_loop; - imo->imo_num_memberships = 0; - imo->imo_max_memberships = IP_MIN_MEMBERSHIPS; - imo->imo_membership = immp; + STAILQ_INIT(&imo->imo_head); - /* Initialize per-group source filters. */ - for (idx = 0; idx < IP_MIN_MEMBERSHIPS; idx++) - imf_init(&imfp[idx], MCAST_UNDEFINED, MCAST_EXCLUDE); - imo->imo_mfilters = imfp; - INP_WLOCK(inp); if (inp->inp_moptions != NULL) { - free(imfp, M_INMFILTER); - free(immp, M_IPMOPTS); free(imo, M_IPMOPTS); return (inp->inp_moptions); } @@ -1679,32 +1610,25 @@ inp_findmoptions(struct inpcb *inp) static void inp_gcmoptions(struct ip_moptions *imo) { - struct in_mfilter *imf; + struct in_mfilter *imf; struct in_multi *inm; struct ifnet *ifp; - size_t idx, nmships; - nmships = imo->imo_num_memberships; - for (idx = 0; idx < nmships; ++idx) { - imf = imo->imo_mfilters ? &imo->imo_mfilters[idx] : NULL; - if (imf) - imf_leave(imf); - inm = imo->imo_membership[idx]; - ifp = inm->inm_ifp; - if (ifp != NULL) { - CURVNET_SET(ifp->if_vnet); - (void)in_leavegroup(inm, imf); - CURVNET_RESTORE(); - } else { - (void)in_leavegroup(inm, imf); + while ((imf = ip_mfilter_first(&imo->imo_head)) != NULL) { + ip_mfilter_remove(&imo->imo_head, imf); + + imf_leave(imf); + if ((inm = imf->imf_inm) != NULL) { + if ((ifp = inm->inm_ifp) != NULL) { + CURVNET_SET(ifp->if_vnet); + (void)in_leavegroup(inm, imf); + CURVNET_RESTORE(); + } else { + (void)in_leavegroup(inm, imf); + } } - if (imf) - imf_purge(imf); + ip_mfilter_free(imf); } - - if (imo->imo_mfilters) - free(imo->imo_mfilters, M_INMFILTER); - free(imo->imo_membership, M_IPMOPTS); free(imo, M_IPMOPTS); } @@ -1740,7 +1664,7 @@ inp_get_source_filters(struct inpcb *inp, struct socko struct sockaddr_storage *ptss; struct sockaddr_storage *tss; int error; - size_t idx, nsrcs, ncsrcs; + size_t nsrcs, ncsrcs; INP_WLOCK_ASSERT(inp); @@ -1767,12 +1691,11 @@ inp_get_source_filters(struct inpcb *inp, struct socko * Lookup group on the socket. */ gsa = (sockunion_t *)&msfr.msfr_group; - idx = imo_match_group(imo, ifp, &gsa->sa); - if (idx == -1 || imo->imo_mfilters == NULL) { + imf = imo_match_group(imo, ifp, &gsa->sa); + if (imf == NULL) { INP_WUNLOCK(inp); return (EADDRNOTAVAIL); } - imf = &imo->imo_mfilters[idx]; /* * Ignore memberships which are in limbo. @@ -2030,14 +1953,11 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt struct ip_moptions *imo; struct in_multi *inm; struct in_msource *lims; - size_t idx; int error, is_new; ifp = NULL; - imf = NULL; lims = NULL; error = 0; - is_new = 0; memset(&gsr, 0, sizeof(struct group_source_req)); gsa = (sockunion_t *)&gsr.gsr_group; @@ -2145,13 +2065,25 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) return (EADDRNOTAVAIL); + IN_MULTI_LOCK(); + + /* + * Find the membership in the membership list. + */ imo = inp_findmoptions(inp); - idx = imo_match_group(imo, ifp, &gsa->sa); - if (idx == -1) { + imf = imo_match_group(imo, ifp, &gsa->sa); + if (imf == NULL) { is_new = 1; + inm = NULL; + + if (ip_mfilter_count(&imo->imo_head) >= IP_MAX_MEMBERSHIPS) { + error = ENOMEM; + goto out_inp_locked; + } } else { - inm = imo->imo_membership[idx]; - imf = &imo->imo_mfilters[idx]; + is_new = 0; + inm = imf->imf_inm; + if (ssa->ss.ss_family != AF_UNSPEC) { /* * MCAST_JOIN_SOURCE_GROUP on an exclusive membership @@ -2178,7 +2110,7 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt * full-state SSM API with the delta-based API, * which is discouraged in the relevant RFCs. */ - lims = imo_match_source(imo, idx, &ssa->sa); + lims = imo_match_source(imf, &ssa->sa); if (lims != NULL /*&& lims->imsl_st[1] == MCAST_INCLUDE*/) { error = EADDRNOTAVAIL; @@ -2211,27 +2143,6 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt */ INP_WLOCK_ASSERT(inp); - if (is_new) { - if (imo->imo_num_memberships == imo->imo_max_memberships) { - error = imo_grow(imo); - if (error) - goto out_inp_locked; - } - /* - * Allocate the new slot upfront so we can deal with - * grafting the new source filter in same code path - * as for join-source on existing membership. - */ - idx = imo->imo_num_memberships; - imo->imo_membership[idx] = NULL; - imo->imo_num_memberships++; - KASSERT(imo->imo_mfilters != NULL, - ("%s: imf_mfilters vector was not allocated", __func__)); - imf = &imo->imo_mfilters[idx]; - KASSERT(RB_EMPTY(&imf->imf_sources), - ("%s: imf_sources not empty", __func__)); - } - /* * Graft new source into filter list for this inpcb's * membership of the group. The in_multi may not have @@ -2247,7 +2158,11 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt /* Membership starts in IN mode */ if (is_new) { CTR1(KTR_IGMPV3, "%s: new join w/source", __func__); - imf_init(imf, MCAST_UNDEFINED, MCAST_INCLUDE); + imf = ip_mfilter_alloc(M_NOWAIT, MCAST_UNDEFINED, MCAST_INCLUDE); + if (imf == NULL) { + error = ENOMEM; + goto out_inp_locked; + } } else { CTR2(KTR_IGMPV3, "%s: %s source", __func__, "allow"); } @@ -2256,34 +2171,41 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt CTR1(KTR_IGMPV3, "%s: merge imf state failed", __func__); error = ENOMEM; - goto out_imo_free; + goto out_inp_locked; } } else { /* No address specified; Membership starts in EX mode */ if (is_new) { CTR1(KTR_IGMPV3, "%s: new join w/o source", __func__); - imf_init(imf, MCAST_UNDEFINED, MCAST_EXCLUDE); + imf = ip_mfilter_alloc(M_NOWAIT, MCAST_UNDEFINED, MCAST_EXCLUDE); + if (imf == NULL) { + error = ENOMEM; + goto out_inp_locked; + } } } /* * Begin state merge transaction at IGMP layer. */ - in_pcbref(inp); - INP_WUNLOCK(inp); - IN_MULTI_LOCK(); - if (is_new) { + in_pcbref(inp); + INP_WUNLOCK(inp); + error = in_joingroup_locked(ifp, &gsa->sin.sin_addr, imf, - &inm); + &imf->imf_inm); + + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) { + error = ENXIO; + goto out_inp_unlocked; + } if (error) { CTR1(KTR_IGMPV3, "%s: in_joingroup_locked failed", __func__); - IN_MULTI_LIST_UNLOCK(); - goto out_imo_free; + goto out_inp_locked; } - inm_acquire(inm); - imo->imo_membership[idx] = inm; + inm_acquire(imf->imf_inm); } else { CTR1(KTR_IGMPV3, "%s: merge inm state", __func__); IN_MULTI_LIST_LOCK(); @@ -2292,7 +2214,9 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); IN_MULTI_LIST_UNLOCK(); - goto out_in_multi_locked; + imf_rollback(imf); + imf_reap(imf); + goto out_inp_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); error = igmp_change_state(inm); @@ -2300,40 +2224,30 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt if (error) { CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); - goto out_in_multi_locked; + imf_rollback(imf); + imf_reap(imf); + goto out_inp_locked; } } + if (is_new) + ip_mfilter_insert(&imo->imo_head, imf); -out_in_multi_locked: + imf_commit(imf); + imf = NULL; +out_inp_locked: + INP_WUNLOCK(inp); +out_inp_unlocked: IN_MULTI_UNLOCK(); - INP_WLOCK(inp); - if (in_pcbrele_wlocked(inp)) - return (ENXIO); - if (error) { - imf_rollback(imf); - if (is_new) - imf_purge(imf); - else - imf_reap(imf); - } else { - imf_commit(imf); - } -out_imo_free: - if (error && is_new) { - inm = imo->imo_membership[idx]; - if (inm != NULL) { + if (is_new && imf) { + if (imf->imf_inm != NULL) { IN_MULTI_LIST_LOCK(); - inm_release_deferred(inm); + inm_release_deferred(imf->imf_inm); IN_MULTI_LIST_UNLOCK(); } - imo->imo_membership[idx] = NULL; - --imo->imo_num_memberships; + ip_mfilter_free(imf); } - -out_inp_locked: - INP_WUNLOCK(inp); return (error); } @@ -2352,12 +2266,12 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop struct ip_moptions *imo; struct in_msource *ims; struct in_multi *inm; - size_t idx; - int error, is_final; + int error; + bool is_final; ifp = NULL; error = 0; - is_final = 1; + is_final = true; memset(&gsr, 0, sizeof(struct group_source_req)); gsa = (sockunion_t *)&gsr.gsr_group; @@ -2457,20 +2371,21 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop if (!IN_MULTICAST(ntohl(gsa->sin.sin_addr.s_addr))) return (EINVAL); + IN_MULTI_LOCK(); + /* - * Find the membership in the membership array. + * Find the membership in the membership list. */ imo = inp_findmoptions(inp); - idx = imo_match_group(imo, ifp, &gsa->sa); - if (idx == -1) { + imf = imo_match_group(imo, ifp, &gsa->sa); + if (imf == NULL) { error = EADDRNOTAVAIL; goto out_inp_locked; } - inm = imo->imo_membership[idx]; - imf = &imo->imo_mfilters[idx]; + inm = imf->imf_inm; if (ssa->ss.ss_family != AF_UNSPEC) - is_final = 0; + is_final = false; /* * Begin state merge transaction at socket layer. @@ -2482,13 +2397,14 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop * MCAST_LEAVE_SOURCE_GROUP is only valid for inclusive memberships. */ if (is_final) { + ip_mfilter_remove(&imo->imo_head, imf); imf_leave(imf); } else { if (imf->imf_st[0] == MCAST_EXCLUDE) { error = EADDRNOTAVAIL; goto out_inp_locked; } - ims = imo_match_source(imo, idx, &ssa->sa); + ims = imo_match_source(imf, &ssa->sa); if (ims == NULL) { CTR3(KTR_IGMPV3, "%s: source 0x%08x %spresent", __func__, ntohl(ssa->sin.sin_addr.s_addr), "not "); @@ -2507,17 +2423,7 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop /* * Begin state merge transaction at IGMP layer. */ - in_pcbref(inp); - INP_WUNLOCK(inp); - IN_MULTI_LOCK(); - - if (is_final) { - /* - * Give up the multicast address record to which - * the membership points. - */ - (void)in_leavegroup_locked(inm, imf); - } else { + if (!is_final) { CTR1(KTR_IGMPV3, "%s: merge inm state", __func__); IN_MULTI_LIST_LOCK(); error = inm_merge(inm, imf); @@ -2525,7 +2431,9 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); IN_MULTI_LIST_UNLOCK(); - goto out_in_multi_locked; + imf_rollback(imf); + imf_reap(imf); + goto out_inp_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); @@ -2534,38 +2442,27 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop if (error) { CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); + imf_rollback(imf); + imf_reap(imf); + goto out_inp_locked; } } - -out_in_multi_locked: - - IN_MULTI_UNLOCK(); - INP_WLOCK(inp); - if (in_pcbrele_wlocked(inp)) - return (ENXIO); - - if (error) - imf_rollback(imf); - else - imf_commit(imf); - + imf_commit(imf); imf_reap(imf); - if (is_final) { - /* Remove the gap in the membership and filter array. */ - KASSERT(RB_EMPTY(&imf->imf_sources), - ("%s: imf_sources not empty", __func__)); - for (++idx; idx < imo->imo_num_memberships; ++idx) { - imo->imo_membership[idx - 1] = imo->imo_membership[idx]; - imo->imo_mfilters[idx - 1] = imo->imo_mfilters[idx]; - } - imf_init(&imo->imo_mfilters[idx - 1], MCAST_UNDEFINED, - MCAST_EXCLUDE); - imo->imo_num_memberships--; - } - out_inp_locked: INP_WUNLOCK(inp); + + if (is_final && imf) { + /* + * Give up the multicast address record to which + * the membership points. + */ + (void) in_leavegroup_locked(imf->imf_inm, imf); + ip_mfilter_free(imf); + } + + IN_MULTI_UNLOCK(); return (error); } @@ -2655,7 +2552,6 @@ inp_set_source_filters(struct inpcb *inp, struct socko struct in_mfilter *imf; struct ip_moptions *imo; struct in_multi *inm; - size_t idx; int error; error = sooptcopyin(sopt, &msfr, sizeof(struct __msfilterreq), @@ -2687,18 +2583,19 @@ inp_set_source_filters(struct inpcb *inp, struct socko if (ifp == NULL) return (EADDRNOTAVAIL); + IN_MULTI_LOCK(); + /* * Take the INP write lock. * Check if this socket is a member of this group. */ imo = inp_findmoptions(inp); - idx = imo_match_group(imo, ifp, &gsa->sa); - if (idx == -1 || imo->imo_mfilters == NULL) { + imf = imo_match_group(imo, ifp, &gsa->sa); + if (imf == NULL) { error = EADDRNOTAVAIL; goto out_inp_locked; } - inm = imo->imo_membership[idx]; - imf = &imo->imo_mfilters[idx]; + inm = imf->imf_inm; /* * Begin state merge transaction at socket layer. @@ -2775,7 +2672,6 @@ inp_set_source_filters(struct inpcb *inp, struct socko goto out_imf_rollback; INP_WLOCK_ASSERT(inp); - IN_MULTI_LOCK(); /* * Begin state merge transaction at IGMP layer. @@ -2786,7 +2682,7 @@ inp_set_source_filters(struct inpcb *inp, struct socko if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); IN_MULTI_LIST_UNLOCK(); - goto out_in_multi_locked; + goto out_imf_rollback; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); @@ -2795,10 +2691,6 @@ inp_set_source_filters(struct inpcb *inp, struct socko if (error) CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); -out_in_multi_locked: - - IN_MULTI_UNLOCK(); - out_imf_rollback: if (error) imf_rollback(imf); @@ -2809,6 +2701,7 @@ out_imf_rollback: out_inp_locked: INP_WUNLOCK(inp); + IN_MULTI_UNLOCK(); return (error); } Modified: stable/12/sys/netinet/in_pcb.c ============================================================================== --- stable/12/sys/netinet/in_pcb.c Fri Jul 5 06:53:12 2019 (r349761) +++ stable/12/sys/netinet/in_pcb.c Fri Jul 5 10:31:37 2019 (r349762) @@ -86,6 +86,9 @@ __FBSDID("$FreeBSD$"); #if defined(INET) || defined(INET6) #include #include +#ifdef INET +#include +#endif #include #include #ifdef TCPHPTS @@ -93,16 +96,13 @@ __FBSDID("$FreeBSD$"); #endif #include #include -#endif -#ifdef INET -#include -#endif #ifdef INET6 #include #include #include #include #endif /* INET6 */ +#endif #include @@ -1777,8 +1777,9 @@ void in_pcbpurgeif0(struct inpcbinfo *pcbinfo, struct ifnet *ifp) { struct inpcb *inp; + struct in_multi *inm; + struct in_mfilter *imf; struct ip_moptions *imo; - int i, gap; INP_INFO_WLOCK(pcbinfo); CK_LIST_FOREACH(inp, pcbinfo->ipi_listhead, inp_list) { @@ -1799,17 +1800,18 @@ in_pcbpurgeif0(struct inpcbinfo *pcbinfo, struct ifnet * * XXX This can all be deferred to an epoch_call */ - for (i = 0, gap = 0; i < imo->imo_num_memberships; - i++) { - if (imo->imo_membership[i]->inm_ifp == ifp) { - IN_MULTI_LOCK_ASSERT(); - in_leavegroup_locked(imo->imo_membership[i], NULL); - gap++; - } else if (gap != 0) - imo->imo_membership[i - gap] = - imo->imo_membership[i]; +restart: + IP_MFILTER_FOREACH(imf, &imo->imo_head) { + if ((inm = imf->imf_inm) == NULL) + continue; + if (inm->inm_ifp != ifp) + continue; + ip_mfilter_remove(&imo->imo_head, imf); + IN_MULTI_LOCK_ASSERT(); + in_leavegroup_locked(inm, NULL); + ip_mfilter_free(imf); + goto restart; } - imo->imo_num_memberships -= gap; } INP_WUNLOCK(inp); } Modified: stable/12/sys/netinet/in_var.h ============================================================================== --- stable/12/sys/netinet/in_var.h Fri Jul 5 06:53:12 2019 (r349761) +++ stable/12/sys/netinet/in_var.h Fri Jul 5 10:31:37 2019 (r349762) @@ -232,7 +232,59 @@ struct in_mfilter { struct ip_msource_tree imf_sources; /* source list for (S,G) */ u_long imf_nsrc; /* # of source entries */ uint8_t imf_st[2]; /* state before/at commit */ + struct in_multi *imf_inm; /* associated multicast address */ + STAILQ_ENTRY(in_mfilter) imf_entry; /* list entry */ }; + +/* + * Helper types and functions for IPv4 multicast filters. + */ +STAILQ_HEAD(ip_mfilter_head, in_mfilter); + +struct in_mfilter *ip_mfilter_alloc(int mflags, int st0, int st1); +void ip_mfilter_free(struct in_mfilter *); + +static inline void +ip_mfilter_init(struct ip_mfilter_head *head) +{ + + STAILQ_INIT(head); +} + +static inline struct in_mfilter * +ip_mfilter_first(const struct ip_mfilter_head *head) +{ + + return (STAILQ_FIRST(head)); +} + +static inline void +ip_mfilter_insert(struct ip_mfilter_head *head, struct in_mfilter *imf) +{ + + STAILQ_INSERT_TAIL(head, imf, imf_entry); +} + +static inline void +ip_mfilter_remove(struct ip_mfilter_head *head, struct in_mfilter *imf) +{ + + STAILQ_REMOVE(head, imf, in_mfilter, imf_entry); +} + +#define IP_MFILTER_FOREACH(imf, head) \ + STAILQ_FOREACH(imf, head, imf_entry) + +static inline size_t +ip_mfilter_count(struct ip_mfilter_head *head) +{ + struct in_mfilter *imf; + size_t num = 0; + + STAILQ_FOREACH(imf, head, imf_entry) + num++; + return (num); +} /* * IPv4 group descriptor. Modified: stable/12/sys/netinet/ip_carp.c ============================================================================== --- stable/12/sys/netinet/ip_carp.c Fri Jul 5 06:53:12 2019 (r349761) +++ stable/12/sys/netinet/ip_carp.c Fri Jul 5 10:31:37 2019 (r349762) @@ -1367,25 +1367,24 @@ carp_multicast_setup(struct carp_if *cif, sa_family_t case AF_INET: { struct ip_moptions *imo = &cif->cif_imo; + struct in_mfilter *imf; struct in_addr addr; - if (imo->imo_membership) + if (ip_mfilter_first(&imo->imo_head) != NULL) return (0); - imo->imo_membership = (struct in_multi **)malloc( - (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Jul 5 12:26:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3E2315C9D3B; Fri, 5 Jul 2019 12:26:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FED96D7E7; Fri, 5 Jul 2019 12:26:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2BDCFA454; Fri, 5 Jul 2019 12:26:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x65CQV5U056370; Fri, 5 Jul 2019 12:26:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65CQUev056366; Fri, 5 Jul 2019 12:26:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907051226.x65CQUev056366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 5 Jul 2019 12:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349763 - in stable/12/sys: kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys: kern sys X-SVN-Commit-Revision: 349763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5FED96D7E7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 12:26:32 -0000 Author: hselasky Date: Fri Jul 5 12:26:30 2019 New Revision: 349763 URL: https://svnweb.freebsd.org/changeset/base/349763 Log: MFC r340404, r340415, r340417, r340419 and r340420: Synchronize epoch(9) code with -head to make merging new patches and features easier. The FreeBSD version has been bumped to force recompilation of external kernel modules. Sponsored by: Mellanox Technologies MFC r340404: Uninline epoch(9) entrance and exit. There is no proof that modern processors would benefit from avoiding a function call, but bloating code. In fact, clang created an uninlined real function for many object files in the network stack. - Move epoch_private.h into subr_epoch.c. Code copied exactly, avoiding any changes, including style(9). - Remove private copies of critical_enter/exit. Reviewed by: kib, jtl Differential Revision: https://reviews.freebsd.org/D17879 MFC r340415: The dualism between epoch_tracker and epoch_thread is fragile and unnecessary. So, expose CK types to kernel and use a single normal structure for epoch_tracker. Reviewed by: jtl, gallatin MFC r340417: With epoch not inlined, there is no point in using _lite KPI. While here, remove some unnecessary casts. MFC r340419: style(9), mostly adjusting overly long lines. MFC r340420: epoch(9) revert r340097 - no longer a need for multiple sections per cpu I spoke with Samy Bahra and recent changes to CK to make ck_epoch_call and ck_epoch_poll not modify the record have eliminated the need for this. Deleted: stable/12/sys/sys/epoch_private.h Modified: stable/12/sys/kern/genoffset.c stable/12/sys/kern/subr_epoch.c stable/12/sys/sys/epoch.h stable/12/sys/sys/param.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/genoffset.c ============================================================================== --- stable/12/sys/kern/genoffset.c Fri Jul 5 10:31:37 2019 (r349762) +++ stable/12/sys/kern/genoffset.c Fri Jul 5 12:26:30 2019 (r349763) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -OFFSYM(td_pre_epoch_prio, thread, u_char); OFFSYM(td_priority, thread, u_char); OFFSYM(td_epochnest, thread, u_char); OFFSYM(td_critnest, thread, u_int); Modified: stable/12/sys/kern/subr_epoch.c ============================================================================== --- stable/12/sys/kern/subr_epoch.c Fri Jul 5 10:31:37 2019 (r349762) +++ stable/12/sys/kern/subr_epoch.c Fri Jul 5 12:26:30 2019 (r349763) @@ -55,6 +55,27 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_EPOCH, "epoch", "epoch based reclamation"); +#ifdef __amd64__ +#define EPOCH_ALIGN CACHE_LINE_SIZE*2 +#else +#define EPOCH_ALIGN CACHE_LINE_SIZE +#endif + +TAILQ_HEAD (epoch_tdlist, epoch_tracker); +typedef struct epoch_record { + ck_epoch_record_t er_record; + volatile struct epoch_tdlist er_tdlist; + volatile uint32_t er_gen; + uint32_t er_cpuid; +} __aligned(EPOCH_ALIGN) *epoch_record_t; + +struct epoch { + struct ck_epoch e_epoch __aligned(EPOCH_ALIGN); + epoch_record_t e_pcpu_record; + int e_idx; + int e_flags; +}; + /* arbitrary --- needs benchmarking */ #define MAX_ADAPTIVE_SPIN 100 #define MAX_EPOCHS 64 @@ -119,11 +140,15 @@ epoch_init(void *arg __unused) epoch_call_count = counter_u64_alloc(M_WAITOK); epoch_call_task_count = counter_u64_alloc(M_WAITOK); - pcpu_zone_record = uma_zcreate("epoch_record pcpu", sizeof(struct epoch_record), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); + pcpu_zone_record = uma_zcreate("epoch_record pcpu", + sizeof(struct epoch_record), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, UMA_ZONE_PCPU); CPU_FOREACH(cpu) { - GROUPTASK_INIT(DPCPU_ID_PTR(cpu, epoch_cb_task), 0, epoch_call_task, NULL); - taskqgroup_attach_cpu(qgroup_softirq, DPCPU_ID_PTR(cpu, epoch_cb_task), NULL, cpu, -1, "epoch call task"); + GROUPTASK_INIT(DPCPU_ID_PTR(cpu, epoch_cb_task), 0, + epoch_call_task, NULL); + taskqgroup_attach_cpu(qgroup_softirq, + DPCPU_ID_PTR(cpu, epoch_cb_task), NULL, cpu, -1, + "epoch call task"); } inited = 1; global_epoch = epoch_alloc(0); @@ -156,6 +181,15 @@ epoch_ctor(epoch_t epoch) } } +static void +epoch_adjust_prio(struct thread *td, u_char prio) +{ + + thread_lock(td); + sched_prio(td, prio); + thread_unlock(td); +} + epoch_t epoch_alloc(int flags) { @@ -191,45 +225,120 @@ epoch_free(epoch_t epoch) free(epoch, M_EPOCH); } +static epoch_record_t +epoch_currecord(epoch_t epoch) +{ + + return (zpcpu_get_cpu(epoch->e_pcpu_record, curcpu)); +} + +#define INIT_CHECK(epoch) \ + do { \ + if (__predict_false((epoch) == NULL)) \ + return; \ + } while (0) + void -epoch_enter_preempt_KBI(epoch_t epoch, epoch_tracker_t et) +epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et) { + struct epoch_record *er; + struct thread *td; - epoch_enter_preempt(epoch, et); + MPASS(cold || epoch != NULL); + INIT_CHECK(epoch); + MPASS(epoch->e_flags & EPOCH_PREEMPT); +#ifdef EPOCH_TRACKER_DEBUG + et->et_magic_pre = EPOCH_MAGIC0; + et->et_magic_post = EPOCH_MAGIC1; +#endif + td = curthread; + et->et_td = td; + td->td_epochnest++; + critical_enter(); + sched_pin(); + + td->td_pre_epoch_prio = td->td_priority; + er = epoch_currecord(epoch); + TAILQ_INSERT_TAIL(&er->er_tdlist, et, et_link); + ck_epoch_begin(&er->er_record, &et->et_section); + critical_exit(); } void -epoch_exit_preempt_KBI(epoch_t epoch, epoch_tracker_t et) +epoch_enter(epoch_t epoch) { + struct thread *td; + epoch_record_t er; - epoch_exit_preempt(epoch, et); + MPASS(cold || epoch != NULL); + INIT_CHECK(epoch); + td = curthread; + + td->td_epochnest++; + critical_enter(); + er = epoch_currecord(epoch); + ck_epoch_begin(&er->er_record, NULL); } void -epoch_enter_KBI(epoch_t epoch) +epoch_exit_preempt(epoch_t epoch, epoch_tracker_t et) { + struct epoch_record *er; + struct thread *td; - epoch_enter(epoch); + INIT_CHECK(epoch); + td = curthread; + critical_enter(); + sched_unpin(); + MPASS(td->td_epochnest); + td->td_epochnest--; + er = epoch_currecord(epoch); + MPASS(epoch->e_flags & EPOCH_PREEMPT); + MPASS(et != NULL); + MPASS(et->et_td == td); +#ifdef EPOCH_TRACKER_DEBUG + MPASS(et->et_magic_pre == EPOCH_MAGIC0); + MPASS(et->et_magic_post == EPOCH_MAGIC1); + et->et_magic_pre = 0; + et->et_magic_post = 0; +#endif +#ifdef INVARIANTS + et->et_td = (void*)0xDEADBEEF; +#endif + ck_epoch_end(&er->er_record, &et->et_section); + TAILQ_REMOVE(&er->er_tdlist, et, et_link); + er->er_gen++; + if (__predict_false(td->td_pre_epoch_prio != td->td_priority)) + epoch_adjust_prio(td, td->td_pre_epoch_prio); + critical_exit(); } void -epoch_exit_KBI(epoch_t epoch) +epoch_exit(epoch_t epoch) { + struct thread *td; + epoch_record_t er; - epoch_exit(epoch); + INIT_CHECK(epoch); + td = curthread; + MPASS(td->td_epochnest); + td->td_epochnest--; + er = epoch_currecord(epoch); + ck_epoch_end(&er->er_record, NULL); + critical_exit(); } /* - * epoch_block_handler_preempt is a callback from the ck code when another thread is - * currently in an epoch section. + * epoch_block_handler_preempt() is a callback from the CK code when another + * thread is currently in an epoch section. */ static void -epoch_block_handler_preempt(struct ck_epoch *global __unused, ck_epoch_record_t *cr, - void *arg __unused) +epoch_block_handler_preempt(struct ck_epoch *global __unused, + ck_epoch_record_t *cr, void *arg __unused) { epoch_record_t record; struct thread *td, *owner, *curwaittd; - struct epoch_thread *tdwait; + struct epoch_tracker *tdwait; struct turnstile *ts; struct lock_object *lock; int spincount, gen; @@ -317,25 +426,27 @@ epoch_block_handler_preempt(struct ck_epoch *global __ if (TD_IS_INHIBITED(curwaittd) && TD_ON_LOCK(curwaittd) && ((ts = curwaittd->td_blocked) != NULL)) { /* - * We unlock td to allow turnstile_wait to reacquire the - * the thread lock. Before unlocking it we enter a critical - * section to prevent preemption after we reenable interrupts - * by dropping the thread lock in order to prevent curwaittd - * from getting to run. + * We unlock td to allow turnstile_wait to reacquire + * the thread lock. Before unlocking it we enter a + * critical section to prevent preemption after we + * reenable interrupts by dropping the thread lock in + * order to prevent curwaittd from getting to run. */ critical_enter(); thread_unlock(td); owner = turnstile_lock(ts, &lock); /* - * The owner pointer indicates that the lock succeeded. Only - * in case we hold the lock and the turnstile we locked is still - * the one that curwaittd is blocked on can we continue. Otherwise - * The turnstile pointer has been changed out from underneath - * us, as in the case where the lock holder has signalled curwaittd, + * The owner pointer indicates that the lock succeeded. + * Only in case we hold the lock and the turnstile we + * locked is still the one that curwaittd is blocked on + * can we continue. Otherwise the turnstile pointer has + * been changed out from underneath us, as in the case + * where the lock holder has signalled curwaittd, * and we need to continue. */ if (owner != NULL && ts == curwaittd->td_blocked) { - MPASS(TD_IS_INHIBITED(curwaittd) && TD_ON_LOCK(curwaittd)); + MPASS(TD_IS_INHIBITED(curwaittd) && + TD_ON_LOCK(curwaittd)); critical_exit(); turnstile_wait(ts, owner, curwaittd->td_tsqueue); counter_u64_add(turnstile_count, 1); @@ -385,9 +496,8 @@ epoch_wait_preempt(epoch_t epoch) if ((epoch->e_flags & EPOCH_LOCKED) == 0) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "epoch_wait() can be long running"); - KASSERT(!in_epoch(epoch), - ("epoch_wait_preempt() called in the middle " - "of an epoch section of the same epoch")); + KASSERT(!in_epoch(epoch), ("epoch_wait_preempt() called in the middle " + "of an epoch section of the same epoch")); #endif thread_lock(td); DROP_GIANT(); @@ -400,7 +510,8 @@ epoch_wait_preempt(epoch_t epoch) td->td_pinned = 0; sched_bind(td, old_cpu); - ck_epoch_synchronize_wait(&epoch->e_epoch, epoch_block_handler_preempt, NULL); + ck_epoch_synchronize_wait(&epoch->e_epoch, epoch_block_handler_preempt, + NULL); /* restore CPU binding, if any */ if (was_bound != 0) { @@ -501,7 +612,7 @@ epoch_call_task(void *arg __unused) head = ck_stack_batch_pop_npsc(&cb_stack); for (cursor = head; cursor != NULL; cursor = next) { struct ck_epoch_entry *entry = - ck_epoch_entry_container(cursor); + ck_epoch_entry_container(cursor); next = CK_STACK_NEXT(cursor); entry->function(entry); @@ -511,7 +622,7 @@ epoch_call_task(void *arg __unused) int in_epoch_verbose(epoch_t epoch, int dump_onfail) { - struct epoch_thread *tdwait; + struct epoch_tracker *tdwait; struct thread *td; epoch_record_t er; @@ -544,12 +655,4 @@ int in_epoch(epoch_t epoch) { return (in_epoch_verbose(epoch, 0)); -} - -void -epoch_adjust_prio(struct thread *td, u_char prio) -{ - thread_lock(td); - sched_prio(td, prio); - thread_unlock(td); } Modified: stable/12/sys/sys/epoch.h ============================================================================== --- stable/12/sys/sys/epoch.h Fri Jul 5 10:31:37 2019 (r349762) +++ stable/12/sys/sys/epoch.h Fri Jul 5 12:26:30 2019 (r349763) @@ -29,10 +29,17 @@ #ifndef _SYS_EPOCH_H_ #define _SYS_EPOCH_H_ + +struct epoch_context { + void *data[2]; +} __aligned(sizeof(void *)); + +typedef struct epoch_context *epoch_context_t; + #ifdef _KERNEL #include #include -#endif +#include struct epoch; typedef struct epoch *epoch_t; @@ -43,22 +50,19 @@ typedef struct epoch *epoch_t; extern epoch_t global_epoch; extern epoch_t global_epoch_preempt; -struct epoch_context { - void *data[2]; -} __aligned(sizeof(void *)); - -typedef struct epoch_context *epoch_context_t; - - struct epoch_tracker { - void *datap[3]; -#ifdef EPOCH_TRACKER_DEBUG - int datai[5]; -#else - int datai[1]; +#ifdef EPOCH_TRACKER_DEBUG +#define EPOCH_MAGIC0 0xFADECAFEF00DD00D +#define EPOCH_MAGIC1 0xBADDBABEDEEDFEED + uint64_t et_magic_pre; #endif + TAILQ_ENTRY(epoch_tracker) et_link; + struct thread *et_td; + ck_epoch_section_t et_section; +#ifdef EPOCH_TRACKER_DEBUG + uint64_t et_magic_post; +#endif } __aligned(sizeof(void *)); - typedef struct epoch_tracker *epoch_tracker_t; epoch_t epoch_alloc(int flags); @@ -68,26 +72,15 @@ void epoch_wait_preempt(epoch_t epoch); void epoch_call(epoch_t epoch, epoch_context_t ctx, void (*callback) (epoch_context_t)); int in_epoch(epoch_t epoch); int in_epoch_verbose(epoch_t epoch, int dump_onfail); -#ifdef _KERNEL DPCPU_DECLARE(int, epoch_cb_count); DPCPU_DECLARE(struct grouptask, epoch_cb_task); #define EPOCH_MAGIC0 0xFADECAFEF00DD00D #define EPOCH_MAGIC1 0xBADDBABEDEEDFEED -void epoch_enter_preempt_KBI(epoch_t epoch, epoch_tracker_t et); -void epoch_exit_preempt_KBI(epoch_t epoch, epoch_tracker_t et); -void epoch_enter_KBI(epoch_t epoch); -void epoch_exit_KBI(epoch_t epoch); +void epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et); +void epoch_exit_preempt(epoch_t epoch, epoch_tracker_t et); +void epoch_enter(epoch_t epoch); +void epoch_exit(epoch_t epoch); - -#if defined(KLD_MODULE) && !defined(KLD_TIED) -#define epoch_enter_preempt(e, t) epoch_enter_preempt_KBI((e), (t)) -#define epoch_exit_preempt(e, t) epoch_exit_preempt_KBI((e), (t)) -#define epoch_enter(e) epoch_enter_KBI((e)) -#define epoch_exit(e) epoch_exit_KBI((e)) -#else -#include -#endif /* KLD_MODULE */ - -#endif /* _KERNEL */ -#endif +#endif /* _KERNEL */ +#endif /* _SYS_EPOCH_H_ */ Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Fri Jul 5 10:31:37 2019 (r349762) +++ stable/12/sys/sys/param.h Fri Jul 5 12:26:30 2019 (r349763) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200512 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200513 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Fri Jul 5 12:33:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41FC615C9F9E; Fri, 5 Jul 2019 12:33:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D73346DD01; Fri, 5 Jul 2019 12:33:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF3CFA5F4; Fri, 5 Jul 2019 12:33:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x65CXWo6061499; Fri, 5 Jul 2019 12:33:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65CXVdB061495; Fri, 5 Jul 2019 12:33:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907051233.x65CXVdB061495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 5 Jul 2019 12:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349764 - in stable/12: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 349764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D73346DD01 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 12:33:33 -0000 Author: hselasky Date: Fri Jul 5 12:33:31 2019 New Revision: 349764 URL: https://svnweb.freebsd.org/changeset/base/349764 Log: MFC r349506: Implement API for draining EPOCH(9) callbacks. The epoch_drain_callbacks() function is used to drain all pending callbacks which have been invoked by prior epoch_call() function calls on the same epoch. This function is useful when there are shared memory structure(s) referred to by the epoch callback(s) which are not refcounted and are rarely freed. The typical place for calling this function is right before freeing or invalidating the shared resource(s) used by the epoch callback(s). This function can sleep and is not optimized for performance. Differential Revision: https://reviews.freebsd.org/D20109 Sponsored by: Mellanox Technologies Modified: stable/12/share/man/man9/Makefile stable/12/share/man/man9/epoch.9 stable/12/sys/kern/subr_epoch.c stable/12/sys/sys/epoch.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/Makefile ============================================================================== --- stable/12/share/man/man9/Makefile Fri Jul 5 12:26:30 2019 (r349763) +++ stable/12/share/man/man9/Makefile Fri Jul 5 12:33:31 2019 (r349764) @@ -941,6 +941,15 @@ MLINKS+=drbr.9 drbr_free.9 \ MLINKS+=DRIVER_MODULE.9 DRIVER_MODULE_ORDERED.9 \ DRIVER_MODULE.9 EARLY_DRIVER_MODULE.9 \ DRIVER_MODULE.9 EARLY_DRIVER_MODULE_ORDERED.9 +MLINKS+=epoch.9 epoch_context.9 \ + epoch.9 epoch_alloc.9 \ + epoch.9 epoch_free.9 \ + epoch.9 epoch_enter.9 \ + epoch.9 epoch_exit.9 \ + epoch.9 epoch_wait.9 \ + epoch.9 epoch_call.9 \ + epoch.9 epoch_drain_callbacks.9 \ + epoch.9 in_epoch.9 MLINKS+=EVENTHANDLER.9 EVENTHANDLER_DECLARE.9 \ EVENTHANDLER.9 EVENTHANDLER_DEFINE.9 \ EVENTHANDLER.9 EVENTHANDLER_DEREGISTER.9 \ Modified: stable/12/share/man/man9/epoch.9 ============================================================================== --- stable/12/share/man/man9/epoch.9 Fri Jul 5 12:26:30 2019 (r349763) +++ stable/12/share/man/man9/epoch.9 Fri Jul 5 12:33:31 2019 (r349764) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2018 +.Dd June 28, 2019 .Dt EPOCH 9 .Os .Sh NAME @@ -38,6 +38,7 @@ .Nm epoch_exit , .Nm epoch_wait , .Nm epoch_call , +.Nm epoch_drain_callbacks , .Nm in_epoch , .Nd kernel epoch based reclamation .Sh SYNOPSIS @@ -60,6 +61,8 @@ .Fn epoch_wait_preempt "epoch_t epoch" .Ft void .Fn epoch_call "epoch_t epoch" "epoch_context_t ctx" "void (*callback) (epoch_context_t)" +.Ft void +.Fn epoch_drain_callbacks "epoch_t epoch" .Ft int .Fn in_epoch "epoch_t epoch" .Sh DESCRIPTION @@ -120,6 +123,18 @@ routines must be used and the caller can no longer mod in place. An item to be modified must be handled with copy on write and frees must be deferred until after a grace period has elapsed. +.Pp +The +.Fn epoch_drain_callbacks +function is used to drain all pending callbacks which have been invoked by prior +.Fn epoch_call +function calls on the same epoch. +This function is useful when there are shared memory structure(s) +referred to by the epoch callback(s) which are not refcounted and are +rarely freed. +The typical place for calling this function is right before freeing or +invalidating the shared resource(s) used by the epoch callback(s). +This function can sleep and is not optimized for performance. .Sh RETURN VALUES .Fn in_epoch curepoch will return 1 if curthread is in curepoch, 0 otherwise. Modified: stable/12/sys/kern/subr_epoch.c ============================================================================== --- stable/12/sys/kern/subr_epoch.c Fri Jul 5 12:26:30 2019 (r349763) +++ stable/12/sys/kern/subr_epoch.c Fri Jul 5 12:33:31 2019 (r349764) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -64,6 +65,8 @@ static MALLOC_DEFINE(M_EPOCH, "epoch", "epoch based re TAILQ_HEAD (epoch_tdlist, epoch_tracker); typedef struct epoch_record { ck_epoch_record_t er_record; + struct epoch_context er_drain_ctx; + struct epoch *er_parent; volatile struct epoch_tdlist er_tdlist; volatile uint32_t er_gen; uint32_t er_cpuid; @@ -74,6 +77,9 @@ struct epoch { epoch_record_t e_pcpu_record; int e_idx; int e_flags; + struct sx e_drain_sx; + struct mtx e_drain_mtx; + volatile int e_drain_count; }; /* arbitrary --- needs benchmarking */ @@ -178,6 +184,7 @@ epoch_ctor(epoch_t epoch) ck_epoch_register(&epoch->e_epoch, &er->er_record, NULL); TAILQ_INIT((struct threadlist *)(uintptr_t)&er->er_tdlist); er->er_cpuid = cpu; + er->er_parent = epoch; } } @@ -203,6 +210,8 @@ epoch_alloc(int flags) MPASS(epoch_count < MAX_EPOCHS - 2); epoch->e_flags = flags; epoch->e_idx = epoch_count; + sx_init(&epoch->e_drain_sx, "epoch-drain-sx"); + mtx_init(&epoch->e_drain_mtx, "epoch-drain-mtx", NULL, MTX_DEF); allepochs[epoch_count++] = epoch; return (epoch); } @@ -210,18 +219,13 @@ epoch_alloc(int flags) void epoch_free(epoch_t epoch) { -#ifdef INVARIANTS - struct epoch_record *er; - int cpu; - CPU_FOREACH(cpu) { - er = zpcpu_get_cpu(epoch->e_pcpu_record, cpu); - MPASS(TAILQ_EMPTY(&er->er_tdlist)); - } -#endif + epoch_drain_callbacks(epoch); allepochs[epoch->e_idx] = NULL; epoch_wait(global_epoch); uma_zfree_pcpu(pcpu_zone_record, epoch->e_pcpu_record); + mtx_destroy(&epoch->e_drain_mtx); + sx_destroy(&epoch->e_drain_sx); free(epoch, M_EPOCH); } @@ -655,4 +659,81 @@ int in_epoch(epoch_t epoch) { return (in_epoch_verbose(epoch, 0)); +} + +static void +epoch_drain_cb(struct epoch_context *ctx) +{ + struct epoch *epoch = + __containerof(ctx, struct epoch_record, er_drain_ctx)->er_parent; + + if (atomic_fetchadd_int(&epoch->e_drain_count, -1) == 1) { + mtx_lock(&epoch->e_drain_mtx); + wakeup(epoch); + mtx_unlock(&epoch->e_drain_mtx); + } +} + +void +epoch_drain_callbacks(epoch_t epoch) +{ + epoch_record_t er; + struct thread *td; + int was_bound; + int old_pinned; + int old_cpu; + int cpu; + + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "epoch_drain_callbacks() may sleep!"); + + /* too early in boot to have epoch set up */ + if (__predict_false(epoch == NULL)) + return; +#if !defined(EARLY_AP_STARTUP) + if (__predict_false(inited < 2)) + return; +#endif + DROP_GIANT(); + + sx_xlock(&epoch->e_drain_sx); + mtx_lock(&epoch->e_drain_mtx); + + td = curthread; + thread_lock(td); + old_cpu = PCPU_GET(cpuid); + old_pinned = td->td_pinned; + was_bound = sched_is_bound(td); + sched_unbind(td); + td->td_pinned = 0; + + CPU_FOREACH(cpu) + epoch->e_drain_count++; + CPU_FOREACH(cpu) { + er = zpcpu_get_cpu(epoch->e_pcpu_record, cpu); + sched_bind(td, cpu); + epoch_call(epoch, &er->er_drain_ctx, &epoch_drain_cb); + } + + /* restore CPU binding, if any */ + if (was_bound != 0) { + sched_bind(td, old_cpu); + } else { + /* get thread back to initial CPU, if any */ + if (old_pinned != 0) + sched_bind(td, old_cpu); + sched_unbind(td); + } + /* restore pinned after bind */ + td->td_pinned = old_pinned; + + thread_unlock(td); + + while (epoch->e_drain_count != 0) + msleep(epoch, &epoch->e_drain_mtx, PZERO, "EDRAIN", 0); + + mtx_unlock(&epoch->e_drain_mtx); + sx_xunlock(&epoch->e_drain_sx); + + PICKUP_GIANT(); } Modified: stable/12/sys/sys/epoch.h ============================================================================== --- stable/12/sys/sys/epoch.h Fri Jul 5 12:26:30 2019 (r349763) +++ stable/12/sys/sys/epoch.h Fri Jul 5 12:33:31 2019 (r349764) @@ -69,6 +69,7 @@ epoch_t epoch_alloc(int flags); void epoch_free(epoch_t epoch); void epoch_wait(epoch_t epoch); void epoch_wait_preempt(epoch_t epoch); +void epoch_drain_callbacks(epoch_t epoch); void epoch_call(epoch_t epoch, epoch_context_t ctx, void (*callback) (epoch_context_t)); int in_epoch(epoch_t epoch); int in_epoch_verbose(epoch_t epoch, int dump_onfail); From owner-svn-src-all@freebsd.org Fri Jul 5 12:35:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D30015CA055; Fri, 5 Jul 2019 12:35:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A97386DE92; Fri, 5 Jul 2019 12:35:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82C76A5F6; Fri, 5 Jul 2019 12:35:49 +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 x65CZndN061654; Fri, 5 Jul 2019 12:35:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65CZnaj061653; Fri, 5 Jul 2019 12:35:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201907051235.x65CZnaj061653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 5 Jul 2019 12:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349765 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 349765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A97386DE92 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 12:35:50 -0000 Author: hselasky Date: Fri Jul 5 12:35:49 2019 New Revision: 349765 URL: https://svnweb.freebsd.org/changeset/base/349765 Log: MFC r349507: Need to wait for epoch callbacks to complete before detaching a network interface. This particularly manifests itself when an INP has multicast options attached during a network interface detach. Then the IPv4 and IPv6 leave group call which results from freeing the multicast address, may access a freed ifnet structure. These are the steps to reproduce: service mdnsd onestart # installed from ports ifconfig epair create ifconfig epair0a 0/24 up ifconfig epair0a destroy Tested by: pho @ Sponsored by: Mellanox Technologies Modified: stable/12/sys/net/if.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if.c ============================================================================== --- stable/12/sys/net/if.c Fri Jul 5 12:33:31 2019 (r349764) +++ stable/12/sys/net/if.c Fri Jul 5 12:35:49 2019 (r349765) @@ -1100,6 +1100,15 @@ if_detach_internal(struct ifnet *ifp, int vmove, struc curvnet->vnet_ifcnt--; #endif epoch_wait_preempt(net_epoch_preempt); + + /* + * Ensure all pending EPOCH(9) callbacks have been executed. This + * fixes issues about late destruction of multicast options + * which lead to leave group calls, which in turn access the + * belonging ifnet structure: + */ + epoch_drain_callbacks(net_epoch_preempt); + /* * In any case (destroy or vmove) detach us from the groups * and remove/wait for pending events on the taskq. From owner-svn-src-all@freebsd.org Fri Jul 5 15:42:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CAF015CE19D; Fri, 5 Jul 2019 15:42:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3CDD7514D; Fri, 5 Jul 2019 15:42:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-4.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 0947A1F095; Fri, 5 Jul 2019 15:42:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r349735 - releng/11.3/release/doc/en_US.ISO8859-1/errata To: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org References: <201907041715.x64HFa3G052977@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <7a82ad4d-c154-3085-60fd-fb7bfcebf861@FreeBSD.org> Date: Fri, 5 Jul 2019 08:42:35 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <201907041715.x64HFa3G052977@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: A3CDD7514D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.82 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.82)[-0.819,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 15:42:42 -0000 On 7/4/19 10:15 AM, Glen Barber wrote: > Author: gjb > Date: Thu Jul 4 17:15:36 2019 > New Revision: 349735 > URL: https://svnweb.freebsd.org/changeset/base/349735 > > Log: > Document three open issues affecting 11.3-RELEASE. > > Approved by: re (implicit) > Sponsored by: Rubicon Communications, LLC (Netgate) > > Modified: > releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml > > Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml > ============================================================================== > --- releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jul 4 17:13:41 2019 (r349734) > +++ releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jul 4 17:15:36 2019 (r349735) > @@ -97,7 +97,34 @@ > > > > - No open issues at this time. > + [2019-07-04] An issue which can cause a crash when > + connecting to a &man.bhyve.4; instance with > + a VNC client under certain circumstances > + had been reported. An errata notice is planned > + post-release. > + > + > + > + [2019-07-04] An issue booting &man.bhyve.4; virtual > + machines compiled with &man.clang.1; version 8.0.0 or later > + had been reported late in the release cycle. An errata > + notice is planned post-release. > + This is only OpenBSD guests. It is not, for example, FreeBSD guests compiled with clang 8.0.0. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Jul 5 15:49:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EF3415CE50E; Fri, 5 Jul 2019 15:49:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8A4875686; Fri, 5 Jul 2019 15:49:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-4.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 3BF571F096; Fri, 5 Jul 2019 15:49:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r349763 - in stable/12/sys: kern sys To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org References: <201907051226.x65CQUev056366@repo.freebsd.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <97b7657c-53b9-f3d2-f31a-5e56343da71d@FreeBSD.org> Date: Fri, 5 Jul 2019 08:49:19 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <201907051226.x65CQUev056366@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: C8A4875686 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.81 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.81)[-0.809,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 15:49:22 -0000 On 7/5/19 5:26 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Jul 5 12:26:30 2019 > New Revision: 349763 > URL: https://svnweb.freebsd.org/changeset/base/349763 > > Log: > MFC r340404, r340415, r340417, r340419 and r340420: > Synchronize epoch(9) code with -head to make merging new patches > and features easier. > The FreeBSD version has been bumped to force recompilation of > external kernel modules. > > Sponsored by: Mellanox Technologies > > MFC r340404: > Uninline epoch(9) entrance and exit. There is no proof that modern > processors would benefit from avoiding a function call, but bloating > code. In fact, clang created an uninlined real function for many > object files in the network stack. > > - Move epoch_private.h into subr_epoch.c. Code copied exactly, avoiding > any changes, including style(9). > - Remove private copies of critical_enter/exit. > > Reviewed by: kib, jtl > Differential Revision: https://reviews.freebsd.org/D17879 > > MFC r340415: > The dualism between epoch_tracker and epoch_thread is fragile and > unnecessary. So, expose CK types to kernel and use a single normal > structure for epoch_tracker. > > Reviewed by: jtl, gallatin > > MFC r340417: > With epoch not inlined, there is no point in using _lite KPI. While here, > remove some unnecessary casts. > > MFC r340419: > style(9), mostly adjusting overly long lines. > > MFC r340420: > epoch(9) revert r340097 - no longer a need for multiple sections per cpu > > I spoke with Samy Bahra and recent changes to CK to make ck_epoch_call and > ck_epoch_poll not modify the record have eliminated the need for this. How does this not break the module KBI? You've removed epoch_*_KBI symbols used by existing modules, and you appear to have changed the size of the 'struct epoch_tracker' object that existing modules allocate on the stack and pass to functions in the kernel. Bumping __FreeBSD_version is not sufficient cover to break the KBI of widely used interfaces in stable (while we don't enforce KBI for all parts of the kernel, locking primitives is one of the things we can't break). > Modified: stable/12/sys/sys/epoch.h > ============================================================================== > --- stable/12/sys/sys/epoch.h Fri Jul 5 10:31:37 2019 (r349762) > +++ stable/12/sys/sys/epoch.h Fri Jul 5 12:26:30 2019 (r349763) > @@ -29,10 +29,17 @@ > > #ifndef _SYS_EPOCH_H_ > #define _SYS_EPOCH_H_ > + > +struct epoch_context { > + void *data[2]; > +} __aligned(sizeof(void *)); > + > +typedef struct epoch_context *epoch_context_t; > + > #ifdef _KERNEL > #include > #include > -#endif > +#include > > struct epoch; > typedef struct epoch *epoch_t; > @@ -43,22 +50,19 @@ typedef struct epoch *epoch_t; > extern epoch_t global_epoch; > extern epoch_t global_epoch_preempt; > > -struct epoch_context { > - void *data[2]; > -} __aligned(sizeof(void *)); > - > -typedef struct epoch_context *epoch_context_t; > - > - > struct epoch_tracker { > - void *datap[3]; > -#ifdef EPOCH_TRACKER_DEBUG > - int datai[5]; > -#else > - int datai[1]; > +#ifdef EPOCH_TRACKER_DEBUG > +#define EPOCH_MAGIC0 0xFADECAFEF00DD00D > +#define EPOCH_MAGIC1 0xBADDBABEDEEDFEED > + uint64_t et_magic_pre; > #endif > + TAILQ_ENTRY(epoch_tracker) et_link; > + struct thread *et_td; > + ck_epoch_section_t et_section; > +#ifdef EPOCH_TRACKER_DEBUG > + uint64_t et_magic_post; > +#endif > } __aligned(sizeof(void *)); > - > typedef struct epoch_tracker *epoch_tracker_t; > > epoch_t epoch_alloc(int flags); > @@ -68,26 +72,15 @@ void epoch_wait_preempt(epoch_t epoch); > void epoch_call(epoch_t epoch, epoch_context_t ctx, void (*callback) (epoch_context_t)); > int in_epoch(epoch_t epoch); > int in_epoch_verbose(epoch_t epoch, int dump_onfail); > -#ifdef _KERNEL > DPCPU_DECLARE(int, epoch_cb_count); > DPCPU_DECLARE(struct grouptask, epoch_cb_task); > #define EPOCH_MAGIC0 0xFADECAFEF00DD00D > #define EPOCH_MAGIC1 0xBADDBABEDEEDFEED > > -void epoch_enter_preempt_KBI(epoch_t epoch, epoch_tracker_t et); > -void epoch_exit_preempt_KBI(epoch_t epoch, epoch_tracker_t et); > -void epoch_enter_KBI(epoch_t epoch); > -void epoch_exit_KBI(epoch_t epoch); > +void epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et); > +void epoch_exit_preempt(epoch_t epoch, epoch_tracker_t et); > +void epoch_enter(epoch_t epoch); > +void epoch_exit(epoch_t epoch); > > - > -#if defined(KLD_MODULE) && !defined(KLD_TIED) > -#define epoch_enter_preempt(e, t) epoch_enter_preempt_KBI((e), (t)) > -#define epoch_exit_preempt(e, t) epoch_exit_preempt_KBI((e), (t)) > -#define epoch_enter(e) epoch_enter_KBI((e)) > -#define epoch_exit(e) epoch_exit_KBI((e)) > -#else > -#include > -#endif /* KLD_MODULE */ > - > -#endif /* _KERNEL */ > -#endif > +#endif /* _KERNEL */ > +#endif /* _SYS_EPOCH_H_ */ > -- John Baldwin From owner-svn-src-all@freebsd.org Fri Jul 5 16:09:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E75A15CF07A; Fri, 5 Jul 2019 16:09:33 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D816376713; Fri, 5 Jul 2019 16:09:32 +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 F0A58E436; Fri, 5 Jul 2019 16:09:31 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Fri, 5 Jul 2019 16:09:29 +0000 From: Glen Barber To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: Re: svn commit: r349735 - releng/11.3/release/doc/en_US.ISO8859-1/errata Message-ID: <20190705160929.GJ94064@FreeBSD.org> References: <201907041715.x64HFa3G052977@repo.freebsd.org> <7a82ad4d-c154-3085-60fd-fb7bfcebf861@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="M9pltayyoy9lWEMH" Content-Disposition: inline In-Reply-To: <7a82ad4d-c154-3085-60fd-fb7bfcebf861@FreeBSD.org> User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: D816376713 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.90)[-0.900,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 16:09:33 -0000 --M9pltayyoy9lWEMH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 05, 2019 at 08:42:35AM -0700, John Baldwin wrote: > On 7/4/19 10:15 AM, Glen Barber wrote: > > Author: gjb > > Date: Thu Jul 4 17:15:36 2019 > > New Revision: 349735 > > URL: https://svnweb.freebsd.org/changeset/base/349735 > >=20 > > Log: > > Document three open issues affecting 11.3-RELEASE. > > =20 > > Approved by: re (implicit) > > Sponsored by: Rubicon Communications, LLC (Netgate) > >=20 > > Modified: > > releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml > >=20 > > Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jul = 4 17:13:41 2019 (r349734) > > +++ releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jul = 4 17:15:36 2019 (r349735) > > @@ -97,7 +97,34 @@ > > =20 > > > > > > - No open issues at this time. > > + [2019-07-04] An issue which can cause a crash when > > + connecting to a &man.bhyve.4; instance with > > + a VNC client under certain circumstances > > + had been reported. An errata notice is planned > > + post-release. > > + > > + > > + > > + [2019-07-04] An issue booting &man.bhyve.4; virtual > > + machines compiled with &man.clang.1; version 8.0.0 or later > > + had been reported late in the release cycle. An errata > > + notice is planned post-release. > > + >=20 > This is only OpenBSD guests. It is not, for example, FreeBSD guests > compiled with clang 8.0.0. >=20 It is unfortunately late to change the text, as the release builds have already completed. I will change the text in the 11.3-STABLE errata page, however, but once an EN is published, the text will be updated to reflect the EN is available. In other words, it is an unfortunate wording error, but ultimately does not matter too much in the bigger scheme of things for this, specifically. Glen --M9pltayyoy9lWEMH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAl0fdjkACgkQAxRYpUeP 4pMJyQ/9EXh0Sk2MX+XlVm9RmLZ7Qq/lvhEjS2py4kdnoNfDJOCb8UZerWBW5yIm RVC8xLrNMfq05Dg1nEYZ4XOL4xJ1sU9Kh5kMwI/vOe+vkaWE7KaTDa675S1qjBNq sGFJ1I6k1HBVlJ/HJ25L0m7cp0mkAHOfHt/GTbKQ3ckrPOq0t/qylM0mijK+Sew8 mS6TTfuBNVXaZ7we8FfTqWN8T4iND6uWLB31nylCKNsB5oHCOgRw71l7vdiKlFHx ZVTjiZe1Jd0YyIjeamD0/nevKHeaKU6XWZ8NA9aNb/fsIvrso/Yi9XSjnVcryzKP D9e2pr3y/7D1W9bQSpY8PSfNmyTqkubzg823gZ68+fhHvH/gOoRvF+Z8UMOXGmPj QQ8hgS8LxtTAMwgCHYdVLz2EDTveDF664CIwnGu/AtDGfm2ANH3gX20t6EV6jMZ4 EoYZINMaQgN924r319J+D1HAZqXnPgyRPozYuofpj13mFBQiPLAyntIBsoABpdFC O2HE+HXmiXbKecam8uKJsrHnnNnvJAW6q6PoUoMINA+HEQwZdzbKPpMIkE2/nUQU Qv5eYyet6ySXZKO/h7j8pOagxS2YLcWn8UY2NtkfRXUKtDxyuDqBzo+lfhi0EPqC K2ijgt/ZMGazC0Z5uYzlFwpqALm3cJgptGGGj4HdOwZcf7XZzNo= =24wZ -----END PGP SIGNATURE----- --M9pltayyoy9lWEMH-- From owner-svn-src-all@freebsd.org Fri Jul 5 16:43:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2F8515CF895; Fri, 5 Jul 2019 16:43:42 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96EB4779F4; Fri, 5 Jul 2019 16:43:42 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 548E5D13F; Fri, 5 Jul 2019 16:43:42 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x65Ghg3m091747; Fri, 5 Jul 2019 16:43:42 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65Ghgxs091746; Fri, 5 Jul 2019 16:43:42 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201907051643.x65Ghgxs091746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 5 Jul 2019 16:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349766 - stable/12/sys/dev/atkbdc X-SVN-Group: stable-12 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/12/sys/dev/atkbdc X-SVN-Commit-Revision: 349766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 96EB4779F4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 16:43:43 -0000 Author: philip Date: Fri Jul 5 16:43:41 2019 New Revision: 349766 URL: https://svnweb.freebsd.org/changeset/base/349766 Log: MFC r349098: Add macOS-like three finger drag trackpad gesture to psm(4) Modified: stable/12/sys/dev/atkbdc/psm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/atkbdc/psm.c ============================================================================== --- stable/12/sys/dev/atkbdc/psm.c Fri Jul 5 12:35:49 2019 (r349765) +++ stable/12/sys/dev/atkbdc/psm.c Fri Jul 5 16:43:41 2019 (r349766) @@ -235,6 +235,7 @@ typedef struct synapticsinfo { int softbutton3_x; int max_x; int max_y; + int three_finger_drag; int natural_scroll; } synapticsinfo_t; @@ -571,6 +572,7 @@ enum { SYNAPTICS_SYSCTL_SOFTBUTTONS_Y = SYN_OFFSET(softbuttons_y), SYNAPTICS_SYSCTL_SOFTBUTTON2_X = SYN_OFFSET(softbutton2_x), SYNAPTICS_SYSCTL_SOFTBUTTON3_X = SYN_OFFSET(softbutton3_x), + SYNAPTICS_SYSCTL_THREE_FINGER_DRAG = SYN_OFFSET(three_finger_drag), SYNAPTICS_SYSCTL_NATURAL_SCROLL = SYN_OFFSET(natural_scroll), #define SYNAPTICS_SYSCTL_LAST SYNAPTICS_SYSCTL_NATURAL_SCROLL }; @@ -3784,6 +3786,7 @@ psmgestures(struct psm_softc *sc, finger_t *fingers, i int vscroll_hor_area, vscroll_ver_area; int two_finger_scroll; int max_x, max_y; + int three_finger_drag; /* Read sysctl. */ /* XXX Verify values? */ @@ -3798,7 +3801,7 @@ psmgestures(struct psm_softc *sc, finger_t *fingers, i two_finger_scroll = sc->syninfo.two_finger_scroll; max_x = sc->syninfo.max_x; max_y = sc->syninfo.max_y; - + three_finger_drag = sc->syninfo.three_finger_drag; /* Read current absolute position. */ x0 = f->x; y0 = f->y; @@ -3887,8 +3890,8 @@ psmgestures(struct psm_softc *sc, finger_t *fingers, i ~MOUSE_BUTTON1DOWN) | center_button; } - /* If in tap-hold, add the recorded button. */ - if (gest->in_taphold) + /* If in tap-hold or three fingers, add the recorded button. */ + if (gest->in_taphold || (nfingers == 3 && three_finger_drag)) ms->button |= gest->tap_button; /* @@ -5754,6 +5757,7 @@ synaptics_sysctl(SYSCTL_HANDLER_ARGS) return (EINVAL); break; case SYNAPTICS_SYSCTL_TOUCHPAD_OFF: + case SYNAPTICS_SYSCTL_THREE_FINGER_DRAG: case SYNAPTICS_SYSCTL_NATURAL_SCROLL: if (arg < 0 || arg > 1) return (EINVAL); @@ -6146,6 +6150,14 @@ synaptics_sysctl_create_tree(struct psm_softc *sc, con sc, SYNAPTICS_SYSCTL_TOUCHPAD_OFF, synaptics_sysctl, "I", "Turn off touchpad"); + + sc->syninfo.three_finger_drag = 0; + SYSCTL_ADD_PROC(&sc->syninfo.sysctl_ctx, + SYSCTL_CHILDREN(sc->syninfo.sysctl_tree), OID_AUTO, + "three_finger_drag", CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY, + sc, SYNAPTICS_SYSCTL_THREE_FINGER_DRAG, + synaptics_sysctl, "I", + "Enable dragging with three fingers"); /* hw.psm.synaptics.natural_scroll. */ sc->syninfo.natural_scroll = 0; From owner-svn-src-all@freebsd.org Fri Jul 5 16:49:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA35B15CF93D; Fri, 5 Jul 2019 16:49:35 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41A6E77C0D; Fri, 5 Jul 2019 16:49:35 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F4040D146; Fri, 5 Jul 2019 16:49:34 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x65GnYLt092042; Fri, 5 Jul 2019 16:49:34 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65GnYaN092041; Fri, 5 Jul 2019 16:49:34 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201907051649.x65GnYaN092041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Fri, 5 Jul 2019 16:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349767 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41A6E77C0D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 16:49:36 -0000 Author: dougm Date: Fri Jul 5 16:49:34 2019 New Revision: 349767 URL: https://svnweb.freebsd.org/changeset/base/349767 Log: Based on work posted at https://reviews.freebsd.org/D13484, change swap_pager_swapoff_object and swp_pager_force_pagein so that they can page in multiple pages at a time to a swap device, rather than doing one I/O operation for each page. Tested by: pho Submitted by: ota_j.email.ne.jp (Yoshihiro Ota) Reviewed by: alc, markj, kib Approved by: kib, markj (mentors) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20635 Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Fri Jul 5 16:43:41 2019 (r349766) +++ head/sys/vm/swap_pager.c Fri Jul 5 16:49:34 2019 (r349767) @@ -1662,6 +1662,7 @@ swp_pager_force_dirty(vm_page_t m) vm_page_unlock(m); #endif vm_page_xunbusy(m); + swap_pager_unswapped(m); } static void @@ -1673,69 +1674,116 @@ swp_pager_force_launder(vm_page_t m) vm_page_launder(m); vm_page_unlock(m); vm_page_xunbusy(m); + swap_pager_unswapped(m); } /* - * SWP_PAGER_FORCE_PAGEIN() - force a swap block to be paged in + * SWP_PAGER_FORCE_PAGEIN() - force swap blocks to be paged in * - * This routine dissociates the page at the given index within an object - * from its backing store, paging it in if it does not reside in memory. - * If the page is paged in, it is marked dirty and placed in the laundry - * queue. The page is marked dirty because it no longer has backing - * store. It is placed in the laundry queue because it has not been - * accessed recently. Otherwise, it would already reside in memory. - * - * We also attempt to swap in all other pages in the swap block. - * However, we only guarantee that the one at the specified index is - * paged in. - * - * XXX - The code to page the whole block in doesn't work, so we - * revert to the one-by-one behavior for now. Sigh. + * This routine dissociates pages starting at the given index within an + * object from their backing store, paging them in if they do not reside + * in memory. Pages that are paged in are marked dirty and placed in the + * laundry queue. Pages are marked dirty because they no longer have + * backing store. They are placed in the laundry queue because they have + * not been accessed recently. Otherwise, they would already reside in + * memory. */ static void -swp_pager_force_pagein(vm_object_t object, vm_pindex_t pindex) +swp_pager_force_pagein(vm_object_t object, vm_pindex_t pindex, int npages) { - vm_page_t m; + vm_page_t ma[npages]; + int i, j; - vm_object_pip_add(object, 1); - m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL); - if (m->valid == VM_PAGE_BITS_ALL) { - vm_object_pip_wakeup(object); - swp_pager_force_dirty(m); - vm_pager_page_unswapped(m); - return; + KASSERT(npages > 0, ("%s: No pages", __func__)); + KASSERT(npages <= MAXPHYS / PAGE_SIZE, + ("%s: Too many pages: %d", __func__, npages)); + vm_object_pip_add(object, npages); + vm_page_grab_pages(object, pindex, VM_ALLOC_NORMAL, ma, npages); + for (i = j = 0;; i++) { + /* Count nonresident pages, to page-in all at once. */ + if (i < npages && ma[i]->valid != VM_PAGE_BITS_ALL) + continue; + if (j < i) { + /* Page-in nonresident pages. Mark for laundering. */ + if (swap_pager_getpages(object, &ma[j], i - j, NULL, + NULL) != VM_PAGER_OK) + panic("%s: read from swap failed", __func__); + do { + swp_pager_force_launder(ma[j]); + } while (++j < i); + } + if (i == npages) + break; + /* Mark dirty a resident page. */ + swp_pager_force_dirty(ma[j++]); } - - if (swap_pager_getpages(object, &m, 1, NULL, NULL) != VM_PAGER_OK) - panic("swap_pager_force_pagein: read from swap failed");/*XXX*/ - vm_object_pip_wakeup(object); - swp_pager_force_launder(m); - vm_pager_page_unswapped(m); + vm_object_pip_wakeupn(object, npages); } /* * swap_pager_swapoff_object: * * Page in all of the pages that have been paged out for an object - * from a given swap device. + * to a swap device. */ static void swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) { struct swblk *sb; - vm_pindex_t pi; + vm_pindex_t pi, s_pindex; + daddr_t blk, n_blks, s_blk; int i; + n_blks = 0; for (pi = 0; (sb = SWAP_PCTRIE_LOOKUP_GE( &object->un_pager.swp.swp_blks, pi)) != NULL; ) { - pi = sb->p + SWAP_META_PAGES; for (i = 0; i < SWAP_META_PAGES; i++) { - if (sb->d[i] == SWAPBLK_NONE) + blk = sb->d[i]; + if (!swp_pager_isondev(blk, sp)) + blk = SWAPBLK_NONE; + + /* + * If there are no blocks/pages accumulated, start a new + * accumulation here. + */ + if (n_blks == 0) { + if (blk != SWAPBLK_NONE) { + s_blk = blk; + s_pindex = sb->p + i; + n_blks = 1; + } continue; - if (swp_pager_isondev(sb->d[i], sp)) - swp_pager_force_pagein(object, sb->p + i); + } + + /* + * If the accumulation can be extended without breaking + * the sequence of consecutive blocks and pages that + * swp_pager_force_pagein() depends on, do so. + */ + if (n_blks < MAXPHYS / PAGE_SIZE && + s_blk + n_blks == blk && + s_pindex + n_blks == sb->p + i) { + ++n_blks; + continue; + } + + /* + * The sequence of consecutive blocks and pages cannot + * be extended, so page them all in here. Then, + * because doing so involves releasing and reacquiring + * a lock that protects the swap block pctrie, do not + * rely on the current swap block. Break this loop and + * re-fetch the same pindex from the pctrie again. + */ + swp_pager_force_pagein(object, s_pindex, n_blks); + n_blks = 0; + break; } + if (i == SWAP_META_PAGES) + pi = sb->p + SWAP_META_PAGES; } + if (n_blks > 0) + swp_pager_force_pagein(object, s_pindex, n_blks); } /* From owner-svn-src-all@freebsd.org Fri Jul 5 20:01:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B42215D35A1; Fri, 5 Jul 2019 20:01:07 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3155B87404; Fri, 5 Jul 2019 20:01:07 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B67DF1C3; Fri, 5 Jul 2019 20:01:07 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x65K165o095249; Fri, 5 Jul 2019 20:01:06 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65K16OU095248; Fri, 5 Jul 2019 20:01:06 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201907052001.x65K16OU095248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 5 Jul 2019 20:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349768 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 349768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3155B87404 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 20:01:07 -0000 Author: alc Date: Fri Jul 5 20:01:06 2019 New Revision: 349768 URL: https://svnweb.freebsd.org/changeset/base/349768 Log: Restructure cache_handle_range to avoid repeated barriers. Specifically, restructure cache_handle_range so that all of the data cache operations are performed before any instruction cache operations. Then, we only need one barrier between the data and instruction cache operations and one barrier after the instruction cache operations. On an Amazon EC2 a1.2xlarge instance, this simple change reduces the time for a "make -j8 buildworld" by 9%. Reviewed by: andrew MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20848 Modified: head/sys/arm64/arm64/cpufunc_asm.S Modified: head/sys/arm64/arm64/cpufunc_asm.S ============================================================================== --- head/sys/arm64/arm64/cpufunc_asm.S Fri Jul 5 16:49:34 2019 (r349767) +++ head/sys/arm64/arm64/cpufunc_asm.S Fri Jul 5 20:01:06 2019 (r349768) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); /* * Macro to handle the cache. This takes the start address in x0, length - * in x1. It will corrupt x0, x1, x2, and x3. + * in x1. It will corrupt x0, x1, x2, x3, and x4. */ .macro cache_handle_range dcop = 0, ic = 0, icop = 0 .if \ic == 0 @@ -64,17 +64,23 @@ __FBSDID("$FreeBSD$"); and x2, x0, x4 /* Get the low bits of the address */ add x1, x1, x2 /* Add these to the size */ bic x0, x0, x4 /* Clear the low bit of the address */ -1: - dc \dcop, x0 - dsb ish .if \ic != 0 - ic \icop, x0 - dsb ish + mov x2, x0 /* Save the address */ + mov x4, x1 /* Save the size */ .endif +1: + dc \dcop, x0 add x0, x0, x3 /* Move to the next line */ subs x1, x1, x3 /* Reduce the size */ b.hi 1b /* Check if we are done */ + dsb ish .if \ic != 0 +2: + ic \icop, x2 + add x2, x2, x3 /* Move to the next line */ + subs x4, x4, x3 /* Reduce the size */ + b.hi 2b /* Check if we are done */ + dsb ish isb .endif .endm From owner-svn-src-all@freebsd.org Fri Jul 5 22:03:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53E7215D5F9B; Fri, 5 Jul 2019 22:03:12 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E32178BEFB; Fri, 5 Jul 2019 22:03:11 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 210442604A5; Sat, 6 Jul 2019 00:03:08 +0200 (CEST) Subject: Re: svn commit: r349763 - in stable/12/sys: kern sys To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org References: <201907051226.x65CQUev056366@repo.freebsd.org> <97b7657c-53b9-f3d2-f31a-5e56343da71d@FreeBSD.org> From: Hans Petter Selasky Message-ID: <1bd91e31-920c-8857-f900-f66fb99f95d3@selasky.org> Date: Sat, 6 Jul 2019 00:02:31 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <97b7657c-53b9-f3d2-f31a-5e56343da71d@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E32178BEFB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 22:03:12 -0000 On 2019-07-05 17:49, John Baldwin wrote: > How does this not break the module KBI? You've removed epoch_*_KBI symbols used > by existing modules, and you appear to have changed the size of the > 'struct epoch_tracker' object that existing modules allocate on the stack and > pass to functions in the kernel. Bumping __FreeBSD_version is not sufficient > cover to break the KBI of widely used interfaces in stable (while we don't > enforce KBI for all parts of the kernel, locking primitives is one of the things > we can't break). Hi John, I'm aware there is a KPI breakage, but there is no API or functionality breakage. The epoch(9) API is a very new API and I don't expect it to be widely used for binary only modules. Do you have any examples otherwise? man 9 epoch clearly states: NOTES The epoch kernel programming interface is under development and is subject to change. epoch(9) is currently mostly used inside the kernel which has to be re-compiled. If you think it is really important that epoch(9) will stay KBI compliant I'll do the work to fix that. --HPS From owner-svn-src-all@freebsd.org Fri Jul 5 22:21:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A477E15D670C; Fri, 5 Jul 2019 22:21:03 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 480248C913; Fri, 5 Jul 2019 22:21:03 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 228FE1896C; Fri, 5 Jul 2019 22:21:03 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x65ML3Uh067506; Fri, 5 Jul 2019 22:21:03 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65ML22o067505; Fri, 5 Jul 2019 22:21:03 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201907052221.x65ML22o067505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Fri, 5 Jul 2019 22:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349769 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 349769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 480248C913 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.911,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 22:21:03 -0000 Author: zeising (doc,ports committer) Date: Fri Jul 5 22:21:02 2019 New Revision: 349769 URL: https://svnweb.freebsd.org/changeset/base/349769 Log: MFC r349607: pci(4): Use plural registers Original commit message: pci(4): Use plural configuration registers Change to use registers instead of register, as it is customary to use plural when talking about PCI registers. This was missed in r349150. Modified: stable/12/share/man/man4/pci.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/pci.4 ============================================================================== --- stable/12/share/man/man4/pci.4 Fri Jul 5 20:01:06 2019 (r349768) +++ stable/12/share/man/man4/pci.4 Fri Jul 5 22:21:02 2019 (r349769) @@ -290,7 +290,7 @@ This .Xr ioctl 2 reads the .Tn PCI -configuration register specified by the passed-in +configuration registers specified by the passed-in .Va pci_io structure. The From owner-svn-src-all@freebsd.org Fri Jul 5 22:21:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1F0715D673F; Fri, 5 Jul 2019 22:21:20 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A9F88CB65; Fri, 5 Jul 2019 22:21:20 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72CC618982; Fri, 5 Jul 2019 22:21:20 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x65MLKQN070048; Fri, 5 Jul 2019 22:21:20 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65MLKWv070047; Fri, 5 Jul 2019 22:21:20 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <201907052221.x65MLKWv070047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Fri, 5 Jul 2019 22:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349770 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 349770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9A9F88CB65 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.911,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 22:21:21 -0000 Author: zeising (doc,ports committer) Date: Fri Jul 5 22:21:20 2019 New Revision: 349770 URL: https://svnweb.freebsd.org/changeset/base/349770 Log: MFC r349607: pci(4): Use plural registers Original commit message: pci(4): Use plural configuration registers Change to use registers instead of register, as it is customary to use plural when talking about PCI registers. This was missed in r349150. Modified: stable/11/share/man/man4/pci.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/pci.4 ============================================================================== --- stable/11/share/man/man4/pci.4 Fri Jul 5 22:21:02 2019 (r349769) +++ stable/11/share/man/man4/pci.4 Fri Jul 5 22:21:20 2019 (r349770) @@ -290,7 +290,7 @@ This .Xr ioctl 2 reads the .Tn PCI -configuration register specified by the passed-in +configuration registers specified by the passed-in .Va pci_io structure. The From owner-svn-src-all@freebsd.org Fri Jul 5 22:36:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF19215D6A7A; Fri, 5 Jul 2019 22:36:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84E6E8D3AC; Fri, 5 Jul 2019 22:36:32 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59F8318C9C; Fri, 5 Jul 2019 22:36:32 +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 x65MaWpK078238; Fri, 5 Jul 2019 22:36:32 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65MaWQ3078236; Fri, 5 Jul 2019 22:36:32 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201907052236.x65MaWQ3078236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 5 Jul 2019 22:36:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349771 - stable/12/usr.sbin/mountd X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/usr.sbin/mountd X-SVN-Commit-Revision: 349771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 84E6E8D3AC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.92)[-0.925,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 22:36:33 -0000 Author: rmacklem Date: Fri Jul 5 22:36:31 2019 New Revision: 349771 URL: https://svnweb.freebsd.org/changeset/base/349771 Log: MFC: r348590, r348591 Modify mountd so that it incrementally updates the kernel exports upon a reload. Without this patch, mountd would delete/load all exports from the exports file(s) when it receives a SIGHUP. This works fine for small exports file(s), but can take several seconds to do when there are large numbers (10000+) of exported file systems. Most of this time is spent doing the system calls that delete/export each of these file systems. When the "-S" option has been specified (the default these days), the nfsd threads are suspended for several seconds while the reload is done. This patch changes mountd so that it only does system calls for file systems where the exports have been changed/added/deleted as compared to the exports done for the previous load/reload of the exports file(s). Basically, when SIGHUP is posted to mountd, it saves the exportlist structures from the previous load and creates a new set of structures from the current exports file(s). Then it compares the current with the previous and only does system calls for cases that have been changed/added/deleted. The nfsd threads do not need to be suspended until the comparison step is being done. This results in a suspension period of milliseconds for a server with 10000+ exported file systems. There is some code using a LOGDEBUG() macro that allow runtime debugging output via syslog(LOG_DEBUG,...) that can be enabled by creating a file called /var/log/mountd.debug. This code is expected to be replaced with code that uses dtrace by cy@ in the near future, once issues w.r.t. dtrace in stable/12 have been resolved. The patch should not change the usage of the exports file(s), but improves the performance of reloading large exports file(s) where there are only a small number of changes done to the file(s). PR: 237860 Modified: stable/12/usr.sbin/mountd/mountd.c stable/12/usr.sbin/mountd/pathnames.h Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/mountd/mountd.c ============================================================================== --- stable/12/usr.sbin/mountd/mountd.c Fri Jul 5 22:21:20 2019 (r349770) +++ stable/12/usr.sbin/mountd/mountd.c Fri Jul 5 22:36:31 2019 (r349771) @@ -120,6 +120,8 @@ struct exportlist { fsid_t ex_fs; char *ex_fsdir; char *ex_indexfile; + struct xucred ex_defanon; + int ex_defexflags; int ex_numsecflavors; int ex_secflavors[MAXSECFLAVORS]; int ex_defnumsecflavors; @@ -129,6 +131,9 @@ struct exportlist { }; /* ex_flag bits */ #define EX_LINKED 0x1 +#define EX_DONE 0x2 +#define EX_DEFSET 0x4 +#define EX_PUBLICFH 0x8 SLIST_HEAD(exportlisthead, exportlist); @@ -147,6 +152,9 @@ struct grouplist { int gr_type; union grouptypes gr_ptr; struct grouplist *gr_next; + struct xucred gr_anon; + int gr_exflags; + int gr_flag; int gr_numsecflavors; int gr_secflavors[MAXSECFLAVORS]; }; @@ -157,6 +165,9 @@ struct grouplist { #define GT_DEFAULT 0x3 #define GT_IGNORE 0x5 +/* Group flags */ +#define GR_FND 0x1 + struct hostlist { int ht_flag; /* Uses DP_xx bits */ struct grouplist *ht_grp; @@ -176,7 +187,8 @@ struct fhreturn { /* Global defs */ static char *add_expdir(struct dirlist **, char *, int); static void add_dlist(struct dirlist **, struct dirlist *, - struct grouplist *, int, struct exportlist *); + struct grouplist *, int, struct exportlist *, + struct xucred *, int); static void add_mlist(char *, char *); static int check_dirpath(char *); static int check_options(struct dirlist *); @@ -189,8 +201,9 @@ static void complete_service(struct netconfig *nconf, static void clearout_service(void); static void del_mlist(char *hostp, char *dirp); static struct dirlist *dirp_search(struct dirlist *, char *); +static int do_export_mount(struct exportlist *, struct statfs *); static int do_mount(struct exportlist *, struct grouplist *, int, - struct xucred *, char *, int, struct statfs *); + struct xucred *, char *, int, struct statfs *, int, int *); static int do_opt(char **, char **, struct exportlist *, struct grouplist *, int *, int *, struct xucred *); static struct exportlist *ex_search(fsid_t *, struct exportlisthead *); @@ -199,10 +212,16 @@ static void free_dir(struct dirlist *); static void free_exp(struct exportlist *); static void free_grp(struct grouplist *); static void free_host(struct hostlist *); -static void get_exportlist(void); +static void free_v4rootexp(void); +static void get_exportlist_one(int); +static void get_exportlist(int); static void insert_exports(struct exportlist *, struct exportlisthead *); static void free_exports(struct exportlisthead *); -static void read_exportfile(void); +static void read_exportfile(int); +static int compare_nmount_exportlist(struct iovec *, int, char *); +static int compare_export(struct exportlist *, struct exportlist *); +static int compare_cred(struct xucred *, struct xucred *); +static int compare_secflavor(int *, int *, int); static void delete_export(struct iovec *, int, struct statfs *, char *); static int get_host(char *, struct grouplist *, struct grouplist *); static struct hostlist *get_ht(void); @@ -212,7 +231,7 @@ static int get_net(char *, struct netmsk *, int); static void getexp_err(struct exportlist *, struct grouplist *, const char *); static struct grouplist *get_grp(void); static void hang_dirp(struct dirlist *, struct grouplist *, - struct exportlist *, int); + struct exportlist *, int, struct xucred *, int); static void huphandler(int sig); static int makemask(struct sockaddr_storage *ssp, int bitlen); static void mntsrv(struct svc_req *, SVCXPRT *); @@ -237,6 +256,7 @@ static void terminate(int); #define EXPHASH(f) (fnv_32_buf((f), sizeof(fsid_t), 0) % exphashsize) static struct exportlisthead *exphead = NULL; +static struct exportlisthead *oldexphead = NULL; static int exphashsize = 0; static SLIST_HEAD(, mountlist) mlhead = SLIST_HEAD_INITIALIZER(&mlhead); static char *exnames_default[2] = { _PATH_EXPORTS, NULL }; @@ -269,7 +289,9 @@ static int have_v6 = 1; static int v4root_phase = 0; static char v4root_dirpath[PATH_MAX + 1]; +static struct exportlist *v4root_ep = NULL; static int has_publicfh = 0; +static int has_set_publicfh = 0; static struct pidfh *pfh = NULL; /* Bits for opt_flags above */ @@ -293,6 +315,15 @@ static int debug = 0; #endif /* + * The LOGDEBUG() syslog() calls are always compiled into the daemon. + * To enable them, create a file at _PATH_MOUNTDDEBUG. This file can be empty. + * To disable the logging, just delete the file at _PATH_MOUNTDDEBUG. + */ +static int logdebug = 0; +#define LOGDEBUG(format, ...) \ + (logdebug ? syslog(LOG_DEBUG, format, ## __VA_ARGS__) : 0) + +/* * Similar to strsep(), but it allows for quoted strings * and escaped characters. * @@ -465,7 +496,7 @@ main(int argc, char **argv) openlog("mountd", LOG_PID, LOG_DAEMON); if (debug) warnx("getting export list"); - get_exportlist(); + get_exportlist(0); if (debug) warnx("getting mount list"); get_mountlist(); @@ -636,7 +667,7 @@ main(int argc, char **argv) /* Expand svc_run() here so that we can call get_exportlist(). */ for (;;) { if (got_sighup) { - get_exportlist(); + get_exportlist(1); got_sighup = 0; } readfds = svc_fdset; @@ -1426,10 +1457,10 @@ static FILE *exp_file; * Get the export list from one, currently open file */ static void -get_exportlist_one(void) +get_exportlist_one(int passno) { struct exportlist *ep; - struct grouplist *grp, *tgrp; + struct grouplist *grp, *tgrp, *savgrp; struct dirlist *dirhead; struct statfs fsb; struct xucred anon; @@ -1663,11 +1694,18 @@ get_exportlist_one(void) * Loop through hosts, pushing the exports into the kernel. * After loop, tgrp points to the start of the list and * grp points to the last entry in the list. + * Do not do the do_mount() for passno == 1, since the + * second pass will do it, as required. */ grp = tgrp; do { - if (do_mount(ep, grp, exflags, &anon, dirp, dirplen, - &fsb)) { + grp->gr_exflags = exflags; + grp->gr_anon = anon; + if (v4root_phase == 2 && passno == 0) + LOGDEBUG("do_mount v4root"); + if (passno == 0 && do_mount(ep, grp, exflags, &anon, + dirp, dirplen, &fsb, ep->ex_numsecflavors, + ep->ex_secflavors)) { getexp_err(ep, tgrp, NULL); goto nextline; } @@ -1678,9 +1716,32 @@ get_exportlist_one(void) */ if (v4root_phase > 0 && v4root_phase <= 2) { /* - * Since these structures aren't used by mountd, + * These structures are used for the reload, + * so save them for that case. Otherwise, just * free them up now. */ + if (passno == 1 && ep != NULL) { + savgrp = tgrp; + while (tgrp != NULL) { + /* + * Save the security flavors and exflags + * for this host set in the groups. + */ + tgrp->gr_numsecflavors = + ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(tgrp->gr_secflavors, + ep->ex_secflavors, + sizeof(ep->ex_secflavors)); + tgrp = tgrp->gr_next; + } + if (v4root_ep == NULL) { + v4root_ep = ep; + ep = NULL; /* Don't free below. */ + } + grp->gr_next = v4root_ep->ex_grphead; + v4root_ep->ex_grphead = savgrp; + } if (ep != NULL) free_exp(ep); while (tgrp != NULL) { @@ -1695,12 +1756,12 @@ get_exportlist_one(void) * Success. Update the data structures. */ if (has_host) { - hang_dirp(dirhead, tgrp, ep, opt_flags); + hang_dirp(dirhead, tgrp, ep, opt_flags, &anon, exflags); grp->gr_next = ep->ex_grphead; ep->ex_grphead = tgrp; } else { hang_dirp(dirhead, (struct grouplist *)NULL, ep, - opt_flags); + opt_flags, &anon, exflags); free_grp(grp); } dirhead = (struct dirlist *)NULL; @@ -1722,7 +1783,7 @@ nextline: * Get the export list from all specified files */ static void -get_exportlist(void) +get_exportlist(int passno) { struct export_args export; struct iovec *iov; @@ -1731,70 +1792,130 @@ get_exportlist(void) int num, i; int iovlen; struct nfsex_args eargs; + FILE *debug_file; - if (suspend_nfsd != 0) - (void)nfssvc(NFSSVC_SUSPENDNFSD, NULL); + if ((debug_file = fopen(_PATH_MOUNTDDEBUG, "r")) != NULL) { + fclose(debug_file); + logdebug = 1; + } else + logdebug = 0; + LOGDEBUG("passno=%d", passno); v4root_dirpath[0] = '\0'; + free_v4rootexp(); + if (passno == 1) { + /* + * Save the current lists as old ones, so that the new lists + * can be compared with the old ones in the 2nd pass. + */ + for (i = 0; i < exphashsize; i++) { + SLIST_FIRST(&oldexphead[i]) = SLIST_FIRST(&exphead[i]); + SLIST_INIT(&exphead[i]); + } + + /* Note that the public fh has not yet been set. */ + has_set_publicfh = 0; + + /* Read the export file(s) and process them */ + read_exportfile(passno); + } else { + /* + * Just make the old lists empty. + * exphashsize == 0 for the first call, before oldexphead + * has been initialized-->loop won't be executed. + */ + for (i = 0; i < exphashsize; i++) + SLIST_INIT(&oldexphead[i]); + } + bzero(&export, sizeof(export)); export.ex_flags = MNT_DELEXPORT; iov = NULL; iovlen = 0; bzero(errmsg, sizeof(errmsg)); + if (suspend_nfsd != 0) + (void)nfssvc(NFSSVC_SUSPENDNFSD, NULL); /* - * First, get rid of the old list + * Delete the old V4 root dir. */ - if (exphead != NULL) - free_exports(exphead); - - /* - * and the old V4 root dir. - */ bzero(&eargs, sizeof (eargs)); eargs.export.ex_flags = MNT_DELEXPORT; if (nfssvc(NFSSVC_V4ROOTEXPORT, (caddr_t)&eargs) < 0 && errno != ENOENT) syslog(LOG_ERR, "Can't delete exports for V4:"); - /* - * and clear flag that notes if a public fh has been exported. - */ - has_publicfh = 0; + build_iovec(&iov, &iovlen, "fstype", NULL, 0); + build_iovec(&iov, &iovlen, "fspath", NULL, 0); + build_iovec(&iov, &iovlen, "from", NULL, 0); + build_iovec(&iov, &iovlen, "update", NULL, 0); + build_iovec(&iov, &iovlen, "export", &export, + sizeof(export)); + build_iovec(&iov, &iovlen, "errmsg", errmsg, + sizeof(errmsg)); /* - * And delete exports that are in the kernel for all local - * filesystems. - * XXX: Should know how to handle all local exportable filesystems. + * For passno == 1, compare the old and new lists updating the kernel + * exports for any cases that have changed. + * This call is doing the second pass through the lists. + * If it fails, fall back on the bulk reload. */ - num = getmntinfo(&mntbufp, MNT_NOWAIT); + if (passno == 1 && compare_nmount_exportlist(iov, iovlen, errmsg) == + 0) { + LOGDEBUG("compareok"); + /* Free up the old lists. */ + free_exports(oldexphead); + } else { + LOGDEBUG("doing passno=0"); + /* + * Clear flag that notes if a public fh has been exported. + * It is set by do_mount() if MNT_EXPUBLIC is set for the entry. + */ + has_publicfh = 0; - /* Allocate hash tables, for first call. */ - if (exphead == NULL) { - /* Target an average linked list length of 10. */ - exphashsize = num / 10; - if (exphashsize < 1) - exphashsize = 1; - else if (exphashsize > 100000) - exphashsize = 100000; - exphead = malloc(exphashsize * sizeof(*exphead)); - if (exphead == NULL) - errx(1, "Can't malloc hash table"); + /* exphead == NULL if not yet allocated (first call). */ + if (exphead != NULL) { + /* + * First, get rid of the old lists. + */ + free_exports(exphead); + free_exports(oldexphead); + } - for (i = 0; i < exphashsize; i++) - SLIST_INIT(&exphead[i]); - } - if (num > 0) { - build_iovec(&iov, &iovlen, "fstype", NULL, 0); - build_iovec(&iov, &iovlen, "fspath", NULL, 0); - build_iovec(&iov, &iovlen, "from", NULL, 0); - build_iovec(&iov, &iovlen, "update", NULL, 0); - build_iovec(&iov, &iovlen, "export", &export, sizeof(export)); - build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); - } + /* + * And delete exports that are in the kernel for all local + * filesystems. + * XXX: Should know how to handle all local exportable + * filesystems. + */ + num = getmntinfo(&mntbufp, MNT_NOWAIT); - for (i = 0; i < num; i++) - delete_export(iov, iovlen, &mntbufp[i], errmsg); + /* Allocate hash tables, for first call. */ + if (exphead == NULL) { + /* Target an average linked list length of 10. */ + exphashsize = num / 10; + if (exphashsize < 1) + exphashsize = 1; + else if (exphashsize > 100000) + exphashsize = 100000; + exphead = malloc(exphashsize * sizeof(*exphead)); + oldexphead = malloc(exphashsize * sizeof(*oldexphead)); + if (exphead == NULL || oldexphead == NULL) + errx(1, "Can't malloc hash tables"); + for (i = 0; i < exphashsize; i++) { + SLIST_INIT(&exphead[i]); + SLIST_INIT(&oldexphead[i]); + } + } + + for (i = 0; i < num; i++) + delete_export(iov, iovlen, &mntbufp[i], errmsg); + + + /* Read the export file(s) and process them */ + read_exportfile(0); + } + if (iov != NULL) { /* Free strings allocated by strdup() in getmntopts.c */ free(iov[0].iov_base); /* fstype */ @@ -1809,16 +1930,17 @@ get_exportlist(void) iovlen = 0; } - read_exportfile(); - /* * If there was no public fh, clear any previous one set. */ - if (has_publicfh == 0) + if (has_publicfh == 0) { + LOGDEBUG("clear public fh"); (void) nfssvc(NFSSVC_NOPUBLICFH, NULL); + } /* Resume the nfsd. If they weren't suspended, this is harmless. */ (void)nfssvc(NFSSVC_RESUMENFSD, NULL); + LOGDEBUG("eo get_exportlist"); } /* @@ -1830,6 +1952,7 @@ insert_exports(struct exportlist *ep, struct exportlis uint32_t i; i = EXPHASH(&ep->ex_fs); + LOGDEBUG("fs=%s hash=%i", ep->ex_fsdir, i); SLIST_INSERT_HEAD(&exhp[i], ep, entries); } @@ -1855,7 +1978,7 @@ free_exports(struct exportlisthead *exhp) * Read the exports file(s) and call get_exportlist_one() for each line. */ static void -read_exportfile(void) +read_exportfile(int passno) { int done, i; @@ -1871,7 +1994,7 @@ read_exportfile(void) syslog(LOG_WARNING, "can't open %s", exnames[i]); continue; } - get_exportlist_one(); + get_exportlist_one(passno); fclose(exp_file); done++; } @@ -1882,6 +2005,244 @@ read_exportfile(void) } /* + * Compare the export lists against the old ones and do nmount() operations + * for any cases that have changed. This avoids doing nmount() for entries + * that have not changed. + * Return 0 upon success, 1 otherwise. + */ +static int +compare_nmount_exportlist(struct iovec *iov, int iovlen, char *errmsg) +{ + struct exportlist *ep, *oep; + struct grouplist *grp; + struct statfs fs, ofs; + int i, ret; + + /* + * Loop through the current list and look for an entry in the old + * list. + * If found, check to see if it the same. + * If it is not the same, delete and re-export. + * Then mark it done on the old list. + * else (not found) + * export it. + * Any entries left in the old list after processing must have their + * exports deleted. + */ + for (i = 0; i < exphashsize; i++) + SLIST_FOREACH(ep, &exphead[i], entries) { + LOGDEBUG("foreach ep=%s", ep->ex_fsdir); + oep = ex_search(&ep->ex_fs, oldexphead); + if (oep != NULL) { + /* + * Check the mount paths are the same. + * If not, return 1 so that the reload of the + * exports will be done in bulk, the + * passno == 0 way. + */ + LOGDEBUG("found old exp"); + if (strcmp(ep->ex_fsdir, oep->ex_fsdir) != 0) + return (1); + LOGDEBUG("same fsdir"); + /* + * Test to see if the entry is the same. + * If not the same delete exports and + * re-export. + */ + if (compare_export(ep, oep) != 0) { + /* + * Clear has_publicfh if if was set + * in the old exports, but only if it + * has not been set during processing of + * the exports for this pass, as + * indicated by has_set_publicfh. + */ + if (has_set_publicfh == 0 && + (oep->ex_flag & EX_PUBLICFH) != 0) + has_publicfh = 0; + + /* Delete and re-export. */ + if (statfs(ep->ex_fsdir, &fs) < 0) + return (1); + delete_export(iov, iovlen, &fs, errmsg); + ret = do_export_mount(ep, &fs); + if (ret != 0) + return (ret); + } + oep->ex_flag |= EX_DONE; + LOGDEBUG("exdone"); + } else { + LOGDEBUG("not found so export"); + /* Not found, so do export. */ + if (statfs(ep->ex_fsdir, &fs) < 0) + return (1); + ret = do_export_mount(ep, &fs); + if (ret != 0) + return (ret); + } + } + + /* Delete exports not done. */ + for (i = 0; i < exphashsize; i++) + SLIST_FOREACH(oep, &oldexphead[i], entries) { + if ((oep->ex_flag & EX_DONE) == 0) { + LOGDEBUG("not done delete=%s", oep->ex_fsdir); + if (statfs(oep->ex_fsdir, &ofs) >= 0 && + oep->ex_fs.val[0] == ofs.f_fsid.val[0] && + oep->ex_fs.val[1] == ofs.f_fsid.val[1]) { + LOGDEBUG("do delete"); + /* + * Clear has_publicfh if if was set + * in the old exports, but only if it + * has not been set during processing of + * the exports for this pass, as + * indicated by has_set_publicfh. + */ + if (has_set_publicfh == 0 && + (oep->ex_flag & EX_PUBLICFH) != 0) + has_publicfh = 0; + + delete_export(iov, iovlen, &ofs, + errmsg); + } + } + } + + /* Do the V4 root exports, as required. */ + grp = NULL; + if (v4root_ep != NULL) + grp = v4root_ep->ex_grphead; + v4root_phase = 2; + while (v4root_ep != NULL && grp != NULL) { + LOGDEBUG("v4root expath=%s", v4root_dirpath); + ret = do_mount(v4root_ep, grp, grp->gr_exflags, &grp->gr_anon, + v4root_dirpath, strlen(v4root_dirpath), &fs, + grp->gr_numsecflavors, grp->gr_secflavors); + if (ret != 0) { + v4root_phase = 0; + return (ret); + } + grp = grp->gr_next; + } + v4root_phase = 0; + free_v4rootexp(); + return (0); +} + +/* + * Compare old and current exportlist entries for the fsid and return 0 + * if they are the same, 1 otherwise. + */ +static int +compare_export(struct exportlist *ep, struct exportlist *oep) +{ + struct grouplist *grp, *ogrp; + + if (strcmp(ep->ex_fsdir, oep->ex_fsdir) != 0) + return (1); + if ((ep->ex_flag & EX_DEFSET) != (oep->ex_flag & EX_DEFSET)) + return (1); + if ((ep->ex_defdir != NULL && oep->ex_defdir == NULL) || + (ep->ex_defdir == NULL && oep->ex_defdir != NULL)) + return (1); + if (ep->ex_defdir != NULL && (ep->ex_defdir->dp_flag & DP_DEFSET) != + (oep->ex_defdir->dp_flag & DP_DEFSET)) + return (1); + if ((ep->ex_flag & EX_DEFSET) != 0 && (ep->ex_defnumsecflavors != + oep->ex_defnumsecflavors || ep->ex_defexflags != + oep->ex_defexflags || compare_cred(&ep->ex_defanon, + &oep->ex_defanon) != 0 || compare_secflavor(ep->ex_defsecflavors, + oep->ex_defsecflavors, ep->ex_defnumsecflavors) != 0)) + return (1); + + /* Now, check all the groups. */ + for (ogrp = oep->ex_grphead; ogrp != NULL; ogrp = ogrp->gr_next) + ogrp->gr_flag = 0; + for (grp = ep->ex_grphead; grp != NULL; grp = grp->gr_next) { + for (ogrp = oep->ex_grphead; ogrp != NULL; ogrp = + ogrp->gr_next) + if ((ogrp->gr_flag & GR_FND) == 0 && + grp->gr_numsecflavors == ogrp->gr_numsecflavors && + grp->gr_exflags == ogrp->gr_exflags && + compare_cred(&grp->gr_anon, &ogrp->gr_anon) == 0 && + compare_secflavor(grp->gr_secflavors, + ogrp->gr_secflavors, grp->gr_numsecflavors) == 0) + break; + if (ogrp != NULL) + ogrp->gr_flag |= GR_FND; + else + return (1); + } + for (ogrp = oep->ex_grphead; ogrp != NULL; ogrp = ogrp->gr_next) + if ((ogrp->gr_flag & GR_FND) == 0) + return (1); + return (0); +} + +/* + * This algorithm compares two arrays of "n" items. It returns 0 if they are + * the "same" and 1 otherwise. Although suboptimal, it is always safe to + * return 1, which makes compare_nmount_export() reload the exports entry. + * "same" refers to having the same set of values in the two arrays. + * The arrays are in no particular order and duplicates (multiple entries + * in an array with the same value) is allowed. + * The algorithm is inefficient, but the common case of indentical arrays is + * handled first and "n" is normally fairly small. + * Since the two functions need the same algorithm but for arrays of + * different types (gid_t vs int), this is done as a macro. + */ +#define COMPARE_ARRAYS(a1, a2, n) \ + do { \ + int fnd, fndarray[(n)], i, j; \ + /* Handle common case of identical arrays. */ \ + for (i = 0; i < (n); i++) \ + if ((a1)[i] != (a2)[i]) \ + break; \ + if (i == (n)) \ + return (0); \ + for (i = 0; i < (n); i++) \ + fndarray[i] = 0; \ + for (i = 0; i < (n); i++) { \ + fnd = 0; \ + for (j = 0; j < (n); j++) { \ + if ((a1)[i] == (a2)[j]) { \ + fndarray[j] = 1; \ + fnd = 1; \ + } \ + } \ + if (fnd == 0) \ + return (1); \ + } \ + for (i = 0; i < (n); i++) \ + if (fndarray[i] == 0) \ + return (1); \ + return (0); \ + } while (0) + +/* + * Compare to struct xucred's. Return 0 if the same and 1 otherwise. + */ +static int +compare_cred(struct xucred *cr0, struct xucred *cr1) +{ + + if (cr0->cr_uid != cr1->cr_uid || cr0->cr_ngroups != cr1->cr_ngroups) + return (1); + + COMPARE_ARRAYS(cr0->cr_groups, cr1->cr_groups, cr0->cr_ngroups); +} + +/* + * Compare two lists of security flavors. Return 0 if the same and 1 otherwise. + */ +static int +compare_secflavor(int *sec1, int *sec2, int nsec) +{ + + COMPARE_ARRAYS(sec1, sec2, nsec); +} + +/* * Delete an exports entry. */ static void @@ -2028,7 +2389,7 @@ add_expdir(struct dirlist **dpp, char *cp, int len) */ static void hang_dirp(struct dirlist *dp, struct grouplist *grp, struct exportlist *ep, - int flags) + int flags, struct xucred *anoncrp, int exflags) { struct hostlist *hp; struct dirlist *dp2; @@ -2039,12 +2400,15 @@ hang_dirp(struct dirlist *dp, struct grouplist *grp, s else ep->ex_defdir = dp; if (grp == (struct grouplist *)NULL) { + ep->ex_flag |= EX_DEFSET; ep->ex_defdir->dp_flag |= DP_DEFSET; /* Save the default security flavors list. */ ep->ex_defnumsecflavors = ep->ex_numsecflavors; if (ep->ex_numsecflavors > 0) memcpy(ep->ex_defsecflavors, ep->ex_secflavors, sizeof(ep->ex_secflavors)); + ep->ex_defanon = *anoncrp; + ep->ex_defexflags = exflags; } else while (grp) { hp = get_ht(); hp->ht_grp = grp; @@ -2064,7 +2428,8 @@ hang_dirp(struct dirlist *dp, struct grouplist *grp, s */ while (dp) { dp2 = dp->dp_left; - add_dlist(&ep->ex_dirl, dp, grp, flags, ep); + add_dlist(&ep->ex_dirl, dp, grp, flags, ep, anoncrp, + exflags); dp = dp2; } } @@ -2076,7 +2441,7 @@ hang_dirp(struct dirlist *dp, struct grouplist *grp, s */ static void add_dlist(struct dirlist **dpp, struct dirlist *newdp, struct grouplist *grp, - int flags, struct exportlist *ep) + int flags, struct exportlist *ep, struct xucred *anoncrp, int exflags) { struct dirlist *dp; struct hostlist *hp; @@ -2086,10 +2451,12 @@ add_dlist(struct dirlist **dpp, struct dirlist *newdp, if (dp) { cmp = strcmp(dp->dp_dirp, newdp->dp_dirp); if (cmp > 0) { - add_dlist(&dp->dp_left, newdp, grp, flags, ep); + add_dlist(&dp->dp_left, newdp, grp, flags, ep, anoncrp, + exflags); return; } else if (cmp < 0) { - add_dlist(&dp->dp_right, newdp, grp, flags, ep); + add_dlist(&dp->dp_right, newdp, grp, flags, ep, anoncrp, + exflags); return; } else free((caddr_t)newdp); @@ -2116,12 +2483,15 @@ add_dlist(struct dirlist **dpp, struct dirlist *newdp, grp = grp->gr_next; } while (grp); } else { + ep->ex_flag |= EX_DEFSET; dp->dp_flag |= DP_DEFSET; /* Save the default security flavors list. */ ep->ex_defnumsecflavors = ep->ex_numsecflavors; if (ep->ex_numsecflavors > 0) memcpy(ep->ex_defsecflavors, ep->ex_secflavors, sizeof(ep->ex_secflavors)); + ep->ex_defanon = *anoncrp; + ep->ex_defexflags = exflags; } } @@ -2487,6 +2857,19 @@ free_exp(struct exportlist *ep) } /* + * Free up the v4root exports. + */ +static void +free_v4rootexp(void) +{ + + if (v4root_ep != NULL) { + free_exp(v4root_ep); + v4root_ep = NULL; + } +} + +/* * Free hosts. */ static void @@ -2526,12 +2909,52 @@ out_of_mem(void) } /* + * Call do_mount() from the struct exportlist, for each case needed. + */ +static int +do_export_mount(struct exportlist *ep, struct statfs *fsp) +{ + struct grouplist *grp, defgrp; + int ret; + size_t dirlen; + + LOGDEBUG("do_export_mount=%s", ep->ex_fsdir); + dirlen = strlen(ep->ex_fsdir); + if ((ep->ex_flag & EX_DEFSET) != 0) { + defgrp.gr_type = GT_DEFAULT; + defgrp.gr_next = NULL; + /* We have an entry for all other hosts/nets. */ + LOGDEBUG("ex_defexflags=0x%x", ep->ex_defexflags); + ret = do_mount(ep, &defgrp, ep->ex_defexflags, &ep->ex_defanon, + ep->ex_fsdir, dirlen, fsp, ep->ex_defnumsecflavors, + ep->ex_defsecflavors); + if (ret != 0) + return (ret); + } + + /* Do a mount for each group. */ + grp = ep->ex_grphead; + while (grp != NULL) { + LOGDEBUG("do mount gr_type=0x%x gr_exflags=0x%x", + grp->gr_type, grp->gr_exflags); + ret = do_mount(ep, grp, grp->gr_exflags, &grp->gr_anon, + ep->ex_fsdir, dirlen, fsp, grp->gr_numsecflavors, + grp->gr_secflavors); + if (ret != 0) + return (ret); + grp = grp->gr_next; + } + return (0); +} + +/* * Do the nmount() syscall with the update flag to push the export info into * the kernel. */ static int do_mount(struct exportlist *ep, struct grouplist *grp, int exflags, - struct xucred *anoncrp, char *dirp, int dirplen, struct statfs *fsb) + struct xucred *anoncrp, char *dirp, int dirplen, struct statfs *fsb, + int numsecflavors, int *secflavors) { struct statfs fsb1; struct addrinfo *ai; @@ -2557,14 +2980,16 @@ do_mount(struct exportlist *ep, struct grouplist *grp, bzero(errmsg, sizeof(errmsg)); eap->ex_flags = exflags; eap->ex_anon = *anoncrp; + LOGDEBUG("do_mount exflags=0x%x", exflags); eap->ex_indexfile = ep->ex_indexfile; if (grp->gr_type == GT_HOST) ai = grp->gr_ptr.gt_addrinfo; else ai = NULL; - eap->ex_numsecflavors = ep->ex_numsecflavors; + eap->ex_numsecflavors = numsecflavors; + LOGDEBUG("do_mount numsec=%d", numsecflavors); for (i = 0; i < eap->ex_numsecflavors; i++) - eap->ex_secflavors[i] = ep->ex_secflavors[i]; + eap->ex_secflavors[i] = secflavors[i]; if (eap->ex_numsecflavors == 0) { eap->ex_numsecflavors = 1; eap->ex_secflavors[0] = AUTH_SYS; @@ -2728,8 +3153,11 @@ do_mount(struct exportlist *ep, struct grouplist *grp, else if (nfssvc(NFSSVC_PUBLICFH, (caddr_t)&fh) < 0) syslog(LOG_ERR, "Can't set public fh for %s", public_name); - else + else { has_publicfh = 1; + has_set_publicfh = 1; + ep->ex_flag |= EX_PUBLICFH; + } } skip: if (ai != NULL) Modified: stable/12/usr.sbin/mountd/pathnames.h ============================================================================== --- stable/12/usr.sbin/mountd/pathnames.h Fri Jul 5 22:21:20 2019 (r349770) +++ stable/12/usr.sbin/mountd/pathnames.h Fri Jul 5 22:36:31 2019 (r349771) @@ -36,3 +36,4 @@ #define _PATH_EXPORTS "/etc/exports" #define _PATH_RMOUNTLIST "/var/db/mountdtab" #define _PATH_MOUNTDPID "/var/run/mountd.pid" +#define _PATH_MOUNTDDEBUG "/var/log/mountd.debug" From owner-svn-src-all@freebsd.org Fri Jul 5 22:48:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4367215D6CFE; Fri, 5 Jul 2019 22:48:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6B868DA41; Fri, 5 Jul 2019 22:48:32 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 922AC18E3E; Fri, 5 Jul 2019 22:48:32 +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 x65MmWs0083436; Fri, 5 Jul 2019 22:48:32 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x65MmWMN083434; Fri, 5 Jul 2019 22:48:32 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201907052248.x65MmWMN083434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 5 Jul 2019 22:48:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349772 - stable/11/usr.sbin/mountd X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/usr.sbin/mountd X-SVN-Commit-Revision: 349772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D6B868DA41 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.92)[-0.925,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 22:48:33 -0000 Author: rmacklem Date: Fri Jul 5 22:48:31 2019 New Revision: 349772 URL: https://svnweb.freebsd.org/changeset/base/349772 Log: MFC: r348590, r348591 Modify mountd so that it incrementally updates the kernel exports upon a reload. Without this patch, mountd would delete/load all exports from the exports file(s) when it receives a SIGHUP. This works fine for small exports file(s), but can take several seconds to do when there are large numbers (10000+) of exported file systems. Most of this time is spent doing the system calls that delete/export each of these file systems. When the "-S" option has been specified (the default these days), the nfsd threads are suspended for several seconds while the reload is done. This patch changes mountd so that it only does system calls for file systems where the exports have been changed/added/deleted as compared to the exports done for the previous load/reload of the exports file(s). Basically, when SIGHUP is posted to mountd, it saves the exportlist structures from the previous load and creates a new set of structures from the current exports file(s). Then it compares the current with the previous and only does system calls for cases that have been changed/added/deleted. The nfsd threads do not need to be suspended until the comparison step is being done. This results in a suspension period of milliseconds for a server with 10000+ exported file systems. There is some code using a LOGDEBUG() macro that allow runtime debugging output via syslog(LOG_DEBUG,...) that can be enabled by creating a file called /var/log/mountd.debug. This code is expected to be replaced with code that uses dtrace by cy@ in the near future, once issues w.r.t. dtrace in stable/12 have been resolved. The patch should not change the usage of the exports file(s), but improves the performance of reloading large exports file(s) where there are only a small number of changes done to the file(s). PR: 237860 Modified: stable/11/usr.sbin/mountd/mountd.c stable/11/usr.sbin/mountd/pathnames.h Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/mountd/mountd.c ============================================================================== --- stable/11/usr.sbin/mountd/mountd.c Fri Jul 5 22:36:31 2019 (r349771) +++ stable/11/usr.sbin/mountd/mountd.c Fri Jul 5 22:48:31 2019 (r349772) @@ -118,6 +118,8 @@ struct exportlist { fsid_t ex_fs; char *ex_fsdir; char *ex_indexfile; + struct xucred ex_defanon; + int ex_defexflags; int ex_numsecflavors; int ex_secflavors[MAXSECFLAVORS]; int ex_defnumsecflavors; @@ -127,6 +129,9 @@ struct exportlist { }; /* ex_flag bits */ #define EX_LINKED 0x1 +#define EX_DONE 0x2 +#define EX_DEFSET 0x4 +#define EX_PUBLICFH 0x8 SLIST_HEAD(exportlisthead, exportlist); @@ -145,6 +150,9 @@ struct grouplist { int gr_type; union grouptypes gr_ptr; struct grouplist *gr_next; + struct xucred gr_anon; + int gr_exflags; + int gr_flag; int gr_numsecflavors; int gr_secflavors[MAXSECFLAVORS]; }; @@ -155,6 +163,9 @@ struct grouplist { #define GT_DEFAULT 0x3 #define GT_IGNORE 0x5 +/* Group flags */ +#define GR_FND 0x1 + struct hostlist { int ht_flag; /* Uses DP_xx bits */ struct grouplist *ht_grp; @@ -174,7 +185,8 @@ struct fhreturn { /* Global defs */ static char *add_expdir(struct dirlist **, char *, int); static void add_dlist(struct dirlist **, struct dirlist *, - struct grouplist *, int, struct exportlist *); + struct grouplist *, int, struct exportlist *, + struct xucred *, int); static void add_mlist(char *, char *); static int check_dirpath(char *); static int check_options(struct dirlist *); @@ -187,8 +199,9 @@ static void complete_service(struct netconfig *nconf, static void clearout_service(void); static void del_mlist(char *hostp, char *dirp); static struct dirlist *dirp_search(struct dirlist *, char *); +static int do_export_mount(struct exportlist *, struct statfs *); static int do_mount(struct exportlist *, struct grouplist *, int, - struct xucred *, char *, int, struct statfs *); + struct xucred *, char *, int, struct statfs *, int, int *); static int do_opt(char **, char **, struct exportlist *, struct grouplist *, int *, int *, struct xucred *); static struct exportlist *ex_search(fsid_t *, struct exportlisthead *); @@ -197,10 +210,16 @@ static void free_dir(struct dirlist *); static void free_exp(struct exportlist *); static void free_grp(struct grouplist *); static void free_host(struct hostlist *); -static void get_exportlist(void); +static void free_v4rootexp(void); +static void get_exportlist_one(int); +static void get_exportlist(int); static void insert_exports(struct exportlist *, struct exportlisthead *); static void free_exports(struct exportlisthead *); -static void read_exportfile(void); +static void read_exportfile(int); +static int compare_nmount_exportlist(struct iovec *, int, char *); +static int compare_export(struct exportlist *, struct exportlist *); +static int compare_cred(struct xucred *, struct xucred *); +static int compare_secflavor(int *, int *, int); static void delete_export(struct iovec *, int, struct statfs *, char *); static int get_host(char *, struct grouplist *, struct grouplist *); static struct hostlist *get_ht(void); @@ -210,7 +229,7 @@ static int get_net(char *, struct netmsk *, int); static void getexp_err(struct exportlist *, struct grouplist *, const char *); static struct grouplist *get_grp(void); static void hang_dirp(struct dirlist *, struct grouplist *, - struct exportlist *, int); + struct exportlist *, int, struct xucred *, int); static void huphandler(int sig); static int makemask(struct sockaddr_storage *ssp, int bitlen); static void mntsrv(struct svc_req *, SVCXPRT *); @@ -235,6 +254,7 @@ static void terminate(int); #define EXPHASH(f) (fnv_32_buf((f), sizeof(fsid_t), 0) % exphashsize) static struct exportlisthead *exphead = NULL; +static struct exportlisthead *oldexphead = NULL; static int exphashsize = 0; static SLIST_HEAD(, mountlist) mlhead = SLIST_HEAD_INITIALIZER(&mlhead); static char *exnames_default[2] = { _PATH_EXPORTS, NULL }; @@ -267,7 +287,9 @@ static int have_v6 = 1; static int v4root_phase = 0; static char v4root_dirpath[PATH_MAX + 1]; +static struct exportlist *v4root_ep = NULL; static int has_publicfh = 0; +static int has_set_publicfh = 0; static struct pidfh *pfh = NULL; /* Bits for opt_flags above */ @@ -291,6 +313,15 @@ static int debug = 0; #endif /* + * The LOGDEBUG() syslog() calls are always compiled into the daemon. + * To enable them, create a file at _PATH_MOUNTDDEBUG. This file can be empty. + * To disable the logging, just delete the file at _PATH_MOUNTDDEBUG. + */ +static int logdebug = 0; +#define LOGDEBUG(format, ...) \ + (logdebug ? syslog(LOG_DEBUG, format, ## __VA_ARGS__) : 0) + +/* * Similar to strsep(), but it allows for quoted strings * and escaped characters. * @@ -463,7 +494,7 @@ main(int argc, char **argv) openlog("mountd", LOG_PID, LOG_DAEMON); if (debug) warnx("getting export list"); - get_exportlist(); + get_exportlist(0); if (debug) warnx("getting mount list"); get_mountlist(); @@ -634,7 +665,7 @@ main(int argc, char **argv) /* Expand svc_run() here so that we can call get_exportlist(). */ for (;;) { if (got_sighup) { - get_exportlist(); + get_exportlist(1); got_sighup = 0; } readfds = svc_fdset; @@ -1424,10 +1455,10 @@ static FILE *exp_file; * Get the export list from one, currently open file */ static void -get_exportlist_one(void) +get_exportlist_one(int passno) { struct exportlist *ep; - struct grouplist *grp, *tgrp; + struct grouplist *grp, *tgrp, *savgrp; struct dirlist *dirhead; struct statfs fsb; struct xucred anon; @@ -1661,11 +1692,18 @@ get_exportlist_one(void) * Loop through hosts, pushing the exports into the kernel. * After loop, tgrp points to the start of the list and * grp points to the last entry in the list. + * Do not do the do_mount() for passno == 1, since the + * second pass will do it, as required. */ grp = tgrp; do { - if (do_mount(ep, grp, exflags, &anon, dirp, dirplen, - &fsb)) { + grp->gr_exflags = exflags; + grp->gr_anon = anon; + if (v4root_phase == 2 && passno == 0) + LOGDEBUG("do_mount v4root"); + if (passno == 0 && do_mount(ep, grp, exflags, &anon, + dirp, dirplen, &fsb, ep->ex_numsecflavors, + ep->ex_secflavors)) { getexp_err(ep, tgrp, NULL); goto nextline; } @@ -1676,9 +1714,32 @@ get_exportlist_one(void) */ if (v4root_phase > 0 && v4root_phase <= 2) { /* - * Since these structures aren't used by mountd, + * These structures are used for the reload, + * so save them for that case. Otherwise, just * free them up now. */ + if (passno == 1 && ep != NULL) { + savgrp = tgrp; + while (tgrp != NULL) { + /* + * Save the security flavors and exflags + * for this host set in the groups. + */ + tgrp->gr_numsecflavors = + ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(tgrp->gr_secflavors, + ep->ex_secflavors, + sizeof(ep->ex_secflavors)); + tgrp = tgrp->gr_next; + } + if (v4root_ep == NULL) { + v4root_ep = ep; + ep = NULL; /* Don't free below. */ + } + grp->gr_next = v4root_ep->ex_grphead; + v4root_ep->ex_grphead = savgrp; + } if (ep != NULL) free_exp(ep); while (tgrp != NULL) { @@ -1693,12 +1754,12 @@ get_exportlist_one(void) * Success. Update the data structures. */ if (has_host) { - hang_dirp(dirhead, tgrp, ep, opt_flags); + hang_dirp(dirhead, tgrp, ep, opt_flags, &anon, exflags); grp->gr_next = ep->ex_grphead; ep->ex_grphead = tgrp; } else { hang_dirp(dirhead, (struct grouplist *)NULL, ep, - opt_flags); + opt_flags, &anon, exflags); free_grp(grp); } dirhead = (struct dirlist *)NULL; @@ -1720,7 +1781,7 @@ nextline: * Get the export list from all specified files */ static void -get_exportlist(void) +get_exportlist(int passno) { struct export_args export; struct iovec *iov; @@ -1729,70 +1790,130 @@ get_exportlist(void) int num, i; int iovlen; struct nfsex_args eargs; + FILE *debug_file; - if (suspend_nfsd != 0) - (void)nfssvc(NFSSVC_SUSPENDNFSD, NULL); + if ((debug_file = fopen(_PATH_MOUNTDDEBUG, "r")) != NULL) { + fclose(debug_file); + logdebug = 1; + } else + logdebug = 0; + LOGDEBUG("passno=%d", passno); v4root_dirpath[0] = '\0'; + free_v4rootexp(); + if (passno == 1) { + /* + * Save the current lists as old ones, so that the new lists + * can be compared with the old ones in the 2nd pass. + */ + for (i = 0; i < exphashsize; i++) { + SLIST_FIRST(&oldexphead[i]) = SLIST_FIRST(&exphead[i]); + SLIST_INIT(&exphead[i]); + } + + /* Note that the public fh has not yet been set. */ + has_set_publicfh = 0; + + /* Read the export file(s) and process them */ + read_exportfile(passno); + } else { + /* + * Just make the old lists empty. + * exphashsize == 0 for the first call, before oldexphead + * has been initialized-->loop won't be executed. + */ + for (i = 0; i < exphashsize; i++) + SLIST_INIT(&oldexphead[i]); + } + bzero(&export, sizeof(export)); export.ex_flags = MNT_DELEXPORT; iov = NULL; iovlen = 0; bzero(errmsg, sizeof(errmsg)); + if (suspend_nfsd != 0) + (void)nfssvc(NFSSVC_SUSPENDNFSD, NULL); /* - * First, get rid of the old list + * Delete the old V4 root dir. */ - if (exphead != NULL) - free_exports(exphead); - - /* - * and the old V4 root dir. - */ bzero(&eargs, sizeof (eargs)); eargs.export.ex_flags = MNT_DELEXPORT; if (nfssvc(NFSSVC_V4ROOTEXPORT, (caddr_t)&eargs) < 0 && errno != ENOENT) syslog(LOG_ERR, "Can't delete exports for V4:"); - /* - * and clear flag that notes if a public fh has been exported. - */ - has_publicfh = 0; + build_iovec(&iov, &iovlen, "fstype", NULL, 0); + build_iovec(&iov, &iovlen, "fspath", NULL, 0); + build_iovec(&iov, &iovlen, "from", NULL, 0); + build_iovec(&iov, &iovlen, "update", NULL, 0); + build_iovec(&iov, &iovlen, "export", &export, + sizeof(export)); + build_iovec(&iov, &iovlen, "errmsg", errmsg, + sizeof(errmsg)); /* - * And delete exports that are in the kernel for all local - * filesystems. - * XXX: Should know how to handle all local exportable filesystems. + * For passno == 1, compare the old and new lists updating the kernel + * exports for any cases that have changed. + * This call is doing the second pass through the lists. + * If it fails, fall back on the bulk reload. */ - num = getmntinfo(&mntbufp, MNT_NOWAIT); + if (passno == 1 && compare_nmount_exportlist(iov, iovlen, errmsg) == + 0) { + LOGDEBUG("compareok"); + /* Free up the old lists. */ + free_exports(oldexphead); + } else { + LOGDEBUG("doing passno=0"); + /* + * Clear flag that notes if a public fh has been exported. + * It is set by do_mount() if MNT_EXPUBLIC is set for the entry. + */ + has_publicfh = 0; - /* Allocate hash tables, for first call. */ - if (exphead == NULL) { - /* Target an average linked list length of 10. */ - exphashsize = num / 10; - if (exphashsize < 1) - exphashsize = 1; - else if (exphashsize > 100000) - exphashsize = 100000; - exphead = malloc(exphashsize * sizeof(*exphead)); - if (exphead == NULL) - errx(1, "Can't malloc hash table"); + /* exphead == NULL if not yet allocated (first call). */ + if (exphead != NULL) { + /* + * First, get rid of the old lists. + */ + free_exports(exphead); + free_exports(oldexphead); + } - for (i = 0; i < exphashsize; i++) - SLIST_INIT(&exphead[i]); - } - if (num > 0) { - build_iovec(&iov, &iovlen, "fstype", NULL, 0); - build_iovec(&iov, &iovlen, "fspath", NULL, 0); - build_iovec(&iov, &iovlen, "from", NULL, 0); - build_iovec(&iov, &iovlen, "update", NULL, 0); - build_iovec(&iov, &iovlen, "export", &export, sizeof(export)); - build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); - } + /* + * And delete exports that are in the kernel for all local + * filesystems. + * XXX: Should know how to handle all local exportable + * filesystems. + */ + num = getmntinfo(&mntbufp, MNT_NOWAIT); - for (i = 0; i < num; i++) - delete_export(iov, iovlen, &mntbufp[i], errmsg); + /* Allocate hash tables, for first call. */ + if (exphead == NULL) { + /* Target an average linked list length of 10. */ + exphashsize = num / 10; + if (exphashsize < 1) + exphashsize = 1; + else if (exphashsize > 100000) + exphashsize = 100000; + exphead = malloc(exphashsize * sizeof(*exphead)); + oldexphead = malloc(exphashsize * sizeof(*oldexphead)); + if (exphead == NULL || oldexphead == NULL) + errx(1, "Can't malloc hash tables"); + for (i = 0; i < exphashsize; i++) { + SLIST_INIT(&exphead[i]); + SLIST_INIT(&oldexphead[i]); + } + } + + for (i = 0; i < num; i++) + delete_export(iov, iovlen, &mntbufp[i], errmsg); + + + /* Read the export file(s) and process them */ + read_exportfile(0); + } + if (iov != NULL) { /* Free strings allocated by strdup() in getmntopts.c */ free(iov[0].iov_base); /* fstype */ @@ -1807,16 +1928,17 @@ get_exportlist(void) iovlen = 0; } - read_exportfile(); - /* * If there was no public fh, clear any previous one set. */ - if (has_publicfh == 0) + if (has_publicfh == 0) { + LOGDEBUG("clear public fh"); (void) nfssvc(NFSSVC_NOPUBLICFH, NULL); + } /* Resume the nfsd. If they weren't suspended, this is harmless. */ (void)nfssvc(NFSSVC_RESUMENFSD, NULL); + LOGDEBUG("eo get_exportlist"); } /* @@ -1828,6 +1950,7 @@ insert_exports(struct exportlist *ep, struct exportlis uint32_t i; i = EXPHASH(&ep->ex_fs); + LOGDEBUG("fs=%s hash=%i", ep->ex_fsdir, i); SLIST_INSERT_HEAD(&exhp[i], ep, entries); } @@ -1853,7 +1976,7 @@ free_exports(struct exportlisthead *exhp) * Read the exports file(s) and call get_exportlist_one() for each line. */ static void -read_exportfile(void) +read_exportfile(int passno) { int done, i; @@ -1869,7 +1992,7 @@ read_exportfile(void) syslog(LOG_WARNING, "can't open %s", exnames[i]); continue; } - get_exportlist_one(); + get_exportlist_one(passno); fclose(exp_file); done++; } @@ -1880,6 +2003,244 @@ read_exportfile(void) } /* + * Compare the export lists against the old ones and do nmount() operations + * for any cases that have changed. This avoids doing nmount() for entries + * that have not changed. + * Return 0 upon success, 1 otherwise. + */ +static int +compare_nmount_exportlist(struct iovec *iov, int iovlen, char *errmsg) +{ + struct exportlist *ep, *oep; + struct grouplist *grp; + struct statfs fs, ofs; + int i, ret; + + /* + * Loop through the current list and look for an entry in the old + * list. + * If found, check to see if it the same. + * If it is not the same, delete and re-export. + * Then mark it done on the old list. + * else (not found) + * export it. + * Any entries left in the old list after processing must have their + * exports deleted. + */ + for (i = 0; i < exphashsize; i++) + SLIST_FOREACH(ep, &exphead[i], entries) { + LOGDEBUG("foreach ep=%s", ep->ex_fsdir); + oep = ex_search(&ep->ex_fs, oldexphead); + if (oep != NULL) { + /* + * Check the mount paths are the same. + * If not, return 1 so that the reload of the + * exports will be done in bulk, the + * passno == 0 way. + */ + LOGDEBUG("found old exp"); + if (strcmp(ep->ex_fsdir, oep->ex_fsdir) != 0) + return (1); + LOGDEBUG("same fsdir"); + /* + * Test to see if the entry is the same. + * If not the same delete exports and + * re-export. + */ + if (compare_export(ep, oep) != 0) { + /* + * Clear has_publicfh if if was set + * in the old exports, but only if it + * has not been set during processing of + * the exports for this pass, as + * indicated by has_set_publicfh. + */ + if (has_set_publicfh == 0 && + (oep->ex_flag & EX_PUBLICFH) != 0) + has_publicfh = 0; + + /* Delete and re-export. */ + if (statfs(ep->ex_fsdir, &fs) < 0) + return (1); + delete_export(iov, iovlen, &fs, errmsg); + ret = do_export_mount(ep, &fs); + if (ret != 0) + return (ret); + } + oep->ex_flag |= EX_DONE; + LOGDEBUG("exdone"); + } else { + LOGDEBUG("not found so export"); + /* Not found, so do export. */ + if (statfs(ep->ex_fsdir, &fs) < 0) + return (1); + ret = do_export_mount(ep, &fs); + if (ret != 0) + return (ret); + } + } + + /* Delete exports not done. */ + for (i = 0; i < exphashsize; i++) + SLIST_FOREACH(oep, &oldexphead[i], entries) { + if ((oep->ex_flag & EX_DONE) == 0) { + LOGDEBUG("not done delete=%s", oep->ex_fsdir); + if (statfs(oep->ex_fsdir, &ofs) >= 0 && + oep->ex_fs.val[0] == ofs.f_fsid.val[0] && + oep->ex_fs.val[1] == ofs.f_fsid.val[1]) { + LOGDEBUG("do delete"); + /* + * Clear has_publicfh if if was set + * in the old exports, but only if it + * has not been set during processing of + * the exports for this pass, as + * indicated by has_set_publicfh. + */ + if (has_set_publicfh == 0 && + (oep->ex_flag & EX_PUBLICFH) != 0) + has_publicfh = 0; + + delete_export(iov, iovlen, &ofs, + errmsg); + } + } + } + + /* Do the V4 root exports, as required. */ + grp = NULL; + if (v4root_ep != NULL) + grp = v4root_ep->ex_grphead; + v4root_phase = 2; + while (v4root_ep != NULL && grp != NULL) { + LOGDEBUG("v4root expath=%s", v4root_dirpath); + ret = do_mount(v4root_ep, grp, grp->gr_exflags, &grp->gr_anon, + v4root_dirpath, strlen(v4root_dirpath), &fs, + grp->gr_numsecflavors, grp->gr_secflavors); + if (ret != 0) { + v4root_phase = 0; + return (ret); + } + grp = grp->gr_next; + } + v4root_phase = 0; + free_v4rootexp(); + return (0); +} + +/* + * Compare old and current exportlist entries for the fsid and return 0 + * if they are the same, 1 otherwise. + */ +static int +compare_export(struct exportlist *ep, struct exportlist *oep) +{ + struct grouplist *grp, *ogrp; + + if (strcmp(ep->ex_fsdir, oep->ex_fsdir) != 0) + return (1); + if ((ep->ex_flag & EX_DEFSET) != (oep->ex_flag & EX_DEFSET)) + return (1); + if ((ep->ex_defdir != NULL && oep->ex_defdir == NULL) || + (ep->ex_defdir == NULL && oep->ex_defdir != NULL)) + return (1); + if (ep->ex_defdir != NULL && (ep->ex_defdir->dp_flag & DP_DEFSET) != + (oep->ex_defdir->dp_flag & DP_DEFSET)) + return (1); + if ((ep->ex_flag & EX_DEFSET) != 0 && (ep->ex_defnumsecflavors != + oep->ex_defnumsecflavors || ep->ex_defexflags != + oep->ex_defexflags || compare_cred(&ep->ex_defanon, + &oep->ex_defanon) != 0 || compare_secflavor(ep->ex_defsecflavors, + oep->ex_defsecflavors, ep->ex_defnumsecflavors) != 0)) + return (1); + + /* Now, check all the groups. */ + for (ogrp = oep->ex_grphead; ogrp != NULL; ogrp = ogrp->gr_next) + ogrp->gr_flag = 0; + for (grp = ep->ex_grphead; grp != NULL; grp = grp->gr_next) { + for (ogrp = oep->ex_grphead; ogrp != NULL; ogrp = + ogrp->gr_next) + if ((ogrp->gr_flag & GR_FND) == 0 && + grp->gr_numsecflavors == ogrp->gr_numsecflavors && + grp->gr_exflags == ogrp->gr_exflags && + compare_cred(&grp->gr_anon, &ogrp->gr_anon) == 0 && + compare_secflavor(grp->gr_secflavors, + ogrp->gr_secflavors, grp->gr_numsecflavors) == 0) + break; + if (ogrp != NULL) + ogrp->gr_flag |= GR_FND; + else + return (1); + } + for (ogrp = oep->ex_grphead; ogrp != NULL; ogrp = ogrp->gr_next) + if ((ogrp->gr_flag & GR_FND) == 0) + return (1); + return (0); +} + +/* + * This algorithm compares two arrays of "n" items. It returns 0 if they are + * the "same" and 1 otherwise. Although suboptimal, it is always safe to + * return 1, which makes compare_nmount_export() reload the exports entry. + * "same" refers to having the same set of values in the two arrays. + * The arrays are in no particular order and duplicates (multiple entries + * in an array with the same value) is allowed. + * The algorithm is inefficient, but the common case of indentical arrays is + * handled first and "n" is normally fairly small. + * Since the two functions need the same algorithm but for arrays of + * different types (gid_t vs int), this is done as a macro. + */ +#define COMPARE_ARRAYS(a1, a2, n) \ + do { \ + int fnd, fndarray[(n)], i, j; \ + /* Handle common case of identical arrays. */ \ + for (i = 0; i < (n); i++) \ + if ((a1)[i] != (a2)[i]) \ + break; \ + if (i == (n)) \ + return (0); \ + for (i = 0; i < (n); i++) \ + fndarray[i] = 0; \ + for (i = 0; i < (n); i++) { \ + fnd = 0; \ + for (j = 0; j < (n); j++) { \ + if ((a1)[i] == (a2)[j]) { \ + fndarray[j] = 1; \ + fnd = 1; \ + } \ + } \ + if (fnd == 0) \ + return (1); \ + } \ + for (i = 0; i < (n); i++) \ + if (fndarray[i] == 0) \ + return (1); \ + return (0); \ + } while (0) + +/* + * Compare to struct xucred's. Return 0 if the same and 1 otherwise. + */ +static int +compare_cred(struct xucred *cr0, struct xucred *cr1) +{ + + if (cr0->cr_uid != cr1->cr_uid || cr0->cr_ngroups != cr1->cr_ngroups) + return (1); + + COMPARE_ARRAYS(cr0->cr_groups, cr1->cr_groups, cr0->cr_ngroups); +} + +/* + * Compare two lists of security flavors. Return 0 if the same and 1 otherwise. + */ +static int +compare_secflavor(int *sec1, int *sec2, int nsec) +{ + + COMPARE_ARRAYS(sec1, sec2, nsec); +} + +/* * Delete an exports entry. */ static void @@ -2026,7 +2387,7 @@ add_expdir(struct dirlist **dpp, char *cp, int len) */ static void hang_dirp(struct dirlist *dp, struct grouplist *grp, struct exportlist *ep, - int flags) + int flags, struct xucred *anoncrp, int exflags) { struct hostlist *hp; struct dirlist *dp2; @@ -2037,12 +2398,15 @@ hang_dirp(struct dirlist *dp, struct grouplist *grp, s else ep->ex_defdir = dp; if (grp == (struct grouplist *)NULL) { + ep->ex_flag |= EX_DEFSET; ep->ex_defdir->dp_flag |= DP_DEFSET; /* Save the default security flavors list. */ ep->ex_defnumsecflavors = ep->ex_numsecflavors; if (ep->ex_numsecflavors > 0) memcpy(ep->ex_defsecflavors, ep->ex_secflavors, sizeof(ep->ex_secflavors)); + ep->ex_defanon = *anoncrp; + ep->ex_defexflags = exflags; } else while (grp) { hp = get_ht(); hp->ht_grp = grp; @@ -2062,7 +2426,8 @@ hang_dirp(struct dirlist *dp, struct grouplist *grp, s */ while (dp) { dp2 = dp->dp_left; - add_dlist(&ep->ex_dirl, dp, grp, flags, ep); + add_dlist(&ep->ex_dirl, dp, grp, flags, ep, anoncrp, + exflags); dp = dp2; } } @@ -2074,7 +2439,7 @@ hang_dirp(struct dirlist *dp, struct grouplist *grp, s */ static void add_dlist(struct dirlist **dpp, struct dirlist *newdp, struct grouplist *grp, - int flags, struct exportlist *ep) + int flags, struct exportlist *ep, struct xucred *anoncrp, int exflags) { struct dirlist *dp; struct hostlist *hp; @@ -2084,10 +2449,12 @@ add_dlist(struct dirlist **dpp, struct dirlist *newdp, if (dp) { cmp = strcmp(dp->dp_dirp, newdp->dp_dirp); if (cmp > 0) { - add_dlist(&dp->dp_left, newdp, grp, flags, ep); + add_dlist(&dp->dp_left, newdp, grp, flags, ep, anoncrp, + exflags); return; } else if (cmp < 0) { - add_dlist(&dp->dp_right, newdp, grp, flags, ep); + add_dlist(&dp->dp_right, newdp, grp, flags, ep, anoncrp, + exflags); return; } else free((caddr_t)newdp); @@ -2114,12 +2481,15 @@ add_dlist(struct dirlist **dpp, struct dirlist *newdp, grp = grp->gr_next; } while (grp); } else { + ep->ex_flag |= EX_DEFSET; dp->dp_flag |= DP_DEFSET; /* Save the default security flavors list. */ ep->ex_defnumsecflavors = ep->ex_numsecflavors; if (ep->ex_numsecflavors > 0) memcpy(ep->ex_defsecflavors, ep->ex_secflavors, sizeof(ep->ex_secflavors)); + ep->ex_defanon = *anoncrp; + ep->ex_defexflags = exflags; } } @@ -2485,6 +2855,19 @@ free_exp(struct exportlist *ep) } /* + * Free up the v4root exports. + */ +static void +free_v4rootexp(void) +{ + + if (v4root_ep != NULL) { + free_exp(v4root_ep); + v4root_ep = NULL; + } +} + +/* * Free hosts. */ static void @@ -2524,12 +2907,52 @@ out_of_mem(void) } /* + * Call do_mount() from the struct exportlist, for each case needed. + */ +static int +do_export_mount(struct exportlist *ep, struct statfs *fsp) +{ + struct grouplist *grp, defgrp; + int ret; + size_t dirlen; + + LOGDEBUG("do_export_mount=%s", ep->ex_fsdir); + dirlen = strlen(ep->ex_fsdir); + if ((ep->ex_flag & EX_DEFSET) != 0) { + defgrp.gr_type = GT_DEFAULT; + defgrp.gr_next = NULL; + /* We have an entry for all other hosts/nets. */ + LOGDEBUG("ex_defexflags=0x%x", ep->ex_defexflags); + ret = do_mount(ep, &defgrp, ep->ex_defexflags, &ep->ex_defanon, + ep->ex_fsdir, dirlen, fsp, ep->ex_defnumsecflavors, + ep->ex_defsecflavors); + if (ret != 0) + return (ret); + } + + /* Do a mount for each group. */ + grp = ep->ex_grphead; + while (grp != NULL) { + LOGDEBUG("do mount gr_type=0x%x gr_exflags=0x%x", + grp->gr_type, grp->gr_exflags); + ret = do_mount(ep, grp, grp->gr_exflags, &grp->gr_anon, + ep->ex_fsdir, dirlen, fsp, grp->gr_numsecflavors, + grp->gr_secflavors); + if (ret != 0) + return (ret); + grp = grp->gr_next; + } + return (0); +} + +/* * Do the nmount() syscall with the update flag to push the export info into * the kernel. */ static int do_mount(struct exportlist *ep, struct grouplist *grp, int exflags, - struct xucred *anoncrp, char *dirp, int dirplen, struct statfs *fsb) + struct xucred *anoncrp, char *dirp, int dirplen, struct statfs *fsb, + int numsecflavors, int *secflavors) { struct statfs fsb1; struct addrinfo *ai; @@ -2555,14 +2978,16 @@ do_mount(struct exportlist *ep, struct grouplist *grp, bzero(errmsg, sizeof(errmsg)); eap->ex_flags = exflags; eap->ex_anon = *anoncrp; + LOGDEBUG("do_mount exflags=0x%x", exflags); eap->ex_indexfile = ep->ex_indexfile; if (grp->gr_type == GT_HOST) ai = grp->gr_ptr.gt_addrinfo; else ai = NULL; - eap->ex_numsecflavors = ep->ex_numsecflavors; + eap->ex_numsecflavors = numsecflavors; + LOGDEBUG("do_mount numsec=%d", numsecflavors); for (i = 0; i < eap->ex_numsecflavors; i++) - eap->ex_secflavors[i] = ep->ex_secflavors[i]; + eap->ex_secflavors[i] = secflavors[i]; if (eap->ex_numsecflavors == 0) { eap->ex_numsecflavors = 1; eap->ex_secflavors[0] = AUTH_SYS; @@ -2726,8 +3151,11 @@ do_mount(struct exportlist *ep, struct grouplist *grp, else if (nfssvc(NFSSVC_PUBLICFH, (caddr_t)&fh) < 0) syslog(LOG_ERR, "Can't set public fh for %s", public_name); - else + else { has_publicfh = 1; + has_set_publicfh = 1; + ep->ex_flag |= EX_PUBLICFH; + } } skip: if (ai != NULL) Modified: stable/11/usr.sbin/mountd/pathnames.h ============================================================================== --- stable/11/usr.sbin/mountd/pathnames.h Fri Jul 5 22:36:31 2019 (r349771) +++ stable/11/usr.sbin/mountd/pathnames.h Fri Jul 5 22:48:31 2019 (r349772) @@ -34,3 +34,4 @@ #define _PATH_EXPORTS "/etc/exports" #define _PATH_RMOUNTLIST "/var/db/mountdtab" #define _PATH_MOUNTDPID "/var/run/mountd.pid" +#define _PATH_MOUNTDDEBUG "/var/log/mountd.debug" From owner-svn-src-all@freebsd.org Sat Jul 6 00:59:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECAC915D8F45; Sat, 6 Jul 2019 00:59:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B3526B1FE; Sat, 6 Jul 2019 00:59:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 468E31A41C; Sat, 6 Jul 2019 00:59:12 +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 x660xCj8051986; Sat, 6 Jul 2019 00:59:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x660xC16051985; Sat, 6 Jul 2019 00:59:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907060059.x660xC16051985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 6 Jul 2019 00:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349773 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 349773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8B3526B1FE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 00:59:13 -0000 Author: markj Date: Sat Jul 6 00:59:11 2019 New Revision: 349773 URL: https://svnweb.freebsd.org/changeset/base/349773 Log: MFC r349546: Fix mutual exclusion in pipe_direct_write(). Modified: stable/12/sys/kern/sys_pipe.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/sys_pipe.c ============================================================================== --- stable/12/sys/kern/sys_pipe.c Fri Jul 5 22:48:31 2019 (r349772) +++ stable/12/sys/kern/sys_pipe.c Sat Jul 6 00:59:11 2019 (r349773) @@ -726,7 +726,7 @@ pipe_read(struct file *fp, struct uio *uio, struct ucr rpipe->pipe_map.pos += size; rpipe->pipe_map.cnt -= size; if (rpipe->pipe_map.cnt == 0) { - rpipe->pipe_state &= ~(PIPE_DIRECTW|PIPE_WANTW); + rpipe->pipe_state &= ~PIPE_WANTW; wakeup(rpipe); } #endif @@ -857,13 +857,17 @@ pipe_build_write_buffer(struct pipe *wpipe, struct uio } /* - * unmap and unwire the process buffer + * Unwire the process buffer. */ static void pipe_destroy_write_buffer(struct pipe *wpipe) { PIPE_LOCK_ASSERT(wpipe, MA_OWNED); + KASSERT((wpipe->pipe_state & PIPE_DIRECTW) != 0, + ("%s: PIPE_DIRECTW not set on %p", __func__, wpipe)); + + wpipe->pipe_state &= ~PIPE_DIRECTW; vm_page_unhold_pages(wpipe->pipe_map.ms, wpipe->pipe_map.npages); wpipe->pipe_map.npages = 0; } @@ -882,13 +886,15 @@ pipe_clone_write_buffer(struct pipe *wpipe) int pos; PIPE_LOCK_ASSERT(wpipe, MA_OWNED); + KASSERT((wpipe->pipe_state & PIPE_DIRECTW) != 0, + ("%s: PIPE_DIRECTW not set on %p", __func__, wpipe)); + size = wpipe->pipe_map.cnt; pos = wpipe->pipe_map.pos; wpipe->pipe_buffer.in = size; wpipe->pipe_buffer.out = 0; wpipe->pipe_buffer.cnt = size; - wpipe->pipe_state &= ~PIPE_DIRECTW; PIPE_UNLOCK(wpipe); iov.iov_base = wpipe->pipe_buffer.buffer; @@ -927,7 +933,7 @@ retry: pipeunlock(wpipe); goto error1; } - while (wpipe->pipe_state & PIPE_DIRECTW) { + if (wpipe->pipe_state & PIPE_DIRECTW) { if (wpipe->pipe_state & PIPE_WANTR) { wpipe->pipe_state &= ~PIPE_WANTR; wakeup(wpipe); @@ -970,8 +976,7 @@ retry: goto error1; } - error = 0; - while (!error && (wpipe->pipe_state & PIPE_DIRECTW)) { + while (wpipe->pipe_map.cnt != 0) { if (wpipe->pipe_state & PIPE_EOF) { pipe_destroy_write_buffer(wpipe); pipeselwakeup(wpipe); @@ -989,20 +994,19 @@ retry: error = msleep(wpipe, PIPE_MTX(wpipe), PRIBIO | PCATCH, "pipdwt", 0); pipelock(wpipe, 0); + if (error != 0) + break; } if (wpipe->pipe_state & PIPE_EOF) error = EPIPE; - if (wpipe->pipe_state & PIPE_DIRECTW) { - /* - * this bit of trickery substitutes a kernel buffer for - * the process that might be going away. - */ + if (error == EINTR || error == ERESTART) pipe_clone_write_buffer(wpipe); - } else { + else pipe_destroy_write_buffer(wpipe); - } pipeunlock(wpipe); + KASSERT((wpipe->pipe_state & PIPE_DIRECTW) == 0, + ("pipe %p leaked PIPE_DIRECTW", wpipe)); return (error); error1: From owner-svn-src-all@freebsd.org Sat Jul 6 00:59:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D0EC15D8F9F; Sat, 6 Jul 2019 00:59:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6F196B32C; Sat, 6 Jul 2019 00:59:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A11281A41D; Sat, 6 Jul 2019 00:59:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x660xkrx052050; Sat, 6 Jul 2019 00:59:46 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x660xkoI052049; Sat, 6 Jul 2019 00:59:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907060059.x660xkoI052049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 6 Jul 2019 00:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349774 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 349774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E6F196B32C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 00:59:47 -0000 Author: markj Date: Sat Jul 6 00:59:46 2019 New Revision: 349774 URL: https://svnweb.freebsd.org/changeset/base/349774 Log: MFC r349546: Fix mutual exclusion in pipe_direct_write(). Modified: stable/11/sys/kern/sys_pipe.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sys_pipe.c ============================================================================== --- stable/11/sys/kern/sys_pipe.c Sat Jul 6 00:59:11 2019 (r349773) +++ stable/11/sys/kern/sys_pipe.c Sat Jul 6 00:59:46 2019 (r349774) @@ -743,7 +743,7 @@ pipe_read(fp, uio, active_cred, flags, td) rpipe->pipe_map.pos += size; rpipe->pipe_map.cnt -= size; if (rpipe->pipe_map.cnt == 0) { - rpipe->pipe_state &= ~(PIPE_DIRECTW|PIPE_WANTW); + rpipe->pipe_state &= ~PIPE_WANTW; wakeup(rpipe); } #endif @@ -876,7 +876,7 @@ pipe_build_write_buffer(wpipe, uio) } /* - * unmap and unwire the process buffer + * Unwire the process buffer. */ static void pipe_destroy_write_buffer(wpipe) @@ -884,6 +884,10 @@ pipe_destroy_write_buffer(wpipe) { PIPE_LOCK_ASSERT(wpipe, MA_OWNED); + KASSERT((wpipe->pipe_state & PIPE_DIRECTW) != 0, + ("%s: PIPE_DIRECTW not set on %p", __func__, wpipe)); + + wpipe->pipe_state &= ~PIPE_DIRECTW; vm_page_unhold_pages(wpipe->pipe_map.ms, wpipe->pipe_map.npages); wpipe->pipe_map.npages = 0; } @@ -903,13 +907,15 @@ pipe_clone_write_buffer(wpipe) int pos; PIPE_LOCK_ASSERT(wpipe, MA_OWNED); + KASSERT((wpipe->pipe_state & PIPE_DIRECTW) != 0, + ("%s: PIPE_DIRECTW not set on %p", __func__, wpipe)); + size = wpipe->pipe_map.cnt; pos = wpipe->pipe_map.pos; wpipe->pipe_buffer.in = size; wpipe->pipe_buffer.out = 0; wpipe->pipe_buffer.cnt = size; - wpipe->pipe_state &= ~PIPE_DIRECTW; PIPE_UNLOCK(wpipe); iov.iov_base = wpipe->pipe_buffer.buffer; @@ -950,7 +956,7 @@ retry: pipeunlock(wpipe); goto error1; } - while (wpipe->pipe_state & PIPE_DIRECTW) { + if (wpipe->pipe_state & PIPE_DIRECTW) { if (wpipe->pipe_state & PIPE_WANTR) { wpipe->pipe_state &= ~PIPE_WANTR; wakeup(wpipe); @@ -993,8 +999,7 @@ retry: goto error1; } - error = 0; - while (!error && (wpipe->pipe_state & PIPE_DIRECTW)) { + while (wpipe->pipe_map.cnt != 0) { if (wpipe->pipe_state & PIPE_EOF) { pipe_destroy_write_buffer(wpipe); pipeselwakeup(wpipe); @@ -1012,20 +1017,19 @@ retry: error = msleep(wpipe, PIPE_MTX(wpipe), PRIBIO | PCATCH, "pipdwt", 0); pipelock(wpipe, 0); + if (error != 0) + break; } if (wpipe->pipe_state & PIPE_EOF) error = EPIPE; - if (wpipe->pipe_state & PIPE_DIRECTW) { - /* - * this bit of trickery substitutes a kernel buffer for - * the process that might be going away. - */ + if (error == EINTR || error == ERESTART) pipe_clone_write_buffer(wpipe); - } else { + else pipe_destroy_write_buffer(wpipe); - } pipeunlock(wpipe); + KASSERT((wpipe->pipe_state & PIPE_DIRECTW) == 0, + ("pipe %p leaked PIPE_DIRECTW", wpipe)); return (error); error1: From owner-svn-src-all@freebsd.org Sat Jul 6 01:00:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 415A215D9001; Sat, 6 Jul 2019 01:00:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC3DD6B462; Sat, 6 Jul 2019 01:00:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 959751A422; Sat, 6 Jul 2019 01:00:11 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6610BTq052172; Sat, 6 Jul 2019 01:00:11 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6610Bfd052171; Sat, 6 Jul 2019 01:00:11 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907060100.x6610Bfd052171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 6 Jul 2019 01:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349775 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 349775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BC3DD6B462 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 01:00:12 -0000 Author: markj Date: Sat Jul 6 01:00:11 2019 New Revision: 349775 URL: https://svnweb.freebsd.org/changeset/base/349775 Log: MFC r349547: Use a consistent snapshot of the fd's rights in fget_mmap(). Modified: stable/12/sys/kern/kern_descrip.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_descrip.c ============================================================================== --- stable/12/sys/kern/kern_descrip.c Sat Jul 6 00:59:46 2019 (r349774) +++ stable/12/sys/kern/kern_descrip.c Sat Jul 6 01:00:11 2019 (r349775) @@ -2776,6 +2776,7 @@ fget_mmap(struct thread *td, int fd, cap_rights_t *rig if (maxprotp != NULL) *maxprotp = VM_PROT_ALL; #else + cap_rights_t fdrights; struct filedesc *fdp = td->td_proc->p_fd; seq_t seq; @@ -2784,15 +2785,18 @@ fget_mmap(struct thread *td, int fd, cap_rights_t *rig error = _fget(td, fd, fpp, 0, rightsp, &seq); if (error != 0) return (error); - /* - * If requested, convert capability rights to access flags. - */ if (maxprotp != NULL) - *maxprotp = cap_rights_to_vmprot(cap_rights(fdp, fd)); + fdrights = *cap_rights(fdp, fd); if (!fd_modified(fdp, fd, seq)) break; fdrop(*fpp, td); } + + /* + * If requested, convert capability rights to access flags. + */ + if (maxprotp != NULL) + *maxprotp = cap_rights_to_vmprot(&fdrights); #endif return (error); } From owner-svn-src-all@freebsd.org Sat Jul 6 01:00:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DC7815D904C; Sat, 6 Jul 2019 01:00:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E64586B574; Sat, 6 Jul 2019 01:00:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C16F11A423; Sat, 6 Jul 2019 01:00:28 +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 x6610Sxj052231; Sat, 6 Jul 2019 01:00:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6610SjY052230; Sat, 6 Jul 2019 01:00:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201907060100.x6610SjY052230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 6 Jul 2019 01:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349776 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 349776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E64586B574 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 01:00:29 -0000 Author: markj Date: Sat Jul 6 01:00:28 2019 New Revision: 349776 URL: https://svnweb.freebsd.org/changeset/base/349776 Log: MFC r349547: Use a consistent snapshot of the fd's rights in fget_mmap(). Modified: stable/11/sys/kern/kern_descrip.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_descrip.c ============================================================================== --- stable/11/sys/kern/kern_descrip.c Sat Jul 6 01:00:11 2019 (r349775) +++ stable/11/sys/kern/kern_descrip.c Sat Jul 6 01:00:28 2019 (r349776) @@ -2687,6 +2687,7 @@ fget_mmap(struct thread *td, int fd, cap_rights_t *rig if (maxprotp != NULL) *maxprotp = VM_PROT_ALL; #else + cap_rights_t fdrights; struct filedesc *fdp = td->td_proc->p_fd; seq_t seq; @@ -2695,15 +2696,18 @@ fget_mmap(struct thread *td, int fd, cap_rights_t *rig error = _fget(td, fd, fpp, 0, rightsp, &seq); if (error != 0) return (error); - /* - * If requested, convert capability rights to access flags. - */ if (maxprotp != NULL) - *maxprotp = cap_rights_to_vmprot(cap_rights(fdp, fd)); + fdrights = *cap_rights(fdp, fd); if (!fd_modified(fdp, fd, seq)) break; fdrop(*fpp, td); } + + /* + * If requested, convert capability rights to access flags. + */ + if (maxprotp != NULL) + *maxprotp = cap_rights_to_vmprot(&fdrights); #endif return (error); } From owner-svn-src-all@freebsd.org Sat Jul 6 06:15:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 379EA15DF722; Sat, 6 Jul 2019 06:15:05 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C25ED753B8; Sat, 6 Jul 2019 06:15:04 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95F771DA6A; Sat, 6 Jul 2019 06:15:04 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x666F4Y7019431; Sat, 6 Jul 2019 06:15:04 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x666F4LQ019429; Sat, 6 Jul 2019 06:15:04 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201907060615.x666F4LQ019429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Sat, 6 Jul 2019 06:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349777 - in head/sys: kern vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: in head/sys: kern vm X-SVN-Commit-Revision: 349777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C25ED753B8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.913,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 06:15:05 -0000 Author: dougm Date: Sat Jul 6 06:15:03 2019 New Revision: 349777 URL: https://svnweb.freebsd.org/changeset/base/349777 Log: Change blist_next_leaf_alloc so that it can examine more than one leaf after the one where the possible block allocation begins, and allocate a larger number of blocks than the current limit. This does not affect the limit on minimum allocation size, which still cannot exceed BLIST_MAX_ALLOC. Use this change to modify swp_pager_getswapspace and its callers, so that they can allocate more than BLIST_MAX_ALLOC blocks if they are available. Tested by: pho Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20579 Modified: head/sys/kern/subr_blist.c head/sys/vm/swap_pager.c Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Sat Jul 6 01:00:28 2019 (r349776) +++ head/sys/kern/subr_blist.c Sat Jul 6 06:15:03 2019 (r349777) @@ -121,6 +121,7 @@ __FBSDID("$FreeBSD$"); #define malloc(a,b,c) calloc(a, 1) #define free(a,b) free(a) #define ummin(a,b) ((a) < (b) ? (a) : (b)) +#define imin(a,b) ((a) < (b) ? (a) : (b)) #define KASSERT(a,b) assert(a) #include @@ -300,8 +301,8 @@ blist_alloc(blist_t bl, int *count, int maxcount) KASSERT(*count <= maxcount, ("invalid parameters %d > %d", *count, maxcount)); - KASSERT(maxcount <= BLIST_MAX_ALLOC, - ("allocation too large: %d", maxcount)); + KASSERT(*count <= BLIST_MAX_ALLOC, + ("minimum allocation too large: %d", *count)); /* * This loop iterates at most twice. An allocation failure in the @@ -606,58 +607,79 @@ blist_stats(blist_t bl, struct sbuf *s) */ /* - * BLST_NEXT_LEAF_ALLOC() - allocate the first few blocks in the next leaf. + * BLST_NEXT_LEAF_ALLOC() - allocate the blocks starting with the next leaf. * - * 'scan' is a leaf node, associated with a block containing 'blk'. - * The next leaf node could be adjacent, or several nodes away if the - * least common ancestor of 'scan' and its neighbor is several levels - * up. Use 'blk' to determine how many meta-nodes lie between the - * leaves. If the next leaf has enough initial bits set, clear them - * and clear the bits in the meta nodes on the path up to the least - * common ancestor to mark any subtrees made completely empty. + * 'scan' is a leaf node, and its first block is at address 'start'. The + * next leaf node could be adjacent, or several nodes away if the least + * common ancestor of 'scan' and its neighbor is several levels up. Use + * addresses to determine how many meta-nodes lie between the leaves. If + * sequence of leaves starting with the next one has enough initial bits + * set, clear them and clear the bits in the meta nodes on the path up to + * the least common ancestor to mark any subtrees made completely empty. */ static int -blst_next_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, int maxcount) +blst_next_leaf_alloc(blmeta_t *scan, daddr_t start, int count, int maxcount) { - blmeta_t *next; u_daddr_t radix; + daddr_t blk; int avail, digit; - next = scan + 1; - blk += BLIST_BMAP_RADIX; - radix = BLIST_BMAP_RADIX; - while ((next->bm_bitmap & 1) == 1 && - (digit = ((blk / radix) & BLIST_META_MASK)) == 0) { - next++; - radix *= BLIST_META_RADIX; + start += BLIST_BMAP_RADIX; + for (blk = start; blk - start < maxcount; blk += BLIST_BMAP_RADIX) { + /* Skip meta-nodes, as long as they promise more free blocks. */ + radix = BLIST_BMAP_RADIX; + while (((++scan)->bm_bitmap & 1) == 1 && + ((blk / radix) & BLIST_META_MASK) == 0) + radix *= BLIST_META_RADIX; + if (~scan->bm_bitmap != 0) { + /* + * Either there is no next leaf with any free blocks, + * or we've reached the next leaf and found that some + * of its blocks are not free. In the first case, + * bitpos() returns zero here. + */ + avail = blk - start + bitpos(~scan->bm_bitmap); + if (avail < count) { + /* + * There isn't a next leaf with enough free + * blocks at its beginning to complete the + * spanning allocation. + */ + return (avail); + } + maxcount = imin(avail, maxcount); + } } - if ((next->bm_bitmap & 1) != 1) - return (0); - avail = (~next->bm_bitmap != 0) ? - bitpos(~next->bm_bitmap) : BLIST_BMAP_RADIX; - if (avail < count) { - /* - * The next leaf doesn't have enough free blocks at the - * beginning to complete the spanning allocation. - */ - return (0); - } - count = imin(avail, maxcount); - /* Clear the first 'count' bits in the next leaf to allocate. */ - next->bm_bitmap &= ~bitrange(0, count); - + /* - * Update bitmaps of next-ancestors, up to least common ancestor. + * 'scan' is the last leaf that provides blocks. Clear from 1 to + * BLIST_BMAP_RADIX bits to represent the allocation of those last + * blocks. */ - while (next->bm_bitmap == 0) { - if (--next == scan) { + if (maxcount % BLIST_BMAP_RADIX != 0) + scan->bm_bitmap &= ~bitrange(0, maxcount % BLIST_BMAP_RADIX); + else + scan->bm_bitmap = 0; + + for (;;) { + /* Back up over meta-nodes, clearing bits if necessary. */ + blk -= BLIST_BMAP_RADIX; + radix = BLIST_BMAP_RADIX; + while ((digit = ((blk / radix) & BLIST_META_MASK)) == 0) { + if ((scan--)->bm_bitmap == 0) + scan->bm_bitmap ^= 1; + radix *= BLIST_META_RADIX; + } + if ((scan--)->bm_bitmap == 0) scan[-digit * radix_to_skip(radix)].bm_bitmap ^= (u_daddr_t)1 << digit; + + if (blk == start) break; - } - next->bm_bitmap ^= 1; - } - return (count); + /* Clear all the bits of this leaf. */ + scan->bm_bitmap = 0; + } + return (maxcount); } /* Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sat Jul 6 01:00:28 2019 (r349776) +++ head/sys/vm/swap_pager.c Sat Jul 6 06:15:03 2019 (r349777) @@ -729,7 +729,8 @@ swp_pager_getswapspace(int *io_npages, int limit) int mpages, npages; blk = SWAPBLK_NONE; - npages = mpages = *io_npages; + mpages = *io_npages; + npages = imin(BLIST_MAX_ALLOC, mpages); mtx_lock(&sw_dev_mtx); sp = swdevhd; while (!TAILQ_EMPTY(&swtailq)) { @@ -903,7 +904,7 @@ swap_pager_reserve(vm_object_t object, vm_pindex_t sta swp_pager_init_freerange(&s_free, &n_free); VM_OBJECT_WLOCK(object); for (i = 0; i < size; i += n) { - n = min(BLIST_MAX_ALLOC, size - i); + n = size - i; blk = swp_pager_getswapspace(&n, 1); if (blk == SWAPBLK_NONE) { swp_pager_meta_free(object, start, i); @@ -1382,11 +1383,8 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, struct buf *bp; daddr_t blk; - /* - * Maximum I/O size is limited by a number of factors. - */ - n = min(BLIST_MAX_ALLOC, count - i); - n = min(n, nsw_cluster_max); + /* Maximum I/O size is limited by maximum swap block size. */ + n = min(count - i, nsw_cluster_max); /* Get a block of swap of size up to size n. */ blk = swp_pager_getswapspace(&n, 4); From owner-svn-src-all@freebsd.org Sat Jul 6 15:33:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E4FB15CAA84; Sat, 6 Jul 2019 15:33:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C425B8FB86; Sat, 6 Jul 2019 15:33:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 82CCB23809; Sat, 6 Jul 2019 15:33:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FXnqc014029; Sat, 6 Jul 2019 15:33:49 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FXnMH014028; Sat, 6 Jul 2019 15:33:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061533.x66FXnMH014028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349778 - vendor/llvm/llvm-release_80-r364487 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release_80-r364487 X-SVN-Commit-Revision: 349778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C425B8FB86 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:33:50 -0000 Author: dim Date: Sat Jul 6 15:33:49 2019 New Revision: 349778 URL: https://svnweb.freebsd.org/changeset/base/349778 Log: Tag llvm release_80 branch r364487. Added: vendor/llvm/llvm-release_80-r364487/ - copied from r349777, vendor/llvm/dist-release_80/ From owner-svn-src-all@freebsd.org Sat Jul 6 15:33:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B40415CAAA7; Sat, 6 Jul 2019 15:33:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D70498FB99; Sat, 6 Jul 2019 15:33:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2A4D2380A; Sat, 6 Jul 2019 15:33:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FXrIO014083; Sat, 6 Jul 2019 15:33:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FXqC1014076; Sat, 6 Jul 2019 15:33:52 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061533.x66FXqC1014076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349779 - in vendor/clang/dist-release_80: lib/AST lib/CodeGen lib/Driver/ToolChains/Arch test/CodeGenCXX test/Driver X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist-release_80: lib/AST lib/CodeGen lib/Driver/ToolChains/Arch test/CodeGenCXX test/Driver X-SVN-Commit-Revision: 349779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D70498FB99 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:33:54 -0000 Author: dim Date: Sat Jul 6 15:33:52 2019 New Revision: 349779 URL: https://svnweb.freebsd.org/changeset/base/349779 Log: Vendor import of clang release_80 branch r364487: https://llvm.org/svn/llvm-project/cfe/branches/release_80@364487 Added: vendor/clang/dist-release_80/test/CodeGenCXX/debug-info-var-template-partial.cpp Modified: vendor/clang/dist-release_80/lib/AST/MicrosoftMangle.cpp vendor/clang/dist-release_80/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist-release_80/lib/Driver/ToolChains/Arch/PPC.cpp vendor/clang/dist-release_80/test/CodeGenCXX/char8_t.cpp vendor/clang/dist-release_80/test/CodeGenCXX/debug-info-template-member.cpp vendor/clang/dist-release_80/test/Driver/netbsd.c Modified: vendor/clang/dist-release_80/lib/AST/MicrosoftMangle.cpp ============================================================================== --- vendor/clang/dist-release_80/lib/AST/MicrosoftMangle.cpp Sat Jul 6 15:33:49 2019 (r349778) +++ vendor/clang/dist-release_80/lib/AST/MicrosoftMangle.cpp Sat Jul 6 15:33:52 2019 (r349779) @@ -1937,8 +1937,9 @@ void MicrosoftCXXNameMangler::mangleType(const Builtin // ::= _M # unsigned __int128 // ::= _N # bool // _O # - // ::= _T # __float80 (Intel) + // ::= _Q # char8_t // ::= _S # char16_t + // ::= _T # __float80 (Intel) // ::= _U # char32_t // ::= _W # wchar_t // ::= _Z # __float80 (Digital Mars) @@ -1999,6 +2000,9 @@ void MicrosoftCXXNameMangler::mangleType(const Builtin case BuiltinType::Bool: Out << "_N"; break; + case BuiltinType::Char8: + Out << "_Q"; + break; case BuiltinType::Char16: Out << "_S"; break; @@ -2094,7 +2098,6 @@ void MicrosoftCXXNameMangler::mangleType(const Builtin case BuiltinType::SatUShortFract: case BuiltinType::SatUFract: case BuiltinType::SatULongFract: - case BuiltinType::Char8: case BuiltinType::Float128: { DiagnosticsEngine &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID( Modified: vendor/clang/dist-release_80/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- vendor/clang/dist-release_80/lib/CodeGen/CGDebugInfo.cpp Sat Jul 6 15:33:49 2019 (r349778) +++ vendor/clang/dist-release_80/lib/CodeGen/CGDebugInfo.cpp Sat Jul 6 15:33:52 2019 (r349779) @@ -1817,32 +1817,24 @@ CGDebugInfo::CollectFunctionTemplateParams(const Funct } llvm::DINodeArray CGDebugInfo::CollectVarTemplateParams(const VarDecl *VL, - llvm::DIFile *Unit) { - if (auto *TS = dyn_cast(VL)) { - auto T = TS->getSpecializedTemplateOrPartial(); - auto TA = TS->getTemplateArgs().asArray(); - // Collect parameters for a partial specialization - if (T.is()) { - const TemplateParameterList *TList = - T.get() - ->getTemplateParameters(); - return CollectTemplateParams(TList, TA, Unit); - } - - // Collect parameters for an explicit specialization - if (T.is()) { - const TemplateParameterList *TList = T.get() - ->getTemplateParameters(); - return CollectTemplateParams(TList, TA, Unit); - } - } - return llvm::DINodeArray(); + llvm::DIFile *Unit) { + // Always get the full list of parameters, not just the ones from the + // specialization. A partial specialization may have fewer parameters than + // there are arguments. + auto *TS = dyn_cast(VL); + if (!TS) + return llvm::DINodeArray(); + VarTemplateDecl *T = TS->getSpecializedTemplate(); + const TemplateParameterList *TList = T->getTemplateParameters(); + auto TA = TS->getTemplateArgs().asArray(); + return CollectTemplateParams(TList, TA, Unit); } llvm::DINodeArray CGDebugInfo::CollectCXXTemplateParams( const ClassTemplateSpecializationDecl *TSpecial, llvm::DIFile *Unit) { - // Always get the full list of parameters, not just the ones from - // the specialization. + // Always get the full list of parameters, not just the ones from the + // specialization. A partial specialization may have fewer parameters than + // there are arguments. TemplateParameterList *TPList = TSpecial->getSpecializedTemplate()->getTemplateParameters(); const TemplateArgumentList &TAList = TSpecial->getTemplateArgs(); Modified: vendor/clang/dist-release_80/lib/Driver/ToolChains/Arch/PPC.cpp ============================================================================== --- vendor/clang/dist-release_80/lib/Driver/ToolChains/Arch/PPC.cpp Sat Jul 6 15:33:49 2019 (r349778) +++ vendor/clang/dist-release_80/lib/Driver/ToolChains/Arch/PPC.cpp Sat Jul 6 15:33:52 2019 (r349779) @@ -116,7 +116,7 @@ ppc::ReadGOTPtrMode ppc::getPPCReadGOTPtrMode(const Dr const ArgList &Args) { if (Args.getLastArg(options::OPT_msecure_plt)) return ppc::ReadGOTPtrMode::SecurePlt; - if (Triple.isOSOpenBSD()) + if (Triple.isOSNetBSD() || Triple.isOSOpenBSD()) return ppc::ReadGOTPtrMode::SecurePlt; else return ppc::ReadGOTPtrMode::Bss; Modified: vendor/clang/dist-release_80/test/CodeGenCXX/char8_t.cpp ============================================================================== --- vendor/clang/dist-release_80/test/CodeGenCXX/char8_t.cpp Sat Jul 6 15:33:49 2019 (r349778) +++ vendor/clang/dist-release_80/test/CodeGenCXX/char8_t.cpp Sat Jul 6 15:33:52 2019 (r349779) @@ -1,9 +1,11 @@ -// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-linux %s -o - | FileCheck %s -// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-windows %s -o - -verify +// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-linux %s -o - | FileCheck %s --check-prefix=ITANIUM +// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-windows %s -o - | FileCheck %s --check-prefix=MSABI -// CHECK: define void @_Z1fDu( -void f(char8_t c) {} // expected-error {{cannot mangle this built-in char8_t type yet}} +// ITANIUM: define void @_Z1fDu( +// MSABI: define {{.*}}void @"?f@@YAX_Q@Z"( +void f(char8_t c) {} -// CHECK: define weak_odr void @_Z1gIiEvDTplplcvT__ELA4_KDuELDu114EE +// ITANIUM: define weak_odr void @_Z1gIiEvDTplplcvT__ELA4_KDuELDu114EE( +// MSABI: define weak_odr {{.*}}void @"??$g@H@@YAXPEB_Q@Z"( template void g(decltype(T() + u8"foo" + u8'r')) {} template void g(const char8_t*); Modified: vendor/clang/dist-release_80/test/CodeGenCXX/debug-info-template-member.cpp ============================================================================== --- vendor/clang/dist-release_80/test/CodeGenCXX/debug-info-template-member.cpp Sat Jul 6 15:33:49 2019 (r349778) +++ vendor/clang/dist-release_80/test/CodeGenCXX/debug-info-template-member.cpp Sat Jul 6 15:33:52 2019 (r349779) @@ -30,7 +30,7 @@ inline int add3(int x) { // CHECK: {{![0-9]+}} = distinct !DIGlobalVariable( // CHECK-SAME: name: "var" // CHECK-SAME: templateParams: {{![0-9]+}} -// CHECK: !DITemplateTypeParameter(name: "P", type: {{![0-9]+}}) +// CHECK: !DITemplateTypeParameter(name: "T", type: {{![0-9]+}}) // CHECK: {{![0-9]+}} = distinct !DIGlobalVariable( // CHECK-SAME: name: "varray" // CHECK-SAME: templateParams: {{![0-9]+}} Added: vendor/clang/dist-release_80/test/CodeGenCXX/debug-info-var-template-partial.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist-release_80/test/CodeGenCXX/debug-info-var-template-partial.cpp Sat Jul 6 15:33:52 2019 (r349779) @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu %s -o - -debug-info-kind=limited | FileCheck %s + +template constexpr bool is_same_v = false; +template constexpr bool is_same_v = true; + +template constexpr bool is_same_v; +static_assert(is_same_v, "should get partial spec"); + +// Note that the template arguments for the instantiated variable use the +// parameter names from the primary template. The partial specialization might +// not have enough parameters. + +// CHECK: distinct !DIGlobalVariable(name: "is_same_v", linkageName: "_ZL9is_same_vIiiE", {{.*}} templateParams: ![[PARAMS:[0-9]+]]) +// CHECK: ![[PARAMS]] = !{![[LHS:[0-9]+]], ![[RHS:[0-9]+]]} +// CHECK: ![[LHS]] = !DITemplateTypeParameter(name: "LHS", type: ![[INT:[0-9]+]]) +// CHECK: ![[INT]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK: ![[RHS]] = !DITemplateTypeParameter(name: "RHS", type: ![[INT]]) Modified: vendor/clang/dist-release_80/test/Driver/netbsd.c ============================================================================== --- vendor/clang/dist-release_80/test/Driver/netbsd.c Sat Jul 6 15:33:49 2019 (r349778) +++ vendor/clang/dist-release_80/test/Driver/netbsd.c Sat Jul 6 15:33:52 2019 (r349779) @@ -446,3 +446,8 @@ // PTHREAD-NOT: _POSIX_THREADS // PTHREAD: _REENTRANT // PTHREAD-NOT: _POSIX_THREADS + +// Check PowerPC for Secure PLT +// RUN: %clang -target powerpc-unknown-netbsd -### -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=POWERPC-SECUREPLT %s +// POWERPC-SECUREPLT: "-target-feature" "+secure-plt" From owner-svn-src-all@freebsd.org Sat Jul 6 15:33:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 931DB15CAAD1; Sat, 6 Jul 2019 15:33:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36D928FC1D; Sat, 6 Jul 2019 15:33:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 839762380B; Sat, 6 Jul 2019 15:33:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FXuZB014131; Sat, 6 Jul 2019 15:33:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FXuc3014130; Sat, 6 Jul 2019 15:33:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061533.x66FXuc3014130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349780 - vendor/clang/clang-release_80-r364487 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release_80-r364487 X-SVN-Commit-Revision: 349780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 36D928FC1D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:33:59 -0000 Author: dim Date: Sat Jul 6 15:33:56 2019 New Revision: 349780 URL: https://svnweb.freebsd.org/changeset/base/349780 Log: Tag clang release_80 branch r364487. Added: vendor/clang/clang-release_80-r364487/ - copied from r349779, vendor/clang/dist-release_80/ From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9570115CAAF4; Sat, 6 Jul 2019 15:34:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37C028FC7E; Sat, 6 Jul 2019 15:34:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47C5D2380D; Sat, 6 Jul 2019 15:34:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FY2XI014230; Sat, 6 Jul 2019 15:34:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FY2pf014229; Sat, 6 Jul 2019 15:34:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061534.x66FY2pf014229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349782 - vendor/libc++/libc++-release_80-r364487 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release_80-r364487 X-SVN-Commit-Revision: 349782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 37C028FC7E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:03 -0000 Author: dim Date: Sat Jul 6 15:34:01 2019 New Revision: 349782 URL: https://svnweb.freebsd.org/changeset/base/349782 Log: Tag libc++ release_80 branch r364487. Added: vendor/libc++/libc++-release_80-r364487/ - copied from r349781, vendor/libc++/dist-release_80/ From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 895D915CAAF3; Sat, 6 Jul 2019 15:34:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E2DE8FC7D; Sat, 6 Jul 2019 15:34:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4EFCC2380C; Sat, 6 Jul 2019 15:33:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FXxTt014177; Sat, 6 Jul 2019 15:33:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FXxUB014176; Sat, 6 Jul 2019 15:33:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061533.x66FXxUB014176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349781 - vendor/compiler-rt/compiler-rt-release_80-r364487 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release_80-r364487 X-SVN-Commit-Revision: 349781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E2DE8FC7D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:03 -0000 Author: dim Date: Sat Jul 6 15:33:58 2019 New Revision: 349781 URL: https://svnweb.freebsd.org/changeset/base/349781 Log: Tag compiler-rt release_80 branch r364487. Added: vendor/compiler-rt/compiler-rt-release_80-r364487/ - copied from r349780, vendor/compiler-rt/dist-release_80/ From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EC3715CAB39; Sat, 6 Jul 2019 15:34:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E60C68FD01; Sat, 6 Jul 2019 15:34:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF7AE2380E; Sat, 6 Jul 2019 15:34:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FY4gu014278; Sat, 6 Jul 2019 15:34:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FY4Zg014277; Sat, 6 Jul 2019 15:34:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061534.x66FY4Zg014277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349783 - vendor/llvm-libunwind/dist-release_80/src X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-libunwind/dist-release_80/src X-SVN-Commit-Revision: 349783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E60C68FD01 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.934,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:09 -0000 Author: dim Date: Sat Jul 6 15:34:04 2019 New Revision: 349783 URL: https://svnweb.freebsd.org/changeset/base/349783 Log: Vendor import of LLVM libunwind release_80 branch r364487: https://llvm.org/svn/llvm-project/libunwind/branches/release_80@364487 Modified: vendor/llvm-libunwind/dist-release_80/src/DwarfInstructions.hpp vendor/llvm-libunwind/dist-release_80/src/assembly.h Modified: vendor/llvm-libunwind/dist-release_80/src/DwarfInstructions.hpp ============================================================================== --- vendor/llvm-libunwind/dist-release_80/src/DwarfInstructions.hpp Sat Jul 6 15:34:01 2019 (r349782) +++ vendor/llvm-libunwind/dist-release_80/src/DwarfInstructions.hpp Sat Jul 6 15:34:04 2019 (r349783) @@ -234,6 +234,31 @@ int DwarfInstructions::stepWithDwarf(A &addressS } #endif +#if defined(_LIBUNWIND_TARGET_PPC64) +#define PPC64_ELFV1_R2_LOAD_INST_ENCODING 0xe8410028u // ld r2,40(r1) +#define PPC64_ELFV1_R2_OFFSET 40 +#define PPC64_ELFV2_R2_LOAD_INST_ENCODING 0xe8410018u // ld r2,24(r1) +#define PPC64_ELFV2_R2_OFFSET 24 + // If the instruction at return address is a TOC (r2) restore, + // then r2 was saved and needs to be restored. + // ELFv2 ABI specifies that the TOC Pointer must be saved at SP + 24, + // while in ELFv1 ABI it is saved at SP + 40. + if (R::getArch() == REGISTERS_PPC64 && returnAddress != 0) { + pint_t sp = newRegisters.getRegister(UNW_REG_SP); + pint_t r2 = 0; + switch (addressSpace.get32(returnAddress)) { + case PPC64_ELFV1_R2_LOAD_INST_ENCODING: + r2 = addressSpace.get64(sp + PPC64_ELFV1_R2_OFFSET); + break; + case PPC64_ELFV2_R2_LOAD_INST_ENCODING: + r2 = addressSpace.get64(sp + PPC64_ELFV2_R2_OFFSET); + break; + } + if (r2) + newRegisters.setRegister(UNW_PPC64_R2, r2); + } +#endif + // Return address is address after call site instruction, so setting IP to // that does simualates a return. newRegisters.setIP(returnAddress); Modified: vendor/llvm-libunwind/dist-release_80/src/assembly.h ============================================================================== --- vendor/llvm-libunwind/dist-release_80/src/assembly.h Sat Jul 6 15:34:01 2019 (r349782) +++ vendor/llvm-libunwind/dist-release_80/src/assembly.h Sat Jul 6 15:34:04 2019 (r349783) @@ -35,6 +35,20 @@ #define SEPARATOR ; #endif +#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) +#define PPC64_OPD1 .section .opd,"aw",@progbits SEPARATOR +#define PPC64_OPD2 SEPARATOR \ + .p2align 3 SEPARATOR \ + .quad .Lfunc_begin0 SEPARATOR \ + .quad .TOC.@tocbase SEPARATOR \ + .quad 0 SEPARATOR \ + .text SEPARATOR \ +.Lfunc_begin0: +#else +#define PPC64_OPD1 +#define PPC64_OPD2 +#endif + #define GLUE2(a, b) a ## b #define GLUE(a, b) GLUE2(a, b) #define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name) @@ -95,7 +109,9 @@ .globl SYMBOL_NAME(name) SEPARATOR \ EXPORT_SYMBOL(name) SEPARATOR \ SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \ - SYMBOL_NAME(name): + PPC64_OPD1 \ + SYMBOL_NAME(name): \ + PPC64_OPD2 #define DEFINE_LIBUNWIND_PRIVATE_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B69A15CAB69; Sat, 6 Jul 2019 15:34:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9247A8FD88; Sat, 6 Jul 2019 15:34:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49B7A23810; Sat, 6 Jul 2019 15:34:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FYAJL014375; Sat, 6 Jul 2019 15:34:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FY9CB014373; Sat, 6 Jul 2019 15:34:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061534.x66FY9CB014373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349785 - in vendor/lld/dist-release_80: ELF/Arch test/ELF X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lld/dist-release_80: ELF/Arch test/ELF X-SVN-Commit-Revision: 349785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9247A8FD88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:15 -0000 Author: dim Date: Sat Jul 6 15:34:09 2019 New Revision: 349785 URL: https://svnweb.freebsd.org/changeset/base/349785 Log: Vendor import of lld release_80 branch r364487: https://llvm.org/svn/llvm-project/lld/branches/release_80@364487 Added: vendor/lld/dist-release_80/test/ELF/ppc64-long-branch-localentry-offset.s Modified: vendor/lld/dist-release_80/ELF/Arch/PPC64.cpp Modified: vendor/lld/dist-release_80/ELF/Arch/PPC64.cpp ============================================================================== --- vendor/lld/dist-release_80/ELF/Arch/PPC64.cpp Sat Jul 6 15:34:07 2019 (r349784) +++ vendor/lld/dist-release_80/ELF/Arch/PPC64.cpp Sat Jul 6 15:34:09 2019 (r349785) @@ -757,7 +757,10 @@ bool PPC64::needsThunk(RelExpr Expr, RelType Type, con // If the offset exceeds the range of the branch type then it will need // a range-extending thunk. - return !inBranchRange(Type, BranchAddr, S.getVA()); + // See the comment in getRelocTargetVA() about R_PPC64_CALL. + return !inBranchRange(Type, BranchAddr, + S.getVA() + + getPPC64GlobalEntryToLocalEntryOffset(S.StOther)); } uint32_t PPC64::getThunkSectionSpacing() const { Added: vendor/lld/dist-release_80/test/ELF/ppc64-long-branch-localentry-offset.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_80/test/ELF/ppc64-long-branch-localentry-offset.s Sat Jul 6 15:34:09 2019 (r349785) @@ -0,0 +1,30 @@ +# REQUIRES: ppc + +# RUN: llvm-mc -filetype=obj -triple=ppc64le %s -o %t.o +# RUN: ld.lld %t.o -o %t +# RUN: llvm-nm %t | FileCheck %s + +# CHECK-DAG: 0000000010010000 t __long_branch_callee +# CHECK-DAG: 0000000010010010 T _start +# CHECK-DAG: 0000000012010008 T callee + +# The bl instruction jumps to the local entry. The distance requires a long branch stub: +# localentry(callee) - _start = 0x12010008+8 - 0x10010010 = 0x2000000 + +# We used to compute globalentry(callee) - _start and caused a "R_PPC64_REL24 +# out of range" error because we didn't create the stub. + +.globl _start +_start: + bl callee + +.space 0x1fffff4 + +.globl callee +callee: +.Lgep0: + addis 2, 12, .TOC.-.Lgep0@ha + addi 2, 2, .TOC.-.Lgep0@l +.Llep0: + .localentry callee, .Llep0-.Lgep0 + blr From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D31B15CAB62; Sat, 6 Jul 2019 15:34:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38DF58FD67; Sat, 6 Jul 2019 15:34:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A60662380F; Sat, 6 Jul 2019 15:34:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FY7s3014327; Sat, 6 Jul 2019 15:34:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FY78D014326; Sat, 6 Jul 2019 15:34:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061534.x66FY78D014326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349784 - vendor/llvm-libunwind/libunwind-release_80-r364487 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-libunwind/libunwind-release_80-r364487 X-SVN-Commit-Revision: 349784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 38DF58FD67 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:13 -0000 Author: dim Date: Sat Jul 6 15:34:07 2019 New Revision: 349784 URL: https://svnweb.freebsd.org/changeset/base/349784 Log: Tag LLVM libunwind release_80 branch r364487. Added: vendor/llvm-libunwind/libunwind-release_80-r364487/ - copied from r349783, vendor/llvm-libunwind/dist-release_80/ From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D0A115CABD3; Sat, 6 Jul 2019 15:34:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89B0F8FD86; Sat, 6 Jul 2019 15:34:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0858323811; Sat, 6 Jul 2019 15:34:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FYCG1014421; Sat, 6 Jul 2019 15:34:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FYCEx014420; Sat, 6 Jul 2019 15:34:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061534.x66FYCEx014420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:34:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349786 - vendor/lld/lld-release_80-r364487 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release_80-r364487 X-SVN-Commit-Revision: 349786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 89B0F8FD86 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:36 -0000 Author: dim Date: Sat Jul 6 15:34:12 2019 New Revision: 349786 URL: https://svnweb.freebsd.org/changeset/base/349786 Log: Tag lld release_80 branch r364487. Added: vendor/lld/lld-release_80-r364487/ - copied from r349785, vendor/lld/dist-release_80/ From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B96C15CAC00; Sat, 6 Jul 2019 15:34:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C0828FE25; Sat, 6 Jul 2019 15:34:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D40BA23813; Sat, 6 Jul 2019 15:34:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FYFqc014472; Sat, 6 Jul 2019 15:34:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FYFtf014470; Sat, 6 Jul 2019 15:34:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061534.x66FYFtf014470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349787 - in vendor/lldb/dist-release_80/lit: . Driver X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lldb/dist-release_80/lit: . Driver X-SVN-Commit-Revision: 349787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7C0828FE25 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:45 -0000 Author: dim Date: Sat Jul 6 15:34:15 2019 New Revision: 349787 URL: https://svnweb.freebsd.org/changeset/base/349787 Log: Vendor import of lldb release_80 branch r364487: https://llvm.org/svn/llvm-project/lldb/branches/release_80@364487 Modified: vendor/lldb/dist-release_80/lit/Driver/TestConvenienceVariables.test vendor/lldb/dist-release_80/lit/lit.cfg.py Modified: vendor/lldb/dist-release_80/lit/Driver/TestConvenienceVariables.test ============================================================================== --- vendor/lldb/dist-release_80/lit/Driver/TestConvenienceVariables.test Sat Jul 6 15:34:12 2019 (r349786) +++ vendor/lldb/dist-release_80/lit/Driver/TestConvenienceVariables.test Sat Jul 6 15:34:15 2019 (r349787) @@ -1,3 +1,4 @@ +REQUIRES: python RUN: %build %p/Inputs/hello.cpp -o %t RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s @@ -19,4 +20,4 @@ CHECK: 8 CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename() CHECK: hello.c CHECK: script lldb.frame.GetFunctionName() -CHECK: main \ No newline at end of file +CHECK: main Modified: vendor/lldb/dist-release_80/lit/lit.cfg.py ============================================================================== --- vendor/lldb/dist-release_80/lit/lit.cfg.py Sat Jul 6 15:34:12 2019 (r349786) +++ vendor/lldb/dist-release_80/lit/lit.cfg.py Sat Jul 6 15:34:15 2019 (r349787) @@ -73,3 +73,6 @@ for i in ['module-cache-clang', 'module-cache-lldb']: if os.path.isdir(cachedir): print("Deleting module cache at %s."%cachedir) shutil.rmtree(cachedir) + +if not config.lldb_disable_python: + config.available_features.add('python') From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFC4215CAC15; Sat, 6 Jul 2019 15:34:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22CB98FE69; Sat, 6 Jul 2019 15:34:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92E3923815; Sat, 6 Jul 2019 15:34:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FYIGh014518; Sat, 6 Jul 2019 15:34:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FYIT0014517; Sat, 6 Jul 2019 15:34:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061534.x66FYIT0014517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349788 - vendor/lldb/lldb-release_80-r364487 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release_80-r364487 X-SVN-Commit-Revision: 349788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 22CB98FE69 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:48 -0000 Author: dim Date: Sat Jul 6 15:34:18 2019 New Revision: 349788 URL: https://svnweb.freebsd.org/changeset/base/349788 Log: Tag lldb release_80 branch r364487. Added: vendor/lldb/lldb-release_80-r364487/ - copied from r349787, vendor/lldb/dist-release_80/ From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13DF615CAC56; Sat, 6 Jul 2019 15:34:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19ACC8FEAA; Sat, 6 Jul 2019 15:34:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44E6023816; Sat, 6 Jul 2019 15:34:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FYLAh014570; Sat, 6 Jul 2019 15:34:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FYKic014568; Sat, 6 Jul 2019 15:34:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061534.x66FYKic014568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349789 - vendor/llvm-openmp/dist-release_80/runtime/src X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-openmp/dist-release_80/runtime/src X-SVN-Commit-Revision: 349789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 19ACC8FEAA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:52 -0000 Author: dim Date: Sat Jul 6 15:34:20 2019 New Revision: 349789 URL: https://svnweb.freebsd.org/changeset/base/349789 Log: Vendor import of LLVM openmp release_80 branch r364487: https://llvm.org/svn/llvm-project/openmp/branches/release_80@364487 Modified: vendor/llvm-openmp/dist-release_80/runtime/src/kmp_atomic.h vendor/llvm-openmp/dist-release_80/runtime/src/kmp_csupport.cpp vendor/llvm-openmp/dist-release_80/runtime/src/ompt-specific.cpp Modified: vendor/llvm-openmp/dist-release_80/runtime/src/kmp_atomic.h ============================================================================== --- vendor/llvm-openmp/dist-release_80/runtime/src/kmp_atomic.h Sat Jul 6 15:34:18 2019 (r349788) +++ vendor/llvm-openmp/dist-release_80/runtime/src/kmp_atomic.h Sat Jul 6 15:34:20 2019 (r349789) @@ -364,7 +364,7 @@ static inline void __kmp_acquire_atomic_lock(kmp_atomi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( - ompt_mutex_atomic, 0, kmp_mutex_impl_queuing, (ompt_wait_id_t)lck, + ompt_mutex_atomic, 0, kmp_mutex_impl_queuing, (ompt_wait_id_t)(uintptr_t)lck, OMPT_GET_RETURN_ADDRESS(0)); } #endif @@ -374,7 +374,7 @@ static inline void __kmp_acquire_atomic_lock(kmp_atomi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0)); + ompt_mutex_atomic, (ompt_wait_id_t)(uintptr_t)lck, OMPT_GET_RETURN_ADDRESS(0)); } #endif } @@ -390,7 +390,7 @@ static inline void __kmp_release_atomic_lock(kmp_atomi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0)); + ompt_mutex_atomic, (ompt_wait_id_t)(uintptr_t)lck, OMPT_GET_RETURN_ADDRESS(0)); } #endif } Modified: vendor/llvm-openmp/dist-release_80/runtime/src/kmp_csupport.cpp ============================================================================== --- vendor/llvm-openmp/dist-release_80/runtime/src/kmp_csupport.cpp Sat Jul 6 15:34:18 2019 (r349788) +++ vendor/llvm-openmp/dist-release_80/runtime/src/kmp_csupport.cpp Sat Jul 6 15:34:20 2019 (r349789) @@ -848,7 +848,7 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) { if (ompt_enabled.enabled) { OMPT_STORE_RETURN_ADDRESS(gtid); team = __kmp_team_from_gtid(gtid); - lck = (ompt_wait_id_t)&team->t.t_ordered.dt.t_value; + lck = (ompt_wait_id_t)(uintptr_t)&team->t.t_ordered.dt.t_value; /* OMPT state update */ th->th.ompt_thread_info.wait_id = lck; th->th.ompt_thread_info.state = ompt_state_wait_ordered; @@ -857,8 +857,8 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) { codeptr_ra = OMPT_LOAD_RETURN_ADDRESS(gtid); if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( - ompt_mutex_ordered, omp_lock_hint_none, kmp_mutex_impl_spin, - (ompt_wait_id_t)lck, codeptr_ra); + ompt_mutex_ordered, omp_lock_hint_none, kmp_mutex_impl_spin, lck, + codeptr_ra); } } #endif @@ -877,7 +877,7 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) { /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_ordered, (ompt_wait_id_t)lck, codeptr_ra); + ompt_mutex_ordered, (ompt_wait_id_t)(uintptr_t)lck, codeptr_ra); } } #endif @@ -917,7 +917,8 @@ void __kmpc_end_ordered(ident_t *loc, kmp_int32 gtid) if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( ompt_mutex_ordered, - (ompt_wait_id_t)&__kmp_team_from_gtid(gtid)->t.t_ordered.dt.t_value, + (ompt_wait_id_t)(uintptr_t)&__kmp_team_from_gtid(gtid) + ->t.t_ordered.dt.t_value, OMPT_LOAD_RETURN_ADDRESS(gtid)); } #endif @@ -1188,7 +1189,7 @@ void __kmpc_critical(ident_t *loc, kmp_int32 global_ti ti = __kmp_threads[global_tid]->th.ompt_thread_info; /* OMPT state update */ prev_state = ti.state; - ti.wait_id = (ompt_wait_id_t)lck; + ti.wait_id = (ompt_wait_id_t)(uintptr_t)lck; ti.state = ompt_state_wait_critical; /* OMPT event callback */ @@ -1196,7 +1197,7 @@ void __kmpc_critical(ident_t *loc, kmp_int32 global_ti if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_critical, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)crit, codeptr_ra); + (ompt_wait_id_t)(uintptr_t)lck, codeptr_ra); } } #endif @@ -1216,7 +1217,7 @@ void __kmpc_critical(ident_t *loc, kmp_int32 global_ti /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_critical, (ompt_wait_id_t)crit, codeptr_ra); + ompt_mutex_critical, (ompt_wait_id_t)(uintptr_t)lck, codeptr_ra); } } #endif @@ -1402,14 +1403,15 @@ void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 ti = __kmp_threads[global_tid]->th.ompt_thread_info; /* OMPT state update */ prev_state = ti.state; - ti.wait_id = (ompt_wait_id_t)lck; + ti.wait_id = (ompt_wait_id_t)(uintptr_t)lck; ti.state = ompt_state_wait_critical; /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_critical, (unsigned int)hint, - __ompt_get_mutex_impl_type(crit), (ompt_wait_id_t)crit, codeptr); + __ompt_get_mutex_impl_type(crit), (ompt_wait_id_t)(uintptr_t)lck, + codeptr); } } #endif @@ -1440,14 +1442,15 @@ void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 ti = __kmp_threads[global_tid]->th.ompt_thread_info; /* OMPT state update */ prev_state = ti.state; - ti.wait_id = (ompt_wait_id_t)lck; + ti.wait_id = (ompt_wait_id_t)(uintptr_t)lck; ti.state = ompt_state_wait_critical; /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_critical, (unsigned int)hint, - __ompt_get_mutex_impl_type(0, ilk), (ompt_wait_id_t)crit, codeptr); + __ompt_get_mutex_impl_type(0, ilk), (ompt_wait_id_t)(uintptr_t)lck, + codeptr); } } #endif @@ -1467,7 +1470,7 @@ void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_critical, (ompt_wait_id_t)crit, codeptr); + ompt_mutex_critical, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } #endif @@ -1565,7 +1568,8 @@ void __kmpc_end_critical(ident_t *loc, kmp_int32 globa OMPT_STORE_RETURN_ADDRESS(global_tid); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_critical, (ompt_wait_id_t)crit, OMPT_LOAD_RETURN_ADDRESS(0)); + ompt_mutex_critical, (ompt_wait_id_t)(uintptr_t)lck, + OMPT_LOAD_RETURN_ADDRESS(0)); } #endif @@ -2189,8 +2193,8 @@ void __kmpc_init_lock_with_hint(ident_t *loc, kmp_int3 if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_lock, (omp_lock_hint_t)hint, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif } @@ -2213,8 +2217,8 @@ void __kmpc_init_nest_lock_with_hint(ident_t *loc, kmp if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_nest_lock, (omp_lock_hint_t)hint, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif } @@ -2239,8 +2243,8 @@ void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid, vo if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2282,7 +2286,7 @@ void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid, vo if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)user_lock, codeptr); + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2311,8 +2315,8 @@ void __kmpc_init_nest_lock(ident_t *loc, kmp_int32 gti if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2357,7 +2361,7 @@ void __kmpc_init_nest_lock(ident_t *loc, kmp_int32 gti if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_nest_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)user_lock, codeptr); + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2393,7 +2397,7 @@ void __kmpc_destroy_lock(ident_t *loc, kmp_int32 gtid, lck = (kmp_user_lock_p)user_lock; } ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock); @@ -2421,7 +2425,7 @@ void __kmpc_destroy_lock(ident_t *loc, kmp_int32 gtid, codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2461,7 +2465,7 @@ void __kmpc_destroy_nest_lock(ident_t *loc, kmp_int32 codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock); @@ -2493,7 +2497,7 @@ void __kmpc_destroy_nest_lock(ident_t *loc, kmp_int32 codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2538,8 +2542,8 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, voi if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif #if KMP_USE_INLINED_TAS @@ -2560,7 +2564,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, voi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2593,7 +2597,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, voi if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)lck, codeptr); + (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -2606,7 +2610,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, voi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -2628,8 +2632,8 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } } #endif @@ -2646,13 +2650,14 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, + codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_begin, (ompt_wait_id_t)user_lock, codeptr); + ompt_scope_begin, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } } } @@ -2690,7 +2695,8 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(), (ompt_wait_id_t)lck, codeptr); + __ompt_get_mutex_impl_type(), (ompt_wait_id_t)(uintptr_t)lck, + codeptr); } } #endif @@ -2707,13 +2713,13 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_begin, (ompt_wait_id_t)lck, codeptr); + ompt_scope_begin, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } } @@ -2749,7 +2755,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, v codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2778,7 +2784,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, v codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -2810,7 +2816,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, v codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -2838,12 +2844,13 @@ void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gt if (ompt_enabled.ompt_callback_mutex_released) { // release_lock_last ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, + codeptr); } } else if (ompt_enabled.ompt_callback_nest_lock) { // release_lock_prev ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_end, (ompt_wait_id_t)user_lock, codeptr); + ompt_scope_end, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } } #endif @@ -2887,12 +2894,12 @@ void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gt if (ompt_enabled.ompt_callback_mutex_released) { // release_lock_last ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } else if (ompt_enabled.ompt_callback_nest_lock) { // release_lock_previous ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_mutex_scope_end, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_scope_end, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } #endif @@ -2929,12 +2936,12 @@ void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gt if (ompt_enabled.ompt_callback_mutex_released) { // release_lock_last ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } else if (ompt_enabled.ompt_callback_nest_lock) { // release_lock_previous ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_mutex_scope_end, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_scope_end, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } #endif @@ -2960,8 +2967,8 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, voi if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif #if KMP_USE_INLINED_TAS @@ -2983,7 +2990,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, voi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif return FTN_TRUE; @@ -3024,7 +3031,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, voi if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)lck, codeptr); + (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -3039,7 +3046,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, voi #if OMPT_SUPPORT && OMPT_OPTIONAL if (rc && ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -3065,8 +3072,8 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif rc = KMP_D_LOCK_FUNC(user_lock, test)((kmp_dyna_lock_t *)user_lock, gtid); @@ -3083,13 +3090,14 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, + codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_begin, (ompt_wait_id_t)user_lock, codeptr); + ompt_scope_begin, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } } } @@ -3130,7 +3138,8 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(), (ompt_wait_id_t)lck, codeptr); + __ompt_get_mutex_impl_type(), (ompt_wait_id_t)(uintptr_t)lck, + codeptr); } #endif @@ -3148,13 +3157,13 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_mutex_scope_begin, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_scope_begin, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } } Modified: vendor/llvm-openmp/dist-release_80/runtime/src/ompt-specific.cpp ============================================================================== --- vendor/llvm-openmp/dist-release_80/runtime/src/ompt-specific.cpp Sat Jul 6 15:34:18 2019 (r349788) +++ vendor/llvm-openmp/dist-release_80/runtime/src/ompt-specific.cpp Sat Jul 6 15:34:20 2019 (r349789) @@ -211,7 +211,7 @@ ompt_data_t *__ompt_get_thread_data_internal() { void __ompt_thread_assign_wait_id(void *variable) { kmp_info_t *ti = ompt_get_thread(); - ti->th.ompt_thread_info.wait_id = (ompt_wait_id_t)variable; + ti->th.ompt_thread_info.wait_id = (ompt_wait_id_t)(uintptr_t)variable; } int __ompt_get_state_internal(ompt_wait_id_t *omp_wait_id) { From owner-svn-src-all@freebsd.org Sat Jul 6 15:34:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A2AB15CAC7E; Sat, 6 Jul 2019 15:34:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 606E38FF0D; Sat, 6 Jul 2019 15:34:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1093A23818; Sat, 6 Jul 2019 15:34:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FYNlG014616; Sat, 6 Jul 2019 15:34:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FYNc8014615; Sat, 6 Jul 2019 15:34:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061534.x66FYNc8014615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 15:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r349790 - vendor/llvm-openmp/openmp-release_80-r364487 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-openmp/openmp-release_80-r364487 X-SVN-Commit-Revision: 349790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 606E38FF0D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:34:57 -0000 Author: dim Date: Sat Jul 6 15:34:23 2019 New Revision: 349790 URL: https://svnweb.freebsd.org/changeset/base/349790 Log: Tag LLVM openmp release_80 branch r364487. Added: vendor/llvm-openmp/openmp-release_80-r364487/ - copied from r349789, vendor/llvm-openmp/dist-release_80/ From owner-svn-src-all@freebsd.org Sat Jul 6 15:55:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08E2215CB629; Sat, 6 Jul 2019 15:55:18 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CB3B6A9D4; Sat, 6 Jul 2019 15:55:17 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C06423B7E; Sat, 6 Jul 2019 15:55:17 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66FtHfG025317; Sat, 6 Jul 2019 15:55:17 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66FtGsg025314; Sat, 6 Jul 2019 15:55:16 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201907061555.x66FtGsg025314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Sat, 6 Jul 2019 15:55:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349791 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9CB3B6A9D4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 15:55:18 -0000 Author: dougm Date: Sat Jul 6 15:55:16 2019 New Revision: 349791 URL: https://svnweb.freebsd.org/changeset/base/349791 Log: Fix style(9) violations involving division by PAGE_SIZE. Reviewed by: alc Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20847 Modified: head/sys/vm/swap_pager.c head/sys/vm/vm_pageout.c head/sys/vm/vnode_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sat Jul 6 15:34:23 2019 (r349790) +++ head/sys/vm/swap_pager.c Sat Jul 6 15:55:16 2019 (r349791) @@ -523,7 +523,7 @@ swap_pager_swap_init(void) * but it isn't very efficient). * * The nsw_cluster_max is constrained by the bp->b_pages[] - * array (MAXPHYS/PAGE_SIZE) and our locally defined + * array MAXPHYS / PAGE_SIZE and our locally defined * MAX_PAGEOUT_CLUSTER. Also be aware that swap ops are * constrained by the swap device interleave stripe size. * @@ -538,7 +538,7 @@ swap_pager_swap_init(void) * have one NFS swap device due to the command/ack latency over NFS. * So it all works out pretty well. */ - nsw_cluster_max = min((MAXPHYS/PAGE_SIZE), MAX_PAGEOUT_CLUSTER); + nsw_cluster_max = min(MAXPHYS / PAGE_SIZE, MAX_PAGEOUT_CLUSTER); nsw_wcount_async = 4; nsw_wcount_async_max = nsw_wcount_async; Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Jul 6 15:34:23 2019 (r349790) +++ head/sys/vm/vm_pageout.c Sat Jul 6 15:55:16 2019 (r349791) @@ -1972,7 +1972,7 @@ vm_pageout_init_domain(int domain) vmd->vmd_free_min = 4 + (vmd->vmd_page_count - 1024) / 200; else vmd->vmd_free_min = 4; - vmd->vmd_pageout_free_min = (2*MAXBSIZE)/PAGE_SIZE + + vmd->vmd_pageout_free_min = 2 * MAXBSIZE / PAGE_SIZE + vmd->vmd_interrupt_free_min; vmd->vmd_free_reserved = vm_pageout_page_count + vmd->vmd_pageout_free_min + (vmd->vmd_page_count / 768); Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sat Jul 6 15:34:23 2019 (r349790) +++ head/sys/vm/vnode_pager.c Sat Jul 6 15:55:16 2019 (r349791) @@ -544,8 +544,8 @@ vnode_pager_addr(struct vnode *vp, vm_ooffset_t addres *rtaddress += voffset / DEV_BSIZE; if (run) { *run += 1; - *run *= bsize/PAGE_SIZE; - *run -= voffset/PAGE_SIZE; + *run *= bsize / PAGE_SIZE; + *run -= voffset / PAGE_SIZE; } } From owner-svn-src-all@freebsd.org Sat Jul 6 16:19:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1701115CBDF9; Sat, 6 Jul 2019 16:19:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9FB76B626; Sat, 6 Jul 2019 16:19:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7752823EE6; Sat, 6 Jul 2019 16:19:04 +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 x66GJ4Ro036266; Sat, 6 Jul 2019 16:19:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66GJ4D2036265; Sat, 6 Jul 2019 16:19:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907061619.x66GJ4D2036265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 6 Jul 2019 16:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349792 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 349792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A9FB76B626 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.908,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 16:19:05 -0000 Author: kib Date: Sat Jul 6 16:19:04 2019 New Revision: 349792 URL: https://svnweb.freebsd.org/changeset/base/349792 Log: MFC r349608: Use traditional 'p' local to designate td->td_proc in kern_mmap. Modified: stable/12/sys/vm/vm_mmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_mmap.c ============================================================================== --- stable/12/sys/vm/vm_mmap.c Sat Jul 6 15:55:16 2019 (r349791) +++ stable/12/sys/vm/vm_mmap.c Sat Jul 6 16:19:04 2019 (r349792) @@ -187,13 +187,15 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s { struct vmspace *vms; struct file *fp; + struct proc *p; vm_offset_t addr; vm_size_t pageoff; vm_prot_t cap_maxprot; int align, error; cap_rights_t rights; - vms = td->td_proc->p_vmspace; + p = td->td_proc; + vms = p->p_vmspace; fp = NULL; AUDIT_ARG_FD(fd); addr = addr0; @@ -213,7 +215,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s * pos. */ if (!SV_CURPROC_FLAG(SV_AOUT)) { - if ((size == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) || + if ((size == 0 && p->p_osrel >= P_OSREL_MAP_ANON) || ((flags & MAP_ANON) != 0 && (fd != -1 || pos != 0))) return (EINVAL); } else { @@ -356,7 +358,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t s if (error != 0) goto done; if ((flags & (MAP_SHARED | MAP_PRIVATE)) == 0 && - td->td_proc->p_osrel >= P_OSREL_MAP_FSTRICT) { + p->p_osrel >= P_OSREL_MAP_FSTRICT) { error = EINVAL; goto done; } From owner-svn-src-all@freebsd.org Sat Jul 6 17:49:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17F6415CDD7A; Sat, 6 Jul 2019 17:49:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 526A76EC92; Sat, 6 Jul 2019 17:49:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 0E57D43A27F; Sun, 7 Jul 2019 03:48:59 +1000 (AEST) Date: Sun, 7 Jul 2019 03:48:54 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Doug Moore cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r349791 - head/sys/vm In-Reply-To: <201907061555.x66FtGsg025314@repo.freebsd.org> Message-ID: <20190707023441.B2047@besplex.bde.org> References: <201907061555.x66FtGsg025314@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=k1N1_3MYVckZGDfFxwYA:9 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: 526A76EC92 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.90)[-0.896,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 17:49:13 -0000 On Sat, 6 Jul 2019, Doug Moore wrote: > Log: > Fix style(9) violations involving division by PAGE_SIZE. It is style violation to even use an explicit division by PAGE_SIZE instead of the btoc() conversion macro (*). > Modified: head/sys/vm/swap_pager.c > ============================================================================== > --- head/sys/vm/swap_pager.c Sat Jul 6 15:34:23 2019 (r349790) > +++ head/sys/vm/swap_pager.c Sat Jul 6 15:55:16 2019 (r349791) > @@ -523,7 +523,7 @@ swap_pager_swap_init(void) > * but it isn't very efficient). > * > * The nsw_cluster_max is constrained by the bp->b_pages[] > - * array (MAXPHYS/PAGE_SIZE) and our locally defined > + * array MAXPHYS / PAGE_SIZE and our locally defined > * MAX_PAGEOUT_CLUSTER. Also be aware that swap ops are > * constrained by the swap device interleave stripe size. > * The macro is less readable in comments. > @@ -538,7 +538,7 @@ swap_pager_swap_init(void) > * have one NFS swap device due to the command/ack latency over NFS. > * So it all works out pretty well. > */ > - nsw_cluster_max = min((MAXPHYS/PAGE_SIZE), MAX_PAGEOUT_CLUSTER); > + nsw_cluster_max = min(MAXPHYS / PAGE_SIZE, MAX_PAGEOUT_CLUSTER); > > nsw_wcount_async = 4; > nsw_wcount_async_max = nsw_wcount_async; > > Modified: head/sys/vm/vnode_pager.c > ============================================================================== > --- head/sys/vm/vnode_pager.c Sat Jul 6 15:34:23 2019 (r349790) > +++ head/sys/vm/vnode_pager.c Sat Jul 6 15:55:16 2019 (r349791) > @@ -544,8 +544,8 @@ vnode_pager_addr(struct vnode *vp, vm_ooffset_t addres > *rtaddress += voffset / DEV_BSIZE; > ... Using explicit division by DEV_BSIZE instead of the btodb() conversion macro is another style bug. (*) The macros use shifts while the divisions use division. The hard-coded versions could use shifts too, so there is another set of style bugs from only using shifts sometimes. Shifts are faster if the type of the dividend is signed. Oops. The macro also rounds up. So hard-coding the division is not just a style bug. It is wrong unless the dividend is a multiple of the page size. This shouldn't be assumed for values like MAXBSIZE. There are many more style bugs involving btoc(): - 'c' in it means 'click', which might mean a virtual page size while PAGE_SIZE might mean the physical page size. Or vice versa. dyson retired from BSD not long after I asked him to clean this up 20+ years ago. - btoc() is the only clearly MI macro for this. The better-named macros amd64_ptob() and i386_ptob() are of course MD. amd64_ptob() is never used in sys/amd64. i386_ptob() is used 8 times in sys/i386 (all in pmap.c), and 1 of these uses is in a macro which is used 22 times. These uses give another set of style bugs. They are just obfuscations if clicks are the same as pages, and probably incomplete otherwise. However, it is correct for MD code to use physical pages unless it is implementing virtual pages. These macros don't round up, so they are not equivalent to btoc() even if the click size is PAGE_SIZE. - there is also the better-named macro atop(). This doesn't round up. I think it is supposed to be MI. It is replicated for all arches. 'a' in it means 'address', which is less general than 'b' for 'byte, so it is a worse name than btop(). - the macro with the best name btop() doesn't exist. In the opposite direction, there are ctob(), {amd64,i386}_ptob(), ptoa(), and direct multiplications by PAGE_SIZE and direct shifts by PAGE_SHIFT. {amd64,i386}_ptob() is not used even on i386. This direction is trickier since the (npages << PAGE_SHIFT) overflows if npages has the correct type (int). The caller should convert npages to something like vm_offset_t before using the macro and the need for this is less obvious than for a direct expression. This is of course undocumented except by the source code which shows: - ctob(), ptoa() and i386_ptob() need conversion in the caller, but amd64_ptob() converts to unsigned long in the macro. Since the last macro is unused, the caller should convert in all used cases. Coversion is most important on 64-bit arches. On i386, overflow occurs at 2G starting with int npages but u_int npages works up to 4G which is enough for i386 addresses but not for amd64 addresses or i386-PAE byte counts. I once sprinkled conversions in the macros. btodb() still uses my old code for this, where the code is sophisticated so as to avoid using the long long abomination, but which became mostly nonsense when daddr_t was expanded from 32 bits to 64. Since this macro shifts right, conversion is not really necessary, and conversion to daddr_t gives much the same pessimations as conversion to the abomination. dbtodb() simply converts to daddr_t. I forget if I wrote that. btoc() converts to vm_offset_t, but since it shifts right conversion is not really necessary. Conversions in macros are a wrong way to do this. jake taught me this in connection with sparc64 i386-PAE work. Conversion in the caller allows the caller to control the type of the result and to not pessimize by expanding the type. I think jake intentionally left out conversions in the sparc64 macros but didn't change the x86 macros much. Other arches use a random mixture. E.g., ptoa() converts to unsigned long on amd64, arm64, riscv and sparc64 (so jake didn't change this?), to unsigned on arm, and doesn't convert on i386, mips or powerpc. Always converting to vm_offset_t would be reasonable, but gives namespace problems. It is stupid that the MI uses vm_offset_t for btoc() where conversion is not really needed, while is more careful about namespace problems so it avoids using even u_long for ptoa(). Bruce From owner-svn-src-all@freebsd.org Sat Jul 6 18:02:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E6DD15CE3D5; Sat, 6 Jul 2019 18:02:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B29E6F878; Sat, 6 Jul 2019 18:02:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 134E525297; Sat, 6 Jul 2019 18:02:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x66I2WKF094410; Sat, 6 Jul 2019 18:02:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66I2TbE094399; Sat, 6 Jul 2019 18:02:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907061802.x66I2TbE094399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jul 2019 18:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349793 - in head: contrib/libunwind/src contrib/llvm/tools/clang/lib/AST contrib/llvm/tools/clang/lib/CodeGen contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch contrib/llvm/tools/lld... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/libunwind/src contrib/llvm/tools/clang/lib/AST contrib/llvm/tools/clang/lib/CodeGen contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch contrib/llvm/tools/lld/ELF/Arch contrib/openmp/... X-SVN-Commit-Revision: 349793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3B29E6F878 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 18:02:33 -0000 Author: dim Date: Sat Jul 6 18:02:29 2019 New Revision: 349793 URL: https://svnweb.freebsd.org/changeset/base/349793 Log: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp to the upstream release_80 branch r364487 (effectively, 8.0.1 rc3). The 8.0.1 release will most likely have no further changes. MFC after: 1 week X-MFC-With: r349004 Modified: head/contrib/libunwind/src/DwarfInstructions.hpp head/contrib/libunwind/src/assembly.h head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/PPC.cpp head/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp head/contrib/openmp/runtime/src/kmp_atomic.h head/contrib/openmp/runtime/src/kmp_csupport.cpp head/contrib/openmp/runtime/src/ompt-specific.cpp head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/libunwind/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) head/contrib/openmp/ (props changed) Modified: head/contrib/libunwind/src/DwarfInstructions.hpp ============================================================================== --- head/contrib/libunwind/src/DwarfInstructions.hpp Sat Jul 6 16:19:04 2019 (r349792) +++ head/contrib/libunwind/src/DwarfInstructions.hpp Sat Jul 6 18:02:29 2019 (r349793) @@ -234,6 +234,31 @@ int DwarfInstructions::stepWithDwarf(A &addressS } #endif +#if defined(_LIBUNWIND_TARGET_PPC64) +#define PPC64_ELFV1_R2_LOAD_INST_ENCODING 0xe8410028u // ld r2,40(r1) +#define PPC64_ELFV1_R2_OFFSET 40 +#define PPC64_ELFV2_R2_LOAD_INST_ENCODING 0xe8410018u // ld r2,24(r1) +#define PPC64_ELFV2_R2_OFFSET 24 + // If the instruction at return address is a TOC (r2) restore, + // then r2 was saved and needs to be restored. + // ELFv2 ABI specifies that the TOC Pointer must be saved at SP + 24, + // while in ELFv1 ABI it is saved at SP + 40. + if (R::getArch() == REGISTERS_PPC64 && returnAddress != 0) { + pint_t sp = newRegisters.getRegister(UNW_REG_SP); + pint_t r2 = 0; + switch (addressSpace.get32(returnAddress)) { + case PPC64_ELFV1_R2_LOAD_INST_ENCODING: + r2 = addressSpace.get64(sp + PPC64_ELFV1_R2_OFFSET); + break; + case PPC64_ELFV2_R2_LOAD_INST_ENCODING: + r2 = addressSpace.get64(sp + PPC64_ELFV2_R2_OFFSET); + break; + } + if (r2) + newRegisters.setRegister(UNW_PPC64_R2, r2); + } +#endif + // Return address is address after call site instruction, so setting IP to // that does simualates a return. newRegisters.setIP(returnAddress); Modified: head/contrib/libunwind/src/assembly.h ============================================================================== --- head/contrib/libunwind/src/assembly.h Sat Jul 6 16:19:04 2019 (r349792) +++ head/contrib/libunwind/src/assembly.h Sat Jul 6 18:02:29 2019 (r349793) @@ -35,6 +35,20 @@ #define SEPARATOR ; #endif +#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) +#define PPC64_OPD1 .section .opd,"aw",@progbits SEPARATOR +#define PPC64_OPD2 SEPARATOR \ + .p2align 3 SEPARATOR \ + .quad .Lfunc_begin0 SEPARATOR \ + .quad .TOC.@tocbase SEPARATOR \ + .quad 0 SEPARATOR \ + .text SEPARATOR \ +.Lfunc_begin0: +#else +#define PPC64_OPD1 +#define PPC64_OPD2 +#endif + #define GLUE2(a, b) a ## b #define GLUE(a, b) GLUE2(a, b) #define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name) @@ -95,7 +109,9 @@ .globl SYMBOL_NAME(name) SEPARATOR \ EXPORT_SYMBOL(name) SEPARATOR \ SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \ - SYMBOL_NAME(name): + PPC64_OPD1 \ + SYMBOL_NAME(name): \ + PPC64_OPD2 #define DEFINE_LIBUNWIND_PRIVATE_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ Modified: head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp Sat Jul 6 16:19:04 2019 (r349792) +++ head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp Sat Jul 6 18:02:29 2019 (r349793) @@ -1937,8 +1937,9 @@ void MicrosoftCXXNameMangler::mangleType(const Builtin // ::= _M # unsigned __int128 // ::= _N # bool // _O # - // ::= _T # __float80 (Intel) + // ::= _Q # char8_t // ::= _S # char16_t + // ::= _T # __float80 (Intel) // ::= _U # char32_t // ::= _W # wchar_t // ::= _Z # __float80 (Digital Mars) @@ -1999,6 +2000,9 @@ void MicrosoftCXXNameMangler::mangleType(const Builtin case BuiltinType::Bool: Out << "_N"; break; + case BuiltinType::Char8: + Out << "_Q"; + break; case BuiltinType::Char16: Out << "_S"; break; @@ -2094,7 +2098,6 @@ void MicrosoftCXXNameMangler::mangleType(const Builtin case BuiltinType::SatUShortFract: case BuiltinType::SatUFract: case BuiltinType::SatULongFract: - case BuiltinType::Char8: case BuiltinType::Float128: { DiagnosticsEngine &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID( Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Sat Jul 6 16:19:04 2019 (r349792) +++ head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Sat Jul 6 18:02:29 2019 (r349793) @@ -1817,32 +1817,24 @@ CGDebugInfo::CollectFunctionTemplateParams(const Funct } llvm::DINodeArray CGDebugInfo::CollectVarTemplateParams(const VarDecl *VL, - llvm::DIFile *Unit) { - if (auto *TS = dyn_cast(VL)) { - auto T = TS->getSpecializedTemplateOrPartial(); - auto TA = TS->getTemplateArgs().asArray(); - // Collect parameters for a partial specialization - if (T.is()) { - const TemplateParameterList *TList = - T.get() - ->getTemplateParameters(); - return CollectTemplateParams(TList, TA, Unit); - } - - // Collect parameters for an explicit specialization - if (T.is()) { - const TemplateParameterList *TList = T.get() - ->getTemplateParameters(); - return CollectTemplateParams(TList, TA, Unit); - } - } - return llvm::DINodeArray(); + llvm::DIFile *Unit) { + // Always get the full list of parameters, not just the ones from the + // specialization. A partial specialization may have fewer parameters than + // there are arguments. + auto *TS = dyn_cast(VL); + if (!TS) + return llvm::DINodeArray(); + VarTemplateDecl *T = TS->getSpecializedTemplate(); + const TemplateParameterList *TList = T->getTemplateParameters(); + auto TA = TS->getTemplateArgs().asArray(); + return CollectTemplateParams(TList, TA, Unit); } llvm::DINodeArray CGDebugInfo::CollectCXXTemplateParams( const ClassTemplateSpecializationDecl *TSpecial, llvm::DIFile *Unit) { - // Always get the full list of parameters, not just the ones from - // the specialization. + // Always get the full list of parameters, not just the ones from the + // specialization. A partial specialization may have fewer parameters than + // there are arguments. TemplateParameterList *TPList = TSpecial->getSpecializedTemplate()->getTemplateParameters(); const TemplateArgumentList &TAList = TSpecial->getTemplateArgs(); Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/PPC.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/PPC.cpp Sat Jul 6 16:19:04 2019 (r349792) +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/PPC.cpp Sat Jul 6 18:02:29 2019 (r349793) @@ -117,7 +117,7 @@ ppc::ReadGOTPtrMode ppc::getPPCReadGOTPtrMode(const Dr if (Args.getLastArg(options::OPT_msecure_plt)) return ppc::ReadGOTPtrMode::SecurePlt; if ((Triple.isOSFreeBSD() && Triple.getOSMajorVersion() >= 13) || - Triple.isOSOpenBSD()) + Triple.isOSNetBSD() || Triple.isOSOpenBSD()) return ppc::ReadGOTPtrMode::SecurePlt; else return ppc::ReadGOTPtrMode::Bss; Modified: head/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp Sat Jul 6 16:19:04 2019 (r349792) +++ head/contrib/llvm/tools/lld/ELF/Arch/PPC64.cpp Sat Jul 6 18:02:29 2019 (r349793) @@ -757,7 +757,10 @@ bool PPC64::needsThunk(RelExpr Expr, RelType Type, con // If the offset exceeds the range of the branch type then it will need // a range-extending thunk. - return !inBranchRange(Type, BranchAddr, S.getVA()); + // See the comment in getRelocTargetVA() about R_PPC64_CALL. + return !inBranchRange(Type, BranchAddr, + S.getVA() + + getPPC64GlobalEntryToLocalEntryOffset(S.StOther)); } uint32_t PPC64::getThunkSectionSpacing() const { Modified: head/contrib/openmp/runtime/src/kmp_atomic.h ============================================================================== --- head/contrib/openmp/runtime/src/kmp_atomic.h Sat Jul 6 16:19:04 2019 (r349792) +++ head/contrib/openmp/runtime/src/kmp_atomic.h Sat Jul 6 18:02:29 2019 (r349793) @@ -364,7 +364,7 @@ static inline void __kmp_acquire_atomic_lock(kmp_atomi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( - ompt_mutex_atomic, 0, kmp_mutex_impl_queuing, (ompt_wait_id_t)lck, + ompt_mutex_atomic, 0, kmp_mutex_impl_queuing, (ompt_wait_id_t)(uintptr_t)lck, OMPT_GET_RETURN_ADDRESS(0)); } #endif @@ -374,7 +374,7 @@ static inline void __kmp_acquire_atomic_lock(kmp_atomi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0)); + ompt_mutex_atomic, (ompt_wait_id_t)(uintptr_t)lck, OMPT_GET_RETURN_ADDRESS(0)); } #endif } @@ -390,7 +390,7 @@ static inline void __kmp_release_atomic_lock(kmp_atomi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_atomic, (ompt_wait_id_t)lck, OMPT_GET_RETURN_ADDRESS(0)); + ompt_mutex_atomic, (ompt_wait_id_t)(uintptr_t)lck, OMPT_GET_RETURN_ADDRESS(0)); } #endif } Modified: head/contrib/openmp/runtime/src/kmp_csupport.cpp ============================================================================== --- head/contrib/openmp/runtime/src/kmp_csupport.cpp Sat Jul 6 16:19:04 2019 (r349792) +++ head/contrib/openmp/runtime/src/kmp_csupport.cpp Sat Jul 6 18:02:29 2019 (r349793) @@ -848,7 +848,7 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) { if (ompt_enabled.enabled) { OMPT_STORE_RETURN_ADDRESS(gtid); team = __kmp_team_from_gtid(gtid); - lck = (ompt_wait_id_t)&team->t.t_ordered.dt.t_value; + lck = (ompt_wait_id_t)(uintptr_t)&team->t.t_ordered.dt.t_value; /* OMPT state update */ th->th.ompt_thread_info.wait_id = lck; th->th.ompt_thread_info.state = ompt_state_wait_ordered; @@ -857,8 +857,8 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) { codeptr_ra = OMPT_LOAD_RETURN_ADDRESS(gtid); if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( - ompt_mutex_ordered, omp_lock_hint_none, kmp_mutex_impl_spin, - (ompt_wait_id_t)lck, codeptr_ra); + ompt_mutex_ordered, omp_lock_hint_none, kmp_mutex_impl_spin, lck, + codeptr_ra); } } #endif @@ -877,7 +877,7 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) { /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_ordered, (ompt_wait_id_t)lck, codeptr_ra); + ompt_mutex_ordered, (ompt_wait_id_t)(uintptr_t)lck, codeptr_ra); } } #endif @@ -917,7 +917,8 @@ void __kmpc_end_ordered(ident_t *loc, kmp_int32 gtid) if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( ompt_mutex_ordered, - (ompt_wait_id_t)&__kmp_team_from_gtid(gtid)->t.t_ordered.dt.t_value, + (ompt_wait_id_t)(uintptr_t)&__kmp_team_from_gtid(gtid) + ->t.t_ordered.dt.t_value, OMPT_LOAD_RETURN_ADDRESS(gtid)); } #endif @@ -1188,7 +1189,7 @@ void __kmpc_critical(ident_t *loc, kmp_int32 global_ti ti = __kmp_threads[global_tid]->th.ompt_thread_info; /* OMPT state update */ prev_state = ti.state; - ti.wait_id = (ompt_wait_id_t)lck; + ti.wait_id = (ompt_wait_id_t)(uintptr_t)lck; ti.state = ompt_state_wait_critical; /* OMPT event callback */ @@ -1196,7 +1197,7 @@ void __kmpc_critical(ident_t *loc, kmp_int32 global_ti if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_critical, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)crit, codeptr_ra); + (ompt_wait_id_t)(uintptr_t)lck, codeptr_ra); } } #endif @@ -1216,7 +1217,7 @@ void __kmpc_critical(ident_t *loc, kmp_int32 global_ti /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_critical, (ompt_wait_id_t)crit, codeptr_ra); + ompt_mutex_critical, (ompt_wait_id_t)(uintptr_t)lck, codeptr_ra); } } #endif @@ -1402,14 +1403,15 @@ void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 ti = __kmp_threads[global_tid]->th.ompt_thread_info; /* OMPT state update */ prev_state = ti.state; - ti.wait_id = (ompt_wait_id_t)lck; + ti.wait_id = (ompt_wait_id_t)(uintptr_t)lck; ti.state = ompt_state_wait_critical; /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_critical, (unsigned int)hint, - __ompt_get_mutex_impl_type(crit), (ompt_wait_id_t)crit, codeptr); + __ompt_get_mutex_impl_type(crit), (ompt_wait_id_t)(uintptr_t)lck, + codeptr); } } #endif @@ -1440,14 +1442,15 @@ void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 ti = __kmp_threads[global_tid]->th.ompt_thread_info; /* OMPT state update */ prev_state = ti.state; - ti.wait_id = (ompt_wait_id_t)lck; + ti.wait_id = (ompt_wait_id_t)(uintptr_t)lck; ti.state = ompt_state_wait_critical; /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_critical, (unsigned int)hint, - __ompt_get_mutex_impl_type(0, ilk), (ompt_wait_id_t)crit, codeptr); + __ompt_get_mutex_impl_type(0, ilk), (ompt_wait_id_t)(uintptr_t)lck, + codeptr); } } #endif @@ -1467,7 +1470,7 @@ void __kmpc_critical_with_hint(ident_t *loc, kmp_int32 /* OMPT event callback */ if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_critical, (ompt_wait_id_t)crit, codeptr); + ompt_mutex_critical, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } #endif @@ -1565,7 +1568,8 @@ void __kmpc_end_critical(ident_t *loc, kmp_int32 globa OMPT_STORE_RETURN_ADDRESS(global_tid); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_critical, (ompt_wait_id_t)crit, OMPT_LOAD_RETURN_ADDRESS(0)); + ompt_mutex_critical, (ompt_wait_id_t)(uintptr_t)lck, + OMPT_LOAD_RETURN_ADDRESS(0)); } #endif @@ -2189,8 +2193,8 @@ void __kmpc_init_lock_with_hint(ident_t *loc, kmp_int3 if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_lock, (omp_lock_hint_t)hint, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif } @@ -2213,8 +2217,8 @@ void __kmpc_init_nest_lock_with_hint(ident_t *loc, kmp if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_nest_lock, (omp_lock_hint_t)hint, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif } @@ -2239,8 +2243,8 @@ void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid, vo if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2282,7 +2286,7 @@ void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid, vo if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)user_lock, codeptr); + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2311,8 +2315,8 @@ void __kmpc_init_nest_lock(ident_t *loc, kmp_int32 gti if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2357,7 +2361,7 @@ void __kmpc_init_nest_lock(ident_t *loc, kmp_int32 gti if (ompt_enabled.ompt_callback_lock_init) { ompt_callbacks.ompt_callback(ompt_callback_lock_init)( ompt_mutex_nest_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)user_lock, codeptr); + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2393,7 +2397,7 @@ void __kmpc_destroy_lock(ident_t *loc, kmp_int32 gtid, lck = (kmp_user_lock_p)user_lock; } ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock); @@ -2421,7 +2425,7 @@ void __kmpc_destroy_lock(ident_t *loc, kmp_int32 gtid, codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2461,7 +2465,7 @@ void __kmpc_destroy_nest_lock(ident_t *loc, kmp_int32 codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock); @@ -2493,7 +2497,7 @@ void __kmpc_destroy_nest_lock(ident_t *loc, kmp_int32 codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_lock_destroy) { ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2538,8 +2542,8 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, voi if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif #if KMP_USE_INLINED_TAS @@ -2560,7 +2564,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, voi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2593,7 +2597,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, voi if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)lck, codeptr); + (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -2606,7 +2610,7 @@ void __kmpc_set_lock(ident_t *loc, kmp_int32 gtid, voi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -2628,8 +2632,8 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } } #endif @@ -2646,13 +2650,14 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, + codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_begin, (ompt_wait_id_t)user_lock, codeptr); + ompt_scope_begin, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } } } @@ -2690,7 +2695,8 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(), (ompt_wait_id_t)lck, codeptr); + __ompt_get_mutex_impl_type(), (ompt_wait_id_t)(uintptr_t)lck, + codeptr); } } #endif @@ -2707,13 +2713,13 @@ void __kmpc_set_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_begin, (ompt_wait_id_t)lck, codeptr); + ompt_scope_begin, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } } @@ -2749,7 +2755,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, v codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif @@ -2778,7 +2784,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, v codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -2810,7 +2816,7 @@ void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, v codeptr = OMPT_GET_RETURN_ADDRESS(0); if (ompt_enabled.ompt_callback_mutex_released) { ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -2838,12 +2844,13 @@ void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gt if (ompt_enabled.ompt_callback_mutex_released) { // release_lock_last ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, + codeptr); } } else if (ompt_enabled.ompt_callback_nest_lock) { // release_lock_prev ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_end, (ompt_wait_id_t)user_lock, codeptr); + ompt_scope_end, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } } #endif @@ -2887,12 +2894,12 @@ void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gt if (ompt_enabled.ompt_callback_mutex_released) { // release_lock_last ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } else if (ompt_enabled.ompt_callback_nest_lock) { // release_lock_previous ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_mutex_scope_end, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_scope_end, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } #endif @@ -2929,12 +2936,12 @@ void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gt if (ompt_enabled.ompt_callback_mutex_released) { // release_lock_last ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( - ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } else if (ompt_enabled.ompt_callback_nest_lock) { // release_lock_previous ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_mutex_scope_end, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_scope_end, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } #endif @@ -2960,8 +2967,8 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, voi if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif #if KMP_USE_INLINED_TAS @@ -2983,7 +2990,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, voi #if OMPT_SUPPORT && OMPT_OPTIONAL if (ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif return FTN_TRUE; @@ -3024,7 +3031,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, voi if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(), - (ompt_wait_id_t)lck, codeptr); + (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -3039,7 +3046,7 @@ int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, voi #if OMPT_SUPPORT && OMPT_OPTIONAL if (rc && ompt_enabled.ompt_callback_mutex_acquired) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } #endif @@ -3065,8 +3072,8 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(user_lock), (ompt_wait_id_t)user_lock, - codeptr); + __ompt_get_mutex_impl_type(user_lock), + (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } #endif rc = KMP_D_LOCK_FUNC(user_lock, test)((kmp_dyna_lock_t *)user_lock, gtid); @@ -3083,13 +3090,14 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (ompt_wait_id_t)user_lock, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)user_lock, + codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_scope_begin, (ompt_wait_id_t)user_lock, codeptr); + ompt_scope_begin, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr); } } } @@ -3130,7 +3138,8 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid ompt_enabled.ompt_callback_mutex_acquire) { ompt_callbacks.ompt_callback(ompt_callback_mutex_acquire)( ompt_mutex_nest_lock, omp_lock_hint_none, - __ompt_get_mutex_impl_type(), (ompt_wait_id_t)lck, codeptr); + __ompt_get_mutex_impl_type(), (ompt_wait_id_t)(uintptr_t)lck, + codeptr); } #endif @@ -3148,13 +3157,13 @@ int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid if (ompt_enabled.ompt_callback_mutex_acquired) { // lock_first ompt_callbacks.ompt_callback(ompt_callback_mutex_acquired)( - ompt_mutex_nest_lock, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_nest_lock, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } else { if (ompt_enabled.ompt_callback_nest_lock) { // lock_next ompt_callbacks.ompt_callback(ompt_callback_nest_lock)( - ompt_mutex_scope_begin, (ompt_wait_id_t)lck, codeptr); + ompt_mutex_scope_begin, (ompt_wait_id_t)(uintptr_t)lck, codeptr); } } } Modified: head/contrib/openmp/runtime/src/ompt-specific.cpp ============================================================================== --- head/contrib/openmp/runtime/src/ompt-specific.cpp Sat Jul 6 16:19:04 2019 (r349792) +++ head/contrib/openmp/runtime/src/ompt-specific.cpp Sat Jul 6 18:02:29 2019 (r349793) @@ -211,7 +211,7 @@ ompt_data_t *__ompt_get_thread_data_internal() { void __ompt_thread_assign_wait_id(void *variable) { kmp_info_t *ti = ompt_get_thread(); - ti->th.ompt_thread_info.wait_id = (ompt_wait_id_t)variable; + ti->th.ompt_thread_info.wait_id = (ompt_wait_id_t)(uintptr_t)variable; } int __ompt_get_state_internal(ompt_wait_id_t *omp_wait_id) { Modified: head/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- head/lib/clang/include/clang/Basic/Version.inc Sat Jul 6 16:19:04 2019 (r349792) +++ head/lib/clang/include/clang/Basic/Version.inc Sat Jul 6 18:02:29 2019 (r349793) @@ -8,4 +8,4 @@ #define CLANG_VENDOR "FreeBSD " -#define SVN_REVISION "363030" +#define SVN_REVISION "364487" Modified: head/lib/clang/include/lld/Common/Version.inc ============================================================================== --- head/lib/clang/include/lld/Common/Version.inc Sat Jul 6 16:19:04 2019 (r349792) +++ head/lib/clang/include/lld/Common/Version.inc Sat Jul 6 18:02:29 2019 (r349793) @@ -7,4 +7,4 @@ #define LLD_REPOSITORY_STRING "FreeBSD" // - -#define LLD_REVISION_STRING "363030-1300004" +#define LLD_REVISION_STRING "364487-1300004" Modified: head/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- head/lib/clang/include/llvm/Support/VCSRevision.h Sat Jul 6 16:19:04 2019 (r349792) +++ head/lib/clang/include/llvm/Support/VCSRevision.h Sat Jul 6 18:02:29 2019 (r349793) @@ -1,2 +1,2 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "svn-r363030" +#define LLVM_REVISION "svn-r364487" From owner-svn-src-all@freebsd.org Sat Jul 6 20:31:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7819F15D18FD; Sat, 6 Jul 2019 20:31:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19F7775D0F; Sat, 6 Jul 2019 20:31:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E976026BF8; Sat, 6 Jul 2019 20:31: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 x66KVbFH070692; Sat, 6 Jul 2019 20:31:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x66KVbaW070691; Sat, 6 Jul 2019 20:31:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907062031.x66KVbaW070691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 6 Jul 2019 20:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349794 - 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: 349794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 19F7775D0F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2019 20:31:38 -0000 Author: kib Date: Sat Jul 6 20:31:37 2019 New Revision: 349794 URL: https://svnweb.freebsd.org/changeset/base/349794 Log: Document atomicity for read(2) and write(2). Take part of the text from POSIX 2018 edition and describe the atomicity requirements for read and write syscalls. See p1003.1-2018, Vol.2, 2.9.7 Threads interaction with Regular File Operations. Reviewed by: asomers Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D20867 Modified: head/lib/libc/sys/read.2 Modified: head/lib/libc/sys/read.2 ============================================================================== --- head/lib/libc/sys/read.2 Sat Jul 6 18:02:29 2019 (r349793) +++ head/lib/libc/sys/read.2 Sat Jul 6 20:31:37 2019 (r349794) @@ -28,7 +28,7 @@ .\" @(#)read.2 8.4 (Berkeley) 2/26/94 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd July 6, 2019 .Dt READ 2 .Os .Sh NAME @@ -128,6 +128,25 @@ return the number of bytes actually read and placed in The system guarantees to read the number of bytes requested if the descriptor references a normal file that has that many bytes left before the end-of-file, but in no other case. +.Pp +In accordance with +.St -p1003.1-2004 , +both +.Xr read 2 +and +.Xr write 2 +syscalls are atomic with respect to each other in the effects on file +content, when they operate on regular files. +If two threads each call one of the +.Xr read 2 +or +.Xr write 2 , +syscalls, each call will see either all of the changes of the other call, +or none of them. +The +.Fx +kernel implements this guarantee by locking the file ranges affected by +the calls. .Sh RETURN VALUES If successful, the number of bytes actually read is returned.