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, 8 Dec 2015 15:54:26 +0000
From:	Noam Camus <noamc@...hip.com>
To:	Arnd Bergmann <arnd@...db.de>,
	"David S. Miller" <davem@...emloft.net>
CC:	Tal Zilcer <talz@...hip.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH] net: ezchip: fix address space confusion in nps_enet.c

>From: Arnd Bergmann [mailto:arnd@...db.de] 
>Sent: Tuesday, December 08, 2015 5:29 PM
>To: David S. Miller
>Cc: Noam Camus; Tal Zilcer; netdev@...r.kernel.org; linux-kernel@...r.kernel.org; linux-arm-kernel@...ts.infradead.org
>Subject: [PATCH] net: ezchip: fix address space confusion in nps_enet.c

>The nps_enet driver happily mixes virtual, physical and __iomem addresses, which are all different depending on the architecture and configuration.  That causes a warning when building the code on ARM with LPAE mode enabled:

>drivers/net/ethernet/ezchip/nps_enet.c: In function 'nps_enet_send_frame':
>drivers/net/ethernet/ezchip/nps_enet.c:370:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

>but will also fail to work for other reasons.

>In this patch, I'm trying to change the code to use only normal kernel pointers, which I assume is what the author actually meant:

>* For reading or writing a 32-bit word that may be unaligned when
> an SKB contains unaligned data, I'm using get_unaligned/put_unaligned()
>  rather than memcpy_fromio/toio.

>* For converting a u8 pointer to a u32 pointer, I use a cast rather
>  than the incorrect virt_to_phys.

>* For copying a couple of bytes from one place to another while respecting
 > alignment, I use memcpy instead of memcpy_toio.

>Signed-off-by: Arnd Bergmann <arnd@...db.de>

I have tested it on my simulator environment and driver compiles cleanly and runs happily without any problem.
Thank you.

Acked-by Noam Camus <noamc@...hip.com>
--
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