From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2950 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general,gmane.linux.toybox Subject: Re: [Toybox] [musl] Re: toybox: Rough edges in pending Date: Wed, 20 Mar 2013 01:22:05 -0500 Message-ID: <1363760525.15703.43@driftwood> References: <20130319123221.ddd8eb53.idunham@lavabit.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1363791643 12772 80.91.229.3 (20 Mar 2013 15:00:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Mar 2013 15:00:43 +0000 (UTC) Cc: toybox@lists.landley.net, musl@lists.openwall.com To: Isaac Dunham Original-X-From: musl-return-2951-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 20 16:01:07 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UIKVm-000442-BZ for gllmg-musl@plane.gmane.org; Wed, 20 Mar 2013 16:01:06 +0100 Original-Received: (qmail 32155 invoked by uid 550); 20 Mar 2013 15:00:42 -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 32147 invoked from network); 20 Mar 2013 15:00:41 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:subject:to:cc:in-reply-to:x-mailer:message-id :mime-version:content-type:content-disposition :content-transfer-encoding:x-gm-message-state; bh=6cWN63QqapWJ/U6xUpdtLsk39blIOgRCMtWyKxveAVI=; b=mWJqvxpgrmisdYupjv7xtkkHf7ce7AjTLGVa7a9cX/KQJLBiqUoYu/Ibdo+0+AI1Hd VHvb9+6LhgH3BD/+ZmyjKU4K1jynlO/nOYxRzKHxKwOUlpaho4oFpSjQ61xuaSDZM+Ys iZhMCJ2NLDJjRISJ2naReW8rvQhOd9kqwnEICKm3cR0D8SC2FvJjSk7DluGOl6rXetBW /xOktWCVufZsYoHSOFb/bt7tVmGesKvaoRJU4yFrH0h3gBNjiU3HGY0WKU3wz9OG3gK1 ibyPYg5OVrWNCX2HPZHefmyQlH41MJJYff0L9HlLRzbZPwnsto2VSEc3KfIanNfgFUIz plcw== X-Received: by 10.50.203.3 with SMTP id km3mr4607061igc.64.1363791629330; Wed, 20 Mar 2013 08:00:29 -0700 (PDT) In-Reply-To: <20130319123221.ddd8eb53.idunham@lavabit.com> (from idunham@lavabit.com on Tue Mar 19 14:32:21 2013) X-Mailer: Balsa 2.4.11 Content-Disposition: inline X-Gm-Message-State: ALoCoQlf7XFME7Nirg/6cKTGk2Blsaf9gxMpZArddwWhSLjEx5rHwblevreQqu32/TcUYtuX6XOe Xref: news.gmane.org gmane.linux.lib.musl.general:2950 gmane.linux.toybox:272 Archived-At: On 03/19/2013 02:32:21 PM, Isaac Dunham wrote: > A couple things that would have cleared this up for me-- > Either a note in toys/pending/README that said: > "Code in this directory may or may not work." (somehow, "...await =20 > review > and/or cleanup" doesn't seem to communicate this) Good point. I'll add a note. > or a "CONFIG_WORKING" that prevents enabling toys that are =20 > nonfunctional without > realizing it (iirc, the kernel has a trick along these lines, so make =20 > allyesconfig > doesn't turn _everything_ on). The rule has been that "default n" means it's not ready. (My current corner case here is "who", which works as advertised but =20 posix says it should support a bunch of options that it doesnt' yet, =20 and I don't want to make it default y and forget to add them. But when =20 I say "a bunch" I mean "-abdHlmpqrstTu" which I haven't had time to =20 just sit down and implement yet, and possibly we want to document a =20 variance and go "really, this is minicomputer stuff, modern systems =20 don't usually have lots of multiple simultaneous users without =20 containers anymore...") > > > Also, when toybox is built with musl, and toybox sh executes ls, > > > I get a hang; strace indicates that something funny is going on: > > > > I am honestly amazed it got _that_ far. > > > > > I anticipate this is a bug in musl, so I'll cross-post. > > > > If toysh _isn't_ corrupting the heap or something similar, I'd be > > stunned. It's not a real command yet. >=20 > Surprisingly enough, it makes it far enough to give the illusion it =20 > might be usable. It's an illusion. It's using toybuf for parsing so the command line =20 can't be longer than 4k (kernel limit's 128k and I've seen patches =20 raise it), it has no environment variable support, can't parse quotes =20 (which turns out to be quite funky because "$(echo "hello world")" has =20 nested quote contexts), no flow control implemented yet (if, while, =20 shell functions...), no &&, ||, or pipeline support... And so on, and so forth... One of my current half-finished pending =20 things I haven't even bothered to check in yet is test.c (which =20 implements [ and [[ the way "bc" shares code with $(())), and once I've =20 got that I can dink at toysh a bit and at least redo the parsing. Anyway, not a musl thing. Feel free to poke me just on the toybox list =20 if you think i should take a weekend and make toysh suck less, but the =20 _scope_ of the shell promblem is... http://landley.net/notes-2006.html#31-08-2006 http://landley.net/notes-2006.html#10-09-2006 http://landley.net/notes-2007.html#20-01-2007 http://landley.net/notes-2007.html#19-10-2007 Stuff. Rob=