Re: F40 Change Proposal: Optimized Binaries for the AMD64 Architecture (System-Wide)

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

 



On 12/28/23 1:25 PM, Robert Marcano wrote:
On 12/28/23 12:58 PM, Chris Adams wrote:
Once upon a time, Aoife Moloney <amoloney@xxxxxxxxxx> said:
Systemd will be modified to insert the additional directories into the
`$PATH` environment variable (affecting all programs on the system)

Anything that depends on PATH entries is IMHO doomed to failure.  There
are way too many things that explicitly set PATH to "known" values (for
good and bad reasons) to be able to depend on extending it.  Heck, it
took a long time to get sudo just to include /usr/local/{bin,sbin}.


Maybe replacing the /usr/bin related entries with a generic wrapper that launch the best binary from the per architecture directories.

Note: This may affect a few programs that use argv[0] for something meaningful.

The more I think about this, I am more convinced that /usr/bin installed binaries must do this redirection too even in the case the PATH is modified as this proposal states.

What about programs intentionally use absolute paths? These programs will not take advantage of the optimizations of the binary they are trying to start.

There many reasons for sometimes using an absolute path is agood idea, like:

1. Security: avoid depending on a PATH that can be user manipulated.
2. Configuration files that allow to switch to alternate implementation of the tool they call. I found a few on my installation, and their defaults include /usr/bin absolute paths. 3. Programs that run inside PATH is reset for security like sudo, CGI-BIN, etc.

Notice this PATH based optimization will only work when callers invoke the program by name only, relative paths will not get optimized either, a rare case but it could happen.
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux