[Bug dynamic-link/22359] New: ld.so's cache should live in /var/cache, and support cache deletion.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug dynamic-link/22359] New: ld.so's cache should live in /var/cache, and support cache deletion.

glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=22359

            Bug ID: 22359
           Summary: ld.so's cache should live in /var/cache, and support
                    cache deletion.
           Product: glibc
           Version: 2.27
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: carlos at redhat dot com
  Target Milestone: ---

The dynamic loader's cache, ld.so.cache, currently resides in /etc, but it is a
cache, and by it's very definition it should live in /var/cache.

However, because /var might not be mounted early on, it would negatively impact
application performance if the cache was missing. Worse, when special
directories are added to the ld.so.conf, it might actually prevent applications
from starting if it was missing.

Then again the counter-point is that /var, for system logging purposes, has to
be present immediately when the system boots, and on Fedora /var is /.

We should evaluate the benefits of moving ld.so.cache to /var/cache to match
the policy that as a cache file it should be removable without any problems.

This entire change probably requires two changes:

* If the dynamic loader might fail to load a DSO, and the cache is missing,
parse /etc/ld.so.conf to look for additional search directories that were
cache-only, and thus continue to operate even in the absence of the cache.

* Move the cache to /var/ldconfig/ld.so.cache so it can be managed as a proper
cache by tooling that does so.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug dynamic-link/22359] ld.so's cache should live in /var/cache, and support cache deletion.

glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=22359

Michal Schmidt <mschmidt at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mschmidt at redhat dot com

--- Comment #1 from Michal Schmidt <mschmidt at redhat dot com> ---
(In reply to Carlos O'Donell from comment #0)
> Then again the counter-point is that /var, for system logging purposes, has
> to be present immediately when the system boots, and on Fedora /var is /.

Fedora allows /var to be a separate mount from /.
systemd-journald solves the logging problem by storing the logs in
/run/log/journal (on tmpfs) until /var/log/journal is mounted. Then
systemd-journal-flush.service moves the logs to the persistent location.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug dynamic-link/22359] ld.so's cache should live in /var/cache, and support cache deletion.

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=22359

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security-

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
The dynamic loader does not perform any /etc/ld.so.conf processing today.  We
would have to change that in order to make /etc/ld.so.cache a true cache.  I
don't think this is realistic because would need glob etc. as part of the
dynamic loader.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug dynamic-link/22359] ld.so's cache should live in /var/cache, and support cache deletion.

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=22359

--- Comment #3 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #2)
> The dynamic loader does not perform any /etc/ld.so.conf processing today.
> We would have to change that in order to make /etc/ld.so.cache a true cache.
> I don't think this is realistic because would need glob etc. as part of the
> dynamic loader.

We don't have to do this processing. We can just fail to load
/var/lib/ldconfig/cache and thus not support running whatever applications
needed those path. Thus treating this as truly "configuration data" instead of
a cache.

--
You are receiving this mail because:
You are on the CC list for the bug.