[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJusiZVxBg7=GX1-gQjXyyXznKvAnv26EWzVFu59+TBm5mGRsA@mail.gmail.com>
Date: Sun, 24 Nov 2013 14:04:14 -0800
From: Shawn Landden <shawnlandden@...il.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
netdev@...r.kernel.org, Herbert Xu <herbert@...dor.apana.org.au>,
linux-crypto@...r.kernel.org
Subject: Re: AF_ALG buggy with sendfile
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@...ian-T61:~/git/test$ make connman_afalg
cc connman_afalg.c -o connman_afalg
shawn@...ian-T61:~/git/test$ ./connman_afalg /bin/true
send 27080 bytes
recv 20 bytes
45384483cf9cd0d82eba164131795b4807c6d39d /bin/true
shawn@...ian-T61:~/git/test$ sha1sum /bin/true
82667ba2ec681d8e55b0ee3b6db2970f9911680d /bin/true
On Sun, Nov 24, 2013 at 2:00 PM, Shawn Landden <shawnlandden@...il.com> wrote:
> heres a version of the test case that builds.....
>
> Sorry about that.
>
> On Sun, Nov 24, 2013 at 9:21 AM, Shawn Landden <shawnlandden@...il.com> wrote:
>> 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)
--
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