From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
To: Jakub Kicinski <kuba@kernel.org>, Pooja Trivedi <poojatrivedi@gmail.com>
Cc: Aviad Yehezkel <aviadye@mellanox.com>,
Boris Pismenny <borisp@mellanox.com>,
Daniel Borkmann <daniel@iogearbox.net>,
netdev@vger.kernel.org, John Fastabend <john.fastabend@gmail.com>,
linux-kernel@vger.kernel.org, kernel@pengutronix.de,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v2 net-next] net/tls: allow MSG_CMSG_COMPAT in sendmsg
Date: Fri, 07 Aug 2020 14:27:48 +0200 [thread overview]
Message-ID: <f088c78e335653c8e07d6f304b5995602ee7398f.camel@pengutronix.de> (raw)
In-Reply-To: <b55718ad4e675ed9a9c3eb1c5d952945f8b20c7a.camel@pengutronix.de>
On Fri, 2020-08-07 at 10:26 +0200, Rouven Czerwinski wrote:
> On Thu, 2020-08-06 at 11:46 -0700, Jakub Kicinski wrote:
> > On Thu, 6 Aug 2020 08:49:06 +0200 Rouven Czerwinski wrote:
> > > Trying to use ktls on a system with 32-bit userspace and 64-bit
> > > kernel
> > > results in a EOPNOTSUPP message during sendmsg:
> > >
> > > setsockopt(3, SOL_TLS, TLS_TX, …, 40) = 0
> > > sendmsg(3, …, msg_flags=0}, 0) = -1 EOPNOTSUPP (Operation not
> > > supported)
> > >
> > > The tls_sw implementation does strict flag checking and does not
> > > allow
> > > the MSG_CMSG_COMPAT flag, which is set if the message comes in
> > > through
> > > the compat syscall.
> > >
> > > This patch adds MSG_CMSG_COMPAT to the flag check to allow the
> > > usage of
> > > the TLS SW implementation on systems using the compat syscall
> > > path.
> > >
> > > Note that the same check is present in the sendmsg path for the
> > > TLS
> > > device implementation, however the flag hasn't been added there
> > > for
> > > lack
> > > of testing hardware.
> > >
> > > Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> >
> > I don't know much about the compat stuff, I trust our cmsg handling
> > is
> > fine?
> >
> > Just to be sure - did you run tools/testing/selftests/net/tls ?
>
> After some pains to get this to correctly compile I have two failing
> tests, both for multi_chunk_sendfile:
>
> root@192:~ /usr/lib/kselftest/net/tls
> [==========] Running 93 tests from 4 test cases.
> …
> [ RUN ] tls.12.multi_chunk_sendfile
> multi_chunk_sendfile: Test terminated by timeout
> [ FAIL ] tls.12.multi_chunk_sendfile
> …
> [ RUN ] tls.13.multi_chunk_sendfile
> multi_chunk_sendfile: Test terminated by timeout
> [ FAIL ] tls.13.multi_chunk_sendfile
> …
> [==========] 91 / 93 tests passed.
> [ FAILED ]
I just tested on my x86_64 workstation and these specific tests fail
there too, do they only work on 5.8? They were added in 5.8, but I am
running 5.7.11 here. It looks like these failures are not
MSG_CMSG_COMPAT related.
Pooja Trivedi do you have an idea?
Regards,
Rouven
next prev parent reply other threads:[~2020-08-07 12:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 6:49 [PATCH v2 net-next] net/tls: allow MSG_CMSG_COMPAT in sendmsg Rouven Czerwinski
2020-08-06 18:46 ` Jakub Kicinski
2020-08-07 8:26 ` Rouven Czerwinski
2020-08-07 12:27 ` Rouven Czerwinski [this message]
2020-08-07 18:04 ` Jakub Kicinski
2020-08-08 0:41 ` David Miller
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=f088c78e335653c8e07d6f304b5995602ee7398f.camel@pengutronix.de \
--to=r.czerwinski@pengutronix.de \
--cc=aviadye@mellanox.com \
--cc=borisp@mellanox.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=john.fastabend@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=poojatrivedi@gmail.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).