Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-15 Thread Linus Torvalds
On Wed, Nov 15, 2017 at 2:10 PM, enh wrote: >> >> I actually suspect "just use 128kB" is the actual best option in practice. > > for libc's sysconf(_SC_ARG_MAX) too? i'm fine changing bionic back to > reporting 128KiB if there's an lkml "Linus says" mail that i can link > to in

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-15 Thread Linus Torvalds
On Wed, Nov 15, 2017 at 2:10 PM, enh wrote: >> >> I actually suspect "just use 128kB" is the actual best option in practice. > > for libc's sysconf(_SC_ARG_MAX) too? i'm fine changing bionic back to > reporting 128KiB if there's an lkml "Linus says" mail that i can link > to in the comment. it

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-15 Thread enh
On Sun, Nov 5, 2017 at 12:46 PM, Linus Torvalds wrote: > On Sat, Nov 4, 2017 at 5:39 PM, Rob Landley wrote: >> On 11/03/2017 08:07 PM, Linus Torvalds wrote: But it boils down to "got the limit wrong, the exec failed after the

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-15 Thread enh
On Sun, Nov 5, 2017 at 12:46 PM, Linus Torvalds wrote: > On Sat, Nov 4, 2017 at 5:39 PM, Rob Landley wrote: >> On 11/03/2017 08:07 PM, Linus Torvalds wrote: But it boils down to "got the limit wrong, the exec failed after the fork(), dynamic recovery from which is awkward so I'm

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-15 Thread Pavel Machek
Hi! > Google's internal frame of reference is very different from mine. I got > pointed at a podcast (Android Developers Backstage #53) where Elliott > and another android dev talked about toybox for a few minutes in the > second half, they they shared a chuckle over my complaint that >

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-15 Thread Pavel Machek
Hi! > Google's internal frame of reference is very different from mine. I got > pointed at a podcast (Android Developers Backstage #53) where Elliott > and another android dev talked about toybox for a few minutes in the > second half, they they shared a chuckle over my complaint that >

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-05 Thread Linus Torvalds
On Sat, Nov 4, 2017 at 5:39 PM, Rob Landley wrote: > On 11/03/2017 08:07 PM, Linus Torvalds wrote: >>> >>> But it boils down to "got the limit wrong, the exec failed after the >>> fork(), dynamic recovery from which is awkward so I'm trying to figure >>> out the right limit". >

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-05 Thread Linus Torvalds
On Sat, Nov 4, 2017 at 5:39 PM, Rob Landley wrote: > On 11/03/2017 08:07 PM, Linus Torvalds wrote: >>> >>> But it boils down to "got the limit wrong, the exec failed after the >>> fork(), dynamic recovery from which is awkward so I'm trying to figure >>> out the right limit". > > Sounds later

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-04 Thread Rob Landley
On 11/03/2017 08:37 PM, Kees Cook wrote: > We don't. (In fact, arg copying happens before we've even figured out > which binfmt is involved.) I lifted it to just before the point of no > return, but moving it before arg copying looks very hard (which > contributed to why we went with the

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-04 Thread Rob Landley
On 11/03/2017 08:37 PM, Kees Cook wrote: > We don't. (In fact, arg copying happens before we've even figured out > which binfmt is involved.) I lifted it to just before the point of no > return, but moving it before arg copying looks very hard (which > contributed to why we went with the

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-04 Thread Rob Landley
Correcting Elliot's email to google, not gmail. (Sorry, I'm in Tokyo for work this month, almost over the jetlag...) On 11/03/2017 08:07 PM, Linus Torvalds wrote: > On Fri, Nov 3, 2017 at 4:58 PM, Rob Landley wrote: >> On 11/02/2017 10:40 AM, Linus Torvalds wrote: >> >> But it

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-04 Thread Rob Landley
Correcting Elliot's email to google, not gmail. (Sorry, I'm in Tokyo for work this month, almost over the jetlag...) On 11/03/2017 08:07 PM, Linus Torvalds wrote: > On Fri, Nov 3, 2017 at 4:58 PM, Rob Landley wrote: >> On 11/02/2017 10:40 AM, Linus Torvalds wrote: >> >> But it boils down to "got

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Kees Cook
On Fri, Nov 3, 2017 at 6:22 PM, Linus Torvalds wrote: > On Fri, Nov 3, 2017 at 5:42 PM, Kees Cook wrote: >> >> If we didn't do the "but no more than 75% of _STK_LIM", and moved to >> something like "check stack utilization after loading the

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Kees Cook
On Fri, Nov 3, 2017 at 6:22 PM, Linus Torvalds wrote: > On Fri, Nov 3, 2017 at 5:42 PM, Kees Cook wrote: >> >> If we didn't do the "but no more than 75% of _STK_LIM", and moved to >> something like "check stack utilization after loading the binary", we >> end up in the position where the kernel

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Linus Torvalds
On Fri, Nov 3, 2017 at 5:42 PM, Kees Cook wrote: > > If we didn't do the "but no more than 75% of _STK_LIM", and moved to > something like "check stack utilization after loading the binary", we > end up in the position where the kernel is past the point of no return > (so

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Linus Torvalds
On Fri, Nov 3, 2017 at 5:42 PM, Kees Cook wrote: > > If we didn't do the "but no more than 75% of _STK_LIM", and moved to > something like "check stack utilization after loading the binary", we > end up in the position where the kernel is past the point of no return > (so instead of E2BIG, the

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Linus Torvalds
On Fri, Nov 3, 2017 at 4:58 PM, Rob Landley wrote: > On 11/02/2017 10:40 AM, Linus Torvalds wrote: > > But it boils down to "got the limit wrong, the exec failed after the > fork(), dynamic recovery from which is awkward so I'm trying to figure > out the right limit". Well, the

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Linus Torvalds
On Fri, Nov 3, 2017 at 4:58 PM, Rob Landley wrote: > On 11/02/2017 10:40 AM, Linus Torvalds wrote: > > But it boils down to "got the limit wrong, the exec failed after the > fork(), dynamic recovery from which is awkward so I'm trying to figure > out the right limit". Well, the thing is, you

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Kees Cook
On Fri, Nov 3, 2017 at 4:58 PM, Rob Landley wrote: > But this just broke my _fix_, not the earlier deployed stuff. I removed > the size measuring code when the 131072 limit went away, the bug was > there's a new limit I need to not hit, I tried to figure out what the > limit is

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Kees Cook
On Fri, Nov 3, 2017 at 4:58 PM, Rob Landley wrote: > But this just broke my _fix_, not the earlier deployed stuff. I removed > the size measuring code when the 131072 limit went away, the bug was > there's a new limit I need to not hit, I tried to figure out what the > limit is now, confirmed

Re: [Toybox] Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread enh
On Fri, Nov 3, 2017 at 4:58 PM, Rob Landley wrote: > On 11/02/2017 10:40 AM, Linus Torvalds wrote: >> On Wed, Nov 1, 2017 at 9:28 PM, Linus Torvalds >> wrote: >>> >>> Behavior changed. Things that test particular limits will get different >>>

Re: [Toybox] Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread enh
On Fri, Nov 3, 2017 at 4:58 PM, Rob Landley wrote: > On 11/02/2017 10:40 AM, Linus Torvalds wrote: >> On Wed, Nov 1, 2017 at 9:28 PM, Linus Torvalds >> wrote: >>> >>> Behavior changed. Things that test particular limits will get different >>> results. That's not breakage. >>> >>> Did an actual

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Rob Landley
On 11/02/2017 10:40 AM, Linus Torvalds wrote: > On Wed, Nov 1, 2017 at 9:28 PM, Linus Torvalds > wrote: >> >> Behavior changed. Things that test particular limits will get different >> results. That's not breakage. >> >> Did an actual user application or script

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-03 Thread Rob Landley
On 11/02/2017 10:40 AM, Linus Torvalds wrote: > On Wed, Nov 1, 2017 at 9:28 PM, Linus Torvalds > wrote: >> >> Behavior changed. Things that test particular limits will get different >> results. That's not breakage. >> >> Did an actual user application or script break? Only due to getting the

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-02 Thread Linus Torvalds
On Wed, Nov 1, 2017 at 9:28 PM, Linus Torvalds wrote: > > Behavior changed. Things that test particular limits will get different > results. That's not breakage. > > Did an actual user application or script break? Ahh. I should have read that email more carefully.

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-02 Thread Linus Torvalds
On Wed, Nov 1, 2017 at 9:28 PM, Linus Torvalds wrote: > > Behavior changed. Things that test particular limits will get different > results. That's not breakage. > > Did an actual user application or script break? Ahh. I should have read that email more carefully. If xargs broke, that _will_

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-01 Thread Kees Cook
On Wed, Nov 1, 2017 at 4:34 PM, Rob Landley wrote: > Toybox has been trying to figure out how big an xargs is allowed to be > for a while: > > http://lists.landley.net/pipermail/toybox-landley.net/2017-October/009186.html > > We're trying to avoid the case where you can run

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-01 Thread Kees Cook
On Wed, Nov 1, 2017 at 4:34 PM, Rob Landley wrote: > Toybox has been trying to figure out how big an xargs is allowed to be > for a while: > > http://lists.landley.net/pipermail/toybox-landley.net/2017-October/009186.html > > We're trying to avoid the case where you can run something from the >

Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-01 Thread Rob Landley
Toybox has been trying to figure out how big an xargs is allowed to be for a while: http://lists.landley.net/pipermail/toybox-landley.net/2017-October/009186.html We're trying to avoid the case where you can run something from the command line, but not through xargs. In theory this limit is

Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-01 Thread Rob Landley
Toybox has been trying to figure out how big an xargs is allowed to be for a while: http://lists.landley.net/pipermail/toybox-landley.net/2017-October/009186.html We're trying to avoid the case where you can run something from the command line, but not through xargs. In theory this limit is