Re: svn commit: r317543 - head/usr.sbin/bhyve
On Thu, Apr 27, 2017 at 10:26:28PM -0700, Ngie Cooper wrote: N> > Author: glebius N> > Date: Fri Apr 28 05:13:27 2017 N> > New Revision: 317543 N> > URL: https://svnweb.freebsd.org/changeset/base/317543 N> > N> > Log: N> > When no "rfb" configuration specified bind to the default VNC N> > port instead of binding to a random one. N> > N> > Modified: N> > head/usr.sbin/bhyve/pci_fbuf.c N> > N> > Modified: head/usr.sbin/bhyve/pci_fbuf.c N> > == N> > --- head/usr.sbin/bhyve/pci_fbuf.cFri Apr 28 05:09:51 2017(r317542) N> > +++ head/usr.sbin/bhyve/pci_fbuf.cFri Apr 28 05:13:27 2017(r317543) N> > @@ -365,6 +365,8 @@ pci_fbuf_init(struct vmctx *ctx, struct N> > N> >sc->fsc_pi = pi; N> > N> > +sc->rfb_port = 5900; N> > + N> N> Wouldn't it be better to use getservbyname? I decided to follow the KISS principle here. We are going to resolve only one constant name always, so running all the machinery around getservbyname seems overkill to me. If we had ability to specify non-default ports by name in the bhyve command line, then it would make sense to run getservbyname. On the other hand there is no good point in adding such ability to bhyve. -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317545 - head/usr.sbin/bhyve
Author: glebius Date: Fri Apr 28 05:43:27 2017 New Revision: 317545 URL: https://svnweb.freebsd.org/changeset/base/317545 Log: Document raw framebuffer device and XHCI device configurations. Modified: head/usr.sbin/bhyve/bhyve.8 Modified: head/usr.sbin/bhyve/bhyve.8 == --- head/usr.sbin/bhyve/bhyve.8 Fri Apr 28 05:32:26 2017(r317544) +++ head/usr.sbin/bhyve/bhyve.8 Fri Apr 28 05:43:27 2017(r317545) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 27, 2017 +.Dd April 27, 2017 .Dt BHYVE 8 .Os .Sh NAME @@ -188,6 +188,10 @@ PCI 16550 serial device. .It Li lpc LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports and a boot ROM. The LPC bridge emulation can only be configured on bus 0. +.It Li fbuf +Raw framebuffer device attached to VNC server. +.It Li xhci +XHCI USB controller. .El .It Op Ar conf This optional parameter describes the backend for device emulations. @@ -299,6 +303,40 @@ resize at present. Emergency write is advertised, but no-op at present. .El .El +.Pp +Raw framebuffer device: +.Pp +.Oo wait Oc Ns Oo ,vga= Ns ArOc Oo ,rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar w Oc Ns Oo ,h= Ns Ar h Oc +.Bl -tag -width [vga=on|io|off] +.It wait +Wait for a VNC client connection before booting the virtual machine. +The default is not to wait. +.It vga= Ns Ar on|io|off +Enable VGA emulation. +The default is +.Va io +mode: VGA is enabled, but only I/O ports are available, +no VGA memory is provided. +.It rfb= Ns Oo Ar IP: Oc Ns Ar port +Set the VNC server to listen at +.Va IP:port . +The default is to listen on localhost IPv4 address and default VNC port 5900. +Listening on a IPv6 address is not supported. +.It w= Ns Ar width +Set framebuffer width to +.Ar width . +The default width is 1920. +.It h= Ns Ar height +Set framebuffer height to +.Ar height . +The default height is 1080. +.El +.Pp +XHCI USB controller device: +.Bl -tag +.It Ar tablet +Emulate USB tablet mouse. +.El .El .It Fl S Wire guest memory. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317544 - head/usr.sbin/bhyve
Author: glebius Date: Fri Apr 28 05:32:26 2017 New Revision: 317544 URL: https://svnweb.freebsd.org/changeset/base/317544 Log: - For security reasons by default listen on localhost address, not on wildcard. [1] - Move the default port assignment from pci_fbuf.c to rfb.c, to avoid polluting pci_fbuf.c with network things. Suggested by: grehan Modified: head/usr.sbin/bhyve/pci_fbuf.c head/usr.sbin/bhyve/rfb.c Modified: head/usr.sbin/bhyve/pci_fbuf.c == --- head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:13:27 2017 (r317543) +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:32:26 2017 (r317544) @@ -365,8 +365,6 @@ pci_fbuf_init(struct vmctx *ctx, struct sc->fsc_pi = pi; - sc->rfb_port = 5900; - error = pci_fbuf_parse_opts(sc, opts); if (error != 0) goto done; Modified: head/usr.sbin/bhyve/rfb.c == --- head/usr.sbin/bhyve/rfb.c Fri Apr 28 05:13:27 2017(r317543) +++ head/usr.sbin/bhyve/rfb.c Fri Apr 28 05:32:26 2017(r317544) @@ -897,11 +897,11 @@ rfb_init(char *hostname, int port, int w sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; - sin.sin_port = htons(port); + sin.sin_port = port ? htons(port) : htons(5900); if (hostname && strlen(hostname) > 0) inet_pton(AF_INET, hostname, &(sin.sin_addr)); else - sin.sin_addr.s_addr = htonl(INADDR_ANY); + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); if (bind(rc->sfd, (struct sockaddr *), sizeof(sin)) < 0) { perror("bind"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r317543 - head/usr.sbin/bhyve
> On Apr 27, 2017, at 22:13, Gleb Smirnoffwrote: > > Author: glebius > Date: Fri Apr 28 05:13:27 2017 > New Revision: 317543 > URL: https://svnweb.freebsd.org/changeset/base/317543 > > Log: > When no "rfb" configuration specified bind to the default VNC > port instead of binding to a random one. > > Modified: > head/usr.sbin/bhyve/pci_fbuf.c > > Modified: head/usr.sbin/bhyve/pci_fbuf.c > == > --- head/usr.sbin/bhyve/pci_fbuf.cFri Apr 28 05:09:51 2017(r317542) > +++ head/usr.sbin/bhyve/pci_fbuf.cFri Apr 28 05:13:27 2017(r317543) > @@ -365,6 +365,8 @@ pci_fbuf_init(struct vmctx *ctx, struct > >sc->fsc_pi = pi; > > +sc->rfb_port = 5900; > + Wouldn't it be better to use getservbyname? >error = pci_fbuf_parse_opts(sc, opts); >if (error != 0) >goto done; > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317543 - head/usr.sbin/bhyve
Author: glebius Date: Fri Apr 28 05:13:27 2017 New Revision: 317543 URL: https://svnweb.freebsd.org/changeset/base/317543 Log: When no "rfb" configuration specified bind to the default VNC port instead of binding to a random one. Modified: head/usr.sbin/bhyve/pci_fbuf.c Modified: head/usr.sbin/bhyve/pci_fbuf.c == --- head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:09:51 2017 (r317542) +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:13:27 2017 (r317543) @@ -365,6 +365,8 @@ pci_fbuf_init(struct vmctx *ctx, struct sc->fsc_pi = pi; + sc->rfb_port = 5900; + error = pci_fbuf_parse_opts(sc, opts); if (error != 0) goto done; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317542 - head/usr.sbin/bhyve
Author: glebius Date: Fri Apr 28 05:09:51 2017 New Revision: 317542 URL: https://svnweb.freebsd.org/changeset/base/317542 Log: Make comments match the code. No functional change. Modified: head/usr.sbin/bhyve/pci_fbuf.c head/usr.sbin/bhyve/pci_xhci.c Modified: head/usr.sbin/bhyve/pci_fbuf.c == --- head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 02:11:29 2017 (r317541) +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:09:51 2017 (r317542) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); * BAR0 points to the current mode information. * BAR1 is the 32-bit framebuffer address. * - * -s ,fbuf,wait,tcp=:port,w=width,h=height + * -s ,fbuf,wait,vga=on|io|off,rfb=:port,w=width,h=height */ static int fbuf_debug = 1; Modified: head/usr.sbin/bhyve/pci_xhci.c == --- head/usr.sbin/bhyve/pci_xhci.c Fri Apr 28 02:11:29 2017 (r317541) +++ head/usr.sbin/bhyve/pci_xhci.c Fri Apr 28 05:09:51 2017 (r317542) @@ -28,7 +28,7 @@ -s ,xhci,{devices} devices: - ums USB tablet mouse + tablet USB tablet mouse */ #include __FBSDID("$FreeBSD$"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317541 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: jpaetzel Date: Fri Apr 28 02:11:29 2017 New Revision: 317541 URL: https://svnweb.freebsd.org/changeset/base/317541 Log: MFV 316905 7740 fix for 6513 only works in hole punching case, not truncation illumos/illumos-gate@7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553 https://github.com/illumos/illumos-gate/commit/7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553 https://www.illumos.org/issues/7740 The problem is that dbuf_findbp will return ENOENT if the block it's trying to find is beyond the end of the file. If that happens, we assume there is no birth time, and so we lose that information when we write out new blkptrs. We should teach dbuf_findbp to look for things that are beyond the current end, but not beyond the absolute end of the file. To verify, create a large file, truncate it to a short length, and then write beyond the end. Check with zdb to make sure that there are no holes with birth time zero (will appear as gaps). Reviewed by: Steve GoncziReviewed by: Matthew Ahrens Approved by: Dan McDonald Author: Paul Dagnelie Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Apr 28 01:54:01 2017(r317540) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Apr 28 02:11:29 2017(r317541) @@ -2161,8 +2161,6 @@ static int dbuf_findbp(dnode_t *dn, int level, uint64_t blkid, int fail_sparse, dmu_buf_impl_t **parentp, blkptr_t **bpp) { - int nlevels, epbs; - *parentp = NULL; *bpp = NULL; @@ -2181,17 +2179,35 @@ dbuf_findbp(dnode_t *dn, int level, uint return (0); } - if (dn->dn_phys->dn_nlevels == 0) - nlevels = 1; - else - nlevels = dn->dn_phys->dn_nlevels; - - epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; + int nlevels = + (dn->dn_phys->dn_nlevels == 0) ? 1 : dn->dn_phys->dn_nlevels; + int epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; ASSERT3U(level * epbs, <, 64); ASSERT(RW_LOCK_HELD(>dn_struct_rwlock)); + /* +* This assertion shouldn't trip as long as the max indirect block size +* is less than 1M. The reason for this is that up to that point, +* the number of levels required to address an entire object with blocks +* of size SPA_MINBLOCKSIZE satisfies nlevels * epbs + 1 <= 64. In +* other words, if N * epbs + 1 > 64, then if (N-1) * epbs + 1 > 55 +* (i.e. we can address the entire object), objects will all use at most +* N-1 levels and the assertion won't overflow. However, once epbs is +* 13, 4 * 13 + 1 = 53, but 5 * 13 + 1 = 66. Then, 4 levels will not be +* enough to address an entire object, so objects will have 5 levels, +* but then this assertion will overflow. +* +* All this is to say that if we ever increase DN_MAX_INDBLKSHIFT, we +* need to redo this logic to handle overflows. +*/ + ASSERT(level >= nlevels || + ((nlevels - level - 1) * epbs) + + highbit64(dn->dn_phys->dn_nblkptr) <= 64); if (level >= nlevels || - (blkid > (dn->dn_phys->dn_maxblkid >> (level * epbs { + blkid >= ((uint64_t)dn->dn_phys->dn_nblkptr << + ((nlevels - level - 1) * epbs)) || + (fail_sparse && + blkid > (dn->dn_phys->dn_maxblkid >> (level * epbs { /* the buffer has no parent yet */ return (SET_ERROR(ENOENT)); } else if (level < nlevels-1) { @@ -2209,6 +2225,8 @@ dbuf_findbp(dnode_t *dn, int level, uint } *bpp = ((blkptr_t *)(*parentp)->db.db_data) + (blkid & ((1ULL << epbs) - 1)); + if (blkid > (dn->dn_phys->dn_maxblkid >> (level * epbs))) + ASSERT(BP_IS_HOLE(*bpp)); return (0); } else { /* the block is referenced from the dnode */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri Apr 28 01:54:01 2017(r317540) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Fri Apr 28 02:11:29 2017(r317541) @@ -58,6 +58,12 @@ extern "C" { */ #defineDNODE_SHIFT 9 /* 512 bytes */ #defineDN_MIN_INDBLKSHIFT 12 /*
Re: svn commit: r314937 - in stable/10/sys: fs/ext2fs modules/ext2fs
> On Thu, 27 Apr 2017, Gleb Smirnoff wrote: > > > On Thu, Apr 27, 2017 at 03:00:56PM -0700, Ngie Cooper wrote: > > N> On Thu, Apr 27, 2017 at 1:52 PM, Ed Mastewrote: > > N> > On 8 March 2017 at 21:47, Pedro F. Giffuni wrote: > > N> >> Author: pfg > > N> >> Date: Thu Mar 9 02:47:01 2017 > > N> >> New Revision: 314937 > > N> >> URL: https://svnweb.freebsd.org/changeset/base/314937 > > N> >> > > N> >> Log: > > N> >> Revert 294545: > > N> >> Bringing back ext4: add support for reading sparse files > > N> > > > N> > Tinderbox is broken on GCC architectures, e.g. from powerpc.LINT64: > > N> > > > N> > In file included from > > /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/inode.h:46, > > N> > from > > /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_alloc.c:50: > > N> > /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_extents.h:91: warning: > > N> > declaration does not declare anything > > N> > > N> ... because of anonymous unions not being supported in gcc 4.2.1. > > Anonymous unions have been a standard gcc feature since nearly gcc-1. > > > The whole kernel is built with option that enables them on 4.2.1. > > > > CFLAGS.gcc+=-fms-extensions > > This is a bad way to enable standard gcc anonymous unions. It also > enables ms extensions which also gives unused extensions of standard > gcc anonymous, and other even more unwanted ms features. > > The correct way to enable gcc features is to compile with -std=gnu99. > This has been done for a long time in userland, but the has been ^+kernel? > misconfigured to use -std=c99 for a long time. This is sort of > backwards -- the kernel is inherently more unportable and can't > possible be compiled by a C99 compiler, while parts of userland > can. However, userland is larger, so people setting excessive > -std flags soon found that -std=c99 doesn't work. > > With no -std flag, gcc defaults to something like -std=gnu89, so > it supports its old anonymous unions feature but not the many > C99 features needed to compile almost anything now. > > Bruce > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317533 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: jpaetzel Date: Thu Apr 27 23:31:38 2017 New Revision: 317533 URL: https://svnweb.freebsd.org/changeset/base/317533 Log: MFV 316900 7743 per-vdev-zaps have no initialize path on upgrade illumos/illumos-gate@555da5111b0f2552c42d057b211aba89c9c79f6c https://github.com/illumos/illumos-gate/commit/555da5111b0f2552c42d057b211aba89c9c79f6c https://www.illumos.org/issues/7743 When loading a pool that had been created before the existance of per-vdev zaps, on a system that knows about per-vdev zaps, the per-vdev zaps will not be allocated and initialized. This appears to be because the logic that would have done so, in spa_sync_config_object(), is not reached under normal operation. It is only reached if spa_config_dirty_list is non-empty. The fix is to add another `AVZ_ACTION_` enum that will allow this code to be reached when we detect that we're loading an old pool, even when there are no dirty configs. Reviewed by: Matt AhrensReviewed by: Pavel Zakharov Reviewed by: George Wilson Reviewed by: Don Brady Approved by: Robert Mustacchi Author: Paul Dagnelie Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Apr 27 23:14:01 2017(r317532) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Apr 27 23:31:38 2017(r317533) @@ -2731,10 +2731,14 @@ spa_load_impl(spa_t *spa, uint64_t pool_ error = spa_dir_prop(spa, DMU_POOL_VDEV_ZAP_MAP, >spa_all_vdev_zaps); - if (error != ENOENT && error != 0) { + if (error == ENOENT) { + VERIFY(!nvlist_exists(mos_config, + ZPOOL_CONFIG_HAS_PER_VDEV_ZAPS)); + spa->spa_avz_action = AVZ_ACTION_INITIALIZE; + ASSERT0(vdev_count_verify_zaps(spa->spa_root_vdev)); + } else if (error != 0) { return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO)); - } else if (error == 0 && !nvlist_exists(mos_config, - ZPOOL_CONFIG_HAS_PER_VDEV_ZAPS)) { + } else if (!nvlist_exists(mos_config, ZPOOL_CONFIG_HAS_PER_VDEV_ZAPS)) { /* * An older version of ZFS overwrote the sentinel value, so * we have orphaned per-vdev ZAPs in the MOS. Defer their @@ -6498,6 +6502,7 @@ spa_sync_config_object(spa_t *spa, dmu_t spa_config_enter(spa, SCL_STATE, FTAG, RW_READER); ASSERT(spa->spa_avz_action == AVZ_ACTION_NONE || + spa->spa_avz_action == AVZ_ACTION_INITIALIZE || spa->spa_all_vdev_zaps != 0); if (spa->spa_avz_action == AVZ_ACTION_REBUILD) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Thu Apr 27 23:14:01 2017(r317532) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Thu Apr 27 23:31:38 2017(r317533) @@ -120,7 +120,8 @@ typedef struct spa_taskqs { typedef enum spa_all_vdev_zap_action { AVZ_ACTION_NONE = 0, AVZ_ACTION_DESTROY, /* Destroy all per-vdev ZAPs and the AVZ. */ - AVZ_ACTION_REBUILD /* Populate the new AVZ, see spa_avz_rebuild */ + AVZ_ACTION_REBUILD, /* Populate the new AVZ, see spa_avz_rebuild */ + AVZ_ACTION_INITIALIZE } spa_avz_action_t; struct spa { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317532 - in stable/10/sys: fs/ext2fs modules/ext2fs
Author: pfg Date: Thu Apr 27 23:14:01 2017 New Revision: 317532 URL: https://svnweb.freebsd.org/changeset/base/317532 Log: Revert r314937 as anonymous unions in GCC don't seem to work. This has been breaking the powerpc(LINT64 at least) for quite a while now. Reported by: emaste Modified: stable/10/sys/fs/ext2fs/ext2_bmap.c stable/10/sys/fs/ext2fs/ext2_extents.c stable/10/sys/fs/ext2fs/ext2_extents.h stable/10/sys/fs/ext2fs/ext2_vnops.c stable/10/sys/modules/ext2fs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_bmap.c == --- stable/10/sys/fs/ext2fs/ext2_bmap.c Thu Apr 27 22:53:38 2017 (r317531) +++ stable/10/sys/fs/ext2fs/ext2_bmap.c Thu Apr 27 23:14:01 2017 (r317532) @@ -102,6 +102,9 @@ ext4_bmapext(struct vnode *vp, int32_t b fs = ip->i_e2fs; lbn = bn; + /* +* TODO: need to implement read ahead to improve the performance. +*/ if (runp != NULL) *runp = 0; @@ -109,25 +112,15 @@ ext4_bmapext(struct vnode *vp, int32_t b *runb = 0; ext4_ext_find_extent(fs, ip, lbn, ); - if (path.ep_is_sparse) { - *bnp = -1; - if (runp != NULL) - *runp = path.ep_sparse_ext.e_len - - (lbn - path.ep_sparse_ext.e_blk) - 1; - } else { - ep = path.ep_ext; - if (ep == NULL) - ret = EIO; - else { - *bnp = fsbtodb(fs, lbn - ep->e_blk + - (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32)); + ep = path.ep_ext; + if (ep == NULL) + ret = EIO; + else { + *bnp = fsbtodb(fs, lbn - ep->e_blk + + (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32)); - if (*bnp == 0) - *bnp = -1; - - if (runp != NULL) - *runp = ep->e_len - (lbn - ep->e_blk) - 1; - } + if (*bnp == 0) + *bnp = -1; } if (path.ep_bp != NULL) { Modified: stable/10/sys/fs/ext2fs/ext2_extents.c == --- stable/10/sys/fs/ext2fs/ext2_extents.c Thu Apr 27 22:53:38 2017 (r317531) +++ stable/10/sys/fs/ext2fs/ext2_extents.c Thu Apr 27 23:14:01 2017 (r317532) @@ -66,14 +66,13 @@ static void ext4_ext_binsearch(struct inode *ip, struct ext4_extent_path *path, daddr_t lbn) { struct ext4_extent_header *ehp = path->ep_header; - struct ext4_extent *first, *l, *r, *m; + struct ext4_extent *l, *r, *m; if (ehp->eh_ecount == 0) return; - first = (struct ext4_extent *)(char *)(ehp + 1); - l = first; - r = first + ehp->eh_ecount - 1; + l = (struct ext4_extent *)(char *)(ehp + 1); + r = (struct ext4_extent *)(char *)(ehp + 1) + ehp->eh_ecount - 1; while (l <= r) { m = l + (r - l) / 2; if (lbn < m->e_blk) @@ -82,25 +81,7 @@ ext4_ext_binsearch(struct inode *ip, str l = m + 1; } - if (l == first) { - path->ep_sparse_ext.e_blk = lbn; - path->ep_sparse_ext.e_len = first->e_blk - lbn; - path->ep_sparse_ext.e_start_hi = 0; - path->ep_sparse_ext.e_start_lo = 0; - path->ep_is_sparse = 1; - return; - } path->ep_ext = l - 1; - if (path->ep_ext->e_blk + path->ep_ext->e_len <= lbn) { - path->ep_sparse_ext.e_blk = lbn; - if (l <= (first + ehp->eh_ecount - 1)) - path->ep_sparse_ext.e_len = l->e_blk - lbn; - else// XXX: where does it end? - path->ep_sparse_ext.e_len = 1; - path->ep_sparse_ext.e_start_hi = 0; - path->ep_sparse_ext.e_start_lo = 0; - path->ep_is_sparse = 1; - } } /* @@ -188,7 +169,6 @@ ext4_ext_find_extent(struct m_ext2fs *fs path->ep_depth = i; path->ep_ext = NULL; path->ep_index = NULL; - path->ep_is_sparse = 0; ext4_ext_binsearch(ip, path, lbn); return (path); Modified: stable/10/sys/fs/ext2fs/ext2_extents.h == --- stable/10/sys/fs/ext2fs/ext2_extents.h Thu Apr 27 22:53:38 2017 (r317531) +++ stable/10/sys/fs/ext2fs/ext2_extents.h Thu Apr 27 23:14:01 2017 (r317532) @@ -84,11 +84,7 @@ struct ext4_extent_cache { struct ext4_extent_path { uint16_t ep_depth; struct buf *ep_bp; - int ep_is_sparse; - union { - struct ext4_extent
Re: svn commit: r314937 - in stable/10/sys: fs/ext2fs modules/ext2fs
On 04/27/17 15:52, Ed Maste wrote: On 8 March 2017 at 21:47, Pedro F. Giffuniwrote: Author: pfg Date: Thu Mar 9 02:47:01 2017 New Revision: 314937 URL: https://svnweb.freebsd.org/changeset/base/314937 Log: Revert 294545: Bringing back ext4: add support for reading sparse files Tinderbox is broken on GCC architectures, e.g. from powerpc.LINT64: In file included from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/inode.h:46, from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_alloc.c:50: /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_extents.h:91: warning: declaration does not declare anything And sys/modules/ext2fs/Makefile on line 11 reads: CFLAGS+= ${GCC_MS_EXTENSIONS} So .. ultimately it doesn't matter what is going on here I'll just revert (again) as I am not really using stable-10 anymore :(. Pedro. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317530 - in head/lib/libc/riscv: . sys
Author: br Date: Thu Apr 27 22:40:39 2017 New Revision: 317530 URL: https://svnweb.freebsd.org/changeset/base/317530 Log: Use unconditional jr (jump register) so cerror relocation offset fits. This fixes libc build on riscv64sf. Reviewed by: jhb Sponsored by: DARPA, AFRL Modified: head/lib/libc/riscv/SYS.h head/lib/libc/riscv/sys/vfork.S Modified: head/lib/libc/riscv/SYS.h == --- head/lib/libc/riscv/SYS.h Thu Apr 27 22:28:49 2017(r317529) +++ head/lib/libc/riscv/SYS.h Thu Apr 27 22:40:39 2017(r317530) @@ -54,8 +54,10 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, _##name); \ _SYSCALL(name); \ - bnezt0, cerror; \ + bnezt0, 1f; \ ret;\ +1: la t1, cerror; \ + jr t1; \ END(__sys_##name) #defineRSYSCALL(name) \ @@ -63,6 +65,8 @@ ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ _SYSCALL(name); \ - bnezt0, cerror; \ + bnezt0, 1f; \ ret;\ +1: la t1, cerror; \ + jr t1; \ END(__sys_##name) Modified: head/lib/libc/riscv/sys/vfork.S == --- head/lib/libc/riscv/sys/vfork.S Thu Apr 27 22:28:49 2017 (r317529) +++ head/lib/libc/riscv/sys/vfork.S Thu Apr 27 22:40:39 2017 (r317530) @@ -42,10 +42,12 @@ ENTRY(__sys_vfork) mv a2, ra _SYSCALL(vfork) - bnezt0, cerror + bnezt0, 1f addia1, a1, -1 and a0, a0, a1 mv ra, a2 ret +1: la t1, cerror + jr t1 END(__sys_vfork) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r314937 - in stable/10/sys: fs/ext2fs modules/ext2fs
On Thu, 27 Apr 2017, Gleb Smirnoff wrote: On Thu, Apr 27, 2017 at 03:00:56PM -0700, Ngie Cooper wrote: N> On Thu, Apr 27, 2017 at 1:52 PM, Ed Mastewrote: N> > On 8 March 2017 at 21:47, Pedro F. Giffuni wrote: N> >> Author: pfg N> >> Date: Thu Mar 9 02:47:01 2017 N> >> New Revision: 314937 N> >> URL: https://svnweb.freebsd.org/changeset/base/314937 N> >> N> >> Log: N> >> Revert 294545: N> >> Bringing back ext4: add support for reading sparse files N> > N> > Tinderbox is broken on GCC architectures, e.g. from powerpc.LINT64: N> > N> > In file included from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/inode.h:46, N> > from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_alloc.c:50: N> > /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_extents.h:91: warning: N> > declaration does not declare anything N> N> ... because of anonymous unions not being supported in gcc 4.2.1. Anonymous unions have been a standard gcc feature since nearly gcc-1. The whole kernel is built with option that enables them on 4.2.1. CFLAGS.gcc+=-fms-extensions This is a bad way to enable standard gcc anonymous unions. It also enables ms extensions which also gives unused extensions of standard gcc anonymous, and other even more unwanted ms features. The correct way to enable gcc features is to compile with -std=gnu99. This has been done for a long time in userland, but the has been misconfigured to use -std=c99 for a long time. This is sort of backwards -- the kernel is inherently more unportable and can't possible be compiled by a C99 compiler, while parts of userland can. However, userland is larger, so people setting excessive -std flags soon found that -std=c99 doesn't work. With no -std flag, gcc defaults to something like -std=gnu89, so it supports its old anonymous unions feature but not the many C99 features needed to compile almost anything now. Bruce ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317529 - in stable: 10/sys/sys 11/sys/sys
Author: badger Date: Thu Apr 27 22:28:49 2017 New Revision: 317529 URL: https://svnweb.freebsd.org/changeset/base/317529 Log: Move td_sigqueue to the end of struct thread In order to preserve KBI in stable branches, replace the existing td_sigqueue slot with padding and move the expanded (as of r315949) td_sigqueue to the end of the struct. Reported by: jhb Suggested by: kib Reviewed by: jhb, kib, vangyzen Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D10515 Modified: stable/10/sys/sys/proc.h Changes in other areas also in this revision: Modified: stable/11/sys/sys/proc.h Modified: stable/10/sys/sys/proc.h == --- stable/10/sys/sys/proc.hThu Apr 27 22:03:08 2017(r317528) +++ stable/10/sys/sys/proc.hThu Apr 27 22:28:49 2017(r317529) @@ -218,8 +218,8 @@ struct thread { struct rl_q_entry *td_rlqe; /* (k) Associated range lock entry. */ struct umtx_q *td_umtxq; /* (c?) Link for when we're blocked. */ lwpid_t td_tid; /* (b) Thread ID. */ - sigqueue_t td_sigqueue;/* (c) Sigs arrived, not delivered. */ -#definetd_siglist td_sigqueue.sq_signals + uint64_tpadding1[4]; + void*padding2[4]; u_char td_lend_user_pri; /* (t) Lend user pri. */ /* Cleared during fork1() */ @@ -326,6 +326,8 @@ struct thread { u_int td_dbg_sc_narg; /* (c) Syscall arg count to debugger.*/ void*td_emuldata; /* Emulator state data */ sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ + sigqueue_t td_sigqueue;/* (c) Sigs arrived, not delivered. */ +#definetd_siglist td_sigqueue.sq_signals }; struct mtx *thread_lock_block(struct thread *); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317529 - in stable: 10/sys/sys 11/sys/sys
Author: badger Date: Thu Apr 27 22:28:49 2017 New Revision: 317529 URL: https://svnweb.freebsd.org/changeset/base/317529 Log: Move td_sigqueue to the end of struct thread In order to preserve KBI in stable branches, replace the existing td_sigqueue slot with padding and move the expanded (as of r315949) td_sigqueue to the end of the struct. Reported by: jhb Suggested by: kib Reviewed by: jhb, kib, vangyzen Sponsored by: Dell EMC Differential Revision:https://reviews.freebsd.org/D10515 Modified: stable/11/sys/sys/proc.h Changes in other areas also in this revision: Modified: stable/10/sys/sys/proc.h Modified: stable/11/sys/sys/proc.h == --- stable/11/sys/sys/proc.hThu Apr 27 22:03:08 2017(r317528) +++ stable/11/sys/sys/proc.hThu Apr 27 22:28:49 2017(r317529) @@ -224,8 +224,8 @@ struct thread { struct umtx_q *td_umtxq; /* (c?) Link for when we're blocked. */ struct vm_domain_policy td_vm_dom_policy; /* (c) current numa domain policy */ lwpid_t td_tid; /* (b) Thread ID. */ - sigqueue_t td_sigqueue;/* (c) Sigs arrived, not delivered. */ -#definetd_siglist td_sigqueue.sq_signals + uint64_tpadding1[4]; + void*padding2[4]; u_char td_lend_user_pri; /* (t) Lend user pri. */ /* Cleared during fork1() */ @@ -341,6 +341,8 @@ struct thread { int td_lastcpu; /* (t) Last cpu we were on. */ int td_oncpu; /* (t) Which cpu we are on. */ sbintime_t td_sleeptimo; /* (t) Sleep timeout. */ + sigqueue_t td_sigqueue;/* (c) Sigs arrived, not delivered. */ +#definetd_siglist td_sigqueue.sq_signals }; struct thread0_storage { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r314937 - in stable/10/sys: fs/ext2fs modules/ext2fs
On 28 Apr 2017, at 00:00, Ngie Cooperwrote: > > On Thu, Apr 27, 2017 at 1:52 PM, Ed Maste wrote: >> On 8 March 2017 at 21:47, Pedro F. Giffuni wrote: >>> Author: pfg >>> Date: Thu Mar 9 02:47:01 2017 >>> New Revision: 314937 >>> URL: https://svnweb.freebsd.org/changeset/base/314937 >>> >>> Log: >>> Revert 294545: >>> Bringing back ext4: add support for reading sparse files >> >> Tinderbox is broken on GCC architectures, e.g. from powerpc.LINT64: >> >> In file included from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/inode.h:46, >> from >> /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_alloc.c:50: >> /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_extents.h:91: warning: >> declaration does not declare anything > > ... because of anonymous unions not being supported in gcc 4.2.1. They are, if you use the aptly-named -fms-extensions flag. In r278913 this was enabled globally for gcc, see sys/conf/kern.pre.mk. Not sure what happened that it breaks now, though. -Dimitry signature.asc Description: Message signed with OpenPGP
Re: svn commit: r314937 - in stable/10/sys: fs/ext2fs modules/ext2fs
On Thu, Apr 27, 2017 at 03:00:56PM -0700, Ngie Cooper wrote: N> On Thu, Apr 27, 2017 at 1:52 PM, Ed Mastewrote: N> > On 8 March 2017 at 21:47, Pedro F. Giffuni wrote: N> >> Author: pfg N> >> Date: Thu Mar 9 02:47:01 2017 N> >> New Revision: 314937 N> >> URL: https://svnweb.freebsd.org/changeset/base/314937 N> >> N> >> Log: N> >> Revert 294545: N> >> Bringing back ext4: add support for reading sparse files N> > N> > Tinderbox is broken on GCC architectures, e.g. from powerpc.LINT64: N> > N> > In file included from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/inode.h:46, N> > from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_alloc.c:50: N> > /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_extents.h:91: warning: N> > declaration does not declare anything N> N> ... because of anonymous unions not being supported in gcc 4.2.1. The whole kernel is built with option that enables them on 4.2.1. CFLAGS.gcc+=-fms-extensions -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv
On Thu, Apr 27, 2017 at 1:07 PM, Ed Mastewrote: > On 15 March 2017 at 17:20, Eric Joyner wrote: >> Author: erj >> Date: Wed Mar 15 21:20:17 2017 >> New Revision: 315333 >> URL: https://svnweb.freebsd.org/changeset/base/315333 >> >> Log: >> ixgbe(4): Update to 3.2.11-k > > This broke tinderbox on many architectures: > > ia64 GENERIC and powerpc GENERIC64: > > /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixv_osdep.c:39: warning: no > previous prototype for 'ixv_read_pci_cfg' [-Wmissing-prototypes] > /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixv_osdep.c:45: warning: no > previous prototype for 'ixv_write_pci_cfg' [-Wmissing-prototypes] > > sparc64 LINT: > > /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ix_txrx.c:43: warning: > redundant redeclaration of 'ix_crcstrip' [-Wredundant-decls] > /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixgbe_netmap.h:45: warning: > previous declaration of 'ix_crcstrip' was here > > amd64 LINT: > > /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixv_netmap.c:(.text+0x0): > multiple definition of `ixgbe_netmap_attach' > ixgbe_netmap.o:/scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixgbe_netmap.c:(.text+0x0): > first defined here Hi Ed, It has to do with netmap(4) refactoring on head not being backported, in combination with ixgbe/ix being MFCed in a refactored state back to ^/stable/10 (it wasn't easy to backport due to PCI-IOV only being on ^/stable/10 -- I tried starting this work and failed because I lacked the hardware to test this out with). This has been known to be broken for almost two months -- a surgical fix should probably be applied to do what's required to make the symbol appear in the appropriate places, since this basically was a direct commit to ^/stable/10 in some regards. Thanks, -Ngie ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r314937 - in stable/10/sys: fs/ext2fs modules/ext2fs
On Thu, Apr 27, 2017 at 1:52 PM, Ed Mastewrote: > On 8 March 2017 at 21:47, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Thu Mar 9 02:47:01 2017 >> New Revision: 314937 >> URL: https://svnweb.freebsd.org/changeset/base/314937 >> >> Log: >> Revert 294545: >> Bringing back ext4: add support for reading sparse files > > Tinderbox is broken on GCC architectures, e.g. from powerpc.LINT64: > > In file included from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/inode.h:46, > from > /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_alloc.c:50: > /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_extents.h:91: warning: > declaration does not declare anything ... because of anonymous unions not being supported in gcc 4.2.1. HTH, -Ngie ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317527 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: jpaetzel Date: Thu Apr 27 22:00:03 2017 New Revision: 317527 URL: https://svnweb.freebsd.org/changeset/base/317527 Log: MFV 316898 7613 ms_freetree[4] is only used in syncing context illumos/illumos-gate@5f145778012b555e084eacc858ead9e1e42bd149 https://github.com/illumos/illumos-gate/commit/5f145778012b555e084eacc858ead9e1e42bd149 https://www.illumos.org/issues/7613 metaslab_t:ms_freetree[TXG_SIZE] is only used in syncing context. We should replace it with two trees: the freeing tree (ranges that we are freeing this syncing txg) and the freed tree (ranges which have been freed this txg). Reviewed by: George WilsonReviewed by: Alex Reece Approved by: Dan McDonald Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Thu Apr 27 21:45:50 2017(r317526) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Thu Apr 27 22:00:03 2017(r317527) @@ -533,7 +533,6 @@ metaslab_verify_space(metaslab_t *msp, u { spa_t *spa = msp->ms_group->mg_vd->vdev_spa; uint64_t allocated = 0; - uint64_t freed = 0; uint64_t sm_free_space, msp_free_space; ASSERT(MUTEX_HELD(>ms_lock)); @@ -563,10 +562,9 @@ metaslab_verify_space(metaslab_t *msp, u allocated += range_tree_space(msp->ms_alloctree[(txg + t) & TXG_MASK]); } - freed = range_tree_space(msp->ms_freetree[TXG_CLEAN(txg) & TXG_MASK]); msp_free_space = range_tree_space(msp->ms_tree) + allocated + - msp->ms_deferspace + freed; + msp->ms_deferspace + range_tree_space(msp->ms_freedtree); VERIFY3U(sm_free_space, ==, msp_free_space); } @@ -1499,7 +1497,7 @@ metaslab_init(metaslab_group_t *mg, uint /* * We create the main range tree here, but we don't create the -* alloctree and freetree until metaslab_sync_done(). This serves +* other range trees until metaslab_sync_done(). This serves * two purposes: it allows metaslab_sync_done() to detect the * addition of new space; and for debugging, it ensures that we'd * data fault on any attempt to use this metaslab before it's ready. @@ -1557,10 +1555,11 @@ metaslab_fini(metaslab_t *msp) metaslab_unload(msp); range_tree_destroy(msp->ms_tree); + range_tree_destroy(msp->ms_freeingtree); + range_tree_destroy(msp->ms_freedtree); for (int t = 0; t < TXG_SIZE; t++) { range_tree_destroy(msp->ms_alloctree[t]); - range_tree_destroy(msp->ms_freetree[t]); } for (int t = 0; t < TXG_DEFER_SIZE; t++) { @@ -2171,7 +2170,6 @@ static void metaslab_condense(metaslab_t *msp, uint64_t txg, dmu_tx_t *tx) { spa_t *spa = msp->ms_group->mg_vd->vdev_spa; - range_tree_t *freetree = msp->ms_freetree[txg & TXG_MASK]; range_tree_t *condense_tree; space_map_t *sm = msp->ms_sm; @@ -2202,9 +2200,9 @@ metaslab_condense(metaslab_t *msp, uint6 /* * Remove what's been freed in this txg from the condense_tree. * Since we're in sync_pass 1, we know that all the frees from -* this txg are in the freetree. +* this txg are in the freeingtree. */ - range_tree_walk(freetree, range_tree_remove, condense_tree); + range_tree_walk(msp->ms_freeingtree, range_tree_remove, condense_tree); for (int t = 0; t < TXG_DEFER_SIZE; t++) { range_tree_walk(msp->ms_defertree[t], @@ -2260,9 +2258,6 @@ metaslab_sync(metaslab_t *msp, uint64_t spa_t *spa = vd->vdev_spa; objset_t *mos = spa_meta_objset(spa); range_tree_t *alloctree = msp->ms_alloctree[txg & TXG_MASK]; - range_tree_t **freetree = >ms_freetree[txg & TXG_MASK]; - range_tree_t **freed_tree = - >ms_freetree[TXG_CLEAN(txg) & TXG_MASK]; dmu_tx_t *tx; uint64_t object = space_map_object(msp->ms_sm); @@ -2271,14 +2266,14 @@ metaslab_sync(metaslab_t *msp, uint64_t /* * This metaslab has just been added so there's no work to do now. */ - if (*freetree == NULL) { + if (msp->ms_freeingtree == NULL) { ASSERT3P(alloctree, ==, NULL); return; } ASSERT3P(alloctree, !=, NULL); - ASSERT3P(*freetree, !=, NULL); - ASSERT3P(*freed_tree, !=, NULL); + ASSERT3P(msp->ms_freeingtree, !=, NULL); +
svn commit: r317526 - stable/10/sbin/mount_nfs
Author: rmacklem Date: Thu Apr 27 21:45:50 2017 New Revision: 317526 URL: https://svnweb.freebsd.org/changeset/base/317526 Log: MFC: r316793 Document the "oneopenown" option added by r316792. This is a content change. Modified: stable/10/sbin/mount_nfs/mount_nfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_nfs/mount_nfs.8 == --- stable/10/sbin/mount_nfs/mount_nfs.8Thu Apr 27 21:37:39 2017 (r317525) +++ stable/10/sbin/mount_nfs/mount_nfs.8Thu Apr 27 21:45:50 2017 (r317526) @@ -28,7 +28,7 @@ .\"@(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd October 30, 2014 +.Dd April 13, 2017 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -207,6 +207,14 @@ The only minor version currently support This option is only meaningful when used with the .Cm nfsv4 option. +.It Cm oneopenown +Make a minor version 1 of the NFS Version 4 protocol mount use a single OpenOwner +for all Opens. +This may be useful for a server with a very low limit on OpenOwners, such as +AmazonEFS. +It can only be used with an NFSv4.1 mount. +It may not work correctly when Delegations are being issued by a server, +but note that the AmazonEFS server does not issued delegations at this time. .It Cm pnfs Enable support for parallel NFS (pNFS) for minor version 1 of the NFS Version 4 protocol. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317525 - in stable/10/sys: fs/nfs fs/nfsclient nfsclient
Author: rmacklem Date: Thu Apr 27 21:37:39 2017 New Revision: 317525 URL: https://svnweb.freebsd.org/changeset/base/317525 Log: MFC: r316792 Add an NFSv4.1 mount option for "use one openowner". Some NFSv4.1 servers such as AmazonEFS can only support a small fixed number of open_owner4s. This patch adds a mount option called "oneopenown" that can be used for NFSv4.1 mounts to make the client do all Opens with the same open_owner4 string. This option can only be used with NFSv4.1 and may not work correctly when Delegations are is use. Differential Revision:https://reviews.freebsd.org/D8988 Modified: stable/10/sys/fs/nfs/nfs_var.h stable/10/sys/fs/nfs/nfsport.h stable/10/sys/fs/nfsclient/nfs_clport.c stable/10/sys/fs/nfsclient/nfs_clrpcops.c stable/10/sys/fs/nfsclient/nfs_clstate.c stable/10/sys/fs/nfsclient/nfs_clvfsops.c stable/10/sys/nfsclient/nfsargs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_var.h == --- stable/10/sys/fs/nfs/nfs_var.h Thu Apr 27 21:27:20 2017 (r317524) +++ stable/10/sys/fs/nfs/nfs_var.h Thu Apr 27 21:37:39 2017 (r317525) @@ -502,8 +502,8 @@ int nfscl_open(vnode_t, u_int8_t *, int, int *, int *, int); int nfscl_getstateid(vnode_t, u_int8_t *, int, u_int32_t, int, struct ucred *, NFSPROC_T *, nfsv4stateid_t *, void **); -void nfscl_ownerrelease(struct nfsclowner *, int, int, int); -void nfscl_openrelease(struct nfsclopen *, int, int); +void nfscl_ownerrelease(struct nfsmount *, struct nfsclowner *, int, int, int); +void nfscl_openrelease(struct nfsmount *, struct nfsclopen *, int, int); int nfscl_getcl(struct mount *, struct ucred *, NFSPROC_T *, int, struct nfsclclient **); struct nfsclclient *nfscl_findcl(struct nfsmount *); Modified: stable/10/sys/fs/nfs/nfsport.h == --- stable/10/sys/fs/nfs/nfsport.h Thu Apr 27 21:27:20 2017 (r317524) +++ stable/10/sys/fs/nfs/nfsport.h Thu Apr 27 21:37:39 2017 (r317525) @@ -862,6 +862,8 @@ int newnfs_realign(struct mbuf **, int); #defineNFSHASNOLAYOUTCOMMIT(n) ((n)->nm_state & NFSSTA_NOLAYOUTCOMMIT) #defineNFSHASSESSPERSIST(n)((n)->nm_state & NFSSTA_SESSPERSIST) #defineNFSHASPNFS(n) ((n)->nm_state & NFSSTA_PNFS) +#defineNFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 0 && \ + (n)->nm_minorvers > 0) /* * Gets the stats field out of the mount structure. Modified: stable/10/sys/fs/nfsclient/nfs_clport.c == --- stable/10/sys/fs/nfsclient/nfs_clport.c Thu Apr 27 21:27:20 2017 (r317524) +++ stable/10/sys/fs/nfsclient/nfs_clport.c Thu Apr 27 21:37:39 2017 (r317525) @@ -557,7 +557,7 @@ nfscl_filllockowner(void *id, u_int8_t * struct proc *p; if (id == NULL) { - printf("NULL id\n"); + /* Return the single open_owner of all 0 bytes. */ bzero(cp, NFSV4CL_LOCKNAMELEN); return; } @@ -1184,7 +1184,14 @@ nfscl_procdoesntexist(u_int8_t *own) } tl; struct proc *p; pid_t pid; - int ret = 0; + int i, ret = 0; + + /* For the single open_owner of all 0 bytes, just return 0. */ + for (i = 0; i < NFSV4CL_LOCKNAMELEN; i++) + if (own[i] != 0) + break; + if (i == NFSV4CL_LOCKNAMELEN) + return (0); tl.cval[0] = *own++; tl.cval[1] = *own++; Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c == --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 27 21:27:20 2017 (r317524) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 27 21:37:39 2017 (r317525) @@ -347,7 +347,7 @@ else printf(" fhl=0\n"); */ if (!error) op->nfso_opencnt++; - nfscl_openrelease(op, error, newone); + nfscl_openrelease(nmp, op, error, newone); if (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID || error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY || error == NFSERR_BADSESSION) { @@ -1890,7 +1890,7 @@ nfsrpc_create(vnode_t dvp, char *name, i if (dp != NULL) (void) nfscl_deleg(nmp->nm_mountp, owp->nfsow_clp, (*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, ); - nfscl_ownerrelease(owp, error, newone, unlocked); + nfscl_ownerrelease(nmp, owp, error, newone, unlocked); if (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID || error ==
svn commit: r317524 - stable/10/sys/fs/nfsclient
Author: rmacklem Date: Thu Apr 27 21:27:20 2017 New Revision: 317524 URL: https://svnweb.freebsd.org/changeset/base/317524 Log: MFC: r316782 Add call to svcpool_close() for the NFSv4 callback pool (svcpool_nfscbd). A function called svcpool_close() was added to the server side krpc by r313735, so that a pool could be closed without destroying the data structures. This little patch adds a call to it for the callback pool (svcpool_nfscbd), so that the nfscbd daemon can be killed/restarted and continue to work correctly. Modified: stable/10/sys/fs/nfsclient/nfs_clkrpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clkrpc.c == --- stable/10/sys/fs/nfsclient/nfs_clkrpc.c Thu Apr 27 21:24:50 2017 (r317523) +++ stable/10/sys/fs/nfsclient/nfs_clkrpc.c Thu Apr 27 21:27:20 2017 (r317524) @@ -278,6 +278,11 @@ nfsrvd_cbinit(int terminating) while (nfs_numnfscbd > 0) msleep(_numnfscbd, NFSDLOCKMUTEXPTR, PZERO, "nfscbdt", 0); + if (nfscbd_pool != NULL) { + NFSD_UNLOCK(); + svcpool_close(nfscbd_pool); + NFSD_LOCK(); + } } if (nfscbd_pool == NULL) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317523 - head/sys/kern
Author: kib Date: Thu Apr 27 21:24:50 2017 New Revision: 317523 URL: https://svnweb.freebsd.org/changeset/base/317523 Log: Add asserts to verify stability of struct proc and struct thread layouts. Some notes: - Only i386 and amd64 layouts are checked, other Tier-1 (or close to it) architectures would benefit from the same check. - Unconditional enabling of the asserts depend on the stability of locks memory layout. If locks are optimized to avoid bloat when some debugging or profiling features turned off, it makes sense to only assert layout for production configs. Reviewed by: badger, emaste, jhb, vangyzen Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D10526 Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c == --- head/sys/kern/kern_thread.c Thu Apr 27 21:11:57 2017(r317522) +++ head/sys/kern/kern_thread.c Thu Apr 27 21:24:50 2017(r317523) @@ -65,6 +65,57 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * Asserts below verify the stability of struct thread and struct proc + * layout, as exposed by KBI to modules. On head, the KBI is allowed + * to drift, change to the structures must be accompanied by the + * assert update. + * + * On the stable branches after KBI freeze, conditions must not be + * violated. Typically new fields are moved to the end of the + * structures. + */ +#ifdef __amd64__ +_Static_assert(offsetof(struct thread, td_flags) == 0xf4, +"struct thread KBI td_flags"); +_Static_assert(offsetof(struct thread, td_pflags) == 0xfc, +"struct thread KBI td_pflags"); +_Static_assert(offsetof(struct thread, td_frame) == 0x410, +"struct thread KBI td_frame"); +_Static_assert(offsetof(struct thread, td_emuldata) == 0x4b8, +"struct thread KBI td_emuldata"); +_Static_assert(offsetof(struct proc, p_flag) == 0xb0, +"struct proc KBI p_flag"); +_Static_assert(offsetof(struct proc, p_pid) == 0xbc, +"struct proc KBI p_pid"); +_Static_assert(offsetof(struct proc, p_filemon) == 0x3d0, +"struct proc KBI p_filemon"); +_Static_assert(offsetof(struct proc, p_comm) == 0x3e0, +"struct proc KBI p_comm"); +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b8, +"struct proc KBI p_emuldata"); +#endif +#ifdef __i386__ +_Static_assert(offsetof(struct thread, td_flags) == 0x9c, +"struct thread KBI td_flags"); +_Static_assert(offsetof(struct thread, td_pflags) == 0xa4, +"struct thread KBI td_pflags"); +_Static_assert(offsetof(struct thread, td_frame) == 0x2c8, +"struct thread KBI td_frame"); +_Static_assert(offsetof(struct thread, td_emuldata) == 0x314, +"struct thread KBI td_emuldata"); +_Static_assert(offsetof(struct proc, p_flag) == 0x68, +"struct proc KBI p_flag"); +_Static_assert(offsetof(struct proc, p_pid) == 0x74, +"struct proc KBI p_pid"); +_Static_assert(offsetof(struct proc, p_filemon) == 0x27c, +"struct proc KBI p_filemon"); +_Static_assert(offsetof(struct proc, p_comm) == 0x288, +"struct proc KBI p_comm"); +_Static_assert(offsetof(struct proc, p_emuldata) == 0x314, +"struct proc KBI p_emuldata"); +#endif + SDT_PROVIDER_DECLARE(proc); SDT_PROBE_DEFINE(proc, , , lwp__exit); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r317509 - in head: . share/man/man4 sys/conf sys/dev/cy
On Thu, 27 Apr 2017, John Baldwin wrote: Author: jhb Date: Thu Apr 27 16:14:32 2017 New Revision: 317509 URL: https://svnweb.freebsd.org/changeset/base/317509 Log: Revert r317446 and bring back cy(4). Requested by: bde Thanks. Bruce ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317522 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Author: jpaetzel Date: Thu Apr 27 21:11:57 2017 New Revision: 317522 URL: https://svnweb.freebsd.org/changeset/base/317522 Log: MFV 316897 7586 remove #ifdef __lint hack from dmu.h illumos/illumos-gate@4ba5b9616327ef64e8abc737d29b3faabc6ae68c https://github.com/illumos/illumos-gate/commit/4ba5b9616327ef64e8abc737d29b3faabc6ae68c https://www.illumos.org/issues/7586 The #ifdef __lint in dmu.h is ugly, and it would be nice not to duplicate it if we add other inline functions into header files in ZFS, especially since it is difficult to make any other solution work across all compilation targets. We should switch to disabling the lint flags that are failing instead. Reviewed by: Matthew AhrensReviewed by: Pavel Zakharov Approved by: Dan McDonald Author: Dan Kimmel Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Apr 27 20:21:29 2017(r317521) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Apr 27 21:11:57 2017(r317522) @@ -567,12 +567,7 @@ typedef struct dmu_buf_user { * NOTE: This function should only be called once on a given dmu_buf_user_t. * To allow enforcement of this, dbu must already be zeroed on entry. */ -#ifdef __lint -/* Very ugly, but it beats issuing suppression directives in many Makefiles. */ -extern void -dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func, -dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp); -#else /* __lint */ +/*ARGSUSED*/ inline void dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync, dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp) @@ -588,7 +583,6 @@ dmu_buf_init_user(dmu_buf_user_t *dbu, d dbu->dbu_clear_on_evict_dbufp = clear_on_evict_dbufp; #endif } -#endif /* __lint */ /* * Attach user data to a dbuf and mark it for normal (when the dbuf's Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Thu Apr 27 20:21:29 2017(r317521) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Thu Apr 27 21:11:57 2017(r317522) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2016 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright 2013 Saso Kiselkov. All rights reserved. @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -611,8 +612,6 @@ _NOTE(CONSTCOND) } while (0) ASSERT(len < size); \ } -#include - #defineBP_GET_BUFC_TYPE(bp) \ (((BP_GET_LEVEL(bp) > 0) || (DMU_OT_IS_METADATA(BP_GET_TYPE(bp ? \ ARC_BUFC_METADATA : ARC_BUFC_DATA) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r314937 - in stable/10/sys: fs/ext2fs modules/ext2fs
On 8 March 2017 at 21:47, Pedro F. Giffuniwrote: > Author: pfg > Date: Thu Mar 9 02:47:01 2017 > New Revision: 314937 > URL: https://svnweb.freebsd.org/changeset/base/314937 > > Log: > Revert 294545: > Bringing back ext4: add support for reading sparse files Tinderbox is broken on GCC architectures, e.g. from powerpc.LINT64: In file included from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/inode.h:46, from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_alloc.c:50: /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_extents.h:91: warning: declaration does not declare anything ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317521 - stable/11/sbin/mount_nfs
Author: rmacklem Date: Thu Apr 27 20:21:29 2017 New Revision: 317521 URL: https://svnweb.freebsd.org/changeset/base/317521 Log: MFC: r316793 Document the "oneopenown" option added by r316792. This is a content change. Modified: stable/11/sbin/mount_nfs/mount_nfs.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mount_nfs/mount_nfs.8 == --- stable/11/sbin/mount_nfs/mount_nfs.8Thu Apr 27 20:14:54 2017 (r317520) +++ stable/11/sbin/mount_nfs/mount_nfs.8Thu Apr 27 20:21:29 2017 (r317521) @@ -28,7 +28,7 @@ .\"@(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd October 30, 2014 +.Dd April 13, 2017 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -201,6 +201,14 @@ The only minor version currently support This option is only meaningful when used with the .Cm nfsv4 option. +.It Cm oneopenown +Make a minor version 1 of the NFS Version 4 protocol mount use a single OpenOwner +for all Opens. +This may be useful for a server with a very low limit on OpenOwners, such as +AmazonEFS. +It can only be used with an NFSv4.1 mount. +It may not work correctly when Delegations are being issued by a server, +but note that the AmazonEFS server does not issued delegations at this time. .It Cm pnfs Enable support for parallel NFS (pNFS) for minor version 1 of the NFS Version 4 protocol. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317520 - in stable/11/sys: fs/nfs fs/nfsclient nfsclient
Author: rmacklem Date: Thu Apr 27 20:14:54 2017 New Revision: 317520 URL: https://svnweb.freebsd.org/changeset/base/317520 Log: MFC: r316792 Add an NFSv4.1 mount option for "use one openowner". Some NFSv4.1 servers such as AmazonEFS can only support a small fixed number of open_owner4s. This patch adds a mount option called "oneopenown" that can be used for NFSv4.1 mounts to make the client do all Opens with the same open_owner4 string. This option can only be used with NFSv4.1 and may not work correctly when Delegations are is use. Differential Revision:https://reviews.freebsd.org/D8988 Modified: stable/11/sys/fs/nfs/nfs_var.h stable/11/sys/fs/nfs/nfsport.h stable/11/sys/fs/nfsclient/nfs_clport.c stable/11/sys/fs/nfsclient/nfs_clrpcops.c stable/11/sys/fs/nfsclient/nfs_clstate.c stable/11/sys/fs/nfsclient/nfs_clvfsops.c stable/11/sys/nfsclient/nfsargs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfs/nfs_var.h == --- stable/11/sys/fs/nfs/nfs_var.h Thu Apr 27 20:07:14 2017 (r317519) +++ stable/11/sys/fs/nfs/nfs_var.h Thu Apr 27 20:14:54 2017 (r317520) @@ -502,8 +502,8 @@ int nfscl_open(vnode_t, u_int8_t *, int, int *, int *, int); int nfscl_getstateid(vnode_t, u_int8_t *, int, u_int32_t, int, struct ucred *, NFSPROC_T *, nfsv4stateid_t *, void **); -void nfscl_ownerrelease(struct nfsclowner *, int, int, int); -void nfscl_openrelease(struct nfsclopen *, int, int); +void nfscl_ownerrelease(struct nfsmount *, struct nfsclowner *, int, int, int); +void nfscl_openrelease(struct nfsmount *, struct nfsclopen *, int, int); int nfscl_getcl(struct mount *, struct ucred *, NFSPROC_T *, int, struct nfsclclient **); struct nfsclclient *nfscl_findcl(struct nfsmount *); Modified: stable/11/sys/fs/nfs/nfsport.h == --- stable/11/sys/fs/nfs/nfsport.h Thu Apr 27 20:07:14 2017 (r317519) +++ stable/11/sys/fs/nfs/nfsport.h Thu Apr 27 20:14:54 2017 (r317520) @@ -929,6 +929,8 @@ int newnfs_realign(struct mbuf **, int); #defineNFSHASNOLAYOUTCOMMIT(n) ((n)->nm_state & NFSSTA_NOLAYOUTCOMMIT) #defineNFSHASSESSPERSIST(n)((n)->nm_state & NFSSTA_SESSPERSIST) #defineNFSHASPNFS(n) ((n)->nm_state & NFSSTA_PNFS) +#defineNFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 0 && \ + (n)->nm_minorvers > 0) /* * Gets the stats field out of the mount structure. Modified: stable/11/sys/fs/nfsclient/nfs_clport.c == --- stable/11/sys/fs/nfsclient/nfs_clport.c Thu Apr 27 20:07:14 2017 (r317519) +++ stable/11/sys/fs/nfsclient/nfs_clport.c Thu Apr 27 20:14:54 2017 (r317520) @@ -634,7 +634,7 @@ nfscl_filllockowner(void *id, u_int8_t * struct proc *p; if (id == NULL) { - printf("NULL id\n"); + /* Return the single open_owner of all 0 bytes. */ bzero(cp, NFSV4CL_LOCKNAMELEN); return; } @@ -1255,7 +1255,14 @@ nfscl_procdoesntexist(u_int8_t *own) } tl; struct proc *p; pid_t pid; - int ret = 0; + int i, ret = 0; + + /* For the single open_owner of all 0 bytes, just return 0. */ + for (i = 0; i < NFSV4CL_LOCKNAMELEN; i++) + if (own[i] != 0) + break; + if (i == NFSV4CL_LOCKNAMELEN) + return (0); tl.cval[0] = *own++; tl.cval[1] = *own++; Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c == --- stable/11/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 27 20:07:14 2017 (r317519) +++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 27 20:14:54 2017 (r317520) @@ -347,7 +347,7 @@ else printf(" fhl=0\n"); */ if (!error) op->nfso_opencnt++; - nfscl_openrelease(op, error, newone); + nfscl_openrelease(nmp, op, error, newone); if (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID || error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY || error == NFSERR_BADSESSION) { @@ -1893,7 +1893,7 @@ nfsrpc_create(vnode_t dvp, char *name, i if (dp != NULL) (void) nfscl_deleg(nmp->nm_mountp, owp->nfsow_clp, (*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, ); - nfscl_ownerrelease(owp, error, newone, unlocked); + nfscl_ownerrelease(nmp, owp, error, newone, unlocked); if (error == NFSERR_GRACE || error == NFSERR_STALECLIENTID || error ==
Re: svn commit: r315333 - in stable/10/sys: conf dev/ixgbe modules/ix modules/ixv
On 15 March 2017 at 17:20, Eric Joynerwrote: > Author: erj > Date: Wed Mar 15 21:20:17 2017 > New Revision: 315333 > URL: https://svnweb.freebsd.org/changeset/base/315333 > > Log: > ixgbe(4): Update to 3.2.11-k This broke tinderbox on many architectures: ia64 GENERIC and powerpc GENERIC64: /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixv_osdep.c:39: warning: no previous prototype for 'ixv_read_pci_cfg' [-Wmissing-prototypes] /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixv_osdep.c:45: warning: no previous prototype for 'ixv_write_pci_cfg' [-Wmissing-prototypes] sparc64 LINT: /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ix_txrx.c:43: warning: redundant redeclaration of 'ix_crcstrip' [-Wredundant-decls] /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixgbe_netmap.h:45: warning: previous declaration of 'ix_crcstrip' was here amd64 LINT: /scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixv_netmap.c:(.text+0x0): multiple definition of `ixgbe_netmap_attach' ixgbe_netmap.o:/scratch/tmp/emaste/freebsd/sys/dev/ixgbe/ixgbe_netmap.c:(.text+0x0): first defined here ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317519 - stable/11/sys/fs/nfsclient
Author: rmacklem Date: Thu Apr 27 20:07:14 2017 New Revision: 317519 URL: https://svnweb.freebsd.org/changeset/base/317519 Log: MFC: r316782 Add call to svcpool_close() for the NFSv4 callback pool (svcpool_nfscbd). A function called svcpool_close() was added to the server side krpc by r313735, so that a pool could be closed without destroying the data structures. This little patch adds a call to it for the callback pool (svcpool_nfscbd), so that the nfscbd daemon can be killed/restarted and continue to work correctly. Modified: stable/11/sys/fs/nfsclient/nfs_clkrpc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clkrpc.c == --- stable/11/sys/fs/nfsclient/nfs_clkrpc.c Thu Apr 27 19:57:18 2017 (r317518) +++ stable/11/sys/fs/nfsclient/nfs_clkrpc.c Thu Apr 27 20:07:14 2017 (r317519) @@ -278,6 +278,11 @@ nfsrvd_cbinit(int terminating) while (nfs_numnfscbd > 0) msleep(_numnfscbd, NFSDLOCKMUTEXPTR, PZERO, "nfscbdt", 0); + if (nfscbd_pool != NULL) { + NFSD_UNLOCK(); + svcpool_close(nfscbd_pool); + NFSD_LOCK(); + } } if (nfscbd_pool == NULL) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317518 - head/sys/contrib/ena-com
Author: zbb Date: Thu Apr 27 19:57:18 2017 New Revision: 317518 URL: https://svnweb.freebsd.org/changeset/base/317518 Log: Import Amazon Elastic Network Adapter (ENA) HAL to sys/contrib/ Import from vendor-sys/ena-com/1.1.4.1 SVN rev.: 317516 Version: 1.1.4.1 Obtained from: Amazon.com, Inc. Added: head/sys/contrib/ena-com/ - copied from r317517, vendor-sys/ena-com/1.1.4.1/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317517 - in head/sbin: kldconfig kldload
Author: trasz Date: Thu Apr 27 19:48:00 2017 New Revision: 317517 URL: https://svnweb.freebsd.org/changeset/base/317517 Log: Advertise kldxref(8) a little better. MFC after:2 weeks Modified: head/sbin/kldconfig/kldconfig.8 head/sbin/kldload/kldload.8 Modified: head/sbin/kldconfig/kldconfig.8 == --- head/sbin/kldconfig/kldconfig.8 Thu Apr 27 19:40:53 2017 (r317516) +++ head/sbin/kldconfig/kldconfig.8 Thu Apr 27 19:48:00 2017 (r317517) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 15, 2001 +.Dd April 27, 2017 .Dt KLDCONFIG 8 .Os .Sh NAME @@ -98,6 +98,7 @@ The default module search path used by t .Sh SEE ALSO .Xr kldload 2 , .Xr kldload 8 , +.Xr kldxref 8 , .Xr sysctl 8 .Sh HISTORY The Modified: head/sbin/kldload/kldload.8 == --- head/sbin/kldload/kldload.8 Thu Apr 27 19:40:53 2017(r317516) +++ head/sbin/kldload/kldload.8 Thu Apr 27 19:48:00 2017(r317517) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2012 +.Dd April 27, 2017 .Dt KLDLOAD 8 .Os .Sh NAME @@ -116,7 +116,8 @@ Modules may also be auto-loaded through .Xr security 7 , .Xr kldconfig 8 , .Xr kldstat 8 , -.Xr kldunload 8 +.Xr kldunload 8 , +.Xr kldxref 8 .Sh HISTORY The .Nm ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317516 - in vendor-sys/ena-com: . 1.1.4.1 dist
Author: zbb Date: Thu Apr 27 19:40:53 2017 New Revision: 317516 URL: https://svnweb.freebsd.org/changeset/base/317516 Log: Introduce HAL for Amazon Elastic Network Adapter (ENA) This commit adds HAL (Hardware Abstraction Layer) code for Amazon Elastic Network Adapter (ENA). Version: 1.1.4.1 Obtained from: Amazon.com, Inc. Added: vendor-sys/ena-com/ vendor-sys/ena-com/1.1.4.1/ vendor-sys/ena-com/1.1.4.1/ena_admin_defs.h (contents, props changed) vendor-sys/ena-com/1.1.4.1/ena_com.c (contents, props changed) vendor-sys/ena-com/1.1.4.1/ena_com.h (contents, props changed) vendor-sys/ena-com/1.1.4.1/ena_common_defs.h (contents, props changed) vendor-sys/ena-com/1.1.4.1/ena_eth_com.c (contents, props changed) vendor-sys/ena-com/1.1.4.1/ena_eth_com.h (contents, props changed) vendor-sys/ena-com/1.1.4.1/ena_eth_io_defs.h (contents, props changed) vendor-sys/ena-com/1.1.4.1/ena_plat.h (contents, props changed) vendor-sys/ena-com/1.1.4.1/ena_regs_defs.h (contents, props changed) vendor-sys/ena-com/dist/ vendor-sys/ena-com/dist/ena_admin_defs.h (contents, props changed) vendor-sys/ena-com/dist/ena_com.c (contents, props changed) vendor-sys/ena-com/dist/ena_com.h (contents, props changed) vendor-sys/ena-com/dist/ena_common_defs.h (contents, props changed) vendor-sys/ena-com/dist/ena_eth_com.c (contents, props changed) vendor-sys/ena-com/dist/ena_eth_com.h (contents, props changed) vendor-sys/ena-com/dist/ena_eth_io_defs.h (contents, props changed) vendor-sys/ena-com/dist/ena_plat.h (contents, props changed) vendor-sys/ena-com/dist/ena_regs_defs.h (contents, props changed) Added: vendor-sys/ena-com/1.1.4.1/ena_admin_defs.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/ena-com/1.1.4.1/ena_admin_defs.h Thu Apr 27 19:40:53 2017 (r317516) @@ -0,0 +1,1412 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of copyright holder nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _ENA_ADMIN_H_ +#define _ENA_ADMIN_H_ + +enum ena_admin_aq_opcode { + ENA_ADMIN_CREATE_SQ = 1, + + ENA_ADMIN_DESTROY_SQ= 2, + + ENA_ADMIN_CREATE_CQ = 3, + + ENA_ADMIN_DESTROY_CQ= 4, + + ENA_ADMIN_GET_FEATURE = 8, + + ENA_ADMIN_SET_FEATURE = 9, + + ENA_ADMIN_GET_STATS = 11, +}; + +enum ena_admin_aq_completion_status { + ENA_ADMIN_SUCCESS = 0, + + ENA_ADMIN_RESOURCE_ALLOCATION_FAILURE = 1, + + ENA_ADMIN_BAD_OPCODE= 2, + + ENA_ADMIN_UNSUPPORTED_OPCODE= 3, + + ENA_ADMIN_MALFORMED_REQUEST = 4, + + /* Additional status is provided in ACQ entry extended_status */ + ENA_ADMIN_ILLEGAL_PARAMETER = 5, + + ENA_ADMIN_UNKNOWN_ERROR = 6, +}; + +enum ena_admin_aq_feature_id { + ENA_ADMIN_DEVICE_ATTRIBUTES = 1, + + ENA_ADMIN_MAX_QUEUES_NUM= 2, + + ENA_ADMIN_HW_HINTS = 3, + + ENA_ADMIN_RSS_HASH_FUNCTION = 10, + + ENA_ADMIN_STATELESS_OFFLOAD_CONFIG = 11, + + ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG = 12, + + ENA_ADMIN_MTU = 14, + + ENA_ADMIN_RSS_HASH_INPUT= 18, + +
svn commit: r317515 - head/sbin/geom/class/part
Author: mav Date: Thu Apr 27 19:03:08 2017 New Revision: 317515 URL: https://svnweb.freebsd.org/changeset/base/317515 Log: Fix withered handling of r280687, broken by r286719. MFC after:1 week. Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c == --- head/sbin/geom/class/part/geom_part.c Thu Apr 27 18:52:18 2017 (r317514) +++ head/sbin/geom/class/part/geom_part.c Thu Apr 27 19:03:08 2017 (r317515) @@ -73,6 +73,7 @@ volatile sig_atomic_t undo_restore; static struct gclass *find_class(struct gmesh *, const char *); static struct ggeom * find_geom(struct gclass *, const char *); +static int geom_is_withered(struct ggeom *); static const char *find_geomcfg(struct ggeom *, const char *); static const char *find_provcfg(struct gprovider *, const char *); static struct gprovider *find_provider(struct ggeom *, off_t); @@ -215,7 +216,7 @@ find_geom(struct gclass *classp, const c LIST_FOREACH(gp, >lg_geom, lg_geom) { if (strcmp(gp->lg_name, name) != 0) continue; - if (find_geomcfg(gp, "wither") == NULL) + if (!geom_is_withered(gp)) return (gp); else wgp = gp; @@ -223,6 +224,18 @@ find_geom(struct gclass *classp, const c return (wgp); } +static int +geom_is_withered(struct ggeom *gp) +{ + struct gconfig *gc; + + LIST_FOREACH(gc, >lg_config, lg_config) { + if (!strcmp(gc->lg_name, "wither")) + return (1); + } + return (0); +} + static const char * find_geomcfg(struct ggeom *gp, const char *cfg) { @@ -614,7 +627,7 @@ gpart_show_geom(struct ggeom *gp, const off_t length, secsz; int idx, wblocks, wname, wmax; - if (find_geomcfg(gp, "wither")) + if (geom_is_withered(gp)) return; scheme = find_geomcfg(gp, "scheme"); if (scheme == NULL) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317514 - head/bin/sh/tests/expansion
Author: jilles Date: Thu Apr 27 18:52:18 2017 New Revision: 317514 URL: https://svnweb.freebsd.org/changeset/base/317514 Log: sh: Add some tests for command substitution final newline stripping. Added: head/bin/sh/tests/expansion/cmdsubst25.0 (contents, props changed) head/bin/sh/tests/expansion/cmdsubst26.0 (contents, props changed) Modified: head/bin/sh/tests/expansion/Makefile Modified: head/bin/sh/tests/expansion/Makefile == --- head/bin/sh/tests/expansion/MakefileThu Apr 27 18:21:38 2017 (r317513) +++ head/bin/sh/tests/expansion/MakefileThu Apr 27 18:52:18 2017 (r317514) @@ -46,6 +46,8 @@ ${PACKAGE}FILES+= cmdsubst21.0 ${PACKAGE}FILES+= cmdsubst22.0 ${PACKAGE}FILES+= cmdsubst23.0 ${PACKAGE}FILES+= cmdsubst24.0 +${PACKAGE}FILES+= cmdsubst25.0 +${PACKAGE}FILES+= cmdsubst26.0 ${PACKAGE}FILES+= export1.0 ${PACKAGE}FILES+= export2.0 ${PACKAGE}FILES+= export3.0 Added: head/bin/sh/tests/expansion/cmdsubst25.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/cmdsubst25.0Thu Apr 27 18:52:18 2017 (r317514) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +IFS=' ' +set -- `printf '\n '` +IFS=: +[ "$*" = ' +' ] Added: head/bin/sh/tests/expansion/cmdsubst26.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/expansion/cmdsubst26.0Thu Apr 27 18:52:18 2017 (r317514) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +nl=' +' +v=$nl`printf '\n'` +[ "$v" = "$nl" ] ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317513 - stable/10/sys/kern
Author: emaste Date: Thu Apr 27 18:21:38 2017 New Revision: 317513 URL: https://svnweb.freebsd.org/changeset/base/317513 Log: MFC r315237 (kib): Hide kev_iovlen() definition under #ifdef KTRACE Fixes build of kernel configs without KTRACE. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/kern/kern_event.c Modified: stable/10/sys/kern/kern_event.c == --- stable/10/sys/kern/kern_event.c Thu Apr 27 17:53:05 2017 (r317512) +++ stable/10/sys/kern/kern_event.c Thu Apr 27 18:21:38 2017 (r317513) @@ -825,6 +825,7 @@ done2: return (error); } +#ifdef KTRACE static size_t kev_iovlen(int n, u_int kgio) { @@ -833,6 +834,7 @@ kev_iovlen(int n, u_int kgio) return (kgio); return (n * sizeof(struct kevent)); } +#endif #ifndef _SYS_SYSPROTO_H_ struct kevent_args { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317512 - in head: sys/conf sys/libkern sys/libkern/arm64 sys/sys tests/sys/kern
Author: tuexen Date: Thu Apr 27 17:53:05 2017 New Revision: 317512 URL: https://svnweb.freebsd.org/changeset/base/317512 Log: armv8 has support for optional CRC32C instructions. This patch checks if they are available and if that is true make use of them. Thank you very much to Andrew Turner for providing help and review the patch! Reviewed by: andrew MFC after:1 week Differential Revision:https://reviews.freebsd.org/D10499 Added: head/sys/libkern/arm64/ head/sys/libkern/arm64/crc32c_armv8.S (contents, props changed) Modified: head/sys/conf/files.arm64 head/sys/libkern/crc32.c head/sys/sys/libkern.h head/tests/sys/kern/Makefile head/tests/sys/kern/libkern_crc32.c Modified: head/sys/conf/files.arm64 == --- head/sys/conf/files.arm64 Thu Apr 27 16:38:28 2017(r317511) +++ head/sys/conf/files.arm64 Thu Apr 27 17:53:05 2017(r317512) @@ -191,6 +191,7 @@ libkern/fls.c standard libkern/flsl.c standard libkern/flsll.cstandard libkern/memset.c standard +libkern/arm64/crc32c_armv8.S standard cddl/contrib/opensolaris/common/atomic/aarch64/opensolaris_atomic.S optional zfs | dtrace compile-with "${CDDL_C}" cddl/dev/dtrace/aarch64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/aarch64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" Added: head/sys/libkern/arm64/crc32c_armv8.S == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/arm64/crc32c_armv8.S Thu Apr 27 17:53:05 2017 (r317512) @@ -0,0 +1,78 @@ +/*- + * Copyright (c) 2017 Michael Tuexen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * uint32_t + * armv8_crc32c(uint32_t crc, const unsigned char *buf, unsigned int len) + */ + +ENTRY(armv8_crc32c) + cbz w2, end + tbz x1, #0x0, half_word_aligned + sub w2, w2, 0x1 + ldr w10, [x1], #0x1 + crc32cb w0, w0, w10 +half_word_aligned: + cmp w2, #0x2 + b.lolast_byte + tbz x1, #0x1, word_aligned + sub w2, w2, 0x2 + ldr w10, [x1], #0x2 + crc32ch w0, w0, w10 +word_aligned: + cmp w2, #0x4 + b.lolast_half_word + tbz x1, #0x2, double_word_aligned + sub w2, w2, 0x4 + ldr w10, [x1], #0x4 + crc32cw w0, w0, w10 +double_word_aligned: + lsr w9, w2, #0x3 + cbz w9, last_word +loop: + ldr x10, [x1], #0x8 + crc32cx w0, w0, x10 + subsw9, w9, #1 + b.neloop +last_word: + tbz w2, #0x2, last_half_word + ldr w10, [x1], #0x4 + crc32cw w0, w0, w10 +last_half_word: + tbz w2, #0x1, last_byte + ldr w10, [x1], #0x2 + crc32ch w0, w0, w10 +last_byte: + tbz w2, #0x0, end + ldr w10, [x1], #0x1 + crc32cb w0, w0, w10 +end: + ret +END(armv8_crc32c) Modified: head/sys/libkern/crc32.c == --- head/sys/libkern/crc32.cThu Apr 27 16:38:28 2017(r317511) +++ head/sys/libkern/crc32.cThu Apr 27 17:53:05 2017(r317512) @@ -54,6 +54,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#if defined(__aarch64__) +#include +#endif + const uint32_t crc32_tab[] = { 0x, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
Re: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/p
On 27/04/17 18:44, Bruce Simpson wrote: > Hopefully, with packet mode DSL, none of this should be needed again. > JFYI I'm referring to ye olde Packet Transfer Mode (PTM) DSL, TR-009... which dispenses with the need for ATM framing on DSL circuits. Some US ISPs have been observed doing this in the wild. DSL isn't going away any time soon, though -- many of us still use it as a backup circuit for other things (vs Metro Ethernet, G.FAST, DOCSIS etc.) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r317383 - in head: . etc/mtree include lib/libc/net rescue/rescue sbin sbin/atm sbin/atm/atmconfig share/man/man4 sys/boot/forth sys/conf sys/dev/en sys/dev/fatm sys/dev/hatm sys/dev/p
Hopefully, with packet mode DSL, none of this should be needed again. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317511 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: jpaetzel Date: Thu Apr 27 16:38:28 2017 New Revision: 317511 URL: https://svnweb.freebsd.org/changeset/base/317511 Log: MFV 316896 7580 ztest failure in dbuf_read_impl illumos/illumos-gate@1a01181fdc809f40c64d5c6881ae3e4521a9d9c7 https://github.com/illumos/illumos-gate/commit/1a01181fdc809f40c64d5c6881ae3e4521a9d9c7 https://www.illumos.org/issues/7580 We need to prevent any reader whenever we're about the zero out all the blkptrs. To do this we need to grab the dn_struct_rwlock as writer in dbuf_write_children_ready and free_children just prior to calling bzero. Reviewed by: Pavel ZakharovReviewed by: Steve Gonczi Reviewed by: Matthew Ahrens Approved by: Dan McDonald Author: George Wilson Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Apr 27 16:32:42 2017(r317510) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Thu Apr 27 16:38:28 2017(r317511) @@ -3317,13 +3317,13 @@ dbuf_write_children_ready(zio_t *zio, ar dmu_buf_impl_t *db = vdb; dnode_t *dn; blkptr_t *bp; - uint64_t i; - int epbs; + unsigned int epbs, i; ASSERT3U(db->db_level, >, 0); DB_DNODE_ENTER(db); dn = DB_DNODE(db); epbs = dn->dn_phys->dn_indblkshift - SPA_BLKPTRSHIFT; + ASSERT3U(epbs, <, 31); /* Determine if all our children are holes */ for (i = 0, bp = db->db.db_data; i < 1 << epbs; i++, bp++) { @@ -3336,8 +3336,14 @@ dbuf_write_children_ready(zio_t *zio, ar * we may get compressed away. */ if (i == 1 << epbs) { - /* didn't find any non-holes */ + /* +* We only found holes. Grab the rwlock to prevent +* anybody from reading the blocks we're about to +* zero out. +*/ + rw_enter(>dn_struct_rwlock, RW_WRITER); bzero(db->db.db_data, db->db.db_size); + rw_exit(>dn_struct_rwlock); } DB_DNODE_EXIT(db); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.cThu Apr 27 16:32:42 2017(r317510) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.cThu Apr 27 16:38:28 2017(r317511) @@ -236,8 +236,8 @@ free_children(dmu_buf_impl_t *db, uint64 dnode_t *dn; blkptr_t *bp; dmu_buf_impl_t *subdb; - uint64_t start, end, dbstart, dbend, i; - int epbs, shift; + uint64_t start, end, dbstart, dbend; + unsigned int epbs, shift, i; /* * There is a small possibility that this block will not be cached: @@ -254,6 +254,7 @@ free_children(dmu_buf_impl_t *db, uint64 DB_DNODE_ENTER(db); dn = DB_DNODE(db); epbs = dn->dn_phys->dn_indblkshift - SPA_BLKPTRSHIFT; + ASSERT3U(epbs, <, 31); shift = (db->db_level - 1) * epbs; dbstart = db->db_blkid << epbs; start = blkid >> shift; @@ -273,12 +274,12 @@ free_children(dmu_buf_impl_t *db, uint64 FREE_VERIFY(db, start, end, tx); free_blocks(dn, bp, end-start+1, tx); } else { - for (i = start; i <= end; i++, bp++) { + for (uint64_t id = start; id <= end; id++, bp++) { if (BP_IS_HOLE(bp)) continue; rw_enter(>dn_struct_rwlock, RW_READER); VERIFY0(dbuf_hold_impl(dn, db->db_level - 1, - i, TRUE, FALSE, FTAG, )); + id, TRUE, FALSE, FTAG, )); rw_exit(>dn_struct_rwlock); ASSERT3P(bp, ==, subdb->db_blkptr); @@ -293,8 +294,14 @@ free_children(dmu_buf_impl_t *db, uint64 break; } if (i == 1 << epbs) { - /* didn't find any non-holes */ + /* +* We only found holes. Grab the rwlock to prevent +* anybody from reading the blocks we're about to +* zero out. +*/ + rw_enter(>dn_struct_rwlock, RW_WRITER); bzero(db->db.db_data, db->db.db_size); + rw_exit(>dn_struct_rwlock); free_blocks(dn, db->db_blkptr, 1, tx);
svn commit: r317510 - in head/sys/dev: acpica pci
Author: jhb Date: Thu Apr 27 16:32:42 2017 New Revision: 317510 URL: https://svnweb.freebsd.org/changeset/base/317510 Log: Various fixes for PCI _OSC handling so HotPlug works again. - Rename the default implementation of 'pcib_request_feature' and add a pcib_request_feature() wrapper function (as is often done for new-bus APIs implemented via kobj) that accepts a single function. Previously the call to pcib_request_feature() ended up invoking the method on the great-great-grandparent of the bridge device instead of the grandparent. For a bridge that was a direct child of pci0 on x86 this resulted in the method skipping over the Host-PCI bridge driver and being invoked against nexus0 - When invoking _OSC from a Host-PCI bridge driver, invoke device_get_softc() against the Host-PCI bridge device instead of the child bridge that is requesting HotPlug. Using the wrong softc data resulted in garbage being passed for the ACPI handle causing the _OSC call to fail. - While here, perform some other cleanups to _OSC handling in the ACPI Host-PCI bridge driver: - Don't invoke _OSC when requesting a control that has already been granted by the firmware. - Don't set the first word of the capability array before invoking _OSC. This word is always set explicitly by acpi_EvaluateOSC() since it is UUID-independent. - Don't modify the set of granted controls unless _OSC doesn't exist (which is treated as always successful), or the _OSC method doesn't fail. - Don't require an _OSC status of 0 for success. _OSC always returns the updated control mask even if it returns a non-zero status in the first word. - Whine if _OSC ever tries to revoke a previously-granted control. (It is not supposed to do that.) - While here, add constants for the _OSC status word in acpivar.h (though currently unused). Reported by: adrian Reviewed by: imp MFC after:1 week Tested on:Lenovo x220 Differential Revision:https://reviews.freebsd.org/D10520 Modified: head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/acpica/acpivar.h head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_private.h Modified: head/sys/dev/acpica/acpi_pcib_acpi.c == --- head/sys/dev/acpica/acpi_pcib_acpi.cThu Apr 27 16:14:32 2017 (r317509) +++ head/sys/dev/acpica/acpi_pcib_acpi.cThu Apr 27 16:32:42 2017 (r317510) @@ -313,32 +313,42 @@ acpi_pcib_osc(struct acpi_hpcib_softc *s 0x96, 0x57, 0x74, 0x41, 0xc0, 0x3d, 0xd7, 0x66 }; - /* Status Field */ - cap_set[PCI_OSC_STATUS] = 0; + /* +* Don't invoke _OSC if a control is already granted. +* However, always invoke _OSC during attach when 0 is passed. +*/ + if (osc_ctl != 0 && (sc->ap_osc_ctl & osc_ctl) == osc_ctl) + return (0); /* Support Field: Extended PCI Config Space, MSI */ cap_set[PCI_OSC_SUPPORT] = PCIM_OSC_SUPPORT_EXT_PCI_CONF | PCIM_OSC_SUPPORT_MSI; /* Control Field */ - sc->ap_osc_ctl |= osc_ctl; - cap_set[PCI_OSC_CTL] = sc->ap_osc_ctl; + cap_set[PCI_OSC_CTL] = sc->ap_osc_ctl | osc_ctl; status = acpi_EvaluateOSC(sc->ap_handle, pci_host_bridge_uuid, 1, nitems(cap_set), cap_set, cap_set, false); if (ACPI_FAILURE(status)) { - if (status == AE_NOT_FOUND) + if (status == AE_NOT_FOUND) { + sc->ap_osc_ctl |= osc_ctl; return (0); + } device_printf(sc->ap_dev, "_OSC failed: %s\n", AcpiFormatException(status)); return (EIO); } - if (cap_set[PCI_OSC_STATUS] == 0) - sc->ap_osc_ctl = cap_set[PCI_OSC_CTL]; - - if (cap_set[PCI_OSC_STATUS] != 0 || - (cap_set[PCI_OSC_CTL] & osc_ctl) != osc_ctl) + /* +* _OSC may return an error in the status word, but will +* update the control mask always. _OSC should not revoke +* previously-granted controls. +*/ + if ((cap_set[PCI_OSC_CTL] & sc->ap_osc_ctl) != sc->ap_osc_ctl) + device_printf(sc->ap_dev, "_OSC revoked %#x\n", + (cap_set[PCI_OSC_CTL] & sc->ap_osc_ctl) ^ sc->ap_osc_ctl); + sc->ap_osc_ctl = cap_set[PCI_OSC_CTL]; + if ((sc->ap_osc_ctl & osc_ctl) != osc_ctl) return (EIO); return (0); @@ -727,7 +737,7 @@ acpi_pcib_request_feature(device_t pcib, uint32_t osc_ctl; struct acpi_hpcib_softc *sc; - sc = device_get_softc(dev); + sc = device_get_softc(pcib); switch (feature) { case PCI_FEATURE_HP: Modified: head/sys/dev/acpica/acpivar.h
svn commit: r317509 - in head: . share/man/man4 sys/conf sys/dev/cy
Author: jhb Date: Thu Apr 27 16:14:32 2017 New Revision: 317509 URL: https://svnweb.freebsd.org/changeset/base/317509 Log: Revert r317446 and bring back cy(4). Requested by: bde Added: head/share/man/man4/cy.4 - copied unchanged from r317445, head/share/man/man4/cy.4 head/sys/dev/cy/ - copied from r317445, head/sys/dev/cy/ Modified: head/ObsoleteFiles.inc head/share/man/man4/Makefile head/sys/conf/files Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Apr 27 16:05:12 2017(r317508) +++ head/ObsoleteFiles.inc Thu Apr 27 16:14:32 2017(r317509) @@ -42,8 +42,6 @@ OLD_FILES+=etc/rc.d/atm1 OLD_FILES+=etc/rc.d/atm2 OLD_FILES+=etc/rc.d/atm3 -# 20170426: Remove cy(4) -OLD_FILES+=usr/share/man/man4/cy.4.gz # 20170424: NATM support removed OLD_FILES+=rescue/atmconfig OLD_FILES+=sbin/atmconfig Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileThu Apr 27 16:05:12 2017 (r317508) +++ head/share/man/man4/MakefileThu Apr 27 16:14:32 2017 (r317509) @@ -118,6 +118,7 @@ MAN=aac.4 \ cxgb.4 \ cxgbe.4 \ cxgbev.4 \ + cy.4 \ cyapa.4 \ da.4 \ dc.4 \ Copied: head/share/man/man4/cy.4 (from r317445, head/share/man/man4/cy.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/cy.4Thu Apr 27 16:14:32 2017(r317509, copy of r317445, head/share/man/man4/cy.4) @@ -0,0 +1,257 @@ +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" the Systems Programming Group of the University of Utah Computer +.\" Science Department. +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the University nor the names of its contributors +.\"may be used to endorse or promote products derived from this software +.\"without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" +.\" from: @(#)dca.45.2 (Berkeley) 3/27/91 +.\"from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp +.\"from: sio.4,v 1.16 1995/06/26 06:05:30 bde Exp $ +.\" $FreeBSD$ +.\" +.Dd May 24, 2004 +.Dt CY 4 +.Os +.Sh NAME +.Nm cy +.Nd Cyclades Cyclom-Y serial driver +.Sh SYNOPSIS +For one ISA card: +.Bd -ragged -offset indent -compact +.Cd "device cy" +.Pp +In +.Pa /boot/device.hints : +.Cd hint.cy.0.at="isa" +.Cd hint.cy.0.irq="10" +.Cd hint.cy.0.maddr="0xd4000" +.Cd hint.cy.0.msize="0x2000" +.Ed +.Pp +For two ISA cards: +.Bd -ragged -offset indent -compact +.Cd "device cy" +.Pp +In +.Pa /boot/device.hints : +.Cd hint.cy.0.at="isa" +.Cd hint.cy.0.irq="10" +.Cd hint.cy.0.maddr="0xd4000" +.Cd hint.cy.0.msize="0x2000" +.Cd hint.cy.1.at="isa" +.Cd hint.cy.1.irq="11" +.Cd hint.cy.1.maddr="0xd6000" +.Cd hint.cy.1.msize="0x2000" +.Ed +.Pp +For PCI cards: +.Bd -ragged -offset indent -compact +.Cd "device cy" +.Cd "options CY_PCI_FASTINTR" +.Pp +No lines are required in +.Pa /boot/device.hints +for PCI cards. +.Ed +.Pp +Minor numbering: +.Bd -literal -offset indent -compact +0b\fIOLIM\fR + call\fBO\fRut + \fBL\fRock +\fBI\fRnitial + \fB MM\fRinor +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for Cirrus Logic CD1400-based +.Tn EIA +.Tn RS-232C +.Pf ( Tn CCITT +.Tn V.24 )
svn commit: r317508 - in head: . release/doc/en_US.ISO8859-1/hardware rescue/rescue share/man/man7 share/man/man8 share/man/man9 usr.sbin/bsdconfig/share
Author: brooks Date: Thu Apr 27 16:05:12 2017 New Revision: 317508 URL: https://svnweb.freebsd.org/changeset/base/317508 Log: More ATM and NATM removal Submitted by: ak Reviewed by: ngie Differential Revision:https://reviews.freebsd.org/D10511 Deleted: head/share/man/man9/utopia.9 Modified: head/ObsoleteFiles.inc head/release/doc/en_US.ISO8859-1/hardware/article.xml head/rescue/rescue/Makefile head/share/man/man7/hier.7 head/share/man/man8/Makefile head/share/man/man8/rc.8 head/share/man/man9/Makefile head/share/man/man9/netisr.9 head/usr.sbin/bsdconfig/share/device.subr Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Apr 27 15:10:45 2017(r317507) +++ head/ObsoleteFiles.inc Thu Apr 27 16:05:12 2017(r317508) @@ -38,12 +38,12 @@ # xargs -n1 | sort | uniq -d; # done -# 20170426: Remove cy(4) -OLD_FILES+=usr/share/man/man4/cy.4.gz -# 20170425: NATM configuration support removed +# 20170427: NATM configuration support removed OLD_FILES+=etc/rc.d/atm1 OLD_FILES+=etc/rc.d/atm2 OLD_FILES+=etc/rc.d/atm3 +# 20170426: Remove cy(4) +OLD_FILES+=usr/share/man/man4/cy.4.gz # 20170424: NATM support removed OLD_FILES+=rescue/atmconfig OLD_FILES+=sbin/atmconfig @@ -78,6 +78,7 @@ OLD_FILES+=usr/share/man/man4/ng_atm.4.g OLD_FILES+=usr/share/man/man4/patm.4.gz OLD_FILES+=usr/share/man/man4/utopia.4.gz OLD_FILES+=usr/share/man/man8/atmconfig.8.gz +OLD_FILES+=usr/share/man/man9/utopia.9.gz OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def OLD_FILES+=usr/share/snmp/defs/atm_tree.def OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml == --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Apr 27 15:10:45 2017(r317507) +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Apr 27 16:05:12 2017(r317508) @@ -905,27 +905,6 @@ [] DEC DEFEA EISA ( driver) - - ATM Interfaces - - [] Midway-based ATM interfaces - ( driver) - - [, ] FORE Systems, - Inc. PCA-200E ATM PCI Adapters (hfa and - drivers) - - [] IDT NICStAR 77201/211-based ATM - Adapters ( driver) - - [, ] FORE Systems, - Inc. HE155 and HE622 ATM interfaces ( - driver) - - [] IDT77252-based ATM cards - ( driver) - - Wireless Network Interfaces Modified: head/rescue/rescue/Makefile == --- head/rescue/rescue/Makefile Thu Apr 27 15:10:45 2017(r317507) +++ head/rescue/rescue/Makefile Thu Apr 27 16:05:12 2017(r317508) @@ -156,7 +156,6 @@ CRUNCH_PROGS_sbin+= bsdlabel fdisk CRUNCH_ALIAS_bsdlabel= disklabel .endif -CRUNCH_SRCDIR_ilmid= ${SRCTOP}/sbin/atm/ilmid CRUNCH_SRCDIR_rtquery= ${SRCTOP}/sbin/routed/rtquery CRUNCH_SRCDIR_ipf= ${SRCTOP}/sbin/ipf/ipf .if ${MK_ZFS} != "no" Modified: head/share/man/man7/hier.7 == --- head/share/man/man7/hier.7 Thu Apr 27 15:10:45 2017(r317507) +++ head/share/man/man7/hier.7 Thu Apr 27 16:05:12 2017(r317508) @@ -28,7 +28,7 @@ .\"@(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd April 6, 2017 +.Dd April 25, 2017 .Dt HIER 7 .Os .Sh NAME @@ -220,10 +220,6 @@ see .Xr ppbus 4 .It Pa usb/ USB subsystem -.It Pa utopia/ -physical chip driver for ATM interfaces; -see -.Xr utopia 4 .It Pa wi/ .Xr wi 4 WaveLAN driver Modified: head/share/man/man8/Makefile == --- head/share/man/man8/MakefileThu Apr 27 15:10:45 2017 (r317507) +++ head/share/man/man8/MakefileThu Apr 27 16:05:12 2017 (r317508) @@ -18,7 +18,6 @@ MAN= crash.8 \ MLINKS= \ nanobsd.8 nanobsd.sh.8 \ - rc.8 rc.atm.8 \ rc.8 rc.d.8 \ rc.8 rc.firewall.8 \ rc.8 rc.local.8 \ Modified: head/share/man/man8/rc.8 == --- head/share/man/man8/rc.8Thu Apr 27 15:10:45 2017(r317507) +++ head/share/man/man8/rc.8Thu Apr 27 16:05:12 2017(r317508) @@ -31,7 +31,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd April 23, 2016 +.Dd April 25, 2017 .Dt RC 8 .Os .Sh NAME @@ -455,15 +455,6 @@ disables the loading of firewall rules will load the rules in the given filename (full path required). .El .Pp -The -.Pa /etc/rc.d/atm* -scripts are used to configure ATM network interfaces. -The interfaces are configured in three passes. -The first pass performs the initial interface configuration. -The second pass completes the
svn commit: r317507 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: jpaetzel Date: Thu Apr 27 15:10:45 2017 New Revision: 317507 URL: https://svnweb.freebsd.org/changeset/base/317507 Log: MFV 316895 7606 dmu_objset_find_dp() takes a long time while importing pool illumos/illumos-gate@7588687e6ba67c47bf7c9805086dec4a97fcac7b https://github.com/illumos/illumos-gate/commit/7588687e6ba67c47bf7c9805086dec4a97fcac7b https://www.illumos.org/issues/7606 When importing a pool with a large number of filesystems within the same parent filesystem, we see that dmu_objset_find_dp() takes a long time. It is called from 3 places: spa_check_logs(), spa_ld_claim_log_blocks(), and spa_load_verify(). There are several ways to improve performance here: 1. We don't really need to do spa_check_logs() or spa_ld_claim_log_blocks() if the pool was closed cleanly. 2. spa_load_verify() uses dmu_objset_find_dp() to check that no datasets have too long of names. 3. dmu_objset_find_dp() is slow because it's doing zap_value_search() (which is O(N sibling datasets)) to determine the name of each dsl_dir when it's opened. In this case we actually know the name when we are opening it, so we can provide it and avoid the lookup. This change implements fix #3 from the above list; i.e. make dmu_objset_find_dp() provide the name of the dataset so that we don't have to search for it. Reviewed by: Steve GoncziReviewed by: George Wilson Reviewed by: Prashanth Sreenivasa Approved by: Gordon Ross Author: Matthew Ahrens Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.cThu Apr 27 15:03:24 2017(r317506) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.cThu Apr 27 15:10:45 2017(r317507) @@ -1705,6 +1705,7 @@ typedef struct dmu_objset_find_ctx { taskq_t *dc_tq; dsl_pool_t *dc_dp; uint64_tdc_ddobj; + char*dc_ddname; /* last component of ddobj's name */ int (*dc_func)(dsl_pool_t *, dsl_dataset_t *, void *); void*dc_arg; int dc_flags; @@ -1716,7 +1717,6 @@ static void dmu_objset_find_dp_impl(dmu_objset_find_ctx_t *dcp) { dsl_pool_t *dp = dcp->dc_dp; - dmu_objset_find_ctx_t *child_dcp; dsl_dir_t *dd; dsl_dataset_t *ds; zap_cursor_t zc; @@ -1728,7 +1728,12 @@ dmu_objset_find_dp_impl(dmu_objset_find_ if (*dcp->dc_error != 0) goto out; - err = dsl_dir_hold_obj(dp, dcp->dc_ddobj, NULL, FTAG, ); + /* +* Note: passing the name (dc_ddname) here is optional, but it +* improves performance because we don't need to call +* zap_value_search() to determine the name. +*/ + err = dsl_dir_hold_obj(dp, dcp->dc_ddobj, dcp->dc_ddname, FTAG, ); if (err != 0) goto out; @@ -1753,9 +1758,11 @@ dmu_objset_find_dp_impl(dmu_objset_find_ sizeof (uint64_t)); ASSERT3U(attr->za_num_integers, ==, 1); - child_dcp = kmem_alloc(sizeof (*child_dcp), KM_SLEEP); + dmu_objset_find_ctx_t *child_dcp = + kmem_alloc(sizeof (*child_dcp), KM_SLEEP); *child_dcp = *dcp; child_dcp->dc_ddobj = attr->za_first_integer; + child_dcp->dc_ddname = spa_strdup(attr->za_name); if (dcp->dc_tq != NULL) (void) taskq_dispatch(dcp->dc_tq, dmu_objset_find_dp_cb, child_dcp, TQ_SLEEP); @@ -1798,16 +1805,25 @@ dmu_objset_find_dp_impl(dmu_objset_find_ } } - dsl_dir_rele(dd, FTAG); kmem_free(attr, sizeof (zap_attribute_t)); - if (err != 0) + if (err != 0) { + dsl_dir_rele(dd, FTAG); goto out; + } /* * Apply to self. */ err = dsl_dataset_hold_obj(dp, thisobj, FTAG, ); + + /* +* Note: we hold the dir while calling dsl_dataset_hold_obj() so +* that the dir will remain cached, and we won't have to re-instantiate +* it (which could be expensive due to finding its name via +* zap_value_search()). +*/ + dsl_dir_rele(dd, FTAG); if (err != 0) goto out; err = dcp->dc_func(dp, ds, dcp->dc_arg); @@ -1822,6 +1838,8 @@
svn commit: r317506 - in head: lib/libbluetooth sys/netgraph/bluetooth/hci sys/netgraph/bluetooth/include usr.sbin/bluetooth/hccontrol
Author: takawata Date: Thu Apr 27 15:03:24 2017 New Revision: 317506 URL: https://svnweb.freebsd.org/changeset/base/317506 Log: Make cached Bluetooth LE host advertise information visible from userland. Differential Revision:https://reviews.freebsd.org/D10362 Modified: head/lib/libbluetooth/bluetooth.h head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c head/sys/netgraph/bluetooth/hci/ng_hci_main.c head/sys/netgraph/bluetooth/hci/ng_hci_var.h head/sys/netgraph/bluetooth/include/ng_bluetooth.h head/sys/netgraph/bluetooth/include/ng_btsocket.h head/sys/netgraph/bluetooth/include/ng_hci.h head/usr.sbin/bluetooth/hccontrol/node.c Modified: head/lib/libbluetooth/bluetooth.h == --- head/lib/libbluetooth/bluetooth.h Thu Apr 27 14:39:52 2017 (r317505) +++ head/lib/libbluetooth/bluetooth.h Thu Apr 27 15:03:24 2017 (r317506) @@ -46,6 +46,7 @@ #include #include +#include #include #include #include Modified: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c == --- head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Thu Apr 27 14:39:52 2017(r317505) +++ head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Thu Apr 27 15:03:24 2017(r317506) @@ -417,7 +417,6 @@ le_advertizing_report(ng_hci_unit_p unit } else getmicrotime(>updated); -#if 0 { /* * TODO: Make these information @@ -425,21 +424,36 @@ le_advertizing_report(ng_hci_unit_p unit */ u_int8_t length_data; - char *rssi; - - NG_HCI_M_PULLUP(event, sizeof(u_int8_t)); + event = m_pullup(event, sizeof(u_int8_t)); + if(event == NULL){ + NG_HCI_WARN("%s: Event datasize Pullup Failed\n", __func__); + goto out; + } length_data = *mtod(event, u_int8_t *); m_adj(event, sizeof(u_int8_t)); + n->extinq_size = (length_data < NG_HCI_EXTINQ_MAX)? + length_data : NG_HCI_EXTINQ_MAX; + /*Advertizement data*/ - NG_HCI_M_PULLUP(event, length_data); - m_adj(event, length_data); - NG_HCI_M_PULLUP(event, sizeof(char )); + event = m_pullup(event, n->extinq_size); + if(event == NULL){ + NG_HCI_WARN("%s: Event data pullup Failed\n", __func__); + goto out; + } + m_copydata(event, 0, n->extinq_size, n->extinq_data); + m_adj(event, n->extinq_size); + event = m_pullup(event, sizeof(char )); /*Get RSSI*/ - rssi = mtod(event, char *); + if(event == NULL){ + NG_HCI_WARN("%s: Event rssi pull up Failed\n", __func__); + + goto out; + } + n->page_scan_mode = *mtod(event, char *); m_adj(event, sizeof(u_int8_t)); } -#endif } + out: NG_FREE_M(event); return (error); Modified: head/sys/netgraph/bluetooth/hci/ng_hci_main.c == --- head/sys/netgraph/bluetooth/hci/ng_hci_main.c Thu Apr 27 14:39:52 2017(r317505) +++ head/sys/netgraph/bluetooth/hci/ng_hci_main.c Thu Apr 27 15:03:24 2017(r317506) @@ -93,7 +93,22 @@ NETGRAPH_INIT(hci, ); MODULE_VERSION(ng_hci, NG_BLUETOOTH_VERSION); MODULE_DEPEND(ng_hci, ng_bluetooth, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION); +static int ng_hci_linktype_to_addrtype(int linktype); +static int ng_hci_linktype_to_addrtype(int linktype) +{ + switch(linktype){ + case NG_HCI_LINK_LE_PUBLIC: + return BDADDR_LE_PUBLIC; + case NG_HCI_LINK_LE_RANDOM: + return BDADDR_LE_RANDOM; + case NG_HCI_LINK_ACL: + /*FALLTHROUGH*/ + default: + return BDADDR_BREDR; + } + return BDADDR_BREDR; +} /* * ** Netgraph methods implementation @@ -481,11 +496,15 @@ ng_hci_default_rcvmsg(node_p node, item_
svn commit: r317505 - head/sys/dev/mlx4/mlx4_en
Author: hselasky Date: Thu Apr 27 14:39:52 2017 New Revision: 317505 URL: https://svnweb.freebsd.org/changeset/base/317505 Log: Don't free uninitialized sysctl contexts in the mlx4en driver. This can cause NULL pointer panics during failed device attach. Differential Revision:https://reviews.freebsd.org/D8876 MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_en/en.h head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Modified: head/sys/dev/mlx4/mlx4_en/en.h == --- head/sys/dev/mlx4/mlx4_en/en.h Thu Apr 27 14:29:21 2017 (r317504) +++ head/sys/dev/mlx4/mlx4_en/en.h Thu Apr 27 14:39:52 2017 (r317505) @@ -587,7 +587,8 @@ struct mlx4_en_priv { struct callout watchdog_timer; struct ifmedia media; volatile int blocked; - struct sysctl_oid *sysctl; + struct sysctl_oid *conf_sysctl; + struct sysctl_oid *stat_sysctl; struct sysctl_ctx_list conf_ctx; struct sysctl_ctx_list stat_ctx; #define MLX4_EN_MAC_HASH_IDX 5 Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c == --- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Thu Apr 27 14:29:21 2017 (r317504) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Thu Apr 27 14:39:52 2017 (r317505) @@ -1639,7 +1639,7 @@ void mlx4_en_free_resources(struct mlx4_ mlx4_en_destroy_cq(priv, >rx_cq[i]); } - if (priv->sysctl) + if (priv->stat_sysctl != NULL) sysctl_ctx_free(>stat_ctx); } @@ -1754,7 +1754,7 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_en_free_resources(priv); /* freeing the sysctl conf cannot be called from within mlx4_en_free_resources */ - if (priv->sysctl) + if (priv->conf_sysctl != NULL) sysctl_ctx_free(>conf_ctx); kfree(priv->tx_ring); @@ -2573,9 +2573,9 @@ static void mlx4_en_sysctl_conf(struct m pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); sysctl_ctx_init(ctx); -priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), +priv->conf_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); -node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, +node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "conf", CTLFLAG_RD, NULL, "Configuration"); node_list = SYSCTL_CHILDREN(node); @@ -2638,7 +2638,6 @@ static void mlx4_en_sysctl_conf(struct m static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct sysctl_ctx_list *ctx; - struct sysctl_oid *node; struct sysctl_oid_list *node_list; struct sysctl_oid *ring_node; struct sysctl_oid_list *ring_list; @@ -2649,9 +2648,9 @@ static void mlx4_en_sysctl_stat(struct m ctx = >stat_ctx; sysctl_ctx_init(ctx); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + priv->stat_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "stat", CTLFLAG_RD, NULL, "Statistics"); - node_list = SYSCTL_CHILDREN(node); + node_list = SYSCTL_CHILDREN(priv->stat_sysctl); #ifdef MLX4_EN_PERF_STAT SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_poll", CTLFLAG_RD, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317504 - head/sys/compat/linuxkpi/common/src
Author: hselasky Date: Thu Apr 27 14:29:21 2017 New Revision: 317504 URL: https://svnweb.freebsd.org/changeset/base/317504 Log: Prefer to use real virtual address over direct map address in the linux_page_address() function in the LinuxKPI. This solves an issue where the return value from linux_page_address() is passed to kmem_free(). MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_page.c Modified: head/sys/compat/linuxkpi/common/src/linux_page.c == --- head/sys/compat/linuxkpi/common/src/linux_page.cThu Apr 27 12:59:14 2017(r317503) +++ head/sys/compat/linuxkpi/common/src/linux_page.cThu Apr 27 14:29:21 2017(r317504) @@ -71,14 +71,16 @@ __FBSDID("$FreeBSD$"); void * linux_page_address(struct page *page) { + + if (page->object != kmem_object && page->object != kernel_object) { #ifdef LINUXKPI_HAVE_DMAP - return ((void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))); + return ((void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))); #else - if (page->object != kmem_object && page->object != kernel_object) return (NULL); +#endif + } return ((void *)(uintptr_t)(VM_MIN_KERNEL_ADDRESS + IDX_TO_OFF(page->pindex))); -#endif } vm_page_t ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317502 - in stable/11: lib/libipsec sbin/setkey sys/netipsec
Author: ae Date: Thu Apr 27 12:16:58 2017 New Revision: 317502 URL: https://svnweb.freebsd.org/changeset/base/317502 Log: MFC r316759: Add large replay widow support to setkey(8) and libipsec. When the replay window size is large than UINT8_MAX, add to the request the SADB_X_EXT_SA_REPLAY extension header that was added in r309144. Also add support of SADB_X_EXT_NAT_T_TYPE, SADB_X_EXT_NAT_T_SPORT, SADB_X_EXT_NAT_T_DPORT, SADB_X_EXT_NAT_T_OAI, SADB_X_EXT_NAT_T_OAR, SADB_X_EXT_SA_REPLAY, SADB_X_EXT_NEW_ADDRESS_SRC, SADB_X_EXT_NEW_ADDRESS_DST extension headers to the key_debug that is used by `setkey -x`. Modify kdebug_sockaddr() to use inet_ntop() for IP addresses formatting. And modify kdebug_sadb_x_policy() to show policy scope and priority. Reviewed by:gnn, Emeric Poupon Differential Revision: https://reviews.freebsd.org/D10375 Modified: stable/11/lib/libipsec/pfkey.c stable/11/sbin/setkey/Makefile stable/11/sbin/setkey/parse.y stable/11/sys/netipsec/key_debug.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libipsec/pfkey.c == --- stable/11/lib/libipsec/pfkey.c Thu Apr 27 12:15:15 2017 (r317501) +++ stable/11/lib/libipsec/pfkey.c Thu Apr 27 12:16:58 2017 (r317502) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -69,6 +70,7 @@ static caddr_t pfkey_setsadbmsg(caddr_t, u_int, u_int32_t, pid_t); static caddr_t pfkey_setsadbsa(caddr_t, caddr_t, u_int32_t, u_int, u_int, u_int, u_int32_t); +static caddr_t pfkey_setsadbxreplay(caddr_t, caddr_t, uint32_t); static caddr_t pfkey_setsadbaddr(caddr_t, caddr_t, u_int, struct sockaddr *, u_int, u_int); static caddr_t pfkey_setsadbkey(caddr_t, caddr_t, u_int, caddr_t, u_int); @@ -1196,6 +1198,13 @@ pfkey_send_x1(so, type, satype, mode, sr + sizeof(struct sadb_lifetime) + sizeof(struct sadb_lifetime); + if (wsize > UINT8_MAX) { + if (wsize > (UINT32_MAX - 32) >> 3) { + __ipsec_errcode = EIPSEC_INVAL_ARGUMENT; + return (-1); + } + len += sizeof(struct sadb_x_sa_replay); + } if (e_type != SADB_EALG_NONE) len += (sizeof(struct sadb_key) + PFKEY_ALIGN8(e_keylen)); if (a_type != SADB_AALG_NONE) @@ -1223,6 +1232,13 @@ pfkey_send_x1(so, type, satype, mode, sr free(newmsg); return -1; } + if (wsize > UINT8_MAX) { + p = pfkey_setsadbxreplay(p, ep, wsize); + if (!p) { + free(newmsg); + return (-1); + } + } p = pfkey_setsadbaddr(p, ep, SADB_EXT_ADDRESS_SRC, src, plen, IPSEC_ULPROTO_ANY); if (!p) { @@ -1982,7 +1998,7 @@ pfkey_setsadbsa(buf, lim, spi, wsize, au p->sadb_sa_len = PFKEY_UNIT64(len); p->sadb_sa_exttype = SADB_EXT_SA; p->sadb_sa_spi = spi; - p->sadb_sa_replay = wsize; + p->sadb_sa_replay = wsize > UINT8_MAX ? UINT8_MAX: wsize; p->sadb_sa_state = SADB_SASTATE_LARVAL; p->sadb_sa_auth = auth; p->sadb_sa_encrypt = enc; @@ -1992,6 +2008,31 @@ pfkey_setsadbsa(buf, lim, spi, wsize, au } /* + * Set data into sadb_x_sa_replay. + * `buf' must has been allocated sufficiently. + */ +static caddr_t +pfkey_setsadbxreplay(caddr_t buf, caddr_t lim, uint32_t wsize) +{ + struct sadb_x_sa_replay *p; + u_int len; + + p = (struct sadb_x_sa_replay *)buf; + len = sizeof(struct sadb_x_sa_replay); + + if (buf + len > lim) + return (NULL); + + memset(p, 0, len); + p->sadb_x_sa_replay_len = PFKEY_UNIT64(len); + p->sadb_x_sa_replay_exttype = SADB_X_EXT_SA_REPLAY; + /* Convert wsize from bytes to number of packets. */ + p->sadb_x_sa_replay_replay = wsize << 3; + + return (buf + len); +} + +/* * set data into sadb_address. * `buf' must has been allocated sufficiently. * prefixlen is in bits. Modified: stable/11/sbin/setkey/Makefile == --- stable/11/sbin/setkey/Makefile Thu Apr 27 12:15:15 2017 (r317501) +++ stable/11/sbin/setkey/Makefile Thu Apr 27 12:16:58 2017 (r317502) @@ -51,6 +51,9 @@ CFLAGS+= -I${.CURDIR}/../../lib/libipsec SRCS+= y.tab.h y.tab.h: parse.y CFLAGS+= -DIPSEC_DEBUG -DYY_NO_UNPUT +.if ${MK_INET_SUPPORT} != "no" +CFLAGS+= -DINET +.endif .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif Modified: stable/11/sbin/setkey/parse.y == --- stable/11/sbin/setkey/parse.y Thu Apr 27 12:15:15 2017 (r317501) +++
svn commit: r317501 - stable/10/sys/dev/fb
Author: kib Date: Thu Apr 27 12:15:15 2017 New Revision: 317501 URL: https://svnweb.freebsd.org/changeset/base/317501 Log: MFC r317196: Write-combine framebuffer writes through user-space mappings, if possible. Modified: stable/10/sys/dev/fb/vesa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/vesa.c == --- stable/10/sys/dev/fb/vesa.c Thu Apr 27 12:12:33 2017(r317500) +++ stable/10/sys/dev/fb/vesa.c Thu Apr 27 12:15:15 2017(r317501) @@ -1636,6 +1636,9 @@ vesa_mmap(video_adapter_t *adp, vm_ooffs if (offset > adp->va_window_size - PAGE_SIZE) return (-1); *paddr = adp->va_info.vi_buffer + offset; +#ifdef VM_MEMATTR_WRITE_COMBINING + *memattr = VM_MEMATTR_WRITE_COMBINING; +#endif return (0); } return ((*prevvidsw->mmap)(adp, offset, paddr, prot, memattr)); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317500 - stable/11/sys/dev/fb
Author: kib Date: Thu Apr 27 12:12:33 2017 New Revision: 317500 URL: https://svnweb.freebsd.org/changeset/base/317500 Log: MFC r317196: Write-combine framebuffer writes through user-space mappings, if possible. Modified: stable/11/sys/dev/fb/vesa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/fb/vesa.c == --- stable/11/sys/dev/fb/vesa.c Thu Apr 27 12:09:03 2017(r317499) +++ stable/11/sys/dev/fb/vesa.c Thu Apr 27 12:12:33 2017(r317500) @@ -1635,6 +1635,9 @@ vesa_mmap(video_adapter_t *adp, vm_ooffs if (offset > adp->va_window_size - PAGE_SIZE) return (-1); *paddr = adp->va_info.vi_buffer + offset; +#ifdef VM_MEMATTR_WRITE_COMBINING + *memattr = VM_MEMATTR_WRITE_COMBINING; +#endif return (0); } return ((*prevvidsw->mmap)(adp, offset, paddr, prot, memattr)); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317489 - stable/10/sys/netpfil/ipfw
Author: truckman Date: Thu Apr 27 07:32:07 2017 New Revision: 317489 URL: https://svnweb.freebsd.org/changeset/base/317489 Log: MFC r316777 (by cem) dummynet: Use strlcpy to appease static checkers Some dummynet modules used strcpy() to copy from a larger buffer (dn_aqm->name) to a smaller buffer (dn_extra_parms->name). It happens that the lengths of the strings in the dn_aqm buffers were always hardcoded to be smaller than the dn_extra_parms buffer ("CODEL", "PIE"). Use strlcpy() instead, to appease static checkers. No functional change. Reported by: Coverity CIDs: 1356163, 1356165 Sponsored by: Dell EMC Isilon Modified: stable/10/sys/netpfil/ipfw/dn_aqm_codel.c stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/dn_aqm_codel.c == --- stable/10/sys/netpfil/ipfw/dn_aqm_codel.c Thu Apr 27 07:30:48 2017 (r317488) +++ stable/10/sys/netpfil/ipfw/dn_aqm_codel.c Thu Apr 27 07:32:07 2017 (r317489) @@ -416,7 +416,7 @@ aqm_codel_getconfig(struct dn_fsk *fs, s struct dn_aqm_codel_parms *ccfg; if (fs->aqmcfg) { - strcpy(ep->name, codel_desc.name); + strlcpy(ep->name, codel_desc.name, sizeof(ep->name)); ccfg = fs->aqmcfg; ep->par[0] = ccfg->target / AQM_TIME_1US; ep->par[1] = ccfg->interval / AQM_TIME_1US; Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c == --- stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu Apr 27 07:30:48 2017 (r317488) +++ stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu Apr 27 07:32:07 2017 (r317489) @@ -755,7 +755,7 @@ aqm_pie_getconfig (struct dn_fsk *fs, st { struct dn_aqm_pie_parms *pcfg; if (fs->aqmcfg) { - strcpy(ep->name, pie_desc.name); + strlcpy(ep->name, pie_desc.name, sizeof(ep->name)); pcfg = fs->aqmcfg; ep->par[0] = pcfg->qdelay_ref / AQM_TIME_1US; ep->par[1] = pcfg->tupdate / AQM_TIME_1US; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317488 - stable/11/sys/netpfil/ipfw
Author: truckman Date: Thu Apr 27 07:30:48 2017 New Revision: 317488 URL: https://svnweb.freebsd.org/changeset/base/317488 Log: MFC r316777 (by cem) dummynet: Use strlcpy to appease static checkers Some dummynet modules used strcpy() to copy from a larger buffer (dn_aqm->name) to a smaller buffer (dn_extra_parms->name). It happens that the lengths of the strings in the dn_aqm buffers were always hardcoded to be smaller than the dn_extra_parms buffer ("CODEL", "PIE"). Use strlcpy() instead, to appease static checkers. No functional change. Reported by: Coverity CIDs: 1356163, 1356165 Sponsored by: Dell EMC Isilon Modified: stable/11/sys/netpfil/ipfw/dn_aqm_codel.c stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/dn_aqm_codel.c == --- stable/11/sys/netpfil/ipfw/dn_aqm_codel.c Thu Apr 27 06:52:30 2017 (r317487) +++ stable/11/sys/netpfil/ipfw/dn_aqm_codel.c Thu Apr 27 07:30:48 2017 (r317488) @@ -416,7 +416,7 @@ aqm_codel_getconfig(struct dn_fsk *fs, s struct dn_aqm_codel_parms *ccfg; if (fs->aqmcfg) { - strcpy(ep->name, codel_desc.name); + strlcpy(ep->name, codel_desc.name, sizeof(ep->name)); ccfg = fs->aqmcfg; ep->par[0] = ccfg->target / AQM_TIME_1US; ep->par[1] = ccfg->interval / AQM_TIME_1US; Modified: stable/11/sys/netpfil/ipfw/dn_aqm_pie.c == --- stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu Apr 27 06:52:30 2017 (r317487) +++ stable/11/sys/netpfil/ipfw/dn_aqm_pie.c Thu Apr 27 07:30:48 2017 (r317488) @@ -755,7 +755,7 @@ aqm_pie_getconfig (struct dn_fsk *fs, st { struct dn_aqm_pie_parms *pcfg; if (fs->aqmcfg) { - strcpy(ep->name, pie_desc.name); + strlcpy(ep->name, pie_desc.name, sizeof(ep->name)); pcfg = fs->aqmcfg; ep->par[0] = pcfg->qdelay_ref / AQM_TIME_1US; ep->par[1] = pcfg->tupdate / AQM_TIME_1US; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317487 - in releng: 10.3 10.3/sys/conf 10.3/sys/contrib/ipfilter/netinet 11.0 11.0/sys/conf 11.0/sys/contrib/ipfilter/netinet
Author: delphij Date: Thu Apr 27 06:52:30 2017 New Revision: 317487 URL: https://svnweb.freebsd.org/changeset/base/317487 Log: Fix ipfilter(4) fragment handling panic. Security: FreeBSD-SA-17:04.ipfilter Approved by: so Modified: releng/10.3/UPDATING releng/10.3/sys/conf/newvers.sh releng/10.3/sys/contrib/ipfilter/netinet/ip_frag.c releng/11.0/UPDATING releng/11.0/sys/conf/newvers.sh releng/11.0/sys/contrib/ipfilter/netinet/ip_frag.c Modified: releng/10.3/UPDATING == --- releng/10.3/UPDATINGThu Apr 27 06:29:02 2017(r317486) +++ releng/10.3/UPDATINGThu Apr 27 06:52:30 2017(r317487) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20170427 p19 FreeBSD-SA-17:04.ipfilter + + Fix ipfilter(4) fragment handling panic. [SA-17:04] + 20170412 p18 FreeBSD-SA-17:03.ntp FreeBSD-EN-17:05.xen Modified: releng/10.3/sys/conf/newvers.sh == --- releng/10.3/sys/conf/newvers.sh Thu Apr 27 06:29:02 2017 (r317486) +++ releng/10.3/sys/conf/newvers.sh Thu Apr 27 06:52:30 2017 (r317487) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.3" -BRANCH="RELEASE-p18" +BRANCH="RELEASE-p19" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.3/sys/contrib/ipfilter/netinet/ip_frag.c == --- releng/10.3/sys/contrib/ipfilter/netinet/ip_frag.c Thu Apr 27 06:29:02 2017(r317486) +++ releng/10.3/sys/contrib/ipfilter/netinet/ip_frag.c Thu Apr 27 06:52:30 2017(r317487) @@ -456,7 +456,7 @@ ipfr_frag_new(softc, softf, fin, pass, t IPFR_CMPSZ)) { RWLOCK_EXIT(lock); FBUMPD(ifs_exists); - KFREE(fra); + KFREE(fran); return NULL; } Modified: releng/11.0/UPDATING == --- releng/11.0/UPDATINGThu Apr 27 06:29:02 2017(r317486) +++ releng/11.0/UPDATINGThu Apr 27 06:52:30 2017(r317487) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20170427p10 FreeBSD-SA-17:04.ipfilter + + Fix ipfilter(4) fragment handling panic. [SA-17:04] + 20170412 p9 FreeBSD-SA-17:03.ntp FreeBSD-EN-17:05.xen Modified: releng/11.0/sys/conf/newvers.sh == --- releng/11.0/sys/conf/newvers.sh Thu Apr 27 06:29:02 2017 (r317486) +++ releng/11.0/sys/conf/newvers.sh Thu Apr 27 06:52:30 2017 (r317487) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="11.0" -BRANCH="RELEASE-p9" +BRANCH="RELEASE-p10" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/11.0/sys/contrib/ipfilter/netinet/ip_frag.c == --- releng/11.0/sys/contrib/ipfilter/netinet/ip_frag.c Thu Apr 27 06:29:02 2017(r317486) +++ releng/11.0/sys/contrib/ipfilter/netinet/ip_frag.c Thu Apr 27 06:52:30 2017(r317487) @@ -474,7 +474,7 @@ ipfr_frag_new(softc, softf, fin, pass, t IPFR_CMPSZ)) { RWLOCK_EXIT(lock); FBUMPD(ifs_exists); - KFREE(fra); + KFREE(fran); return NULL; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317486 - stable/11/sys/dev/watchdog
Author: mav Date: Thu Apr 27 06:29:02 2017 New Revision: 317486 URL: https://svnweb.freebsd.org/changeset/base/317486 Log: MFC r317185: Some cosmetic polishing for pre-timeouts. Modified: stable/11/sys/dev/watchdog/watchdog.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/watchdog/watchdog.c == --- stable/11/sys/dev/watchdog/watchdog.c Thu Apr 27 06:28:12 2017 (r317485) +++ stable/11/sys/dev/watchdog/watchdog.c Thu Apr 27 06:29:02 2017 (r317486) @@ -229,13 +229,13 @@ wd_timeout_cb(void *arg) #ifdef DDB if ((wd_pretimeout_act & WD_SOFT_DDB)) { char kdb_why[80]; - snprintf(kdb_why, sizeof(kdb_why), "watchdog %s timeout", type); + snprintf(kdb_why, sizeof(kdb_why), "watchdog %s-timeout", type); kdb_backtrace(); kdb_enter(KDB_WHY_WATCHDOG, kdb_why); } #endif if ((wd_pretimeout_act & WD_SOFT_LOG)) - log(LOG_EMERG, "watchdog %s-timeout, WD_SOFT_LOG", type); + log(LOG_EMERG, "watchdog %s-timeout, WD_SOFT_LOG\n", type); if ((wd_pretimeout_act & WD_SOFT_PRINTF)) printf("watchdog %s-timeout, WD_SOFT_PRINTF\n", type); if ((wd_pretimeout_act & WD_SOFT_PANIC)) @@ -292,8 +292,7 @@ wd_set_pretimeout(int newtimeout, int di /* We determined the value is sane, so reset the callout */ (void) callout_reset(_pretimeo_handle, - timeout_ticks, - wd_timeout_cb, "pre-timeout"); + timeout_ticks, wd_timeout_cb, "pre"); wd_pretimeout = newtimeout; return 0; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r317485 - stable/11/sys/dev/sound/pci/hda
Author: mav Date: Thu Apr 27 06:28:12 2017 New Revision: 317485 URL: https://svnweb.freebsd.org/changeset/base/317485 Log: MFC r316758: Update list of Conexant and Realtek codecs. Modified: stable/11/sys/dev/sound/pci/hda/hdac.h stable/11/sys/dev/sound/pci/hda/hdacc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/pci/hda/hdac.h == --- stable/11/sys/dev/sound/pci/hda/hdac.h Thu Apr 27 06:27:39 2017 (r317484) +++ stable/11/sys/dev/sound/pci/hda/hdac.h Thu Apr 27 06:28:12 2017 (r317485) @@ -339,7 +339,13 @@ /* Realtek */ #define REALTEK_VENDORID 0x10ec #define HDA_CODEC_ALC221 HDA_CODEC_CONSTRUCT(REALTEK, 0x0221) +#define HDA_CODEC_ALC225 HDA_CODEC_CONSTRUCT(REALTEK, 0x0225) +#define HDA_CODEC_ALC231 HDA_CODEC_CONSTRUCT(REALTEK, 0x0231) #define HDA_CODEC_ALC233 HDA_CODEC_CONSTRUCT(REALTEK, 0x0233) +#define HDA_CODEC_ALC234 HDA_CODEC_CONSTRUCT(REALTEK, 0x0234) +#define HDA_CODEC_ALC235 HDA_CODEC_CONSTRUCT(REALTEK, 0x0235) +#define HDA_CODEC_ALC255 HDA_CODEC_CONSTRUCT(REALTEK, 0x0255) +#define HDA_CODEC_ALC256 HDA_CODEC_CONSTRUCT(REALTEK, 0x0256) #define HDA_CODEC_ALC260 HDA_CODEC_CONSTRUCT(REALTEK, 0x0260) #define HDA_CODEC_ALC262 HDA_CODEC_CONSTRUCT(REALTEK, 0x0262) #define HDA_CODEC_ALC267 HDA_CODEC_CONSTRUCT(REALTEK, 0x0267) @@ -348,8 +354,23 @@ #define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270) #define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) #define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) +#define HDA_CODEC_ALC274 HDA_CODEC_CONSTRUCT(REALTEK, 0x0274) #define HDA_CODEC_ALC275 HDA_CODEC_CONSTRUCT(REALTEK, 0x0275) #define HDA_CODEC_ALC276 HDA_CODEC_CONSTRUCT(REALTEK, 0x0276) +#define HDA_CODEC_ALC280 HDA_CODEC_CONSTRUCT(REALTEK, 0x0280) +#define HDA_CODEC_ALC282 HDA_CODEC_CONSTRUCT(REALTEK, 0x0282) +#define HDA_CODEC_ALC283 HDA_CODEC_CONSTRUCT(REALTEK, 0x0283) +#define HDA_CODEC_ALC284 HDA_CODEC_CONSTRUCT(REALTEK, 0x0284) +#define HDA_CODEC_ALC285 HDA_CODEC_CONSTRUCT(REALTEK, 0x0285) +#define HDA_CODEC_ALC286 HDA_CODEC_CONSTRUCT(REALTEK, 0x0286) +#define HDA_CODEC_ALC288 HDA_CODEC_CONSTRUCT(REALTEK, 0x0288) +#define HDA_CODEC_ALC290 HDA_CODEC_CONSTRUCT(REALTEK, 0x0290) +#define HDA_CODEC_ALC292 HDA_CODEC_CONSTRUCT(REALTEK, 0x0292) +#define HDA_CODEC_ALC293 HDA_CODEC_CONSTRUCT(REALTEK, 0x0293) +#define HDA_CODEC_ALC294 HDA_CODEC_CONSTRUCT(REALTEK, 0x0294) +#define HDA_CODEC_ALC295 HDA_CODEC_CONSTRUCT(REALTEK, 0x0295) +#define HDA_CODEC_ALC298 HDA_CODEC_CONSTRUCT(REALTEK, 0x0298) +#define HDA_CODEC_ALC299 HDA_CODEC_CONSTRUCT(REALTEK, 0x0299) #define HDA_CODEC_ALC292 HDA_CODEC_CONSTRUCT(REALTEK, 0x0292) #define HDA_CODEC_ALC295 HDA_CODEC_CONSTRUCT(REALTEK, 0x0295) #define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660) @@ -357,7 +378,11 @@ #define HDA_CODEC_ALC663 HDA_CODEC_CONSTRUCT(REALTEK, 0x0663) #define HDA_CODEC_ALC665 HDA_CODEC_CONSTRUCT(REALTEK, 0x0665) #define HDA_CODEC_ALC670 HDA_CODEC_CONSTRUCT(REALTEK, 0x0670) +#define HDA_CODEC_ALC671 HDA_CODEC_CONSTRUCT(REALTEK, 0x0671) #define HDA_CODEC_ALC680 HDA_CODEC_CONSTRUCT(REALTEK, 0x0680) +#define HDA_CODEC_ALC700 HDA_CODEC_CONSTRUCT(REALTEK, 0x0700) +#define HDA_CODEC_ALC701 HDA_CODEC_CONSTRUCT(REALTEK, 0x0701) +#define HDA_CODEC_ALC703 HDA_CODEC_CONSTRUCT(REALTEK, 0x0703) #define HDA_CODEC_ALC861 HDA_CODEC_CONSTRUCT(REALTEK, 0x0861) #define HDA_CODEC_ALC861VD HDA_CODEC_CONSTRUCT(REALTEK, 0x0862) #define HDA_CODEC_ALC880 HDA_CODEC_CONSTRUCT(REALTEK, 0x0880) @@ -370,6 +395,7 @@ #define HDA_CODEC_ALC892 HDA_CODEC_CONSTRUCT(REALTEK, 0x0892) #define HDA_CODEC_ALC899 HDA_CODEC_CONSTRUCT(REALTEK, 0x0899) #define HDA_CODEC_ALC1150 HDA_CODEC_CONSTRUCT(REALTEK, 0x0900) +#define HDA_CODEC_ALC1220 HDA_CODEC_CONSTRUCT(REALTEK, 0x1220) #define HDA_CODEC_ALC HDA_CODEC_CONSTRUCT(REALTEK, 0x) /* Motorola */ @@ -546,6 +572,17 @@ #define HDA_CODEC_CX20652 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50ac) #define HDA_CODEC_CX20664 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b8) #define HDA_CODEC_CX20665 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b9) +#define HDA_CODEC_CX21722 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f1) +#define HDA_CODEC_CX20722 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f2) +#define HDA_CODEC_CX21724 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f3) +#define HDA_CODEC_CX20724 HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f4) +#define HDA_CODEC_CX20751 HDA_CODEC_CONSTRUCT(CONEXANT, 0x510f) +#define HDA_CODEC_CX20751_2HDA_CODEC_CONSTRUCT(CONEXANT, 0x5110) +#define HDA_CODEC_CX20753 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5111) +#define HDA_CODEC_CX20755
svn commit: r317484 - stable/11/sys/dev/sound/pci/hda
Author: mav Date: Thu Apr 27 06:27:39 2017 New Revision: 317484 URL: https://svnweb.freebsd.org/changeset/base/317484 Log: MFC r315961: Add ids for ALC233 found on Intel Skull Mountain NUC. Modified: stable/11/sys/dev/sound/pci/hda/hdac.h stable/11/sys/dev/sound/pci/hda/hdacc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/pci/hda/hdac.h == --- stable/11/sys/dev/sound/pci/hda/hdac.h Thu Apr 27 05:48:52 2017 (r317483) +++ stable/11/sys/dev/sound/pci/hda/hdac.h Thu Apr 27 06:27:39 2017 (r317484) @@ -339,6 +339,7 @@ /* Realtek */ #define REALTEK_VENDORID 0x10ec #define HDA_CODEC_ALC221 HDA_CODEC_CONSTRUCT(REALTEK, 0x0221) +#define HDA_CODEC_ALC233 HDA_CODEC_CONSTRUCT(REALTEK, 0x0233) #define HDA_CODEC_ALC260 HDA_CODEC_CONSTRUCT(REALTEK, 0x0260) #define HDA_CODEC_ALC262 HDA_CODEC_CONSTRUCT(REALTEK, 0x0262) #define HDA_CODEC_ALC267 HDA_CODEC_CONSTRUCT(REALTEK, 0x0267) Modified: stable/11/sys/dev/sound/pci/hda/hdacc.c == --- stable/11/sys/dev/sound/pci/hda/hdacc.c Thu Apr 27 05:48:52 2017 (r317483) +++ stable/11/sys/dev/sound/pci/hda/hdacc.c Thu Apr 27 06:27:39 2017 (r317484) @@ -77,6 +77,7 @@ static const struct { { HDA_CODEC_CS4207, 0, "Cirrus Logic CS4207" }, { HDA_CODEC_CS4210, 0, "Cirrus Logic CS4210" }, { HDA_CODEC_ALC221, 0, "Realtek ALC221" }, + { HDA_CODEC_ALC233, 0, "Realtek ALC233" }, { HDA_CODEC_ALC260, 0, "Realtek ALC260" }, { HDA_CODEC_ALC262, 0, "Realtek ALC262" }, { HDA_CODEC_ALC267, 0, "Realtek ALC267" }, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"