From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6944 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl and android Date: Tue, 3 Feb 2015 00:52:51 -0500 Message-ID: <20150203055251.GM23507@brightrain.aerifal.cx> References: <20150115161322.4ee903b7@sibserver.ru> <20150118133237.40beda09@sibserver.ru> <20150118064440.GA4574@brightrain.aerifal.cx> <20150118150119.1a80a4ba@sibserver.ru> <20150118164010.GC4574@brightrain.aerifal.cx> <20150121173403.75ef5a15@sibserver.ru> <20150121183637.GK4574@brightrain.aerifal.cx> <20150122093752.671ec2f0@sibserver.ru> <20150131220856.73112b21@sibserver.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1422942788 7498 80.91.229.3 (3 Feb 2015 05:53:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2015 05:53:08 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6957-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 03 06:53:07 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YIWQ7-0001PH-01 for gllmg-musl@m.gmane.org; Tue, 03 Feb 2015 06:53:07 +0100 Original-Received: (qmail 28180 invoked by uid 550); 3 Feb 2015 05:53:04 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 28172 invoked from network); 3 Feb 2015 05:53:03 -0000 Content-Disposition: inline In-Reply-To: <20150131220856.73112b21@sibserver.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6944 Archived-At: On Sat, Jan 31, 2015 at 10:08:56PM +0700, Рысь wrote: > В Thu, 22 Jan 2015 09:37:52 +0700 > Рысь пишет: > > > В Wed, 21 Jan 2015 13:36:37 -0500 > > Rich Felker пишет: > > > > > It would be very much appreciated to send patches as attachments > > > rather than links. There's no way to have a well-documented ongoing > > > discussion of the patch if it's not in a permanent place for review, > > > and attached to the email/archives is the best way to achieve that. > > > > > > Rich > > > > Sorry. > > > > Now patch is attached (I think it is more sane now to include it here) > > No comments about code correctness and security? I haven't yet had a chance to look in detail. I just read over it briefly again and one thing that popped out is that some aspects are not namespace clean. In particular there are standard functions depending on symbols with names like android_* rather than something in the reserved namespace like __android_*. One other thing that struck me was all the __istonum functions. The need for separate functions for all those things seems to be an artificial creation due to a bad calling convention -- using a pointer-to-result as the argument. If you instead returned the value and used a pointer-to-error-flag as the argument, one function would suffice for all integer types. In general I suspect there's still more that could be streamlined or where the size of the diff versus upstream could be reduced. I didn't see any other glaring security or correctness issues but I'll let you know if I notice another when I get a chance to read it in more detail. > That patch I sent to list contains a typo in android_isappusr(): return > (p != 0) instead of (p == 0). > > The code works fine on my phone for now, I moved all bionic depend > binaries to patched musl without pain. Thanks for your useful hints. Nice! Rich