Re: Signed overflow in ufs i_modrev calculation

2016-02-04 Thread Mike Belopuhov
On Wed, Jan 27, 2016 at 09:52 +0100, Martin Natano wrote: > In ufs, the calculation of i_modrev can produce signed overflow on 32 > bit architectures (found on i386). The tv.tv_usec * 4294 calculation is > designed to move the microseconds part of a struct timeval to the upper > bits of an unsigned

Re: Signed overflow in ufs i_modrev calculation

2016-02-03 Thread Stefan Kempf
Mike Belopuhov wrote: > Any OKs or objections to this diff? This looks solid to me, FWIW. Looks good to me as well. ok stefan@ > On Wed, Jan 27, 2016 at 09:52 +0100, Martin Natano wrote: > > In ufs, the calculation of i_modrev can produce signed overflow on 32 > > bit architectures (found on i

Re: Signed overflow in ufs i_modrev calculation

2016-02-03 Thread Mike Belopuhov
Any OKs or objections to this diff? This looks solid to me, FWIW. On Wed, Jan 27, 2016 at 09:52 +0100, Martin Natano wrote: > In ufs, the calculation of i_modrev can produce signed overflow on 32 > bit architectures (found on i386). The tv.tv_usec * 4294 calculation is > designed to move the micr

Re: Signed overflow in ufs i_modrev calculation

2016-01-27 Thread Mike Belopuhov
On 27 January 2016 at 14:21, Martin Natano wrote: > On Wed, Jan 27, 2016 at 12:27:46PM +0100, Mike Belopuhov wrote: >> On 27 January 2016 at 09:52, Martin Natano wrote: >> > In ufs, the calculation of i_modrev can produce signed overflow on 32 >> > bit architectures (found on i386). The tv.tv_use

Re: Signed overflow in ufs i_modrev calculation

2016-01-27 Thread Martin Natano
On Wed, Jan 27, 2016 at 12:27:46PM +0100, Mike Belopuhov wrote: > On 27 January 2016 at 09:52, Martin Natano wrote: > > In ufs, the calculation of i_modrev can produce signed overflow on 32 > > bit architectures (found on i386). The tv.tv_usec * 4294 calculation is > > designed to move the microse

Re: Signed overflow in ufs i_modrev calculation

2016-01-27 Thread Mike Belopuhov
On 27 January 2016 at 09:52, Martin Natano wrote: > In ufs, the calculation of i_modrev can produce signed overflow on 32 > bit architectures (found on i386). The tv.tv_usec * 4294 calculation is > designed to move the microseconds part of a struct timeval to the upper > bits of an unsigned(!) 32

Signed overflow in ufs i_modrev calculation

2016-01-27 Thread Martin Natano
In ufs, the calculation of i_modrev can produce signed overflow on 32 bit architectures (found on i386). The tv.tv_usec * 4294 calculation is designed to move the microseconds part of a struct timeval to the upper bits of an unsigned(!) 32 bit value to make room for simple i_modrev increments, but