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]
Message-ID: <19f34abd0904080020l4f013b58va37c452b91831f85@mail.gmail.com>
Date:	Wed, 8 Apr 2009 09:20:37 +0200
From:	Vegard Nossum <vegard.nossum@...il.com>
To:	xinglp <xinglp@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: splice lost data

2009/4/7 xinglp <xinglp@...il.com>:
> 2.6.29.1 in VM
>
> When recv data more than 8K (1024*8) bytes at once, data lost happen.
>

Don't know if this is related to the problem you report, but your code is buggy.

You're checking errno before you know that splice() returned -1. Now,
I don't know the actual implementation, but as with most system calls,
the interface specifies only that errno is updated when the function
returns -1:

       "On error, splice() returns -1 and errno is set to indicate the
error." (man 2 splice)

You're also not checking explicitly for the return value 0, which
would possibly also not set errno (i.e. you're using perror() in the
case where splice() returned 0).

Please let me know if this fixes your problem!


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ