Page MenuHomeFreeBSD

tcp: make IsLost() related accounting variables signed
ClosedPublic

Authored by rscheff on Oct 12 2023, 8:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 9 2024, 3:57 AM
Unknown Object (File)
Feb 9 2024, 3:57 AM
Unknown Object (File)
Jan 19 2024, 11:29 PM
Unknown Object (File)
Jan 1 2024, 1:26 AM
Unknown Object (File)
Dec 20 2023, 6:41 AM
Unknown Object (File)
Dec 10 2023, 6:46 PM
Unknown Object (File)
Dec 2 2023, 3:37 PM
Unknown Object (File)
Nov 27 2023, 5:01 PM
Subscribers

Details

Summary

Coverity found that one safety check (kassert) was not
functional, as possible incorrect subtractions during
the accounting wouldn't show up as (invalid) negative
values.

Also reshuffle the zeroing of these variables to align
with the struct (ascending addresses).

Reported by: gallatin

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cc added inline comments.
sys/netinet/tcp_var.h
131–132

Looks need to adjust the tabs here if that's the case, then good to go.
for example:
"int32_t hole_bytes;"

This revision is now accepted and ready to land.Oct 12 2023, 9:01 PM
sys/netinet/tcp_var.h
131–132

Not quite sure what you mean; the line is <tab>int32_t<tab><tab>hole_byte;<tab> /* comment

Identical to the sack_bytes_rexmit above. Maybe the tab width is set different somehow?

But I could change all the "int32_t<tab><tab>" to "int32_t<space><tab>" in this struct to prevent single-char tabs...

  • whitespace change (int32_t<tab><tab> to int32_t<space><tab>)
This revision now requires review to proceed.Oct 17 2023, 12:00 PM
sys/netinet/tcp_var.h
131–132

Not quite sure what you mean; the line is <tab>int32_t<tab><tab>hole_byte;<tab> /* comment

Identical to the sack_bytes_rexmit above. Maybe the tab width is set different somehow?

But I could change all the "int32_t<tab><tab>" to "int32_t<space><tab>" in this struct to prevent single-char tabs...

Maybe that's a display problem. I checked the source code file. For uint32_t, there is a single tab after it. For int32_t, there are double tabs after it. So double tabs should be the format after int32_t.

This revision is now accepted and ready to land.Oct 17 2023, 2:00 PM