Re: CVS commit: src/sys/netinet

2019-02-24 Thread David Holland
On Sun, Feb 24, 2019 at 05:01:52PM +, Kamil Rytarowski wrote: > Modified Files: > src/sys/netinet: sctp_asconf.h > > Log Message: > Appease GCC7 in sctp_asconf.h > > Do not declare types inside function parameter list. > Add decklarations of types before these function

Re: CVS commit: src/sys/netinet

2019-02-24 Thread Kamil Rytarowski
On 24.02.2019 19:15, David Holland wrote: > On Sun, Feb 24, 2019 at 05:01:52PM +, Kamil Rytarowski wrote: > > Modified Files: > >src/sys/netinet: sctp_asconf.h > > > > Log Message: > > Appease GCC7 in sctp_asconf.h > > > > Do not declare types inside function parameter list. > >

Re: CVS commit: src/sys/ufs/ufs

2019-02-24 Thread Martin Husemann
On Sun, Feb 24, 2019 at 07:41:59PM +, m...@netbsd.org wrote: > something like the overflow is undefined behaviour, so it cannot > happen, so the branch checking that it happened is eliminated. Integer overflow is not undefined, but implemenation defined behaviour. Martin

Re: CVS commit: src/sys/netinet

2019-02-24 Thread Kamil Rytarowski
On 24.02.2019 20:39, Martin Husemann wrote: > On Sun, Feb 24, 2019 at 07:20:10PM +0100, Kamil Rytarowski wrote: >> On 24.02.2019 19:15, David Holland wrote: >>> On Sun, Feb 24, 2019 at 05:01:52PM +, Kamil Rytarowski wrote: >>> > Modified Files: >>> > src/sys/netinet: sctp_asconf.h >>> >

Re: CVS commit: src/sys/netinet

2019-02-24 Thread Martin Husemann
On Sun, Feb 24, 2019 at 09:36:55PM +0100, Kamil Rytarowski wrote: > My only specific change was NetBSD/i386 kernel=GENERIC with kUBSan and > KCOV enabled. This does not answer the question. What does enabling kUBSan/KCOV break to make this error show up in your compilation, but not in our default

Re: CVS commit: src/sys/netinet

2019-02-24 Thread Martin Husemann
On Sun, Feb 24, 2019 at 07:20:10PM +0100, Kamil Rytarowski wrote: > On 24.02.2019 19:15, David Holland wrote: > > On Sun, Feb 24, 2019 at 05:01:52PM +, Kamil Rytarowski wrote: > > > Modified Files: > > > src/sys/netinet: sctp_asconf.h > > > > > > Log Message: > > > Appease GCC7 in

Re: CVS commit: src/sys/ufs/ufs

2019-02-24 Thread Joerg Sonnenberger
On Sun, Feb 24, 2019 at 07:41:59PM +, m...@netbsd.org wrote: > something like the overflow is undefined behaviour, so it cannot > happen, so the branch checking that it happened is eliminated. *Signed* integer overflow is undefined behavior. *Unsigned* integer overflow is well defined. Joerg

Re: CVS commit: src/sys/netinet

2019-02-24 Thread Kamil Rytarowski
On 24.02.2019 21:38, Martin Husemann wrote: > On Sun, Feb 24, 2019 at 09:36:55PM +0100, Kamil Rytarowski wrote: >> My only specific change was NetBSD/i386 kernel=GENERIC with kUBSan and >> KCOV enabled. > > This does not answer the question. What does enabling kUBSan/KCOV break > to make this

Re: CVS commit: src/sys/netinet

2019-02-24 Thread Kamil Rytarowski
On 24.02.2019 21:43, Kamil Rytarowski wrote: > On 24.02.2019 21:38, Martin Husemann wrote: >> On Sun, Feb 24, 2019 at 09:36:55PM +0100, Kamil Rytarowski wrote: >>> My only specific change was NetBSD/i386 kernel=GENERIC with kUBSan and >>> KCOV enabled. >> >> This does not answer the question. What

Re: CVS commit: src/sys/ufs/ufs

2019-02-24 Thread maya
On Sun, Feb 24, 2019 at 07:06:40PM +, Michael van Elst wrote: > While here, also check for arithmetic overflow. > + /* how much to actually read */ > + rawbufmax = callerbytes + skipstart; > + if (rawbufmax < callerbytes) > + return EINVAL; hmm, I"m under the

Re: CVS commit: src/sys/netinet

2019-02-24 Thread Kamil Rytarowski
On 24.02.2019 23:55, Robert Swindells wrote: > > Kamil Rytarowski wrote: >> Module Name:src >> Committed By: kamil >> Date: Sun Feb 24 17:01:52 UTC 2019 >> >> Modified Files: >>src/sys/netinet: sctp_asconf.h >> >> Log Message: >> Appease GCC7 in sctp_asconf.h >> >> Do not

Re: CVS commit: src/sys/ufs/ufs

2019-02-24 Thread David Holland
On Mon, Feb 25, 2019 at 05:50:08AM +, David Holland wrote: > Furthermore, this: > > > + rawbuf -= dropend; > > is entirely wrong (it needs to be "rawbufmax") and without that bound > on rawbufmax the code is unsafe... I repaired this bit just now, so it's not an overt hazard

Re: CVS commit: src/sys/ufs/ufs

2019-02-24 Thread Michael van Elst
On Sun, Feb 24, 2019 at 10:13:40PM +0100, Tobias Nygren wrote: > On Sun, 24 Feb 2019 19:06:40 + > Michael van Elst wrote: > > > To generate a diff of this commit: > > cvs rdiff -u -r1.242 -r1.243 src/sys/ufs/ufs/ufs_vnops.c > > > + rawbuf -= dropend; > > I guess this should be

Re: CVS commit: src/sys/ufs/ufs

2019-02-24 Thread David Holland
On Mon, Feb 25, 2019 at 06:07:23AM +, David Holland wrote: > that one doesn't set dropend correctly for small buffers, outsmarted > myself while writing it. Better change (still against 1.242) that makes the logic much simpler. Will test this overnight... Index: ufs_vnops.c

re: CVS commit: src/sys/netinet

2019-02-24 Thread matthew green
> If you think that this is better and it works, please go for it. please, no. don't duplicate prototypes in a way that changes won't be detected. ie, if the real sctp code changes, today the compat caller will fail to build until updated. with this change, it will build and be entirely wrong.

Re: CVS commit: src/sys/netinet

2019-02-24 Thread Martin Husemann
On Sun, Feb 24, 2019 at 09:43:52PM +0100, Kamil Rytarowski wrote: > I consider that this is just GCC specific behavior to make some warnings > fatal depending on driver configuration. This is typical behavior of GCC > that we keep observing all over again. No, this is very different to optimizer

Re: CVS commit: src/sys/ufs/ufs

2019-02-24 Thread Tobias Nygren
On Sun, 24 Feb 2019 19:06:40 + Michael van Elst wrote: > To generate a diff of this commit: > cvs rdiff -u -r1.242 -r1.243 src/sys/ufs/ufs/ufs_vnops.c > + rawbuf -= dropend; I guess this should be rawbufmax, not rawbuf.

Re: CVS commit: src/sys/netinet

2019-02-24 Thread Robert Swindells
Kamil Rytarowski wrote: >Module Name:src >Committed By: kamil >Date: Sun Feb 24 17:01:52 UTC 2019 > >Modified Files: >src/sys/netinet: sctp_asconf.h > >Log Message: >Appease GCC7 in sctp_asconf.h > >Do not declare types inside function parameter list. >Add decklarations

Re: CVS commit: src/sys/ufs/ufs

2019-02-24 Thread David Holland
On Sun, Feb 24, 2019 at 07:51:24PM -0500, Christos Zoulas wrote: > Module Name: src > Committed By:christos > Date:Mon Feb 25 00:51:24 UTC 2019 > > Modified Files: > src/sys/ufs/ufs: ufs_vnops.c > > Log Message: > drop unused dropping this logic is wrong...