Re: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/kern_rndq.c:LINE, negation of -ADD Reply-To:

2019-09-28 Thread Rhialto
On Sat 28 Sep 2019 at 09:01:28 +0200, Martin Husemann wrote: > There is also the question whether it would be best to just disable > ubsan here and restore the original solution. Maybe you're talking about some other detected UB here? The code in kern_rndq.c that I'm touching in my patch has been

Re: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/kern_rndq.c:LINE, negation of -ADD Reply-To:

2019-09-28 Thread Kamil Rytarowski
On 28.09.2019 09:01, Martin Husemann wrote: > On Fri, Sep 27, 2019 at 08:50:55PM +0200, Rhialto wrote: >> I have been pondering it for a while and it seems more complicated than >> I first thought... it seems that the actual value of delta isn't even >> important, but what rnd_delta_estimate() mak

Re: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/kern_rndq.c:LINE, negation of -ADD Reply-To:

2019-09-28 Thread Martin Husemann
On Fri, Sep 27, 2019 at 08:50:55PM +0200, Rhialto wrote: > I have been pondering it for a while and it seems more complicated than > I first thought... it seems that the actual value of delta isn't even > important, but what rnd_delta_estimate() makes of it. There is also the question whether it

Re: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/kern_rndq.c:LINE, negation of -ADD Reply-To:

2019-09-27 Thread Rhialto
On Fri 27 Sep 2019 at 21:12:13 +0200, Kamil Rytarowski wrote: > Thank you for the analysis. Please prepare a patch and commit. Please > add in the message: > > Reported-by: syzbot+68c37d09c833f8ec1...@syzkaller.appspotmail.com How about this patch. I managed to avoid getting into 64-bit calculati

Re: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/kern_rndq.c:LINE, negation of -ADD Reply-To:

2019-09-27 Thread Kamil Rytarowski
On 27.09.2019 20:50, Rhialto wrote: > On Fri 27 Sep 2019 at 15:53:47 +0200, Kamil Rytarowski wrote: >> On 27.09.2019 10:19, Rhialto wrote: >>> On Thu 26 Sep 2019 at 01:15:23 +0200, Kamil Rytarowski wrote: Is this patch correct? http://netbsd.org/~kamil/patch-00168-kern_rndq.c-avoid-o

Re: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/kern_rndq.c:LINE, negation of -ADD Reply-To:

2019-09-27 Thread Rhialto
On Fri 27 Sep 2019 at 15:53:47 +0200, Kamil Rytarowski wrote: > On 27.09.2019 10:19, Rhialto wrote: > > On Thu 26 Sep 2019 at 01:15:23 +0200, Kamil Rytarowski wrote: > >> Is this patch correct? > >> > >> http://netbsd.org/~kamil/patch-00168-kern_rndq.c-avoid-overflow.txt > >> > >> This code will ma