Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-06 Thread Kang-Che Sung
(Forgot to CC the mailing list on the last sent mail. Resent to CC the mailing list) On Tue, Feb 7, 2017 at 6:59 AM, Rob Landley wrote: > My attitude towards false positives may have been influenced by people > running static checkers against toybox and submitting long

Re: [PATCH] modutils: fix config options dependency (2)

2017-02-06 Thread Kang-Che Sung
On Tue, Feb 7, 2017 at 4:56 AM, Denys Vlasenko wrote: > On Mon, Feb 6, 2017 at 4:38 AM, Kang-Che Sung wrote: >> Thank you, but I hope you understand why I propose the not-so-simple route in >> the patch. Especially regarding the use of

Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-06 Thread Rob Landley
On 02/06/2017 07:20 AM, Denys Vlasenko wrote: > I'm not using their runtime debug thing (I don't even know what it is), > if some people would use it and find real bugs, it's good for me. It's your call what to merge into busybox (and I see you already did), I was trying to figure out if I should

Re: [PATCH] modutils: fix config options dependency (2)

2017-02-06 Thread Denys Vlasenko
On Mon, Feb 6, 2017 at 4:38 AM, Kang-Che Sung wrote: > On Mon, Feb 6, 2017 at 2:04 AM, Denys Vlasenko > wrote: >> Applied a simpler version of it. Thanks >> >> On Wed, Feb 1, 2017 at 10:22 AM, Kang-Che Sung wrote: >>> - The

Re: timeout setting for login

2017-02-06 Thread Denys Vlasenko
On Mon, Feb 6, 2017 at 6:09 PM, Patrick Pief wrote: > On Mon, 06 Feb 2017 13:59:16 +0100 walter harms wrote > > > Am 28.01.2017 02:46, schrieb Patrick Pief: > > > Hello, > > > > > > As noted in http://unix.stackexchange.com/q/340333/117599 BBox's

Re: timeout setting for login

2017-02-06 Thread Patrick Pief
On Mon, 06 Feb 2017 13:59:16 +0100 walter harms wrote > > > Am 28.01.2017 02:46, schrieb Patrick Pief: > > Hello, > > > > As noted in http://unix.stackexchange.com/q/340333/117599 BBox's login has > > no > > way for setting LOGIN_TIMEOUT, it's always

Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-06 Thread Denys Vlasenko
On Mon, Feb 6, 2017 at 8:22 AM, Rob Landley wrote: > On 02/05/2017 09:10 PM, Kang-Che Sung wrote: >> On Mon, Feb 6, 2017 at 8:52 AM, Rob Landley wrote: >>> What's an archive input that actually fails? What's an example of a >>> processor machine language that

Re: timeout setting for login

2017-02-06 Thread walter harms
Am 28.01.2017 02:46, schrieb Patrick Pief: > Hello, > > As noted in http://unix.stackexchange.com/q/340333/117599 BBox's login has no > way for setting LOGIN_TIMEOUT, it's always there and hardcoded to 60 seconds. > > What would you think if there was support for it but not through a setting

Re: timeout setting for login

2017-02-06 Thread Denys Vlasenko
On Sat, Jan 28, 2017 at 2:46 AM, Patrick Pief wrote: > As noted in http://unix.stackexchange.com/q/340333/117599 BBox's login has no > way for setting LOGIN_TIMEOUT, it's always there and hardcoded to 60 seconds. > > What would you think if there was support for it but not

Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-06 Thread Kang-Che Sung
In case that Rob Landley isn't convinced, there is another argument supporting casting to unsigned before bit shifting: There are little cases that left shifting to sign bit is actually useful. AFAIK, the use of 1<<31 cases are no other than 1. intended to represent a signed INTn_MIN constant, 2.

Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-06 Thread Daniel Thompson
On 06/02/17 00:52, Rob Landley wrote: On 02/01/2017 12:35 PM, Rostislav Skudnov wrote: An example of such an error (should be compiled with DEBUG_SANITIZE): runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Sure it can. We know exactly what bit pattern that

Re: [PATCH] Replace int -> uint to avoid signed integer overflow

2017-02-06 Thread Kang-Che Sung
On Mon, Feb 6, 2017 at 3:22 PM, Rob Landley wrote: > On 02/05/2017 09:10 PM, Kang-Che Sung wrote: >> On Mon, Feb 6, 2017 at 8:52 AM, Rob Landley wrote: >>> What's an archive input that actually fails? What's an example of a >>> processor machine language that