lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 07 Jul 2008 16:56:38 -0500 From: Travis Stratman <tstratman@...cinc.com> To: James Chapman <jchapman@...alix.com> Cc: netdev@...r.kernel.org Subject: Re: data received but not detected On Sun, 2008-06-22 at 10:16 +0100, James Chapman wrote: > > I looked at macb.c and can see that it uses napi only for rx work, > leaving tx interrupts enabled at all times. The interrupt handler reads > the device interrupt status when a tx interrupt happens and may find rx > bits also set. As a result, your netif_rx_schedule_prep() will sometimes > return false because napi might be already scheduled. The code you have > above (i.e. the "driver bug" case) is wrong. Thanks for the reply James. That is somewhat confusing to me because once an rx interrupt is detected and the rx interrupts are disabled the rx bits should not be set in the interrupt status register until they are re-enabled again after polling has finished. Can you explain your point a little more? >>From what I can tell, an interrupt would need to come in between when the ISR is read and when the rx bits are tested and rx ints are disabled for it to be there the next time around in the while(status) loop. Looking at it that way, it is completely possible. > The napi code in the in-tree version looks suspect because it seems to > enable rx interrupts unconditionally regardless of whether napi rx > processing is complete. Correct, this is one of the reasons that I rewrote the driver poll function. There are a couple of other issues that I noticed as well. > It might help to post a patch here showing all of your changes. Did this earlier today, I should get a patch against 2.6.25 up tomorrow which will be a little more useful. Thanks! Travis -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists