mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: musl and android
Date: Tue, 3 Feb 2015 00:52:51 -0500	[thread overview]
Message-ID: <20150203055251.GM23507@brightrain.aerifal.cx> (raw)
In-Reply-To: <20150131220856.73112b21@sibserver.ru>

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


      reply	other threads:[~2015-02-03  5:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15  9:13 Рысь
2015-01-15 11:01 ` Rich Felker
2015-01-15 12:00   ` dynamic linking (Re: [musl] musl and android) u-wsnj
2015-01-15 12:15     ` Rich Felker
2015-01-15 13:04       ` u-wsnj
2015-01-15 13:34         ` Rich Felker
2015-01-15 15:56           ` OT: " u-wsnj
2015-01-15 13:53   ` musl and android Рысь
2015-01-18  6:32 ` Рысь
2015-01-18  6:44   ` Rich Felker
2015-01-18  8:01     ` Рысь
2015-01-18 16:40       ` Rich Felker
2015-01-19 18:00         ` Рысь
2015-01-21 10:34         ` Рысь
2015-01-21 18:36           ` Rich Felker
2015-01-22  2:37             ` Рысь
2015-01-31 15:08               ` Рысь
2015-02-03  5:52                 ` Rich Felker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150203055251.GM23507@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).