From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14700 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] mips: add single-instruction math functions Date: Thu, 19 Sep 2019 09:25:39 -0400 Message-ID: <20190919132539.GG9017@brightrain.aerifal.cx> References: <20190911103224.504A15C44C@mx7.valuehost.ru> <20190913183123.GI9017@brightrain.aerifal.cx> <965098322.20190918201804@mobile-stream.com> <20190918200401.GD9017@brightrain.aerifal.cx> <1641023798.20190919155431@mobile-stream.com> <20190919131437.GF9017@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="33024"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) Cc: musl@lists.openwall.com To: info@mobile-stream.com Original-X-From: musl-return-14716-gllmg-musl=m.gmane.org@lists.openwall.com Thu Sep 19 15:25:56 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iAwRY-0008Tu-5J for gllmg-musl@m.gmane.org; Thu, 19 Sep 2019 15:25:56 +0200 Original-Received: (qmail 17507 invoked by uid 550); 19 Sep 2019 13:25:53 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17488 invoked from network); 19 Sep 2019 13:25:53 -0000 Content-Disposition: inline In-Reply-To: <20190919131437.GF9017@brightrain.aerifal.cx> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14700 On Thu, Sep 19, 2019 at 09:14:37AM -0400, Rich Felker wrote: > On Thu, Sep 19, 2019 at 03:54:31PM +0300, info@mobile-stream.com wrote: > > It is probably possible to build soft-float ARMv6 musl with LDRD and > > let it crash on XScale v5TE system due to stricter alignment > > requirements. Does musl prevent this with whatever ldsonames? I > > think not. > > No, because the ABI is the same and you can run armv6 and armv5 > binaries using the same libc.so/ldso. > > > And if the kernel would reject such binary (dunno), why are you > > against external nan2008 enforcement then? > > > > Finally, I believe it is possible to build mips32r2 binary with > > rotate instructions and let it fail silently and strangely on r1 > > system (rotate opcode reuses one of the shift opcodes) as kernel > > apparently ignores the corresponding flag in the ELF header. This > > seems to be the only case of three you want to fix. > > This isn't about noisy or silent failure of binaries using new ISA > features on old cpus. It's about the inability to use a > baseline-supporting libc.so/ldso on a newer cpu with the changed ISA, > for binaries built with the changed ISA. The closest analogy to the mips situation might be arm where there are separate branches of baseline ISA: armv4t, and the intersection of armv7-a and armv7-m (called just armv7?). Here, there's currently no way to make a single baseline ISA libc.so that can run on everything just because armv4t lacks thumb2 and armv7-m lacks arm (the 32-bit arm ISA). This is unfortunate but might be fixable if we ever get to the point where building as thumb1 is supportable, but would break again if we wanted to add plain armv4 (non-t) support (EABI doesn't specify this but can be extended in a non-incompatble way). I don't think the arm situation is an exact analogy since it does not have completely disconnected components in the compatibility graph. It just has 2 roots. I bring this up because my last email was probably too long, and the point here is not "rejecting abs2008/nan2008 without a new ldsoname" but rather highlighting that there are issues that were never discussed, and that might have already created a big mess in the wild, and figuring out what if anything needs to be done about it. This discussion should have happened a long time ago, and didn't, at least not with musl. Rich