Thread (17 messages) 17 messages, 7 authors, 2013-11-29

Re: AF_ALG buggy with sendfile

From: Shawn Landden <hidden>
Date: 2013-11-24 22:04:16
Also in: linux-crypto, lkml

If you build https://kernel.googlesource.com/pub/scm/network/connman/connman/+/0.80/tools/alg-test.c
from the connman source code and compare the output to coreutils
sha1sum you can see the problem.

shawn@debian-T61:~/git/test$ make connman_afalg
cc     connman_afalg.c   -o connman_afalg
shawn@debian-T61:~/git/test$ ./connman_afalg /bin/true
send 27080 bytes
recv 20 bytes
45384483cf9cd0d82eba164131795b4807c6d39d  /bin/true
shawn@debian-T61:~/git/test$ sha1sum /bin/true
82667ba2ec681d8e55b0ee3b6db2970f9911680d  /bin/true

On Sun, Nov 24, 2013 at 2:00 PM, Shawn Landden [off-list ref] wrote:
heres a version of the test case that builds.....

Sorry about that.

On Sun, Nov 24, 2013 at 9:21 AM, Shawn Landden [off-list ref] wrote:
quoted
If I use sendfile() to send to a accept()ed AF_ALG socket set up for
"hash", I get the wrong
answer, if I read() and then write() I get the right answer. None of
the system calls return an error.

test case attached.

--

---
Shawn Landden
+1 360 389 3001 (SMS preferred)


--

---
Shawn Landden
+1 360 389 3001 (SMS preferred)


-- 

---
Shawn Landden
+1 360 389 3001 (SMS preferred)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help