Page MenuHomeFreeBSD

Fix netdump buffering.
ClosedPublic

Authored by markj on Aug 16 2019, 7:34 PM.
Tags
None
Referenced Files
F81442810: D21294.diff
Tue, Apr 16, 10:25 AM
Unknown Object (File)
Dec 20 2023, 6:10 AM
Unknown Object (File)
Nov 12 2023, 1:54 PM
Unknown Object (File)
Aug 8 2023, 12:52 AM
Unknown Object (File)
Aug 8 2023, 12:50 AM
Unknown Object (File)
Aug 8 2023, 12:50 AM
Unknown Object (File)
Aug 4 2023, 10:58 PM
Unknown Object (File)
Jul 3 2023, 11:15 PM
Subscribers

Details

Summary

r348473 didn't take into account the fact that we use nd_buf for
buffering kernel dump and EKCD headers. This is done before the final
call to netdump_dumper(), which flushes residual data, so we were
clobbering that data. Add a netdump_flush_buf() function to flush
residual data and use it before copying headers into the buffer.

Test Plan

I never noticed this when debugging dumps from a netdump-enabled
syzkaller setup, but it manifested when I enabled zstd compression:
the decompressor would report corruption.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25923
Build 24487: arc lint + arc unit