[RFC 1/1] net/tls(TLS_SW): Handle -ENOSPC error return from device/AES-NI

2020-10-07 Thread Pooja Trivedi
When an -ENOSPC error code is returned by the crypto device or AES-NI layer, TLS SW path sets an EBADMSG on the socket causing the application to fail. In an attempt to address the -ENOSPC in the TLS SW path, changes were made in tls_sw_sendpage path to trim current payload off the plain and encry

[PATCH net] net/tls(TLS_SW): Add selftest for 'chunked' sendfile test

2020-06-05 Thread Pooja Trivedi
would get flushed and the issue would not happen. So a shutdown control message following sendfile can mask the issue. Signed-off-by: Pooja Trivedi Signed-off-by: Mallesham Jatharkonda Signed-off-by: Josh Tway --- tools/testing/selftests/net/tls.c | 58 +++ 1 fi

Re: [RFC PATCH net 1/1] net/tls(TLS_SW): Add selftest for 'chunked' sendfile test

2020-06-03 Thread Pooja Trivedi
On Tue, Jun 2, 2020 at 3:19 PM Jakub Kicinski wrote: > > On Tue, 2 Jun 2020 14:56:25 + Pooja Trivedi wrote: > > This selftest tests for cases where sendfile's 'count' > > parameter is provided with a size greater than the intended > > file size. > &

[RFC PATCH net 1/1] net/tls(TLS_SW): Add selftest for 'chunked' sendfile test

2020-06-02 Thread Pooja Trivedi
would get flushed and the issue would not happen. So a shutdown control message following sendfile can mask the issue. Signed-off-by: Pooja Trivedi --- tools/testing/selftests/net/tls.c | 58 +++ 1 file changed, 58 insertions(+) diff --git a/tools/testing/sel

[RFC 0/1] net/tls(TLS_SW): Data integrity issue with sw kTLS using sendfile

2020-06-02 Thread Pooja Trivedi
When sendfile is used for kTLS file delivery and the size provided to sendfile via its 'count' parameter is greater than the file size, kTLS fails to send the file correctly. The last chunk of the file is not sent, and the data integrity of the file is compromised on the receiver side. Based on

Re: [PATCH net] net/tls(TLS_SW): Fix integrity issue with non-blocking sw KTLS request

2020-05-20 Thread Pooja Trivedi
On Tue, May 19, 2020 at 5:43 PM Jakub Kicinski wrote: > > On Tue, 19 May 2020 13:21:56 -0400 Pooja Trivedi wrote: > > On Mon, May 18, 2020 at 6:50 PM Jakub Kicinski wrote: > > > On Sun, 17 May 2020 16:26:36 + Pooja Trivedi wrote: > > > > In pure sw ktl

Re: [PATCH net] net/tls(TLS_SW): Fix integrity issue with non-blocking sw KTLS request

2020-05-19 Thread Pooja Trivedi
On Mon, May 18, 2020 at 6:50 PM Jakub Kicinski wrote: > > On Sun, 17 May 2020 16:26:36 + Pooja Trivedi wrote: > > In pure sw ktls(AES-NI), -EAGAIN from tcp layer (do_tcp_sendpages for > > encrypted record) gets treated as error, subtracts the offset, and > > returns to

[PATCH net] net/tls(TLS_SW): Fix integrity issue with non-blocking sw KTLS request

2020-05-17 Thread Pooja Trivedi
ned-off-by: Pooja Trivedi Reviewed-by: Mallesham Jatharkonda Reviewed-by: Josh Tway --- net/tls/tls_sw.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index e23f94a..d8ebdfc 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -415,

net/tls(TLS_SW): double free in tls_tx_records

2019-08-28 Thread Pooja Trivedi
TLS module crash while running SSL record encryption using klts_send_[file] using crypto accelerator (Nitrox). Following are the preconditions and steps to reproduce the issue: Preconditions: 1) Installed 5.3-rc4 2) Nitrox5 card plugin (crypto accelerator) Steps to reproduce the issue: 1) Instal