svn commit: r260978 - head/usr.sbin/usbdump
Author: hselasky Date: Tue Jan 21 08:24:12 2014 New Revision: 260978 URL: http://svnweb.freebsd.org/changeset/base/260978 Log: Add check for "hw.usb.no_pf" sysctl value. Submitted by: Warren Block MFC after:1 week Modified: head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.c == --- head/usr.sbin/usbdump/usbdump.c Tue Jan 21 05:56:35 2014 (r260977) +++ head/usr.sbin/usbdump/usbdump.c Tue Jan 21 08:24:12 2014 (r260978) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -780,6 +781,23 @@ usage(void) exit(EX_USAGE); } +static void +check_usb_pf_sysctl(void) +{ + int error; + int no_pf_val = 0; + size_t no_pf_len = sizeof(int); + + /* check "hw.usb.no_pf" sysctl for 8- and 9- stable */ + + error = sysctlbyname("hw.usb.no_pf", &no_pf_val, + &no_pf_len, NULL, 0); + if (error == 0 && no_pf_val != 0) { + warnx("The USB packet filter might be disabled."); + warnx("See the \"hw.usb.no_pf\" sysctl for more information."); + } +} + int main(int argc, char *argv[]) { @@ -872,6 +890,8 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } + check_usb_pf_sysctl(); + p->fd = fd = open("/dev/bpf", O_RDONLY); if (p->fd < 0) err(EXIT_FAILURE, "Could not open BPF device"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r260979 - head/share/misc
Author: jgh (doc,ports committer) Date: Tue Jan 21 09:01:08 2014 New Revision: 260979 URL: http://svnweb.freebsd.org/changeset/base/260979 Log: add myself to committers-doc.dot Approved by: bcr (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot == --- head/share/misc/committers-doc.dot Tue Jan 21 08:24:12 2014 (r260978) +++ head/share/misc/committers-doc.dot Tue Jan 21 09:01:08 2014 (r260979) @@ -68,6 +68,7 @@ gavin [label="Gavin Atkinson\ngavin@Free gjb [label="Glen Barber\n...@freebsd.org\n2010/09/01"] hrs [label="Hiroki Sato\n...@freebsd.org\n2000/07/06"] issyl0 [label="Isabell Long\niss...@freebsd.org\n2012/04/25"] +jgh [label="Jason Helfman\n...@freebsd.org\n2014/01/20"] jkois [label="Johann Kois\njk...@freebsd.org\n2004/11/11"] joel [label="Joel Dahl\nj...@freebsd.org\n2005/04/05"] keramida [label="Giorgos Keramidas\nkeram...@freebsd.org\n2001/10/12"] @@ -97,6 +98,7 @@ bcr -> wblock bcr -> eadler bcr -> dru bcr -> crees +bcr -> jgh blackend -> ale @@ -163,10 +165,13 @@ nik -> keramida remko -> jkois remko -> rene +remko -> jgh simon -> josef simon -> remko trhodes -> danger trhodes -> jcamou + +wblock -> jgh } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r260939 - head/release/doc/en_US.ISO8859-1/relnotes
On Mon, 20 Jan 2014 23:25:50 +0100, Glen Barber wrote: Author: gjb Date: Mon Jan 20 22:25:50 2014 New Revision: 260939 URL: http://svnweb.freebsd.org/changeset/base/260939 Log: Document r260888. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 22:08:11 2014 (r260938) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 20 22:25:50 2014 (r260939) @@ -104,7 +104,9 @@ Kernel Changes - +Add a VT kernel + configuration file, which enables the new vt + console driver. Virtualization support Isn't this configuration file temporary to increase testing instead of something which stays for a future release? http://svnweb.freebsd.org/base?view=revision&revision=260888 Regards, Ronald. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r260983 - head/share/misc
Author: grembo (ports committer) Date: Tue Jan 21 13:23:18 2014 New Revision: 260983 URL: http://svnweb.freebsd.org/changeset/base/260983 Log: Add grembo as a ports committer Approved by: flo (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotTue Jan 21 09:22:00 2014 (r260982) +++ head/share/misc/committers-ports.dotTue Jan 21 13:23:18 2014 (r260983) @@ -105,6 +105,7 @@ gerald [label="Gerald Pfeifer\ngerald@Fr gjb [label="Glen Barber\n...@freebsd.org\n2012/06/19"] glarkin [label="Greg Larkin\nglar...@freebsd.org\n2008/07/17"] glewis [label="Greg Lewis\ngle...@freebsd.org\n2002/04/08"] +grembo [label="Michael Gmelin\ngre...@freebsd.org\n2014/01/21"] gnn [label="George Neville-Neil\n...@freebsd.org\n2013/09/04"] hq [label="Herve Quiroz\n...@freebsd.org\n2004/08/05"] ijliao [label="Ying-Chieh Liao\nijl...@freebsd.org\n2001/01/20"] ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r260986 - head/contrib/bsnmp/lib
Author: harti Date: Tue Jan 21 16:49:54 2014 New Revision: 260986 URL: http://svnweb.freebsd.org/changeset/base/260986 Log: Fix a problem with OBJECT IDENTIFIER encoding: need to check the second subid to be less than 40, not the first when the first subid is 0 or 1. Modified: head/contrib/bsnmp/lib/asn1.c Modified: head/contrib/bsnmp/lib/asn1.c == --- head/contrib/bsnmp/lib/asn1.c Tue Jan 21 16:02:31 2014 (r260985) +++ head/contrib/bsnmp/lib/asn1.c Tue Jan 21 16:49:54 2014 (r260986) @@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const s err = ASN_ERR_RANGE; } if (oid->subs[0] > 2 || - (oid->subs[0] < 2 && oid->subs[0] >= 40)) { + (oid->subs[0] < 2 && oid->subs[1] >= 40)) { asn_error(NULL, "oid out of range (%u,%u)", oid->subs[0], oid->subs[1]); err = ASN_ERR_RANGE; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r260926 - in head: sys/dev/pci sys/sys usr.sbin/pciconf
On Monday, January 20, 2014 3:56:10 pm John Baldwin wrote: > Author: jhb > Date: Mon Jan 20 20:56:09 2014 > New Revision: 260926 > URL: http://svnweb.freebsd.org/changeset/base/260926 > > Log: > Add support for displaying VPD for PCI devices via pciconf. > - Store the length of each read-only VPD value since not all values are > guaranteed to be ASCII values (though most are). > - Add a new pciio ioctl to fetch VPD for a single PCI device. The values > are returned as a list of variable length records, one for the device > name and each keyword. > - Add a new -V flag to pciconf's list mode which displays VPD data for > each device. > > MFC after: 1 week Sample output: t4nex0@pci0:4:0:4: class=0x02 card=0x1425 chip=0x44011425 rev=0x00 hdr=0x00 VPD ident = 'T420-LL-CR ' VPD ro PN = '110114640C0 ' VPD ro EC = '01234567890123 ' VPD ro SN = 'PT06120042 ' VPD ro NA = '000743123340' VPD ro V0 = '0909' VPD ro V1 = '48000810180109111948484848484847' ... -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r260898 - head/sys/kern
On Monday, January 20, 2014 4:21:13 pm Rui Paulo wrote: > On 20 Jan 2014, at 08:32, John Baldwin wrote: > > > On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > >> On 19 Jan 2014, at 17:59, Neel Natu wrote: > >>> Author: neel > >>> Date: Mon Jan 20 01:59:35 2014 > >>> New Revision: 260898 > >>> URL: http://svnweb.freebsd.org/changeset/base/260898 > >>> > >>> Log: > >>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient entries > >>> for > >>> WITNESS to actually work. > >> > >> This value should be automatically tuned... > > > > How do you propose to do so? This is the count of locks initialized before > > witness' own SYSINIT is executed and the array it sizes is allocated > > statically at compile time. > > Witness is never used (witness_cold) until witness_initialise() is called, > right? Yes, but we'd like to make sure that any locks initialized before then are tracked by witness after that point. > > This used to not be a static array, but an > > intrusive list embedded in locks themselves, but we decided to shave a > > pointer off of each lock that was only used for that and to use a > > statically > > sized table instead. > > Why don’t we start with a static value (say 1024) and then reinitialise and > copy array if it doesn’t fit instead of crashing the kernel? Where do we get the memory for the new array? If we could malloc it, we wouldn't have a static one. If we could malloc, we would also call witness_initialize() (that is what it is waiting for, the chance to call malloc() for 'struct witness' objects). Hmm, looking at the witness code though, this doesn't result in panics (the one that was bumped here). The pending list panics if it is exhausted, but if WITNESS_COUNT is exhausted witness just turns itself off. We could make the pending list also just turn witness off rather than panic'ing if the pending list panic issue is a dire one. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r260898 - head/sys/kern
On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote: > On Mon, 20 Jan 2014 11:32:29 -0500 > John Baldwin wrote: > > > On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: > > > On 19 Jan 2014, at 17:59, Neel Natu wrote: > > > > Author: neel > > > > Date: Mon Jan 20 01:59:35 2014 > > > > New Revision: 260898 > > > > URL: http://svnweb.freebsd.org/changeset/base/260898 > > > > > > > > Log: > > > > Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient > > > > entries for > > > > WITNESS to actually work. > > > > > > This value should be automatically tuned... > > > > How do you propose to do so? This is the count of locks initialized > > before witness' own SYSINIT is executed and the array it sizes is > > allocated statically at compile time. This used to not be a static > > array, but an intrusive list embedded in locks themselves, but we > > decided to shave a pointer off of each lock that was only used for > > that and to use a statically sized table instead. > > > > -- > > John Baldwin > > As + * MAXCPU, as evidently most recent > overflows reported were caused by jacking MAXCPU up from its default > value? If raising MAXCPU changes the number of unique lock names used, then the locks are named incorrectly. We don't use the 'pid' in the name for PROC_LOCK precisely so that WITNESS will treat them all the same so that if if it learns a lock order for pid 37 it enforces the same lock order for pid 38. Device locks should follow a similar rule. They should generally not include the device name (and in some cases they really shouldn't even have the driver name). -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r260926 - in head: sys/dev/pci sys/sys usr.sbin/pciconf
John Baldwin wrote on 21.01.2014 20:00: On Monday, January 20, 2014 3:56:10 pm John Baldwin wrote: Author: jhb Date: Mon Jan 20 20:56:09 2014 New Revision: 260926 URL: http://svnweb.freebsd.org/changeset/base/260926 Log: Add support for displaying VPD for PCI devices via pciconf. - Store the length of each read-only VPD value since not all values are guaranteed to be ASCII values (though most are). - Add a new pciio ioctl to fetch VPD for a single PCI device. The values are returned as a list of variable length records, one for the device name and each keyword. - Add a new -V flag to pciconf's list mode which displays VPD data for each device. MFC after: 1 week Sample output: t4nex0@pci0:4:0:4: class=0x02 card=0x1425 chip=0x44011425 rev=0x00 hdr=0x00 VPD ident = 'T420-LL-CR ' VPD ro PN = '110114640C0 ' VPD ro EC = '01234567890123 ' VPD ro SN = 'PT06120042 ' VPD ro NA = '000743123340' VPD ro V0 = '0909' VPD ro V1 = '48000810180109111948484848484847' ... That's great. So why not to strip whitespace in the output? -- Regards, Ruslan T.O.S. Of Reality ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r260987 - head/etc/rc.d
Author: demon (ports committer) Date: Tue Jan 21 18:57:49 2014 New Revision: 260987 URL: http://svnweb.freebsd.org/changeset/base/260987 Log: Do not exit with non-zero return code if sysctl.conf or sysctl.conf.local files are absent. Approved by: delphij Modified: head/etc/rc.d/sysctl Modified: head/etc/rc.d/sysctl == --- head/etc/rc.d/sysctlTue Jan 21 16:49:54 2014(r260986) +++ head/etc/rc.d/sysctlTue Jan 21 18:57:49 2014(r260987) @@ -27,7 +27,9 @@ sysctl_start() esac for _f in /etc/sysctl.conf /etc/sysctl.conf.local; do - [ -r ${_f} ] && ${command} ${command_args} ${_f} > /dev/null + if [ -r ${_f} ]; then + ${command} ${command_args} ${_f} > /dev/null + fi done } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r260926 - in head: sys/dev/pci sys/sys usr.sbin/pciconf
On Tuesday, January 21, 2014 12:49:42 pm Ruslan Makhmatkhanov wrote: > John Baldwin wrote on 21.01.2014 20:00: > > On Monday, January 20, 2014 3:56:10 pm John Baldwin wrote: > >> Author: jhb > >> Date: Mon Jan 20 20:56:09 2014 > >> New Revision: 260926 > >> URL: http://svnweb.freebsd.org/changeset/base/260926 > >> > >> Log: > >>Add support for displaying VPD for PCI devices via pciconf. > >>- Store the length of each read-only VPD value since not all values are > >> guaranteed to be ASCII values (though most are). > >>- Add a new pciio ioctl to fetch VPD for a single PCI device. The > >> values > >> are returned as a list of variable length records, one for the device > >> name and each keyword. > >>- Add a new -V flag to pciconf's list mode which displays VPD data for > >> each device. > >> > >>MFC after: 1 week > > > > Sample output: > > > > t4nex0@pci0:4:0:4: class=0x02 card=0x1425 chip=0x44011425 > > rev=0x00 hdr=0x00 > > VPD ident = 'T420-LL-CR ' > > VPD ro PN = '110114640C0 ' > > VPD ro EC = '01234567890123 ' > > VPD ro SN = 'PT06120042 ' > > VPD ro NA = '000743123340' > > VPD ro V0 = '0909' > > VPD ro V1 = '48000810180109111948484848484847' > > ... > > That's great. So why not to strip whitespace in the output? I suppose it could trim trailing whitespace. The format of these fields is very loose (just ASCII), so I wanted to display the raw value in case there were cases where it might be significant. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r260988 - head/sys/fs/ext2fs
Author: pfg Date: Tue Jan 21 19:06:29 2014 New Revision: 260988 URL: http://svnweb.freebsd.org/changeset/base/260988 Log: ext2fs: Translate the EXT4_EXTENTS and EXT4_INDEX to the inode flags. r260545 cleared the inode flags to fix corruption problems but we still need to pass some EXT4 flags for the ext4 read-only mode. None of these attributes has an equivalent in FreeBSD and are uninteresting for the system utilities so they should be innaccessible in ext2_getattrib(). Note: we also use EXT4_HUGE_FILE but we use it directly from the dinode structure so it is not necessary to translate it, Suggested by: bde MFC after:3 days Modified: head/sys/fs/ext2fs/ext2_bmap.c head/sys/fs/ext2fs/ext2_dinode.h head/sys/fs/ext2fs/ext2_htree.c head/sys/fs/ext2fs/ext2_inode_cnv.c head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_subr.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/inode.h Modified: head/sys/fs/ext2fs/ext2_bmap.c == --- head/sys/fs/ext2fs/ext2_bmap.c Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_bmap.c Tue Jan 21 19:06:29 2014 (r260988) @@ -74,7 +74,7 @@ ext2_bmap(struct vop_bmap_args *ap) if (ap->a_bnp == NULL) return (0); - if (VTOI(ap->a_vp)->i_flags & EXT4_EXTENTS) + if (VTOI(ap->a_vp)->i_flags & E4_EXTENTS) error = ext4_bmapext(ap->a_vp, ap->a_bn, &blkno, ap->a_runp, ap->a_runb); else Modified: head/sys/fs/ext2fs/ext2_dinode.h == --- head/sys/fs/ext2fs/ext2_dinode.hTue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_dinode.hTue Jan 21 19:06:29 2014 (r260988) @@ -50,22 +50,24 @@ /* * Inode flags - * The current implementation uses only EXT2_IMMUTABLE and EXT2_APPEND flags + * The system supports EXT2_IMMUTABLE, EXT2_APPEND and EXT2_NODUMP flags. + * The current implementation also uses EXT4_INDEX, EXT4_EXTENTS and + * EXT4_HUGE_FILE with some restrictions, imposed the lack of write + * support. */ #define EXT2_SECRM 0x0001 /* Secure deletion */ #define EXT2_UNRM 0x0002 /* Undelete */ #define EXT2_COMPR 0x0004 /* Compress file */ #define EXT2_SYNC 0x0008 /* Synchronous updates */ #define EXT2_IMMUTABLE 0x0010 /* Immutable file */ -#define EXT2_APPEND0x0020 /* writes to file may only append */ -#define EXT2_NODUMP0x0040 /* do not dump file */ -#define EXT2_NOATIME 0x0080 /* do not update atime */ - -#define EXT4_INDEX 0x1000 /* hash-indexed directory */ +#define EXT2_APPEND0x0020 /* Writes to file may only append */ +#define EXT2_NODUMP0x0040 /* Do not dump file */ +#define EXT2_NOATIME 0x0080 /* Do not update atime */ +#define EXT4_INDEX 0x1000 /* Hash-indexed directory */ #define EXT4_IMAGIC0x2000 /* AFS directory */ -#define EXT4_JOURNAL_DATA 0x4000 /* file data should be journaled */ -#define EXT4_NOTAIL0x8000 /* file tail should not be merged */ -#define EXT4_DIRSYNC 0x0001 /* dirsync behaviour */ +#define EXT4_JOURNAL_DATA 0x4000 /* File data should be journaled */ +#define EXT4_NOTAIL0x8000 /* File tail should not be merged */ +#define EXT4_DIRSYNC 0x0001 /* Dirsync behaviour */ #define EXT4_TOPDIR0x0002 /* Top of directory hierarchies*/ #define EXT4_HUGE_FILE 0x0004 /* Set to each huge file */ #define EXT4_EXTENTS 0x0008 /* Inode uses extents */ Modified: head/sys/fs/ext2fs/ext2_htree.c == --- head/sys/fs/ext2fs/ext2_htree.c Tue Jan 21 18:57:49 2014 (r260987) +++ head/sys/fs/ext2fs/ext2_htree.c Tue Jan 21 19:06:29 2014 (r260988) @@ -91,7 +91,7 @@ ext2_htree_has_idx(struct inode *ip) { #ifdef EXT2FS_HTREE if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && - ip->i_flags & EXT4_INDEX) + ip->i_flags & E4_INDEX) return (1); else #endif @@ -656,7 +656,7 @@ ext2_htree_create_index(struct vnode *vp ((char *)ep + ep->e2d_reclen); ep->e2d_reclen = buf1 + blksize - (char *)ep; - dp->i_flags |= EXT4_INDEX; + dp->i_flags |= E4_INDEX; /* * Initialize index root. Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c == --- head/sys/fs/ext2fs/ext2_inode_cnv.c Tue Jan 21 18:57:49 201
Re: svn commit: r260898 - head/sys/kern
On Jan 21, 2014, at 9:26 AM, John Baldwin wrote: > On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote: >> On Mon, 20 Jan 2014 11:32:29 -0500 >> John Baldwin wrote: >> >>> On Sunday 19 January 2014 18:18:03 Rui Paulo wrote: On 19 Jan 2014, at 17:59, Neel Natu wrote: > Author: neel > Date: Mon Jan 20 01:59:35 2014 > New Revision: 260898 > URL: http://svnweb.freebsd.org/changeset/base/260898 > > Log: > Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient > entries for > WITNESS to actually work. This value should be automatically tuned... >>> >>> How do you propose to do so? This is the count of locks initialized >>> before witness' own SYSINIT is executed and the array it sizes is >>> allocated statically at compile time. This used to not be a static >>> array, but an intrusive list embedded in locks themselves, but we >>> decided to shave a pointer off of each lock that was only used for >>> that and to use a statically sized table instead. >>> >>> -- >>> John Baldwin >> >> As + * MAXCPU, as evidently most recent >> overflows reported were caused by jacking MAXCPU up from its default >> value? > > If raising MAXCPU changes the number of unique lock names used, then the > locks are named incorrectly. We don't use the 'pid' in the name for > PROC_LOCK precisely so that WITNESS will treat them all the same so > that if if it learns a lock order for pid 37 it enforces the same lock > order for pid 38. Device locks should follow a similar rule. They > should generally not include the device name (and in some cases they > really shouldn't even have the driver name). Why shouldn’t they have a driver and device name? Wouldn’t it help identify possible deadlocks from driver instances calling into each other? Scott ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r260996 - head/sys/cam
Author: mav Date: Tue Jan 21 23:15:23 2014 New Revision: 260996 URL: http://svnweb.freebsd.org/changeset/base/260996 Log: Fix memory and references leak due to unfreed path in case we can't allocate bus scan CCB. MFC after:2 weeks Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.c Tue Jan 21 21:30:44 2014(r260995) +++ head/sys/cam/cam_xpt.c Tue Jan 21 23:15:23 2014(r260996) @@ -3919,9 +3919,11 @@ xpt_bus_register(struct cam_sim *sim, de scan_ccb->ccb_h.func_code = XPT_SCAN_BUS; scan_ccb->crcn.flags = 0; xpt_rescan(scan_ccb); - } else + } else { xpt_print(path, "Can't allocate CCB to scan bus\n"); + xpt_free_path(path); + } } else xpt_free_path(path); } else ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r260997 - head/share/misc
Author: tychon Date: Tue Jan 21 23:45:31 2014 New Revision: 260997 URL: http://svnweb.freebsd.org/changeset/base/260997 Log: Add myself to the src-committers list. Approved by: neel (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Tue Jan 21 23:15:23 2014 (r260996) +++ head/share/misc/committers-src.dot Tue Jan 21 23:45:31 2014 (r260997) @@ -286,6 +286,7 @@ trasz [label="Edward Tomasz Napierala\nt trhodes [label="Tom Rhodes\ntrho...@freebsd.org\n2002/05/28"] trociny [label="Mikolaj Golub\ntroc...@freebsd.org\n2011/03/10"] tuexen [label="Michael Tuexen\ntue...@freebsd.org\n2009/06/06"] +tychon [label="Tycho Nightingale\ntyc...@freebsd.org\n2014/01/21"] ume [label="Hajimu UMEMOTO\n...@freebsd.org\n2000/02/26"] uqs [label="Ulrich Spoerlein\n...@freebsd.org\n2010/01/28"] vanhu [label="Yvan Vanhullebus\nva...@freebsd.org\n2008/07/21"] ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r260999 - head/usr.sbin/bhyve
Author: tychon Date: Wed Jan 22 01:56:49 2014 New Revision: 260999 URL: http://svnweb.freebsd.org/changeset/base/260999 Log: Increase the block-layer backend maximum number of requests to match the AHCI command queue depth. This allows a slew of commands issued by a Linux guest to be absorbed without error. Approved by: grehan (co-mentor) Modified: head/usr.sbin/bhyve/block_if.c Modified: head/usr.sbin/bhyve/block_if.c == --- head/usr.sbin/bhyve/block_if.c Wed Jan 22 01:35:30 2014 (r260998) +++ head/usr.sbin/bhyve/block_if.c Wed Jan 22 01:56:49 2014 (r260999) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #define BLOCKIF_SIG0xb109b109 -#define BLOCKIF_MAXREQ 16 +#define BLOCKIF_MAXREQ 32 enum blockop { BOP_READ, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261000 - head/usr.sbin/bhyve
Author: tychon Date: Wed Jan 22 01:57:52 2014 New Revision: 261000 URL: http://svnweb.freebsd.org/changeset/base/261000 Log: Fix issue with stale fields from a recycled request pulled off the freelist. Approved by: grehan (co-mentor) Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c == --- head/usr.sbin/bhyve/pci_ahci.c Wed Jan 22 01:56:49 2014 (r260999) +++ head/usr.sbin/bhyve/pci_ahci.c Wed Jan 22 01:57:52 2014 (r261000) @@ -497,6 +497,8 @@ ahci_handle_flush(struct ahci_port *p, i aior->cfis = cfis; aior->slot = slot; aior->len = 0; + aior->done = 0; + aior->prdtl = 0; breq = &aior->io_req; err = blockif_flush(p->bctx, breq); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261001 - in head/sys/amd64/vmm: . intel
Author: neel Date: Wed Jan 22 04:03:11 2014 New Revision: 261001 URL: http://svnweb.freebsd.org/changeset/base/261001 Log: Handle a VM-exit due to a NMI properly by vectoring to the host's NMI handler via a software interrupt. This is safe to do because the logical processor is already cognizant of the NMI and further NMIs are blocked until the host's NMI handler executes "iret". Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm_stat.c head/sys/amd64/vmm/vmm_stat.h Modified: head/sys/amd64/vmm/intel/vmx.c == --- head/sys/amd64/vmm/intel/vmx.c Wed Jan 22 01:57:52 2014 (r261000) +++ head/sys/amd64/vmm/intel/vmx.c Wed Jan 22 04:03:11 2014 (r261001) @@ -1491,6 +1491,7 @@ vmx_exit_process(struct vmx *vmx, int vc bool retu; CTASSERT((PINBASED_CTLS_ONE_SETTING & PINBASED_VIRTUAL_NMI) != 0); + CTASSERT((PINBASED_CTLS_ONE_SETTING & PINBASED_NMI_EXITING) != 0); handled = 0; vmxctx = &vmx->ctx[vcpu]; @@ -1643,9 +1644,11 @@ vmx_exit_process(struct vmx *vmx, int vc handled = vmx_handle_cpuid(vmx->vm, vcpu, vmxctx); break; case EXIT_REASON_EXCEPTION: + vmm_stat_incr(vmx->vm, vcpu, VMEXIT_EXCEPTION, 1); intr_info = vmcs_read(VMCS_EXIT_INTR_INFO); KASSERT((intr_info & VMCS_INTR_VALID) != 0, ("VM exit interruption info invalid: %#x", intr_info)); + /* * If Virtual NMIs control is 1 and the VM-exit is due to a * fault encountered during the execution of IRET then we must @@ -1658,6 +1661,21 @@ vmx_exit_process(struct vmx *vmx, int vc (intr_info & 0xff) != IDT_DF && (intr_info & EXIT_QUAL_NMIUDTI) != 0) vmx_restore_nmi_blocking(vmx, vcpu); + + /* +* If the NMI-exiting VM execution control is set to '1' +* then an NMI in non-root operation causes a VM-exit. +* NMI blocking is in effect for this logical processor so +* it is sufficient to simply vector to the NMI handler via +* a software interrupt. +*/ + if ((intr_info & VMCS_INTR_T_MASK) == VMCS_INTR_T_NMI) { + KASSERT((intr_info & 0xff) == IDT_NMI, ("VM exit due " + "to NMI has invalid vector: %#x", intr_info)); + VCPU_CTR0(vmx->vm, vcpu, "Vectoring to NMI handler"); + __asm __volatile("int $2"); + return (1); + } break; case EXIT_REASON_EPT_FAULT: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_EPT_FAULT, 1); @@ -1728,6 +1746,8 @@ vmx_exit_process(struct vmx *vmx, int vc */ vmexit->exitcode = VM_EXITCODE_VMX; vmexit->u.vmx.status = VM_SUCCESS; + vmexit->u.vmx.inst_type = 0; + vmexit->u.vmx.inst_error = 0; } else { /* * The exitcode and collateral have been populated. Modified: head/sys/amd64/vmm/vmm_stat.c == --- head/sys/amd64/vmm/vmm_stat.c Wed Jan 22 01:57:52 2014 (r261000) +++ head/sys/amd64/vmm/vmm_stat.c Wed Jan 22 04:03:11 2014 (r261001) @@ -151,3 +151,4 @@ VMM_STAT(VMEXIT_UNKNOWN, "number of vm e VMM_STAT(VMEXIT_ASTPENDING, "number of times astpending at exit"); VMM_STAT(VMEXIT_USERSPACE, "number of vm exits handled in userspace"); VMM_STAT(VMEXIT_RENDEZVOUS, "number of times rendezvous pending at exit"); +VMM_STAT(VMEXIT_EXCEPTION, "number of vm exits due to exceptions"); Modified: head/sys/amd64/vmm/vmm_stat.h == --- head/sys/amd64/vmm/vmm_stat.h Wed Jan 22 01:57:52 2014 (r261000) +++ head/sys/amd64/vmm/vmm_stat.h Wed Jan 22 04:03:11 2014 (r261001) @@ -121,4 +121,5 @@ VMM_STAT_DECLARE(VMEXIT_UNKNOWN); VMM_STAT_DECLARE(VMEXIT_ASTPENDING); VMM_STAT_DECLARE(VMEXIT_USERSPACE); VMM_STAT_DECLARE(VMEXIT_RENDEZVOUS); +VMM_STAT_DECLARE(VMEXIT_EXCEPTION); #endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261003 - in head/sys/dev/usb: . quirk
Author: hselasky Date: Wed Jan 22 07:22:42 2014 New Revision: 261003 URL: http://svnweb.freebsd.org/changeset/base/261003 Log: Add new quirk. PR: usb/185968 MFC after:1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c == --- head/sys/dev/usb/quirk/usb_quirk.c Wed Jan 22 06:27:02 2014 (r261002) +++ head/sys/dev/usb/quirk/usb_quirk.c Wed Jan 22 07:22:42 2014 (r261003) @@ -286,6 +286,7 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(NETCHIP, CLIK_40, 0x, 0x, UQ_MSC_FORCE_PROTO_ATAPI, UQ_MSC_NO_INQUIRY), + USB_QUIRK(NETCHIP, POCKETBOOK, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(NIKON, D300, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(OLYMPUS, C1, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB, Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsWed Jan 22 06:27:02 2014(r261002) +++ head/sys/dev/usb/usbdevsWed Jan 22 07:22:42 2014(r261003) @@ -3115,6 +3115,7 @@ product NETCHIP TURBOCONNECT 0x1080 Turb product NETCHIP CLIK_400xa140 USB Clik! 40 product NETCHIP GADGETZERO 0xa4a0 Linux Gadget Zero product NETCHIP ETHERNETGADGET 0xa4a2 Linux Ethernet/RNDIS gadget on pxa210/25x/26x +product NETCHIP POCKETBOOK 0xa4a5 PocketBook /* Netgear products */ product NETGEAR EA101 0x1001 Ethernet ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261004 - head/sys/dev/usb/controller
Author: hselasky Date: Wed Jan 22 07:32:55 2014 New Revision: 261004 URL: http://svnweb.freebsd.org/changeset/base/261004 Log: Wait a bit more before we free any EHCI DMA descriptors. Some USB controllers need more time than others. MFC after:1 week Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c == --- head/sys/dev/usb/controller/ehci.c Wed Jan 22 07:22:42 2014 (r261003) +++ head/sys/dev/usb/controller/ehci.c Wed Jan 22 07:32:55 2014 (r261004) @@ -3781,7 +3781,7 @@ ehci_get_dma_delay(struct usb_device *ud * Wait until the hardware has finished any possible use of * the transfer descriptor(s) and QH */ - *pus = (188); /* microseconds */ + *pus = (1125); /* microseconds */ } static void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r261005 - head/sys/dev/usb
Author: hselasky Date: Wed Jan 22 07:48:39 2014 New Revision: 261005 URL: http://svnweb.freebsd.org/changeset/base/261005 Log: Ensure that the DMA delay does not get rounded down to zero ticks when a timeout value of a single tick is given. With FreeBSD-10 and newer the current system time is used as a starting point, and the minimum callout time of a single tick will be guaranteed. This patch mostly affect the DMA delay timeouts, which are typically in the range from 0.125 to 2ms. MFC after:1 week Modified: head/sys/dev/usb/usb_freebsd.h head/sys/dev/usb/usb_freebsd_loader.h head/sys/dev/usb/usb_transfer.c Modified: head/sys/dev/usb/usb_freebsd.h == --- head/sys/dev/usb/usb_freebsd.h Wed Jan 22 07:32:55 2014 (r261004) +++ head/sys/dev/usb/usb_freebsd.h Wed Jan 22 07:48:39 2014 (r261005) @@ -50,6 +50,13 @@ #defineUSB_HAVE_FIXED_CONFIG 0 #defineUSB_HAVE_FIXED_PORT 0 +/* define zero ticks callout value */ +#if (__FreeBSD_version >= 129) +#defineUSB_CALLOUT_ZERO_TICKS 0 +#else +#defineUSB_CALLOUT_ZERO_TICKS 1 +#endif + #defineUSB_TD_GET_PROC(td) (td)->td_proc #defineUSB_PROC_GET_GID(td) (td)->p_pgid Modified: head/sys/dev/usb/usb_freebsd_loader.h == --- head/sys/dev/usb/usb_freebsd_loader.h Wed Jan 22 07:32:55 2014 (r261004) +++ head/sys/dev/usb/usb_freebsd_loader.h Wed Jan 22 07:48:39 2014 (r261005) @@ -50,6 +50,8 @@ #defineUSB_HAVE_FIXED_CONFIG 0 #defineUSB_HAVE_FIXED_PORT 0 +#defineUSB_CALLOUT_ZERO_TICKS 1 + #defineUSB_TD_GET_PROC(td) (td)->td_proc #defineUSB_PROC_GET_GID(td) (td)->p_pgid Modified: head/sys/dev/usb/usb_transfer.c == --- head/sys/dev/usb/usb_transfer.c Wed Jan 22 07:32:55 2014 (r261004) +++ head/sys/dev/usb/usb_transfer.c Wed Jan 22 07:48:39 2014 (r261005) @@ -2723,7 +2723,7 @@ usbd_transfer_timeout_ms(struct usb_xfer /* defer delay */ usb_callout_reset(&xfer->timeout_handle, - USB_MS_TO_TICKS(ms), cb, xfer); + USB_MS_TO_TICKS(ms) + USB_CALLOUT_ZERO_TICKS, cb, xfer); } /** ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"