tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fixing $ORGIN RPATHs - at least some of them



In article <20171106141651.GA24822%britannica.bec.de@localhost>,
Joerg Sonnenberger  <joerg%bec.de@localhost> wrote:
>On Mon, Nov 06, 2017 at 08:21:24AM -0500, Christos Zoulas wrote:
>> There is no try harder, which is what I am trying to explain. All 3 methods
>> are doing exactly the same thing. This is the problem we have; the only way
>> to get back from a vnode to a path is by using the reverse namei cache.
>
>The point is that no reversing of the namei cache *should* be done here.
>The full path should be computed as side effect of the original exec
>look up.

We already do a getcwd to find the path in the non absolute case in exec.
The resulting path is not normalized, but it is absolute (good enough for
now). I propose to add p->p_path in struct proc, and cleanup the rest of
the places to use it:

http://www.netbsd.org/~christos/p_path.diff

I have not even compiled this, but I will do so and test if there are
no objections. This means that we always set AT_SUN_PATHNAME in the auxv
(for binaries that have Auxv) and we can always use sysctl to get the
pathname for the process).

christos



Home | Main Index | Thread Index | Old Index