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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 29 May 2009 07:20:18 -0400
From:	Mike Frysinger <vapier.adi@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, uclinux-dist-devel@...ckfin.uclinux.org,
	sonic.zhang@...log.com, cooloney@...nel.org
Subject: Re: [PATCH 2/5] netdev: bfin_mac: fix malformed UDP packet 
	transmission when polling with KGDB

On Fri, May 29, 2009 at 06:52, David Miller wrote:
> From: Mike Frysinger <vapier.adi@...il.com>
>> On Fri, May 29, 2009 at 05:04, David Miller wrote:
>>> From: Mike Frysinger <vapier@...too.org>
>>>> From: Sonic Zhang <sonic.zhang@...log.com>
>>>>
>>>> Make sure data is really written into the registers before enabling DMA.
>>>> Otherwise, the EMAC DMA controller may transfer out a malformed packet.
>>>> This patch may also fix netperf bugs or scp bugs.
>>>>
>>>> Signed-off-by: Sonic Zhang <sonic.zhang@...log.com>
>>>> Signed-off-by: Mike Frysinger <vapier.adi@...il.com>
>>>> Signed-off-by: Bryan Wu <cooloney@...nel.org>
>>>
>>> Instead of using this incredibly non-portable blackfin specific SSYNC
>>> thing
>>
>> that doesnt make sense -- this is a completely non-portable Blackfin
>> specific driver.  everything in it uses Blackfin macros to access
>> Blackfin MMRs because this is a device that only exists on Blackfin
>> chips.
>
> There is never an excuse to not write portable code when you can.
>
> Some day we may have dummy do-nothing bus drivers for every platform
> bus or subsystem, so that we can compile any driver on any platform.
>
> Do you want to make that kind of build validation of you code harder?

if the portable version is unnecessarily ugly to implement, then yes,
especially this driver which has a lot more issues than an SSYNC macro

>>> why not read back a register from the device to ensure the
>>> register writes hit the chip just like other drivers do?
>>
>> because that isnt how the Blackfin hardware works in general, and
>> certainly not how the DMA hardware works.
>
> Have you tried reading the register back?  Does it work?

that isnt how the DMA is being used here.  there is no register to
read back because the DMA controller is doing the reading indirectly.
but along those lines, it's not entirely clear which DMA registers
this SSYNC is supposed to be protecting because all of the updates are
happening on the descriptors in external memory, not the DMA registers
themselves.  i'll have Sonic clarify.
-mike
--
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