netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Andre Tomt <andre@tomt.net>,
	"Steinar H. Gunderson" <steinar+kernel@gunderson.no>,
	netdev@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: kTLS broken somewhere between 4.18 and 5.0
Date: Sun, 14 Apr 2019 13:40:20 -0700	[thread overview]
Message-ID: <f832cd50-50c5-027c-51db-8a3a3ded4563@gmail.com> (raw)
In-Reply-To: <4cdfca7f-bee0-56f5-e512-8ad2e4e6dfcf@tomt.net>

On 4/13/19 6:56 PM, Andre Tomt wrote:
> On 13.04.2019 17:34, Steinar H. Gunderson wrote:
>> Hi,
>>
>> I've been using kTLS for a while, with my video reflector Cubemap
>> (https://git.sesse.net/?p=cubemap). After I upgraded my server from
>> 4.18.11 to 5.0.6, seemingly I've started seeing corruption. The data sent
>> with send() (HTTP headers, HLS playlists) appears to be fine, but sendfile()
>> (actual video data, from a file on tmpfs) is not; after ~20 kB of data
>> (19626 in one test here), the data appears to be randomly corrupted. Diffing
>> non-TLS (good) and TLS (bad) video data:
>>
>>    00004c70: fa 70 c5 71 b5 f5 b7 ac 74 b0 ca 80 02 4c 06 3f  .p.q....t....L.?
>>    00004c80: 5c 5b 0c b3 e0 a0 c3 21 93 d3 6e 65 36 70 0a 27  \[.....!..ne6p.'
>>    00004c90: 84 67 16 2c 95 c0 55 e1 04 76 52 10 50 5d 00 26  .g.,..U..vR.P].&
>>
>>   -00004ca0: 0c b8 84 70 7e ed 12 8f 5e 7e 18 c0 06 20 02 54  ...p~...^~... .T
>>   +00004ca0: 0c b8 84 70 7e ed 12 8f 5e 7e 0a 60 9f 1f 97 f2  ...p~...^~.`....
>>
>>   -00004cb0: 1e 4c c1 71 7d 0b 91 28 23 98 09 ae c4 95 ae 7f  .L.q}..(#.......
>>   +00004cb0: 6e 17 50 03 67 fa 2f 83 b0 88 eb fc 54 f2 0b 00  n.P.g./.....T...
>>
>>   -00004cc0: a2 92 20 b8 f2 b6 72 2a e8 7e d7 27 99 65 56 70  .. ...r*.~.'.eVp
>>   +00004cc0: 6c 9e a1 02 b4 30 11 25 d7 58 b0 0c c0 6c e1 bd  l....0.%.X...l..
>>
>> It never appears to get back into sync after that. Interestingly, it is
>> _consistently_ wrong; if I download the same fragment multiple times, it
>> breaks at the same place and gives the same garbage (but different fragments
>> give different divergence points). Tested with both wget and Chrome.
>> Does anyone know what could be wrong?
>>
>> (It is, unfortunately, not easy for me to reboot this server at will, so a
>> bisect could be hard.)
>>
>> Please Cc me on any replies, I'm not subscribed to netdev.
>>
>> /* Steinar */
>>
> 
> 
> Reproduced and bisected, the problem showed up in v4.20-rc1. Unfortunately the commit seems to have some significant dependencies so I was unable to verify by reverting it on 4.20.
> 


Hi thanks I'll take a look this evening or first thing tomorrow. I have
a couple other fixes queued up for ktls as well so I'll see if we can get
a fix for this included in that series.

Thanks!
John

  reply	other threads:[~2019-04-14 20:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-13 15:34 kTLS broken somewhere between 4.18 and 5.0 Steinar H. Gunderson
2019-04-14  1:56 ` Andre Tomt
2019-04-14 20:40   ` John Fastabend [this message]
2019-05-02 14:15     ` Andre Tomt
2019-05-07 14:45       ` John Fastabend
2019-05-30 22:41         ` Andre Tomt

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=f832cd50-50c5-027c-51db-8a3a3ded4563@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=andre@tomt.net \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=steinar+kernel@gunderson.no \
    /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).