ee0270b6创建于 2023年10月6日历史提交
文件最后提交记录最后更新时间
dcsctp: Rename message_id to mid MID is a RFC8260 property on an I-DATA chunk, replacing the SSN property on the DATA chunk in non-interleaved message. The MID stands for "Message Identifier", and it was frequently named "message_id" in the source code, but sometimes "mid". To be consistent and using the same terminology as is most common in the RFC, use "mid" everywhere. This was triggered by the need to introduce yet another "message identifier" - but for now, this is just a refacotring CL. Bug: None Change-Id: I9cca898d9f3a2f162d6f2e4508ec1b4bc8d7308f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322500 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40876} 2 年前
dcsctp: Prevent overflow of missing parameters This was found when fuzzing. If the specified number of parameter count was larger than std::numeric_limits<size_t>::max()/2, the comparison would overflow and read out-of-bounds. This would only apply to 32-bit platforms and it would lead to a crash as it would access all of the virtual memory range, and more. Fixed: chromium:1216758 Change-Id: I2193d3ed078120b6c3e4645c0b16b9f230055e8d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221742 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34256} 4 年前
dcsctp: add zero checksum acceptable chunk parameter This will be included in INIT/INIT_ACK if the socket has configured the "accept zero checksum" parameter, that will be added in follow-up CLs. Bug: webrtc:14997 Change-Id: I1a2823fbc77cfea8fe746b07c1c77593bc15efe9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298480 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39702} 3 年前
dcsctp: add zero checksum acceptable chunk parameter This will be included in INIT/INIT_ACK if the socket has configured the "accept zero checksum" parameter, that will be added in follow-up CLs. Bug: webrtc:14997 Change-Id: I1a2823fbc77cfea8fe746b07c1c77593bc15efe9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298480 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39702} 3 年前
dcsctp: Do explicit bounds checking in bounded IO The previous approach was that the caller was responsible for ensuring that any buffer passed in to the Bounded IO wrappers, and that any offset from where sub-readers were created were valid. The called would always do a validation of the data and return proper error messages if they were not. This didn't pan out. https://crbug.com/1216758 found an overflow that fooled the validation logic and the fuzzer could read out-of-bounds, although it would always crash in that particular case. There was already bounds checking, but under DCHECKs. This CL changes that so that any bounds checking is done with CHECKS, as would've been done in Rust. It's better to crash than to read arbitrary memory. Bug: chromium:1216758 Change-Id: I89b52f0758495b5fe46f926c142870a263b96314 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221743 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34303} 4 年前
dcsctp: Add bounded byte reader and writer Packets, chunks, parameters and error causes - the SCTP entities that are sent on the wire - are buffers with fields that are stored in big endian and that generally consist of a fixed header size, and a variable sized part, that can e.g. be encoded sub-fields or serialized strings. The BoundedByteReader and BoundedByteWriter utilities make it easy to read those fields with as much aid from the compiler as possible, by having compile-time assertions that fields are not accessed outside the buffer's span. There are some byte reading functionality already in modules/rtp_rtcp, but that module would be a bit unfortunate to depend on, and doesn't have the compile time bounds checking that is the biggest feature of this abstraction of an rtc::ArrayView. Bug: webrtc:12614 Change-Id: I9fc641aff22221018dda9add4e2c44853c0f64f0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212967 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33597} 5 年前
Fix several UBsan issues with memcpy Most of the changes are trivial. Bug: webrtc:14432 Change-Id: I0444527bf57c72c8d65f69754b4a4a1c1d7b2e92 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275340 Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38074} 3 年前
dcsctp: Add bounded byte reader and writer Packets, chunks, parameters and error causes - the SCTP entities that are sent on the wire - are buffers with fields that are stored in big endian and that generally consist of a fixed header size, and a variable sized part, that can e.g. be encoded sub-fields or serialized strings. The BoundedByteReader and BoundedByteWriter utilities make it easy to read those fields with as much aid from the compiler as possible, by having compile-time assertions that fields are not accessed outside the buffer's span. There are some byte reading functionality already in modules/rtp_rtcp, but that module would be a bit unfortunate to depend on, and doesn't have the compile time bounds checking that is the biggest feature of this abstraction of an rtc::ArrayView. Bug: webrtc:12614 Change-Id: I9fc641aff22221018dda9add4e2c44853c0f64f0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212967 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33597} 5 年前
dcsctp: Report duplicate TSNs Reporting the duplicate TSNs is a SHOULD in the RFC, and using the duplicate TNSs is a MAY, and in reality I haven't seen an implementation use it yet. However, it's good for debugging and for stats generation. Bug: webrtc:12614 Change-Id: I1cc3f86961a8d289708cbf50d98dedfd25077955 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219462 Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34053} 4 年前
dcsctp: Add Chunk Validators The SCTP RFCs aren't very strict in specifying when a chunk or parameter is invalid, so most chunks and/or parameters must be accepted but they may need some cleaning to avoid a lot of error handling deeper in the chunk handling code. Bug: webrtc:12614 Change-Id: I723f08cbdc26e1a1b78463b6137340e638089037 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214966 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33788} 5 年前
dcsctp: Add Chunk Validators The SCTP RFCs aren't very strict in specifying when a chunk or parameter is invalid, so most chunks and/or parameters must be accepted but they may need some cleaning to avoid a lot of error handling deeper in the chunk handling code. Bug: webrtc:12614 Change-Id: I723f08cbdc26e1a1b78463b6137340e638089037 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214966 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33788} 5 年前
dcsctp: Use third_party/crc32c for integrity check CRC32c is used in SCTP for integrity checking, and the third_party/crc32c library (https://github.com/google/crc32c) which has been optimized for SSE42 and arm64 and has a much faster fallback implementation for other architectures. Running ./out/Release/dcsctp_benchmark Run on (12 X 4500 MHz CPU s) CPU Caches: L1 Data 32 KiB (x6) L1 Instruction 32 KiB (x6) L2 Unified 1024 KiB (x6) L3 Unified 8448 KiB (x1) Load Average: 11.01, 17.53, 17.11 ------------------------------------------------------------------------------ Benchmark Time CPU Iterations UserCounters... ------------------------------------------------------------------------------ BM_PumpData/1 676 ns 676 ns 1034087 bytes_per_second=1.41063M/s items_per_second=1.47916M/s BM_PumpData/8 671 ns 671 ns 1041809 bytes_per_second=11.3643M/s items_per_second=1.48955M/s BM_PumpData/128 725 ns 725 ns 967170 bytes_per_second=168.398M/s items_per_second=1.37952M/s BM_PumpData/512 800 ns 800 ns 873854 bytes_per_second=610.125M/s items_per_second=1.24954M/s BM_PumpData/1024 911 ns 911 ns 775785 bytes_per_second=1072.2M/s items_per_second=1097.93k/s BM_PumpData/2048 1988 ns 1988 ns 352444 bytes_per_second=982.409M/s items_per_second=502.993k/s BM_PumpData/4096 3893 ns 3893 ns 179999 bytes_per_second=1003.31M/s items_per_second=256.848k/s BM_PumpData/8192 7477 ns 7477 ns 92790 bytes_per_second=1044.88M/s items_per_second=133.745k/s BM_PumpData/65536 97156 ns 97153 ns 7089 bytes_per_second=643.318M/s items_per_second=10.2931k/s BM_EchoServer/1 634 ns 634 ns 1130860 bytes_per_second=1.50512M/s items_per_second=1.57823M/s BM_EchoServer/8 614 ns 614 ns 1136372 bytes_per_second=12.4286M/s items_per_second=1.62904M/s BM_EchoServer/128 644 ns 644 ns 1073464 bytes_per_second=189.618M/s items_per_second=1.55335M/s BM_EchoServer/512 734 ns 734 ns 949487 bytes_per_second=665.181M/s items_per_second=1.36229M/s BM_EchoServer/1024 836 ns 836 ns 838010 bytes_per_second=1.14046G/s items_per_second=1.19586M/s BM_EchoServer/2048 1939 ns 1939 ns 345067 bytes_per_second=1007.27M/s items_per_second=515.724k/s BM_EchoServer/4096 3984 ns 3983 ns 176047 bytes_per_second=980.737M/s items_per_second=251.069k/s BM_EchoServer/8192 7486 ns 7484 ns 95780 bytes_per_second=1043.85M/s items_per_second=133.613k/s BM_EchoServer/65536 92360 ns 92346 ns 7821 bytes_per_second=676.805M/s items_per_second=10.8289k/s No-Presubmit: True Bug: webrtc:12614 Change-Id: Iff21035ee78b263ee0e4b0fe3d07eea24064b921 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215002 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33842} 4 年前
dcsctp: Add CRC32C generator Implemented from RFC4960 with test vectors from RFC3720. Bug: webrtc:12614 Change-Id: If03a41d1ac4acecc3e5840c015878df271b14a1b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213344 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33606} 5 年前
dcsctp: Add CRC32C generator Implemented from RFC4960 with test vectors from RFC3720. Bug: webrtc:12614 Change-Id: If03a41d1ac4acecc3e5840c015878df271b14a1b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213344 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33606} 5 年前
dcsctp: Rename message_id to mid MID is a RFC8260 property on an I-DATA chunk, replacing the SSN property on the DATA chunk in non-interleaved message. The MID stands for "Message Identifier", and it was frequently named "message_id" in the source code, but sometimes "mid". To be consistent and using the same terminology as is most common in the RFC, use "mid" everywhere. This was triggered by the need to introduce yet another "message identifier" - but for now, this is just a refacotring CL. Bug: None Change-Id: I9cca898d9f3a2f162d6f2e4508ec1b4bc8d7308f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322500 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40876} 2 年前
Reland "dcsctp: Support zero checksum packets" This reverts commit 45eae346930aedbf4624d054e0633c94b397b8ec. It was found not to be the root cause of the performance regression, so it's safe to reland. Bug: webrtc:14997 Change-Id: I67c90752875bf4071cbdd5adfa462a37f4d4ceab Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302162 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#39910} 3 年前
Reland "dcsctp: Support zero checksum packets" This reverts commit 45eae346930aedbf4624d054e0633c94b397b8ec. It was found not to be the root cause of the performance regression, so it's safe to reland. Bug: webrtc:14997 Change-Id: I67c90752875bf4071cbdd5adfa462a37f4d4ceab Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302162 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#39910} 3 年前
Reland "dcsctp: Support zero checksum packets" This reverts commit 45eae346930aedbf4624d054e0633c94b397b8ec. It was found not to be the root cause of the performance regression, so it's safe to reland. Bug: webrtc:14997 Change-Id: I67c90752875bf4071cbdd5adfa462a37f4d4ceab Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302162 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#39910} 3 年前
dcsctp: Add TLV trait Various entities in SCTP are padded data blocks, with a type and length field at fixed offsets, all stored in a 4-byte header. This is called the Type-Length-Value format, or TLV for short. See e.g. https://tools.ietf.org/html/rfc4960#section-3.2 and https://tools.ietf.org/html/rfc4960#section-3.2.1 This templated class, which is used as a trait[1], is configurable - a struct passed in as template parameter. [1] https://en.wikipedia.org/wiki/Trait_(computer_programming) Bug: webrtc:12614 Change-Id: I52c2b5056931aba5fb23419406314136b5a4f650 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213180 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33602} 5 年前
dcsctp: Fix iOS build errors Bug: webrtc:12614 Change-Id: Ib221688007892ab0b87ef768d20f7d779b3bfd55 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217381 Reviewed-by: Victor Boivie <boivie@webrtc.org> Commit-Queue: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33911} 4 年前
dcsctp: Enforce variable length TLV minimum length The length field was validated to not be too big, or to have too much padding, but it could be smaller than the fixed size of the chunk, which isn't correct. Now it's enforced to be at minimum the size of the fixed size header. Bug: webrtc:12614 Change-Id: I57089a5ba2854eeb63ab3b4e28cf5878087d06e8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214484 Reviewed-by: Tommi <tommi@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33659} 5 年前