Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2018-03-26 Thread Deepa Dinamani
On Mon, Mar 26, 2018 at 2:55 PM, Matthew Wilcox wrote: > On Mon, Mar 26, 2018 at 10:01:30PM +0200, Arnd Bergmann wrote: >> I had suggested a more complete helper function at some point, >> to take care of all combinations of checking/non-checking, 32/64 >> bit, microsecond/nanosecond, and zeroing/

Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2018-03-26 Thread Matthew Wilcox
On Mon, Mar 26, 2018 at 10:01:30PM +0200, Arnd Bergmann wrote: > I had suggested a more complete helper function at some point, > to take care of all combinations of checking/non-checking, 32/64 > bit, microsecond/nanosecond, and zeroing/checking the upper 32 bits > of nanoseconds before comparing

Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2018-03-26 Thread Arnd Bergmann
On Fri, Jan 12, 2018 at 8:49 PM, Jeff Moyer wrote: > Matthew Wilcox writes: > >> On Thu, Dec 14, 2017 at 11:18:30AM +0800, Leizhen (ThunderTown) wrote: >>> On 2017/12/14 3:31, Matthew Wilcox wrote: >>> > On Wed, Dec 13, 2017 at 11:27:00AM -0500, Jeff Moyer wrote: >>> >> Matthew Wilcox writes: >>

Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2018-01-12 Thread Jeff Moyer
Matthew Wilcox writes: > On Thu, Dec 14, 2017 at 11:18:30AM +0800, Leizhen (ThunderTown) wrote: >> On 2017/12/14 3:31, Matthew Wilcox wrote: >> > On Wed, Dec 13, 2017 at 11:27:00AM -0500, Jeff Moyer wrote: >> >> Matthew Wilcox writes: >> >> >> >>> On Wed, Dec 13, 2017 at 09:42:52PM +0800, Zhen L

Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2018-01-02 Thread Matthew Wilcox
On Thu, Dec 14, 2017 at 11:18:30AM +0800, Leizhen (ThunderTown) wrote: > On 2017/12/14 3:31, Matthew Wilcox wrote: > > On Wed, Dec 13, 2017 at 11:27:00AM -0500, Jeff Moyer wrote: > >> Matthew Wilcox writes: > >> > >>> On Wed, Dec 13, 2017 at 09:42:52PM +0800, Zhen Lei wrote: > Below informati

Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2017-12-13 Thread Leizhen (ThunderTown)
On 2017/12/14 3:31, Matthew Wilcox wrote: > On Wed, Dec 13, 2017 at 11:27:00AM -0500, Jeff Moyer wrote: >> Matthew Wilcox writes: >> >>> On Wed, Dec 13, 2017 at 09:42:52PM +0800, Zhen Lei wrote: Below information is reported by a lower kernel version, and I saw the problem still exist

Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2017-12-13 Thread Matthew Wilcox
On Wed, Dec 13, 2017 at 11:27:00AM -0500, Jeff Moyer wrote: > Matthew Wilcox writes: > > > On Wed, Dec 13, 2017 at 09:42:52PM +0800, Zhen Lei wrote: > >> Below information is reported by a lower kernel version, and I saw the > >> problem still exist in current version. > > > > I think you're righ

Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2017-12-13 Thread Benjamin LaHaise
On Wed, Dec 13, 2017 at 06:11:12AM -0800, Matthew Wilcox wrote: > On Wed, Dec 13, 2017 at 09:42:52PM +0800, Zhen Lei wrote: > > Below information is reported by a lower kernel version, and I saw the > > problem still exist in current version. > > I think you're right, but what an awful interface w

Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2017-12-13 Thread Jeff Moyer
Matthew Wilcox writes: > On Wed, Dec 13, 2017 at 09:42:52PM +0800, Zhen Lei wrote: >> Below information is reported by a lower kernel version, and I saw the >> problem still exist in current version. > > I think you're right, but what an awful interface we have here! > The user must not only fetc

Re: [PATCH 1/1] aio: make sure the input "timeout" value is valid

2017-12-13 Thread Matthew Wilcox
On Wed, Dec 13, 2017 at 09:42:52PM +0800, Zhen Lei wrote: > Below information is reported by a lower kernel version, and I saw the > problem still exist in current version. I think you're right, but what an awful interface we have here! The user must not only fetch it, they must validate it separa

[PATCH 1/1] aio: make sure the input "timeout" value is valid

2017-12-13 Thread Zhen Lei
Below information is reported by a lower kernel version, and I saw the problem still exist in current version. UBSAN: Undefined behaviour in include/linux/ktime.h:55:34 signed integer overflow: -4971973988617027584 * 10 cannot be represented in type 'long int' .. [] timespec_to_ktime i