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)
Wed, Oct 23, 7:57 PM
Unknown Object (File)
Tue, Oct 22, 9:42 PM
Unknown Object (File)
Tue, Oct 22, 3:03 PM
Unknown Object (File)
Oct 6 2024, 4:39 PM
Unknown Object (File)
Sep 26 2024, 4:38 AM
Unknown Object (File)
Sep 19 2024, 10:52 AM
Unknown Object (File)
Sep 18 2024, 11:25 AM
Unknown Object (File)
Sep 17 2024, 9:43 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