Re: svn commit: r362126 - head/sys/vm
On Wed, Jun 17, 2020 at 10:50 AM John Baldwin wrote: > > On 6/12/20 3:33 PM, Conrad Meyer wrote: > > On Fri, Jun 12, 2020 at 2:53 PM Eric van Gyzen wrote: > >> Honor db_pager_quit in some vm_object ddb commands > >> > >> These can be rather verbose. > > > > We also have this (?)hack in OneFS, which eliminates the need for > > every debug function to check the db_pager globals: > > > > https://people.freebsd.org/~cem/db_pager.patch > > > > I'm not sure how objectionable it is. > > I don't think this addresses that. I think this patch makes printf turn > into db_printf when a function is invoked from DDB which is orthogonal. > db_printf() itself doesn't check the pager. db_printf checks the pager, via db_putc. ___ 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: r362253 - head/sys/vm
On Wed, Jun 17, 2020 at 4:04 AM Konstantin Belousov wrote: > > On Tue, Jun 16, 2020 at 10:53:56PM +, Conrad Meyer wrote: > > Author: cem > > Date: Tue Jun 16 22:53:56 2020 > > New Revision: 362253 > > URL: https://svnweb.freebsd.org/changeset/base/362253 > > > > Log: > > vm: Drop vm_map_clip_{start,end} macro wrappers > > > > No functional change. > > > > Reviewed by:dougm, markj > > Sponsored by: Dell EMC Isilon > > Differential Revision: https://reviews.freebsd.org/D25282 > > I would highly appreciate if you revert this commit. > It conflicts with https://reviews.freebsd.org/D24652, which must revert your > change to remain functional. > I probably should not allowed that review to rott silently. Initially, I took a similar approach — converting the macros to inline functions. It was suggested in the review to just merge them, as they were both relatively small. I have a follow-up patch which will add a small amount of code to the former macros. (D25283) I don't think there is any functional reason your patch cannot be rebased over this change. You could choose to merge _vm_map_clip_start and vm_map_clip_start (and same for end) in your patch; nothing invokes the underscore variants except the wrappers. You could also choose to re-split the routines, although I'm not sure why. Either option seems acceptable to me. Best, Conrad ___ 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: r362292 - in head/sys/ufs: ffs ufs
Author: chs Date: Wed Jun 17 23:39:52 2020 New Revision: 362292 URL: https://svnweb.freebsd.org/changeset/base/362292 Log: Move all of the functions in ffs_subr.c that are only used by the ufs kernel module from that file into ffs_vfsops.c. This fixes the build for kernel configs that don't include FFS. PR: 247256 Submitted by: glebius Reviewed by: mckusick (earlier version) Sponsored by: Netflix Differential Revision:https://reviews.freebsd.org/D25285 Modified: head/sys/ufs/ffs/ffs_extern.h head/sys/ufs/ffs/ffs_subr.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ffs/ffs_extern.h == --- head/sys/ufs/ffs/ffs_extern.h Wed Jun 17 21:51:32 2020 (r362291) +++ head/sys/ufs/ffs/ffs_extern.h Wed Jun 17 23:39:52 2020 (r362292) @@ -61,7 +61,6 @@ int ffs_balloc_ufs1(struct vnode *a_vp, off_t a_starto struct ucred *a_cred, int a_flags, struct buf **a_bpp); intffs_balloc_ufs2(struct vnode *a_vp, off_t a_startoffset, int a_size, struct ucred *a_cred, int a_flags, struct buf **a_bpp); -intffs_blkatoff(struct vnode *, off_t, char **, struct buf **); void ffs_blkfree(struct ufsmount *, struct fs *, struct vnode *, ufs2_daddr_t, long, ino_t, enum vtype, struct workhead *, u_long); ufs2_daddr_t ffs_blkpref_ufs1(struct inode *, ufs_lbn_t, int, ufs1_daddr_t *); @@ -69,7 +68,6 @@ ufs2_daddr_t ffs_blkpref_ufs2(struct inode *, ufs_lbn_ void ffs_blkrelease_finish(struct ufsmount *, u_long); u_long ffs_blkrelease_start(struct ufsmount *, struct vnode *, ino_t); uint32_t ffs_calc_sbhash(struct fs *); -intffs_check_blkno(struct mount *, ino_t, ufs2_daddr_t, int); intffs_checkfreefile(struct fs *, struct vnode *, ino_t); void ffs_clrblock(struct fs *, u_char *, ufs1_daddr_t); void ffs_clusteracct(struct fs *, struct cg *, ufs1_daddr_t, int); @@ -84,7 +82,6 @@ int ffs_getcg(struct fs *, struct vnode *, u_int, int, struct cg **); intffs_isblock(struct fs *, u_char *, ufs1_daddr_t); intffs_isfreeblock(struct fs *, u_char *, ufs1_daddr_t); -intffs_load_inode(struct buf *, struct inode *, struct fs *, ino_t); void ffs_oldfscompat_write(struct fs *, struct ufsmount *); intffs_own_mount(const struct mount *mp); intffs_reallocblks(struct vop_reallocblks_args *); Modified: head/sys/ufs/ffs/ffs_subr.c == --- head/sys/ufs/ffs/ffs_subr.c Wed Jun 17 21:51:32 2020(r362291) +++ head/sys/ufs/ffs/ffs_subr.c Wed Jun 17 23:39:52 2020(r362292) @@ -67,7 +67,6 @@ struct malloc_type; #include #include #include -#include #include #include @@ -81,216 +80,6 @@ struct malloc_type; #define UFS_FREE(ptr, type) free(ptr, type) #define UFS_TIME time_second -/* - * Return buffer with the contents of block "offset" from the beginning of - * directory "ip". If "res" is non-zero, fill it in with a pointer to the - * remaining space in the directory. - */ -int -ffs_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp) -{ - struct inode *ip; - struct fs *fs; - struct buf *bp; - ufs_lbn_t lbn; - int bsize, error; - - ip = VTOI(vp); - fs = ITOFS(ip); - lbn = lblkno(fs, offset); - bsize = blksize(fs, ip, lbn); - - *bpp = NULL; - error = bread(vp, lbn, bsize, NOCRED, ); - if (error) { - return (error); - } - if (res) - *res = (char *)bp->b_data + blkoff(fs, offset); - *bpp = bp; - return (0); -} - -/* - * Load up the contents of an inode and copy the appropriate pieces - * to the incore copy. - */ -int -ffs_load_inode(struct buf *bp, struct inode *ip, struct fs *fs, ino_t ino) -{ - struct ufs1_dinode *dip1; - struct ufs2_dinode *dip2; - int error; - - if (I_IS_UFS1(ip)) { - dip1 = ip->i_din1; - *dip1 = - *((struct ufs1_dinode *)bp->b_data + ino_to_fsbo(fs, ino)); - ip->i_mode = dip1->di_mode; - ip->i_nlink = dip1->di_nlink; - ip->i_effnlink = dip1->di_nlink; - ip->i_size = dip1->di_size; - ip->i_flags = dip1->di_flags; - ip->i_gen = dip1->di_gen; - ip->i_uid = dip1->di_uid; - ip->i_gid = dip1->di_gid; - return (0); - } - dip2 = ((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ino)); - if ((error = ffs_verify_dinode_ckhash(fs, dip2)) != 0 && - !ffs_fsfail_cleanup(ITOUMP(ip), error)) { - printf("%s: inode %jd: check-hash failed\n", fs->fs_fsmnt, - (intmax_t)ino); - return (error); - } - *ip->i_din2 = *dip2; - dip2 = ip->i_din2; -
svn commit: r362290 - head/usr.bin/fstat
Author: 0mp (doc,ports committer) Date: Wed Jun 17 21:21:57 2020 New Revision: 362290 URL: https://svnweb.freebsd.org/changeset/base/362290 Log: Clean up fstat.1 - Sort options in the list & indent for readability. - Pet linters - Use "\(em" instead of "--" - Remove Tn macros - Use Ql instead of Dq Li - Add arguments to the -M, -N, -p, and -u options in their descriptions. - Use Sy instead of Li for field names. Li is deprecated, and Ql makes no sense here. - Replace a literal block with a list for the table of special names related to FD. - Use Ql instead of ``X''. - Add a dot after etc. - Reference fuser(1). MFC after:1 week Modified: head/usr.bin/fstat/fstat.1 Modified: head/usr.bin/fstat/fstat.1 == --- head/usr.bin/fstat/fstat.1 Wed Jun 17 21:04:38 2020(r362289) +++ head/usr.bin/fstat/fstat.1 Wed Jun 17 21:21:57 2020(r362290) @@ -28,7 +28,7 @@ .\" @(#)fstat.18.3 (Berkeley) 2/25/94 .\" $FreeBSD$ .\" -.Dd October 19, 2019 +.Dd June 17, 2020 .Dt FSTAT 1 .Os .Sh NAME @@ -54,7 +54,7 @@ If no options are specified, reports on all open files in the system. .Pp The following options are available: -.Bl -tag -width indent +.Bl -tag -width "-N system" .It Fl f Restrict examination to files open in the same file systems as the named file arguments, or to the file system containing the @@ -63,17 +63,17 @@ For example, to find all files open in the file system directory .Pa /usr/src resides, type -.Dq Li fstat -f /usr/src . -.It Fl M +.Ql fstat -f /usr/src . +.It Fl M Ar core Extract values associated with the name list from the specified core instead of the default .Pa /dev/kmem . -.It Fl N -Extract the name list from the specified system instead of the default, -which is the kernel image the system has booted from. .It Fl m Include memory-mapped files in the listing; normally these are excluded due to the extra processing required. +.It Fl N Ar system +Extract the name list from the specified system instead of the default, +which is the kernel image the system has booted from. .It Fl n Numerical format. Print the device number (maj,min) of the file system @@ -83,11 +83,11 @@ device number that the special device refers to rather in .Pa /dev ; and print the mode of the file in octal instead of symbolic form. -.It Fl p +.It Fl p Ar pid Report all files open by the specified process. .It Fl s Print socket endpoint information. -.It Fl u +.It Fl u Ar user Report all files open by the specified user. .It Fl v Verbose mode. @@ -108,46 +108,52 @@ Restrict reports to the specified files. .Pp The following fields are printed: .Bl -tag -width MOUNT -.It Li USER +.It Sy USER The username of the owner of the process (effective uid). -.It Li CMD +.It Sy CMD The command name of the process. -.It Li PID +.It Sy PID The process id. -.It Li FD +.It Sy FD The file number in the per-process open file table or one of the following special names: .Pp -.Bd -literal -offset indent -compact -jail - jail root directory -mmap - memory-mapped file -root - root inode -text - executable text inode -tr - kernel trace file -wd - current working directory -.Ed +.Bl -tag -offset indent -compact +.It Sy jail +jail root directory +.It Sy mmap +memory-mapped file +.It Sy root +root inode +.It Sy text +executable text inode +.It Sy tr +kernel trace file +.It Sy wd +current working directory +.El .Pp -If the file number is followed by an asterisk (``*''), the file is -not an inode, but rather a socket, -.Tn FIFO , -or there is an error. +If the file number is followed by an asterisk +.Pq Ql * , +the file is +not an inode, but rather a socket, FIFO, or there is an error. In this case the remainder of the line does not -correspond to the remaining headers -- the format of the line +correspond to the remaining headers\(em the format of the line is described later under .Sx SOCKETS . -.It Li MOUNT +.It Sy MOUNT If the .Fl n flag was not specified, this header is present and is the pathname that the file system the file resides in is mounted on. -.It Li DEV +.It Sy DEV If the .Fl n flag is specified, this header is present and is the number of the device that this file resides in. -.It Li INUM +.It Sy INUM The inode number of the file. -.It Li MODE +.It Sy MODE The mode of the file. If the .Fl n @@ -156,7 +162,7 @@ using a symbolic format (see .Xr strmode 3 ) ; otherwise, the mode is printed as an octal number. -.It Li SZ\&|DV +.It Sy SZ\&|DV If the file is a semaphore, prints the current value of the semaphore. If the file is not a character or block special, prints the size of @@ -171,13 +177,17 @@ located, or the .Fl n flag is specified, prints the major/minor device number that the special device refers to. -.It Li R/W +.It Sy R/W This column describes the access mode that the file allows. -The letter ``r''
svn commit: r362289 - head/sys/netinet
Author: bz Date: Wed Jun 17 21:04:38 2020 New Revision: 362289 URL: https://svnweb.freebsd.org/changeset/base/362289 Log: When converting the static arrays to mallocarray() in r356621 I missed one place where we now need to multiply the size of the struct with the number of entries. This lead to problems when restarting user space daemons, as the cleanup was never properly done, resulting in MRT_ADD_VIF EADDRINUSE. Properly zero all array elements to avoid this problem. PR: 246629, 206583 Reported by: (many) MFC after:4 days Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Modified: head/sys/netinet/ip_mroute.c Modified: head/sys/netinet/ip_mroute.c == --- head/sys/netinet/ip_mroute.cWed Jun 17 20:58:37 2020 (r362288) +++ head/sys/netinet/ip_mroute.cWed Jun 17 21:04:38 2020 (r362289) @@ -740,7 +740,7 @@ X_ip_mrouter_done(void) if_allmulti(ifp, 0); } } -bzero((caddr_t)V_viftable, sizeof(V_viftable)); +bzero((caddr_t)V_viftable, sizeof(V_viftable) * MAXVIFS); V_numvifs = 0; V_pim_assert_enabled = 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: r362288 - head/sys/netinet
Author: bz Date: Wed Jun 17 20:58:37 2020 New Revision: 362288 URL: https://svnweb.freebsd.org/changeset/base/362288 Log: The call into ifa_ifwithaddr() needs to be epoch protected; ortherwise we'll panic on an assertion. While here, leave a comment that the ifp was never protected and stable (as glebius pointed out) and this needs to be fixed properly. Discovered while working on: PR 246629 Reviewed by: glebius MFC after:4 days Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Modified: head/sys/netinet/ip_mroute.c Modified: head/sys/netinet/ip_mroute.c == --- head/sys/netinet/ip_mroute.cWed Jun 17 19:57:59 2020 (r362287) +++ head/sys/netinet/ip_mroute.cWed Jun 17 20:58:37 2020 (r362288) @@ -879,13 +879,19 @@ add_vif(struct vifctl *vifcp) */ ifp = NULL; } else { + struct epoch_tracker et; + sin.sin_addr = vifcp->vifc_lcl_addr; + NET_EPOCH_ENTER(et); ifa = ifa_ifwithaddr((struct sockaddr *)); if (ifa == NULL) { + NET_EPOCH_EXIT(et); VIF_UNLOCK(); return EADDRNOTAVAIL; } ifp = ifa->ifa_ifp; + /* XXX FIXME we need to take a ref on ifp and cleanup properly! */ + NET_EPOCH_EXIT(et); } if ((vifcp->vifc_flags & VIFF_TUNNEL) != 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: r362285 - head/sys/dev/pci
Author: andrew Date: Wed Jun 17 19:56:17 2020 New Revision: 362285 URL: https://svnweb.freebsd.org/changeset/base/362285 Log: Clean up the pci host generic driver - Support Prefetchable Memory. - Use the correct rman when allocating memory and ioports. - Translate PCI addresses in bus_alloc_resource to allow physical addresses that are different than pci addresses. Reviewed by: Robert Crowston Sponsored by: Innovate UK Differential Revision:https://reviews.freebsd.org/D25121 Modified: head/sys/dev/pci/pci_host_generic.c head/sys/dev/pci/pci_host_generic.h head/sys/dev/pci/pci_host_generic_acpi.c head/sys/dev/pci/pci_host_generic_fdt.c Modified: head/sys/dev/pci/pci_host_generic.c == --- head/sys/dev/pci/pci_host_generic.c Wed Jun 17 19:45:05 2020 (r362284) +++ head/sys/dev/pci/pci_host_generic.c Wed Jun 17 19:56:17 2020 (r362285) @@ -70,8 +70,11 @@ int pci_host_generic_core_attach(device_t dev) { struct generic_pcie_core_softc *sc; + uint64_t phys_base; + uint64_t pci_base; + uint64_t size; int error; - int rid; + int rid, tuple; sc = device_get_softc(dev); sc->dev = dev; @@ -101,12 +104,23 @@ pci_host_generic_core_attach(device_t dev) sc->bst = rman_get_bustag(sc->res); sc->bsh = rman_get_bushandle(sc->res); + sc->has_pmem = false; + sc->pmem_rman.rm_type = RMAN_ARRAY; + sc->pmem_rman.rm_descr = "PCIe Prefetch Memory"; + sc->mem_rman.rm_type = RMAN_ARRAY; sc->mem_rman.rm_descr = "PCIe Memory"; + sc->io_rman.rm_type = RMAN_ARRAY; sc->io_rman.rm_descr = "PCIe IO window"; /* Initialize rman and allocate memory regions */ + error = rman_init(>pmem_rman); + if (error) { + device_printf(dev, "rman_init() failed. error = %d\n", error); + return (error); + } + error = rman_init(>mem_rman); if (error) { device_printf(dev, "rman_init() failed. error = %d\n", error); @@ -119,6 +133,39 @@ pci_host_generic_core_attach(device_t dev) return (error); } + for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) { + phys_base = sc->ranges[tuple].phys_base; + pci_base = sc->ranges[tuple].pci_base; + size = sc->ranges[tuple].size; + if (phys_base == 0 || size == 0) + continue; /* empty range element */ + switch (FLAG_TYPE(sc->ranges[tuple].flags)) { + case FLAG_TYPE_PMEM: + sc->has_pmem = true; + error = rman_manage_region(>pmem_rman, + phys_base, phys_base + size - 1); + break; + case FLAG_TYPE_MEM: + error = rman_manage_region(>mem_rman, + phys_base, phys_base + size - 1); + break; + case FLAG_TYPE_IO: + error = rman_manage_region(>io_rman, + phys_base, phys_base + size - 1); + break; + default: + continue; + } + if (error) { + device_printf(dev, "rman_manage_region() failed." + "error = %d\n", error); + rman_fini(>pmem_rman); + rman_fini(>mem_rman); + rman_fini(>io_rman); + return (error); + } + } + return (0); } @@ -236,13 +283,15 @@ generic_pcie_write_ivar(device_t dev, device_t child, } static struct rman * -generic_pcie_rman(struct generic_pcie_core_softc *sc, int type) +generic_pcie_rman(struct generic_pcie_core_softc *sc, int type, int flags) { switch (type) { case SYS_RES_IOPORT: return (>io_rman); case SYS_RES_MEMORY: + if (sc->has_pmem && (flags & RF_PREFETCHABLE) != 0) + return (>pmem_rman); return (>mem_rman); default: break; @@ -266,7 +315,7 @@ pci_host_generic_core_release_resource(device_t dev, d } #endif - rm = generic_pcie_rman(sc, type); + rm = generic_pcie_rman(sc, type, rman_get_flags(res)); if (rm != NULL) { KASSERT(rman_is_region_manager(res, rm), ("rman mismatch")); rman_release_resource(res); @@ -282,6 +331,11 @@ pci_host_generic_core_alloc_resource(device_t dev, dev struct generic_pcie_core_softc *sc; struct resource *res; struct rman *rm; + uint64_t phys_base; + uint64_t pci_base; + uint64_t size; + int i, space; + bool found; sc = device_get_softc(dev); @@
svn commit: r362284 - head/sys/arm64/arm64
Author: andrew Date: Wed Jun 17 19:45:05 2020 New Revision: 362284 URL: https://svnweb.freebsd.org/changeset/base/362284 Log: Support pmap_extract_and_hold on arm64 stage 2 mappings Sponsored by: Innovate UK Differential Revision:https://reviews.freebsd.org/D24469 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Wed Jun 17 18:47:59 2020(r362283) +++ head/sys/arm64/arm64/pmap.c Wed Jun 17 19:45:05 2020(r362284) @@ -1228,9 +1228,8 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ vm_offset_t off; vm_page_t m; int lvl; + bool use; - PMAP_ASSERT_STAGE1(pmap); - m = NULL; PMAP_LOCK(pmap); pte = pmap_pte(pmap, va, ); @@ -1244,8 +1243,19 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_ (lvl < 3 && (tpte & ATTR_DESCR_MASK) == L1_BLOCK), ("pmap_extract_and_hold: Invalid pte at L%d: %lx", lvl, tpte & ATTR_DESCR_MASK)); - if (((tpte & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP(ATTR_S1_AP_RW)) || - ((prot & VM_PROT_WRITE) == 0)) { + + use = false; + if ((prot & VM_PROT_WRITE) == 0) + use = true; + else if (pmap->pm_stage == PM_STAGE1 && + (tpte & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP(ATTR_S1_AP_RW)) + use = true; + else if (pmap->pm_stage == PM_STAGE2 && + ((tpte & ATTR_S2_S2AP(ATTR_S2_S2AP_WRITE)) == +ATTR_S2_S2AP(ATTR_S2_S2AP_WRITE))) + use = true; + + if (use) { switch(lvl) { case 1: off = va & L1_OFFSET; ___ 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: r361967 - head/sys/kern
On 6/17/20 9:39 AM, Kyle Evans wrote: > On Wed, Jun 17, 2020 at 10:21 AM Mateusz Guzik wrote: >> >> pho@ reported triggering one of the asserts: >> https://people.freebsd.org/~pho/stress/log/mjguzik028.txt >> >> I did not have the time to properly investigate this yet and this does >> not reproduce for me. >> > > Ah, this is good to know that he's reproduced it. There's only so many > places that we touch these. I can't quite envision how, but the only > scenario this would seem to be possible in is doenterpgrp() -> > fixjobc(p, p->p_grp, 0) -> adjusts some child with a different process > group without actually changing it, orphans the group, then we manage > to finalize killjobc() on a freshly-orphaned process, which hasn't had > its p_pgrp nullified. > > I haven't yet traced it through completely enough to determine if > there's any way that can even happen. I reproduced it three times yesterday in a head VM by exiting GDB while it was attached to a live process (which kills the process), something like: gdb /bin/ls start ^D Should be enough to reproduce. -- John Baldwin ___ 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: r362282 - head/sys/dev/nvme
Author: mav Date: Wed Jun 17 17:51:40 2020 New Revision: 362282 URL: https://svnweb.freebsd.org/changeset/base/362282 Log: Fix admin qpair leak if detached during initial reset. MFC after:1 week Sponsored by: iXsystems, Inc. Modified: head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/nvme/nvme_qpair.c Modified: head/sys/dev/nvme/nvme_ctrlr.c == --- head/sys/dev/nvme/nvme_ctrlr.c Wed Jun 17 16:22:08 2020 (r362281) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed Jun 17 17:51:40 2020 (r362282) @@ -1458,8 +1458,8 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, dev nvme_io_qpair_destroy(>ioq[i]); free(ctrlr->ioq, M_NVME); nvme_ctrlr_hmb_free(ctrlr); - nvme_admin_qpair_destroy(>adminq); } + nvme_admin_qpair_destroy(>adminq); /* * Notify the controller of a shutdown, even though this is due to Modified: head/sys/dev/nvme/nvme_qpair.c == --- head/sys/dev/nvme/nvme_qpair.c Wed Jun 17 16:22:08 2020 (r362281) +++ head/sys/dev/nvme/nvme_qpair.c Wed Jun 17 17:51:40 2020 (r362282) @@ -729,6 +729,8 @@ nvme_qpair_construct(struct nvme_qpair *qpair, if (bus_dmamap_load(qpair->dma_tag, qpair->queuemem_map, queuemem, allocsz, nvme_single_map, _phys, 0) != 0) { nvme_printf(ctrlr, "failed to load qpair memory\n"); + bus_dmamem_free(qpair->dma_tag, qpair->cmd, + qpair->queuemem_map); goto out; } @@ -811,24 +813,15 @@ nvme_qpair_destroy(struct nvme_qpair *qpair) { struct nvme_tracker *tr; - if (qpair->tag) + if (qpair->tag) { bus_teardown_intr(qpair->ctrlr->dev, qpair->res, qpair->tag); - - if (mtx_initialized(>lock)) - mtx_destroy(>lock); - - if (qpair->res) - bus_release_resource(qpair->ctrlr->dev, SYS_RES_IRQ, - rman_get_rid(qpair->res), qpair->res); - - if (qpair->cmd != NULL) { - bus_dmamap_unload(qpair->dma_tag, qpair->queuemem_map); - bus_dmamem_free(qpair->dma_tag, qpair->cmd, - qpair->queuemem_map); + qpair->tag = NULL; } - if (qpair->act_tr) + if (qpair->act_tr) { free_domain(qpair->act_tr, M_NVME); + qpair->act_tr = NULL; + } while (!TAILQ_EMPTY(>free_tr)) { tr = TAILQ_FIRST(>free_tr); @@ -838,11 +831,31 @@ nvme_qpair_destroy(struct nvme_qpair *qpair) free_domain(tr, M_NVME); } - if (qpair->dma_tag) + if (qpair->cmd != NULL) { + bus_dmamap_unload(qpair->dma_tag, qpair->queuemem_map); + bus_dmamem_free(qpair->dma_tag, qpair->cmd, + qpair->queuemem_map); + qpair->cmd = NULL; + } + + if (qpair->dma_tag) { bus_dma_tag_destroy(qpair->dma_tag); + qpair->dma_tag = NULL; + } - if (qpair->dma_tag_payload) + if (qpair->dma_tag_payload) { bus_dma_tag_destroy(qpair->dma_tag_payload); + qpair->dma_tag_payload = NULL; + } + + if (mtx_initialized(>lock)) + mtx_destroy(>lock); + + if (qpair->res) { + bus_release_resource(qpair->ctrlr->dev, SYS_RES_IRQ, + rman_get_rid(qpair->res), qpair->res); + qpair->res = NULL; + } } static void ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r362126 - head/sys/vm
On 6/12/20 3:33 PM, Conrad Meyer wrote: > On Fri, Jun 12, 2020 at 2:53 PM Eric van Gyzen wrote: >> Honor db_pager_quit in some vm_object ddb commands >> >> These can be rather verbose. > > We also have this (?)hack in OneFS, which eliminates the need for > every debug function to check the db_pager globals: > > https://people.freebsd.org/~cem/db_pager.patch > > I'm not sure how objectionable it is. I don't think this addresses that. I think this patch makes printf turn into db_printf when a function is invoked from DDB which is orthogonal. db_printf() itself doesn't check the pager. -- John Baldwin ___ 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: r361967 - head/sys/kern
On Wed, Jun 17, 2020 at 10:21 AM Mateusz Guzik wrote: > > pho@ reported triggering one of the asserts: > https://people.freebsd.org/~pho/stress/log/mjguzik028.txt > > I did not have the time to properly investigate this yet and this does > not reproduce for me. > Ah, this is good to know that he's reproduced it. There's only so many places that we touch these. I can't quite envision how, but the only scenario this would seem to be possible in is doenterpgrp() -> fixjobc(p, p->p_grp, 0) -> adjusts some child with a different process group without actually changing it, orphans the group, then we manage to finalize killjobc() on a freshly-orphaned process, which hasn't had its p_pgrp nullified. I haven't yet traced it through completely enough to determine if there's any way that can even happen. > That said, I may either revert the assert (or degrade to a warning) or > add some commentary if I don't sort this out this week. > > On 6/17/20, Kyle Evans wrote: > > On Tue, Jun 9, 2020 at 10:17 AM Mateusz Guzik wrote: > >> > >> Author: mjg > >> Date: Tue Jun 9 15:17:23 2020 > >> New Revision: 361967 > >> URL: https://svnweb.freebsd.org/changeset/base/361967 > >> > >> Log: > >> Assert on pg_jobc state. > >> > >> Stolen from NetBSD. > >> > >> Modified: > >> head/sys/kern/kern_proc.c > >> > >> Modified: head/sys/kern/kern_proc.c > >> == > >> --- head/sys/kern/kern_proc.c Tue Jun 9 14:20:16 2020(r361966) > >> +++ head/sys/kern/kern_proc.c Tue Jun 9 15:17:23 2020(r361967) > >> @@ -751,9 +751,11 @@ pgadjustjobc(struct pgrp *pgrp, int entering) > >> { > >> > >> PGRP_LOCK(pgrp); > >> - if (entering) > >> + if (entering) { > >> + MPASS(pgrp->pg_jobc >= 0); > >> pgrp->pg_jobc++; > >> - else { > >> + } else { > >> + MPASS(pgrp->pg_jobc > 0); > >> --pgrp->pg_jobc; > >> if (pgrp->pg_jobc == 0) > >> orphanpg(pgrp); > > > > We seem to be doing something wrong here, but I'm still working on > > reproducing it on a machine that actually has usable swap configured > > to get a dump. I've hit one of these asserts just from hitting the > > power button to shutoff from within xfce (hitting the latter branch > > with pgrp->pg_jobc == 0 IIRC) and another laptop panicked sometime > > overnight -- I wasn't able to catch the second one at all, because > > it's hooked up to a switch that loses its mind once that laptop > > panicks and it had to be rebooted before I could attend to it to > > revive network for the other machines on the switch. > > > > Thanks, > > > > Kyle Evans > > > > > -- > Mateusz Guzik ___ 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: r362280 - in head/sys/fs: nfs nfsclient nfsserver
Author: asomers Date: Wed Jun 17 16:20:19 2020 New Revision: 362280 URL: https://svnweb.freebsd.org/changeset/base/362280 Log: Remove vfs_statfs and vnode_mount macros from NFS These macro definitions are no longer needed as the NFS OSX port is long dead. The vfs_statfs macro conflicts with the vfsops field of the same name. Submitted by: shivank@ Reviewed by: rmacklem MFC after:2 weeks Sponsored by: Google, Inc. (GSoC 2020) Differential Revision:https://reviews.freebsd.org/D25263 Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfsdport.h head/sys/fs/nfs/nfskpiport.h head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsserver/nfs_nfsdserv.c Modified: head/sys/fs/nfs/nfs_commonsubs.c == --- head/sys/fs/nfs/nfs_commonsubs.cWed Jun 17 15:57:59 2020 (r362279) +++ head/sys/fs/nfs/nfs_commonsubs.cWed Jun 17 16:20:19 2020 (r362280) @@ -1402,9 +1402,9 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, if (compare) { if (*retcmpp == 0) { if (thyp != (u_int64_t) - vfs_statfs(vnode_mount(vp))->f_fsid.val[0] || + vp->v_mount->mnt_stat.f_fsid.val[0] || thyp2 != (u_int64_t) - vfs_statfs(vnode_mount(vp))->f_fsid.val[1]) + vp->v_mount->mnt_stat.f_fsid.val[1]) *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { @@ -1876,7 +1876,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, */ savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; - if (!VFS_QUOTACTL(vnode_mount(vp),QCMD(Q_GETQUOTA, + if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA, USRQUOTA), cred->cr_uid, (caddr_t))) freenum = min(dqb.dqb_bhardlimit, freenum); p->p_cred->p_ruid = savuid; @@ -1905,7 +1905,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, */ savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; - if (!VFS_QUOTACTL(vnode_mount(vp),QCMD(Q_GETQUOTA, + if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA, USRQUOTA), cred->cr_uid, (caddr_t))) freenum = min(dqb.dqb_bsoftlimit, freenum); p->p_cred->p_ruid = savuid; @@ -1931,7 +1931,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, */ savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; - if (!VFS_QUOTACTL(vnode_mount(vp),QCMD(Q_GETQUOTA, + if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA, USRQUOTA), cred->cr_uid, (caddr_t))) freenum = dqb.dqb_curblocks; p->p_cred->p_ruid = savuid; Modified: head/sys/fs/nfs/nfsdport.h == --- head/sys/fs/nfs/nfsdport.h Wed Jun 17 15:57:59 2020(r362279) +++ head/sys/fs/nfs/nfsdport.h Wed Jun 17 16:20:19 2020(r362280) @@ -101,12 +101,6 @@ struct nfsexstuff { (n)->cn_flags = (f);\ } while (0) -/* - * A little bit of Darwin vfs kpi. - */ -#definevnode_mount(v) ((v)->v_mount) -#definevfs_statfs(m) (&((m)->mnt_stat)) - #defineNFSPATHLEN_Tsize_t /* Modified: head/sys/fs/nfs/nfskpiport.h == --- head/sys/fs/nfs/nfskpiport.hWed Jun 17 15:57:59 2020 (r362279) +++ head/sys/fs/nfs/nfskpiport.hWed Jun 17 16:20:19 2020 (r362280) @@ -36,11 +36,9 @@ * Darwin8 and hopefully subsequent releases from Apple.) */ typedefstruct mount * mount_t; -#definevfs_statfs(m) (&((m)->mnt_stat)) #definevfs_flags(m)((m)->mnt_flag) typedef struct vnode * vnode_t; -#definevnode_mount(v) ((v)->v_mount) #definevnode_vtype(v) ((v)->v_type) #endif /* _NFS_NFSKPIPORT_H */ Modified: head/sys/fs/nfs/nfsport.h
Re: svn commit: r362261 - head/contrib/file/magic/Magdir
Hi, On 6/17/20 3:11 AM, Antoine Brodin wrote: > Author: antoine > Date: Wed Jun 17 10:11:54 2020 > New Revision: 362261 > URL: https://svnweb.freebsd.org/changeset/base/362261 > > Log: > Re-apply r333944 to unbreak ports Could you please file a bug against the upstream (Christos cc'ed), as it may also affect other users? > Modified: > head/contrib/file/magic/Magdir/elf > > Modified: head/contrib/file/magic/Magdir/elf > == > --- head/contrib/file/magic/Magdir/elfWed Jun 17 08:35:35 2020 > (r362260) > +++ head/contrib/file/magic/Magdir/elfWed Jun 17 10:11:54 2020 > (r362261) > @@ -50,9 +50,8 @@ > !:mime application/x-object > >16 leshort 2 executable, > !:mime application/x-executable > ->16 leshort 3 ${x?pie executable:shared object}, > - > -!:mime application/x-${x?pie-executable:sharedlib} > +>16 leshort 3 shared object, > +!:mime application/x-sharedlib > >16 leshort 4 core file, > !:mime application/x-coredump > # OS-specific > signature.asc Description: OpenPGP digital signature
Re: svn commit: r362217 - head/stand/common
[ Charset UTF-8 unsupported, converting... ] > On Tue, Jun 16, 2020 at 8:33 PM Ian Lepore wrote: > > > On Tue, 2020-06-16 at 19:34 +0200, Kristof Provost wrote: > > > On 16 Jun 2020, at 19:11, Ed Maste wrote: > > > > On Tue, 16 Jun 2020 at 13:01, Ian Lepore wrote: > > > > > > > > > > As much as I prefer doing it this way, style(9) doesn't allow for > > > > > variable declarations inside a for() statement (or even inside a > > > > > local > > > > > block, which is just too 1980s for me, but it is still our standard). > > > > > > > > Perhaps it's time to update style(9) to at least permit these uses, as > > > > we've done with the blank line at the beginning of functions with no > > > > local variables, and with braces around single-line bodies. > > > > > > We have 431 instances of `for (int i` in sys alone. It?s not so much a > > > question of allowing it as acknowledging reality at this point. > > > > > > Best regards, > > > Kristof > > > > Hmm, so we do. If you weed out sys/contrib, and device drivers > > contributed by vendors, the number is a lot smaller, but still big > > enough that we should just change the rules I think. > > > > We should definitely just change the rules. There's no point in > prohibiting it. Contributors have already voted with their feet > > diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 > index 4e801bbcbe70..fd23d573eb00 100644 > --- a/share/man/man9/style.9 > +++ b/share/man/man9/style.9 > @@ -592,8 +592,6 @@ not > Parts of a > .Ic for > loop may be left empty. > -Do not put declarations > -inside blocks unless the routine is unusually complicated. Perhaps some wording here that makes it explicit that block scope variables are allowed, and that the for() case is allowed. > .Bd -literal > for (; cnt < 15; cnt++) { + for (int cnt = 0; cnt < 15; cnt++) { + char *p; > stmt1; This updates the example to reflect the new accepted style. > > Although the block doesn't start until { so int i; in the commit > technically doesn't violate this rule. We violate it in dozens of other > ways than this. I think it violates some other rule about declarations being in order of size sorted at the top of a routine, perhaps that needs looked at as well for some change. > Warner -- Rod Grimes rgri...@freebsd.org ___ 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: r362279 - head/lib/libmagic
Author: delphij Date: Wed Jun 17 15:57:59 2020 New Revision: 362279 URL: https://svnweb.freebsd.org/changeset/base/362279 Log: Fix installation of magic file. Reported by: lwhsu MFC after:2 weeks X-MFC-with: r362258 Modified: head/lib/libmagic/Makefile Modified: head/lib/libmagic/Makefile == --- head/lib/libmagic/Makefile Wed Jun 17 15:54:51 2020(r362278) +++ head/lib/libmagic/Makefile Wed Jun 17 15:57:59 2020(r362279) @@ -86,7 +86,7 @@ ${inc}: ${inc}.in sed -e 's,X.YY,${FILEVER:S,",,g:S,.,,g},g' ${.ALLSRC} > ${.TARGET} .endfor -FILES= libmagic.pc -FILESDIR= ${LIBDATADIR}/pkgconfig +FILES+=libmagic.pc +FILESDIR_libmagic.pc= ${LIBDATADIR}/pkgconfig .include ___ 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: r362278 - in head/sys: arm64/coresight conf
Author: br Date: Wed Jun 17 15:54:51 2020 New Revision: 362278 URL: https://svnweb.freebsd.org/changeset/base/362278 Log: Complete the ACPI support for ARM Coresight: o Parse the ACPI DSD (Device Specific Data) graph property and record device connections. o Split-out FDT support to a separate file. o Get the corresponding (FDT/ACPI) Coresight platform data in the device drivers. Sponsored by: DARPA, AFRL Added: head/sys/arm64/coresight/coresight_acpi.c (contents, props changed) head/sys/arm64/coresight/coresight_fdt.c (contents, props changed) Modified: head/sys/arm64/coresight/coresight.c head/sys/arm64/coresight/coresight.h head/sys/arm64/coresight/coresight_cmd.c head/sys/arm64/coresight/coresight_cpu_debug.c head/sys/arm64/coresight/coresight_etm4x.c head/sys/arm64/coresight/coresight_etm4x.h head/sys/arm64/coresight/coresight_etm4x_acpi.c head/sys/arm64/coresight/coresight_etm4x_fdt.c head/sys/arm64/coresight/coresight_funnel.c head/sys/arm64/coresight/coresight_funnel.h head/sys/arm64/coresight/coresight_funnel_acpi.c head/sys/arm64/coresight/coresight_funnel_fdt.c head/sys/arm64/coresight/coresight_replicator.c head/sys/arm64/coresight/coresight_replicator.h head/sys/arm64/coresight/coresight_replicator_acpi.c head/sys/arm64/coresight/coresight_replicator_fdt.c head/sys/arm64/coresight/coresight_tmc.c head/sys/arm64/coresight/coresight_tmc.h head/sys/arm64/coresight/coresight_tmc_acpi.c head/sys/arm64/coresight/coresight_tmc_fdt.c head/sys/conf/files.arm64 Modified: head/sys/arm64/coresight/coresight.c == --- head/sys/arm64/coresight/coresight.cWed Jun 17 15:27:45 2020 (r362277) +++ head/sys/arm64/coresight/coresight.cWed Jun 17 15:54:51 2020 (r362278) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2018 Ruslan Bukin + * Copyright (c) 2018-2020 Ruslan Bukin * All rights reserved. * * This software was developed by SRI International and the University of @@ -41,78 +41,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include - #include -MALLOC_DEFINE(M_CORESIGHT, "coresight", "ARM Coresight"); static struct mtx cs_mtx; - struct coresight_device_list cs_devs; -static int -coresight_get_ports(phandle_t dev_node, -struct coresight_platform_data *pdata) -{ - phandle_t node, child; - pcell_t port_reg; - phandle_t xref; - char *name; - int ret; - phandle_t endpoint_child; - struct endpoint *endp; - - child = ofw_bus_find_child(dev_node, "ports"); - if (child) - node = child; - else - node = dev_node; - - for (child = OF_child(node); child != 0; child = OF_peer(child)) { - ret = OF_getprop_alloc(child, "name", (void **)); - if (ret == -1) - continue; - - if (strcasecmp(name, "port") || - strncasecmp(name, "port@", 6)) { - - port_reg = -1; - OF_getencprop(child, "reg", (void *)_reg, - sizeof(port_reg)); - - endpoint_child = ofw_bus_find_child(child, "endpoint"); - if (endpoint_child) { - if (OF_getencprop(endpoint_child, - "remote-endpoint", , - sizeof(xref)) == -1) { - printf("failed\n"); - continue; - } - endp = malloc(sizeof(struct endpoint), - M_CORESIGHT, M_WAITOK | M_ZERO); - endp->my_node = endpoint_child; - endp->their_node = OF_node_from_xref(xref); - endp->dev_node = dev_node; - endp->reg = port_reg; - if (OF_getproplen(endpoint_child, - "slave-mode") >= 0) { - pdata->in_ports++; - endp->slave = 1; - } else - pdata->out_ports++; - - mtx_lock(>mtx_lock); - TAILQ_INSERT_TAIL(>endpoints, - endp, link); - mtx_unlock(>mtx_lock); - } - } - } - - return (0); -} - int coresight_register(struct coresight_desc *desc) { @@ -121,7 +54,6 @@ coresight_register(struct coresight_desc *desc) cs_dev = malloc(sizeof(struct coresight_device), M_CORESIGHT, M_WAITOK | M_ZERO); cs_dev->dev = desc->dev; - cs_dev->node =
svn commit: r362277 - head/sys/netinet
Author: tuexen Date: Wed Jun 17 15:27:45 2020 New Revision: 362277 URL: https://svnweb.freebsd.org/changeset/base/362277 Log: Allow the self reference to be NULL in case the timer was stopped. Submitted by: Timo Voelker MFC after:1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c == --- head/sys/netinet/sctputil.c Wed Jun 17 13:46:05 2020(r362276) +++ head/sys/netinet/sctputil.c Wed Jun 17 15:27:45 2020(r362277) @@ -1730,7 +1730,7 @@ sctp_timeout_handler(void *t) #endif /* sanity checks... */ - KASSERT(tmr->self == tmr, + KASSERT(tmr->self == NULL || tmr->self == tmr, ("sctp_timeout_handler: tmr->self corrupted")); KASSERT(SCTP_IS_TIMER_TYPE_VALID(tmr->type), ("sctp_timeout_handler: invalid timer type %d", tmr->type)); ___ 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: r361967 - head/sys/kern
pho@ reported triggering one of the asserts: https://people.freebsd.org/~pho/stress/log/mjguzik028.txt I did not have the time to properly investigate this yet and this does not reproduce for me. That said, I may either revert the assert (or degrade to a warning) or add some commentary if I don't sort this out this week. On 6/17/20, Kyle Evans wrote: > On Tue, Jun 9, 2020 at 10:17 AM Mateusz Guzik wrote: >> >> Author: mjg >> Date: Tue Jun 9 15:17:23 2020 >> New Revision: 361967 >> URL: https://svnweb.freebsd.org/changeset/base/361967 >> >> Log: >> Assert on pg_jobc state. >> >> Stolen from NetBSD. >> >> Modified: >> head/sys/kern/kern_proc.c >> >> Modified: head/sys/kern/kern_proc.c >> == >> --- head/sys/kern/kern_proc.c Tue Jun 9 14:20:16 2020(r361966) >> +++ head/sys/kern/kern_proc.c Tue Jun 9 15:17:23 2020(r361967) >> @@ -751,9 +751,11 @@ pgadjustjobc(struct pgrp *pgrp, int entering) >> { >> >> PGRP_LOCK(pgrp); >> - if (entering) >> + if (entering) { >> + MPASS(pgrp->pg_jobc >= 0); >> pgrp->pg_jobc++; >> - else { >> + } else { >> + MPASS(pgrp->pg_jobc > 0); >> --pgrp->pg_jobc; >> if (pgrp->pg_jobc == 0) >> orphanpg(pgrp); > > We seem to be doing something wrong here, but I'm still working on > reproducing it on a machine that actually has usable swap configured > to get a dump. I've hit one of these asserts just from hitting the > power button to shutoff from within xfce (hitting the latter branch > with pgrp->pg_jobc == 0 IIRC) and another laptop panicked sometime > overnight -- I wasn't able to catch the second one at all, because > it's hooked up to a switch that loses its mind once that laptop > panicks and it had to be rebooted before I could attend to it to > revive network for the other machines on the switch. > > Thanks, > > Kyle Evans > -- Mateusz Guzik ___ 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: r361967 - head/sys/kern
On Tue, Jun 9, 2020 at 10:17 AM Mateusz Guzik wrote: > > Author: mjg > Date: Tue Jun 9 15:17:23 2020 > New Revision: 361967 > URL: https://svnweb.freebsd.org/changeset/base/361967 > > Log: > Assert on pg_jobc state. > > Stolen from NetBSD. > > Modified: > head/sys/kern/kern_proc.c > > Modified: head/sys/kern/kern_proc.c > == > --- head/sys/kern/kern_proc.c Tue Jun 9 14:20:16 2020(r361966) > +++ head/sys/kern/kern_proc.c Tue Jun 9 15:17:23 2020(r361967) > @@ -751,9 +751,11 @@ pgadjustjobc(struct pgrp *pgrp, int entering) > { > > PGRP_LOCK(pgrp); > - if (entering) > + if (entering) { > + MPASS(pgrp->pg_jobc >= 0); > pgrp->pg_jobc++; > - else { > + } else { > + MPASS(pgrp->pg_jobc > 0); > --pgrp->pg_jobc; > if (pgrp->pg_jobc == 0) > orphanpg(pgrp); We seem to be doing something wrong here, but I'm still working on reproducing it on a machine that actually has usable swap configured to get a dump. I've hit one of these asserts just from hitting the power button to shutoff from within xfce (hitting the latter branch with pgrp->pg_jobc == 0 IIRC) and another laptop panicked sometime overnight -- I wasn't able to catch the second one at all, because it's hooked up to a switch that loses its mind once that laptop panicks and it had to be rebooted before I could attend to it to revive network for the other machines on the switch. Thanks, Kyle Evans ___ 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: r362275 - head/sys/netinet
Author: thj Date: Wed Jun 17 13:27:13 2020 New Revision: 362275 URL: https://svnweb.freebsd.org/changeset/base/362275 Log: Add header definition for RFC4340, Datagram Congestion Control Protocol Add a header definition for DCCP as defined in RFC4340. This header definition is required to perform validation when receiving and forwarding DCCP packets. We do not currently support DCCP. Reviewed by: gallatin, bz Approved by: bz (co-mentor) MFC after:1 week MFC with: 350749 Differential Revision:https://reviews.freebsd.org/D21179 Added: head/sys/netinet/dccp.h (contents, props changed) Added: head/sys/netinet/dccp.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/dccp.h Wed Jun 17 13:27:13 2020(r362275) @@ -0,0 +1,78 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Tom Jones + * + * 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 _NETINET_DCCP_H_ +#define _NETINET_DCCP_H_ + +/* DCCP protocol header as per RFC4340 */ +struct dccphdr { + uint16_td_sport; + uint16_td_dport; + uint8_t d_doff; +#if BYTE_ORDER == LITTLE_ENDIAN + uint8_t d_cscov:4, + d_ccval:4; +#endif +#if BYTE_ORDER == BIG_ENDIAN + uint8_t d_ccval:4, + d_cscov:4; +#endif + uint8_t d_cksum[2]; +#if BYTE_ORDER == LITTLE_ENDIAN + uint8_t d_res:3, + d_type:4, + d_x:1; +#endif +#if BYTE_ORDER == BIG_ENDIAN + uint8_t d_x:1, + d_type:4, + d_res:3; +#endif + /* +* Provide enough space for both the short (24 bit) sequence number and +* the long (48 bit) sequene number and a leading reserved byte in +* front of the long sequence number. +*/ + union dccp_seqno { + uint8_t shortseq[3]; + struct dccp_long_seqno { + uint8_t res; + uint8_t seq[6]; + } longseq; + } d_seqno; +}; + +#define d_seqno_short d_seqno.shortseq; +#define d_seqno_long d_seqno.longseq.seq; + +#define DCCP_SHORTHDR 12 +#define DCCP_LONGHDR 16 +#define DCCP_EXTHDR0x80 + +#endif /* _NETINET_DCCP_H */ ___ 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: r362274 - head/contrib/tzcode/stdtime
Author: gbe (doc committer) Date: Wed Jun 17 11:57:48 2020 New Revision: 362274 URL: https://svnweb.freebsd.org/changeset/base/362274 Log: ctime(3): Bump .Dd after r362165 Reported by: bcr (mentor) Reviewed by: bcr (mentor) Approved by: bcr (mentor) X-MFC-With: r362165 Modified: head/contrib/tzcode/stdtime/ctime.3 Modified: head/contrib/tzcode/stdtime/ctime.3 == --- head/contrib/tzcode/stdtime/ctime.3 Wed Jun 17 11:56:10 2020 (r362273) +++ head/contrib/tzcode/stdtime/ctime.3 Wed Jun 17 11:57:48 2020 (r362274) @@ -30,7 +30,7 @@ .\" From: @(#)ctime.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 22, 2020 +.Dd June 14, 2020 .Dt CTIME 3 .Os .Sh NAME ___ 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: r362273 - head/sys/arm64/include
Author: andrew Date: Wed Jun 17 11:56:10 2020 New Revision: 362273 URL: https://svnweb.freebsd.org/changeset/base/362273 Log: Add all the TCR_EL1 fields These will be used when adding support for new Armv8 extensions. Sponsored by: Innovate UK Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm64/include/armreg.h == --- head/sys/arm64/include/armreg.h Wed Jun 17 11:14:54 2020 (r362272) +++ head/sys/arm64/include/armreg.h Wed Jun 17 11:56:10 2020 (r362273) @@ -736,61 +736,108 @@ #definePSR_FLAGS 0xf000 /* TCR_EL1 - Translation Control Register */ -#defineTCR_HD_SHIFT40 -#defineTCR_HD (0x1UL << TCR_HD_SHIFT) -#defineTCR_HA_SHIFT39 -#defineTCR_HA (0x1UL << TCR_HA_SHIFT) +/* Bits 63:59 are reserved */ +#defineTCR_TCMA1_SHIFT 58 +#defineTCR_TCMA1 (1UL << TCR_TCMA1_SHIFT) +#defineTCR_TCMA0_SHIFT 57 +#defineTCR_TCMA0 (1UL << TCR_TCMA0_SHIFT) +#defineTCR_E0PD1_SHIFT 56 +#defineTCR_E0PD1 (1UL << TCR_E0PD1_SHIFT) +#defineTCR_E0PD0_SHIFT 55 +#defineTCR_E0PD0 (1UL << TCR_E0PD0_SHIFT) +#defineTCR_NFD1_SHIFT 54 +#defineTCR_NFD1(1UL << TCR_NFD1_SHIFT) +#defineTCR_NFD0_SHIFT 53 +#defineTCR_NFD0(1UL << TCR_NFD0_SHIFT) +#defineTCR_TBID1_SHIFT 52 +#defineTCR_TBID1 (1UL << TCR_TBID1_SHIFT) +#defineTCR_TBID0_SHIFT 51 +#defineTCR_TBID0 (1UL << TCR_TBID0_SHIFT) +#defineTCR_HWU162_SHIFT50 +#defineTCR_HWU162 (1UL << TCR_HWU162_SHIFT) +#defineTCR_HWU161_SHIFT49 +#defineTCR_HWU161 (1UL << TCR_HWU161_SHIFT) +#defineTCR_HWU160_SHIFT48 +#defineTCR_HWU160 (1UL << TCR_HWU160_SHIFT) +#defineTCR_HWU159_SHIFT47 +#defineTCR_HWU159 (1UL << TCR_HWU159_SHIFT) +#defineTCR_HWU1\ +(TCR_HWU159 | TCR_HWU160 | TCR_HWU161 | TCR_HWU162) +#defineTCR_HWU062_SHIFT46 +#defineTCR_HWU062 (1UL << TCR_HWU062_SHIFT) +#defineTCR_HWU061_SHIFT45 +#defineTCR_HWU061 (1UL << TCR_HWU061_SHIFT) +#defineTCR_HWU060_SHIFT44 +#defineTCR_HWU060 (1UL << TCR_HWU060_SHIFT) +#defineTCR_HWU059_SHIFT43 +#defineTCR_HWU059 (1UL << TCR_HWU059_SHIFT) +#defineTCR_HWU0\ +(TCR_HWU059 | TCR_HWU060 | TCR_HWU061 | TCR_HWU062) +#defineTCR_HPD1_SHIFT 42 +#defineTCR_HPD1(1UL << TCR_HPD1_SHIFT) +#defineTCR_HPD0_SHIFT 41 +#defineTCR_HPD0(1UL << TCR_HPD0_SHIFT) +#defineTCR_HD_SHIFT40 +#defineTCR_HD (1UL << TCR_HD_SHIFT) +#defineTCR_HA_SHIFT39 +#defineTCR_HA (1UL << TCR_HA_SHIFT) +#defineTCR_TBI1_SHIFT 38 +#defineTCR_TBI1(1UL << TCR_TBI1_SHIFT +#defineTCR_TBI0_SHIFT 37 +#defineTCR_TBI0(1U << TCR_TBI0_SHIFT) +#defineTCR_ASID_SHIFT 36 +#defineTCR_ASID_WIDTH 1 +#defineTCR_ASID_16 (1UL << TCR_ASID_SHIFT) +/* Bit 35 is reserved */ +#defineTCR_IPS_SHIFT 32 +#defineTCR_IPS_WIDTH 3 +#defineTCR_IPS_32BIT (0UL << TCR_IPS_SHIFT) +#defineTCR_IPS_36BIT (1UL << TCR_IPS_SHIFT) +#defineTCR_IPS_40BIT (2UL << TCR_IPS_SHIFT) +#defineTCR_IPS_42BIT (3UL << TCR_IPS_SHIFT) +#defineTCR_IPS_44BIT (4UL << TCR_IPS_SHIFT) +#defineTCR_IPS_48BIT (5UL << TCR_IPS_SHIFT) +#defineTCR_TG1_SHIFT 30 +#defineTCR_TG1_16K (1UL << TCR_TG1_SHIFT) +#defineTCR_TG1_4K (2UL << TCR_TG1_SHIFT) +#defineTCR_TG1_64K (3UL << TCR_TG1_SHIFT) +#defineTCR_SH1_SHIFT 28 +#defineTCR_SH1_IS (3UL << TCR_SH1_SHIFT) +#defineTCR_ORGN1_SHIFT 26 +#defineTCR_ORGN1_WBWA (1UL << TCR_ORGN1_SHIFT) +#defineTCR_IRGN1_SHIFT 24 +#defineTCR_IRGN1_WBWA (1UL << TCR_IRGN1_SHIFT) +#defineTCR_EPD1_SHIFT 23 +#defineTCR_EPD1(1UL << TCR_EPD1_SHIFT) +#defineTCR_A1_SHIFT22 +#defineTCR_A1 (0x1UL << TCR_A1_SHIFT) +#defineTCR_T1SZ_SHIFT 16 +#defineTCR_T1SZ(x) ((x) << TCR_T1SZ_SHIFT)
svn commit: r362272 - head/sys/dev/mlx5/mlx5_en
Author: hselasky Date: Wed Jun 17 11:14:54 2020 New Revision: 362272 URL: https://svnweb.freebsd.org/changeset/base/362272 Log: Fix HW TLS offload regression issue after r359919, in mlx5en(4). Changes in the mbuf layout regarding HW TLS, resulted in wrong detection of starting mbuf. Use a boolean variable to handle this and pass m_adj() the top mbuf, so that the packet header is adjusted correctly. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c == --- head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Wed Jun 17 11:12:10 2020 (r362271) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Wed Jun 17 11:14:54 2020 (r362272) @@ -610,7 +610,7 @@ mlx5e_tls_send_nop(struct mlx5e_sq *sq, struct mlx5e_t #defineSBTLS_MBUF_NO_DATA ((struct mbuf *)1) static struct mbuf * -sbtls_recover_record(struct mbuf *mb, int wait, uint32_t tcp_old, uint32_t *ptcp_seq) +sbtls_recover_record(struct mbuf *mb, int wait, uint32_t tcp_old, uint32_t *ptcp_seq, bool *pis_start) { struct mbuf *mr, *top; uint32_t offset; @@ -629,6 +629,7 @@ sbtls_recover_record(struct mbuf *mb, int wait, uint32 /* check if we don't need to re-transmit anything */ if (offset == 0) { top = SBTLS_MBUF_NO_DATA; + *pis_start = true; goto done; } @@ -653,13 +654,19 @@ sbtls_recover_record(struct mbuf *mb, int wait, uint32 /* setup packet header length */ top->m_pkthdr.len = mr->m_len = offset; + top->m_len = 0; /* check for partial re-transmit */ delta = *ptcp_seq - tcp_old; if (delta < offset) { - m_adj(mr, offset - delta); + m_adj(top, offset - delta); offset = delta; + + /* continue where we left off */ + *pis_start = false; + } else { + *pis_start = true; } /* @@ -745,10 +752,11 @@ mlx5e_sq_tls_xmit(struct mlx5e_sq *sq, struct mlx5e_xm } if (unlikely(ptls_tag->expected_seq != mb_seq)) { + bool is_start; struct mbuf *r_mb; uint32_t tcp_seq = mb_seq; - r_mb = sbtls_recover_record(mb, M_NOWAIT, ptls_tag->expected_seq, _seq); + r_mb = sbtls_recover_record(mb, M_NOWAIT, ptls_tag->expected_seq, _seq, _start); if (r_mb == NULL) { MLX5E_TLS_STAT_INC(ptls_tag, tx_error, 1); return (MLX5E_TLS_FAILURE); @@ -757,7 +765,7 @@ mlx5e_sq_tls_xmit(struct mlx5e_sq *sq, struct mlx5e_xm MLX5E_TLS_STAT_INC(ptls_tag, tx_packets_ooo, 1); /* check if this is the first fragment of a TLS record */ - if (r_mb == SBTLS_MBUF_NO_DATA || r_mb->m_data == NULL) { + if (is_start) { /* setup TLS static parameters */ MLX5_SET64(sw_tls_cntx, ptls_tag->crypto_params, param.initial_record_number, rcd_sn); ___ 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: r362271 - head/sys/dev/mlx4/mlx4_en
Author: hselasky Date: Wed Jun 17 11:12:10 2020 New Revision: 362271 URL: https://svnweb.freebsd.org/changeset/base/362271 Log: Allow multicast packets to be received in promiscious mode, in mlx4en(4). Make sure we disable the multicast filter in promiscious mode aswell as when the all multicast flag is set. MFC after:1 week Found by: Tycho Nightingale Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c == --- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Jun 17 11:05:13 2020 (r362270) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Jun 17 11:12:10 2020 (r362271) @@ -850,9 +850,11 @@ static void mlx4_en_do_multicast(struct mlx4_en_priv * int err = 0; u64 mcast_addr = 0; - - /* Enable/disable the multicast filter according to IFF_ALLMULTI */ - if (dev->if_flags & IFF_ALLMULTI) { + /* +* Enable/disable the multicast filter according to +* IFF_ALLMULTI and IFF_PROMISC: +*/ + if (dev->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { err = mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0, 0, MLX4_MCAST_DISABLE); if (err) ___ 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: r362253 - head/sys/vm
On Tue, Jun 16, 2020 at 10:53:56PM +, Conrad Meyer wrote: > Author: cem > Date: Tue Jun 16 22:53:56 2020 > New Revision: 362253 > URL: https://svnweb.freebsd.org/changeset/base/362253 > > Log: > vm: Drop vm_map_clip_{start,end} macro wrappers > > No functional change. > > Reviewed by:dougm, markj > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D25282 > > Modified: > head/sys/vm/vm_map.c > > Modified: head/sys/vm/vm_map.c > == > --- head/sys/vm/vm_map.c Tue Jun 16 21:30:30 2020(r362252) > +++ head/sys/vm/vm_map.c Tue Jun 16 22:53:56 2020(r362253) > @@ -2377,24 +2377,17 @@ vm_map_entry_clone(vm_map_t map, vm_map_entry_t entry) > * the specified address; if necessary, > * it splits the entry into two. > */ > -#define vm_map_clip_start(map, entry, startaddr) \ > -{ \ > - if (startaddr > entry->start) \ > - _vm_map_clip_start(map, entry, startaddr); \ > -} > - > -/* > - * This routine is called only when it is known that > - * the entry must be split. > - */ > static inline void > -_vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t start) > +vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t start) > { > vm_map_entry_t new_entry; > > + if (start <= entry->start) > + return; > + > VM_MAP_ASSERT_LOCKED(map); > KASSERT(entry->end > start && entry->start < start, > - ("_vm_map_clip_start: invalid clip of entry %p", entry)); > + ("%s: invalid clip of entry %p", __func__, entry)); > > new_entry = vm_map_entry_clone(map, entry); > > @@ -2435,24 +2428,17 @@ vm_map_lookup_clip_start(vm_map_t map, vm_offset_t sta > * the specified address; if necessary, > * it splits the entry into two. > */ > -#define vm_map_clip_end(map, entry, endaddr) \ > -{ \ > - if ((endaddr) < (entry->end)) \ > - _vm_map_clip_end((map), (entry), (endaddr)); \ > -} > - > -/* > - * This routine is called only when it is known that > - * the entry must be split. > - */ > static inline void > -_vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm_offset_t end) > +vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm_offset_t end) > { > vm_map_entry_t new_entry; > > + if (end >= entry->end) > + return; > + > VM_MAP_ASSERT_LOCKED(map); > KASSERT(entry->start < end && entry->end > end, > - ("_vm_map_clip_end: invalid clip of entry %p", entry)); > + ("%s: invalid clip of entry %p", __func__, entry)); > > new_entry = vm_map_entry_clone(map, entry); > I would highly appreciate if you revert this commit. It conflicts with https://reviews.freebsd.org/D24652, which must revert your change to remain functional. I probably should not allowed that review to rott silently. ___ 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: r362265 - head/stand/libsa/zfs
Author: tsoome Date: Wed Jun 17 10:56:58 2020 New Revision: 362265 URL: https://svnweb.freebsd.org/changeset/base/362265 Log: loader: r362262 did miss the pathlen check While we are checking the "/dev/" prefix, we can skip the paths shorter than this prefix. Sponsored by: Netflix, Klara Inc. Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c == --- head/stand/libsa/zfs/zfsimpl.c Wed Jun 17 10:50:55 2020 (r362264) +++ head/stand/libsa/zfs/zfsimpl.c Wed Jun 17 10:56:58 2020 (r362265) @@ -1201,7 +1201,7 @@ vdev_init(uint64_t guid, const unsigned char *nvlist, char prefix[] = "/dev/"; len = strlen(prefix); - if (memcmp(path, prefix, len) == 0) { + if (len < pathlen && memcmp(path, prefix, len) == 0) { path += len; pathlen -= len; } ___ 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: r362263 - in head: . contrib/opencsd/decoder/include/common contrib/opencsd/decoder/include/i_dec contrib/opencsd/decoder/include/mem_acc contrib/opencsd/decoder/include/opencsd contrib...
Author: andrew Date: Wed Jun 17 10:42:20 2020 New Revision: 362263 URL: https://svnweb.freebsd.org/changeset/base/362263 Log: Update opencsd to 0.14.2 Sponsored by: Innovate UK Added: head/contrib/opencsd/decoder/include/common/ocsd_gen_elem_stack.h - copied unchanged from r362220, vendor/opencsd/dist/decoder/include/common/ocsd_gen_elem_stack.h head/contrib/opencsd/decoder/include/common/trc_raw_buffer.h - copied unchanged from r362220, vendor/opencsd/dist/decoder/include/common/trc_raw_buffer.h head/contrib/opencsd/decoder/include/opencsd/etmv4/trc_pkt_proc_etmv4i.h - copied unchanged from r362220, vendor/opencsd/dist/decoder/include/opencsd/etmv4/trc_pkt_proc_etmv4i.h head/contrib/opencsd/decoder/source/etmv4/trc_pkt_proc_etmv4i.cpp - copied unchanged from r362220, vendor/opencsd/dist/decoder/source/etmv4/trc_pkt_proc_etmv4i.cpp head/contrib/opencsd/decoder/source/ocsd_gen_elem_stack.cpp - copied unchanged from r362220, vendor/opencsd/dist/decoder/source/ocsd_gen_elem_stack.cpp Deleted: head/contrib/opencsd/decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4d.h head/contrib/opencsd/decoder/source/etmv4/trc_pkt_elem_etmv4d.cpp head/contrib/opencsd/decoder/source/etmv4/trc_pkt_proc_etmv4.cpp head/contrib/opencsd/decoder/source/etmv4/trc_pkt_proc_etmv4d_impl.h head/contrib/opencsd/decoder/source/etmv4/trc_pkt_proc_etmv4i_impl.cpp head/contrib/opencsd/decoder/source/etmv4/trc_pkt_proc_etmv4i_impl.h Modified: head/ObsoleteFiles.inc head/contrib/opencsd/decoder/include/common/ocsd_dcd_mngr.h head/contrib/opencsd/decoder/include/common/ocsd_gen_elem_list.h head/contrib/opencsd/decoder/include/common/trc_core_arch_map.h head/contrib/opencsd/decoder/include/common/trc_gen_elem.h head/contrib/opencsd/decoder/include/common/trc_pkt_decode_base.h head/contrib/opencsd/decoder/include/i_dec/trc_i_decode.h head/contrib/opencsd/decoder/include/i_dec/trc_idec_arminst.h head/contrib/opencsd/decoder/include/mem_acc/trc_mem_acc_bufptr.h head/contrib/opencsd/decoder/include/opencsd/etmv3/trc_pkt_decode_etmv3.h head/contrib/opencsd/decoder/include/opencsd/etmv4/etmv4_decoder.h head/contrib/opencsd/decoder/include/opencsd/etmv4/trc_etmv4_stack_elem.h head/contrib/opencsd/decoder/include/opencsd/etmv4/trc_pkt_decode_etmv4i.h head/contrib/opencsd/decoder/include/opencsd/etmv4/trc_pkt_elem_etmv4i.h head/contrib/opencsd/decoder/include/opencsd/etmv4/trc_pkt_proc_etmv4.h head/contrib/opencsd/decoder/include/opencsd/etmv4/trc_pkt_types_etmv4.h head/contrib/opencsd/decoder/include/opencsd/ocsd_if_types.h head/contrib/opencsd/decoder/include/opencsd/ocsd_if_version.h head/contrib/opencsd/decoder/include/opencsd/ptm/trc_pkt_decode_ptm.h head/contrib/opencsd/decoder/include/opencsd/stm/trc_pkt_decode_stm.h head/contrib/opencsd/decoder/include/opencsd/trc_gen_elem_types.h head/contrib/opencsd/decoder/include/pkt_printers/pkt_printer_t.h head/contrib/opencsd/decoder/source/etmv3/trc_pkt_decode_etmv3.cpp head/contrib/opencsd/decoder/source/etmv4/trc_etmv4_stack_elem.cpp head/contrib/opencsd/decoder/source/etmv4/trc_pkt_decode_etmv4i.cpp head/contrib/opencsd/decoder/source/etmv4/trc_pkt_elem_etmv4i.cpp head/contrib/opencsd/decoder/source/i_dec/trc_i_decode.cpp head/contrib/opencsd/decoder/source/i_dec/trc_idec_arminst.cpp head/contrib/opencsd/decoder/source/mem_acc/trc_mem_acc_bufptr.cpp head/contrib/opencsd/decoder/source/ocsd_dcd_tree.cpp head/contrib/opencsd/decoder/source/ocsd_error.cpp head/contrib/opencsd/decoder/source/ptm/trc_pkt_decode_ptm.cpp head/contrib/opencsd/decoder/source/stm/trc_pkt_decode_stm.cpp head/contrib/opencsd/decoder/source/trc_component.cpp head/contrib/opencsd/decoder/source/trc_core_arch_map.cpp head/contrib/opencsd/decoder/source/trc_gen_elem.cpp head/lib/libopencsd/Makefile Directory Properties: head/contrib/opencsd/ (props changed) Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Wed Jun 17 10:41:01 2020(r362262) +++ head/ObsoleteFiles.inc Wed Jun 17 10:42:20 2020(r362263) @@ -36,6 +36,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20200617: update opencsd to 0.14.2 +OLD_FILES+=usr/include/opencsd/etmv4/trc_pkt_elem_etmv4d.h + # 20200606: retire binutils build infrastructure .if !defined(WITH_PORT_BASE_BINUTILS) OLD_FILES+=usr/bin/as Modified: head/contrib/opencsd/decoder/include/common/ocsd_dcd_mngr.h == --- head/contrib/opencsd/decoder/include/common/ocsd_dcd_mngr.h Wed Jun 17 10:41:01 2020(r362262) +++ head/contrib/opencsd/decoder/include/common/ocsd_dcd_mngr.h Wed Jun 17 10:42:20 2020(r362263) @@ -115,6 +115,9 @@ ocsd_err_t DecoderMngrBase::createDecoder(co if(!pkt_proc) return OCSD_ERR_MEM; +// set the op mode flags +pkt_proc
svn commit: r362262 - head/stand/libsa/zfs
Author: tsoome Date: Wed Jun 17 10:41:01 2020 New Revision: 362262 URL: https://svnweb.freebsd.org/changeset/base/362262 Log: loader: strings in nvlist are counted strings, not c-strings We need to fetch both string size and data, then handle the data. Reviewed by: allanjude Sponsored by: Netflix, Klara Inc. Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c == --- head/stand/libsa/zfs/zfsimpl.c Wed Jun 17 10:11:54 2020 (r362261) +++ head/stand/libsa/zfs/zfsimpl.c Wed Jun 17 10:41:01 2020 (r362262) @@ -198,7 +198,7 @@ xdr_uint64_t(const unsigned char **xdr, uint64_t *lp) static int nvlist_find(const unsigned char *nvlist, const char *name, int type, -int *elementsp, void *valuep) +int *elementsp, void *valuep, int *sizep) { const unsigned char *p, *pair; int junk; @@ -230,6 +230,8 @@ nvlist_find(const unsigned char *nvlist, const char *n } else if (type == DATA_TYPE_STRING) { int len; xdr_int(, ); + if (sizep != NULL) + *sizep = len; (*(const char **)valuep) = (const char *)p; return (0); } else if (type == DATA_TYPE_NVLIST || @@ -394,7 +396,7 @@ nvlist_print(const unsigned char *nvlist, unsigned int for (i = 0; i < indent; i++) printf(" "); - printf("%s %s", typenames[pairtype], pairname); + printf("%s %.*s", typenames[pairtype], namelen, pairname); xdr_int(, ); switch (pairtype) { @@ -408,7 +410,7 @@ nvlist_print(const unsigned char *nvlist, unsigned int case DATA_TYPE_STRING: { int len; xdr_int(, ); - printf(" = \"%s\"\n", p); + printf(" = \"%.*s\"\n", len, p); break; } @@ -424,8 +426,8 @@ nvlist_print(const unsigned char *nvlist, unsigned int if (j != elements - 1) { for (i = 0; i < indent; i++) printf(" "); - printf("%s %s", typenames[pairtype], - pairname); + printf("%s %.*s", typenames[pairtype], + namelen, pairname); } } break; @@ -1088,17 +1090,17 @@ vdev_set_initial_state(vdev_t *vdev, const unsigned ch is_offline = is_removed = is_faulted = is_degraded = isnt_present = 0; is_log = 0; (void) nvlist_find(nvlist, ZPOOL_CONFIG_OFFLINE, DATA_TYPE_UINT64, NULL, - _offline); + _offline, NULL); (void) nvlist_find(nvlist, ZPOOL_CONFIG_REMOVED, DATA_TYPE_UINT64, NULL, - _removed); + _removed, NULL); (void) nvlist_find(nvlist, ZPOOL_CONFIG_FAULTED, DATA_TYPE_UINT64, NULL, - _faulted); + _faulted, NULL); (void) nvlist_find(nvlist, ZPOOL_CONFIG_DEGRADED, DATA_TYPE_UINT64, - NULL, _degraded); + NULL, _degraded, NULL); (void) nvlist_find(nvlist, ZPOOL_CONFIG_NOT_PRESENT, DATA_TYPE_UINT64, - NULL, _present); + NULL, _present, NULL); (void) nvlist_find(nvlist, ZPOOL_CONFIG_IS_LOG, DATA_TYPE_UINT64, NULL, - _log); + _log, NULL); if (is_offline != 0) vdev->v_state = VDEV_STATE_OFFLINE; @@ -1120,34 +1122,37 @@ vdev_init(uint64_t guid, const unsigned char *nvlist, uint64_t id, ashift, asize, nparity; const char *path; const char *type; + int len, pathlen; + char *name; vdev_t *vdev; - if (nvlist_find(nvlist, ZPOOL_CONFIG_ID, DATA_TYPE_UINT64, NULL, ) || + if (nvlist_find(nvlist, ZPOOL_CONFIG_ID, DATA_TYPE_UINT64, NULL, , + NULL) || nvlist_find(nvlist, ZPOOL_CONFIG_TYPE, DATA_TYPE_STRING, - NULL, )) { + NULL, , )) { return (ENOENT); } - if (strcmp(type, VDEV_TYPE_MIRROR) != 0 && - strcmp(type, VDEV_TYPE_DISK) != 0 && + if (memcmp(type, VDEV_TYPE_MIRROR, len) != 0 && + memcmp(type, VDEV_TYPE_DISK, len) != 0 && #ifdef ZFS_TEST - strcmp(type, VDEV_TYPE_FILE) != 0 && + memcmp(type, VDEV_TYPE_FILE, len) != 0 && #endif - strcmp(type, VDEV_TYPE_RAIDZ) != 0 && - strcmp(type, VDEV_TYPE_INDIRECT) != 0 && - strcmp(type, VDEV_TYPE_REPLACING) != 0) { + memcmp(type, VDEV_TYPE_RAIDZ, len)
Re: svn commit: r362217 - head/stand/common
On Tue, 16 Jun 2020 at 18:09, Cy Schubert wrote: > > In message <55903c38d363aef2a6f6d0075dd4526b86d51258.ca...@freebsd.org>, > Ian Le > pore writes: > > On Tue, 2020-06-16 at 07:05 +, Toomas Soome wrote: > > > Author: tsoome > > > Date: Tue Jun 16 07:05:03 2020 > > > New Revision: 362217 > > > URL: https://svnweb.freebsd.org/changeset/base/362217 > > > > > > Log: > > > loader: variable i is unused without MBR/GPT support built in > > > > > > Because i is only used as index in for loop, declare it in for > > > statement. > > > > > > > As much as I prefer doing it this way, style(9) doesn't allow for > > variable declarations inside a for() statement (or even inside a local > > block, which is just too 1980s for me, but it is still our standard). > > Doesn't this use stack for a shorter period of time or does the compiler > optimize this, making this change moot? > > The tradeoff is a few extra bytes of stack for a longer period of time vs a > few extra instructions incrementing and decrementing the stack pointer. > > At least for LLVM it makes no difference where you declare the variable: it will always be represented by an alloca instruction at the start of the IR function: https://godbolt.org/z/NFG3hN There will also not be any changes to the stack pointer since the stack frame size is fixed no matter where the variables are declared (unless you use variable-length arrays or __builtin_alloca()). LLVM will also merge variables that have non-overlapping lifetimes to reuse the same stack slot if possible. I'm almost certain GCC performs the same optimizations (as will any other compiler written in the last 20 years). Alex ___ 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: r362261 - head/contrib/file/magic/Magdir
Author: antoine Date: Wed Jun 17 10:11:54 2020 New Revision: 362261 URL: https://svnweb.freebsd.org/changeset/base/362261 Log: Re-apply r333944 to unbreak ports Modified: head/contrib/file/magic/Magdir/elf Modified: head/contrib/file/magic/Magdir/elf == --- head/contrib/file/magic/Magdir/elf Wed Jun 17 08:35:35 2020 (r362260) +++ head/contrib/file/magic/Magdir/elf Wed Jun 17 10:11:54 2020 (r362261) @@ -50,9 +50,8 @@ !:mime application/x-object >16leshort 2 executable, !:mime application/x-executable ->16leshort 3 ${x?pie executable:shared object}, - -!:mime application/x-${x?pie-executable:sharedlib} +>16leshort 3 shared object, +!:mime application/x-sharedlib >16leshort 4 core file, !:mime application/x-coredump # OS-specific ___ 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: r362260 - head/sys/dev/evdev
Author: wulf Date: Wed Jun 17 08:35:35 2020 New Revision: 362260 URL: https://svnweb.freebsd.org/changeset/base/362260 Log: evdev: Add AT translated set1 scancodes for 'Eisu' & 'Kana' keys. PR: 247292 Submitted by: Yuichiro NAITO MFC after:1 week Modified: head/sys/dev/evdev/evdev_utils.c Modified: head/sys/dev/evdev/evdev_utils.c == --- head/sys/dev/evdev/evdev_utils.cWed Jun 17 08:08:57 2020 (r362259) +++ head/sys/dev/evdev/evdev_utils.cWed Jun 17 08:35:35 2020 (r362260) @@ -146,7 +146,7 @@ static uint16_t evdev_at_set1_scancodes[] = { NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, - KEY_KATAKANAHIRAGANA, NONE, NONE, KEY_RO, + KEY_KATAKANAHIRAGANA, KEY_HANGEUL,KEY_HANJA, KEY_RO, NONE, NONE, KEY_ZENKAKUHANKAKU, KEY_HIRAGANA, KEY_KATAKANA, KEY_HENKAN, NONE, KEY_MUHENKAN, NONE, KEY_YEN,KEY_KPCOMMA,NONE, ___ 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: r362259 - head/stand/i386/libi386
Author: tsoome Date: Wed Jun 17 08:08:57 2020 New Revision: 362259 URL: https://svnweb.freebsd.org/changeset/base/362259 Log: loader: vidc_init should also erase the screen Inject \e[J to erase the initial loader screen. We have two options, find where out cursor is and use BIOS scroll for data from boot2 or erase the display and start from origin. Erasing the screen is easier and we also get the screen buffer initialized. Sponsored by: Netflix, Klara Inc. Modified: head/stand/i386/libi386/vidconsole.c Modified: head/stand/i386/libi386/vidconsole.c == --- head/stand/i386/libi386/vidconsole.cWed Jun 17 07:41:28 2020 (r362258) +++ head/stand/i386/libi386/vidconsole.cWed Jun 17 08:08:57 2020 (r362259) @@ -709,11 +709,8 @@ vidc_init(int arg) env_setenv("teken.bg_color", EV_VOLATILE, env, vidc_set_colors, env_nounset); - for (int row = 0; row < tp.tp_row; row++) - for (int col = 0; col < tp.tp_col; col++) { - buffer[col + row * tp.tp_col].c = ' '; - buffer[col + row * tp.tp_col].a = *a; - } + /* Erase display, this will also fill our screen buffer. */ + teken_input(, "\e[J", 3); for (int i = 0; i < 10 && vidc_ischar(); i++) (void) vidc_getchar(); ___ 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: r362258 - in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src lib/libmagic
On Wed, Jun 17, 2020 at 9:41 AM Xin LI wrote: > > Author: delphij > Date: Wed Jun 17 07:41:28 2020 > New Revision: 362258 > URL: https://svnweb.freebsd.org/changeset/base/362258 > > Log: > MFV r362254: file 5.39. > > MFC after:2 weeks Hi, Please re-apply r333944 Antoine ___ 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: r362258 - in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src lib/libmagic
Author: delphij Date: Wed Jun 17 07:41:28 2020 New Revision: 362258 URL: https://svnweb.freebsd.org/changeset/base/362258 Log: MFV r362254: file 5.39. MFC after:2 weeks Added: head/contrib/file/libmagic.pc.in - copied unchanged from r362254, vendor/file/dist/libmagic.pc.in head/contrib/file/magic/Magdir/asf - copied unchanged from r362254, vendor/file/dist/magic/Magdir/asf head/contrib/file/magic/Magdir/dif - copied unchanged from r362254, vendor/file/dist/magic/Magdir/dif head/contrib/file/magic/Magdir/sylk - copied unchanged from r362254, vendor/file/dist/magic/Magdir/sylk head/contrib/file/magic/Magdir/unisig - copied unchanged from r362254, vendor/file/dist/magic/Magdir/unisig head/contrib/file/magic/Magdir/usd - copied unchanged from r362254, vendor/file/dist/magic/Magdir/usd head/contrib/file/magic/Magdir/web - copied unchanged from r362254, vendor/file/dist/magic/Magdir/web Modified: head/contrib/file/ChangeLog head/contrib/file/Makefile.am head/contrib/file/Makefile.in head/contrib/file/configure head/contrib/file/configure.ac head/contrib/file/doc/file.man head/contrib/file/doc/magic.man head/contrib/file/magic/Magdir/animation head/contrib/file/magic/Magdir/archive head/contrib/file/magic/Magdir/cad head/contrib/file/magic/Magdir/commands head/contrib/file/magic/Magdir/compress head/contrib/file/magic/Magdir/console head/contrib/file/magic/Magdir/database head/contrib/file/magic/Magdir/der head/contrib/file/magic/Magdir/elf head/contrib/file/magic/Magdir/filesystems head/contrib/file/magic/Magdir/games head/contrib/file/magic/Magdir/gnu head/contrib/file/magic/Magdir/images head/contrib/file/magic/Magdir/intel head/contrib/file/magic/Magdir/kicad head/contrib/file/magic/Magdir/linux head/contrib/file/magic/Magdir/msdos head/contrib/file/magic/Magdir/ole2compounddocs head/contrib/file/magic/Magdir/parix head/contrib/file/magic/Magdir/pascal head/contrib/file/magic/Magdir/pdf head/contrib/file/magic/Magdir/pgp head/contrib/file/magic/Magdir/python head/contrib/file/magic/Magdir/riff head/contrib/file/magic/Magdir/rst head/contrib/file/magic/Magdir/rtf head/contrib/file/magic/Magdir/sgml head/contrib/file/magic/Magdir/sniffer head/contrib/file/magic/Magdir/ssh head/contrib/file/magic/Magdir/ti-8x head/contrib/file/magic/Magdir/tplink head/contrib/file/magic/Magdir/troff head/contrib/file/magic/Magdir/virtual head/contrib/file/magic/Magdir/windows head/contrib/file/magic/Magdir/wordprocessors head/contrib/file/magic/Magdir/zip head/contrib/file/magic/Makefile.am head/contrib/file/magic/Makefile.in head/contrib/file/src/apprentice.c head/contrib/file/src/ascmagic.c head/contrib/file/src/buffer.c head/contrib/file/src/compress.c head/contrib/file/src/der.c head/contrib/file/src/file.c head/contrib/file/src/file.h head/contrib/file/src/file_opts.h head/contrib/file/src/funcs.c head/contrib/file/src/is_json.c head/contrib/file/src/magic.c head/contrib/file/src/print.c head/contrib/file/src/readelf.c head/contrib/file/src/seccomp.c head/contrib/file/src/softmagic.c head/lib/libmagic/Makefile head/lib/libmagic/config.h Directory Properties: head/contrib/file/ (props changed) Modified: head/contrib/file/ChangeLog == --- head/contrib/file/ChangeLog Wed Jun 17 03:16:20 2020(r362257) +++ head/contrib/file/ChangeLog Wed Jun 17 07:41:28 2020(r362258) @@ -1,3 +1,83 @@ +2020-06-14 20:02 Christos Zoulas + + * release 5.39 + +2020-06-07 20:00 Christos Zoulas + + * Remove unused subtype_mime (Steve Grubb) + * Remove unused check in okstat (Steve Grubb) + * Fix mime-type in elf binaries by making sure $x is set + * Fix indirect negative offsets broken by OFFNEGATIVE + * Fix GUID equality check + * PR/165: Handle empty array and strings in JSON + * PR/162: Add --exclude-quiet + +2020-06-06 15:33 Christos Zoulas + + * Fix memory leak in ascmagic (Steve Grubb) + +2020-06-04 00:21 Christos Zoulas + + * Fix string comparison length with ignore whitespace + +2020-05-31 00:11 Christos Zoulas + + * Fix mingwin 64 compilation + +2020-05-30 23:56 Christos Zoulas + + * PR/159: whitelist getpid needed for file_pipe2file() + +2020-05-09 18:57 Christos Zoulas + + * Indicate negative offsets with a flag OFFNEGATIVE + so that -0 works. + * Introduce "offset" magic type that can be used to + detect the file size, and bail on short files. + * document DER better in the magic man page. + +2020-03-11 21:53 Christos Zoulas + + * fix memory leaks (SonarQube) + +2020-03-08 21:33 Christos Zoulas + + * fix memory leaks (SonarQube) + * rewrite confusing loops (SonarQube) + * fix bogus test (SonarQube) + *