Re: UBSAN: Undefined behaviour in drivers/pps/pps.c

2019-01-11 Thread Dmitry Torokhov
On Wed, Jan 09, 2019 at 10:20:50AM +0100, Rodolfo Giometti wrote: > On 08/01/2019 21:24, Kyungtae Kim wrote: > > We report a bug in linux-4.20: "UBSAN: Undefined behaviour in > > drivers/pps/pps.c" > > > > kernel config: https://kt0755.github.io/etc/config_v4.20_stable > > repro: https://kt0755.g

Re: UBSAN: Undefined behaviour in drivers/pps/pps.c

2019-01-10 Thread Kyungtae Kim
It seems that timeout.nsec doesn't need to be patched. But before going further, I'm just curious why such timeout variables in the kernel are defined as signed type variable in the first place? Thanks, Kyungtae Kim On Wed, Jan 9, 2019 at 4:20 AM Rodolfo Giometti wrote: > > On 08/01/2019 21:24,

Re: UBSAN: Undefined behaviour in drivers/pps/pps.c

2019-01-09 Thread Rodolfo Giometti
On 08/01/2019 21:24, Kyungtae Kim wrote: We report a bug in linux-4.20: "UBSAN: Undefined behaviour in drivers/pps/pps.c" kernel config: https://kt0755.github.io/etc/config_v4.20_stable repro: https://kt0755.github.io/etc/repro.a6372.c pps_cdev_pps_fetch() lacks the bounds checking for computin