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...
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 ad
svn commit: r349723 - head/sys/powerpc/pseries
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.cThu Jul 4 10:41:09 2019 (r349722) +++ head/sys/powerpc/pseries/phyp_llan.cThu 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); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r349423 - head/contrib/elftoolchain/elfcopy
On Wed, Jun 26, 2019 at 04:35:37PM +, 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. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349727 - in head/sys/dev: altera/softdma xdma xilinx
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.hThu Jul 4 13:23:18 2019(r349726) +++ head/sys/dev/xdma/xdma.hThu Jul 4 14:04:08 2019(r349727) @@ -137,7 +137,7 @@ struct xdma_channel { uint32_tcaps; #defineXCHAN_CAP_BUSDMA(1 << 0) #defineXCHAN_CAP_NOSEG (1 << 1) -#defineXCHAN_CAP_NOBUFS(1 << 2) +#defineXCHAN_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.cThu Jul 4 13:23:18 2019 (r349726) +++ head/sys/dev/xilinx/axidma.cThu 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-
svn commit: r349728 - in head/sys: arm/amlogic/aml8726 dev/mmc/host mips/ingenic
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 = 100; /* 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 = 100; /* 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_I
svn commit: r349729 - head/share/mk
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.mkThu Jul 4 14:15:04 2019(r349728) +++ head/share/mk/bsd.sys.mkThu 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" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r349423 - head/contrib/elftoolchain/elfcopy
On Thu, Jul 04, 2019 at 03:56:49PM +0200, Roger Pau Monné wrote: > On Wed, Jun 26, 2019 at 04:35:37PM +, 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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349730 - head/contrib/elftoolchain/elfcopy
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.cThu Jul 4 14:51:44 2019(r349729) +++ head/contrib/elftoolchain/elfcopy/sections.cThu 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; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349731 - head/sys/dev/mmc/host
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: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349732 - head/sys/dev/xdma
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: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349733 - head/sys/kern
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+c9b6206303bf47bac...@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; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349741 - head/sys/vm
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.cThu Jul 4 18:21:01 2019(r349740) +++ head/sys/vm/vm_map.cThu 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. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349743 - head/sys/vm
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.cThu Jul 4 19:02:03 2019(r349742) +++ head/sys/vm/vm_map.cThu 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_
svn commit: r349744 - head/sys/vm
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.cThu Jul 4 19:12:13 2019(r349743) +++ head/sys/vm/vm_map.cThu 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, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349745 - head/sys/vm
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.cThu Jul 4 19:17:55 2019(r349744) +++ head/sys/vm/vm_map.cThu 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)) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349746 - head/sys/compat/linux
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); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349747 - head/sys/amd64/linux
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$"); #defineLINUX_PTRACE_DETACH 17 #defineLINUX_PTRACE_SYSCALL24 #defineLINUX_PTRACE_SETOPTIONS 0x4200 +#defineLINUX_PTRACE_GETSIGINFO 0x4202 #defineLINUX_PTRACE_GETREGSET 0x4204 #defineLINUX_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); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349748 - head/sys/amd64/linux
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$"); #defineLINUX_PTRACE_GETREGSET 0x4204 #defineLINUX_PTRACE_SEIZE 0x4206 +#defineLINUX_PTRACE_EVENT_EXIT 6 + #defineLINUX_PTRACE_O_TRACESYSGOOD 1 #defineLINUX_PTRACE_O_TRACEFORK2 #defineLINUX_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))); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349750 - head/sys/compat/linux
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 & 0x) { 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_FIEMAP0x660b /* * Linux evdev ioctl min and max ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349751 - head/sys/compat/linux
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); #defineLINUX_KVERSION 2 #defineLINUX_KPATCHLEVEL 6 -#defineLINUX_KSUBLEVEL 32 +#defineLINUX_KSUBLEVEL 36 #defineLINUX_KERNVER(a,b,c)(((a) << 16) + ((b) << 8) + (c)) #defineLINUX_VERSION_CODE LINUX_KERNVER(LINUX_KVERSION, \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349752 - head/sys/dev/netmap
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.cThu Jul 4 20:42:08 2019 (r349751) +++ head/sys/dev/netmap/netmap_generic.cThu 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; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349753 - head/sys/dev/netmap
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; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r349760 - head/sys/riscv/riscv
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; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"