Re: [patch] kern/exec_script: avoid invalid free() in a case of error

2015-12-29 Thread Michael McConville
Michael McConville wrote: > Michael McConville wrote: > > > On Sun, Dec 13, 2015 at 9:45 PM, Maxim Pugachev > > > wrote: > > > > Hi, > > > > > > > > In exec_script_makecmds function, when EXEC_HASFD flag was set, but > > > > copystr/copyinstr returns an error, we need to set *tmpsap to NULL to >

Re: bug in fputwc(3) error reporting

2015-12-29 Thread Ted Unangst
Philip Guenther wrote: > On Tue, Dec 29, 2015 at 2:34 PM, Todd C. Miller > wrote: > ... > > Since POSIX defers to ISO C we should be following the ISO C standard > > with respect to behavior when an encoding error occurs. As such, > > I've changed my mind and now believe we should not be setting

Re: ksh another home/end pair

2015-12-29 Thread Ted Unangst
Mark Kettenis wrote: > > From: "Ted Unangst" > > Date: Tue, 29 Dec 2015 12:11:25 -0500 > > > > In tmux, home and end send different bytes. I don't know why, but I want > > things to just work. We already have two different keys here, so what's one > > more? (how many can there be...?) > > Isn't

malloc should always abort

2015-12-29 Thread Ted Unangst
Long ago, malloc internally had two kinds of failures, warnings and errors. The 'A' option elevated warningst to errors, and has been the default for some time. But then warnings were effectively eliminated in favor of everything being an error, but then the 'a' flag turned errors into warnings! 1

Re: [patch] macros in diff

2015-12-29 Thread Theo Buehler
On Wed, Dec 30, 2015 at 10:02:48AM +0800, Michael W. Bombardieri wrote: > Hi tech, > > In diff & friends, use macros MIN() and MAX() instead of > defining these locally. Worth doing? No, you're essentially reverting part of a large series of diffs that did the exact opposite in order to minimize

[patch] macros in diff

2015-12-29 Thread Michael W. Bombardieri
Hi tech, In diff & friends, use macros MIN() and MAX() instead of defining these locally. Worth doing? - Michael Index: diff/diffreg.c === RCS file: /cvs/src/usr.bin/diff/diffreg.c,v retrieving revision 1.90 diff -u -p -r1.90 diff

Re: bug in fputwc(3) error reporting

2015-12-29 Thread Philip Guenther
On Tue, Dec 29, 2015 at 2:34 PM, Todd C. Miller wrote: ... > Since POSIX defers to ISO C we should be following the ISO C standard > with respect to behavior when an encoding error occurs. As such, > I've changed my mind and now believe we should not be setting the > error flag in those cases. T

Re: ksh another home/end pair

2015-12-29 Thread Todd Mortimer
On Tue, Dec 29, 2015 at 10:02:48PM +0100, Mark Kettenis wrote: > > From: "Ted Unangst" > > Date: Tue, 29 Dec 2015 12:11:25 -0500 > > > > In tmux, home and end send different bytes. I don't know why, but I want > > things to just work. We already have two different keys here, so what's one > > mor

Re: bug in fputwc(3) error reporting

2015-12-29 Thread Todd C. Miller
On Sun, 27 Dec 2015 00:42:52 +0100, =?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges- Anglas?= wrote: > The way I read it, [CX] here only affects the last part of the sentence, > > "and errno shall be set to indicate the error." > > (because the C standard doesn't require errno to be set in all erro

Re: Another mpsafe ix(4) diff

2015-12-29 Thread Hrvoje Popovski
On 29.12.2015. 17:49, Mark Kettenis wrote: >> Date: Tue, 22 Dec 2015 23:45:49 +0100 >> > >> > On 22.12.2015. 22:08, Mark Kettenis wrote: >>> > > Anybody willing to give this a spin? I don't have access to hardware >>> > > currently... >>> > > >>> > > Thanks, >>> > > >>> > > Mark >> > >> > Hi,

Re: ksh another home/end pair

2015-12-29 Thread Mark Kettenis
> From: "Ted Unangst" > Date: Tue, 29 Dec 2015 12:11:25 -0500 > > In tmux, home and end send different bytes. I don't know why, but I want > things to just work. We already have two different keys here, so what's one > more? (how many can there be...?) Isn't that somehowa tmux bug? I mean, isn'

Potential null pointer dereference in malloc.c if 'A' is cleared

2015-12-29 Thread Michal Mazurek
If the "abort" flag is cleared (malloc_options = "a") wrterror() will not abort. This diff contains a fix for a recently added validate_junk() function, it ensures that 'r' is never used if it is NULL. Index: malloc.c === RCS file: /c

Re: ksh rename global e

2015-12-29 Thread Theo Buehler
On Tue, Dec 29, 2015 at 07:59:06PM +, Nicholas Marriott wrote: > yes please, ok nicm > also ok with me. The vi.c change would be fine with me since it fixes another shadowing issue, but please don't commit the emacs.c change. ok tb@

Re: ksh rename global e

2015-12-29 Thread Nicholas Marriott
yes please, ok nicm On Tue, Dec 29, 2015 at 12:15:25PM -0500, Ted Unangst wrote: > I'm slowly trimming down some of the -Wshadow warnings in bin and one big > offender is ksh. Namely, it has a local variable e that shadows a global e. > > -struct env *e; > +struct env *genv; > > Normal

Re: Fix netstat(1) -P

2015-12-29 Thread Alexander Bluhm
On Tue, Dec 29, 2015 at 11:52:34AM +0100, Martin Pieuchot wrote: > The "-P" option does not need to read routing table symbols, so there's > no reason to bail if we cannot find them. > > Index: main.c > === > RCS file: /cvs/src/usr.bi

Re: Fix netstat(1) -P

2015-12-29 Thread Sebastian Benoit
ok, see nit below Martin Pieuchot(m...@openbsd.org) on 2015.12.29 11:52:34 +0100: > The "-P" option does not need to read routing table symbols, so there's > no reason to bail if we cannot find them. > > Index: main.c > === > RCS fil

Re: ferror in ntpd (Re: bugs in printf(3))

2015-12-29 Thread Sebastian Benoit
as jca@ says, the clearerr() should be out of the loop, so ok benno@ too. J??r??mie Courr??ges-Anglas(j...@wxcvbn.org) on 2015.12.29 19:18:55 +0100: > "Todd C. Miller" writes: > > > On Tue, 29 Dec 2015 13:25:16 +0100, > > =?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges- > > Anglas?= wrote: > > > >>

Re: ferror in ntpd (Re: bugs in printf(3))

2015-12-29 Thread Jérémie Courrèges-Anglas
"Todd C. Miller" writes: > On Tue, 29 Dec 2015 13:25:16 +0100, > =?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges- > Anglas?= wrote: > >> I think it makes sense to try to recover, so calling clearerr() is >> needed. But as said by millert you can't rely on fprintf to set the >> error indicator; the w

Re: strncpy->strlcpy question

2015-12-29 Thread Ted Unangst
Philip Guenther wrote: > On Fri, Dec 25, 2015 at 8:21 PM, Ricardo Mestre > wrote: > > I made an inspection on userland tree and there quite a few applications > > still > > using strncpy(3) instead of strlcpy(3). Some of them may never need that > > safety > > since the boundaries are always fi

Re: ksh rename global e

2015-12-29 Thread Todd C. Miller
On Tue, 29 Dec 2015 12:15:25 -0500, "Ted Unangst" wrote: > I'm slowly trimming down some of the -Wshadow warnings in bin and one big > offender is ksh. Namely, it has a local variable e that shadows a global e. > > -struct env *e; > +struct env *genv; > > Normally I rename the local, but

Re: ferror in ntpd (Re: bugs in printf(3))

2015-12-29 Thread Todd C. Miller
On Tue, 29 Dec 2015 13:25:16 +0100, =?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges- Anglas?= wrote: > I think it makes sense to try to recover, so calling clearerr() is > needed. But as said by millert you can't rely on fprintf to set the > error indicator; the write might not be committed to disk, a

Re: ksh another home/end pair

2015-12-29 Thread Brandon Mercer
On Tue, Dec 29, 2015 at 12:16 PM Ted Unangst wrote: > In tmux, home and end send different bytes. I don't know why, but I want > things to just work. We already have two different keys here, so what's one > more? (how many can there be...?) > > > Index: emacs.c > =

ksh rename global e

2015-12-29 Thread Ted Unangst
I'm slowly trimming down some of the -Wshadow warnings in bin and one big offender is ksh. Namely, it has a local variable e that shadows a global e. -struct env *e; +struct env *genv; Normally I rename the local, but in this case I think the global deserves a better name. Note that this

ksh another home/end pair

2015-12-29 Thread Ted Unangst
In tmux, home and end send different bytes. I don't know why, but I want things to just work. We already have two different keys here, so what's one more? (how many can there be...?) Index: emacs.c === RCS file: /cvs/src/bin/ksh/emac

Re: Another mpsafe ix(4) diff

2015-12-29 Thread Mark Kettenis
> From: Hrvoje Popovski > Date: Tue, 22 Dec 2015 23:45:49 +0100 > > On 22.12.2015. 22:08, Mark Kettenis wrote: > > Anybody willing to give this a spin? I don't have access to hardware > > currently... > > > > Thanks, > > > > Mark > > Hi, > > i'm sending 1.1Mpps and this patch almost immediat

Re: ARP input path without KERNEL_LOCK

2015-12-29 Thread Gleydson Soares
On Tue, Dec 29, 2015 at 7:23 AM, Martin Pieuchot wrote: > I got one positive test report from Hrvoje Popovski and one from mxb, > anybody else tried this diff? seems fine here, no regressions so far...

Re: ARP input path without KERNEL_LOCK

2015-12-29 Thread mxb
Even with updated diff, I see no breakage. //mxb > On 22 dec. 2015, at 13:48, Martin Pieuchot wrote: > > On 04/12/15(Fri) 11:54, Martin Pieuchot wrote: >> Now that in_arpinput() only uses the routing table, if_get()/if_put() >> and carp_iamatch being already mpsafe we can kill the ARP input qu

Re: SSL version 3 is still mentioned in man pages

2015-12-29 Thread Stuart Henderson
On 2015/12/29 12:06, Jiri Navratil wrote: > Hello, > > I read "Removed SSLv3 support from openssl(1)" on > http://www.openbsd.org/58.html > > but I see it still mentioned on openssl(1), ssl(3) and ssl(8). I assume, > that at least openssl(1) shall be adjusted. Yes all three of those need fixing

Re: ferror in ntpd (Re: bugs in printf(3))

2015-12-29 Thread Jérémie Courrèges-Anglas
Sebastian Benoit writes: > Todd C. Miller(todd.mil...@courtesan.com) on 2015.12.28 10:46:08 -0700: >> On Fri, 25 Dec 2015 00:30:29 +0100, Ingo Schwarze wrote: >> >> > Besides, i don't see the point in messing with FILE flags at all >> > in case of encoding errors. As opposed to fgetwc(3) and fp

Re: ARP input path without KERNEL_LOCK

2015-12-29 Thread Jérémie Courrèges-Anglas
Martin Pieuchot writes: > On 22/12/15(Tue) 13:48, Martin Pieuchot wrote: >> On 04/12/15(Fri) 11:54, Martin Pieuchot wrote: >> > Now that in_arpinput() only uses the routing table, if_get()/if_put() >> > and carp_iamatch being already mpsafe we can kill the ARP input queue. >> > >> > This moves t

SSL version 3 is still mentioned in man pages

2015-12-29 Thread Jiri Navratil
Hello, I read "Removed SSLv3 support from openssl(1)" on http://www.openbsd.org/58.html but I see it still mentioned on openssl(1), ssl(3) and ssl(8). I assume, that at least openssl(1) shall be adjusted. Could you kindly explain, what is the status of SSLv3 in OpenBSD? Thank you a lot. Best r

Fix netstat(1) -P

2015-12-29 Thread Martin Pieuchot
The "-P" option does not need to read routing table symbols, so there's no reason to bail if we cannot find them. Index: main.c === RCS file: /cvs/src/usr.bin/netstat/main.c,v retrieving revision 1.108 diff -u -p -r1.108 main.c --- ma

Re: ARP input path without KERNEL_LOCK

2015-12-29 Thread Martin Pieuchot
On 22/12/15(Tue) 13:48, Martin Pieuchot wrote: > On 04/12/15(Fri) 11:54, Martin Pieuchot wrote: > > Now that in_arpinput() only uses the routing table, if_get()/if_put() > > and carp_iamatch being already mpsafe we can kill the ARP input queue. > > > > This moves the ARP input path processing from

Re: mpsafe tx for bge(4)

2015-12-29 Thread Mark Kettenis
> Date: Tue, 29 Dec 2015 07:59:12 +1000 > From: David Gwynne > > this tweaks the bge tx code and marks it mpsafe. > > ok? ok kettenis@ > Index: if_bge.c > === > RCS file: /cvs/src/sys/dev/pci/if_bge.c,v > retrieving revision 1.380

Re: mpsafe tx for re(4)

2015-12-29 Thread Dimitris Papastamos
On Mon, Dec 28, 2015 at 09:13:34PM +1000, David Gwynne wrote: > this builds on jmatthew@'s last commit and adds mpsafe tx. > > ive beat on it pretty hard, but more eyes/tests are appreciated. > > ok? Been running with this on my router since yesterday without issues. I will continue to run with