RE: [PATCH] time: Avoid undefined behaviour in timespec64_to_ns

2020-09-16 Thread Zengtao (B)
> -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Tuesday, September 15, 2020 8:45 PM > To: Zengtao (B) > Cc: Thomas Gleixner; Vincenzo Frascino; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] time: Avoid undefined behaviour in > timespe

Re: [PATCH] time: Avoid undefined behaviour in timespec64_to_ns

2020-09-15 Thread Arnd Bergmann
On Tue, Sep 15, 2020 at 2:20 PM Zengtao (B) wrote: > > > Fixes: bd40a175769d ("y2038: itimer: change implementation to > > timespec64") > > > > This one caused the regression, but if we add the check here, it > > may be best to also add it in prior kernels that may have the same > > bug in other

RE: [PATCH] time: Avoid undefined behaviour in timespec64_to_ns

2020-09-15 Thread Zengtao (B)
> -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Tuesday, September 01, 2020 8:47 PM > To: Zengtao (B) > Cc: Thomas Gleixner; Vincenzo Frascino; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] time: Avoid undefined behaviour in > timespe

Re: [PATCH] time: Avoid undefined behaviour in timespec64_to_ns

2020-09-01 Thread Arnd Bergmann
On Tue, Sep 1, 2020 at 11:32 AM Zeng Tao wrote: > > Since commit bd40a175769d ("y2038: itimer: change implementation to > timespec64") > we have break the time clamping which handles the potential overflow. Indeed, good catch! And I broke it despite the comment telling me about the problem. >