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]
Message-ID: <20120917020741.GA3841@kroah.com>
Date:	Sun, 16 Sep 2012 19:07:41 -0700
From:	Greg KH <greg@...ah.com>
To:	Shuah Khan <shuah.khan@...com>
Cc:	konrad.wilk@...cle.com, joerg.roedel@....com, tglx@...utronix.de,
	mingo@...hat.com, hpa@...or.com, rob@...dley.net,
	akpm@...ux-foundation.org, bhelgaas@...gle.com,
	stern@...land.harvard.edu, shuahkhan@...il.com,
	devel@...uxdriverproject.org, x86@...nel.org,
	LKML <linux-kernel@...r.kernel.org>, linux-doc@...r.kernel.org
Subject: Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

On Sun, Sep 16, 2012 at 06:52:51PM -0600, Shuah Khan wrote:
> +void debug_dma_dump_map_errors(struct device *dev, int all)
> +{
> +	if (all) {
> +		dev_info(dev,
> +			 "DMA-API: DMA map error summary:\n"
> +			 "DMA map errors returned = %d\n"
> +			 "DMA map errors not checked = %d\n"
> +			 "DMA unmap errors = %d\n"
> +			 "SWIOTLB overflow triggers = %d\n",
> +			 dev->dma_map_errors,
> +			 dev->dma_map_errors_not_checked,
> +			 dev->dma_unmap_errors,
> +			 dev->iotlb_overflow_cnt);
> +		return;
> +	}
> +
> +	if (dev->dma_map_errors_not_checked) {
> +		dev_err(dev,
> +			"DMA-API: Driver failed to check\n"
> +			"%d out of a total of %d DMA map errors returned\n"
> +			"by DMA mapping interfaces\n",
> +			dev->dma_map_errors_not_checked,
> +			dev->dma_map_errors);
> +	}
> +
> +	if (dev->dma_unmap_errors) {
> +		dev_err(dev,
> +			"DMA-API: Driver tried to free invalid\n"
> +			"DMA addresses %d times\n",
> +			dev->dma_unmap_errors);
> +	}
> +
> +	if (dev->iotlb_overflow_cnt) {
> +		dev_err(dev,
> +			"DMA-API: SWIOTLB overflow buffer triggered %d times\n",
> +			dev->iotlb_overflow_cnt);
> +	}
> +}
> +EXPORT_SYMBOL(debug_dma_dump_map_errors);

Don't use syslog for stuff like this, that's not good.  Why not use
debugfs?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ