Page MenuHomeFreeBSD

Remove zlib 1.0.4 from kernel.
ClosedPublic

Authored by delphij on Aug 23 2019, 7:32 AM.

Details

Summary

Remove zlib 1.0.4 from kernel.

PR: 229763

Test Plan

make tinderbox

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 26084
Build 24618: arc lint + arc unit

Event Timeline

delphij created this revision.Aug 23 2019, 7:32 AM
emaste accepted this revision.Aug 23 2019, 3:58 PM
emaste added inline comments.
sys/conf/files
4002–4003

Makes no material difference, but presumably this list could have been stripped down with each individual removal?

This revision is now accepted and ready to land.Aug 23 2019, 3:58 PM
ota_j.email.ne.jp requested changes to this revision.Aug 23 2019, 11:51 PM

We have a last item - sys/kern/subr_compressor.c includes sys/zutil.h.
I attempted and saw crc32() API conflict between gsb_crc32.h and zutil.h.
I haven't got a chance this week, though.

This revision now requires changes to proceed.Aug 23 2019, 11:51 PM
delphij updated this revision to Diff 61240.Aug 24 2019, 7:02 PM

Fix subr_compressor.c.

delphij marked an inline comment as done.Aug 24 2019, 7:02 PM

PTAL.

sys/conf/files
4002–4003

Yes.

delphij marked an inline comment as done.

@markj -- do you have some suggestion on how should we test subr_compressor.c changes?

markj added a comment.Aug 24 2019, 7:30 PM

@markj -- do you have some suggestion on how should we test subr_compressor.c changes?

That code is used for user and kernel core dump compression. So:

  • Set kern.compress_user_cores=1 (a value of 2 means "use zstd") and trigger a user core dump. I usually just run "cat" and enter Ctrl-\ to send SIGQUIT. Verify that you can decompress the core dump and open it in gdb.
  • Enable kernel core dump compression using "dumpon -z" (see the dumpon(8) man page) and trigger a kernel core dump using sysctl debug.kdb.panic=1. Verify that you can gunzip the resulting vmcore (it should appear under /var/crash following a reboot) and open it in kgdb.
sys/kern/subr_compressor.c
178

It doesn't look crc32_raw() and zlib's crc32() isn't inter-exchangeable.
I created and tested in D21408.

delphij updated this revision to Diff 61258.Aug 25 2019, 7:52 AM

Remove D21408 portion of change.

This revision is now accepted and ready to land.Aug 25 2019, 2:07 PM

Looks like this was merged as rS351480 but phabricator didn't count that for closing this review (full URL shouldn't be in "Differential Revision:"??)

phabricator didn't count that for closing this review

Looks like the Differential Revision: string and the URL were on different lines.