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:	Mon, 16 May 2011 13:00:29 +0200
From:	"Roedel, Joerg" <Joerg.Roedel@....com>
To:	Johannes Berg <johannes@...solutions.net>
CC:	linux-kernel <linux-kernel@...r.kernel.org>,
	David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH v2] dma-debug: print some unfreed allocations

On Wed, May 11, 2011 at 08:47:57AM -0400, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@...el.com>

> +#ifdef CONFIG_STACKTRACE
> +		count = 0;
> +		/*
> +		 * If we have, print out some stack traces for the allocations.
> +		 * In case of module unload, the stack traces will be useless,
> +		 * but instead of unloading the module you can manually unbind
> +		 * the driver instead and get useful traces.
> +		 */
> +		printk(KERN_WARNING "Showing traces for %d allocations:\n",
> +		       DMA_DEBUG_NUM_PRINT_UNFREED);
> +
> +		for (i = 0; i < HASH_SIZE; ++i) {
> +			spin_lock(&dma_entry_hash[i].lock);
> +			list_for_each_entry(entry, &dma_entry_hash[i].list,
> +					    list) {
> +				if (entry->dev != dev)
> +					continue;
> +				count += 1;
> +				if (count > DMA_DEBUG_NUM_PRINT_UNFREED)
> +					break;
> +				dump_entry_trace(entry);
> +			}
> +			spin_unlock(&dma_entry_hash[i].lock);
>  
> -	return count;
> +			if (count > DMA_DEBUG_NUM_PRINT_UNFREED)
> +				break;
> +		}
> +#endif
> +	}
> +
> +	local_irq_restore(flags);
>  }

This is surely useful to developers, but can trash the dmesg if done
unconditionally. I would prefer this verbose output to be configurable
and off by default.

	Joerg


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