Re: Locking bug in sys_accept()
On Tue, Sep 21, 2010 at 06:41:15PM -0700, Matthew Dempsky wrote: > Noticed by sthen@ using my strict locking diff. > > ok? ok krw@ Ken > > > Index: uipc_syscalls.c > === > RCS file: /cvs/src/sys/kern/uipc_syscalls.c,v > retrieving revision 1.76 > diff -u -p -r1.76 uipc_syscalls.c > --- uipc_syscalls.c 3 Jul 2010 04:44:51 - 1.76 > +++ uipc_syscalls.c 22 Sep 2010 00:37:27 - > @@ -213,7 +213,7 @@ sys_accept(struct proc *p, void *v, regi >*/ > soqinsque(head, so, 1); > wakeup_one(&head->so_timeo); > - goto bad; > + goto unlock; > } > *retval = tmpfd; > > @@ -243,8 +243,9 @@ sys_accept(struct proc *p, void *v, regi > FILE_SET_MATURE(fp); > } > m_freem(nam); > -bad: > +unlock: > fdpunlock(p->p_fd); > +bad: > splx(s); > FRELE(headfp); > return (error);
Sprinkle DIOCGPDINFO support where it is missing
Auto-allocation of disks into a disklabel needs DIOCGPDINFO support. Can't even compile these, so confirmation that this actually compiles would be appreciated. In most cases I just punted as the physical info is unconditionally put into the disklabel at attach time. These are all the files I could find that had DIOCGDINFO and not DIOCGPDINFO. ok? Ken Index: ./arch/sparc/dev/presto.c === RCS file: /cvs/src/sys/arch/sparc/dev/presto.c,v retrieving revision 1.19 diff -u -p -r1.19 presto.c --- ./arch/sparc/dev/presto.c 22 Sep 2010 01:18:57 - 1.19 +++ ./arch/sparc/dev/presto.c 22 Sep 2010 05:04:21 - @@ -71,7 +71,7 @@ struct presto_softc { void prestostrategy(struct buf *); void presto_attach(struct device *, struct device *, void *); -void presto_getdisklabel(dev_t, struct presto_softc *); +void presto_getdisklabel(dev_t, struct presto_softc *, struct disklabel *, int); intpresto_match(struct device *, void *, void *); struct cfattach presto_ca = { @@ -209,7 +209,7 @@ prestoopen(dev_t dev, int flag, int fmt, return (ENXIO); /* read the disk label */ - presto_getdisklabel(dev, sc); + presto_getdisklabel(dev, sc, sc->sc_dk.dk_label, 0); /* only allow valid partitions */ part = DISKPART(dev); @@ -324,6 +324,10 @@ prestoioctl(dev_t dev, u_long cmd, caddr sc = (struct presto_softc *)device_lookup(&presto_cd, unit); switch (cmd) { + case DIOCGPDINFO: + presto_getdisklabel(dev, sc, (struct disklabel *)data, 1); + break; + case DIOCGDINFO: bcopy(sc->sc_dk.dk_label, data, sizeof(struct disklabel)); return (0); @@ -351,10 +355,9 @@ prestoioctl(dev_t dev, u_long cmd, caddr * Read the disklabel. If none is present, use a fictitious one instead. */ void -presto_getdisklabel(dev_t dev, struct presto_softc *sc) +presto_getdisklabel(dev_t dev, struct presto_softc *sc, struct disklabel *lp, +int spoofonly); { - struct disklabel *lp = sc->sc_dk.dk_label; - bzero(sc->sc_dk.dk_label, sizeof(struct disklabel)); lp->d_secsize = DEV_BSIZE; @@ -373,5 +376,5 @@ presto_getdisklabel(dev_t dev, struct pr lp->d_magic2 = DISKMAGIC; lp->d_checksum = dkcksum(lp); - readdisklabel(DISKLABELDEV(dev), prestostrategy, sc->sc_dk.dk_label, 0); + readdisklabel(DISKLABELDEV(dev), prestostrategy, lp, spoofonly); } Index: ./arch/sparc/dev/xd.c === RCS file: /cvs/src/sys/arch/sparc/dev/xd.c,v retrieving revision 1.51 diff -u -p -r1.51 xd.c --- ./arch/sparc/dev/xd.c 22 Sep 2010 01:18:57 - 1.51 +++ ./arch/sparc/dev/xd.c 22 Sep 2010 05:04:21 - @@ -839,6 +839,7 @@ xdioctl(dev, command, addr, flag, p) return 0; case DIOCGDINFO:/* get disk label */ + case DIOCGPDINFO: /* no separate 'physical' info available. */ bcopy(xd->sc_dk.dk_label, addr, sizeof(struct disklabel)); return 0; Index: ./arch/sparc/dev/xy.c === RCS file: /cvs/src/sys/arch/sparc/dev/xy.c,v retrieving revision 1.49 diff -u -p -r1.49 xy.c --- ./arch/sparc/dev/xy.c 22 Sep 2010 01:18:57 - 1.49 +++ ./arch/sparc/dev/xy.c 22 Sep 2010 05:04:21 - @@ -800,6 +800,7 @@ xyioctl(dev, command, addr, flag, p) return 0; case DIOCGDINFO:/* get disk label */ + case DIOCGPDINFO: /* no separate 'physical' info available. */ bcopy(xy->sc_dk.dk_label, addr, sizeof(struct disklabel)); return 0; Index: ./arch/vax/mba/hp.c === RCS file: /cvs/src/sys/arch/vax/mba/hp.c,v retrieving revision 1.22 diff -u -p -r1.22 hp.c --- ./arch/vax/mba/hp.c 22 Sep 2010 01:18:57 - 1.22 +++ ./arch/vax/mba/hp.c 22 Sep 2010 05:04:21 - @@ -329,6 +329,7 @@ hpioctl(dev, cmd, addr, flag, p) switch (cmd) { caseDIOCGDINFO: + caseDIOCGPDINFO:/* no separate 'physical' info available. */ bcopy(lp, addr, sizeof (struct disklabel)); return 0; Index: ./arch/vax/mscp/mscp_disk.c === RCS file: /cvs/src/sys/arch/vax/mscp/mscp_disk.c,v retrieving revision 1.31 diff -u -p -r1.31 mscp_disk.c --- ./arch/vax/mscp/mscp_disk.c 22 Sep 2010 01:18:57 - 1.31 +++ ./arch/vax/mscp/mscp_disk.c 22 Sep 2010 05:04:21 - @@ -378,6 +378,7 @@ raioctl(dev, cmd, data, flag, p) switch (cmd) { case DIOCGDINFO: + case DIOCGPDINFO: /* no separate 'physical' info available. */ bcopy(lp, data, sizeof (struct disklabel)); break; Index: ./arch/vax/vsa/h
Re: unbreak ramdisks after glxpcib change
On Wed, Sep 22, 2010 at 07:12:57AM +0300, Vladimir Kirillov wrote: > Hello t...@! > Subj, > > Index: glxpcib.c > === > RCS file: /storage/cvs/src/sys/arch/i386/pci/glxpcib.c,v > retrieving revision 1.11 > diff -u -p -u -p -r1.11 glxpcib.c > --- glxpcib.c 21 Sep 2010 12:55:25 - 1.11 > +++ glxpcib.c 22 Sep 2010 04:08:44 - > @@ -261,7 +261,9 @@ glxpcib_attach(struct device *parent, st > int > glxpcib_activate(struct device *self, int act) > { > +#ifndef SMALL_KERNEL > struct glxpcib_softc *sc = (struct glxpcib_softc *)self; > +#endif > int rv = 0; > > switch (act) { > Its in. Thanks!
unbreak ramdisks after glxpcib change
Hello t...@! Subj, Index: glxpcib.c === RCS file: /storage/cvs/src/sys/arch/i386/pci/glxpcib.c,v retrieving revision 1.11 diff -u -p -u -p -r1.11 glxpcib.c --- glxpcib.c 21 Sep 2010 12:55:25 - 1.11 +++ glxpcib.c 22 Sep 2010 04:08:44 - @@ -261,7 +261,9 @@ glxpcib_attach(struct device *parent, st int glxpcib_activate(struct device *self, int act) { +#ifndef SMALL_KERNEL struct glxpcib_softc *sc = (struct glxpcib_softc *)self; +#endif int rv = 0; switch (act) {
Locking bug in sys_accept()
Noticed by sthen@ using my strict locking diff. ok? Index: uipc_syscalls.c === RCS file: /cvs/src/sys/kern/uipc_syscalls.c,v retrieving revision 1.76 diff -u -p -r1.76 uipc_syscalls.c --- uipc_syscalls.c 3 Jul 2010 04:44:51 - 1.76 +++ uipc_syscalls.c 22 Sep 2010 00:37:27 - @@ -213,7 +213,7 @@ sys_accept(struct proc *p, void *v, regi */ soqinsque(head, so, 1); wakeup_one(&head->so_timeo); - goto bad; + goto unlock; } *retval = tmpfd; @@ -243,8 +243,9 @@ sys_accept(struct proc *p, void *v, regi FILE_SET_MATURE(fp); } m_freem(nam); -bad: +unlock: fdpunlock(p->p_fd); +bad: splx(s); FRELE(headfp); return (error);
Kill suser() call in tunopen()?
/dev/tun* are already owned by root and mode 0600 by default, so it seems redundant to check suser() in tunopen(). ok? Index: if_tun.c === RCS file: /cvs/src/sys/net/if_tun.c,v retrieving revision 1.107 diff -u -p -r1.107 if_tun.c --- if_tun.c8 Jul 2010 08:40:29 - 1.107 +++ if_tun.c22 Sep 2010 01:27:22 - @@ -343,9 +343,6 @@ tunopen(dev_t dev, int flag, int mode, s struct ifnet*ifp; int error, s; - if ((error = suser(p, 0)) != 0) - return (error); - if ((tp = tun_lookup(minor(dev))) == NULL) {/* create on demand */ charxname[IFNAMSIZ];
gc dk_labelsector and update disk.9
I can't find any mention of dk_labelsector in the tree, and disk.9 has fallen a bit behind. ok? Ken Index: sys/sys/disk.h === RCS file: /cvs/src/sys/sys/disk.h,v retrieving revision 1.25 diff -u -p -r1.25 disk.h --- sys/sys/disk.h 8 Sep 2010 15:16:22 - 1.25 +++ sys/sys/disk.h 21 Sep 2010 22:41:22 - @@ -108,8 +108,7 @@ struct disk { * must be dynamically allocated, otherwise the size of this * structure becomes machine-dependent. */ - daddr64_t dk_labelsector; /* sector containing label */ - struct disklabel *dk_label; /* label */ + struct disklabel *dk_label; }; /* states */ Index: share/man/man9/disk.9 === RCS file: /cvs/src/share/man/man9/disk.9,v retrieving revision 1.26 diff -u -p -r1.26 disk.9 --- share/man/man9/disk.9 25 Jun 2007 17:30:07 - 1.26 +++ share/man/man9/disk.9 21 Sep 2010 22:41:22 - @@ -63,7 +63,10 @@ structure, which is defined as follows: struct disk { TAILQ_ENTRY(disk) dk_link; /* link in global disklist */ struct rwlock dk_lock;/* disk lock */ + struct mutexdk_mtx; /* busy/unbusy mtx */ char*dk_name; /* disk name */ + struct device *dk_device; /* disk device structure. */ + dev_t dk_devno; /* disk device number. */ int dk_flags; /* disk flags */ #define DKF_CONSTRUCTED 0x0001 @@ -88,15 +91,12 @@ struct disk { int dk_blkshift; /*shift to convert DEV_BSIZE to blks*/ int dk_byteshift; /* shift to convert bytes to blks */ - struct dkdriver *dk_driver;/* pointer to driver */ - /* * Disk label information. Storage for the in-core disk label * must be dynamically allocated, otherwise the size of this * structure becomes machine-dependent. */ - daddr64_t dk_labelsector; /* sector containing label */ - struct disklabel *dk_label; /* label */ + struct disklabel *dk_label; }; .Ed .Pp
Fix VOP_* callers WRT proc usage
The mail I wrote earlier seems to have vanished from my mail queue without trace, so here's a resend. Several of the vn_ and VOP functions take a struct proc as an argument, it doesn't actually ever make sense for this to be anything other than curproc (removing the argument is part of thib's planned vnode rework, but for now having it correct means less crashes, so is inherently good). However, a recent vnd + softraid panic I saw lead me to find out that several callers in the tree are calling these functions with NULL (or even 0, ick) for the proc pointer, that is all kinda of wrong. Especially in the case of VOP_IOCTL which ahs good reasons to expect a valid proc pointer will always be there. This diff is the result of systematically checking every caller of a VOP or vn_ function that takes a proc and fixing the wrong ones. Doing so also reminded me how nasty some of our vfs bits are. jsing and mikeb tested the softraid bits, pea, matthieu and naddy tested the raidframe bits. The rest is running on the machine I am typing this mail from and has caused no problems. thib@ has already oked this diff, but more review and tests are never a bad thing. so, any more oks, tests or comments? Cheers, -0- -- "In short, _N is Richardian if, and only if, _N is not Richardian." Index: dev/softraid.c === RCS file: /cvs/src/sys/dev/softraid.c,v retrieving revision 1.213 diff -u -p -r1.213 softraid.c --- dev/softraid.c 7 Sep 2010 17:14:06 - 1.213 +++ dev/softraid.c 20 Sep 2010 23:23:41 - @@ -322,7 +322,7 @@ sr_meta_probe(struct sr_discipline *sd, * XXX leaving dev open for now; move this to attach * and figure out the open/close dance for unwind. */ - error = VOP_OPEN(vn, FREAD | FWRITE, NOCRED, 0); + error = VOP_OPEN(vn, FREAD | FWRITE, NOCRED, curproc); if (error) { DNPRINTF(SR_D_META,"%s: sr_meta_probe can't " "open %s\n", DEVNAME(sc), devname); @@ -900,7 +900,7 @@ sr_meta_native_bootprobe(struct sr_softc } /* open device */ - error = VOP_OPEN(vn, FREAD, NOCRED, 0); + error = VOP_OPEN(vn, FREAD, NOCRED, curproc); if (error) { DNPRINTF(SR_D_META, "%s: sr_meta_native_bootprobe open " "failed\n", DEVNAME(sc)); @@ -909,17 +909,18 @@ sr_meta_native_bootprobe(struct sr_softc } /* get disklabel */ - error = VOP_IOCTL(vn, DIOCGDINFO, (caddr_t)&label, FREAD, NOCRED, 0); + error = VOP_IOCTL(vn, DIOCGDINFO, (caddr_t)&label, FREAD, NOCRED, + curproc); if (error) { DNPRINTF(SR_D_META, "%s: sr_meta_native_bootprobe ioctl " "failed\n", DEVNAME(sc)); - VOP_CLOSE(vn, FREAD, NOCRED, 0); + VOP_CLOSE(vn, FREAD, NOCRED, curproc); vput(vn); goto done; } /* we are done, close device */ - error = VOP_CLOSE(vn, FREAD, NOCRED, 0); + error = VOP_CLOSE(vn, FREAD, NOCRED, curproc); if (error) { DNPRINTF(SR_D_META, "%s: sr_meta_native_bootprobe close " "failed\n", DEVNAME(sc)); @@ -957,7 +958,7 @@ sr_meta_native_bootprobe(struct sr_softc "vnode for partition\n", DEVNAME(sc)); goto done; } - error = VOP_OPEN(vn, FREAD, NOCRED, 0); + error = VOP_OPEN(vn, FREAD, NOCRED, curproc); if (error) { DNPRINTF(SR_D_META, "%s: sr_meta_native_bootprobe " "open failed, partition %d\n", @@ -969,14 +970,14 @@ sr_meta_native_bootprobe(struct sr_softc if (sr_meta_native_read(fake_sd, rawdev, md, NULL)) { printf("%s: native bootprobe could not read native " "metadata\n", DEVNAME(sc)); - VOP_CLOSE(vn, FREAD, NOCRED, 0); + VOP_CLOSE(vn, FREAD, NOCRED, curproc); vput(vn); continue; } /* are we a softraid partition? */ if (md->ssdi.ssd_magic != SR_MAGIC) { - VOP_CLOSE(vn, FREAD, NOCRED, 0); + VOP_CLOSE(vn, FREAD, NOCRED, curproc); vput(vn); continue; } @@ -999,7 +1000,7 @@ sr_meta_native_bootprobe(struct sr_softc } /* we are done, close partition */ - VOP_CLOSE(vn, FREAD, NOCRED, 0); + VOP_CLOSE(vn, FREAD, NOCRED, curproc); vput(vn); } @@ -1368,7 +1369,7 @@ sr_meta_native_probe(struct sr_softc *sc /* get disklabel */
Re: merge pms and pmsi + added support for some of mouse
On Wed, Sep 22, 2010 at 03:24:28AM +0600, Alexandr Shadchin wrote: > Sorry, forgot to fix previous diff. Attached correct diff The revised version not only works for me (Dell Studio amd64 laptop), but even cures the bug that the internal trackpad (pms) locks up during suspend/resume. Thanks!
Re: Preliminary MCLGETI() support for de(4) -- testing needed !
Loganaden Velvindron wrote: > I'm working on mclgeti() support for de(4). Unfortunately, I don't > have all the revisions of the chipsets. If you any of the 21141,21142, or > 21143. > Give it a try and comment back !. These chips are preferentially matched by the dc(4) driver. That said, I have a 21143-based DE-500 here and when I disable dc(4), the in-tree de(4) driver basically works--although the link only comes up as 10baseT. With your patch, it breaks: packets are sent, but no packets are received. -- Christian "naddy" Weisgerber na...@mips.inka.de
Re: merge pms and pmsi + added support for some of mouse
Sorry, forgot to fix previous diff. Attached correct diff Index: distrib/notes/sparc64/hardware === RCS file: /cvs/src/distrib/notes/sparc64/hardware,v retrieving revision 1.151 diff -u -p -r1.151 hardware --- distrib/notes/sparc64/hardware 9 Apr 2009 16:02:24 - 1.151 +++ distrib/notes/sparc64/hardware 21 Sep 2010 18:02:06 - @@ -490,7 +490,7 @@ Supported devices {:-include-:}: Sun mice on Zilog serial ports (zstty) Sun mice on NS16550 serial ports (com) USB mice (ums) - PS/2 mice (pms or pmsi) + PS/2 mice (pms) Framebuffers SBUS framebuffers: Index: distrib/sets/lists/man/mi === RCS file: /cvs/src/distrib/sets/lists/man/mi,v retrieving revision 1.1061 diff -u -p -r1.1061 mi --- distrib/sets/lists/man/mi 25 Aug 2010 19:21:26 - 1.1061 +++ distrib/sets/lists/man/mi 21 Sep 2010 18:02:07 - @@ -2002,7 +2002,6 @@ ./usr/share/man/cat4/piixpm.0 ./usr/share/man/cat4/pim.0 ./usr/share/man/cat4/pms.0 -./usr/share/man/cat4/pmsi.0 ./usr/share/man/cat4/pnp.0 ./usr/share/man/cat4/ppb.0 ./usr/share/man/cat4/ppp.0 Index: share/man/man4/Makefile === RCS file: /cvs/src/share/man/man4/Makefile,v retrieving revision 1.514 diff -u -p -r1.514 Makefile --- share/man/man4/Makefile 19 Aug 2010 15:45:35 - 1.514 +++ share/man/man4/Makefile 21 Sep 2010 18:03:27 - @@ -79,7 +79,6 @@ MLINKS+=isa.4 isadma.4 MLINKS+=isapnp.4 pnp.4 MLINKS+=netintro.4 networking.4 MLINKS+=pcmcia.4 pcic.4 -MLINKS+=pms.4 pmsi.4 MLINKS+=pty.4 ptm.4 MLINKS+=random.4 arandom.4 MLINKS+=random.4 srandom.4 random.4 urandom.4 Index: share/man/man4/pckbc.4 === RCS file: /cvs/src/share/man/man4/pckbc.4,v retrieving revision 1.17 diff -u -p -r1.17 pckbc.4 --- share/man/man4/pckbc.4 22 Jul 2010 07:41:59 - 1.17 +++ share/man/man4/pckbc.4 21 Sep 2010 18:03:27 - @@ -36,7 +36,6 @@ .Cd "pckbc* at ebus? " Pq "sparc64" .Cd "pckbd* at pckbc?" .Cd "pms* at pckbc?" -.Cd "pmsi* at pckbc?" .Sh DESCRIPTION The .Nm @@ -69,5 +68,4 @@ device flags to 1. .Xr isa 4 , .Xr pckbd 4 , .Xr pms 4 , -.Xr pmsi 4 , .Xr boot_config 8 Index: share/man/man4/pms.4 === RCS file: /cvs/src/share/man/man4/pms.4,v retrieving revision 1.11 diff -u -p -r1.11 pms.4 --- share/man/man4/pms.419 Oct 2007 06:29:36 - 1.11 +++ share/man/man4/pms.421 Sep 2010 18:03:28 - @@ -37,16 +37,13 @@ .Dt PMS 4 .Os .Sh NAME -.Nm pms , -.Nm pmsi +.Nm pms .Nd PS/2 auxiliary port mouse driver .Sh SYNOPSIS .Cd "pms* at pckbc?" .Cd "pms* at gsckbc?" Pq "hppa" .Cd "pms* at mkbc?" Pq "sgi" -.Cd "pmsi* at pckbc?" .Cd "wsmouse* at pms? mux 0" -.Cd "wsmouse* at pmsi? mux 0" .Sh DESCRIPTION The .Nm pms @@ -60,12 +57,13 @@ the PS/2 input port controller found on .Xr pckbc 4 , the standard PC keyboard controller found on most other machines. .Dq pms -is a generic driver which supports 2 coordinate axes and 3 buttons. -The -.Dq pmsi -variant provides specific support for wheel mice of the +is a generic driver which supports mice using common variants of the PS/2 +protocol, including wheel mice of the .Dq IntelliMouse -breed; wheel movements are mapped to a third (z-) axis. +breed. +Wheel movements are mapped to a third (z-) axis. +The driver is +believed to work with both 3-button and 5-button mice with scroll wheels. Mouse related data are accessed by .Xr wsmouse 4 devices. Index: share/man/man4/man4.i386/lms.4 === RCS file: /cvs/src/share/man/man4/man4.i386/lms.4,v retrieving revision 1.10 diff -u -p -r1.10 lms.4 --- share/man/man4/man4.i386/lms.4 31 May 2007 19:19:55 - 1.10 +++ share/man/man4/man4.i386/lms.4 21 Sep 2010 18:03:28 - @@ -53,6 +53,5 @@ devices. .Xr isa 4 , .Xr mms 4 , .Xr pms 4 , -.Xr pmsi 4 , .Xr ums 4 , .Xr wsmouse 4 Index: share/man/man4/man4.i386/mms.4 === RCS file: /cvs/src/share/man/man4/man4.i386/mms.4,v retrieving revision 1.9 diff -u -p -r1.9 mms.4 --- share/man/man4/man4.i386/mms.4 31 May 2007 19:19:55 - 1.9 +++ share/man/man4/man4.i386/mms.4 21 Sep 2010 18:03:28 - @@ -53,6 +53,5 @@ devices. .Xr isa 4 , .Xr lms 4 , .Xr pms 4 , -.Xr pmsi 4 , .Xr ums 4 , .Xr wsmouse 4 Index: sys/arch/alpha/conf/GENERIC === RCS file: /cvs/src/sys/arch/alpha/conf/GENERIC,v retrieving revision 1.215 diff -u -p -r1.215 GENERIC --- sys/arch/alpha/conf/GENERIC 2 Aug 2010 14:13:23 - 1.215 +++ sys/ar
Preliminary MCLGETI() support for de(4) -- testing needed !
Hi guys, I'm working on mclgeti() support for de(4). Unfortunately, I don't have all the revisions of the chipsets. If you any of the 21141,21142, or 21143. Give it a try and comment back !. Thanks. Index: src/sys/dev/pci/if_de.c === RCS file: /cvs/src/sys/dev/pci/if_de.c,v retrieving revision 1.106 diff -u -r1.106 if_de.c --- src/sys/dev/pci/if_de.c 20 Sep 2010 07:40:38 - 1.106 +++ src/sys/dev/pci/if_de.c 21 Sep 2010 20:18:23 - @@ -3368,20 +3368,18 @@ */ if (accept || ms == NULL) { struct mbuf *m0; - MGETHDR(m0, M_DONTWAIT, MT_DATA); + m0 = MCLGETI(NULL, M_DONTWAIT, &sc->tulip_ac.ac_if, MCLBYTES); if (m0 != NULL) { #if defined(TULIP_COPY_RXDATA) if (!accept || total_len >= (MHLEN - 2)) { #endif - MCLGET(m0, M_DONTWAIT); - if ((m0->m_flags & M_EXT) == 0) { - m_freem(m0); - m0 = NULL; - } + if (!m0) + printf("\n no mbuf"); #if defined(TULIP_COPY_RXDATA) } #endif } + if (accept #if defined(TULIP_COPY_RXDATA) && m0 != NULL @@ -4707,6 +4705,7 @@ tulip_reset(sc); IFQ_SET_READY(&ifp->if_snd); + m_clsetwms(ifp, MCLBYTES, 2, TULIP_RXDESCS - 1); if_attach(ifp); ether_ifattach(ifp); } //Logan C-x-C-c
merge pms and pmsi + added support for some of mouse
Hi! Merge pms and pmsi + added support for some of mouse. Tested on i386 and amd64. Please test, comment, commit, flame, etc ... :) -- Alexandr Shadchin Index: distrib/notes/sparc64/hardware === RCS file: /cvs/src/distrib/notes/sparc64/hardware,v retrieving revision 1.151 diff -u -p -r1.151 hardware --- distrib/notes/sparc64/hardware 9 Apr 2009 16:02:24 - 1.151 +++ distrib/notes/sparc64/hardware 21 Sep 2010 18:02:06 - @@ -490,7 +490,7 @@ Supported devices {:-include-:}: Sun mice on Zilog serial ports (zstty) Sun mice on NS16550 serial ports (com) USB mice (ums) - PS/2 mice (pms or pmsi) + PS/2 mice (pms) Framebuffers SBUS framebuffers: Index: distrib/sets/lists/man/mi === RCS file: /cvs/src/distrib/sets/lists/man/mi,v retrieving revision 1.1061 diff -u -p -r1.1061 mi --- distrib/sets/lists/man/mi 25 Aug 2010 19:21:26 - 1.1061 +++ distrib/sets/lists/man/mi 21 Sep 2010 18:02:07 - @@ -2002,7 +2002,6 @@ ./usr/share/man/cat4/piixpm.0 ./usr/share/man/cat4/pim.0 ./usr/share/man/cat4/pms.0 -./usr/share/man/cat4/pmsi.0 ./usr/share/man/cat4/pnp.0 ./usr/share/man/cat4/ppb.0 ./usr/share/man/cat4/ppp.0 Index: share/man/man4/Makefile === RCS file: /cvs/src/share/man/man4/Makefile,v retrieving revision 1.514 diff -u -p -r1.514 Makefile --- share/man/man4/Makefile 19 Aug 2010 15:45:35 - 1.514 +++ share/man/man4/Makefile 21 Sep 2010 18:03:27 - @@ -79,7 +79,6 @@ MLINKS+=isa.4 isadma.4 MLINKS+=isapnp.4 pnp.4 MLINKS+=netintro.4 networking.4 MLINKS+=pcmcia.4 pcic.4 -MLINKS+=pms.4 pmsi.4 MLINKS+=pty.4 ptm.4 MLINKS+=random.4 arandom.4 MLINKS+=random.4 srandom.4 random.4 urandom.4 Index: share/man/man4/pckbc.4 === RCS file: /cvs/src/share/man/man4/pckbc.4,v retrieving revision 1.17 diff -u -p -r1.17 pckbc.4 --- share/man/man4/pckbc.4 22 Jul 2010 07:41:59 - 1.17 +++ share/man/man4/pckbc.4 21 Sep 2010 18:03:27 - @@ -36,7 +36,6 @@ .Cd "pckbc* at ebus? " Pq "sparc64" .Cd "pckbd* at pckbc?" .Cd "pms* at pckbc?" -.Cd "pmsi* at pckbc?" .Sh DESCRIPTION The .Nm @@ -69,5 +68,4 @@ device flags to 1. .Xr isa 4 , .Xr pckbd 4 , .Xr pms 4 , -.Xr pmsi 4 , .Xr boot_config 8 Index: share/man/man4/pms.4 === RCS file: /cvs/src/share/man/man4/pms.4,v retrieving revision 1.11 diff -u -p -r1.11 pms.4 --- share/man/man4/pms.419 Oct 2007 06:29:36 - 1.11 +++ share/man/man4/pms.421 Sep 2010 18:03:28 - @@ -37,16 +37,13 @@ .Dt PMS 4 .Os .Sh NAME -.Nm pms , -.Nm pmsi +.Nm pms .Nd PS/2 auxiliary port mouse driver .Sh SYNOPSIS .Cd "pms* at pckbc?" .Cd "pms* at gsckbc?" Pq "hppa" .Cd "pms* at mkbc?" Pq "sgi" -.Cd "pmsi* at pckbc?" .Cd "wsmouse* at pms? mux 0" -.Cd "wsmouse* at pmsi? mux 0" .Sh DESCRIPTION The .Nm pms @@ -60,12 +57,13 @@ the PS/2 input port controller found on .Xr pckbc 4 , the standard PC keyboard controller found on most other machines. .Dq pms -is a generic driver which supports 2 coordinate axes and 3 buttons. -The -.Dq pmsi -variant provides specific support for wheel mice of the +is a generic driver which supports mice using common variants of the PS/2 +protocol, including wheel mice of the .Dq IntelliMouse -breed; wheel movements are mapped to a third (z-) axis. +breed. +Wheel movements are mapped to a third (z-) axis. +The driver is +believed to work with both 3-button and 5-button mice with scroll wheels. Mouse related data are accessed by .Xr wsmouse 4 devices. Index: share/man/man4/man4.i386/lms.4 === RCS file: /cvs/src/share/man/man4/man4.i386/lms.4,v retrieving revision 1.10 diff -u -p -r1.10 lms.4 --- share/man/man4/man4.i386/lms.4 31 May 2007 19:19:55 - 1.10 +++ share/man/man4/man4.i386/lms.4 21 Sep 2010 18:03:28 - @@ -53,6 +53,5 @@ devices. .Xr isa 4 , .Xr mms 4 , .Xr pms 4 , -.Xr pmsi 4 , .Xr ums 4 , .Xr wsmouse 4 Index: share/man/man4/man4.i386/mms.4 === RCS file: /cvs/src/share/man/man4/man4.i386/mms.4,v retrieving revision 1.9 diff -u -p -r1.9 mms.4 --- share/man/man4/man4.i386/mms.4 31 May 2007 19:19:55 - 1.9 +++ share/man/man4/man4.i386/mms.4 21 Sep 2010 18:03:28 - @@ -53,6 +53,5 @@ devices. .Xr isa 4 , .Xr lms 4 , .Xr pms 4 , -.Xr pmsi 4 , .Xr ums 4 , .Xr wsmouse 4 Index: sys/arch/alpha/conf/GENERIC === RCS file: /cvs/src/sys/arch/alpha/conf/GENERIC,v retrieving revision 1.215 diff -u -p
COMMUNIQUE FINAL DU 7ème C.P.C
Visitez le portail officiel du Gouvernement de Ctte d'Ivoire, Cliquez ici ( "http://www.gouv.ci"; ) ( "http://www.gouv.ci"; ) CADRE PERMANENT DE CONCERTATION 7hme REUNION DU CADRE PERMANENT DE CONCERTATION (CPC) ( "http://www.gouv.ci/communique_gouv.php?recordID=93"; ) COMMUNIQUE FINAL 1. A l'invitation de Son Excellence Monsieur Blaise COMPAORE, Prisident du Burkina Faso, Facilitateur du Dialogue direct inter ivoirien, la Septihme Riunion du Cadre Permanent de Concertation (CPC) de l'Accord Politique de Ouagadougou (APO) s'est tenue ` Ouagadougou, le mardi 21 septembre 2010. 2. Ont participi ` cette rencontre, outre le Facilitateur, tous les membres du CPC, ` savoir : - Son Excellence Monsieur Laurent GBAGBO, Prisident de la Ripublique de Ctte d'Ivoire ; - Monsieur Guillaume Kigbafori SORO, Premier Ministre ; - Monsieur Henri Konan BEDIE, Prisident du PDCI-RDA ; - Monsieur Alassane Dramane OUATTARA, Prisident du RDR. A lire ici. ( "http://www.gouv.ci/une.php?recordID=1180"; ) [+] Lire plus ( "http://www.gouv.ci/une.php?recordID=1180"; ) Le Conseil des Ministres Le Conseil des Ministres s'est tenu le jeudi 16 septembre 2010, de 12 H ` 14 H au Palais de la Prisidence de la Ripublique au Plateau, sous la prisidence de Son Excellence Monsieur Laurent GBAGBO, Prisident de la Ripublique. . Lire plus [+] ( "http://www.gouv.ci/conseil_ministre.php?recordID=84"; ) Le Site Web de la semaine - ( "http://www.plan.gouv.ci/"; ) >> Visitez ce site >> ( "http://www.plan.gouv.ci/"; ) Grands dossiers ( "http://www.gouv.ci/ajustemet_prix_petrol31052010.php"; ) -- ( "http://www.gouv.ci/cndep.php"; ) LA COMMUNICATION AU COEUR DE L'ACTION GOUVERNEMENTALE ( "http://www.gouv.ci"; ) Continuez de nous faire part de vos suggestions ( "http://www.gouv.ci/webmaster.php"; ). Merci ` toutes celles et tous ceux qui nous ont dij` icrit ! Si vous ne souhaitez plus recevoir notre lettre d'informations, cliquez ici pour vous disabonner [demime 1.01d removed an attachment of type image/jpeg which had a name of =?iso-8859-1?Q?ajustemet=5Fprix=5Foro2.Jpg?=] [demime 1.01d removed an attachment of type image/jpeg which had a name of =?iso-8859-1?Q?cndep6082010.jpg?=] [demime 1.01d removed an attachment of type image/jpeg which had a name of =?iso-8859-1?Q?gouvletter.jpg?=] [demime 1.01d removed an attachment of type image/jpeg which had a name of =?iso-8859-1?Q?IMG=5F6407.Jpg?=] [demime 1.01d removed an attachment of type image/jpeg which had a name of =?iso-8859-1?Q?logo.jpg?=] [demime 1.01d removed an attachment of type image/jpeg which had a name of =?iso-8859-1?Q?Minist=E8re_du_plan_et_du_d=E9veloppement.Jpg?=]
Servicio de Asistencia Remota
Septiembre :: PcDiscount (*)Bases y Condiciones. Oferta valida unicamente para nuestros clientes compradores de equipos Notebooks y Desktop durante el periodo del 15/9 al 15/10. Servicio brindado en forma gratuita desde el 1 al 30 Septiembre del 2010 con una duracion de 20 minutos por cada sesion de asistencia remota en los dias y horarios convenidos de lunes a vienes de 10Hs a 18Hs.
Re: pflog overhaul
and on top of the previous pflog diffs - pass original src and dst out to userland and make tcpdump print them with -v and only if some rewriting going on 02:06:54.231602 rule 9/(match) [uid 0, pid 27595] pass in on re0: [orig src 192.168.254.52:33986, dst 192.168.254.84:] 192.168.254.52.33986 > 127.0.0.1.22: S 2714208976:2714208976(0) win 16384 (ttl 64, id 17254, len 64) Index: sys/net/if_pflog.c === RCS file: /cvs/src/sys/net/if_pflog.c,v retrieving revision 1.29 diff -u -p -r1.29 if_pflog.c --- sys/net/if_pflog.c 21 Sep 2010 04:06:37 - 1.29 +++ sys/net/if_pflog.c 21 Sep 2010 08:10:35 - @@ -286,6 +286,8 @@ pflog_bpfcopy(const void *src_arg, void } pf_hdrs; struct pf_pdesc pd; + struct pf_addr osaddr, odaddr; + u_int16_tosport, odport; m = src_arg; dst = dst_arg; @@ -297,6 +299,7 @@ pflog_bpfcopy(const void *src_arg, void pfloghdr = mtod(m, struct pfloghdr *); count = min(m->m_len, len); bcopy(pfloghdr, dst, count); + pfloghdr = (struct pfloghdr *)dst; dst += count; len -= count; m = m->m_next; @@ -333,8 +336,20 @@ pflog_bpfcopy(const void *src_arg, void if (pf_setup_pdesc(pfloghdr->af, pfloghdr->dir, &pd, mfake, &action, &reason, NULL, NULL, NULL, NULL, &off, &hdrlen) == -1) return; - if (pf_translate(&pd, &pfloghdr->saddr, pfloghdr->sport, - &pfloghdr->daddr, pfloghdr->dport, 0, pfloghdr->dir, mfake)) + + PF_ACPY(&osaddr, pd.src, pd.af); + PF_ACPY(&odaddr, pd.dst, pd.af); + osport = *pd.sport; + odport = *pd.dport; + + if ((pfloghdr->rewritten = pf_translate(&pd, &pfloghdr->saddr, + pfloghdr->sport, &pfloghdr->daddr, pfloghdr->dport, 0, + pfloghdr->dir, mfake))) { m_copyback(mfake, off, min(mfake->m_len - off, hdrlen), pd.hdr.any, M_NOWAIT); + PF_ACPY(&pfloghdr->saddr, &osaddr, pd.af); + PF_ACPY(&pfloghdr->daddr, &odaddr, pd.af); + pfloghdr->sport = osport; + pfloghdr->dport = odport; + } } Index: sys/net/if_pflog.h === RCS file: /cvs/src/sys/net/if_pflog.h,v retrieving revision 1.16 diff -u -p -r1.16 if_pflog.h --- sys/net/if_pflog.h 21 Sep 2010 04:06:37 - 1.16 +++ sys/net/if_pflog.h 21 Sep 2010 08:10:35 - @@ -53,7 +53,8 @@ struct pfloghdr { uid_t rule_uid; pid_t rule_pid; u_int8_tdir; - u_int8_tpad[3]; + u_int8_trewritten; + u_int8_tpad[2]; struct pf_addr saddr; struct pf_addr daddr; u_int16_t sport; Index: usr.sbin/tcpdump/print-pflog.c === RCS file: /cvs/src/usr.sbin/tcpdump/print-pflog.c,v retrieving revision 1.21 diff -u -p -r1.21 print-pflog.c --- usr.sbin/tcpdump/print-pflog.c 26 Jun 2010 16:47:07 - 1.21 +++ usr.sbin/tcpdump/print-pflog.c 21 Sep 2010 08:10:35 - @@ -21,6 +21,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#include #include #include #include @@ -43,6 +44,8 @@ struct rtentry; #include +#include + #include #include #include @@ -152,6 +155,22 @@ pflog_if_print(u_char *user, const struc if (vflag && hdr->pid != NO_PID) printf("[uid %u, pid %u] ", (unsigned)hdr->uid, (unsigned)hdr->pid); + if (vflag && hdr->rewritten) { + char buf[48]; + + if (inet_ntop(hdr->af, &hdr->saddr.v4, buf, + sizeof(buf)) == NULL) + printf("[orig src ?, "); + else + printf("[orig src %s:%u, ", buf, + ntohs(hdr->sport)); + if (inet_ntop(hdr->af, &hdr->daddr.v4, buf, + sizeof(buf)) == NULL) + printf("dst ?] "); + else + printf("dst %s:%u] ", buf, + ntohs(hdr->dport)); + } } af = hdr->af; length -= hdrlen; -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services, http://bsws.de Full-Service ISP - Secure Hosting, Mail and DNS Services Dedicated Servers, Rootservers, Application Hosting