Re: carp: send only IPv4 carp packets on dual stack interface

2020-05-22 Thread David Gwynne
> On 23 May 2020, at 8:44 am, Christopher Zimmermann wrote: > > On Sun, Jan 19, 2020 at 01:32:17PM +, Stuart Henderson wrote: >> On 2020/01/19 00:11, Sebastian Benoit wrote: >>> chr...@openbsd.org(chr...@openbsd.org) on 2020.01.18 06:18:21 +0100: >>> > On Wed, Jan 15, 2020 at 12:47:28PM

Re: ADMtec aue(4) interface supporting VLAN_MTU ?

2020-05-22 Thread David Gwynne
> On 23 May 2020, at 7:54 am, Christopher Zimmermann wrote: > > On Tue, Apr 21, 2020 at 04:12:16PM -0700, Chris Cappuccio wrote: >> Tom Smyth [tom.sm...@wirelessconnect.eu] wrote: >>> Hi Chrisz, >>> >>> 4 bytes for the vlan header .. have you tried increasing the parent >>> intetface mtu by

Re: pledge(2) sndioctl(1)

2020-05-22 Thread Ricardo Mestre
Hello, I tried to open the raw device but now it seems I was to sleepy to figure out that I couldn't access it due to sndiod(8) having the device opened earlier and therefore coundn't reach that code path. Here's the audio promise added, but maybe it raises the question again if these utilities

Re: amdgpio(4): acpi_attach_args resources

2020-05-22 Thread Mark Kettenis
> From: James Hastings > Date: Fri, 22 May 2020 00:55:16 -0400 (EDT) > > stop parsing _CRS and use resources from struct acpi_attach_args. Thanks, but I already have diffs for all the ACPI gpio drivers in my tree, waiting for an ok from those slackers who call themselves OpenBSD developers. >

Re: pledge(2) sndioctl(1)

2020-05-22 Thread Sebastien Marie
On Fri, May 22, 2020 at 06:57:00AM +0200, Sebastien Marie wrote: > On Thu, May 21, 2020 at 11:07:39PM +0100, Ricardo Mestre wrote: > > Hi, > > > > After the handle sioctl_hdl `hdl' is opened (which in itself requires rw fs > > access and opening an unix socket) then all operations happen over

Re: vmm timer for linux guests

2020-05-22 Thread Pratik Vyas
* Renato Aguiar [2020-05-21 12:55:45 -0700]: Hi Sivaram, I'm the author of the e-mail thread that you mentioned. After feedback I got from OpenBSD community, I created a patch for Linux to enable kvm-clock when booting on VMM. It managed to keep clock in sync, but I experienced random

Re: vmm timer for linux guests

2020-05-22 Thread Dave Voutila
On Fri, May 22, 2020 at 6:15 AM Pratik Vyas wrote: > Hi Sivaram and Renato, > > I have been looking at this issue this week with Dave. (funnily Dave > and I independently also decided to write a linux patch to attach > pvclock and debugging these crashes). My hacky "vmm-clock" implementation is

Re: locale thread support

2020-05-22 Thread Joerg Sonnenberger
On Fri, May 22, 2020 at 01:50:44PM +0200, Marc Espie wrote: > uselocale is fine, but it is not on windows, so highly portable code tends to > prefer strtod_l... The problem with uselocale is two fold and why I explicitly decided to not implement it in NetBSD: (1) It can come at a significant

Re: locale thread support

2020-05-22 Thread Marc Espie
On Fri, May 22, 2020 at 02:31:38PM +0200, Mark Kettenis wrote: > > Date: Fri, 22 May 2020 13:50:44 +0200 > > From: Marc Espie > > > > I've had to neuter some setlocale() in mlt, since our code is > > definitely NOT thread-safe. No biggie, since we do not have support > > for LC_NUMERIC right

locale thread support

2020-05-22 Thread Marc Espie
I've had to neuter some setlocale() in mlt, since our code is definitely NOT thread-safe. No biggie, since we do not have support for LC_NUMERIC right now. I think we might want the thread-specific functions, namely stuff like strtod_l, or sprintf_l and friends. Even if they do not do anything

Re: vmm timer for linux guests

2020-05-22 Thread Sivaram Gowkanapalli
Hello Dave, Thanks for sharing this. I have been using your hacked up version of virtio_vmmci to keep the timer in sync all this time. btw, would you recommend a linux distro other than alpine for vmm? I need to run an Oracle Java app which needs glibc, hence, I cannot use alpine. I tried

Re: vmm timer for linux guests

2020-05-22 Thread Sivaram Gowkanapalli
Hello Pratik, > For ref, this is my linux side patch to attach kvm-clock http://ix.io/2lzK Thanks, will try the below patches.

Re: vmm timer for linux guests

2020-05-22 Thread Sivaram Gowkanapalli
Hello Renato, Could you please share the linux patches? We can try with them too. Thanks From: Renato Aguiar [ren...@renatoaguiar.net] Sent: Thursday, May 21, 2020 3:55 PM To: tech@openbsd.org Cc: Sivaram Gowkanapalli Subject: Re: vmm timer for linux

Re: Correcty reloading unresolved host in syslogd @Conf lines

2020-05-22 Thread Alexander Bluhm
On Wed, May 20, 2020 at 09:29:54PM -0400, sven falempin wrote: > ? Will it goes into base this time ? I need an OK from a developer. Anyone? bluhm > On Mon, May 18, 2020 at 5:31 AM Alexander Bluhm > > Index: usr.sbin/syslogd/syslogd.c > >

Re: diff: uvm: fix unitialized var and simplify code in km_alloc()

2020-05-22 Thread Alexander Bluhm
On Wed, May 20, 2020 at 11:44:57AM +0200, Jan Klemkow wrote: > The function km_alloc() returns the uninitialized local variable sva if > pgl is empty. It seems to be not possible in the current condition of > the code, but I'm not sure if this is guaranteed. Thus, I would prefer > to initialize

Re: locale thread support

2020-05-22 Thread Mark Kettenis
> Date: Fri, 22 May 2020 13:50:44 +0200 > From: Marc Espie > > I've had to neuter some setlocale() in mlt, since our code is > definitely NOT thread-safe. No biggie, since we do not have support > for LC_NUMERIC right now. Hmm, setlocale() is explicitly mentionded as not thread-safe in POSIX.

Re: locale thread support

2020-05-22 Thread Todd C . Miller
On Fri, 22 May 2020 14:57:11 +0200, Marc Espie wrote: > From a security standpoint, is there a "cheap" way to make setlocale abort() > instead of trying to do a double free on when running in a race condition ? We could use _THREAD_PRIVATE_MUTEX as we do in other parts of libc. - todd

Re: Correcty reloading unresolved host in syslogd @Conf lines

2020-05-22 Thread Todd C . Miller
On Fri, 22 May 2020 12:08:28 +0200, Alexander Bluhm wrote: > On Wed, May 20, 2020 at 09:29:54PM -0400, sven falempin wrote: > > ? Will it goes into base this time ? > > I need an OK from a developer. Anyone? I'm a little confused by the protocol handling in cfline. if (strcmp(proto,

Re: locale thread support

2020-05-22 Thread Marc Espie
On Fri, May 22, 2020 at 04:02:31PM +0200, Mark Kettenis wrote: > > From: "Todd C. Miller" > > Date: Fri, 22 May 2020 07:23:55 -0600 > > > > On Fri, 22 May 2020 14:57:11 +0200, Marc Espie wrote: > > > > > From a security standpoint, is there a "cheap" way to make setlocale > > > abort() > > >

Re: vmm timer for linux guests

2020-05-22 Thread Renato Aguiar
Hi Sivaram and David, Here is my patch for Linux 4.19: https://gitlab.com/renatoaguiar/linux/-/commit/325afccf1e2d156be745f811411327e22bbd4c20 I also tried same patch with Linux 5.4 , but for some

Re: fix pppx(4) with net/ifq.c rev 1.38

2020-05-22 Thread Vitaliy Makkoveev
On Fri, May 22, 2020 at 07:57:13AM +1000, David Gwynne wrote: > On Wed, May 20, 2020 at 05:42:35PM +0300, Vitaliy Makkoveev wrote: > > I got splassert with pppx(4) and net/ifq.c rev 1.38 raised by > > NET_ASSERT_LOCKED() in netinet/ip_output.c:113 and underlaying routines. > > > > net/ifq.c rev

Re: locale thread support

2020-05-22 Thread Mark Kettenis
> From: "Todd C. Miller" > Date: Fri, 22 May 2020 07:23:55 -0600 > > On Fri, 22 May 2020 14:57:11 +0200, Marc Espie wrote: > > > From a security standpoint, is there a "cheap" way to make setlocale abort() > > instead of trying to do a double free on when running in a race condition ? > > We

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Theo de Raadt
Klemens Nanni wrote: > On Fri, May 22, 2020 at 05:57:37PM -0600, Theo de Raadt wrote: > > There is an internal VCPU #define, but the keyword is vcpu, and there > > appears to be nothing coming from the system which is an uppercase VCPU > > > > We don't have pfctl spitting out messages like:

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Theo de Raadt
Klemens Nanni wrote: > On Fri, May 22, 2020 at 05:57:37PM -0600, Theo de Raadt wrote: > > There is an internal VCPU #define, but the keyword is vcpu, and there > > appears to be nothing coming from the system which is an uppercase VCPU > > > > We don't have pfctl spitting out messages like:

Re: locale thread support

2020-05-22 Thread Marc Espie
On Fri, May 22, 2020 at 02:31:38PM +0200, Mark Kettenis wrote: > > Date: Fri, 22 May 2020 13:50:44 +0200 > > From: Marc Espie > > > > I've had to neuter some setlocale() in mlt, since our code is > > definitely NOT thread-safe. No biggie, since we do not have support > > for LC_NUMERIC right

Re: userland clock_gettime proof of concept

2020-05-22 Thread Paul Irofti
Hi, Here is another iteration of the diff. It addresses some of the issues and opens a discussion for ohers. Fixed. - find_timekeep() called 3 times, call only once (deraadt@) -> this was leftover code, removed from everywhere except the wrapper - atomic read time (deraadt@)

Re: Correcty reloading unresolved host in syslogd @Conf lines

2020-05-22 Thread Alexander Bluhm
On Fri, May 22, 2020 at 07:38:30AM -0600, Todd C. Miller wrote: > I'm a little confused by the protocol handling in cfline. > > if (strcmp(proto, "udp") == 0) { > if (fd_udp == -1) > proto = "udp6"; > if (fd_udp6 == -1) >

Re: Correcty reloading unresolved host in syslogd @Conf lines

2020-05-22 Thread Todd C . Miller
On Fri, 22 May 2020 21:29:43 +0200, Alexander Bluhm wrote: > On Fri, May 22, 2020 at 07:38:30AM -0600, Todd C. Miller wrote: > > I'm a little confused by the protocol handling in cfline. > > > > if (strcmp(proto, "udp") == 0) { > > if (fd_udp == -1) > > proto =

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Theo de Raadt
Klemens Nanni wrote: > On Fri, May 22, 2020 at 04:39:03PM -0600, Theo de Raadt wrote: > > Why is VCPU upper case? > Probably because it is an abbreviation? Wherever I look, "CPU" is upper > case. ldom.conf(5) says "virutal CPUs", which reads as fine as "VCPUs" > to me - "vcpus" would be off. >

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Klemens Nanni
On Fri, May 22, 2020 at 05:05:14PM -0600, Theo de Raadt wrote: > Then why is the grammer keyword lowercase? Because it's easier to type and practically all grammar keywords in all of base's *.conf files are lowercase. Send a diff if you want to change stuff.

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Theo de Raadt
Klemens Nanni wrote: > On Fri, May 22, 2020 at 05:05:14PM -0600, Theo de Raadt wrote: > > Then why is the grammer keyword lowercase? > Because it's easier to type and practically all grammar keywords in all > of base's *.conf files are lowercase. Your diff added a new upper case. > Send a diff

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Theo de Raadt
There is an internal VCPU #define, but the keyword is vcpu, and there appears to be nothing coming from the system which is an uppercase VCPU We don't have pfctl spitting out messages like: invalid RDOMAIN, because rdomain is the keyword, there is no reason to arbitrarily change things from

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Klemens Nanni
On Fri, May 22, 2020 at 05:50:32PM -0600, Theo de Raadt wrote: > Your diff added a new upper case. No, it did not; neither of the two diffs changed any error message, wording or case. Both reordered already existing lines only.

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Klemens Nanni
On Fri, May 22, 2020 at 05:57:37PM -0600, Theo de Raadt wrote: > There is an internal VCPU #define, but the keyword is vcpu, and there > appears to be nothing coming from the system which is an uppercase VCPU > > We don't have pfctl spitting out messages like: invalid RDOMAIN, because > rdomain

ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Klemens Nanni
kmos noted that `-n' wouldn't bark at overallocation. Hoisting PRI reading and moving the `-n' check after constraint checking makes it bail on invalid configs just as expected: $ cat ldom.conf domain guest { vdisk "/dev/null" vcpu 128

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Kurt Mosiejczuk
On Fri, May 22, 2020 at 11:05:21PM +0200, Klemens Nanni wrote: > kmos noted that `-n' wouldn't bark at overallocation. > Hoisting PRI reading and moving the `-n' check after constraint checking > makes it bail on invalid configs just as expected: > $ cat ldom.conf > domain guest { >

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Theo de Raadt
Why upper case? Klemens Nanni wrote: > > > kmos noted that `-n' wouldn't bark at overallocation. > > Hoisting PRI reading and moving the `-n' check after constraint checking > makes it bail on invalid configs just as expected: > > $ cat ldom.conf > domain guest { >

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Mark Kettenis
> Date: Fri, 22 May 2020 23:05:21 +0200 > From: Klemens Nanni > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > > kmos noted that `-n' wouldn't bark at overallocation. > > Hoisting PRI reading and moving the `-n' check after constraint checking > makes it bail on

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Klemens Nanni
On Fri, May 22, 2020 at 11:35:34PM +0200, Mark Kettenis wrote: > That can't be right. We get the number of available CPUs for example > from the PRI so pri_init() has to be called before we check. Yup, I fooled myself with poor testing - the commit is already reverted with an explanation. Didn't

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Theo de Raadt
Why is VCPU upper case? I don't see any other place it is upper case. Klemens Nanni wrote: > On Fri, May 22, 2020 at 11:35:34PM +0200, Mark Kettenis wrote: > > That can't be right. We get the number of available CPUs for example > > from the PRI so pri_init() has to be called before we

Re: carp: send only IPv4 carp packets on dual stack interface

2020-05-22 Thread Christopher Zimmermann
On Sun, Jan 19, 2020 at 01:32:17PM +, Stuart Henderson wrote: On 2020/01/19 00:11, Sebastian Benoit wrote: chr...@openbsd.org(chr...@openbsd.org) on 2020.01.18 06:18:21 +0100: > On Wed, Jan 15, 2020 at 12:47:28PM +0100, Sebastian Benoit wrote: > >Christopher Zimmermann(chr...@openbsd.org)

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Kurt Mosiejczuk
On Fri, May 22, 2020 at 04:39:03PM -0600, Theo de Raadt wrote: > Why is VCPU upper case? > I don't see any other place it is upper case. I don't know. It was that way before the change. It's in the file twice as uppercase, both times when using errx(3). It's not used as lowercase when using

Remove useless line from daemon class in login.conf

2020-05-22 Thread Daniel Jakots
Hi, We used to have different numbers of blowfish rounds between the default and daemon classes in login.conf. On Jun 26, 2016, tedu committed "upgrade selected login.conf to use auto rounds for bcrypt" for amd64, sparc64, i386, and maccpc [1]. Since the class daemon inherits from the default

Re: ADMtec aue(4) interface supporting VLAN_MTU ?

2020-05-22 Thread Christopher Zimmermann
On Tue, Apr 21, 2020 at 04:12:16PM -0700, Chris Cappuccio wrote: Tom Smyth [tom.sm...@wirelessconnect.eu] wrote: Hi Chrisz, 4 bytes for the vlan header .. have you tried increasing the parent intetface mtu by 4bytes IFCAP_VLAN_MTU is a direct bypass for this. "hardmtu" on the parent

Re: Remove useless line from daemon class in login.conf

2020-05-22 Thread Stuart Henderson
On 2020/05/22 17:06, Daniel Jakots wrote: > Hi, > > We used to have different numbers of blowfish rounds between the > default and daemon classes in login.conf. On Jun 26, 2016, tedu > committed "upgrade selected login.conf to use auto rounds for bcrypt" > for amd64, sparc64, i386, and maccpc

Re: Remove useless line from daemon class in login.conf

2020-05-22 Thread Theo de Raadt
Stuart Henderson wrote: > On 2020/05/22 17:06, Daniel Jakots wrote: > > Hi, > > > > We used to have different numbers of blowfish rounds between the > > default and daemon classes in login.conf. On Jun 26, 2016, tedu > > committed "upgrade selected login.conf to use auto rounds for bcrypt" > >

Re: ldomctl: Make init-sytem -n check vcpu and memory constraints

2020-05-22 Thread Klemens Nanni
On Fri, May 22, 2020 at 04:39:03PM -0600, Theo de Raadt wrote: > Why is VCPU upper case? Probably because it is an abbreviation? Wherever I look, "CPU" is upper case. ldom.conf(5) says "virutal CPUs", which reads as fine as "VCPUs" to me - "vcpus" would be off. > I don't see any other place it