Re: AT_EXECFN not useful

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: John Reiser <jreiser@...>
Cc: Linux Kernel <linux-kernel@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>
Date: Friday, August 15, 2008 - 7:59 pm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Reiser wrote:

It is not possible to use the raw path provided.  One _always_ would
have to canonicalize the path (call realpath etc).  That's terribly
expensive and it requires that nothing in the path hasn't changed.



The information is always correct when it is provided.  If the file goes
away then the AT_EXECFN use case also fails since realpath fails, or
worse, provides wrong data since it's using newer files.



The only case where AT_EXECFN has an advantage is when /proc isn't
mounted.  That's not supported anyway because this is the only way for
many things how the kernel exposes data (sysctl is deprecated) and we
need this information in many places.



If the program is started via a relative path AT_EXECFN has this string.



As said above, in that case it isn't useful either because one cannot
verify the value.

I've removed all support for AT_EXECFN and won't put it back since there
is no use case where it has any advantage.  realpath() is terribly slow.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkimGHcACgkQ2ijCOnn/RHS8LACfdknhKbYiaKo8fe4hFgRq3VZn
emYAn2vdy7Jddzia7m6hLj6nMlnU0HiO
=NJxG
-----END PGP SIGNATURE-----
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
AT_EXECFN not useful, Ulrich Drepper, (Thu Aug 14, 1:15 pm)
Re: AT_EXECFN not useful, John Reiser, (Fri Aug 15, 1:10 am)
Re: AT_EXECFN not useful, Ulrich Drepper, (Fri Aug 15, 7:59 pm)
Re: AT_EXECFN not useful, John Reiser, (Mon Aug 18, 11:04 am)