Re: dietlibc broken on i386 since Feb 2018?

Felix von Leitner <[email protected]> Mon, 16 Sep 2019 15:03:53 +0200
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
> > It is even documented there.
> Actually not. After some trial and error I discovered that disabling WANT_SSP will make diet work again.
> But HERE it is only documented that the *binary* will segfault - not diet itself.
> And you are writing about -fstack-protector which makes sense. But this is not strictly related.
> This dietfeature change made diet work again:

diet itself _is_ a binary linked against dietlibc.

On purpose, so you can tell if your dietfeatures settings work with your
kernel version.

> $ cvs di dietfeatures.h 
> Index: dietfeatures.h
> ===================================================================
> RCS file: /cvs/dietlibc/dietfeatures.h,v
> retrieving revision 1.80
> diff -u -r1.80 dietfeatures.h
> --- dietfeatures.h      11 Dec 2018 15:16:39 -0000      1.80
> +++ dietfeatures.h      16 Sep 2019 08:30:53 -0000
> @@ -163,9 +163,11 @@
>  /* If you compile dietlibc without WANT_SSP and then try to link code
>   * compiled with -fstack-protector against it, the binary will segfault
>   * when calling that code. */
> +/*
>  #if (__GNUC__>4) || ((__GNUC__==4) && (__GNUC_MINOR__>=1))
>  #define WANT_SSP
>  #endif
> +*/

That only works if none of your code is compiled with -fstack-protector.
Otherwise the binaries will segfault.

> > What kernel are you using, if I may ask?
> :-) RHEL 2.6.18-419.el5xen

> BTW - "ancient kernel" is maybe misleading if I see WANT_SYSENTER... ;-)

2.6.18 was released in 2006.
If that is not ancient then what is?

We are still supporting it though, you just have to enable the
/dev/random support or not use the stack protector.

Felix