Re: [PATCH] allow notAfter after 2038 with 32-bit time_t

2017-07-05 Thread Bob Beck
On Thu, May 18, 2017 at 7:31 AM, Kyle J. McKay wrote: > RFC 5280 section 4.1.2.5 states: > > To indicate that a certificate has no well-defined expiration date, > the notAfter SHOULD be assigned the GeneralizedTime value of > 1231235959Z. > > True enough. >

Re: Standard conformance of strtol(3)

2017-07-05 Thread Theo de Raadt
> Olivier Antoine wrote: > > Hi all, > > > > Recently a bug has been identified in Tor: > > > > https://trac.torproject.org/projects/tor/ticket/22789 > > > > As comments were made, questions were raised about the use of strtol(3), > > the different interpretations of the standard and their

ifstated remove unused logging code

2017-07-05 Thread Rob Pierce
This code has been here since version 1.1/1.2, but never used. Rob Index: ifstated.c === RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v retrieving revision 1.50 diff -u -p -r1.50 ifstated.c --- ifstated.c 4 Jul 2017 21:09:52

Re: Standard conformance of strtol(3)

2017-07-05 Thread Ted Unangst
Olivier Antoine wrote: > Hi all, > > Recently a bug has been identified in Tor: > > https://trac.torproject.org/projects/tor/ticket/22789 > > As comments were made, questions were raised about the use of strtol(3), > the different interpretations of the standard and their implementation. > >

Re: Standard conformance of strtol(3)

2017-07-05 Thread Todd C. Miller
C99 states that the 0x or 0X prefix is optional so we should only consume the prefix if the following character is a valid hex char. This is equivalent to the fix in FreeBSD but I used isxdigit(3). - todd Index: lib/libc/stdlib/strtoimax.c

lpt.4: make configuration lines match GENERIC files

2017-07-05 Thread Frederic Cambus
Hi tech@, Make configuration lines match GENERIC files. This adds amd64 and splits up alpha and i386. Comments? OK? Index: share/man/man4/lpt.4 === RCS file: /cvs/src/share/man/man4/lpt.4,v retrieving revision 1.7 diff -u -p -r1.7

Re: patch: make lex rules parallel-safe

2017-07-05 Thread Marc Espie
On Wed, Jul 05, 2017 at 01:25:59PM -0700, Philip Guenther wrote: > On Wed, 5 Jul 2017, Marc Espie wrote: > > This is a very slight deviation from posix rules, but not in spirit. My > > interpretation is that posix rules describe the intent of the make rules > > (produce a file in such a way),

Standard conformance of strtol(3)

2017-07-05 Thread Olivier Antoine
Hi all, Recently a bug has been identified in Tor: https://trac.torproject.org/projects/tor/ticket/22789 As comments were made, questions were raised about the use of strtol(3), the different interpretations of the standard and their implementation. To summarize, the question revolves around

Re: [patch] mg: fix overflow on vteeol() (resend/bump)

2017-07-05 Thread Hiltjo Posthuma
On Sat, Jun 24, 2017 at 02:45:44PM +0200, Hiltjo Posthuma wrote: > On Sun, Jun 18, 2017 at 03:04:31PM +0200, Hiltjo Posthuma wrote: > > Hey, > > > > This is a resend/bump of a patch about a month ago, can it get applied? > > > > Original message below: > > > > > > mg crashes with certain

Re: patch: make lex rules parallel-safe

2017-07-05 Thread Philip Guenther
On Wed, 5 Jul 2017, Marc Espie wrote: > This is a very slight deviation from posix rules, but not in spirit. My > interpretation is that posix rules describe the intent of the make rules > (produce a file in such a way), but don't really care about intermediate > names. ... > .l.c: > -

Re: sed(1): missing NUL in pattern space

2017-07-05 Thread Otto Moerbeek
On Sat, Jul 01, 2017 at 01:20:19PM +, kshe wrote: > On Tue, 27 Jun 2017 09:29:10 +, Otto Moerbeek wrote: > > > > at last a followup, for the original problem. > > > > This diff incorporates your later comment. It does not cause the newly > > added regress test to fail, though. > > >

Re: armv7 small bootstrap improvement/simplification

2017-07-05 Thread Artturi Alm
On Wed, Jul 05, 2017 at 04:05:16PM +0300, Artturi Alm wrote: > On Wed, Jul 05, 2017 at 11:27:06AM +0200, Mark Kettenis wrote: > > > Date: Wed, 5 Jul 2017 09:34:59 +0300 > > > From: Artturi Alm > > > > > > On Wed, Jul 05, 2017 at 02:27:46AM +0300, Artturi Alm wrote: > > > >

Re: swab: Swap bytes directly, simplify

2017-07-05 Thread Klemens Nanni
On Wed, Jul 05, 2017 at 09:47:11AM -0600, Theo de Raadt wrote: > > So I'd say for cases like src == dst we don't have to guarantee that > > bytes are swapped. > > and you've audited all the callers to this function? > > > Agreed, I haven't checked for bad/dangerous usage in existing code for > >

Re: swab: Swap bytes directly, simplify

2017-07-05 Thread Ingo Schwarze
Hi Klemens, Klemens Nanni wrote on Wed, Jul 05, 2017 at 05:44:42PM +0200: > On Wed, Jul 05, 2017 at 05:27:18PM +0200, Ingo Schwarze wrote: >> No need to fix it because the patch is not likely to go anywhere, >> but once again you mangled the patch such that it won't even apply. > Hm, the diff

Re: dhcpd: don't reject DHCPINFORM from behind relay

2017-07-05 Thread Kenneth R Westerback
On Wed, Jul 05, 2017 at 04:37:39PM +0200, Reyk Floeter wrote: > Hi, > > landry@ sees many log messages 'DHCPINFORM from xx but ciaddr yy is > not consistent with actual address' in a setup where dhcpd runs behind > dhcrelay. > > The code in dhcpd's dhcpinform() seems wrong - it assumes that

Re: relayd - multiple instances

2017-07-05 Thread Reyk Floeter
Yes On Wed, Jul 05, 2017 at 06:17:21PM +0200, Maxim Bourmistrov wrote: > > Hello, > Are there plans for relayd to run multiple instances? > Eg. dropping socket to a configurable location. > > Regards >

relayd - multiple instances

2017-07-05 Thread Maxim Bourmistrov
Hello, Are there plans for relayd to run multiple instances? Eg. dropping socket to a configurable location. Regards

Re: swab: Swap bytes directly, simplify

2017-07-05 Thread Theo de Raadt
> So I'd say for cases like src == dst we don't have to guarantee that > bytes are swapped. and you've audited all the callers to this function? > Agreed, I haven't checked for bad/dangerous usage in existing code for > reasons explained above. No you haven't. Completely irresponsible. What a

Re: swab: Swap bytes directly, simplify

2017-07-05 Thread Klemens Nanni
On Wed, Jul 05, 2017 at 05:27:18PM +0200, Ingo Schwarze wrote: Hi Klemens, Klemens Nanni wrote on Wed, Jul 05, 2017 at 05:02:05PM +0200: No need for buffers t0, t1 here. Your patch changes behaviour in some cases where the buffers do overlap. For example, if src == dst, right now, the code

Re: swab: Swap bytes directly, simplify

2017-07-05 Thread Ingo Schwarze
Hi Klemens, Klemens Nanni wrote on Wed, Jul 05, 2017 at 05:02:05PM +0200: > No need for buffers t0, t1 here. Your patch changes behaviour in some cases where the buffers do overlap. For example, if src == dst, right now, the code swaps bytes. With your patch, i'm not sure it is even

Re: swab: Swap bytes directly, simplify

2017-07-05 Thread Theo de Raadt
I don't understand what you are fixing here. It looks like you have rewritten it entirely, without cause. Even the manual page chunk: that is a warning to unprepared people about an error they might make. What are you fixing?? > No need for buffers t0, t1 here. This way we only have to

swab: Swap bytes directly, simplify

2017-07-05 Thread Klemens Nanni
No need for buffers t0, t1 here. This way we only have to step/move the current position instead of the total bytes left as well as both source and destination position. Always swap an even number of bytes by clearing the length's last bit and never write past it. The , operator can be used

Re: relayd ipv6 ttl check_icmp / check_tcp

2017-07-05 Thread Kapetanakis Giannis
On 04/07/17 23:56, Sebastian Benoit wrote: > Florian Obser(flor...@openbsd.org) on 2017.07.04 19:27:15 +: >> On Fri, Jun 23, 2017 at 01:52:52PM +0300, Kapetanakis Giannis wrote: >>> Hi, >>> >>> Using relayd's redirect/forward on ipv6 addresses I discovered problems >>> relating to setting

dhcpd: don't reject DHCPINFORM from behind relay

2017-07-05 Thread Reyk Floeter
Hi, landry@ sees many log messages 'DHCPINFORM from xx but ciaddr yy is not consistent with actual address' in a setup where dhcpd runs behind dhcrelay. The code in dhcpd's dhcpinform() seems wrong - it assumes that ciaddr (the client IP) is identical to the packet source address and it doesn't

Re: armv7 small bootstrap improvement/simplification

2017-07-05 Thread Artturi Alm
On Wed, Jul 05, 2017 at 11:27:06AM +0200, Mark Kettenis wrote: > > Date: Wed, 5 Jul 2017 09:34:59 +0300 > > From: Artturi Alm > > > > On Wed, Jul 05, 2017 at 02:27:46AM +0300, Artturi Alm wrote: > > > Hi, > > > > > > instead of messing w/bs_tags, use the fact

Re: patch: make lex rules parallel-safe

2017-07-05 Thread Marc Espie
On Wed, Jul 05, 2017 at 06:49:30AM -0600, Todd C. Miller wrote: > I wonder if it would be better to use lex.${.PREFIX}.c instead of > ${.PREFIX}.lex.c. This would be more consistent with how lex's > -Pprefix flag behaves. > > It's not a big deal either way as the file is strictly temporary. > >

Re: patch: make lex rules parallel-safe

2017-07-05 Thread Todd C. Miller
I wonder if it would be better to use lex.${.PREFIX}.c instead of ${.PREFIX}.lex.c. This would be more consistent with how lex's -Pprefix flag behaves. It's not a big deal either way as the file is strictly temporary. - todd

Re: mpsafe malloc(9)

2017-07-05 Thread Mark Kettenis
> Date: Wed, 5 Jul 2017 09:44:19 +1000 > From: David Gwynne > > the following adds a mutex to malloc and free to protect their > internal state. this should be enough to make the api mpsafe, > assuming the way they interact with uvm is mpsafe. > > this only uses a single

Re: strmode.3: Remove return values section

2017-07-05 Thread Theo Buehler
On Wed, Jul 05, 2017 at 01:31:12PM +0200, Klemens Nanni wrote: > > strmode(3) is void and thus never returns anything. Committed, thanks. > Feedback/OK? I think you should wait until you have commit access before you ask for OKs. It's a bit confusing otherwise.

strmode.3: Remove return values section

2017-07-05 Thread Klemens Nanni
strmode(3) is void and thus never returns anything. Feedback/OK? Index: strmode.3 === RCS file: /cvs/src/lib/libc/string/strmode.3,v retrieving revision 1.16 diff -u -p -r1.16 strmode.3 --- strmode.3 5 Jun 2013 03:39:23 -

patch: make lex rules parallel-safe

2017-07-05 Thread Marc Espie
This is a very slight deviation from posix rules, but not in spirit. My interpretation is that posix rules describe the intent of the make rules (produce a file in such a way), but don't really care about intermediate names. FreeBSD already has something like this in tree (though they use lex

Re: elf.h

2017-07-05 Thread Martin Pieuchot
On 04/07/17(Tue) 22:12, Karel Gardas wrote: > > I think that moving towards is a good thing. However are you > > sure that provides all the definitions required by > > ? > > Not yet. At least a lot of machine related definitions are missing, but > they are not required if neither base nor

Reduce pool cache items when there is no contention

2017-07-05 Thread Visa Hankala
The current pool cache code increases the number of items that can be cached locally in response to lock contention. This patch adds a tweak that lowers the number when contention does not occur. The idea is to let resources be returned to the common pool when pressure on the cache has decreased.

Re: mpsafe malloc(9)

2017-07-05 Thread Martin Pieuchot
On 05/07/17(Wed) 09:44, David Gwynne wrote: > the following adds a mutex to malloc and free to protect their > internal state. this should be enough to make the api mpsafe, > assuming the way they interact with uvm is mpsafe. > > this only uses a single mutex around the entire malloc subsystem, >

telnet(1): remove unnecessary #ifdefs

2017-07-05 Thread Frederic Cambus
Hi tech@, Remove unnecessary #ifdefs in telnet. No binary change. Comments? OK? Index: usr.bin/telnet/externs.h === RCS file: /cvs/src/usr.bin/telnet/externs.h,v retrieving revision 1.30 diff -u -p -r1.30 externs.h ---

Re: armv7 small bootstrap improvement/simplification

2017-07-05 Thread Mark Kettenis
> Date: Wed, 5 Jul 2017 09:34:59 +0300 > From: Artturi Alm > > On Wed, Jul 05, 2017 at 02:27:46AM +0300, Artturi Alm wrote: > > Hi, > > > > instead of messing w/bs_tags, use the fact pmap_kernel()->pm_refs is going > > to be 0 until pmap_bootstrap() has ran. tmp_bs_tag

Re: Missed ifconfig [[-]txpower dBm] option for 802.11

2017-07-05 Thread Stefan Sperling
On Tue, Jul 04, 2017 at 01:32:41PM -0400, Ted Unangst wrote: > Denis wrote: > > Looking for ifconfig '[[-]txpower dBm]' option which was present in > > OpenBSD 5.4 amd64. Try to find 'txpower' on 6.0 amd64 but seems it > > missed out. > > > > Actively using it to match power for 802.11 card and

Re: ping: Style fixes/cleanups

2017-07-05 Thread Florian Obser
On Tue, Jul 04, 2017 at 09:43:59PM +0200, Klemens Nanni wrote: > On Tue, Jul 04, 2017 at 04:00:43PM +, Florian Obser wrote: > >yeah, this is arse backwards, I'm willing to commit the oposite though, > >i.e. get rid of the void casts for printf > > Casts removed, cosecutive calls merged where

Re: armv7 small bootstrap improvement/simplification

2017-07-05 Thread Artturi Alm
On Wed, Jul 05, 2017 at 02:27:46AM +0300, Artturi Alm wrote: > Hi, > > instead of messing w/bs_tags, use the fact pmap_kernel()->pm_refs is going > to be 0 until pmap_bootstrap() has ran. tmp_bs_tag was unused, and > bootstrap_bs_map doesn't need/use the void *t-arg when being ran indirectly >