On 10/20/10 21:42, Richard L. Hamilton wrote:
While I still like the idea of a runtime function (new syscall
or extension to mprotect()) to control default stack or heap
permissions (mainly for use with a preloadable shared object
to apply to existing binaries that don't have a spare program
header, although some other runtime uses might be imaginable),
leaving oneself the leeway to patch a binary statically also
seems desirable. I gather that something had been done
to leave some room so that for newer binaries, one could
patch in runpath changes longer than the original runpath
(whereas for older ones, one might well have been limited
to a new runpath that fit in the same space as the old one).
Are there any _current_ uses you can see for a spare unused
(PT_NULL) program header other than changing it into a
PT_SUNWSTACK header? (I imagine that there's always a good
chance that future uses as yet unsupported might turn up,
i.e. some future feature that could be retrofitted into existing
binaries given a spare header to put it into; but I'm thinking
now in terms of current possibilities.)
The something was
6516118 Reserved space needed in ELF dynamic section and string table
PSARC 2007/127 Reserved space for editing ELF dynamic sections
This is definitely a similar idea, elfedit being the common thread.
I don't see another use for a spare program header, other
than for this SUNWSTACK purpose, at this time. However, the
cost of an extra program header is nil, so that doesn't worry me.
We'll see...
- Ali
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org