Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 3 Feb 2015 00:52:51 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: musl and android

On Sat, Jan 31, 2015 at 10:08:56PM +0700, Рысь wrote:
> В Thu, 22 Jan 2015 09:37:52 +0700
> Рысь <lynx@...server.ru> пишет:
> 
> > В Wed, 21 Jan 2015 13:36:37 -0500
> > Rich Felker <dalias@...c.org> пишет:
> > 
> > > 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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.