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  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:   Wed, 19 Aug 2020 11:37:00 +0100
From:   Edward Cree <>
To:     Randy Dunlap <>,
        "" <>
CC:     Michael Brown <>,
        Solarflare linux maintainers <>,
        Martin Habets <>
Subject: Re: ethernet/sfc/ warnings with 32-bit dma_addr_t

On 19/08/2020 01:28, Randy Dunlap wrote:
> Hi,
> Does the drivers/net/ethernet/sfc/sfc driver require (expect)
> dma_addr_t to be 64 bits (as opposed to 32 bits)?
> I see that several #defines in ef100_regs.h are 64...
> When used with DMA_BIT_MASK(64), does the value just need to be
> truncated to 32 bits?  Will that work?
As far as I can tell, truncation to 32 bits is harmless — the
 called function (efx_init_io) already tries every mask from the
 passed one down to 32 bits in case of PCIe hardware limitations.

The ef10 and siena versions also truncate like this (their
 #defines are 48 and 46 respectively), but because they are
 handled indirectly through efx_nic_type, the compiler isn't able
 to determine this statically as it can with ef100.
> When I build this driver on i386 with 32-bit dma_addr_t, I see
> the following build warnings:
Could you test whether explicitly casting to dma_addr_t suppresses
 the warnings?  I.e.

    efx_init_io(efx, bar,
                pci_resource_len(efx->pci_dev, bar));


Powered by blists - more mailing lists