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:	Tue, 07 Feb 2012 18:38:09 +0100
From:	Michal Kubeček <mkubecek@...e.cz>
To:	netdev@...r.kernel.org
Cc:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>, davem@...emloft.net,
	Tushar Dave <tushar.n.dave@...el.com>, gospo@...hat.com,
	sassmann@...hat.com, jbeulich@...e.com
Subject: Re: [net-next 02/11] e1000: Adding e1000_dump function

On Tuesday 07 of February 2012 04:33EN, Jeff Kirsher wrote:
> +		if (netif_msg_pktdata(adapter) && buffer_info->dma != 0)
> +			print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS,
> +					16, 1, phys_to_virt(buffer_info->dma),
> +					buffer_info->length, true);

This might cause problems in Xen environment, we encountered a crash in 
e1000e where phys_to_virt() is used the same way. I'm not familiar with 
the details but this is what Jan Beulich wrote about it:

> And the use of phys_to_virt() here seems wrong - buffer_info->dma,
> afaict, is being obtained via the dma_map_*() APIs, which do NOT
> return a physical address (the fact that what they return is identical
> to the corresponding physical address on native doesn't mean this is
> universally so).
> 
> bus_to_virt() is what should be used here on Xen (though that isn't
> universally correct either afaik, but there simply is no
> dma_to_virt(); it *is* consistent on x86 and ia64 at least, while
> ppc64 is lacking a definition altogether [I would be very surprised
> though if this use of phys_to_virt() was correct on this arch, given
> that e.g. dma_direct_map_page() uses get_dma_offset() to obtain the
> DMA address]).

                                                         Michal Kubeček

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ