Page MenuHomeFreeBSD

imgact_elf: handle unaligned phdrs
ClosedPublic

Authored by kib on Mon, Jun 8, 1:26 AM.
Tags
None
Referenced Files
F159224960: D57498.id.diff
Thu, Jun 11, 1:28 PM
F159223219: D57498.id179398.diff
Thu, Jun 11, 12:58 PM
Unknown Object (File)
Wed, Jun 10, 8:26 PM
Unknown Object (File)
Wed, Jun 10, 5:06 AM
Unknown Object (File)
Mon, Jun 8, 3:23 PM
Unknown Object (File)
Mon, Jun 8, 1:47 PM
Unknown Object (File)
Mon, Jun 8, 1:52 AM
Subscribers

Details

Summary
Althought non-compliant, there are binaries which have the phdrs placed
unaligned in the image.  Since we have the code to allocate memory for
off-page phdrs, the same code path can be used to handle unaligned
phdrs.

Relax the requirement for both the activated image and interpreter.

PR:     295629

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Mon, Jun 8, 1:26 AM
This revision is now accepted and ready to land.Mon, Jun 8, 1:51 PM

Is printing a warning in this case useful, or not worth the trouble?

Is printing a warning in this case useful, or not worth the trouble?

I don't think so -- we should emit warnings or errors only for things that are actionable. For most users there's nothing for them to do with this information. Unless we imagine someone will see the warning, report an issue to the project responsible for the oddly-formatted binary, and then that project is going to fix their toolchain, we can just ignore it.

This revision was automatically updated to reflect the committed changes.