Re: [PATCH] pipe_to_sendpage: Ensure that MSG_MORE is set if we set MSG_SENDPAGE_NOTLAST

2013-11-24 Thread Richard Weinberger
Am Sonntag, 24. November 2013, 17:25:06 schrieb Eric Dumazet: > On Mon, 2013-11-25 at 00:42 +0100, Richard Weinberger wrote: > > Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) > > added an internal flag MSG_SENDPAGE_NOTLAST. > > We have to ensure that MSG_MORE is also set if we

[PATCH] update consumers of MSG_MORE to recognize MSG_SENDPAGE_NOTLAST

2013-11-24 Thread Shawn Landden
Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) added an internal flag MSG_SENDPAGE_NOTLAST, similar to MSG_MORE. algif_hash, algif_skcipher, and udp used MSG_MORE from tcp_sendpages() and need to see the new flag as identical to MSG_MORE. This fixes sendfile() on AF_ALG. v3:

Re: [PATCH] update consumers of MSG_MORE to recognize MSG_SENDPAGE_NOTLAST

2013-11-24 Thread Hannes Frederic Sowa
On Sun, Nov 24, 2013 at 06:08:59PM -0800, Shawn Landden wrote: > Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) > added an internal flag MSG_SENDPAGE_NOTLAST, similar to > MSG_MORE. > > algif_hash and algif_skcipher used MSG_MORE from tcp_sendpages() > and need to see the new

[PATCH] update consumers of MSG_MORE to recognize MSG_SENDPAGE_NOTLAST

2013-11-24 Thread Shawn Landden
Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) added an internal flag MSG_SENDPAGE_NOTLAST, similar to MSG_MORE. algif_hash and algif_skcipher used MSG_MORE from tcp_sendpages() and need to see the new flag as identical to MSG_MORE. This fixes sendfile() on AF_ALG. Cc: Tom H

[PATCH] Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) added an internal flag MSG_SENDPAGE_NOTLAST, similar to MSG_MORE.

2013-11-24 Thread Shawn Landden
algif_hash and algif_skcipher used MSG_MORE from tcp_sendpages() and need to see the new flag as identical to MSG_MORE. This fixes sendfile() on AF_ALG. Cc: Tom Herbert Cc: Eric Dumazet Cc: David S. Miller Cc: # 3.4.x + 3.2.x Reported-and-tested-by: Shawn Landden Original-patch: Richard Wein

Re: [PATCH] pipe_to_sendpage: Ensure that MSG_MORE is set if we set MSG_SENDPAGE_NOTLAST

2013-11-24 Thread Shawn Landden
On Sun, Nov 24, 2013 at 5:25 PM, Eric Dumazet wrote: > On Mon, 2013-11-25 at 00:42 +0100, Richard Weinberger wrote: >> Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) >> added an internal flag MSG_SENDPAGE_NOTLAST. >> We have to ensure that MSG_MORE is also set if we set MSG_SE

Re: [PATCH] pipe_to_sendpage: Ensure that MSG_MORE is set if we set MSG_SENDPAGE_NOTLAST

2013-11-24 Thread Eric Dumazet
On Mon, 2013-11-25 at 00:42 +0100, Richard Weinberger wrote: > Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) > added an internal flag MSG_SENDPAGE_NOTLAST. > We have to ensure that MSG_MORE is also set if we set MSG_SENDPAGE_NOTLAST. > Otherwise users that check against MSG_MO

Re: [PATCH] pipe_to_sendpage: Ensure that MSG_MORE is set if we set MSG_SENDPAGE_NOTLAST

2013-11-24 Thread Shawn Landden
On Sun, Nov 24, 2013 at 3:42 PM, Richard Weinberger wrote: > Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) > added an internal flag MSG_SENDPAGE_NOTLAST. > We have to ensure that MSG_MORE is also set if we set MSG_SENDPAGE_NOTLAST. > Otherwise users that check against MSG_MOR

[PATCH] pipe_to_sendpage: Ensure that MSG_MORE is set if we set MSG_SENDPAGE_NOTLAST

2013-11-24 Thread Richard Weinberger
Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) added an internal flag MSG_SENDPAGE_NOTLAST. We have to ensure that MSG_MORE is also set if we set MSG_SENDPAGE_NOTLAST. Otherwise users that check against MSG_MORE will not see it. This fixes sendfile() on AF_ALG. Cc: Tom Herber

Re: AF_ALG buggy with sendfile

2013-11-24 Thread Shawn Landden
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@de

Re: AF_ALG buggy with sendfile

2013-11-24 Thread Shawn Landden
heres a version of the test case that builds. Sorry about that. On Sun, Nov 24, 2013 at 9:21 AM, Shawn Landden 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

[PATCH] crypto: more robust crypto_memneq

2013-11-24 Thread Cesar Eduardo Barros
Disabling compiler optimizations can be fragile, since a new optimization could be added to -O0 or -Os that breaks the assumptions the code is making. Instead of disabling compiler optimizations, use a dummy inline assembly (based on RELOC_HIDE) to block the problematic kinds of optimization, whil

AF_ALG buggy with sendfile

2013-11-24 Thread Shawn Landden
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) #include #include #incl