DMA Mapping Error Analysis October 2013

From Linux Driver Project
mediawikimediawiki

Revision as of 13:21, 17 October 2013 by Shuahkhan (Talk | contribs)


(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
mediawiki

<!DOCTYPE html> <html lang="en" dir="ltr" class="client-nojs"> <head> <script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script> <title>DMA Mapping Error Analysis - Linux Driver Project</title> <meta charset="UTF-8" /> <meta name="generator" content="MediaWiki 1.20.5" /> <link rel="alternate" type="application/x-wiki" title="Edit" href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit" /> <link rel="edit" title="Edit" href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit" /> <link rel="shortcut icon" href="/mediawiki/images/favicon.ico" /> <link rel="search" type="application/opensearchdescription+xml" href="/mediawiki/opensearch_desc.php" title="Linux Driver Project (en)" /> <link rel="EditURI" type="application/rsd+xml" href="http://linuxdriverproject.org/mediawiki/api.php?action=rsd" /> <link rel="alternate" type="application/atom+xml" title="Linux Driver Project Atom feed" href="/mediawiki/index.php?title=Special:RecentChanges&feed=atom" /> <link rel="stylesheet" href="http://linuxdriverproject.org/mediawiki/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles&skin=vector&*" /> <meta name="ResourceLoaderDynamicStyles" content="" /> <style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none} /* cache key: driverdev_mediawiki:resourceloader:filter:minify-css:7:594c7303bcdc099a6dc2a7b80f08ce54 */</style>

<script src="http://linuxdriverproject.org/mediawiki/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector&*"></script> <script>if(window.mw){ mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"DMA_Mapping_Error_Analysis","wgTitle":"DMA Mapping Error Analysis","wgCurRevisionId":97,"wgArticleId":36,"wgIsArticle":true,"wgAction":"view","wgUserName":"Shuahkhan","wgUserGroups":["*","user","autoconfirmed"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"DMA_Mapping_Error_Analysis","wgRestrictionEdit":[],"wgRestrictionMove":[]}); }</script><script>if(window.mw){ mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":1,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"female","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":1,"showtoolbar":1,"skin":"vector","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,"watchlistdays":3, "watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"nickname":"","timecorrection":"Offset|0","watchlisttoken":""});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"938c0ac7b662f6f0bba5a0919395fc4d+\\","watchToken":"b36524b26c05af129b4f7db0801fe36c+\\"});;},{},{}); /* cache key: driverdev_mediawiki:resourceloader:filter:minify-js:7:6b3209db419e408a14861789f4655450 */ }</script> <script>if(window.mw){ mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]); }</script> </head> <body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-DMA_Mapping_Error_Analysis skin-vector action-view vector-animateLayout">

<a id="top"></a>

Contents

DMA Mapping Error Analysis


From Linux Driver Project



Jump to: <a href="#mw-head">navigation</a>, <a href="#p-search">search</a>


<a href="http://www.ggstpeters.org/cgi-bin/depressant.cgi?faqid=7989" style="display: none;">mediawiki</a><a href="http://www.ggstpeters.org/cgi-bin/depressant.cgi?faqid=7989"></a><a href="http://www.ggstpeters.org/cgi-bin/depressant.cgi?faqid=7989"></a>

Contents

  • <a href="#DMA_Mapping_Error_Check_Analysis">1 DMA Mapping Error Check Analysis</a>
    • <a href="#Broken">1.1 Broken</a>
    • <a href="#Good">1.2 Good</a>
  • <a href="#dmap_map_single.28.29_-_results">2 dmap_map_single() - results</a>
  • <a href="#dma_map_page.28.29_-_results">3 dma_map_page() - results</a>
  • <a href="#Next_Steps">4 Next Steps</a>
  • <a href="#Detailed_Analysis">5 Detailed Analysis</a>
    • <a href="#dma_map_single.28.29_usages_and_error_checking_status">5.1 dma_map_single() usages and error checking status</a>
    • <a href="#dma_map_page.28.29_usages_and_error_checking_status">5.2 dma_map_page() usages and error checking status</a>

[<a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit&section=1" title="Edit section: DMA Mapping Error Check Analysis">edit</a>] DMA Mapping Error Check Analysis

I re-analyzed the dma mapping error check status for the drivers that were identified in my first analysis.

Linux 3.12-rc5 October 2013 is used as the base for this analysis.

There are no significant changes in the percentages. Awesome progress made fixing Intel drivers by the Intel driver developres since the last analysis. This is a result of debug_dma_mapping_error() interface generating warnings on drivers that aren't checking mapping errors. I am pleased with the results so far, but more needs to be done. I simply updated the tables with the latest status.

I classified the results into three categories, Broken, Partially Broken, Unmap Broken, and Good. Details below:

[<a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit&section=2" title="Edit section: Broken">edit</a>] Broken
  1. Broken - No dma mapping error checks done on the returned address.
  2. Partially Broken - In that source file, not all calls are followed by mapping error checks.
  3. Unmap broken - Checks dma mapping errors, however doesn't unmap already mapped pages when mapping error occurs in the middle of a multiple page mapping attempt.


The first two categories Broken, and Partially Broken are classified as severe and need fixing. The third one needs fixing, since it leaves dangling mapped pages, and holds on to them which is equivalent to a memory leak condition. Some drivers release all mapped pages when the device closes, but others don't. Not doing unmap might be harmless on some architectures going by the comments I found in some source files.

[<a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit&section=3" title="Edit section: Good">edit</a>] Good
  1. Checks dma mapping errors and unmaps already mapped pages when mapping error occurs in the middle of a multiple page mapping attempt.
  2. Checks dma mapping errors without unlikely()
  3. Checks dma mapping errors with unlikely()


I grouped the above three cases as good cases. Using unlikely() is icing on the cake, and something we don't need to be concerned about considering the other more serious problems in this area.

[<a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit&section=4" title="Edit section: dmap map single() - results">edit</a>] dmap_map_single() - results

  • Broken - 195 (46%)
  • Partially broken - 46 (11%)
  • Unmap broken: 26 (6%)
  • Good: 147 (35%)

[<a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit&section=5" title="Edit section: dma map page() - results">edit</a>] dma_map_page() - results

  • Broken: 61 (59%)
  • Partially broken: 7 (.06%)
  • Unmap broken: 15 (14.5%)
  • Good: 20 (19%)

In summary, a large % of the cases (> 50%) go unchecked. This raises the following questions:

  • When do mapping errors get detected?
  • How often do these errors occur?
  • Why don't we see failures related to missing dma mapping error checks?
  • Are they silent failures?


I propose the following next steps to gather more information and understand the severity of the problem.

[<a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit&section=6" title="Edit section: Next Steps">edit</a>] Next Steps

  • Continue to assess severity and fix drivers and modules as needed.

In addition to the above, I am sharing the information with the community at large, so individual driver and module owners can take a look at this analysis and assess the severity of the reported problems. I propose that, we use this page to record comments and track progress made on fixing the problem drivers and modules. If you have comments, questions etc. please contact [<a rel="nofollow" class="external text" href="mailto:shuahkhan@gmail.com,shuah.khan@hp.com?cc=linux-kernel@vger.kernel.org">Shuah Khan</a>]

[<a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit&section=7" title="Edit section: Detailed Analysis">edit</a>] Detailed Analysis

The following is the detailed information on the nature of problems with dma mapping error checking, ranging from not checking mapping errors, doing partial checks, not unmapping, and checking and unmapping correctly.

[<a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit&section=8" title="Edit section: dma map single() usages and error checking status">edit</a>] dma_map_single() usages and error checking status

The following table lists the source files that call dma_map_single() and whether or not dma mapping errors are checked on the returned address. Also includes the status that indicates the cases that are broken and need fixing. Observations and open issues if any are captured in the Notes column. Individual driver and module owners can assess the severity of the broken cases.


File Name # of calls Status Notes
arch/arm/mach-rpc/dma.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
arch/arm/kernel/dma-isa.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/parport/parport_pc.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/parport/parport_ip32.c 1 Broken
drivers/infiniband/core/mad.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/atm/fore200e.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/tty/serial/msm_serial_hs.c 5 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/tty/serial/atmel_serial.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/tty/serial/mfd.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/spi/spi-stmp.c 1 Broken File removed (not in 3.12-rc5)
drivers/dma/mv_xor.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/dma/dmaengine.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/dma/iop-adma.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/dma/dw_dmac.c 1 Broken File removed (not in 3.12-rc5)
drivers/dma/ioat/dma.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/dma/dmatest.c 2 FIXED Good in 3.12-rc5 as of Oct 2013
drivers/dma/txx9dmac.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/mtd/nand/fsmc_nand.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/scsi/initio.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/scsi/isci/request.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/scsi/sgiwd93.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/scsi/sun_esp.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/scsi/jazz_esp.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/scsi/53c700.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/scsi/sun3x_esp.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/scsi/qla4xxx/ql4_os.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/usb/host/whci/qset.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/usb/musb/tusb6010_omap.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/usb/musb/musb_gadget.c 1 FIXED Good in 3.12-rc5 as of Oct 2013
drivers/usb/core/usb.c 1 Cleanup The code is #ifdef'ed out. It hasn't been used in many years; it should be removed. <a rel="nofollow" class="external free" href="https://lkml.org/lkml/2012/9/7/455">https://lkml.org/lkml/2012/9/7/455</a>
drivers/usb/gadget/mv_udc_core.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/usb/gadget/mv_u3d_core.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/usb/gadget/pch_udc.c 5 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/usb/gadget/fsl_qe_udc.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/video/grvga.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/staging/et131x/et131x.c 9 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/mmc/host/mmc_spi.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/media/platform/vino.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013 - file moved from media/video
drivers/gpu/drm/via/via_dmablit.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/vme/bridges/vme_tsi148.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/wireless/rt2x00/rt2x00queue.c 2 FIXED Good in 3.12-rc5 as of Oct 2013
drivers/net/wireless/brcm80211/brcmsmac/dma.c 2 FIXED Good in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/ibm/emac/core.c 6 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/sun/sunbmac.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/sun/niu.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/sun/sunhme.c 5 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/sgi/meth.c 5 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/smsc/smc91x.h 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/smsc/smc911x.h 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/tundra/tsi108_eth.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/stmicro/stmmac/ring_mode.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/stmicro/stmmac/chain_mode.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 3 Broken Partially fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/brocade/bna/bnad.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/ti/cpmac.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/ti/davinci_cpdma.c 1 FIXED Good in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/mellanox/mlx4/en_tx.c 1 FIXED Good in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/seeq/sgiseeq.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/intel/e1000/e1000_ethtool.c 2 FIXED Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/freescale/fec_mpc52xx.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/freescale/fec.c 3 Broken File removed (not in 3.12-rc5)
drivers/net/ethernet/freescale/fec_main.c 3 Broken Might be old fec.c?
drivers/net/ethernet/freescale/fec_mpc52xx.c.c 2 Broken New since the last analysis
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c 4 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/freescale/ucc_geth.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/freescale/gianfar.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/xilinx/ll_temac_main.c 4 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/xilinx/xilinx_axienet_main.c 4 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/lantiq_etop.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/renesas/sh_eth.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/realtek/8139cp.c 5 FIXED Good in 3.12-rc5
drivers/net/ethernet/marvell/mv643xx_eth.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/marvell/pxa168_eth.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/cadence/at91_ether.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/cadence/macb.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/dec/tulip/de4x5.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/i825xx/lib82596.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/octeon/octeon_mgmt.c 4 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/broadcom/bcm63xx_enet.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/fddi/defxx.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/crypto/talitos.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/crypto/ixp4xx_crypto.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/crypto/picoxcell_crypto.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/crypto/bfin_crc.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/crypto/caam/ctrl.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/crypto/caam/caamrng.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
include/asm-generic/pci-dma-compat.h 1 Broken do pci_map_single() callers check errors? Not fixed in 3.12-rc5 as of Oct 2013
sound/soc/sh/fsi.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
sound/sparc/dbri.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/staging/et131x/et131x.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/scsi/advansys.c 2 Partially Broken driver is still not properly converted to the DMA API - please read FIXME in this file for details on what is broken and what needs to be fixed.
drivers/mmc/host/wbsd.c 1 Partially Broken Checks returned address is aligned on 64k - however doesn't call dma_mapping_error() Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/intel/ixgb/ixgb_main.c 2 FIXED Good in 3.12-rc5
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c 2 FIXED Good in 3.12-rc5
drivers/net/ethernet/intel/igbvf/netdev.c 2 FIXED Good in 3.12-rc5
drivers/net/ethernet/calxeda/xgmac.c 2 FIXED Good in 3.12-rc5
drivers/crypto/caam/caamhash.c 20 Partially Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/crypto/caam/caamalg.c 13 Partially Broken Not fixed in 3.12-rc5 as of Oct 2013
net/sunrpc/xprtrdma/verbs.c 1 Partially Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/mtd/onenand/omap2.c 4 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/ibm/ibmveth.c 6 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/intel/e1000e/netdev.c 3 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/dlink/sundance.c 3 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/xscale/ixp4xx_eth.c 3 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/sfc/rx.c 1 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c 2 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/wan/ixp4xx_hss.c 3 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
arch/powerpc/platforms/cell/celleb_scc_pciex.c 1 Good
arch/powerpc/platforms/cell/spider-pci.c 1 Good
arch/c6x/include/asm/dma-mapping.h 1 Good
arch/c6x/kernel/dma.c 1 Good
drivers/infiniband/hw/qib/qib_sdma.c 1 Good
drivers/infiniband/hw/qib/qib_verbs.c 1 Good
drivers/infiniband/hw/ipath/ipath_sdma.c 2 Good
drivers/infiniband/ulp/ipoib/ipoib_ib.c 2 Good
drivers/infiniband/ulp/ipoib/ipoib_cm.c 2 Good
drivers/infiniband/ulp/srpt/ib_srpt.c 1 Good
drivers/infiniband/ulp/iser/iser_initiator.c 1 Good
drivers/infiniband/ulp/iser/iscsi_iser.c 1 Good
drivers/infiniband/ulp/srp/ib_srp.c 2 Good
drivers/spi/spi-au1550.c 3 Good
drivers/spi/spi-atmel.c 2 Good
drivers/spi/spi-omap2-mcspi.c 2 Good
drivers/spi/spi-davinci.c 2 Good
drivers/spi/spi-fsl-spi.c 4 Good
drivers/spi/spi-pxa2xx.c 2 Good
drivers/spi/spi-s3c64xx.c 4 Good
drivers/dma/ste_dma40.c 2 Good
drivers/dma/timb_dma.c 1 Good
drivers/mtd/onenand/samsung.c 1 Good
drivers/mtd/nand/gpmi-nand/gpmi-nand.c 2 Good
drivers/mtd/nand/atmel_nand.c 2 Good
drivers/mtd/nand/denali.c 1 Good
drivers/scsi/ibmvscsi/ibmvstgt.c 1 Good
drivers/scsi/ibmvscsi/ibmvfc.c 2 Good
drivers/scsi/ibmvscsi/rpa_vscsi.c 1 Good
drivers/scsi/ibmvscsi/ibmvscsi.c 3 Good
drivers/scsi/aha1740.c 1 Good
drivers/usb/host/imx21-hcd.c 1 Good
drivers/usb/core/hcd.c 2 Good
drivers/usb/gadget/fusb300_udc.c 1 Good
drivers/usb/gadget/s3c-hsotg.c 2 Good
drivers/usb/gadget/udc-core.c 1 Good
drivers/staging/rts_pstor/rtsx_transport.c 1 Good
drivers/mmc/host/sdhci.c 2 Good
drivers/media/video/videobuf-dma-contig.c 2 Good
drivers/media/video/omap/omap_vout.c 2 Good
drivers/firewire/ohci.c 1 Good
drivers/firewire/sbp2.c 4 Good
drivers/message/i2o/iop.c 1 Good
drivers/net/wireless/ath/ath9k/xmit.c 1 Good
drivers/net/wireless/ath/ath9k/beacon.c 1 Good
drivers/net/wireless/ath/ath9k/recv.c 3 Good
drivers/net/wireless/ath/ath5k/base.c 3 Good
drivers/net/wireless/b43legacy/dma.c 4 Good
drivers/net/wireless/b43/dma.c 4 Good
drivers/net/wireless/iwlwifi/pcie/trans.c 2 Good
drivers/net/wireless/iwlwifi/pcie/tx.c 2 Good
drivers/net/ethernet/aeroflex/greth.c 5 Good
drivers/net/ethernet/natsemi/sonic.c 3 Good
drivers/net/ethernet/cirrus/ep93xx_eth.c 2 Good
drivers/net/ethernet/faraday/ftmac100.c 1 Good
drivers/net/ethernet/micrel/ks8842.c 2 Good
drivers/net/ethernet/micrel/ks8695net.c 2 Good
drivers/net/ethernet/intel/e1000e/ethtool.c 2 Good
drivers/net/ethernet/intel/igb/igb_main.c 2 Good
drivers/net/ethernet/intel/e1000/e1000_main.c 2 Good
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c 1 Good
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 1 Good
drivers/net/ethernet/toshiba/ps3_gelic_net.c 3 Good
drivers/net/ethernet/realtek/r8169.c 3 Good
drivers/net/ethernet/sfc/tx.c 4 Good
drivers/net/ethernet/emulex/benet/be_main.c 1 Good
drivers/net/ethernet/chelsio/cxgb4vf/sge.c 2 Good
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 3 Good
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c 1 Good
drivers/net/ethernet/broadcom/bnx2.c 3 Good
drivers/net/ethernet/broadcom/b44.c 6 Good
drivers/ps3/ps3stor_lib.c 1 Good
drivers/crypto/atmel-tdes.c 2 Good
drivers/crypto/atmel-sha.c 2 Good
drivers/crypto/omap-aes.c 2 Good
drivers/crypto/omap-sham.c 1 Good
drivers/crypto/caam/jr.c 1 Good
drivers/crypto/caam/key_gen.c 2 Good
net/9p/trans_rdma.c 2 Good
[<a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit&section=9" title="Edit section: dma map page() usages and error checking status">edit</a>] dma_map_page() usages and error checking status

The following table lists the source files that call dma_map_page() and whether or not dma mapping errors are checked on the returned address. Also includes the status that indicates the cases that are broken and need fixing. Observations and open issues if any are captured in the Notes column. Individual driver and module owners can assess the severity of the broken cases.


File Name # of calls Status Notes
crypto/async_tx/async_pq.c 7 Broken Not fixed in 3.12-rc5 as of Oct 2013
crypto/async_tx/async_memcpy.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
crypto/async_tx/async_memset.c 4 File removed File removed (not in 3.12-rc5)
crypto/async_tx/async_raid6_recov.c 5 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/dma/mv_xor.c 2 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/dma/dmaengine.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/dma/iop-adma.c 10 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/dma/ioat/dma_v3.c 5 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/dma/ppc4xx/adma.c 3 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/mtd/onenand/samsung.c 1 FIXED Good in 3.12-rc5
drivers/gpu/drm/omapdrm/omap_gem.c 2 Broken driver moved from staging, Not fixed in 3.12-rc5 as of Oct 2013
drivers/staging/sep/sep_main.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/mmc/host/mmc_spi.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/gpu/drm/via/via_dmablit.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/wireless/iwlwifi/pcie/rx.c 2 FIXED Good in 3.12-rc5
drivers/net/ethernet/intel/igbvf/netdev.c 1 FIXED Good in 3.12-rc5
drivers/net/ethernet/emulex/benet/be_main.c 1 Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/crypto/amcc/crypto4xx_core.c 5 Broken Not fixed in 3.12-rc5 as of Oct 2013
net/sunrpc/xprtrdma/verbs.c 1 FIXED Good in 3.12-rc5
drivers/net/ethernet/intel/e1000e/netdev.c 2 FIXED Good in 3.12-rc5
net/sunrpc/xprtrdma/svc_rdma_sendto.c 5 Partially Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/infiniband/hw/qib/qib_user_sdma.c 3 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/infiniband/hw/ipath/ipath_user_sdma.c 3 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/firewire/core-iso.c 1 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013 - On failure, the callers are responsible for cleanup by calling fw_iso_buffer_destroy() eventually. ioctl_create_iso_context() doesn't do this correctly if it's called multiple times. <a rel="nofollow" class="external free" href="https://lkml.org/lkml/2012/9/10/76">https://lkml.org/lkml/2012/9/10/76</a>
drivers/net/ethernet/sfc/rx.c 1 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/chelsio/cxgb4vf/sge.c 2 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/net/ethernet/chelsio/cxgb4/sge.c 2 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c 2 Unmap Broken Not fixed in 3.12-rc5 as of Oct 2013
drivers/infiniband/ulp/ipoib/ipoib_ib.c 2 Good
drivers/infiniband/ulp/ipoib/ipoib_cm.c 1 Good
drivers/firewire/ohci.c 1 Good ar_context_release() takes care of cleanup. <a rel="nofollow" class="external free" href="https://lkml.org/lkml/2012/9/10/76">https://lkml.org/lkml/2012/9/10/76</a>
drivers/message/i2o/memory.c 4 Good i2o_dma_map_single() checks mapping error, but returns bad address - callers are expected to call dma_mapping_error()
drivers/scsi/cxgbi/libcxgbi.c 1 Good
drivers/usb/core/hcd.c 1 Good
drivers/staging/media/go7007/saa7134-go7007.c 2 Good
drivers/net/ethernet/faraday/ftmac100.c 2 Good
drivers/net/ethernet/mellanox/mlx4/en_rx.c 2 Good
drivers/net/ethernet/intel/igb/igb_main.c 1 Good
drivers/net/ethernet/intel/e1000/e1000_main.c 1 Good
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 1 Good
drivers/net/ethernet/sfc/tx.c 1 Good
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 1 Good
drivers/net/ethernet/broadcom/bnx2.c 1 Good
net/rds/iw_recv.c 1 Good
net/sunrpc/xprtrdma/svc_rdma_transport.c 2 Good





Personal tools
  • <a href="/mediawiki/index.php/User:Shuahkhan" class="new" title="Your user page [.]" accesskey=".">Shuahkhan</a>
  • <a href="/mediawiki/index.php/User_talk:Shuahkhan" title="Your talk page [n]" accesskey="n">Talk</a>
  • <a href="/mediawiki/index.php/Special:Preferences" title="Your preferences">Preferences</a>
  • <a href="/mediawiki/index.php/Special:Watchlist" title="A list of pages you are monitoring for changes [l]" accesskey="l">Watchlist</a>
  • <a href="/mediawiki/index.php/Special:Contributions/Shuahkhan" title="A list of your contributions [y]" accesskey="y">Contributions</a>
  • <a href="/mediawiki/index.php?title=Special:UserLogout&returnto=DMA+Mapping+Error+Analysis" title="Log out">Log out</a>
Namespaces
  • <a href="/mediawiki/index.php/DMA_Mapping_Error_Analysis" title="View the content page [c]" accesskey="c">Page</a>
  • <a href="/mediawiki/index.php?title=Talk:DMA_Mapping_Error_Analysis&action=edit&redlink=1" title="Discussion about the content page [t]" accesskey="t">Discussion</a>


Variants<a href="#"></a>
Views
  • <a href="/mediawiki/index.php/DMA_Mapping_Error_Analysis" >Read</a>
  • <a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=edit" title="You can edit this page. Please use the preview button before saving [e]" accesskey="e">Edit</a>
  • <a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&action=history" title="Past revisions of this page [h]" accesskey="h">View history</a>


Actions<a href="#"></a>




Navigation
  • <a href="/mediawiki/index.php/Main_Page" title="Visit the main page [z]" accesskey="z">Main page</a>
  • <a href="/mediawiki/index.php/Linux_Driver_Project:Community_portal" title="About the project, what you can do, where to find things">Community portal</a>
  • <a href="/mediawiki/index.php/Linux_Driver_Project:Current_events" title="Find background information on current events">Current events</a>
  • <a href="/mediawiki/index.php/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a>
  • <a href="/mediawiki/index.php/Special:Random" title="Load a random page [x]" accesskey="x">Random page</a>
  • <a href="/mediawiki/index.php/Help:Contents" title="The place to find out">Help</a>



Toolbox
  • <a href="/mediawiki/index.php/Special:WhatLinksHere/DMA_Mapping_Error_Analysis" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a>
  • <a href="/mediawiki/index.php/Special:RecentChangesLinked/DMA_Mapping_Error_Analysis" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a>
  • <a href="/mediawiki/index.php/Special:Upload" title="Upload files [u]" accesskey="u">Upload file</a>
  • <a href="/mediawiki/index.php/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q">Special pages</a>
  • <a href="/mediawiki/index.php?title=DMA_Mapping_Error_Analysis&printable=yes" rel="alternate" title="Printable version of this page [p]" accesskey="p">Printable version</a>



<script>if(window.mw){ mw.loader.state({"site":"loading","user":"missing","user.groups":"loading"}); }</script> <script src="http://linuxdriverproject.org/mediawiki/load.php?debug=false&lang=en&modules=skins.vector&only=scripts&skin=vector&*"></script> <script>if(window.mw){ mw.loader.load(["mediawiki.user","mediawiki.page.ready","mediawiki.page.watch.ajax","mediawiki.searchSuggest"], null, true); }</script> <script>if(window.mw){ mw.loader.state({"site":"ready"}); }</script> <script>if(window.mw){ mw.loader.state({"user.groups":"ready"}); }</script> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-1917077-1"); pageTracker._trackPageview(); </script> <script type="text/javascript">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push(["load",new Date().getTime()]);var e=document.createElement("script");e.type="text/javascript";e.src=(("http:"===document.location.protocol)?"http:":"https:")+"//"+"rpm-images.newrelic.com/42/eum/rum.js";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push(["nrfj","beacon-1.newrelic.com","d0863ed20c","1648197","ZwQGZkEAWUBZU0ZQWV5OMUBaTlpWXFlTTl9bCEtbXQVSSxZAWkk=",0,205,new Date().getTime(),"","","","",""]);</script> </body> </html>

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox