Page MenuHomeFreeBSD

Support for GZIP compressed modules within kldload
Needs ReviewPublic

Authored by der_semihalf.com on Nov 30 2015, 4:48 PM.

Details

Summary

These change provide support for loading compressed modules into running kernel

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

der_semihalf.com retitled this revision from to Support for GZIP compressed modules within kldload.
der_semihalf.com updated this object.
der_semihalf.com edited the test plan for this revision. (Show Details)
der_semihalf.com set the repository for this revision to rS FreeBSD src repository - subversion.
der_semihalf.com changed the edit policy from "All Users" to "der_semihalf.com (Dominik Ermel)".
der_semihalf.com removed rS FreeBSD src repository - subversion as the repository for this revision.

Following has been fixed according to requests:

  • Panic when unknown file format (non-elf/gzelf) file has been provided.
  • duplicated code has been removed
  • problem with file left open in case of error with gzelf file loading

Additionaly:

  • some comments have been added
  • additional range checking in memcpy operations (to avoid jumping around memory if ELF data gets corrupted

Hi,

Just saw this review. We (Isilon) have a different change that implements this in userspace (IIRC). Is there a reason why this was implemented in the kernel instead?

Thanks,
-NGie

In D4324#98953, @ngie wrote:

Hi,

Just saw this review. We (Isilon) have a different change that implements this in userspace (IIRC). Is there a reason why this was implemented in the kernel instead?

Thanks,
-NGie

Hi,

Does not require intermediate file for example when loading modules off the RO system (in post-loader.)
Can you direct me the the different solution? It is based on intermediate file?

Regs,
der