net: tls, update curr on splice as well
Subsystems (3)
John Fastabend
maintainerPATCH 1/1 net: tls, update curr on splice as well
commit c5a595000e2677e865a39f249c056bc05d6e55fd upstream.
Backport of upstream fix for tls on 6.1 and lower kernels. The curr pointer must also be updated on the splice similar to how we do this for other copy types.
--- net/tls/tls_sw.c | 2 ++ 1 file changed, 2 insertions(+)
net/tls/tls_sw.c +2 -0
@@ -1225,6 +1225,8 @@ static int tls_sw_do_sendpage(struct sock *sk, struct page *page, }sk_msg_page_add (msg_pl, page, copy, offset); + msg_pl->sg.copybreak =0 ; + msg_pl->sg.curr = msg_pl->sg.end;sk_mem_charge (sk, copy); offset += copy;
Signature · 1 line
2.33.0
PATCH 1/1 net: tls, update curr on splice as well
Quoted 7 lines · John Fastabend
commit
c5a595000e2677e865a39f249c056bc05d6e55fdupstream.Backport of upstream fix for tls on 6.1 and lower kernels. The curr pointer must also be updated on the splice similar to how we do this for other copy types.
Cc [email protected] # 6.1.x-
I think this Cc marker was wrong - the commit message says "on 6.1 and lower kernels", but this marker seems to say "6.1 and *newer* kernels". The current status is that this issue is fixed on 6.6.7 and 6.1.69, but not on the 5.x stable kernels.
Quoted 23 lines
Reported-by Jann Horn <[email protected]>Fixes d829e9c4112b ("tls: convert to generic sk_msg interface")Signed-off-by John Fastabend <[email protected]>--- net/tls/tls_sw.c | 2 ++ 1 file changed, 2 insertions(+)net/tls/tls_sw.c +2
-1@@ -1225,6 +1225,8 @@ static int tls_sw_do_sendpage(struct sock *sk, struct page *page, }sk_msg_page_add (msg_pl, page, copy, offset); + msg_pl->sg.copybreak =0 ; + msg_pl->sg.curr = msg_pl->sg.end;sk_mem_charge (sk, copy); offset += copy; --2.33.0
Greg Kroah-Hartman
maintainerQuoted 7 lines · Jann Horn
Quoted 6 lines · John Fastabend
commit
c5a595000e2677e865a39f249c056bc05d6e55fdupstream.Backport of upstream fix for tls on 6.1 and lower kernels. The curr pointer must also be updated on the splice similar to how we do this for other copy types.
Quoted 6 lines
Quoted 1 line
Cc [email protected] # 6.1.x-I think this Cc marker was wrong - the commit message says "on 6.1 and lower kernels", but this marker seems to say "6.1 and *newer* kernels". The current status is that this issue is fixed on 6.6.7 and 6.1.69, but not on the 5.x stable kernels.
Then can someone provide a working backport to those kernels? Right now, this one does not apply at all there.
thanks,
greg k-h
John Fastabend
maintainerQuoted 10 lines · Greg Kroah-Hartman
Quoted 9 lines · Jann Horn
Quoted 7 lines · John Fastabend
commit
c5a595000e2677e865a39f249c056bc05d6e55fdupstream.Backport of upstream fix for tls on 6.1 and lower kernels. The curr pointer must also be updated on the splice similar to how we do this for other copy types.
Cc [email protected] # 6.1.x-
Quoted 7 lines
Quoted 4 lines
I think this Cc marker was wrong - the commit message says "on 6.1 and lower kernels", but this marker seems to say "6.1 and *newer* kernels". The current status is that this issue is fixed on 6.6.7 and 6.1.69, but not on the 5.x stable kernels.
Then can someone provide a working backport to those kernels? Right now, this one does not apply at all there.
I'll put something together now and run it through some tests then send it. I'm not sure where I got the notation 6.1.x- to mean <=6.1, but I don't see it in the stable-kernel-rules.rst at the moment so maybe I made it up. Sorry about that.
Quoted 4 lines
thanks,
greg k-h