Bug #2005
closedAdd 7 more auxinfo types to support RTLD upgrade]
0%
Description
Hi Matt,
I'd like to make another pitch for implementing AT_EXECPATH only, and
leave the other six auxinfo candidates as unimplemented as previously
discussed.
The one-sentence summary is that the fallback mechanism doesn't provide
the same path information as the auxinfo AT_EXECPATH version, and it
affects the functionality of the new libmap.conf and the dynamic rpath
token expansion functionality of the rtld upgrade.
I have improved the fallback mechanism as shown in the attachments
(freebsd version, improved fallback version). This seems to allow the
new DragonFly RTLD to function as expected with libmap.conf and $ORIGIN
token, but it requires the use of getcwd, access, and realpath in order
to do it. As an example, with AT_EXECPATH implemented, the command "ldd
somefile" to get expanded "/usr/bin/ldd /true/path/to/somefile".
Without AT_EXECPATH implemented it remains as "ldd somefile". With my
improved fallback, the command gets expanded to "ldd
/true/path/to/somefile".
If vn_fullpath has better performance than 3 combined functions, then
implementing AT_EXECPATH may be worth it for performance reasons.
What do you think?
Regards,
John
Matthew Dillon wrote:
Ok, I'm going to let Sascha handle this submission too. I
talked with John a bit about it and here is my position:
- For the sake of making the porting easier I'm O.K. with
the userland side being implemented, with the exception
of the PAGESIZES stuff.
- I am very much <against> implementing any of the kernel side.
I don't see any point whatsoever in these 'features' other than
adding unnecessary complexity to the system just to replace
a few system calls that already only take ~200ns to run or less.
- Plus we also have our 'resident' utility. I guess people might
have forgotten that we have that. It removes nearly all of the
overhead of loading a complex dynamically linked program. We
don't need these added features in DFly to make things go faster.So, in summary, The #define's are ok, but the kernel shouldn't
implement any of them (no kernel code or in-kernel structural
changes). The userland code support is ok, with the exception of
the PAGESIZES sysctl stuff because I don't think we should implement
any kernel side support for that, at least not the way they've got
it setup.-Matt
Files