On 02/26/19 02:12 PM, Boris Pismenny wrote:
> Currently, the receive function fails to handle records already
> decrypted by the device due to the commit mentioned below.
>
> This commit advances the TLS record sequence number and prepares the context
> to handle the next record.
>
> Fixes: fedf2
Wire up support for 256 bit keys from the setsockopt to the crypto
framework
Signed-off-by: Dave Watson
---
include/net/tls.h | 5 ++-
include/uapi/linux/tls.h | 15
net/tls/tls_main.c| 33 +++-
net/tls/tls_sw.c
For TLS 1.3, the control message is encrypted. Handle control
message checks after decryption.
Signed-off-by: Dave Watson
---
net/tls/tls_sw.c | 88
1 file changed, 44 insertions(+), 44 deletions(-)
diff --git a/net/tls/tls_sw.c b/net/tls
Change most tests to TLS 1.3, while adding tests for previous TLS 1.2
behavior.
Signed-off-by: Dave Watson
---
tools/testing/selftests/net/tls.c | 76 ++-
1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/tls.c
b/tools/testing
d-off-by: Dave Watson
---
include/net/tls.h | 1 +
net/tls/tls_sw.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/net/tls.h b/include/net/tls.h
index 4592606e136a..eb73e62ac8c9 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -139,6 +139,7 @@ s
was in
TLS1.2. This requires moving the control message handling to after
decryption, but is otherwise similar.
V1 -> V2
The first two patches were dropped, and sent separately, one as a
bugfix to the net tree.
Dave Watson (5):
net: tls: Support 256 bit keys
net: tls: Refactor tls aad sp
TLS 1.3 has a different AAD size, use a variable in the code to
make TLS 1.3 support easy.
Signed-off-by: Dave Watson
---
include/net/tls.h | 1 +
net/tls/tls_sw.c | 17 +
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/include/net/tls.h b/include/net/tls.h
zero padding.
Signed-off-by: Dave Watson
---
include/net/tls.h | 66 ++-
include/uapi/linux/tls.h | 4 ++
net/tls/tls_device.c | 5 +-
net/tls/tls_device_fallback.c | 3 +-
net/tls/tls_main.c| 3 +-
net/tls/tls_sw.c | 116
On 01/28/19 11:06 PM, David Miller wrote:
> From: Dave Watson
> Date: Sun, 27 Jan 2019 00:57:38 +
>
> > aead_request_set_crypt takes an iv pointer, and we change the iv
> > soon after setting it. Some async crypto algorithms don't save the iv,
> > so we ne
t for async encryption of records...")
Signed-off-by: Dave Watson
---
net/tls/tls_sw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 7e963560edef..bf5b54b513bc 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -1794,7 +1794
don't think this combination can happen in the wild.
Presumably other hardware offloads will need this fix, but there have been
no user reports.
Fixes: a42055e8d2c30 ("Add support for async encryption of records...")
Signed-off-by: Dave Watson
---
include/net/tls.h | 2 ++
n
On 01/24/19 02:14 PM, Jakub Kicinski wrote:
> On Thu, 24 Jan 2019 17:20:12 +0000, Dave Watson wrote:
> > aead_request_set_crypt takes an iv pointer, and we change the iv
> > soon after setting it. Some async crypto algorithms don't save the iv,
> > so we need to save i
For TLS 1.3, the control message is encrypted. Handle control
message checks after decryption.
Signed-off-by: Dave Watson
---
net/tls/tls_sw.c | 88
1 file changed, 44 insertions(+), 44 deletions(-)
diff --git a/net/tls/tls_sw.c b/net/tls
Change most tests to TLS 1.3, while adding tests for previous TLS 1.2
behavior.
Signed-off-by: Dave Watson
---
tools/testing/selftests/net/tls.c | 76 ++-
1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/tls.c
b/tools/testing
zero padding.
Signed-off-by: Dave Watson
---
include/net/tls.h | 66 ++-
include/uapi/linux/tls.h | 4 ++
net/tls/tls_device.c | 5 +-
net/tls/tls_device_fallback.c | 3 +-
net/tls/tls_main.c| 3 +-
net/tls/tls_sw.c | 116
Wire up support for 256 bit keys from the setsockopt to the crypto framework
Signed-off-by: Dave Watson
---
include/net/tls.h | 5 ++-
include/uapi/linux/tls.h | 15
net/tls/tls_main.c| 33 +++-
net/tls/tls_sw.c
TLS 1.3 has a different AAD size, use a variable in the code to
make TLS 1.3 support easy.
Signed-off-by: Dave Watson
---
include/net/tls.h | 1 +
net/tls/tls_sw.c | 17 +
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/include/net/tls.h b/include/net/tls.h
don't think this combination can happen in the wild.
Presumably other hardware offloads will need this fix, but there have been
no user reports.
Fixes: a42055e8d2c30 ("Add support for async encryption of records...")
Signed-off-by: Dave Watson
---
include/net/tls.h | 2 ++
n
d-off-by: Dave Watson
---
include/net/tls.h | 1 +
net/tls/tls_sw.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/net/tls.h b/include/net/tls.h
index 4592606e136a..eb73e62ac8c9 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -139,6 +139,7 @@ s
Add John and Daniel as additional tls co-maintainers to help review
patches and fix syzbot reports.
Acked-by: John Fastabend
Acked-by: Daniel Borkmann
Signed-off-by: Dave Watson
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 7f1399ac028e
On 10/11/18 02:45 AM, Daniel Borkmann wrote:
> Convert kTLS over to make use of sk_msg interface for plaintext and
> encrypted scattergather data, so it reuses all the sk_msg helpers
> and data structure which later on in a second step enables to glue
> this to BPF.
Looks very clean, thanks!
>
>
roduced in
> record structure to signify whether the same scatterlist can be used.
> By default, the inplace_crypto is enabled in get_rec(). If zero-copy is
> used (i.e. plaintext data is not copied), inplace_crypto is set to '0'.
>
> Signed-off-by: Vakul Garg
Looks reasonable to me, thanks.
Reviewed-by: Dave Watson
this reduce the sndbuf size and stress
> the tls layer by sending many 1B sends. This results in every byte
> needing a header and each byte individually being sent to the crypto
> layer.
>
> Signed-off-by: John Fastabend
Super, thanks!
Acked-by: Dave Watson
On 08/16/18 08:49 PM, Vakul Garg wrote:
> Changes since RFC version:
> 1) Improved commit message.
> 2) Fixed dequeued record offset handling because of which few of
> tls selftests 'recv_partial, recv_peek, recv_peek_multiple' were
> failing.
Thanks! Commit message much more
On 08/14/18 07:47 PM, Vakul Garg wrote:
> Incoming TLS records which are directly decrypted into user space
> application buffer i.e. records which are decrypted in zero-copy mode
> are submitted for async decryption. When the decryption cryptoapi
> returns -EINPROGRESS, the next tls record is pars
able and not come from stack. The buffers for
> aad and iv can be separately kmalloced each, but it is inefficient.
> This patch does a combined allocation for preparing decryption request
> and then segments into aead_req || sgin || sgout || iv || aad.
>
> Signed-off-by: Vakul Garg
On 08/08/18 06:36 PM, Vakul Garg wrote:
> For preparing decryption request, several memory chunks are required
> (aead_req, sgin, sgout, iv, aad). For submitting the decrypt request to
> an accelerator, it is required that the buffers which are read by the
> accelerator must be dma-able and not com
Hi Vakul,
Only minor comments, mostly looks good to me. Thanks
> +/* This function decrypts the input skb into either out_iov or in out_sg
> + * or in skb buffers itself. The input parameter 'zc' indicates if
> + * zero-copy mode needs to be tried or not. With zero-copy mode, either
> + * out_io
On 08/02/18 05:23 PM, Vakul Garg wrote:
> > I agree that Boris' patch does what you say it does - it sets keys
> > immediately
> > after CCS instead of after FINISHED message. I disagree that the kernel tls
> > implementation currently requires that specific ordering, nor do I think
> > that it
On 08/02/18 05:05 PM, Vakul Garg wrote:
> In case zerocopy_from_iter() fails, 'end' won't get marked.
> So fallback path is fine.
>
> > Which codepath is calling sg_nents()?
>
> While testing my WIP implementation of combined dynamic memory allocation for
> (aead_req || sgin || sgout || aad || i
On 08/02/18 09:50 PM, Vakul Garg wrote:
> Function decrypt_skb() made a bad assumption that number of sg entries
> required for mapping skb to be decrypted would always be less than
> MAX_SKB_FRAGS. The required count of sg entries for skb should always be
> calculated. If they cannot fit in local
the function needs to mark the 'end' in the last entry it
> adds.
>
> Signed-off-by: Vakul Garg
Looks good to me, it looks like the fallback path should unmark the
end appropriately.
Which codepath is calling sg_nents()?
Acked-by: Dave Watson
On 08/01/18 01:49 PM, Vakul Garg wrote:
> > I don't think this patch is safe as-is. sgin_arr is a stack array of size
> > MAX_SKB_FRAGS (+ overhead), while my read of skb_cow_data is that it
> > walks the whole chain of skbs from skb->next, and can return any number of
> > segments. Therefore we
On 07/31/18 10:45 AM, Vakul Garg wrote:
> > > IIUC, with the upstream implementation of tls record layer in kernel,
> > > the decryption of tls FINISHED message happens in kernel. Therefore
> > > the keys are already being sent to kernel tls socket before handshake is
> > completed.
> >
> > This i
On 07/30/18 06:31 AM, Vakul Garg wrote:
> > It's not entirely clear how your TLS handshake daemon works - Why is
> > it necessary to set the keys in the kernel tls socket before the handshake
> > is
> > completed?
>
> IIUC, with the upstream implementation of tls record layer in kernel, the
>
On 07/27/18 09:34 AM, Vakul Garg wrote:
>
>
> > -Original Message-
> > From: Dave Watson [mailto:davejwat...@fb.com]
> > Sent: Thursday, July 26, 2018 2:31 AM
> > To: Vakul Garg
> > Cc: David Miller ; netdev@vger.kernel.org;
> > bor...@mellano
On 07/24/18 04:54 PM, Vakul Garg wrote:
> Removed checks against non-NULL before calling kfree_skb() and
> crypto_free_aead(). These functions are safe to be called with NULL
> as an argument.
>
> Signed-off-by: Vakul Garg
Acked-by: Dave Watson
On 07/24/18 08:22 AM, Vakul Garg wrote:
> > I don't think this patch is safe as-is. sgin_arr is a stack array of size
> > MAX_SKB_FRAGS (+ overhead), while my read of skb_cow_data is that it
> > walks the whole chain of skbs from skb->next, and can return any number of
> > segments. Therefore we
You would probably get more responses if you cc the relevant people.
Comments inline
On 07/22/18 12:49 PM, Vakul Garg wrote:
> The kernel based TLS record layer allows the user space world to use a
> decoupled TLS implementation.
> The applications need not be linked with TLS stack.
> The TLS ha
On 07/21/18 07:25 PM, David Miller wrote:
> From: Vakul Garg
> Date: Thu, 19 Jul 2018 21:56:13 +0530
>
> > In function decrypt_skb(), array allocation in case when sgout is NULL
> > is unnecessary. Instead, local variable sgin_arr[] can be used.
> >
> > Signed-off-by: Vakul Garg
>
> Hmmm...
>
: Dave Watson
---
tools/testing/selftests/net/Makefile | 2 +-
tools/testing/selftests/net/tls.c| 692 +++
2 files changed, 693 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/net/tls.c
diff --git a/tools/testing/selftests/net/Makefile
b/tools
On 07/11/18 10:54 PM, Boris Pismenny wrote:
> Hi,
>
> The following series provides TLS RX inline crypto offload.
All the tls patches look good to me except #10
"tls: Fix zerocopy_from_iter iov handling"
which seems to break the non-device zerocopy flow.
The integration is very clean, thanks!
On 07/11/18 10:54 PM, Boris Pismenny wrote:
> zerocopy_from_iter iterates over the message, but it doesn't revert the
> updates made by the iov iteration. This patch fixes it. Now, the iov can
> be used after calling zerocopy_from_iter.
This breaks tests (which I will send up as selftests shortly)
26690f7b3126c5e...@syzkaller.appspotmail.com
Reported-by: syzbot+709f2810a6a05f11d...@syzkaller.appspotmail.com
Signed-off-by: Dave Watson
Fixes: 3c4d7559159b ("tls: kernel TLS support")
---
net/tls/tls_sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tls/tls_sw.c b/net/tls/tl
On 07/12/18 11:14 AM, Vakul Garg wrote:
> Hi Boris
>
> Thanks for explaining.
> Few questions/observations.
>
> 1. Isn't ' ctx->decrypted = true' a redundant statement in
> tls_do_decryption()?
> The same has been repeated in tls_recvmsg() after calling decrypt_skb()?
>
> 2. Similarly, ctx->sav
s now NULL.
>
> Convert kTLS over to use ->poll_mask instead. Also instead of POLLIN |
> POLLRDNORM use the proper EPOLLIN | EPOLLRDNORM bits as the case in
> tcp_poll_mask() as well that is mangled here.
Thanks, was just trying to bisect this myself. Works for me.
Tested-by: Dave
Andre Tomt
Signed-off-by: Dave Watson
---
include/net/tls.h | 1 +
net/tls/tls_main.c | 7 +++
2 files changed, 8 insertions(+)
diff --git a/include/net/tls.h b/include/net/tls.h
index 3da8e13..b400d0bb 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -148,6 +148,7 @@ struct tls_co
Hi Andre,
On 04/24/18 10:01 AM, Dave Watson wrote:
> On 04/22/18 11:21 PM, Andre Tomt wrote:
> > The kernel seems to get increasingly unstable as I load it up with client
> > connections. At about 9Gbps and 700 connections, it is okay at least for a
> > while - it migh
On 04/22/18 11:21 PM, Andre Tomt wrote:
> kTLS looks fun, so I decided to play with it. It is quite spiffy - however
> with mlx4 I get kernel crashes I'm not seeing when testing on ixgbe.
>
> For testing I'm using a git build of the "stream reflector" cubemap[1]
> configured with kTLS and 8 worker
4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com
>
> Signed-off-by: Kees Cook
Thanks
Acked-by: Dave Watson
> ---
> net/tls/tls_sw.c | 10 +-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
> index 4dc766b
Thanks for doing the merge, it looks good to me. One issue below,
otherwise all my SW tests still pass.
On 03/27/18 02:51 PM, Saeed Mahameed wrote:
> - if (ctx->conf == TLS_SW_TX ||
> - ctx->conf == TLS_SW_RX ||
> - ctx->conf == TLS_SW_RXTX) {
> - tls_sw_free_resou
xes: 43a0c6751a322847 ("strparser: Stream parser for messages")
Signed-off-by: Dave Watson
---
Documentation/networking/strparser.txt | 5 +++--
net/strparser/strparser.c | 8
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Documentation/networking/str
On 03/26/18 01:44 PM, Tom Herbert wrote:
> On Mon, Mar 26, 2018 at 12:31 PM, Dave Watson wrote:
> > strp_parser_err is called with a negative code everywhere, which then
> > calls abort_parser with a negative code. strp_msg_timeout calls
> > abort_parser directly with a p
xes: 43a0c6751a322847 ("strparser: Stream parser for messages")
Signed-off-by: Dave Watson
---
net/strparser/strparser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c
index 1fdab5c..b9283ce 100644
--- a/net/strparse
finish reading a full frame.
Actual decryption is only done during recvmsg or splice_read calls.
Signed-off-by: Dave Watson
---
include/net/tls.h| 27 ++-
include/uapi/linux/tls.h | 2 +
net/tls/Kconfig | 1 +
net/tls/tls_main.c | 62 -
net/tls/tls_sw.c
Add documentation on rx path setup and cmsg interface.
Signed-off-by: Dave Watson
---
Documentation/networking/tls.txt | 66 ++--
1 file changed, 64 insertions(+), 2 deletions(-)
diff --git a/Documentation/networking/tls.txt b/Documentation/networking
Refactor zerocopy_from_iter to take arguments for pages and size,
such that it can be used for both tx and rx. RX will also support
zerocopy direct to output iter, as long as the full message can
be copied at once (a large enough userspace buffer was provided).
Signed-off-by: Dave Watson
Pass EBADMSG explicitly to tls_err_abort. Receive path will
pass additional codes - EMSGSIZE if framing is larger than max
TLS record size, EINVAL if TLS version mismatch.
Signed-off-by: Dave Watson
---
include/net/tls.h | 6 +++---
net/tls/tls_sw.c | 2 +-
2 files changed, 4 insertions(+), 4
Separate tx crypto parameters to a separate cipher_context struct.
The same parameters will be used for rx using the same struct.
tls_advance_record_sn is modified to only take the cipher info.
Signed-off-by: Dave Watson
---
include/net/tls.h | 26 +---
net/tls/tls_main.c
Several config variables are prefixed with tx, drop the prefix
since these will be used for both tx and rx.
Signed-off-by: Dave Watson
---
include/net/tls.h | 2 +-
net/tls/tls_main.c | 26 +-
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/include/net
ent crypto patchset to remove copies, resulting in optimally
zero copies vs. userspace's one, vs. previous kernel's two.
https://marc.info/?l=linux-crypto-vger&m=151931242406416&w=2
[2] https://github.com/Mellanox/openssl/commits/tls_rx2
[3] https://github.com/ktls/af_ktls
On 03/21/18 07:20 AM, Boris Pismenny wrote:
>
>
> On 3/20/2018 7:54 PM, Dave Watson wrote:
> > + ctx->control = header[0];
> > +
> > + data_len = ((header[4] & 0xFF) | (header[3] << 8));
> > +
> > + cipher_overhead = tls_ctx->rx.tag
On 03/19/18 07:45 PM, Saeed Mahameed wrote:
> +#define TLS_OFFLOAD_CONTEXT_SIZE
> \
> + (ALIGN(sizeof(struct tls_offload_context), sizeof(void *)) + \
> + TLS_DRIVER_STATE_SIZE)
> +
> + pfrag = sk_page_frag(sk);
> +
> + /* KT
Add documentation on rx path setup and cmsg interface.
Signed-off-by: Dave Watson
---
Documentation/networking/tls.txt | 67 ++--
1 file changed, 65 insertions(+), 2 deletions(-)
diff --git a/Documentation/networking/tls.txt b/Documentation/networking
Several config variables are prefixed with tx, drop the prefix
since these will be used for both tx and rx.
Signed-off-by: Dave Watson
---
include/net/tls.h | 2 +-
net/tls/tls_main.c | 26 +-
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/include/net
finish reading a full frame.
Actual decryption is only done during recvmsg or splice_read calls.
Signed-off-by: Dave Watson
---
include/net/tls.h| 27 ++-
include/uapi/linux/tls.h | 2 +
net/tls/Kconfig | 1 +
net/tls/tls_main.c | 62 -
net/tls/tls_sw.c | 587
Pass EBADMSG explicitly to tls_err_abort. Receive path will
pass additional codes - EMSGSIZE if framing is larger than max
TLS record size, EINVAL if TLS version mismatch.
Signed-off-by: Dave Watson
---
include/net/tls.h | 6 +++---
net/tls/tls_sw.c | 2 +-
2 files changed, 4 insertions(+), 4
Refactor zerocopy_from_iter to take arguments for pages and size,
such that it can be used for both tx and rx. RX will also support
zerocopy direct to output iter, as long as the full message can
be copied at once (a large enough userspace buffer was provided).
Signed-off-by: Dave Watson
Separate tx crypto parameters to a separate cipher_context struct.
The same parameters will be used for rx using the same struct.
tls_advance_record_sn is modified to only take the cipher info.
Signed-off-by: Dave Watson
---
include/net/tls.h | 26 +---
net/tls/tls_main.c
/marc.info/?l=linux-crypto-vger&m=151931242406416&w=2
[2] https://github.com/Mellanox/openssl/commits/tls_rx2
[3] https://github.com/ktls/af_ktls-tool/tree/RX
Dave Watson (6):
tls: Generalize zerocopy_from_iter
tls: Move cipher info to a separate struct
tls: Pass error code explicitly t
On 03/08/18 09:48 PM, Boris Pismenny wrote:
> Hi Dave,
>
> On 03/08/18 18:50, Dave Watson wrote:
> > Add rx path for tls software implementation.
> >
> > recvmsg, splice_read, and poll implemented.
> >
> > An additional sockopt TLS_RX is added, with th
Add documentation on rx path setup and cmsg interface.
Signed-off-by: Dave Watson
---
Documentation/networking/tls.txt | 59 ++--
1 file changed, 57 insertions(+), 2 deletions(-)
diff --git a/Documentation/networking/tls.txt b/Documentation/networking
Refactor zerocopy_from_iter to take arguments for pages and size,
such that it can be used for both tx and rx. RX will also support
zerocopy direct to output iter, as long as the full message can
be copied at once (a large enough userspace buffer was provided).
Signed-off-by: Dave Watson
are provided to decrypt in to.
sk_poll is overridden, and only returns POLLIN if a full TLS message is
received. Otherwise we wait for strparser to finish reading a full frame.
Actual decryption is only done during recvmsg or splice_read calls.
Signed-off-by: Dave Watson
---
include/net/tls.h
Pass EBADMSG explicitly to tls_err_abort. Receive path will
pass additional codes - E2BIG if framing is larger than max
TLS record size.
Signed-off-by: Dave Watson
---
include/net/tls.h | 6 +++---
net/tls/tls_sw.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include
Separate tx crypto parameters to a separate cipher_context struct.
The same parameters will be used for rx using the same struct.
tls_advance_record_sn is modified to only take the cipher info.
Signed-off-by: Dave Watson
---
include/net/tls.h | 26 +---
net/tls/tls_main.c
imally
zero copies vs. userspace's one, vs. previous kernel's two.
https://marc.info/?l=linux-crypto-vger&m=151931242406416&w=2
[2] https://github.com/Mellanox/openssl/commits/tls_rx
[3] https://github.com/ktls/af_ktls-tool/tree/RX
Dave Watson (5):
tls: Generalize zerocopy_fr
On 02/23/18 04:58 PM, Atul Gupta wrote:
> > On 02/22/18 11:21 PM, Atul Gupta wrote:
> > > @@ -403,6 +431,15 @@ static int do_tls_setsockopt_tx(struct sock *sk,
> > > char __user *optval,
> > > goto err_crypto_info;
> > > }
> > >
> > > + rc = tls_offload_dev_absent(sk);
> > > + if (rc
On 02/22/18 11:21 PM, Atul Gupta wrote:
> @@ -403,6 +431,15 @@ static int do_tls_setsockopt_tx(struct sock *sk, char
> __user *optval,
> goto err_crypto_info;
> }
>
> + rc = tls_offload_dev_absent(sk);
> + if (rc == -EINVAL) {
> + goto out;
> + } else
On 02/15/18 04:10 PM, Atul Gupta wrote:
> > -Original Message-
> > From: Dave Watson [mailto:davejwat...@fb.com]
> > Sent: Thursday, February 15, 2018 9:22 PM
> > To: Atul Gupta
> > Cc: da...@davemloft.net; herb...@gondor.apana.org.au; s...@q
On 02/15/18 12:24 PM, Atul Gupta wrote:
> @@ -401,6 +430,15 @@ static int do_tls_setsockopt_tx(struct sock *sk, char
> __user *optval,
> goto out;
> }
>
> + rc = get_tls_offload_dev(sk);
> + if (rc) {
> + goto out;
> + } else {
> + /* Retai
On 01/31/18 05:22 PM, Vakul Garg wrote:
> > > On second though in stable we should probably just disable async tfm
> > > allocations.
> > > It's simpler. But this approach is still good for -next
> > >
> > >
> > > Gilad
> >
> > I agree with Gilad, just disable async for now.
> >
>
> How to do it
On 01/31/18 04:14 PM, Atul Gupta wrote:
>
>
> On Tuesday 30 January 2018 10:41 PM, Dave Watson wrote:
> > On 01/30/18 06:51 AM, Atul Gupta wrote:
> >
> > > What I was referring is that passing "tls" ulp type in setsockopt
> > > may be insuf
On 01/31/18 09:34 PM, Vakul Garg wrote:
> Async crypto accelerators (e.g. drivers/crypto/caam) support offloading
> GCM operation. If they are enabled, crypto_aead_encrypt() return error
> code -EINPROGRESS. In this case tls_do_encryption() needs to wait on a
> completion till the time the response
On 01/30/18 06:51 AM, Atul Gupta wrote:
> What I was referring is that passing "tls" ulp type in setsockopt
> may be insufficient to make the decision when multi HW assist Inline
> TLS solution exists.
Setting the ULP doesn't choose HW or SW implementation, I think that
should be done later when
;t miss one).
> @Dave Watson can you take a quick look to verify the changes are
> good on TLS ULP side.
Looks reasonable, and passes my test suite. One comment below
Tested-by: Dave Watson
> Signed-off-by: John Fastabend
> ---
> include/net/tcp.h |
<1513769897-26945-1-git-send-email-atul.gu...@chelsio.com>
On 12/20/17 05:08 PM, Atul Gupta wrote:
> +static void __init chtls_init_ulp_ops(void)
> +{
> + chtls_base_prot = tcp_prot;
> + chtls_base_prot.hash= chtls_hash;
> + chtls_base_prot.unhash =
already calls sg_unmark_end correctly when it allocates
memory in alloc_sg, or in zerocopy_from_iter.
Signed-off-by: Dave Watson
---
net/tls/tls_sw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 61f394d..0a9b72f 100644
--- a/net/tls/tls_sw.c
+++ b/net
Hi Dave,
On 08/11/17 02:52 PM, Dave Jones wrote:
> kernel BUG at ./include/linux/scatterlist.h:189!
> invalid opcode: [#1] SMP KASAN
...
> Call Trace:
> ? copy_page_to_iter+0x6c0/0x6c0
> tls_sw_sendmsg+0x6d8/0x9c0
> ? alloc_sg+0x510/0x510
> ? cyc2ns_read_end+0x10/0x10
> ? import_iovec+
On 08/01/17 08:18 PM, Tom Herbert wrote:
>
> -static int tls_init(struct sock *sk)
> +static int tls_init(struct sock *sk, char __user *optval, int len)
> {
> - struct inet_connection_sock *icsk = inet_csk(sk);
> struct tls_context *ctx;
> int rc = 0;
>
> @@ -450,7 +449,7 @@ st
some ktls tests with no issues. Thanks
Tested-by: Dave Watson
On 07/29/17 01:12 PM, Tom Herbert wrote:
> On Wed, Jun 14, 2017 at 11:37 AM, Dave Watson wrote:
> > Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP
> > sockets. Based on a similar infrastructure in tcp_cong. The idea is that
> > any
> > U
On 07/30/17 11:14 PM, David Oberhollenzer wrote:
> On 07/24/2017 11:10 PM, Dave Watson wrote:
> > On 07/23/17 09:39 PM, David Oberhollenzer wrote:
> >> After fixing the benchmark/test tool that the patch description
> >> linked to (https://github.com/Mellanox/tls-af_k
On 07/23/17 09:39 PM, David Oberhollenzer wrote:
> After fixing the benchmark/test tool that the patch description
> linked to (https://github.com/Mellanox/tls-af_ktls_tool) to make
> sure that the server and client actually *agree* on AES-128-GCM,
> I simply ran the client program with the --verif
On 07/12/17 09:20 AM, Steffen Klassert wrote:
> On Tue, Jul 11, 2017 at 11:53:11AM -0700, Dave Watson wrote:
> > On 07/11/17 08:29 AM, Steffen Klassert wrote:
> > > Sorry for replying to old mail...
> > > > +int tls_set_sw_offload(struct soc
On 07/11/17 08:29 AM, Steffen Klassert wrote:
> Sorry for replying to old mail...
> > +int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx)
> > +{
>
> ...
>
> > +
> > + if (!sw_ctx->aead_send) {
> > + sw_ctx->aead_send = crypto_alloc_aead("gcm(aes)", 0, 0);
> > +
Hi Richard,
On 07/06/17 04:30 PM, Richard Weinberger wrote:
> Dave,
>
> On Wed, Jun 14, 2017 at 8:36 PM, Dave Watson wrote:
> > Documentation/networking/tls.txt | 135 +++
> > MAINTAINERS| 10 +
> > include/linux/socket.h
-executor1/15452
Signed-off-by: Dave Watson
Reported-by: "Levin, Alexander (Sasha Levin)"
---
net/ipv4/tcp.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 058f509..4c88d20 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3062,
On 06/25/17 02:42 AM, Levin, Alexander (Sasha Levin) wrote:
> On Wed, Jun 14, 2017 at 11:37:14AM -0700, Dave Watson wrote:
> >Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP
> >sockets. Based on a similar infrastructure in tcp_cong. The idea is that any
On 06/23/17 01:15 PM, Dan Carpenter wrote:
> The copy_to_user() function returns the number of bytes remaining but we
> want to return -EFAULT here.
>
> Fixes: 3c4d7559159b ("tls: kernel TLS support")
> Signed-off-by: Dan Carpenter
Acked-by: Dave Watson
Yes, -EFAU
1 - 100 of 124 matches
Mail list logo