svn commit: r240345 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Sep 11 07:07:52 2012 New Revision: 240345 URL: http://svn.freebsd.org/changeset/base/240345 Log: zfs: fix sa_modify_attrs handling of variable-sized attributes - skip length_idx index for a replaced variable-sized attribute - skip length_idx index for a removed variable-sized attribute - also re-arranged code to make sure that length_idx is always incremented for variable-sized attributes - additionally add an assertion that the number of actually produced attributes is the same as the expected number of resulting attributes In cooperation with: Matthew Ahrens Tested by:Trent Nelson Reviewed by: Matthew Ahrens (for upstream) To do:get this upstreamed MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.cTue Sep 11 06:26:20 2012(r240344) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.cTue Sep 11 07:07:52 2012(r240345) @@ -1604,8 +1604,11 @@ sa_replace_all_by_template(sa_handle_t * } /* - * add/remove/replace a single attribute and then rewrite the entire set + * Add/remove a single attribute or replace a variable-sized attribute value + * with a value of a different size, and then rewrite the entire set * of attributes. + * Same-length attribute value replacement (including fixed-length attributes) + * is handled more efficiently by the upper layers. */ static int sa_modify_attrs(sa_handle_t *hdl, sa_attr_type_t newattr, @@ -1687,18 +1690,19 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att attr = idx_tab->sa_layout->lot_attrs[i]; if (attr == newattr) { - if (action == SA_REMOVE) { - j++; - continue; + /* duplicate attributes are not allowed */ + ASSERT(action == SA_REPLACE || + action == SA_REMOVE); + /* must be variable-sized to be replaced here */ + if (action == SA_REPLACE) { + ASSERT(SA_REGISTERED_LEN(sa, attr) == 0); + SA_ADD_BULK_ATTR(attr_desc, j, attr, + locator, datastart, buflen); } - ASSERT(SA_REGISTERED_LEN(sa, attr) == 0); - ASSERT(action == SA_REPLACE); - SA_ADD_BULK_ATTR(attr_desc, j, attr, - locator, datastart, buflen); } else { length = SA_REGISTERED_LEN(sa, attr); if (length == 0) { - length = hdr->sa_lengths[length_idx++]; + length = hdr->sa_lengths[length_idx]; } SA_ADD_BULK_ATTR(attr_desc, j, attr, @@ -1706,6 +1710,8 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att (TOC_OFF(idx_tab->sa_idx_tab[attr]) + (uintptr_t)old_data[k]), length); } + if (SA_REGISTERED_LEN(sa, attr) == 0) + length_idx++; } if (k == 0 && hdl->sa_spill) { hdr = SA_GET_HDR(hdl, SA_SPILL); @@ -1723,6 +1729,7 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att SA_ADD_BULK_ATTR(attr_desc, j, newattr, locator, datastart, buflen); } + ASSERT3U(j, ==, attr_count); error = sa_build_layouts(hdl, attr_desc, attr_count, tx); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240346 - head/sys/boot/zfs
Author: avg Date: Tue Sep 11 07:11:32 2012 New Revision: 240346 URL: http://svn.freebsd.org/changeset/base/240346 Log: zfs boot: bring zap_leaf_chunk field names in sync with kernel code This change is cosmetic. MFC after:10 days Modified: head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfs.c == --- head/sys/boot/zfs/zfs.c Tue Sep 11 07:07:52 2012(r240345) +++ head/sys/boot/zfs/zfs.c Tue Sep 11 07:11:32 2012(r240346) @@ -318,7 +318,7 @@ zfs_readdir(struct open_file *f, struct if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) goto fzap_next; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; if (namelen > sizeof(d->d_name)) namelen = sizeof(d->d_name); Modified: head/sys/boot/zfs/zfsimpl.c == --- head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:07:52 2012(r240345) +++ head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:11:32 2012(r240346) @@ -1245,7 +1245,7 @@ fzap_name_equal(const zap_leaf_t *zl, co const zap_leaf_chunk_t *nc; const char *p; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; nc = &ZAP_LEAF_CHUNK(zl, zc->l_entry.le_name_chunk); p = name; @@ -1458,7 +1458,7 @@ fzap_list(const spa_t *spa, const dnode_ zc = &ZAP_LEAF_CHUNK(&zl, j); if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) continue; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; if (namelen > sizeof(name)) namelen = sizeof(name); @@ -1557,7 +1557,7 @@ fzap_name_copy(const zap_leaf_t *zl, con const zap_leaf_chunk_t *nc; char *p; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; nc = &ZAP_LEAF_CHUNK(zl, zc->l_entry.le_name_chunk); p = name; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240347 - head/sys/boot/zfs
Author: avg Date: Tue Sep 11 07:12:48 2012 New Revision: 240347 URL: http://svn.freebsd.org/changeset/base/240347 Log: zfs boot: fix/replace fzap_rlookup implementation The previous one was totally bogus as it used hash value of _output_ variable as an index for searching... The only reliable way to do a reverse lookup here is to iterate over all entries. MFC after:15 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c == --- head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:11:32 2012(r240346) +++ head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:12:48 2012(r240347) @@ -1581,9 +1581,7 @@ fzap_rlookup(const spa_t *spa, const dno int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT; zap_phys_t zh = *(zap_phys_t *) zap_scratch; fat_zap_t z; - uint64_t *ptrtbl; - uint64_t hash; - int rc; + int i, j; if (zh.zap_magic != ZAP_MAGIC) return (EIO); @@ -1592,59 +1590,34 @@ fzap_rlookup(const spa_t *spa, const dno z.zap_phys = (zap_phys_t *) zap_scratch; /* -* Figure out where the pointer table is and read it in if necessary. +* This assumes that the leaf blocks start at block 1. The +* documentation isn't exactly clear on this. */ - if (zh.zap_ptrtbl.zt_blk) { - rc = dnode_read(spa, dnode, zh.zap_ptrtbl.zt_blk * bsize, - zap_scratch, bsize); - if (rc) - return (rc); - ptrtbl = (uint64_t *) zap_scratch; - } else { - ptrtbl = &ZAP_EMBEDDED_PTRTBL_ENT(&z, 0); - } - - hash = zap_hash(zh.zap_salt, name); - zap_leaf_t zl; zl.l_bs = z.zap_block_shift; + for (i = 0; i < zh.zap_num_leafs; i++) { + off_t off = (i + 1) << zl.l_bs; - off_t off = ptrtbl[hash >> (64 - zh.zap_ptrtbl.zt_shift)] << zl.l_bs; - zap_leaf_chunk_t *zc; - - rc = dnode_read(spa, dnode, off, zap_scratch, bsize); - if (rc) - return (rc); + if (dnode_read(spa, dnode, off, zap_scratch, bsize)) + return (EIO); - zl.l_phys = (zap_leaf_phys_t *) zap_scratch; + zl.l_phys = (zap_leaf_phys_t *) zap_scratch; - /* -* Make sure this chunk matches our hash. -*/ - if (zl.l_phys->l_hdr.lh_prefix_len > 0 - && zl.l_phys->l_hdr.lh_prefix - != hash >> (64 - zl.l_phys->l_hdr.lh_prefix_len)) - return (ENOENT); + for (j = 0; j < ZAP_LEAF_NUMCHUNKS(&zl); j++) { + zap_leaf_chunk_t *zc; - /* -* Hash within the chunk to find our entry. -*/ - int shift = (64 - ZAP_LEAF_HASH_SHIFT(&zl) - zl.l_phys->l_hdr.lh_prefix_len); - int h = (hash >> shift) & ((1 << ZAP_LEAF_HASH_SHIFT(&zl)) - 1); - h = zl.l_phys->l_hash[h]; - if (h == 0x) - return (ENOENT); - zc = &ZAP_LEAF_CHUNK(&zl, h); - while (zc->l_entry.le_hash != hash) { - if (zc->l_entry.le_next == 0x) { - zc = 0; - break; + zc = &ZAP_LEAF_CHUNK(&zl, j); + if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) + continue; + if (zc->l_entry.le_value_intlen != 8 || + zc->l_entry.le_value_numints != 1) + continue; + + if (fzap_leaf_value(&zl, zc) == value) { + fzap_name_copy(&zl, zc, name); + return (0); + } } - zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); - } - if (fzap_leaf_value(&zl, zc) == value) { - fzap_name_copy(&zl, zc, name); - return (0); } return (ENOENT); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240348 - head/sys/boot/zfs
Author: avg Date: Tue Sep 11 07:13:58 2012 New Revision: 240348 URL: http://svn.freebsd.org/changeset/base/240348 Log: zfs boot: print only an attribute name in fzap_list ... this matches mzap_list behavior MFC after:12 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c == --- head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:12:48 2012(r240347) +++ head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:13:58 2012(r240348) @@ -1484,7 +1484,8 @@ fzap_list(const spa_t *spa, const dnode_ */ value = fzap_leaf_value(&zl, zc); - printf("%s 0x%jx\n", name, (uintmax_t)value); + //printf("%s 0x%jx\n", name, (uintmax_t)value); + printf("%s\n", name); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240349 - head/sys/boot/zfs
Author: avg Date: Tue Sep 11 07:15:11 2012 New Revision: 240349 URL: http://svn.freebsd.org/changeset/base/240349 Log: zfs boot: add a size check for a value in fzap_lookup MFC after:25 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c == --- head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:13:58 2012(r240348) +++ head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:15:11 2012(r240349) @@ -1355,6 +1355,8 @@ fzap_lookup(const spa_t *spa, const dnod zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); } if (fzap_name_equal(&zl, zc, name)) { + if (zc->l_entry.le_value_intlen * zc->l_entry.le_value_numints > 8) + return (E2BIG); *value = fzap_leaf_value(&zl, zc); return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240350 - head/usr.sbin/rpc.lockd
Author: kevlo Date: Tue Sep 11 07:35:24 2012 New Revision: 240350 URL: http://svn.freebsd.org/changeset/base/240350 Log: Remove dead return code Modified: head/usr.sbin/rpc.lockd/lockd_lock.c Modified: head/usr.sbin/rpc.lockd/lockd_lock.c == --- head/usr.sbin/rpc.lockd/lockd_lock.cTue Sep 11 07:15:11 2012 (r240349) +++ head/usr.sbin/rpc.lockd/lockd_lock.cTue Sep 11 07:35:24 2012 (r240350) @@ -494,8 +494,6 @@ regions_overlap(start1, len1, start2, le } else { return 1; } - - return (result); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240351 - in head: sbin/ipfw usr.sbin/lpr/lpd
Author: kevlo Date: Tue Sep 11 07:54:41 2012 New Revision: 240351 URL: http://svn.freebsd.org/changeset/base/240351 Log: Remove unused values Modified: head/sbin/ipfw/nat.c head/usr.sbin/lpr/lpd/printjob.c Modified: head/sbin/ipfw/nat.c == --- head/sbin/ipfw/nat.cTue Sep 11 07:35:24 2012(r240350) +++ head/sbin/ipfw/nat.cTue Sep 11 07:54:41 2012(r240351) @@ -421,7 +421,7 @@ setup_redir_port(char *buf, int *ac, cha /* * Extract local address. */ - if ((sep = strchr(**av, ',')) != NULL) { + if (strchr(**av, ',') != NULL) { r->laddr.s_addr = INADDR_NONE; r->lport = ~0; numLocalPorts = 1; @@ -454,7 +454,7 @@ setup_redir_port(char *buf, int *ac, cha /* * Extract public port and optionally address. */ - if ((sep = strchr(**av, ':')) != NULL) { + if (strchr(**av, ':') != NULL) { if (StrToAddrAndPortRange(**av, &r->paddr, protoName, &portRange) != 0) errx(EX_DATAERR, "redirect_port: " @@ -482,7 +482,7 @@ setup_redir_port(char *buf, int *ac, cha * option for this redirect entry, else stop here processing arg[cv]. */ if (*ac != 0 && isdigit(***av)) { - if ((sep = strchr(**av, ':')) != NULL) { + if (strchr(**av, ':') != NULL) { if (StrToAddrAndPortRange(**av, &r->raddr, protoName, &portRange) != 0) errx(EX_DATAERR, "redirect_port: " Modified: head/usr.sbin/lpr/lpd/printjob.c == --- head/usr.sbin/lpr/lpd/printjob.cTue Sep 11 07:35:24 2012 (r240350) +++ head/usr.sbin/lpr/lpd/printjob.cTue Sep 11 07:54:41 2012 (r240351) @@ -1788,7 +1788,7 @@ openpr(const struct printer *pp) of_pid = 0; return; } else if (*pp->lp) { - if ((cp = strchr(pp->lp, '@')) != NULL) + if (strchr(pp->lp, '@') != NULL) opennet(pp); else opentty(pp); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240352 - head/usr.sbin/bsnmpd/modules/snmp_hostres
Author: glebius Date: Tue Sep 11 08:28:58 2012 New Revision: 240352 URL: http://svn.freebsd.org/changeset/base/240352 Log: Spelling. Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c == --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c Tue Sep 11 07:54:41 2012(r240351) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c Tue Sep 11 08:28:58 2012(r240352) @@ -319,7 +319,7 @@ kld_file_stat_to_swrun(const struct kld_ } /** - * Get all visible proceses including the kernel visible threads + * Get all visible processes including the kernel visible threads */ static void swrun_OS_get_procs(void) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240353 - stable/9/lib/libc/stdlib
Author: des Date: Tue Sep 11 08:30:48 2012 New Revision: 240353 URL: http://svn.freebsd.org/changeset/base/240353 Log: MFH (r240107, r240111): warn against using these for cryptographic purposes. Modified: stable/9/lib/libc/stdlib/rand.3 stable/9/lib/libc/stdlib/random.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/rand.3 == --- stable/9/lib/libc/stdlib/rand.3 Tue Sep 11 08:28:58 2012 (r240352) +++ stable/9/lib/libc/stdlib/rand.3 Tue Sep 11 08:30:48 2012 (r240353) @@ -32,7 +32,7 @@ .\" @(#)rand.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd October 6, 2010 +.Dd September 4, 2012 .Dt RAND 3 .Os .Sh NAME @@ -55,9 +55,15 @@ .Fn rand_r "unsigned *ctx" .Sh DESCRIPTION .Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp These interfaces are obsoleted by .Xr random 3 . -.Ef .Pp The .Fn rand @@ -88,9 +94,6 @@ The function initializes a seed using the .Xr random 4 random number device which returns good random numbers. -However, the -.Fn rand -function still remains unsuitable for cryptographic use. .Pp The .Fn rand_r @@ -105,8 +108,6 @@ For better generator quality, use .Xr random 3 or .Xr lrand48 3 . -Applications requiring cryptographic quality randomness should use -.Xr arc4random 3 . .Sh SEE ALSO .Xr arc4random 3 , .Xr lrand48 3 , Modified: stable/9/lib/libc/stdlib/random.3 == --- stable/9/lib/libc/stdlib/random.3 Tue Sep 11 08:28:58 2012 (r240352) +++ stable/9/lib/libc/stdlib/random.3 Tue Sep 11 08:30:48 2012 (r240353) @@ -28,7 +28,7 @@ .\" @(#)random.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 4, 2012 .Dt RANDOM 3 .Os .Sh NAME @@ -53,6 +53,14 @@ .Ft char * .Fn setstate "char *state" .Sh DESCRIPTION +.Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp The .Fn random function @@ -98,10 +106,8 @@ as the seed. .Pp The .Fn srandomdev -routine initializes a state array using the -.Xr random 4 -random number device which returns good random numbers, -suitable for cryptographic use. +routine initializes a state array using data from +.Xr random 4 . Note that this particular seeding procedure can generate states which are impossible to reproduce by calling @@ -191,6 +197,3 @@ The historical implementation used to ha random sequence did not vary much with the seed. The current implementation employs a better pseudo-random number generator for the initial state calculation. -.Pp -Applications requiring cryptographic quality randomness should use -.Xr arc4random 3 . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240354 - head/usr.sbin/bsnmpd/modules/snmp_hostres
Author: glebius Date: Tue Sep 11 08:33:16 2012 New Revision: 240354 URL: http://svn.freebsd.org/changeset/base/240354 Log: Do not count kernel threads as processes for hrSystemProcesses OID. PR: bin/160494 Submitted by: Jeremy Chadwick Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c == --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Tue Sep 11 08:30:48 2012(r240353) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Tue Sep 11 08:33:16 2012(r240354) @@ -238,7 +238,7 @@ OS_getSystemProcesses(uint32_t *proc_cou if (hr_kd == NULL) return (SNMP_ERR_GENERR); - if (kvm_getprocs(hr_kd, KERN_PROC_ALL, 0, &pc) == NULL) { + if (kvm_getprocs(hr_kd, KERN_PROC_PROC, 0, &pc) == NULL) { syslog(LOG_ERR, "kvm_getprocs failed: %m"); return (SNMP_ERR_GENERR); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240355 - head/sys/fs/ext2fs
Author: kevlo Date: Tue Sep 11 08:36:41 2012 New Revision: 240355 URL: http://svn.freebsd.org/changeset/base/240355 Log: Fix style nit Modified: head/sys/fs/ext2fs/ext2_inode.c Modified: head/sys/fs/ext2fs/ext2_inode.c == --- head/sys/fs/ext2fs/ext2_inode.c Tue Sep 11 08:33:16 2012 (r240354) +++ head/sys/fs/ext2fs/ext2_inode.c Tue Sep 11 08:36:41 2012 (r240355) @@ -397,8 +397,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, le */ vp = ITOV(ip); bp = getblk(vp, lbn, (int)fs->e2fs_bsize, 0, 0, 0); - if (bp->b_flags & (B_DONE | B_DELWRI)) { - } else { + if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0) { bp->b_iocmd = BIO_READ; if (bp->b_bcount > bp->b_bufsize) panic("ext2_indirtrunc: bad buffer size"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240356 - head/sys/cddl/boot/zfs
Author: avg Date: Tue Sep 11 08:45:49 2012 New Revision: 240356 URL: http://svn.freebsd.org/changeset/base/240356 Log: forgotten file from r240346 Pointyhat to: avg MFC after:10 days X-MFC with: r240346 Modified: head/sys/cddl/boot/zfs/zfsimpl.h Modified: head/sys/cddl/boot/zfs/zfsimpl.h == --- head/sys/cddl/boot/zfs/zfsimpl.hTue Sep 11 08:36:41 2012 (r240355) +++ head/sys/cddl/boot/zfs/zfsimpl.hTue Sep 11 08:45:49 2012 (r240356) @@ -1181,12 +1181,12 @@ typedef struct zap_leaf_phys { typedef union zap_leaf_chunk { struct zap_leaf_entry { uint8_t le_type;/* always ZAP_CHUNK_ENTRY */ - uint8_t le_int_size;/* size of ints */ + uint8_t le_value_intlen;/* size of ints */ uint16_t le_next; /* next entry in hash chain */ uint16_t le_name_chunk; /* first chunk of the name */ - uint16_t le_name_length;/* bytes in name, incl null */ + uint16_t le_name_numints; /* bytes in name, incl null */ uint16_t le_value_chunk;/* first chunk of the value */ - uint16_t le_value_length; /* value length in ints */ + uint16_t le_value_numints; /* value length in ints */ uint32_t le_cd; /* collision differentiator */ uint64_t le_hash; /* hash value of the name */ } l_entry; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240357 - vendor/illumos/dist/cmd/zpool
Author: mm Date: Tue Sep 11 08:49:22 2012 New Revision: 240357 URL: http://svn.freebsd.org/changeset/base/240357 Log: Update vendor/illumos/dist to illumos-gate 13811:4dadf1a8e003 (zfs, illumos issue #3064) Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c == --- vendor/illumos/dist/cmd/zpool/zpool_main.c Tue Sep 11 08:45:49 2012 (r240356) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Tue Sep 11 08:49:22 2012 (r240357) @@ -3271,7 +3271,7 @@ zpool_do_split(int argc, char **argv) if (zpool_get_state(zhp) != POOL_STATE_UNAVAIL && zpool_enable_datasets(zhp, mntopts, 0) != 0) { ret = 1; - (void) fprintf(stderr, gettext("Split was succssful, but " + (void) fprintf(stderr, gettext("Split was successful, but " "the datasets could not all be mounted\n")); (void) fprintf(stderr, gettext("Try doing '%s' with a " "different altroot\n"), "zpool import"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240358 - head/sys/fs/nandfs
Author: kevlo Date: Tue Sep 11 09:38:32 2012 New Revision: 240358 URL: http://svn.freebsd.org/changeset/base/240358 Log: Prevent nump NULL pointer dereference in bmap_getlbns() Modified: head/sys/fs/nandfs/bmap.c Modified: head/sys/fs/nandfs/bmap.c == --- head/sys/fs/nandfs/bmap.c Tue Sep 11 08:49:22 2012(r240357) +++ head/sys/fs/nandfs/bmap.c Tue Sep 11 09:38:32 2012(r240358) @@ -548,7 +548,8 @@ bmap_getlbns(struct nandfs_node *node, n DPRINTF(BMAP, ("%s: node %p bn=%jx mnindir=%zd enter\n", __func__, node, bn, MNINDIR(fsdev))); - *nump = 0; + if (nump) + *nump = 0; numlevels = 0; realbn = bn; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240359 - stable/9/sys/modules/zfs
Author: pjd Date: Tue Sep 11 10:07:55 2012 New Revision: 240359 URL: http://svn.freebsd.org/changeset/base/240359 Log: MFC r226738: Don't look for includes in userland directories. There is no need for it and it breaks building the kernel without userland sources. Reported by: andre, imp Modified: stable/9/sys/modules/zfs/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/modules/zfs/Makefile == --- stable/9/sys/modules/zfs/Makefile Tue Sep 11 09:38:32 2012 (r240358) +++ stable/9/sys/modules/zfs/Makefile Tue Sep 11 10:07:55 2012 (r240359) @@ -82,7 +82,6 @@ CFLAGS+=-I${SUNW}/uts/common CFLAGS+=-I${.CURDIR}/../.. CFLAGS+=-I${SUNW}/common/zfs CFLAGS+=-I${SUNW}/common -CFLAGS+=-I${.CURDIR}/../../../include CFLAGS+=-DBUILDING_ZFS .if ${MACHINE_ARCH} == "powerpc64" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240360 - releng/9.1/lib/libc/stdlib
Author: des Date: Tue Sep 11 11:05:32 2012 New Revision: 240360 URL: http://svn.freebsd.org/changeset/base/240360 Log: MFH (r240107, r240111): warn against using these for cryptographic purposes. Approved by: re (kib) Modified: releng/9.1/lib/libc/stdlib/rand.3 releng/9.1/lib/libc/stdlib/random.3 Directory Properties: releng/9.1/lib/libc/ (props changed) Modified: releng/9.1/lib/libc/stdlib/rand.3 == --- releng/9.1/lib/libc/stdlib/rand.3 Tue Sep 11 10:07:55 2012 (r240359) +++ releng/9.1/lib/libc/stdlib/rand.3 Tue Sep 11 11:05:32 2012 (r240360) @@ -32,7 +32,7 @@ .\" @(#)rand.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd October 6, 2010 +.Dd September 4, 2012 .Dt RAND 3 .Os .Sh NAME @@ -55,9 +55,15 @@ .Fn rand_r "unsigned *ctx" .Sh DESCRIPTION .Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp These interfaces are obsoleted by .Xr random 3 . -.Ef .Pp The .Fn rand @@ -88,9 +94,6 @@ The function initializes a seed using the .Xr random 4 random number device which returns good random numbers. -However, the -.Fn rand -function still remains unsuitable for cryptographic use. .Pp The .Fn rand_r @@ -105,8 +108,6 @@ For better generator quality, use .Xr random 3 or .Xr lrand48 3 . -Applications requiring cryptographic quality randomness should use -.Xr arc4random 3 . .Sh SEE ALSO .Xr arc4random 3 , .Xr lrand48 3 , Modified: releng/9.1/lib/libc/stdlib/random.3 == --- releng/9.1/lib/libc/stdlib/random.3 Tue Sep 11 10:07:55 2012 (r240359) +++ releng/9.1/lib/libc/stdlib/random.3 Tue Sep 11 11:05:32 2012 (r240360) @@ -28,7 +28,7 @@ .\" @(#)random.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 4, 2012 .Dt RANDOM 3 .Os .Sh NAME @@ -53,6 +53,14 @@ .Ft char * .Fn setstate "char *state" .Sh DESCRIPTION +.Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp The .Fn random function @@ -98,10 +106,8 @@ as the seed. .Pp The .Fn srandomdev -routine initializes a state array using the -.Xr random 4 -random number device which returns good random numbers, -suitable for cryptographic use. +routine initializes a state array using data from +.Xr random 4 . Note that this particular seeding procedure can generate states which are impossible to reproduce by calling @@ -191,6 +197,3 @@ The historical implementation used to ha random sequence did not vary much with the seed. The current implementation employs a better pseudo-random number generator for the initial state calculation. -.Pp -Applications requiring cryptographic quality randomness should use -.Xr arc4random 3 . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240361 - in head/lib/libc: gen stdlib
Author: des Date: Tue Sep 11 12:55:15 2012 New Revision: 240361 URL: http://svn.freebsd.org/changeset/base/240361 Log: Add the same warning to rand48(3) as to rand(3) and random(3). MFC after:3 days Modified: head/lib/libc/gen/rand48.3 head/lib/libc/stdlib/random.3 Modified: head/lib/libc/gen/rand48.3 == --- head/lib/libc/gen/rand48.3 Tue Sep 11 11:05:32 2012(r240360) +++ head/lib/libc/gen/rand48.3 Tue Sep 11 12:55:15 2012(r240361) @@ -12,7 +12,7 @@ .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 .\" $FreeBSD$ .\" -.Dd February 2, 2010 +.Dd September 4, 2012 .Dt RAND48 3 .Os .Sh NAME @@ -49,6 +49,14 @@ .Ft void .Fn lcong48 "unsigned short p[7]" .Sh DESCRIPTION +.Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp The .Fn rand48 family of functions generates pseudo-random numbers using a linear @@ -174,10 +182,8 @@ It is thus not possible to use values gr Note that all three methods of seeding the random number generator always also set the multiplicand and addend for any of the six generator calls. -.Pp -For a more powerful random number generator, see -.Xr random 3 . .Sh SEE ALSO +.Xr arc4random 3 , .Xr rand 3 , .Xr random 3 .Sh AUTHORS Modified: head/lib/libc/stdlib/random.3 == --- head/lib/libc/stdlib/random.3 Tue Sep 11 11:05:32 2012 (r240360) +++ head/lib/libc/stdlib/random.3 Tue Sep 11 12:55:15 2012 (r240361) @@ -181,7 +181,6 @@ messages are printed on the standard err .Xr arc4random 3 , .Xr lrand48 3 , .Xr rand 3 , -.Xr srand 3 , .Xr random 4 .Sh HISTORY These ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240362 - in head: share/misc usr.bin/calendar/calendars
Author: jhale (ports committer) Date: Tue Sep 11 13:29:50 2012 New Revision: 240362 URL: http://svn.freebsd.org/changeset/base/240362 Log: - Add myself to calendar.freebsd - Add my mentor relationships to committers-ports.dot Approved by: makc (mentor) Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotTue Sep 11 12:55:15 2012 (r240361) +++ head/share/misc/committers-ports.dotTue Sep 11 13:29:50 2012 (r240362) @@ -105,6 +105,7 @@ jacula [label="Giuseppe Pilichi\njacula@ jadawin [label="Philippe Audeoud\njada...@freebsd.org\n2008/03/02"] jase [label="Jase Thew\nj...@freebsd.org\n2012/05/30"] jgh [label="Jason Helfman\n...@freebsd.org\n2011/12/16"] +jhale [label="Jason E. Hale\njh...@freebsd.org\n2012/09/10"] jkim [label="Jung-uk Kim\nj...@freebsd.org\n2007/09/12"] jlaffaye [label="Julien Laffaye\njlaff...@freebsd.org\n2011/06/06"] jmelo [label="Jean Milanez Melo\njm...@freebsd.org\n2006/03/31"] @@ -226,6 +227,7 @@ arved -> stefan asami -> obrien +avilla -> jhale avilla -> rakuco bapt -> bdrewery @@ -369,6 +371,7 @@ marcus -> eik marcus -> jmallett makc -> bf +makc -> jhale makc -> rakuco mat -> thierry Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdTue Sep 11 12:55:15 2012(r240361) +++ head/usr.bin/calendar/calendars/calendar.freebsdTue Sep 11 13:29:50 2012(r240362) @@ -54,6 +54,7 @@ 02/10 David Greenman born in Portland, Oregon, United States, 1968 02/10 Paul Richards born in Ammanford, Carmarthenshire, United Kingdom, 1968 02/10 Simon Barner born in Rosenheim, Bayern, Germany, 1980 +02/10 Jason E. Hale born in Pittsburgh, Pennsylvania, Unites States, 1982 02/13 Jesper Skriver born in Aarhus, Denmark, 1975 02/13 Steve Wills born in Lynchburg, Virginia, United States, 1975 02/13 Andrey Slusar born in Odessa, USSR, 1979 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240363 - releng/9.1/sys/modules/zfs
Author: pjd Date: Tue Sep 11 13:58:03 2012 New Revision: 240363 URL: http://svn.freebsd.org/changeset/base/240363 Log: MFC r226738: Don't look for includes in userland directories. There is no need for it and it breaks building the kernel without userland sources. Reported by: andre, imp Approved by: re (kib) Modified: releng/9.1/sys/modules/zfs/Makefile Directory Properties: releng/9.1/sys/ (props changed) releng/9.1/sys/modules/ (props changed) Modified: releng/9.1/sys/modules/zfs/Makefile == --- releng/9.1/sys/modules/zfs/Makefile Tue Sep 11 13:29:50 2012 (r240362) +++ releng/9.1/sys/modules/zfs/Makefile Tue Sep 11 13:58:03 2012 (r240363) @@ -82,7 +82,6 @@ CFLAGS+=-I${SUNW}/uts/common CFLAGS+=-I${.CURDIR}/../.. CFLAGS+=-I${SUNW}/common/zfs CFLAGS+=-I${SUNW}/common -CFLAGS+=-I${.CURDIR}/../../../include CFLAGS+=-DBUILDING_ZFS .if ${MACHINE_ARCH} == "powerpc64" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240364 - head/usr.bin/truss
Author: zont Date: Tue Sep 11 16:30:26 2012 New Revision: 240364 URL: http://svn.freebsd.org/changeset/base/240364 Log: - Remove unused variables. - Remove redundant return after err(3) call. Approved by: kib (mentor) Modified: head/usr.bin/truss/setup.c Modified: head/usr.bin/truss/setup.c == --- head/usr.bin/truss/setup.c Tue Sep 11 13:58:03 2012(r240363) +++ head/usr.bin/truss/setup.c Tue Sep 11 16:30:26 2012(r240364) @@ -70,7 +70,6 @@ int setup_and_wait(char *command[]) { pid_t pid; - int waitval; pid = vfork(); if (pid == -1) @@ -82,10 +81,8 @@ setup_and_wait(char *command[]) } /* Only in the parent here */ - if (waitpid(pid, &waitval, 0) < 0) { + if (waitpid(pid, NULL, 0) < 0) err(1, "unexpect stop in waitpid"); - return 0; - } child_pid = pid; @@ -101,7 +98,7 @@ setup_and_wait(char *command[]) int start_tracing(pid_t pid) { - int ret, retry, waitval; + int ret, retry; retry = 10; do { @@ -112,7 +109,7 @@ start_tracing(pid_t pid) err(1, "can not attach to target process"); child_pid = pid; - if (waitpid(pid, &waitval, 0) < 0) + if (waitpid(pid, NULL, 0) < 0) err(1, "Unexpect stop in waitpid"); return (0); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240365 - in head/usr.bin: mkcsmapper mkesdb
Author: dim Date: Tue Sep 11 16:32:31 2012 New Revision: 240365 URL: http://svn.freebsd.org/changeset/base/240365 Log: Ensure mkcsmapper and mkesdb compile with clang, if WITH_ICONV is defined. Submitted by: zeising PR: bin/167481 MFC after:3 days X-MFC-With: r238197 Modified: head/usr.bin/mkcsmapper/lex.l head/usr.bin/mkesdb/lex.l Modified: head/usr.bin/mkcsmapper/lex.l == --- head/usr.bin/mkcsmapper/lex.l Tue Sep 11 16:30:26 2012 (r240364) +++ head/usr.bin/mkcsmapper/lex.l Tue Sep 11 16:32:31 2012 (r240365) @@ -43,6 +43,7 @@ int line_number = 1; %} +%optionnoinput %optionnounput %x COMMENT Modified: head/usr.bin/mkesdb/lex.l == --- head/usr.bin/mkesdb/lex.l Tue Sep 11 16:30:26 2012(r240364) +++ head/usr.bin/mkesdb/lex.l Tue Sep 11 16:32:31 2012(r240365) @@ -45,6 +45,7 @@ int line_number = 1; %} +%optionnoinput %optionnounput %x COMMENT ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240366 - head/sys/dev/ixgbe
Author: scottl Date: Tue Sep 11 16:59:04 2012 New Revision: 240366 URL: http://svn.freebsd.org/changeset/base/240366 Log: Remove a prefetch() directive that, after careful testing, does more harm than good. Submitted by: Fabien Thomas Reviewed by: jfv Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Tue Sep 11 16:32:31 2012(r240365) +++ head/sys/dev/ixgbe/ixgbe.c Tue Sep 11 16:59:04 2012(r240366) @@ -4641,7 +4641,6 @@ ixgbe_rxeof(struct ix_queue *que, int co * leave the old mbuf+cluster for re-use. */ if (eop && plen <= IXGBE_RX_COPY_LEN) { - prefetch(mp->m_data); sendmp = m_gethdr(M_DONTWAIT, MT_DATA); if (sendmp != NULL) { sendmp->m_data += ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240367 - head/sys/dev/acpica
Author: avg Date: Tue Sep 11 17:21:25 2012 New Revision: 240367 URL: http://svn.freebsd.org/changeset/base/240367 Log: revert r240344: cpu_devices[] is used in other functions and must be kept Reported by: gjb, glebius Pointyhat to: avg MFC after:1 day X-MFC note: fake MFC, reminder to never MFC r240344 Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Tue Sep 11 16:59:04 2012 (r240366) +++ head/sys/dev/acpica/acpi_cpu.c Tue Sep 11 17:21:25 2012 (r240367) @@ -862,7 +862,6 @@ acpi_cpu_startup(void *arg) cpu_cx_lowest_lim = 0; cpu_disable_idle = FALSE; cpu_idle_hook = acpi_cpu_idle; -free(cpu_devices, M_TEMP); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240368 - head/lib/msun/man
Author: joel (doc committer) Date: Tue Sep 11 17:40:06 2012 New Revision: 240368 URL: http://svn.freebsd.org/changeset/base/240368 Log: Minor mdoc fix. Modified: head/lib/msun/man/cexp.3 Modified: head/lib/msun/man/cexp.3 == --- head/lib/msun/man/cexp.3Tue Sep 11 17:21:25 2012(r240367) +++ head/lib/msun/man/cexp.3Tue Sep 11 17:40:06 2012(r240368) @@ -59,17 +59,17 @@ behaves according to Euler's formula: .Bd -ragged -offset indent .Fn cexp "x + I*y" = -.Ns ( Sy e Ns ** Ns +.Po Sy e Ns ** Ns .Fa x * -.Em cos Ns ( Ns -.Fa y Ns )) + ( Ns +.Em cos Ns Po Ns +.Fa y Ns Pc Pc + Po Ns .Sy I * .Sy e Ns ** Ns .Fa x * -.Em sin Ns ( Ns -.Fa y Ns )) +.Em sin Ns Po Ns +.Fa y Ns Pc Pc .Ed .Pp Generally speaking, infinities, zeroes and \*(Nas are handled as would ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240369 - head/bin/sh
Author: joel (doc committer) Date: Tue Sep 11 17:57:03 2012 New Revision: 240369 URL: http://svn.freebsd.org/changeset/base/240369 Log: Minor mdoc fix. Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 == --- head/bin/sh/sh.1Tue Sep 11 17:40:06 2012(r240368) +++ head/bin/sh/sh.1Tue Sep 11 17:57:03 2012(r240369) @@ -487,8 +487,9 @@ and backslash The backslash inside double quotes is historically weird. It remains literal unless it precedes the following characters, which it serves to quote: +.Pp .Bl -column "XXX" "XXX" "XXX" "XXX" "XXX" -offset center -compact -.It Li $ Ta Li ` Ta Li \&" Ta Li \e\ Ta Li \en +.It Li $ Ta Li ` Ta Li \&" Ta Li \e Ta Li \en .El .It Backslash A backslash preserves the literal meaning of the following ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r240116 - in vendor/atf: . atf-0.16 atf-0.16/admin atf-0.16/atf-c atf-0.16/atf-c++ atf-0.16/atf-c++/detail atf-0.16/atf-c/detail atf-0.16/atf-config atf-0.16/atf-report atf-0.16/atf-ru
On Tue, Sep 04, 2012 at 11:07:34PM +, Marcel Moolenaar wrote: > Author: marcel > Date: Tue Sep 4 23:07:32 2012 > New Revision: 240116 > URL: http://svn.freebsd.org/changeset/base/240116 > Log: > Import ATF version 0,16 Please back this out. I already had it imported in r236635. > Discussed with: gibbs, gnn, keramida, mdf, mlaier, > Discussed with: Garrett Cooper NOT discussed with: obrien -- -- David (obr...@freebsd.org) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240370 - head/usr.bin/chat
Author: joel (doc committer) Date: Tue Sep 11 19:25:59 2012 New Revision: 240370 URL: http://svn.freebsd.org/changeset/base/240370 Log: Minor mdoc fix. Modified: head/usr.bin/chat/chat.8 Modified: head/usr.bin/chat/chat.8 == --- head/usr.bin/chat/chat.8Tue Sep 11 17:57:03 2012(r240369) +++ head/usr.bin/chat/chat.8Tue Sep 11 19:25:59 2012(r240370) @@ -508,9 +508,9 @@ If you send a null string then it will s send the return character. This sequence may either be a pair of apostrophe or quote characters. -.It b +.It \eb represents a backspace character. -.It c +.It \ec Suppresses the newline at the end of the reply string. This is the only method to send a string without a trailing return character. @@ -519,44 +519,44 @@ be at the end of the send string. For example, the sequence hello\\c will simply send the characters h, e, l, l, o .Pq Em not valid in expect . -.It d +.It \ed Delay for one second. The program uses sleep(1) which will delay to a maximum of one second .Pq Em not valid in expect . -.It K +.It \eK Insert a .Dv BREAK .Pq Em not valid in expect . -.It n +.It \en Send a newline or linefeed character. -.It N +.It \eN Send a null character. The same sequence may be represented by \\0 .Pq Em not valid in expect . -.It p +.It \ep Pause for a fraction of a second. The delay is 1/10th of a second .Pq Em not valid in expect . -.It q +.It \eq Suppress writing the string to .Xr syslogd 8 . The string ?? is written to the log in its place .Pq Em not valid in expect . -.It r +.It \er Send or expect a carriage return. -.It s +.It \es Represents a space character in the string. This may be used when it is not desirable to quote the strings which contains spaces. The sequence 'HI TIM' and HI\\sTIM are the same. -.It t +.It \et Send or expect a tab character. -.It +.It \e Send or expect a backslash character. -.It ddd +.It \eddd Collapse the octal digits (ddd) into a single ASCII character and send that character .Pq Em some characters are not valid in expect . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240371 - in head/sys/geom: mirror raid3
Author: glebius Date: Tue Sep 11 20:20:13 2012 New Revision: 240371 URL: http://svn.freebsd.org/changeset/base/240371 Log: When synchronizing, include in the config dump amount of bytes syncronized. The rationale behind this is the following: for large disks the percent synchronisation counter ticks too seldom, and monitoring software (as well as human operator) can't tell whether synchronisation goes on or one of disks got stuck. On an idle server one can look into gstat and see whether synchronisation goes on or not, but on a busy server that won't work. Also, new value monitored can be differentiated obtaining the synchronisation speed quite precisely. Submitted by: Konstantin Kukushkin Reviewed by: pjd Modified: head/sys/geom/mirror/g_mirror.c head/sys/geom/raid3/g_raid3.c Modified: head/sys/geom/mirror/g_mirror.c == --- head/sys/geom/mirror/g_mirror.c Tue Sep 11 19:25:59 2012 (r240370) +++ head/sys/geom/mirror/g_mirror.c Tue Sep 11 20:20:13 2012 (r240371) @@ -3144,6 +3144,11 @@ g_mirror_dumpconf(struct sbuf *sb, const sc->sc_provider->mediasize)); } sbuf_printf(sb, "\n"); + if (disk->d_sync.ds_offset > 0) { + sbuf_printf(sb, "%s%jd" + "\n", indent, + (intmax_t)disk->d_sync.ds_offset); + } } sbuf_printf(sb, "%s%u\n", indent, disk->d_sync.ds_syncid); Modified: head/sys/geom/raid3/g_raid3.c == --- head/sys/geom/raid3/g_raid3.c Tue Sep 11 19:25:59 2012 (r240370) +++ head/sys/geom/raid3/g_raid3.c Tue Sep 11 20:20:13 2012 (r240371) @@ -3448,6 +3448,11 @@ g_raid3_dumpconf(struct sbuf *sb, const (sc->sc_mediasize / (sc->sc_ndisks - 1; } sbuf_printf(sb, "\n"); + if (disk->d_sync.ds_offset > 0) { + sbuf_printf(sb, "%s%jd" + "\n", indent, + (intmax_t)disk->d_sync.ds_offset); + } } sbuf_printf(sb, "%s%u\n", indent, disk->d_sync.ds_syncid); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
RE: svn commit: r240135 - in head/sys: amd64/conf conf dev/random i386/conf modules/random
Funny, I've also implemented RdRand backing for /dev/random over the weekend, w/o being aware of kib@'s work. Oh well. One comment I have: IVY_RNG is potentially not the best name. RdRand will be available on future architectures, such as Haswell. Perhaps RDRAND_RNG would make a better name? Thanks. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240372 - head/usr.bin/stdbuf
Author: delphij Date: Tue Sep 11 21:13:18 2012 New Revision: 240372 URL: http://svn.freebsd.org/changeset/base/240372 Log: WARNS is now default to 6. Modified: head/usr.bin/stdbuf/Makefile Modified: head/usr.bin/stdbuf/Makefile == --- head/usr.bin/stdbuf/MakefileTue Sep 11 20:20:13 2012 (r240371) +++ head/usr.bin/stdbuf/MakefileTue Sep 11 21:13:18 2012 (r240372) @@ -3,6 +3,4 @@ PROG= stdbuf SRCS= stdbuf.c -WARNS?=6 - .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240373 - head/contrib/bzip2
Author: delphij Date: Tue Sep 11 21:16:22 2012 New Revision: 240373 URL: http://svn.freebsd.org/changeset/base/240373 Log: Remove a few files that are not needed for FreeBSD. PR: bin/171555 Approved by: obrien Deleted: head/contrib/bzip2/Makefile head/contrib/bzip2/Makefile-libbz2_so head/contrib/bzip2/dlltest.c head/contrib/bzip2/makefile.msc Modified: head/contrib/bzip2/FREEBSD-Xlist Modified: head/contrib/bzip2/FREEBSD-Xlist == --- head/contrib/bzip2/FREEBSD-XlistTue Sep 11 21:13:18 2012 (r240372) +++ head/contrib/bzip2/FREEBSD-XlistTue Sep 11 21:16:22 2012 (r240373) @@ -1,4 +1,5 @@ # $FreeBSD$ +*Makefile* *README.XML.STUFF *bz-common.xsl *bz-fo.xsl @@ -12,10 +13,11 @@ *bzip2.txt *bzmore *bzmore.1 -*dlltest.dsp +*dlltest.* *entities.xml *format.pl *libbz2.dsp +*makefile.msc *manual.html *manual.pdf *manual.ps ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240374 - head/sys/dev/usb/controller
Author: hselasky Date: Tue Sep 11 22:08:19 2012 New Revision: 240374 URL: http://svn.freebsd.org/changeset/base/240374 Log: Fix missing parts of DWC OTG host mode support. The host mode support of the DWC OTG is very simple in PIO mode, and we need to re-transmit data when NAK is received among other things. We probably will need to implement some kind of rate limitation on the NAK-ing. Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h Modified: head/sys/dev/usb/controller/dwc_otg.c == --- head/sys/dev/usb/controller/dwc_otg.c Tue Sep 11 21:16:22 2012 (r240373) +++ head/sys/dev/usb/controller/dwc_otg.c Tue Sep 11 22:08:19 2012 (r240374) @@ -127,7 +127,6 @@ static dwc_otg_cmd_t dwc_otg_data_tx_syn static dwc_otg_cmd_t dwc_otg_host_setup_tx; static dwc_otg_cmd_t dwc_otg_host_data_tx; static dwc_otg_cmd_t dwc_otg_host_data_rx; -static dwc_otg_cmd_t dwc_otg_host_data_tx_sync; static void dwc_otg_device_done(struct usb_xfer *, usb_error_t); static void dwc_otg_do_poll(struct usb_bus *); @@ -505,8 +504,9 @@ dwc_otg_host_channel_alloc(struct dwc_ot /* enable interrupts */ DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), HCINT_STALL | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR | - HCINT_XFERCOMPL); + HCINT_AHBERR | HCINT_CHHLTD | + HCINT_XACTERR | HCINT_XFERCOMPL | + HCINT_NAK | HCINT_NYET); DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(x), td->hcsplt); DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0); @@ -544,6 +544,42 @@ dwc_otg_host_setup_tx(struct dwc_otg_td /* get pointer to softc */ sc = DWC_OTG_PC2SC(td->pc); + temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel)); + DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp); + + DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", + td->channel, + temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), + DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + + if (temp & HCINT_NAK) + td->did_nak = 1; + + if (temp & HCINT_STALL) { + td->error_stall = 1; + td->error_any = 1; + return (0); /* complete */ + } + + if (temp & (HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) { + td->error_any = 1; + return (0); /* complete */ + } + + if (temp & HCINT_XFERCOMPL) + td->did_complete = 1; + + if (td->did_complete) { + if (td->did_nak == 0) { + td->offset += td->tx_bytes; + td->remainder -= td->tx_bytes; + td->toggle = 1; + return (0); /* complete */ + } + } else { + return (1); /* busy */ + } temp = DWC_OTG_READ_4(sc, DOTG_HPTXSTS); DPRINTF("HPTXSTS=0x%08x\n", temp); @@ -563,9 +599,6 @@ dwc_otg_host_setup_tx(struct dwc_otg_td usbd_copy_out(td->pc, 0, &req, sizeof(req)); - td->offset = sizeof(req); - td->remainder = 0; - DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), (sizeof(req) << HCTSIZ_XFERSIZE_SHIFT) | (1 << HCTSIZ_PKTCNT_SHIFT) | @@ -581,13 +614,12 @@ dwc_otg_host_setup_tx(struct dwc_otg_td bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, DOTG_DFIFO(td->channel), (uint32_t *)&req, sizeof(req) / 4); - td->toggle = 1; - - /* need to sync before complete */ - td->func = &dwc_otg_host_data_tx_sync; + /* reset statemachine */ + td->did_complete = 0; + td->did_nak = 0; + td->tx_bytes = sizeof(req); - /* check status */ - return (dwc_otg_host_data_tx_sync(td)); + return (1); /* busy */ } static uint8_t @@ -728,13 +760,11 @@ dwc_otg_host_data_rx(struct dwc_otg_td * uint32_t temp; uint16_t count; uint8_t got_short; - uint8_t is_isoc; + uint8_t ep_type; if (dwc_otg_host_channel_alloc(td)) return (1); /* busy */ - got_short = 0; - /* get pointer to softc */ sc = DWC_OTG_PC2SC(td->pc); @@ -746,6 +776,9 @@ dwc_otg_host_data_rx(struct dwc_otg_td * temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + if (temp & HCINT_NAK) + td->did_nak = 1; + if (temp & HCINT_STALL) { td->error_stall = 1; td->error_any = 1; @@ -758,6 +791,9 @@ dwc_otg_host_data_rx(struct dwc_otg_td * return (0);
svn commit: r240375 - head/sys/conf
Author: hselasky Date: Tue Sep 11 22:10:36 2012 New Revision: 240375 URL: http://svn.freebsd.org/changeset/base/240375 Log: Add device entry for DWC OTG. Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Tue Sep 11 22:08:19 2012(r240374) +++ head/sys/conf/files Tue Sep 11 22:10:36 2012(r240375) @@ -2081,6 +2081,7 @@ dev/usb/controller/at91dci.c optional a dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 dev/usb/controller/musb_otg.c optional musb dev/usb/controller/musb_otg_atmelarm.c optional musb at91rm9200 +dev/usb/controller/dwc_otg.c optional dwcotg dev/usb/controller/ehci.c optional ehci dev/usb/controller/ehci_pci.c optional ehci pci dev/usb/controller/ohci.c optional ohci ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240376 - head/sys/arm/broadcom/bcm2835
Author: hselasky Date: Tue Sep 11 22:13:37 2012 New Revision: 240376 URL: http://svn.freebsd.org/changeset/base/240376 Log: Add device entry for DWC OTG. Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 == --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Tue Sep 11 22:10:36 2012 (r240375) +++ head/sys/arm/broadcom/bcm2835/files.bcm2835 Tue Sep 11 22:13:37 2012 (r240376) @@ -8,6 +8,7 @@ arm/broadcom/bcm2835/bcm2835_systimer.c arm/broadcom/bcm2835/bcm2835_wdog.cstandard arm/broadcom/bcm2835/bus_space.c optional fdt arm/broadcom/bcm2835/common.c optional fdt +arm/broadcom/bcm2835/dwc_otg_brcm.coptional dwcotg arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240377 - in head: lib/libmagic tools/build
Author: obrien Date: Tue Sep 11 22:38:33 2012 New Revision: 240377 URL: http://svn.freebsd.org/changeset/base/240377 Log: r235638 is not the clean way to add support for building on ancient FreeBSD versions. Instead use Imp's good work on "legacy" and follow the outcome of the previous TRB discussions on this topic. Now use the libc getline() if it exists, and only where it doesn't create a bootstraping version. Modified: head/lib/libmagic/Makefile head/lib/libmagic/config.h head/tools/build/Makefile Modified: head/lib/libmagic/Makefile == --- head/lib/libmagic/Makefile Tue Sep 11 22:13:37 2012(r240376) +++ head/lib/libmagic/Makefile Tue Sep 11 22:38:33 2012(r240377) @@ -39,9 +39,9 @@ magic.mgc: mkmagic magic CLEANFILES+= mkmagic build-tools: mkmagic -mkmagic: apprentice.c encoding.c funcs.c getline.c magic.c print.c - ${CC} ${CFLAGS} -DCOMPILE_ONLY -DHOSTPROG ${LDFLAGS} \ - -o ${.TARGET} ${.ALLSRC} +mkmagic: apprentice.c encoding.c funcs.c magic.c print.c + ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} \ + ${LDADD} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h Modified: head/lib/libmagic/config.h == --- head/lib/libmagic/config.h Tue Sep 11 22:13:37 2012(r240376) +++ head/lib/libmagic/config.h Tue Sep 11 22:38:33 2012(r240377) @@ -39,9 +39,7 @@ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `getline' function. */ -#ifndef HOSTPROG #define HAVE_GETLINE 1 -#endif /* Define to 1 if you have the header file. */ #define HAVE_GETOPT_H 1 Modified: head/tools/build/Makefile == --- head/tools/build/Makefile Tue Sep 11 22:13:37 2012(r240376) +++ head/tools/build/Makefile Tue Sep 11 22:38:33 2012(r240377) @@ -3,12 +3,24 @@ .PATH: ${.CURDIR}/../../include LIB= egacy -SRCS= +SRC= INCSGROUPS=INCS -INCS= +INCS= BOOTSTRAPPING?=0 +_WITH_GETLINE!=grep -c _WITH_GETLINE /usr/include/stdio.h || true +.if ${_WITH_GETLINE} == 0 +.PATH: ${.CURDIR}/../../contrib/file ${.CURDIR}/../../lib/libmagic +SRCS= getline.c config.h +CFLAGS+= -DHAVE_CONFIG_H -I. +CLEANFILES+= config.h + +${SRCS:N*.h:R:S/$/.o/}: config.h +config.h: ${.CURDIR}/../../lib/libmagic/config.h + grep -v HAVE_GETLINE ${.ALLSRC} > ${.TARGET} +.endif + .if empty(SRCS) SRCS= dummy.c .endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240378 - head/share/man/man9
Author: kevlo Date: Wed Sep 12 03:39:32 2012 New Revision: 240378 URL: http://svn.freebsd.org/changeset/base/240378 Log: Add references to VFS_SET(9) and VOP_VPTOFH(9) Modified: head/share/man/man9/VFS.9 Modified: head/share/man/man9/VFS.9 == --- head/share/man/man9/VFS.9 Tue Sep 11 22:38:33 2012(r240377) +++ head/share/man/man9/VFS.9 Wed Sep 12 03:39:32 2012(r240378) @@ -49,10 +49,12 @@ rather than implementing empty functions .Xr VFS_INIT 9 , .Xr VFS_MOUNT 9 , .Xr VFS_QUOTACTL 9 , +.Xr VFS_SET 9 , .Xr VFS_STATFS 9 , .Xr VFS_SYNC 9 , .Xr VFS_UNMOUNT 9 , .Xr VFS_VGET 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240379 - in head/sys: fs/ntfs gnu/fs/xfs/FreeBSD
Author: kevlo Date: Wed Sep 12 03:42:52 2012 New Revision: 240379 URL: http://svn.freebsd.org/changeset/base/240379 Log: Add VFCF_READONLY flag that indicates ntfs and xfs file systems are only supported as read-only. Modified: head/sys/fs/ntfs/ntfs_vfsops.c head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Modified: head/sys/fs/ntfs/ntfs_vfsops.c == --- head/sys/fs/ntfs/ntfs_vfsops.c Wed Sep 12 03:39:32 2012 (r240378) +++ head/sys/fs/ntfs/ntfs_vfsops.c Wed Sep 12 03:42:52 2012 (r240379) @@ -776,5 +776,5 @@ static struct vfsops ntfs_vfsops = { .vfs_unmount = ntfs_unmount, .vfs_vget = ntfs_vget, }; -VFS_SET(ntfs_vfsops, ntfs, 0); +VFS_SET(ntfs_vfsops, ntfs, VFCF_READONLY); MODULE_VERSION(ntfs, 1); Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c == --- head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Wed Sep 12 03:39:32 2012 (r240378) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Wed Sep 12 03:42:52 2012 (r240379) @@ -422,7 +422,7 @@ static struct vfsops xfs_fsops = { .vfs_extattrctl = _xfs_extattrctl, }; -VFS_SET(xfs_fsops, xfs, 0); +VFS_SET(xfs_fsops, xfs, VFCF_READONLY); /* * Copy GEOM VFS functions here to provide a conveniet place to ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r240380 - stable/9/sys/dev/ixgbe
Author: kevlo Date: Wed Sep 12 04:29:11 2012 New Revision: 240380 URL: http://svn.freebsd.org/changeset/base/240380 Log: MFC r240155: Add missing braces Obtained from:DragonFly Modified: stable/9/sys/dev/ixgbe/ixgbe_82599.c Directory Properties: stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/ixgbe/ixgbe_82599.c == --- stable/9/sys/dev/ixgbe/ixgbe_82599.cWed Sep 12 03:42:52 2012 (r240379) +++ stable/9/sys/dev/ixgbe/ixgbe_82599.cWed Sep 12 04:29:11 2012 (r240380) @@ -868,12 +868,13 @@ s32 ixgbe_setup_mac_link_82599(struct ix link_mode == IXGBE_AUTOC_LMS_KX4_KX_KR_SGMII) { /* Set KX4/KX/KR support according to speed requested */ autoc &= ~(IXGBE_AUTOC_KX4_KX_SUPP_MASK | IXGBE_AUTOC_KR_SUPP); - if (speed & IXGBE_LINK_SPEED_10GB_FULL) + if (speed & IXGBE_LINK_SPEED_10GB_FULL) { if (orig_autoc & IXGBE_AUTOC_KX4_SUPP) autoc |= IXGBE_AUTOC_KX4_SUPP; if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) && (hw->phy.smart_speed_active == FALSE)) autoc |= IXGBE_AUTOC_KR_SUPP; + } if (speed & IXGBE_LINK_SPEED_1GB_FULL) autoc |= IXGBE_AUTOC_KX_SUPP; } else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) && ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r240135 - in head/sys: amd64/conf conf dev/random i386/conf modules/random
On Tue, Sep 11, 2012 at 01:53:45PM -0700, Arthur Mesh wrote: > Funny, I've also implemented RdRand backing for /dev/random over the > weekend, w/o being aware of kib@'s work. Oh well. > > One comment I have: IVY_RNG is potentially not the best name. RdRand > will be available on future architectures, such as Haswell. > > Perhaps RDRAND_RNG would make a better name? Can you submit the desired patch ? pgpsq14P6vpgp.pgp Description: PGP signature