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:	Fri, 10 Oct 2008 11:12:15 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	grundler@...isc-linux.org, mingo@...e.hu, tglx@...utronix.de,
	hpa@...or.com, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org
Subject: Re: [PATCH] pci: print out DMA mask info

On Fri, Oct 10, 2008 at 09:46:33AM -0700, Yinghai Lu wrote:
> Matthew Wilcox wrote:
> > 
> > By the way, commit 8f286c33f1e838d631f4a3260b33efce4bc5973c is a really
> > bad idea.  It is very helpful to see which bitmasks are used by real
> > devices, and which ones aren't.  It should be reverted, IMO.
> 
> why? did you point to wrong commit?

No, that's the commit I meant.

> commit 8f286c33f1e838d631f4a3260b33efce4bc5973c
> Author: Andrew Morton <akpm@...ux-foundation.org>
> Date:   Thu Oct 18 03:05:07 2007 -0700
> 
> -#define DMA_BIT_MASK(n)	((1ULL<<(n))-1)
> +#define DMA_BIT_MASK(n)	(((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
>  
> -#define DMA_64BIT_MASK	(~0ULL)
> +/*
> + * NOTE: do not use the below macros in new code and do not add new definitions
> + * here.
> + *
> + * Instead, just open-code DMA_BIT_MASK(n) within your driver

Open-coding DMA_BIT_MASK() within your driver means that we no longer
have a canonical list of DMA masks in one place.  Instead we have to
grep the entire tree and come up with more-or-less complex scripts to
figure out which bit masks are actually in use.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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