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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 7 May 2014 16:33:17 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, cooldavid@...ldavid.org
Subject: Re: [PATCH] jme: Fix DMA unmap warning

On Wed, May 07, 2014 at 03:56:13PM -0400, David Miller wrote:
> From: Neil Horman <nhorman@...driver.com>
> Date: Mon,  5 May 2014 14:51:47 -0400
> 
> > The jme driver forgot to check the return status from pci_map_page in its tx
> > path, causing a dma api warning on unmap.  Easy fix, just do the check and
> > augment the tx path to tell the stack that the driver is busy so we re-queue the
> > frame.
> > 
> > Signed-off-by: Neil Horman <nhorman@...driver.com>
> 
> Applied thanks Neil.
> 
No problem.

> Probably we should eventually come up with a perhaps more suitable recovery
> scheme in the generic netdev queuing layer for these situations.
> 
> If a mapping fails, usually it's because of resource exhaustion and that's
> a "wait and try again" type situation in hoping that whatever releases
> are keeping the allocation from happening will get released.
> 
> But that's not exactly what we do right now when NETDEV_TX_BUSY is
> signalled.  We'll just loop over and over in the TX software interrupt
> handler for the qdisc.
> 
> Perhaps an hrtimer or similar would be more appropriate.
> 
Hm, timers seem like they might be a bit too 'dead reckoned' I think.  I.e.
theres no correlation or interlock between how long we set the timer to expire,
and the likelyhood that the resource limitation is cleared (or was cleared and
recurred from a subsequent glut of traffic).  

Perhaps a solution is a signalling mechanism tied to completion interrupts?
I.e. a mapping failure gets reported to the stack, which causes the
correspondnig queue to be stopped, until such time a the driver signals a safe
restart by the reception of a tx completion interrupt?  I'm actually tinkering
right now with a mechanism that provides guidance to the stack as to how many
dma descriptors are available in a given net_device that might come in handy
here
Neil

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ