netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	willemb@google.com
Cc: oss-drivers@netronome.com, davejwatson@fb.com,
	borisp@mellanox.com, aviadye@mellanox.com,
	john.fastabend@gmail.com, daniel@iogearbox.net,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [RFC 0/2] net/tls: don't block after strparser error
Date: Sun,  6 Oct 2019 20:53:21 -0700	[thread overview]
Message-ID: <20191007035323.4360-1-jakub.kicinski@netronome.com> (raw)

Hi!

I was investigating the correct behaviour around small receive
window size and were slightly surprised to find that currently,
if the recv buffer is too small to fit the entire record, TLS will
report -EMSGSIZE once, and then block indefinitely on a subsequent
call.

Perhaps naively I'd think that the error should keep being
reported since the error condition is never cleared.

One way or the other I'd like to engrave the correct behaviour into
a selftest so I'd appreciate guidance on which one that is :)

This set makes the TLS socket keep reporting the strparser error
until it gets closed.

Jakub Kicinski (2):
  net/tls: don't clear socket error if strparser aborted
  selftests/tls: test the small receive buffer case

 net/tls/tls_sw.c                  |  7 +++++--
 tools/testing/selftests/net/tls.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 2 deletions(-)

-- 
2.21.0


             reply	other threads:[~2019-10-07  3:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07  3:53 Jakub Kicinski [this message]
2019-10-07  3:53 ` [RFC 1/2] net/tls: don't clear socket error if strparser aborted Jakub Kicinski
2019-10-07 12:58   ` David Miller
2019-10-07  3:53 ` [RFC 2/2] selftests/tls: test the small receive buffer case Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191007035323.4360-1-jakub.kicinski@netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=aviadye@mellanox.com \
    --cc=borisp@mellanox.com \
    --cc=daniel@iogearbox.net \
    --cc=davejwatson@fb.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).