Live data from Hacker News

Stali: A new static Linux distribution

sta.li

101–110 of 233 posts

Re: Stali: A new static Linux distribution

#101

I really like the idea of static linking. Then I think about how I'd patch the next inevitable openssl bug. Then I don't like it as much.

Most Linux distributions are not going to have enough hardware to rebuild large fractions of their packages when a vulnerability is found in a popular library in a reasonable time. Also, many users will be unhappy to download gigabytes of updates when this happens instead of few megs. (Not every organization runs an internal mirror and not every user sits on a 1GBit pipe)

This would lead to very slow security updates for the end users.

Re: Stali: A new static Linux distribution

#102
> Achieve better memory footprint than heavyweight distros using dynamic linking and all its problems

If this is really effective in reducing executable size, it's supremely ironic, since the original point of dynamic linking was to reduce the overall size of groups of executables by sharing common function libraries.

Re: Stali: A new static Linux distribution

#103
post #90

I really like the idea of static linking. Then I think about how I'd patch the next inevitable openssl bug. Then I don't like it as much.

It's a complete fallacy that every program that needs crypto needs to link to crypto libraries. Look at how Plan 9 does it, where everything is statically linked, but it's other processes which do crypto. Replace only one binary, and the crypto is fixed for all binaries.

shared object libraries are exactly that, a special case of an ELF executable. Special, in the sense that they are not directly executable by users on the command line, other than that, there is no difference (as regular ELF executables can be compiled as re-entrant, position independent code just like shared object libraries).

Re: Stali: A new static Linux distribution

#104

It is quite hard to take seriously any project that so much uses word "suck" to describe other projects, i.e., other people work, or their approaches.

Why? Most software out there sucks. Computers suck. Most people are unbelievably bad at designing and writing software. Very few of us are RJ Micals or Adam Leventhals, or Jeff Bonwicks. Most people have major issues with reasoning and implementation when it comes to writing software. It's the reality.

Re: Stali: A new static Linux distribution

#105
post #47
post #24

Shocked that it takes a fringe project to be promoting static linking and cleaning up the filesystem. Would love to hear the linux grandfathers chime in...

Static linking is a virtue now? I don't understand the advantages.

One advantage is that it improves the compiler's ability to optimize. Obviously that matters for some applications more than others.

Re: Stali: A new static Linux distribution

#107

Why is static linking supposed to REDUCE memory usage and binary size? Am I missing something really obvious? Eg, if five different binaries are statically linked against the same version of OpenSSL, won't it be in memory and on disk four times more than it would be on a dynamic system?

If you took the "one tool one purpose" thing to an extreme, you'd only have one binary with OpenSSL compiled in, right? Given some familiarity with the suckless ideology, it seems that it is the simplicity of static linking, not conservative use of disk space, which is its virtue. For, if anyone groks the tool chain perfectly but lacks disk space, I'd like to hear the secret.

> you'd only have one binary with OpenSSL compiled in

So then any process that wanted to use crypto etc. would have to call this binary?

That just seems like a very inefficient way if implementing dymanic linking...

Re: Stali: A new static Linux distribution

#108
post #102

> Achieve better memory footprint than heavyweight distros using dynamic linking and all its problems If this is really effective in reducing executable size, it's supremely ironic, since the original point of dynamic linking was to reduce the overall size of groups of executables by sharing common function libraries.

More likely, they're saying mainstream distros are so bloated even dynamic linking can't save them: dynamic linking does reduce memory footprint, but that only mitigates bloat.

Re: Stali: A new static Linux distribution

#109
post #29

Is there any work on ASLR for quasi-static binaries? So you have no external linking (good for distribution and unsurprising dependencies), but still relocate at runtime.

In stali, or in general? For stali there's a slightly confusing FAQ entry: http://sta.li/faq / "Aren’t statically linked executables less secure?" > it is simple to use position-independent code in static executables and (assuming a modern kernel that supports address randomization for executables) fully position-independent executables are easily created on all modern operating systems. [...] Thus we consider this a…

I'm assuming that even with PIE, the relative positioning of the statically linked libraries is constant. That means you only need a single address leak to be able to ROP to anywhere.
Post reply on HN