svn commit: r248091 - head/sys/dev/ath
Author: adrian Date: Sat Mar 9 08:50:17 2013 New Revision: 248091 URL: http://svnweb.freebsd.org/changeset/base/248091 Log: Disable the hw TID != buffer TID check. I can 100% reliably trigger this on TID 1 traffic by using iperf -S 32 client fields to create traffic that maps to TID 1. The reference driver doesn't do this check. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cSat Mar 9 06:11:58 2013 (r248090) +++ head/sys/dev/ath/if_ath_tx.cSat Mar 9 08:50:17 2013 (r248091) @@ -4340,12 +4340,23 @@ ath_tx_aggr_comp_aggr(struct ath_softc * __func__, tap-txa_start, tx_ok, ts.ts_status, ts.ts_flags, isaggr, seq_st, hasba, ba[0], ba[1]); + /* +* The reference driver doesn't do this; it simply ignores +* this check in its entirety. +* +* I've seen this occur when using iperf to send traffic +* out tid 1 - the aggregate frames are all marked as TID 1, +* but the TXSTATUS has TID=0. So, let's just ignore this +* check. +*/ +#if 0 /* Occasionally, the MAC sends a tx status for the wrong TID. */ if (tid != ts.ts_tid) { device_printf(sc-sc_dev, %s: tid %d != hw tid %d\n, __func__, tid, ts.ts_tid); tx_ok = 0; } +#endif /* AR5416 BA bug; this requires an interface reset */ if (isaggr tx_ok (! hasba)) { ___ 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: r248092 - head/sys/kern
Author: mav Date: Sat Mar 9 09:07:13 2013 New Revision: 248092 URL: http://svnweb.freebsd.org/changeset/base/248092 Log: Rework overflow checks of r247898 to not let too intelligent compiler to optimize it out. Submitted by: bde Modified: head/sys/kern/kern_event.c head/sys/kern/sys_generic.c Modified: head/sys/kern/kern_event.c == --- head/sys/kern/kern_event.c Sat Mar 9 08:50:17 2013(r248091) +++ head/sys/kern/kern_event.c Sat Mar 9 09:07:13 2013(r248092) @@ -1329,12 +1329,13 @@ kqueue_scan(struct kqueue *kq, int maxev goto done_nl; } if (timespecisset(tsp)) { - if (tsp-tv_sec INT32_MAX) { + if (tsp-tv_sec = INT32_MAX) { rsbt = tstosbt(*tsp); if (TIMESEL(asbt, rsbt)) asbt += tc_tick_sbt; - asbt += rsbt; - if (asbt rsbt) + if (asbt = INT64_MAX - rsbt) + asbt += rsbt; + else asbt = 0; rsbt = tc_precexp; } else Modified: head/sys/kern/sys_generic.c == --- head/sys/kern/sys_generic.c Sat Mar 9 08:50:17 2013(r248091) +++ head/sys/kern/sys_generic.c Sat Mar 9 09:07:13 2013(r248092) @@ -1051,16 +1051,17 @@ kern_select(struct thread *td, int nd, f error = EINVAL; goto done; } - if (rtv.tv_sec == 0 rtv.tv_usec == 0) + if (!timevalisset(rtv)) asbt = 0; - else if (rtv.tv_sec INT32_MAX) { + else if (rtv.tv_sec = INT32_MAX) { rsbt = tvtosbt(rtv); precision = rsbt; precision = tc_precexp; if (TIMESEL(asbt, rsbt)) asbt += tc_tick_sbt; - asbt += rsbt; - if (asbt rsbt) + if (asbt = INT64_MAX - rsbt) + asbt += rsbt; + else asbt = -1; } else asbt = -1; ___ 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: r248093 - head/sys/kern
Author: kib Date: Sat Mar 9 10:16:08 2013 New Revision: 248093 URL: http://svnweb.freebsd.org/changeset/base/248093 Log: Correct the lock class for the vm object lock. Reported and tested by: joel Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c == --- head/sys/kern/subr_witness.cSat Mar 9 09:07:13 2013 (r248092) +++ head/sys/kern/subr_witness.cSat Mar 9 10:16:08 2013 (r248093) @@ -602,7 +602,7 @@ static struct witness_order_list_entry o * VM */ { vm map (user), lock_class_sx }, - { vm object, lock_class_mtx_sleep }, + { vm object, lock_class_rw }, { vm page, lock_class_mtx_sleep }, { vm page queue, lock_class_mtx_sleep }, { pmap pv global, lock_class_rw }, ___ 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: r247910 - head/sys/dev/sound/pci/hda
On Fri, Mar 08, 2013 at 02:00:50AM +, Alexey Dokuchaev wrote: A On Thu, Mar 07, 2013 at 07:54:50AM +, Gleb Smirnoff wrote: A New Revision: 247910 A URL: http://svnweb.freebsd.org/changeset/base/247910 A A Log: APlug a memory leak. A AReviewed by: mav ASponsored by:Nginx, Inc. A A Any MFCs planned? Yes, to stable/9. -- Totus tuus, Glebius. ___ 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: r248096 - svnadmin/conf
Author: gavin Date: Sat Mar 9 12:34:45 2013 New Revision: 248096 URL: http://svnweb.freebsd.org/changeset/base/248096 Log: This file is intended for doc committers to receive src commit email directly, rather than through the svn-src-all mailing lists etc. As such, only current doc committers should be in here, as documented by a comment in the file itself. Remove any committers who no longer hold a doc bit. Some of these entries date back to the CVS days. All of the removed users have been emailed in advance to let them know of this, there was no objection from any of the respondants. Approved by: core (implicit) Modified: svnadmin/conf/access.doc Modified: svnadmin/conf/access.doc == --- svnadmin/conf/access.docSat Mar 9 12:03:08 2013(r248095) +++ svnadmin/conf/access.docSat Mar 9 12:34:45 2013(r248096) @@ -18,10 +18,5 @@ # type of commits. # blackend -chern gjb -jcamou joel -mwlucas -nik -rushani ___ 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: r248097 - in head: . lib/libncp lib/libprocstat share/examples/nwclient sys/fs/nwfs sys/modules/ncp sys/modules/nwfs sys/netncp usr.bin/ncplist usr.bin/ncplogin usr.sbin/mount_nwfs
Author: attilio Date: Sat Mar 9 12:45:36 2013 New Revision: 248097 URL: http://svnweb.freebsd.org/changeset/base/248097 Log: Garbage collect NWFS and NCP bits which are now completely disconnected from the tree since few months. This patch is not targeted for MFC. Deleted: head/lib/libncp/ head/lib/libprocstat/nwfs.c head/share/examples/nwclient/ head/sys/fs/nwfs/ head/sys/modules/ncp/ head/sys/modules/nwfs/ head/sys/netncp/ head/usr.bin/ncplist/ head/usr.bin/ncplogin/ head/usr.sbin/mount_nwfs/ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sat Mar 9 12:34:45 2013(r248096) +++ head/ObsoleteFiles.inc Sat Mar 9 12:45:36 2013(r248097) @@ -38,6 +38,43 @@ # xargs -n1 | sort | uniq -d; # done +# 20130902: NWFS and NCP supports removed +OLD_FILES+=usr/bin/ncplist +OLD_FILES+=usr/bin/ncplogin +OLD_FILES+=usr/bin/ncplogout +OLD_FILES+=usr/include/fs/nwfs/nwfs.h +OLD_FILES+=usr/include/fs/nwfs/nwfs_mount.h +OLD_FILES+=usr/include/fs/nwfs/nwfs_node.h +OLD_FILES+=usr/include/fs/nwfs/nwfs_subr.h +OLD_DIRS+=usr/include/fs/nwfs +OLD_FILES+=usr/include/netncp/ncp.h +OLD_FILES+=usr/include/netncp/ncp_cfg.h +OLD_FILES+=usr/include/netncp/ncp_conn.h +OLD_FILES+=usr/include/netncp/ncp_file.h +OLD_FILES+=usr/include/netncp/ncp_lib.h +OLD_FILES+=usr/include/netncp/ncp_ncp.h +OLD_FILES+=usr/include/netncp/ncp_nls.h +OLD_FILES+=usr/include/netncp/ncp_rcfile.h +OLD_FILES+=usr/include/netncp/ncp_rq.h +OLD_FILES+=usr/include/netncp/ncp_sock.h +OLD_FILES+=usr/include/netncp/ncp_subr.h +OLD_FILES+=usr/include/netncp/ncp_user.h +OLD_FILES+=usr/include/netncp/ncpio.h +OLD_FILES+=usr/include/netncp/nwerror.h +OLD_DIRS+=usr/include/netncp +OLD_FILES+=usr/lib/libncp.a +OLD_FILES+=usr/lib/libncp.so +OLD_LIBS+=usr/lib/libncp.so.4 +OLD_FILES+=usr/lib/libncp_p.a +OLD_FILES+=usr/lib32/libncp.a +OLD_FILES+=usr/lib32/libncp.so +OLD_LIBS+=usr/lib32/libncp.so.4 +OLD_FILES+=usr/lib32/libncp_p.a +OLD_FILES+=usr/sbin/mount_nwfs +OLD_FILES+=usr/share/man/man1/ncplist.1.gz +OLD_FILES+=usr/share/man/man1/ncplogin.1.gz +OLD_FILES+=usr/share/man/man1/ncplogout.1.gz +OLD_FILES+=usr/share/man/man8/mount_nwfs.8.gz # 20130302: NTFS support removed OLD_FILES+=rescue/mount_ntfs OLD_FILES+=sbin/mount_ntfs ___ 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: r248099 - head/sys/fs/smbfs
Author: davide Date: Sat Mar 9 13:05:21 2013 New Revision: 248099 URL: http://svnweb.freebsd.org/changeset/base/248099 Log: - Initialize variable in smbfs_rename() to silent compiler warning - Fix smbfs_mkdir() return value (in case of error). Reported by: pho Modified: head/sys/fs/smbfs/smbfs_vnops.c Modified: head/sys/fs/smbfs/smbfs_vnops.c == --- head/sys/fs/smbfs/smbfs_vnops.c Sat Mar 9 12:51:39 2013 (r248098) +++ head/sys/fs/smbfs/smbfs_vnops.c Sat Mar 9 13:05:21 2013 (r248099) @@ -580,6 +580,7 @@ smbfs_rename(ap) u_int16_t flags = 6; int error=0; + scred = NULL; /* Check for cross-device rename */ if ((fvp-v_mount != tdvp-v_mount) || (tvp (fvp-v_mount != tvp-v_mount))) { @@ -730,7 +731,7 @@ smbfs_mkdir(ap) *ap-a_vpp = vp; out: smbfs_free_scred(scred); - return 0; + return error; } /* ___ 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: r248101 - head/sys/fs/smbfs
Author: davide Date: Sat Mar 9 13:25:45 2013 New Revision: 248101 URL: http://svnweb.freebsd.org/changeset/base/248101 Log: smbfs_lookup() in the DOTDOT case operates on dvp-n_parent without proper locking. This doesn't prevent in any case reclaim of the vnode. Avoid this not going over-the-wire in this case and relying on subsequent smbfs_getattr() call to restore consistency. While I'm here, change a couple of SMBVDEBUG() in MPASS(). sbmfs_smb_lookup() doesn't and shouldn't know about '.' and '..' Reported by: pho's stress2 suite Modified: head/sys/fs/smbfs/smbfs_smb.c head/sys/fs/smbfs/smbfs_vnops.c Modified: head/sys/fs/smbfs/smbfs_smb.c == --- head/sys/fs/smbfs/smbfs_smb.c Sat Mar 9 13:12:12 2013 (r248100) +++ head/sys/fs/smbfs/smbfs_smb.c Sat Mar 9 13:25:45 2013 (r248101) @@ -1455,15 +1455,9 @@ smbfs_smb_lookup(struct smbnode *dnp, co fap-fa_ino = 2; return 0; } - if (nmlen == 1 name[0] == '.') { - error = smbfs_smb_lookup(dnp, NULL, 0, fap, scred); - return error; - } else if (nmlen == 2 name[0] == '.' name[1] == '.') { - error = smbfs_smb_lookup(VTOSMB(dnp-n_parent), NULL, 0, fap, - scred); - printf(%s: knows NOTHING about '..'\n, __func__); - return error; - } + MPASS(!(nmlen == 2 name[0] == '.' name[1] == '.')); + MPASS(!(nmlen == 1 name[0] == '.')); + ASSERT_VOP_ELOCKED(dnp-n_vnode, smbfs_smb_lookup); error = smbfs_findopen(dnp, name, nmlen, SMB_FA_SYSTEM | SMB_FA_HIDDEN | SMB_FA_DIR, scred, ctx); if (error) Modified: head/sys/fs/smbfs/smbfs_vnops.c == --- head/sys/fs/smbfs/smbfs_vnops.c Sat Mar 9 13:12:12 2013 (r248100) +++ head/sys/fs/smbfs/smbfs_vnops.c Sat Mar 9 13:25:45 2013 (r248101) @@ -1204,13 +1204,20 @@ smbfs_lookup(ap) smb_makescred(scred, td, cnp-cn_cred); fap = fattr; if (flags ISDOTDOT) { - error = smbfs_smb_lookup(VTOSMB(dnp-n_parent), NULL, 0, fap, - scred); - SMBVDEBUG(result of dotdot lookup: %d\n, error); - } else { - fap = fattr; + /* +* In the DOTDOT case, don't go over-the-wire +* in order to request attributes. We already +* know it's a directory and subsequent call to +* smbfs_getattr() will restore consistency. +* +*/ + SMBVDEBUG(smbfs_smb_lookup: dotdot\n); + } else if (isdot) { + error = smbfs_smb_lookup(dnp, NULL, 0, fap, scred); + SMBVDEBUG(result of smbfs_smb_lookup: %d\n, error); + } + else { error = smbfs_smb_lookup(dnp, name, nmlen, fap, scred); -/* if (cnp-cn_namelen == 1 cnp-cn_nameptr[0] == '.')*/ SMBVDEBUG(result of smbfs_smb_lookup: %d\n, error); } if (error error != 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: r248102 - head/lib/libutil
Author: db (ports committer) Date: Sat Mar 9 13:30:06 2013 New Revision: 248102 URL: http://svnweb.freebsd.org/changeset/base/248102 Log: commit correct tested fix for gr_util.c Approved by: theraven Modified: head/lib/libutil/gr_util.c Modified: head/lib/libutil/gr_util.c == --- head/lib/libutil/gr_util.c Sat Mar 9 13:25:45 2013(r248101) +++ head/lib/libutil/gr_util.c Sat Mar 9 13:30:06 2013(r248102) @@ -50,7 +50,7 @@ static char group_file[PATH_MAX]; static char tempname[PATH_MAX]; static int initialized; static size_t grmemlen(const struct group *, const char *, int *); -static struct group *grcopy(const struct group *gr, struct group *newgr, const char *, int ndx); +static struct group *grcopy(const struct group *gr, char *mem, const char *, int ndx); /* * Initialize statics @@ -361,26 +361,30 @@ gr_equal(const struct group *gr1, const if (gr1-gr_gid != gr2-gr_gid) return (false); - /* Check all members in both groups. */ - if (gr1-gr_mem == NULL || gr2-gr_mem == NULL) { - if (gr1-gr_mem != gr2-gr_mem) - return (false); - } else { - for (gr1_ndx = 0; gr1-gr_mem[gr1_ndx] != NULL; gr1_ndx++) { - for (gr2_ndx = 0;; gr2_ndx++) { - if (gr2-gr_mem[gr2_ndx] == NULL) - return (false); - if (strcmp(gr1-gr_mem[gr1_ndx], - gr2-gr_mem[gr2_ndx]) == 0) { - break; - } - } - } - - /* Check that group2 does not have more members than group1. */ - if (gr2-gr_mem[gr1_ndx] != NULL) - return (false); - } + /* Check all members in both groups. +* getgrnam can return gr_mem with a pointer to NULL. +* gr_dup and gr_add strip out this superfluous NULL, setting +* gr_mem to NULL for no members. + */ + if (gr1-gr_mem != NULL gr2-gr_mem != NULL) { + int i; + + for (i = 0; gr1-gr_mem[i] != NULL; i++) { + if (strcmp(gr1-gr_mem[i], gr2-gr_mem[i]) != 0) + return (false); + } + } + /* Count number of members in both structs */ + gr2_ndx = 0; + if (gr2-gr_mem != NULL) + for(; gr2-gr_mem[gr2_ndx] != NULL; gr2_ndx++) + /* empty */; + gr1_ndx = 0; + if (gr1-gr_mem != NULL) + for(; gr1-gr_mem[gr1_ndx] != NULL; gr1_ndx++) + /* empty */; + if (gr1_ndx != gr2_ndx) + return (false); return (true); } @@ -439,21 +443,21 @@ gr_dup(const struct group *gr) struct group * gr_add(const struct group *gr, const char *newmember) { - struct group *newgr; + char *mem; size_t len; int num_mem; num_mem = 0; len = grmemlen(gr, newmember, num_mem); /* Create new group and copy old group into it. */ - if ((newgr = malloc(len)) == NULL) + if ((mem = malloc(len)) == NULL) return (NULL); - return (grcopy(gr, newgr, newmember, num_mem)); + return (grcopy(gr, mem, newmember, num_mem)); } /* It is safer to walk the pointers given at gr_mem since there is no - * guarantee the gr_mem + strings are continguous in the given struct group - * but compact the new group into the following form. + * guarantee the gr_mem + strings are contiguous in the given struct group + * but compactify the new group into the following form. * * The new struct is laid out like this in memory. The example given is * for a group with two members only. @@ -474,23 +478,21 @@ gr_add(const struct group *gr, const cha * } */ /* - * Copy the guts of a group plus given name to a preallocated group struct + * Copy the contents of a group plus given name to a preallocated group struct */ static struct group * -grcopy(const struct group *gr, struct group *newgr, const char *name, int ndx) +grcopy(const struct group *gr, char *dst, const char *name, int ndx) { - char *dst; int i; + struct group *newgr; - if (name != NULL) - ndx++; - /* point new gr_mem to end of struct + 1 if there are names */ - if (ndx != 0) - newgr-gr_mem = (char **)(newgr + 1); - else + newgr = (struct group *)(void *)dst;/* avoid alignment warning */ + dst += sizeof(*newgr); + if (ndx != 0) { + newgr-gr_mem = (char **)(void *)(dst); /* avoid alignment warning */ + dst += (ndx + 1) * sizeof(*newgr-gr_mem); + } else newgr-gr_mem = NULL; - /* point dst after the end of all the
Re: svn commit: r248097 - in head: . lib/libncp lib/libprocstat share/examples/nwclient sys/fs/nwfs sys/modules/ncp sys/modules/nwfs sys/netncp usr.bin/ncplist usr.bin/ncplogin usr.sbin/mount_nwfs
Hi Attilio: It's really great to see the continued progress towards the goal entirely-MPSAFE VFS in 10.x -- we owe you a huge vote of thanks for pursuing this! Robert N M Watson Computer Laboratory University of Cambridge On Sat, 9 Mar 2013, Attilio Rao wrote: Author: attilio Date: Sat Mar 9 12:45:36 2013 New Revision: 248097 URL: http://svnweb.freebsd.org/changeset/base/248097 Log: Garbage collect NWFS and NCP bits which are now completely disconnected from the tree since few months. This patch is not targeted for MFC. Deleted: head/lib/libncp/ head/lib/libprocstat/nwfs.c head/share/examples/nwclient/ head/sys/fs/nwfs/ head/sys/modules/ncp/ head/sys/modules/nwfs/ head/sys/netncp/ head/usr.bin/ncplist/ head/usr.bin/ncplogin/ head/usr.sbin/mount_nwfs/ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sat Mar 9 12:34:45 2013(r248096) +++ head/ObsoleteFiles.inc Sat Mar 9 12:45:36 2013(r248097) @@ -38,6 +38,43 @@ # xargs -n1 | sort | uniq -d; # done +# 20130902: NWFS and NCP supports removed +OLD_FILES+=usr/bin/ncplist +OLD_FILES+=usr/bin/ncplogin +OLD_FILES+=usr/bin/ncplogout +OLD_FILES+=usr/include/fs/nwfs/nwfs.h +OLD_FILES+=usr/include/fs/nwfs/nwfs_mount.h +OLD_FILES+=usr/include/fs/nwfs/nwfs_node.h +OLD_FILES+=usr/include/fs/nwfs/nwfs_subr.h +OLD_DIRS+=usr/include/fs/nwfs +OLD_FILES+=usr/include/netncp/ncp.h +OLD_FILES+=usr/include/netncp/ncp_cfg.h +OLD_FILES+=usr/include/netncp/ncp_conn.h +OLD_FILES+=usr/include/netncp/ncp_file.h +OLD_FILES+=usr/include/netncp/ncp_lib.h +OLD_FILES+=usr/include/netncp/ncp_ncp.h +OLD_FILES+=usr/include/netncp/ncp_nls.h +OLD_FILES+=usr/include/netncp/ncp_rcfile.h +OLD_FILES+=usr/include/netncp/ncp_rq.h +OLD_FILES+=usr/include/netncp/ncp_sock.h +OLD_FILES+=usr/include/netncp/ncp_subr.h +OLD_FILES+=usr/include/netncp/ncp_user.h +OLD_FILES+=usr/include/netncp/ncpio.h +OLD_FILES+=usr/include/netncp/nwerror.h +OLD_DIRS+=usr/include/netncp +OLD_FILES+=usr/lib/libncp.a +OLD_FILES+=usr/lib/libncp.so +OLD_LIBS+=usr/lib/libncp.so.4 +OLD_FILES+=usr/lib/libncp_p.a +OLD_FILES+=usr/lib32/libncp.a +OLD_FILES+=usr/lib32/libncp.so +OLD_LIBS+=usr/lib32/libncp.so.4 +OLD_FILES+=usr/lib32/libncp_p.a +OLD_FILES+=usr/sbin/mount_nwfs +OLD_FILES+=usr/share/man/man1/ncplist.1.gz +OLD_FILES+=usr/share/man/man1/ncplogin.1.gz +OLD_FILES+=usr/share/man/man1/ncplogout.1.gz +OLD_FILES+=usr/share/man/man8/mount_nwfs.8.gz # 20130302: NTFS support removed OLD_FILES+=rescue/mount_ntfs OLD_FILES+=sbin/mount_ntfs ___ 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: r248104 - head/sys/dev/ichwd
Author: markj Date: Sat Mar 9 15:04:44 2013 New Revision: 248104 URL: http://svnweb.freebsd.org/changeset/base/248104 Log: Don't log a message when the watchdog is reloaded. It's not useful to do so and these messages flood the log when bootverbose is enabled. Approved by: rstone (co-mentor) Modified: head/sys/dev/ichwd/ichwd.c Modified: head/sys/dev/ichwd/ichwd.c == --- head/sys/dev/ichwd/ichwd.c Sat Mar 9 14:34:53 2013(r248103) +++ head/sys/dev/ichwd/ichwd.c Sat Mar 9 15:04:44 2013(r248104) @@ -323,8 +323,6 @@ ichwd_tmr_reload(struct ichwd_softc *sc) ichwd_write_tco_1(sc, TCO_RLD, 1); else ichwd_write_tco_2(sc, TCO_RLD, 1); - - ichwd_verbose_printf(sc-device, timer reloaded\n); } /* ___ 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: r248097 - in head: . lib/libncp lib/libprocstat share/examples/nwclient sys/fs/nwfs sys/modules/ncp sys/modules/nwfs sys/netncp usr.bin/ncplist usr.bin/ncplogin usr.sbin/mount_nwfs
On Sat, Mar 9, 2013 at 4:02 PM, Robert Watson rwat...@freebsd.org wrote: Hi Attilio: It's really great to see the continued progress towards the goal entirely-MPSAFE VFS in 10.x -- we owe you a huge vote of thanks for pursuing this! Thanks for the kind words. The VFS can be considered completely MPSAFE by date, the only remaining thing to do is sweeping out smbfs/netsmb. However a known FreeBSD shops has patches to make smbfs MPSAFE and I'd rather give them more time to commit them and re-add smbfs as a MPSAFE filesystem rather than get into their way and remove the support. This is the last bit to sort out. Attilio -- Peace can only be achieved by understanding - A. Einstein ___ 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: r248105 - head/sys/kern
Author: attilio Date: Sat Mar 9 15:31:19 2013 New Revision: 248105 URL: http://svnweb.freebsd.org/changeset/base/248105 Log: Improve UMTX_PROFILING: - Use u_int values for length and max_length values - Add a way to reset the max_length heuristic in order to have the possibility to reuse the mechanism consecutively without rebooting the machine - Add a way to quick display top5 contented buckets in the system for the max_length value. This should give a quick overview on the quality of the hash table distribution. Sponsored by: EMC / Isilon storage division Reviewed by: jeff, davide Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c == --- head/sys/kern/kern_umtx.c Sat Mar 9 15:04:44 2013(r248104) +++ head/sys/kern/kern_umtx.c Sat Mar 9 15:31:19 2013(r248105) @@ -39,6 +39,7 @@ __FBSDID($FreeBSD$); #include sys/mutex.h #include sys/priv.h #include sys/proc.h +#include sys/sbuf.h #include sys/sched.h #include sys/smp.h #include sys/sysctl.h @@ -64,6 +65,11 @@ __FBSDID($FreeBSD$); #define _UMUTEX_TRY1 #define _UMUTEX_WAIT 2 +#ifdef UMTX_PROFILING +#defineUPROF_PERC_BIGGER(w, f, sw, sf) \ + (((w) (sw)) || ((w) == (sw) (f) (sf))) +#endif + /* Priority inheritance mutex info. */ struct umtx_pi { /* Owner thread */ @@ -157,8 +163,8 @@ struct umtxq_chain { TAILQ_HEAD(,umtx_pi)uc_pi_list; #ifdef UMTX_PROFILING - int length; - int max_length; + u_int length; + u_int max_length; #endif }; @@ -252,6 +258,117 @@ umtx_init_profiling(void) max_length1, CTLFLAG_RD, umtxq_chains[1][i].max_length, 0, NULL); } } + +static int +sysctl_debug_umtx_chains_peaks(SYSCTL_HANDLER_ARGS) +{ + char buf[512]; + struct sbuf sb; + struct umtxq_chain *uc; + u_int fract, i, j, tot, whole; + u_int sf0, sf1, sf2, sf3, sf4; + u_int si0, si1, si2, si3, si4; + u_int sw0, sw1, sw2, sw3, sw4; + + sbuf_new(sb, buf, sizeof(buf), SBUF_FIXEDLEN); + for (i = 0; i 2; i++) { + tot = 0; + for (j = 0; j UMTX_CHAINS; ++j) { + uc = umtxq_chains[i][j]; + mtx_lock(uc-uc_lock); + tot += uc-max_length; + mtx_unlock(uc-uc_lock); + } + if (tot == 0) + sbuf_printf(sb, %u) Empty , i); + else { + sf0 = sf1 = sf2 = sf3 = sf4 = 0; + si0 = si1 = si2 = si3 = si4 = 0; + sw0 = sw1 = sw2 = sw3 = sw4 = 0; + for (j = 0; j UMTX_CHAINS; j++) { + uc = umtxq_chains[i][j]; + mtx_lock(uc-uc_lock); + whole = uc-max_length * 100; + mtx_unlock(uc-uc_lock); + fract = (whole % tot) * 100; + if (UPROF_PERC_BIGGER(whole, fract, sw0, sf0)) { + sf0 = fract; + si0 = j; + sw0 = whole; + } else if (UPROF_PERC_BIGGER(whole, fract, sw1, + sf1)) { + sf1 = fract; + si1 = j; + sw1 = whole; + } else if (UPROF_PERC_BIGGER(whole, fract, sw2, + sf2)) { + sf2 = fract; + si2 = j; + sw2 = whole; + } else if (UPROF_PERC_BIGGER(whole, fract, sw3, + sf3)) { + sf3 = fract; + si3 = j; + sw3 = whole; + } else if (UPROF_PERC_BIGGER(whole, fract, sw4, + sf4)) { + sf4 = fract; + si4 = j; + sw4 = whole; + } + } + sbuf_printf(sb, queue %u:\n, i); + sbuf_printf(sb, 1st: %u.%u%% idx: %u\n, sw0 / tot, + sf0 / tot, si0); + sbuf_printf(sb, 2nd: %u.%u%% idx: %u\n, sw1 / tot, + sf1 / tot, si1); + sbuf_printf(sb, 3rd: %u.%u%% idx:
svn commit: r248106 - head/sys/net80211
Author: adrian Date: Sat Mar 9 15:35:31 2013 New Revision: 248106 URL: http://svnweb.freebsd.org/changeset/base/248106 Log: Fix another compiler warning issue when invariants are disabled. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c == --- head/sys/net80211/ieee80211_output.cSat Mar 9 15:31:19 2013 (r248105) +++ head/sys/net80211/ieee80211_output.cSat Mar 9 15:35:31 2013 (r248106) @@ -597,10 +597,9 @@ ieee80211_send_setup( struct ieee80211vap *vap = ni-ni_vap; struct ieee80211_tx_ampdu *tap; struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); - struct ieee80211com *ic = ni-ni_ic; ieee80211_seq seqno; - IEEE80211_TX_LOCK_ASSERT(ic); + IEEE80211_TX_LOCK_ASSERT(ni-ni_ic); wh-i_fc[0] = IEEE80211_FC0_VERSION_0 | type; if ((type IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_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
Re: svn commit: r248097 - in head: . lib/libncp lib/libprocstat share/examples/nwclient sys/fs/nwfs sys/modules/ncp sys/modules/nwfs sys/netncp usr.bin/ncplist usr.bin/ncplogin usr.sbin/mount_nwfs
On Sat, Mar 09, 2013 at 04:17:56PM +0100, Attilio Rao wrote: On Sat, Mar 9, 2013 at 4:02 PM, Robert Watson rwat...@freebsd.org wrote: Hi Attilio: It's really great to see the continued progress towards the goal entirely-MPSAFE VFS in 10.x -- we owe you a huge vote of thanks for pursuing this! Thanks for the kind words. The VFS can be considered completely MPSAFE by date, the only remaining thing to do is sweeping out smbfs/netsmb. However a known FreeBSD shops has patches to make smbfs MPSAFE and I'd rather give them more time to commit them and re-add smbfs as a MPSAFE filesystem rather than get into their way and remove the support. Have they given you any ETA for this? 10.0 is approaching ... :-) -- Joel ___ 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: r248097 - in head: . lib/libncp lib/libprocstat share/examples/nwclient sys/fs/nwfs sys/modules/ncp sys/modules/nwfs sys/netncp usr.bin/ncplist usr.bin/ncplogin usr.sbin/mount_nwfs
On Sat, Mar 9, 2013 at 5:29 PM, Joel Dahl j...@vnode.se wrote: On Sat, Mar 09, 2013 at 04:17:56PM +0100, Attilio Rao wrote: On Sat, Mar 9, 2013 at 4:02 PM, Robert Watson rwat...@freebsd.org wrote: Hi Attilio: It's really great to see the continued progress towards the goal entirely-MPSAFE VFS in 10.x -- we owe you a huge vote of thanks for pursuing this! Thanks for the kind words. The VFS can be considered completely MPSAFE by date, the only remaining thing to do is sweeping out smbfs/netsmb. However a known FreeBSD shops has patches to make smbfs MPSAFE and I'd rather give them more time to commit them and re-add smbfs as a MPSAFE filesystem rather than get into their way and remove the support. Have they given you any ETA for this? 10.0 is approaching ... :-) -- Joel I'm working on this right now and should be addressed in few days. Thanks, -- Davide There are no solved problems; there are only problems that are more or less solved -- Henri Poincare ___ 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: r248109 - head/sys/netsmb
Author: davide Date: Sat Mar 9 16:58:19 2013 New Revision: 248109 URL: http://svnweb.freebsd.org/changeset/base/248109 Log: Call make_dev_credf() rather than using the couple make_dev()/dev_ref(). This closes a race with clone_cleanup(). Modified: head/sys/netsmb/smb_dev.c Modified: head/sys/netsmb/smb_dev.c == --- head/sys/netsmb/smb_dev.c Sat Mar 9 16:11:29 2013(r248108) +++ head/sys/netsmb/smb_dev.c Sat Mar 9 16:58:19 2013(r248109) @@ -107,14 +107,9 @@ nsmb_dev_clone(void *arg, struct ucred * else if (dev_stdclone(name, NULL, NSMB_NAME, u) != 1) return; i = clone_create(nsmb_clones, nsmb_cdevsw, u, dev, 0); - if (i) { - *dev = make_dev(nsmb_cdevsw, u, UID_ROOT, GID_WHEEL, 0600, - %s%d, NSMB_NAME, u); - if (*dev != NULL) { - dev_ref(*dev); - (*dev)-si_flags |= SI_CHEAPCLONE; - } - } + if (i) + *dev = make_dev_credf(MAKEDEV_REF, nsmb_cdevsw, u, cred, + UID_ROOT, GID_WHEEL, 0600, %s%d, NSMB_NAME, u); } static int ___ 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: r248112 - head/usr.bin/netstat
Author: melifaro Date: Sat Mar 9 20:01:35 2013 New Revision: 248112 URL: http://svnweb.freebsd.org/changeset/base/248112 Log: Document netstat -Q flags meaning. MFC after:1 week Modified: head/usr.bin/netstat/netstat.1 Modified: head/usr.bin/netstat/netstat.1 == --- head/usr.bin/netstat/netstat.1 Sat Mar 9 18:40:37 2013 (r248111) +++ head/usr.bin/netstat/netstat.1 Sat Mar 9 20:01:35 2013 (r248112) @@ -28,7 +28,7 @@ .\@(#)netstat.1 8.8 (Berkeley) 4/18/94 .\ $FreeBSD$ .\ -.Dd February 22, 2010 +.Dd March 10, 2013 .Dt NETSTAT 1 .Os .Sh NAME @@ -301,6 +301,11 @@ is repeated, counters with a value of ze Show .Xr netisr 9 statistics. +The flags field shows available ISR handlers: +.Bl -column .Li W .Dv NETISR_SNP_FLAGS_DRAINEDCPU +.It Li C Ta Dv NETISR_SNP_FLAGS_M2CPUID Ta Able to map mbuf to cpu id +.It Li D Ta Dv NETISR_SNP_FLAGS_DRAINEDCPU Ta Has queue drain handler +.It Li F Ta Dv NETISR_SNP_FLAGS_M2FLOW Ta Able to map mbuf to flow id .El .Pp Some options have the general meaning: ___ 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: r248113 - head/sys/kern
Author: davide Date: Sat Mar 9 20:03:10 2013 New Revision: 248113 URL: http://svnweb.freebsd.org/changeset/base/248113 Log: Fixup r248032: Change size requested to malloc(9) now that callwheel buckets are callout_list and not callout_tailq anymore. This change was already there but it seems it got lost after code churn in r248032. Reported by: alc, kib Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c == --- head/sys/kern/kern_timeout.cSat Mar 9 20:01:35 2013 (r248112) +++ head/sys/kern/kern_timeout.cSat Mar 9 20:03:10 2013 (r248113) @@ -294,7 +294,7 @@ callout_cpu_init(struct callout_cpu *cc) mtx_init(cc-cc_lock, callout, NULL, MTX_SPIN | MTX_RECURSE); SLIST_INIT(cc-cc_callfree); - cc-cc_callwheel = malloc(sizeof(struct callout_tailq) * callwheelsize, + cc-cc_callwheel = malloc(sizeof(struct callout_list) * callwheelsize, M_CALLOUT, M_WAITOK); for (i = 0; i callwheelsize; i++) LIST_INIT(cc-cc_callwheel[i]); ___ 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: r248115 - stable/9/usr.sbin/sysinstall
Author: gjb (doc,ports committer) Date: Sat Mar 9 21:21:30 2013 New Revision: 248115 URL: http://svnweb.freebsd.org/changeset/base/248115 Log: Update ports count and size in sysinstall(8). This is a direct commit to stable/9. Submitted by: ryusuke Approved by: kib (implicit) Modified: stable/9/usr.sbin/sysinstall/dist.c Modified: stable/9/usr.sbin/sysinstall/dist.c == --- stable/9/usr.sbin/sysinstall/dist.c Sat Mar 9 20:04:47 2013 (r248114) +++ stable/9/usr.sbin/sysinstall/dist.c Sat Mar 9 21:21:30 2013 (r248115) @@ -280,8 +280,8 @@ distMaybeSetPorts(dialogMenuItem *self) { dialog_clear_norefresh(); if (!msgYesNo(Would you like to install the FreeBSD ports collection?\n\n - This will give you ready access to over 19,000 ported software packages,\n - at a cost of around 445MB of disk space when \clean\ and possibly\n + This will give you ready access to over 24,000 ported software packages,\n + at a cost of around 500MB of disk space when \clean\ and possibly\n much more than that when a lot of the distribution tarballs are loaded\n (unless you have the extra discs available from a FreeBSD CD/DVD distribution\n and can mount them on /cdrom, in which case this is far less of a problem).\n\n ___ 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: r248116 - stable/8/usr.sbin/sysinstall
Author: gjb (doc,ports committer) Date: Sat Mar 9 21:21:47 2013 New Revision: 248116 URL: http://svnweb.freebsd.org/changeset/base/248116 Log: Update ports count and size in sysinstall(8). This is a direct commit to stable/8. Submitted by: ryusuke Approved by: re (kib) Modified: stable/8/usr.sbin/sysinstall/dist.c Modified: stable/8/usr.sbin/sysinstall/dist.c == --- stable/8/usr.sbin/sysinstall/dist.c Sat Mar 9 21:21:30 2013 (r248115) +++ stable/8/usr.sbin/sysinstall/dist.c Sat Mar 9 21:21:47 2013 (r248116) @@ -289,8 +289,8 @@ distMaybeSetPorts(dialogMenuItem *self) { dialog_clear_norefresh(); if (!msgYesNo(Would you like to install the FreeBSD ports collection?\n\n - This will give you ready access to over 19,000 ported software packages,\n - at a cost of around 445MB of disk space when \clean\ and possibly\n + This will give you ready access to over 24,000 ported software packages,\n + at a cost of around 500MB of disk space when \clean\ and possibly\n much more than that when a lot of the distribution tarballs are loaded\n (unless you have the extra discs available from a FreeBSD CD/DVD distribution\n and can mount them on /cdrom, in which case this is far less of a problem).\n\n ___ 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: r248117 - head/sys/vm
Author: alc Date: Sat Mar 9 21:32:24 2013 New Revision: 248117 URL: http://svnweb.freebsd.org/changeset/base/248117 Log: Update a comment: The object lock is no longer a mutex. Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Sat Mar 9 21:21:47 2013(r248116) +++ head/sys/vm/vm_page.c Sat Mar 9 21:32:24 2013(r248117) @@ -73,7 +73,7 @@ * * The page daemon can acquire and hold any pair of page queue * locks in any order. * - * - The object mutex is held when inserting or removing + * - The object lock is required when inserting or removing * pages from an object (vm_page_insert() or vm_page_remove()). * */ ___ 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: r248118 - head/sys/boot/common
Author: ian Date: Sat Mar 9 23:05:19 2013 New Revision: 248118 URL: http://svnweb.freebsd.org/changeset/base/248118 Log: Since ubldr doesn't necessarily load a kernel at the physical address in the elf headers, mask out the high nibble of that address. This effectly makes the entry point the offset from the load address, and it gets adjusted for the actual load address before jumping to it. Masking the high nibble makes assumptions about memory layout that are true for all the arm platforms we support right now, but it makes me uneasy. This needs to be revisited. Modified: head/sys/boot/common/load_elf.c Modified: head/sys/boot/common/load_elf.c == --- head/sys/boot/common/load_elf.c Sat Mar 9 21:32:24 2013 (r248117) +++ head/sys/boot/common/load_elf.c Sat Mar 9 23:05:19 2013 (r248118) @@ -297,15 +297,16 @@ __elfN(loadimage)(struct preloaded_file * the MI code below uses the p_vaddr fields with an offset added for * loading (doing so is arguably wrong). To make loading work, we need * an offset that represents the difference between physical and virtual -* addressing. ARM kernels are always linked at 0xC000. Depending +* addressing. ARM kernels are always linked at 0xCnnn. Depending * on the headers, the offset value passed in may be physical or virtual * (because it typically comes from e_entry), but we always replace * whatever is passed in with the va-pa offset. On the other hand, we -* only adjust the entry point if it's a virtual address to begin with. +* always remove the high-order part of the entry address whether it's +* physical or virtual, because it will be adjusted later for the actual +* physical entry point based on where the image gets loaded. */ - off = -0xc000u; - if ((ehdr-e_entry 0xc000u) == 0xc000u) - ehdr-e_entry += off; + off = -0xc000; + ehdr-e_entry = ~0xf000; #ifdef ELF_VERBOSE printf(ehdr-e_entry 0x%08x, va-pa off %llx\n, ehdr-e_entry, off); #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: r248119 - in head/sys/arm: arm include
Author: andrew Date: Sat Mar 9 23:55:23 2013 New Revision: 248119 URL: http://svnweb.freebsd.org/changeset/base/248119 Log: __FreeBSD_ARCH_armv6__ is undefined on clang. We can use __ARM_ARCH in it's place. This makes 'uname -p' correctly output 'armv6' on a kernel built with clang. Modified: head/sys/arm/arm/disassem.c head/sys/arm/include/param.h Modified: head/sys/arm/arm/disassem.c == --- head/sys/arm/arm/disassem.c Sat Mar 9 23:05:19 2013(r248118) +++ head/sys/arm/arm/disassem.c Sat Mar 9 23:55:23 2013(r248119) @@ -130,7 +130,7 @@ static const struct arm32_insn arm32_i[] { 0x0c50, 0x0410, ldr, daW }, { 0x0c50, 0x0440, strb, daW }, { 0x0c50, 0x0450, ldrb, daW }, -#ifdef __FreeBSD_ARCH_armv6__ +#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) __ARM_ARCH = 6) { 0x, 0xf57ff01f, clrex, c }, { 0x0ff00ff0, 0x01800f90, strex, dmo }, { 0x0ff00fff, 0x01900f9f, ldrex, do }, Modified: head/sys/arm/include/param.h == --- head/sys/arm/include/param.hSat Mar 9 23:05:19 2013 (r248118) +++ head/sys/arm/include/param.hSat Mar 9 23:55:23 2013 (r248119) @@ -56,7 +56,7 @@ #defineMACHINE arm #endif #ifndef MACHINE_ARCH -#ifdef __FreeBSD_ARCH_armv6__ +#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) __ARM_ARCH = 6) #ifdef __ARMEB__ #defineMACHINE_ARCHarmv6eb #else ___ 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: r248120 - stable/8/lib/libutil
Author: bapt Date: Sun Mar 10 00:36:28 2013 New Revision: 248120 URL: http://svnweb.freebsd.org/changeset/base/248120 Log: MFC r237268 Revert user comparison back to user names as some user can share uids (root/toor for example) get the username information from old_pw structures to still allow renaming of a user. Approved by: re (jpaetzel) Modified: stable/8/lib/libutil/pw_util.c Directory Properties: stable/8/lib/libutil/ (props changed) Modified: stable/8/lib/libutil/pw_util.c == --- stable/8/lib/libutil/pw_util.c Sat Mar 9 23:55:23 2013 (r248119) +++ stable/8/lib/libutil/pw_util.c Sun Mar 10 00:36:28 2013 (r248120) @@ -436,14 +436,21 @@ pw_copy(int ffd, int tfd, const struct p size_t len; int eof, readlen; - spw = pw; + if (old_pw == NULL pw == NULL) + return (-1); + + spw = old_pw; + /* deleting a user */ if (pw == NULL) { line = NULL; - if (old_pw == NULL) + } else { + if ((line = pw_make(pw)) == NULL) return (-1); - spw = old_pw; - } else if ((line = pw_make(pw)) == NULL) - return (-1); + } + + /* adding a user */ + if (spw == NULL) + spw = pw; eof = 0; len = 0; @@ -510,7 +517,7 @@ pw_copy(int ffd, int tfd, const struct p */ *q = t; - if (fpw == NULL || fpw-pw_uid != spw-pw_uid) { + if (fpw == NULL || strcmp(fpw-pw_name, spw-pw_name) != 0) { /* nope */ if (fpw != NULL) free(fpw); ___ 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: r248121 - in head/sys/boot: common fdt
Author: ian Date: Sun Mar 10 00:43:01 2013 New Revision: 248121 URL: http://svnweb.freebsd.org/changeset/base/248121 Log: Attach the elf section headers to the loaded kernel as metadata, so they can easily be used by later post-processing. When searching for a compiled-in fdt blob, use the section headers to get the size and location of the .dynsym section to do a symbol search. This fixes a problem where the search could overshoot the symbol table and wander into the string table. Sometimes that was harmless and sometimes it lead to spurious panic messages about an offset bigger than the module size. Modified: head/sys/boot/common/load_elf.c head/sys/boot/fdt/fdt_loader_cmd.c Modified: head/sys/boot/common/load_elf.c == --- head/sys/boot/common/load_elf.c Sun Mar 10 00:36:28 2013 (r248120) +++ head/sys/boot/common/load_elf.c Sun Mar 10 00:43:01 2013 (r248121) @@ -397,6 +397,8 @@ __elfN(loadimage)(struct preloaded_file _loadimage: failed to read section headers); goto nosyms; } +file_addmetadata(fp, MODINFOMD_SHDR, chunk, shdr); + symtabindex = -1; symstrindex = -1; for (i = 0; i ehdr-e_shnum; i++) { Modified: head/sys/boot/fdt/fdt_loader_cmd.c == --- head/sys/boot/fdt/fdt_loader_cmd.c Sun Mar 10 00:36:28 2013 (r248120) +++ head/sys/boot/fdt/fdt_loader_cmd.c Sun Mar 10 00:43:01 2013 (r248121) @@ -118,16 +118,17 @@ static char cwd[FDT_CWD_LEN] = /; static vm_offset_t fdt_find_static_dtb() { - Elf_Dyn dyn; + Elf_Ehdr *ehdr; + Elf_Shdr *shdr; Elf_Sym sym; - vm_offset_t dyntab, esym, strtab, symtab, fdt_start; + vm_offset_t strtab, symtab, fdt_start; uint64_t offs; struct preloaded_file *kfp; struct file_metadata *md; char *strp; - int sym_count; + int i, sym_count; - symtab = strtab = dyntab = esym = 0; + symtab = strtab = 0; strp = NULL; offs = __elfN(relocation_offset); @@ -136,42 +137,26 @@ fdt_find_static_dtb() if (kfp == NULL) return (0); - md = file_findmetadata(kfp, MODINFOMD_ESYM); + /* Locate the dynamic symbols and strtab. */ + md = file_findmetadata(kfp, MODINFOMD_ELFHDR); if (md == NULL) return (0); - bcopy(md-md_data, esym, sizeof(esym)); - /* esym is already offset */ + ehdr = (Elf_Ehdr *)md-md_data; - md = file_findmetadata(kfp, MODINFOMD_DYNAMIC); + md = file_findmetadata(kfp, MODINFOMD_SHDR); if (md == NULL) return (0); - bcopy(md-md_data, dyntab, sizeof(dyntab)); - dyntab += offs; + shdr = (Elf_Shdr *)md-md_data; - /* Locate STRTAB and DYNTAB */ - for (;;) { - COPYOUT(dyntab, dyn, sizeof(dyn)); - if (dyn.d_tag == DT_STRTAB) { - strtab = (vm_offset_t)(dyn.d_un.d_ptr) + offs; - } else if (dyn.d_tag == DT_SYMTAB) { - symtab = (vm_offset_t)(dyn.d_un.d_ptr) + offs; - } else if (dyn.d_tag == DT_NULL) { - break; + for (i = 0; i ehdr-e_shnum; ++i) { + if (shdr[i].sh_type == SHT_DYNSYM symtab == 0) { + symtab = shdr[i].sh_addr + offs; + sym_count = shdr[i].sh_size / sizeof(Elf_Sym); + } else if (shdr[i].sh_type == SHT_STRTAB strtab == 0) { + strtab = shdr[i].sh_addr + offs; } - dyntab += sizeof(dyn); } - if (symtab == 0 || strtab == 0) { - /* -* No symtab? No strtab? That should not happen here, -* and should have been verified during __elfN(loadimage). -* This must be some kind of a bug. -*/ - return (0); - } - - sym_count = (int)(esym - symtab) / sizeof(Elf_Sym); - /* * The most efficent way to find a symbol would be to calculate a * hash, find proper bucket and chain, and thus find a symbol. ___ 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: r248122 - head/sys/conf
Author: andrew Date: Sun Mar 10 00:47:19 2013 New Revision: 248122 URL: http://svnweb.freebsd.org/changeset/base/248122 Log: Correctly align the unwind tables. Without this clang may incorrectly align them causing an alignment fault when producing a backtrace. Modified: head/sys/conf/ldscript.arm Modified: head/sys/conf/ldscript.arm == --- head/sys/conf/ldscript.arm Sun Mar 10 00:43:01 2013(r248121) +++ head/sys/conf/ldscript.arm Sun Mar 10 00:47:19 2013(r248122) @@ -56,6 +56,7 @@ SECTIONS .init : { *(.init) } =0x9090 .plt : { *(.plt)} + . = ALIGN(4); _extab_start = .; PROVIDE(extab_start = .); .ARM.extab : { *(.ARM.extab) } ___ 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: r248123 - head/sys/arm/arm
Author: andrew Date: Sun Mar 10 02:38:35 2013 New Revision: 248123 URL: http://svnweb.freebsd.org/changeset/base/248123 Log: Tell the unwinder we can't unwind swi_entry. This fixes an infinite loop when the kernel attempts to unwind through this function. The .fnstart and .fnend in this function should be moved to macros but we are currently missing an END macro on ARM. Modified: head/sys/arm/arm/exception.S Modified: head/sys/arm/arm/exception.S == --- head/sys/arm/arm/exception.SSun Mar 10 00:47:19 2013 (r248122) +++ head/sys/arm/arm/exception.SSun Mar 10 02:38:35 2013 (r248123) @@ -77,6 +77,9 @@ Lreset_panicmsg: * Handler for the Software Interrupt exception. */ ASENTRY_NP(swi_entry) + .fnstart + .cantunwind /* Don't unwind past here */ + PUSHFRAME mov r0, sp /* Pass the frame to any function */ @@ -88,6 +91,7 @@ ASENTRY_NP(swi_entry) DO_AST PULLFRAME movspc, lr /* Exit */ + .fnend /* * prefetch_abort_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: r248124 - head/sys/arm/arm
Author: andrew Date: Sun Mar 10 02:40:50 2013 New Revision: 248124 URL: http://svnweb.freebsd.org/changeset/base/248124 Log: Update how we read the stack pointer to work on both GCC and clang. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c == --- head/sys/arm/arm/db_trace.c Sun Mar 10 02:38:35 2013(r248123) +++ head/sys/arm/arm/db_trace.c Sun Mar 10 02:40:50 2013(r248124) @@ -612,10 +612,13 @@ db_trace_self(void) { #ifdef __ARM_EABI__ struct unwind_state state; - register uint32_t sp __asm__ (sp); + uint32_t sp; + + /* Read the stack pointer */ + __asm __volatile(mov %0, sp : =r (sp)); state.registers[FP] = (uint32_t)__builtin_frame_address(0); - state.registers[SP] = (uint32_t)sp; + state.registers[SP] = sp; state.registers[LR] = (uint32_t)__builtin_return_address(0); state.registers[PC] = (uint32_t)db_trace_self; ___ 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: r248125 - head/sys/arm/arm
Author: andrew Date: Sun Mar 10 02:44:06 2013 New Revision: 248125 URL: http://svnweb.freebsd.org/changeset/base/248125 Log: Fix a typo where db_printf was spelt printf. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c == --- head/sys/arm/arm/db_trace.c Sun Mar 10 02:40:50 2013(r248124) +++ head/sys/arm/arm/db_trace.c Sun Mar 10 02:44:06 2013(r248125) @@ -377,7 +377,7 @@ db_stack_trace_cmd(struct unwind_state * index = db_find_index(state-start_pc); if (index-insn == EXIDX_CANTUNWIND) { - printf(Unable to unwind\n); + db_printf(Unable to unwind\n); break; } else if (index-insn (1 31)) { /* The data is within the instruction */ ___ 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: r248113 - head/sys/kern
On Sat, 9 Mar 2013, Davide Italiano wrote: Log: Fixup r248032: Change size requested to malloc(9) now that callwheel buckets are callout_list and not callout_tailq anymore. This change was already there but it seems it got lost after code churn in r248032. Reported by: alc, kib This still has the bad style that helped cause the bug. Modified: head/sys/kern/kern_timeout.c == --- head/sys/kern/kern_timeout.cSat Mar 9 20:01:35 2013 (r248112) +++ head/sys/kern/kern_timeout.cSat Mar 9 20:03:10 2013 (r248113) @@ -294,7 +294,7 @@ callout_cpu_init(struct callout_cpu *cc) mtx_init(cc-cc_lock, callout, NULL, MTX_SPIN | MTX_RECURSE); SLIST_INIT(cc-cc_callfree); - cc-cc_callwheel = malloc(sizeof(struct callout_tailq) * callwheelsize, + cc-cc_callwheel = malloc(sizeof(struct callout_list) * callwheelsize, M_CALLOUT, M_WAITOK); for (i = 0; i callwheelsize; i++) LIST_INIT(cc-cc_callwheel[i]); sizeof(*cc-cc_callwheel) is less verbose and works irrespective of the type of *cc-cc_callwheel. In kern, not quite half the malloc()'s have this style bug. Also, at least in kern: - most style bugs in the form of using the MALLOC() obfuscation have been fixed - most style bugs in the form of casting the result of malloc() to support C++ have been fixed. The remaining ones are usually accompanied by the style bug of putting a space after the cast. Bruce ___ 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: r248127 - head/sys/net80211
Author: adrian Date: Sun Mar 10 04:38:06 2013 New Revision: 248127 URL: http://svnweb.freebsd.org/changeset/base/248127 Log: Kill this, it's not needed at this point and (hopefully) the parent has correctly locked the ic/vap. Modified: head/sys/net80211/ieee80211_superg.c Modified: head/sys/net80211/ieee80211_superg.c == --- head/sys/net80211/ieee80211_superg.cSun Mar 10 03:52:35 2013 (r248126) +++ head/sys/net80211/ieee80211_superg.cSun Mar 10 04:38:06 2013 (r248127) @@ -534,8 +534,6 @@ ff_flush(struct mbuf *head, struct mbuf struct ieee80211_node *ni; struct ieee80211vap *vap; - IEEE80211_TX_LOCK_ASSERT(vap-iv_ic); - for (m = head; m != last; m = next) { next = m-m_nextpkt; m-m_nextpkt = NULL; ___ 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: r248127 - head/sys/net80211
if I break the build again before bsdcan, I promise I'll buy a nice bottle of scotch and distribute small quantities to developers who ask. Adrian On 9 March 2013 20:38, Adrian Chadd adr...@freebsd.org wrote: Author: adrian Date: Sun Mar 10 04:38:06 2013 New Revision: 248127 URL: http://svnweb.freebsd.org/changeset/base/248127 Log: Kill this, it's not needed at this point and (hopefully) the parent has correctly locked the ic/vap. Modified: head/sys/net80211/ieee80211_superg.c Modified: head/sys/net80211/ieee80211_superg.c == --- head/sys/net80211/ieee80211_superg.cSun Mar 10 03:52:35 2013 (r248126) +++ head/sys/net80211/ieee80211_superg.cSun Mar 10 04:38:06 2013 (r248127) @@ -534,8 +534,6 @@ ff_flush(struct mbuf *head, struct mbuf struct ieee80211_node *ni; struct ieee80211vap *vap; - IEEE80211_TX_LOCK_ASSERT(vap-iv_ic); - for (m = head; m != last; m = next) { next = m-m_nextpkt; m-m_nextpkt = NULL; ___ 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: r248128 - in head/sys: conf libkern/arm
Author: andrew Date: Sun Mar 10 07:55:40 2013 New Revision: 248128 URL: http://svnweb.freebsd.org/changeset/base/248128 Log: Add __aeabi_memcpy to libkern as clang may generate calls to it. Added: head/sys/libkern/arm/memcpy.S (contents, props changed) Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm == --- head/sys/conf/files.arm Sun Mar 10 04:38:06 2013(r248127) +++ head/sys/conf/files.arm Sun Mar 10 07:55:40 2013(r248128) @@ -76,6 +76,7 @@ libkern/arm/divsi3.S standard libkern/arm/ffs.S standard libkern/arm/ldivmod.S standard libkern/arm/ldivmod_helper.c standard +libkern/arm/memcpy.S standard libkern/arm/muldi3.c standard libkern/ashldi3.c standard libkern/ashrdi3.c standard Added: head/sys/libkern/arm/memcpy.S == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/arm/memcpy.S Sun Mar 10 07:55:40 2013 (r248128) @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2012 Andrew Turner + * 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 machine/asm.h +__FBSDID($FreeBSD$); + +#ifdef __ARM_EABI__ + +ENTRY_NP(__aeabi_memcpy) + b memcpy + +#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