Re: RFC: i386: kill !4KSTACKS

From: Mark Lord (lkml_at_rtr.ca)
Date: 09/07/05

  • Next message: Jeff Garzik: "Re: [PATCH 2.6.13] libata: use common pci remove in ahci"
    Date:	Tue, 06 Sep 2005 21:59:22 -0400
    To: Daniel Phillips <phillips@istop.com>
    
    

    Daniel Phillips wrote:
    > There are only two stacks involved, the normal kernel stack and your new ndis
    > stack. You save ESP of the kernel stack at the base of the ndis stack. When
    > the Windows code calls your api, you get the ndis ESP, load the kernel ESP
    > from the base of the ndis stack, push the ndis ESP so you can get back to the
    > ndis code later, and continue on your merry way.

    With CONFIG_PREEMPT, this will still cause trouble due to lack
    of "current" task info on the NDIS stack.

    One option is to copy (duplicate) the bottom-of-stack info when
    switching to the NDIS stack.

    Another option is to stick a Mutex around any use of the NDIS stack
    when calling into the foreign driver (might be done like this already??),
    which will prevent PREEMPTion during the call.

    Cheers
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Jeff Garzik: "Re: [PATCH 2.6.13] libata: use common pci remove in ahci"

    Relevant Pages

    • Re: RFC: i386: kill !4KSTACKS
      ... >> There are only two stacks involved, the normal kernel stack and your new ... You save ESP of the kernel stack at the base of the ndis ... When the Windows code calls your api, you get the ndis ESP, load ...
      (Linux-Kernel)
    • Re: Force IP packets on the wire.
      ... direct send handlers, and not throught TDI subsystem, thus the TDI_SEND IRPs ... Ironically, XP builds of stack ... passthru NDIS sample, should not take much time to write a prototype. ... I am writting a network test tool for testing a networked ...
      (microsoft.public.win32.programmer.networks)
    • Re: RFC: i386: kill !4KSTACKS
      ... > Daniel> stack and your new ndis stack. ... You save ESP of the kernel ... > Daniel> stack at the base of the ndis stack. ...
      (Linux-Kernel)
    • Re: RFC: i386: kill !4KSTACKS
      ... Daniel> stack and your new ndis stack. ... Daniel> stack at the base of the ndis stack. ... Daniel> code calls your api, you get the ndis ESP, load the kernel ...
      (Linux-Kernel)
    • Re: Modifying stack
      ... > We have a NDIS Miniport driver that uses ADSL and ATM stack that are part of it. ... However, when we use XP DDK or Server 2003 DDK to build the driver, we get an error for changing the esp/ebp value. ... Why to allocate data this big on kernel stack when you have the pool. ...
      (microsoft.public.development.device.drivers)