Page MenuHomeFreeBSD

[PPC64] Fix rtld direct exec mode
ClosedPublic

Authored by luporl on Aug 1 2019, 8:38 PM.
Tags
None
Referenced Files
F171622031: D21131.id60470.diff
Sat, Sep 12, 6:09 AM
Unknown Object (File)
Mon, Sep 7, 10:48 PM
Unknown Object (File)
Thu, Sep 3, 1:34 PM
Unknown Object (File)
Wed, Sep 2, 2:46 PM
Unknown Object (File)
Tue, Aug 25, 6:03 AM
Unknown Object (File)
Tue, Aug 25, 5:55 AM
Unknown Object (File)
Tue, Aug 18, 8:19 PM
Unknown Object (File)
Tue, Aug 18, 8:02 PM
Subscribers

Details

Summary

Instead of restoring the saved values of argc, argv and envp,
these must be loaded from the stack that _rtld() modifies.

This fixes rtld direct exec mode.
E.g.: /libexec/ld-elf.so.1 /bin/ls

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks good. Can the same change apply to powerpc?

This revision is now accepted and ready to land.Aug 3 2019, 11:58 AM

Looks good. Can the same change apply to powerpc?

A brief look at powerpc/rtld_start.S code seems to indicate that the same changes apply to powerpc.

But it would be better for someone with 32-bit powerpc hardware to make the change and confirm it works fine.

This revision was automatically updated to reflect the committed changes.