Page MenuHomeFreeBSD

Fix netdump buffering.

Authored by markj on Aug 16 2019, 7:34 PM.



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj created this revision.Aug 16 2019, 7:34 PM
markj edited the test plan for this revision. (Show Details)Aug 16 2019, 7:37 PM
markj added reviewers: cem,
cem accepted this revision.Aug 17 2019, 1:43 AM

Nice find

This revision is now accepted and ready to land.Aug 17 2019, 1:43 AM
This revision was automatically updated to reflect the committed changes.