Re: [PATCH] Stability fixes for IPS driver for 4.x

From: David Sze (dsze_at_alumni.uwaterloo.ca)
Date: 04/11/05

  • Next message: Scott Long: "Re: [PATCH] Stability fixes for IPS driver for 4.x"
    Date: Mon, 11 Apr 2005 01:12:10 -0400
    To: Scott Long <scottl@samsco.org>
    
    
    

    At 09:17 AM 09/04/2005 -0600, Scott Long wrote this to All:
    >All,
    >
    >Thanks to the keen eye of David Sze, the cause of the instability in the
    >ips driver in FreeBSD 4.x might have been found. If it's affecting you,
    >please try the attached patch and let me know the results. I'll commit it
    >when everyone is happy with it.

    Scott,

    I think there's a problem with the ips_commands.c patch. After the
    bufq_first call succeeds, bufq_remove must be called before the splx or
    else the iobuf can get issued twice. However, if the subsequent
    ips_get_free_cmd fails, the iobuf must be put back on the bufq.

    Two patches are attached to this message:

    1. ips.RELENG_4.stability.patch is just the stability patch as described.

    2. ips.RELENG_4.mfc-and-stability.patch is an MFC of your IPS cleanup and
    optimization that you committed to HEAD on 01/28/05, plus the stability
    patch as described.

    Both patches survived a "make -j8 buildworld" for me.

    The problem I'm having now is that ips does not appear to be
    PAE-ified. With either patch the bus_dmamap_create call fails. Any
    pointers would be appreciated, this is new territory for me.

    >Thanks,
    >
    >Scott
    >
    >
    >Index: ips_commands.c
    >===================================================================
    >RCS file: /usr/ncvs/src/sys/dev/ips/ips_commands.c,v
    >retrieving revision 1.11.6.1
    >diff -u -r1.11.6.1 ips_commands.c
    >--- ips_commands.c 13 Jan 2005 00:46:40 -0000 1.11.6.1
    >+++ ips_commands.c 9 Apr 2005 15:09:50 -0000
    >@@ -162,8 +162,11 @@
    > void ips_start_io_request(ips_softc_t *sc)
    > {
    > struct buf *iobuf;
    >+ int s
    >
    >+ s = splbio();
    > iobuf = bufq_first(&sc->queue);
    >+ splx(s);
    > if(!iobuf) {
    > return;
    > }
    >@@ -171,8 +174,10 @@
    > if(ips_get_free_cmd(sc, ips_send_io_request, iobuf,
    > IPS_NOWAIT_FLAG)){
    > return;
    > }
    >-
    >+
    >+ s = splbio();
    > bufq_remove(&sc->queue, iobuf);
    >+ splx(s);
    > return;
    > }
    >
    >Index: ips_disk.c
    >===================================================================
    >RCS file: /usr/ncvs/src/sys/dev/ips/ips_disk.c,v
    >retrieving revision 1.6.6.1
    >diff -u -r1.6.6.1 ips_disk.c
    >--- ips_disk.c 13 Jan 2005 00:46:40 -0000 1.6.6.1
    >+++ ips_disk.c 9 Apr 2005 15:07:50 -0000
    >@@ -128,12 +128,15 @@
    > static void ipsd_strategy(struct buf *iobuf)
    > {
    > ipsdisk_softc_t *dsc;
    >+ int s;
    >
    > dsc = iobuf->b_dev->si_drv1;
    > DEVICE_PRINTF(8,dsc->dev,"in strategy\n");
    > devstat_start_transaction(&dsc->stats);
    > iobuf->b_driver1 = (void
    > *)(uintptr_t)dsc->sc->drives[dsc->disk_number].drivenum;
    >- bufqdisksort(&dsc->sc->queue, iobuf);
    >+ s = splbio();
    >+ bufq_insert_tail(&dsc->sc->queue, iobuf);
    >+ splx(s);
    > ips_start_io_request(dsc->sc);
    > }
    >

    
    
    
    

    _______________________________________________
    freebsd-stable@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-stable
    To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"




  • Next message: Scott Long: "Re: [PATCH] Stability fixes for IPS driver for 4.x"

    Relevant Pages

    • Re: IPS, alternative solutions
      ... I think we can all agree that IPS is no replacement for Patch ... My point is that there is no demonstrable ROI that I have ... > Scott, to answer your question on cost effective, perhaps IPS will more than ...
      (Focus-IDS)
    • RE: IPS, alternative solutions
      ... I agree with Paul that IPS is not a solution to replace existing patch ... WITH IPS installed. ... Scott, to answer your question on cost effective, perhaps IPS will more than ... obvious when a worm hits before you can complete the patch installation. ...
      (Focus-IDS)
    • RE: IDSIPS that can handle one Gig
      ... thoughts about the relationship between IPS and VM out on the table. ... PES>> Actually, it is an attitude borne out of entirely too much experience ... hundreds per year) where there is an effective patch and vulnerability ... management that can keep pace with the exploits in the wild. ...
      (Focus-IDS)
    • Re: HEADS UP [Re: thread+preemption stability improvement]
      ... > Scott Long wrote: ... >> Initial testing of this patch looks very promising. ... > fan gets spinning faster and faster as if cpu temperature is raising). ... > witness messages like these and I turned on debug.mpsafenet=1. ...
      (freebsd-current)
    • Re: [PATCH] Stability fixes for IPS driver for 4.x
      ... David Sze wrote: ... >> please try the attached patch and let me know the results. ... > The problem I'm having now is that ips does not appear to be PAE-ified. ... Making a driver PAE-ified means either teaching it to do 64-bit ...
      (freebsd-stable)