« Using a SSL certificate from letsencrypt with google app engine | Main | Certificate verification of sites backed by letsencrypt in python »

11/11/2024

Comments

Adhemerval

It is being addressed on glibc https://patchwork.sourceware.org/project/glibc/list/?series=36745

The main issue is how to keep the API async-signal-safe, and to synchronize with uses of envp like execve and posix_spawn. You can see that Florian’s work is far from simple: it uses a SeqLock and a temporary buffer for envp usage, and the rationale of of internal safeness is still not clear to me. But I hope to get this done for 2.41 and hopefully since it is not an ABI breaker we can backport it.

TTimo

Very happy to learn that this is being worked on in glibc. The patch series roughly coincides with when we started wrangling with this, but of course I never found it then.

A_nitsuj

> We reduced how much we rely on getenv, mostly by caching the calls. There is still an uncomfortable amount of it, but it's in OS libraries at this point (x11, xcb, dbus etc.) and we continue reducing it's usage.

Would a native Wayland version of the steam client alleviate any of these concerns?

Gabriele Svelto

I've fixed this problem in Firefox some time back by using function interposition:

https://bugzilla.mozilla.org/show_bug.cgi?id=1752703
https://hg.mozilla.org/mozilla-central/rev/1760c9f902bf
https://hg.mozilla.org/mozilla-central/rev/79dc5e93cef4

Since we can't change all our dependencies (they are too many) I've slotted some thread-safe environment manipulation functions between the code calling them and the libc implementations. This is achieved by linking our own library (mozglue) before libc on Linux, and by hooking dlsym() on Android where libc might have been loaded before we get a chance to load our code. I've eliminated all crashes related to environment manipulation with this trick, with the only exception of cases where glibc calls those functions internally, but that's a genuine glibc bug that needs to be fixed upstream.

TTimo

We considered intercepting the calls, but we were concerned about the performance implications of marshalling so much getenv traffic. I understand that in some cases it may be the only way though.

The comments to this entry are closed.