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  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, 30 Aug 2010 07:59:38 +0900
From:	FUJITA Tomonori <>
Subject: Re: [PATCH] starfire: use BUILD_BUG_ON for netdrv_addr_t

CC'ed to linux-arch,

On Sat, 28 Aug 2010 15:41:25 -0700 (PDT)
David Miller <> wrote:

> From: Akinobu Mita <>
> Date: Sat, 28 Aug 2010 14:08:45 +0900
> > Detect size mismatch for netdrv_addr_t at build time rather than
> > checking at module load time.
> > 
> > Signed-off-by: Akinobu Mita <>
> > Cc: Ion Badulescu <>
> > Cc: "David S. Miller" <>
> > Cc:
> Applied, but I suspect we will see some interesting build failures now
> if that ugly and brittle ifdef test which constrols the netdrv_addr_t
> define isn't %100 accurate.

Yeah, looks like you need to add another hack for powerpc?

> Fujita-san, what this driver does is actually pretty reasonable.  It
> has two kinds of descriptors, one supports 32-bit addresses and the
> other supports 64-bit addresses.  It wants to CPP test which one to
> use so that the driver is not burdoned with two duplicated sets of
> routines.
> Maybe we should provide a DMA_ADDR_T_SIZE or similar macro?  What do
> you think?  Anything is better than what it uses now:

Introducing something like CONFIG_DMA_ADDR_T_64BIT works?

include/asm-generic/types.h has:

#ifndef dma_addr_t
typedef u64 dma_addr_t;
typedef u32 dma_addr_t;
#endif /* CONFIG_PHYS_ADDR_T_64BIT */
#endif /* dma_addr_t */

But the above can't be perfect so about twenty architectures define
dma_addr_t. With CONFIG_DMA_ADDR_T_64BIT, we can clean up all the
mess nicely, I guess.

> /*
>  * This SUCKS.
>  * We need a much better method to determine if dma_addr_t is 64-bit.
>  */
> #if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR))
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists