waitid(2)

2021-12-07 Thread Rafael Sadowski
Our devel/boost uses waitid(2) but OpenBSD does not implement it yet. In file included from /usr/local/include/boost/process.hpp:25: In file included from /usr/local/include/boost/process/group.hpp:32: /usr/local/include/boost/process/detail/posix/wait_group.hpp:38:17: error: no member named 'wai

Re: IPsec TDB locking

2021-12-07 Thread Visa Hankala
On Wed, Dec 08, 2021 at 02:41:47AM +0300, Vitaliy Makkoveev wrote: > [IN] looks strange. If this field modified after creation it is > mutable. There are cases when such field could modified only once, > but it still is atomic. > > We have cases where we do assignment only once, like `unp_addr’ >

relayd: small ssl.c cleanup

2021-12-07 Thread Theo Buehler
BIO_new_mem_buf has had const since 2018, so this workaround is no longer needed. Index: ssl.c === RCS file: /cvs/src/usr.sbin/relayd/ssl.c,v retrieving revision 1.35 diff -u -p -r1.35 ssl.c --- ssl.c 27 Jan 2021 20:33:05 -

Re: IPsec TDB locking

2021-12-07 Thread Vitaliy Makkoveev
[IN] looks strange. If this field modified after creation it is mutable. There are cases when such field could modified only once, but it still is atomic. We have cases where we do assignment only once, like `unp_addr’ when we bind(2)ing socket and we don’t modify if until socket’s destruction. Si

IPsec TDB locking

2021-12-07 Thread Alexander Bluhm
Hi, I have started documenting the locking strategy of struct tdb fields. Note that gettdb_dir() is MP safe now. In udpencap_ctlinput() we had an unprotected access to tdb_snext. Grab the tdb_sadb_mtx mutex there. Make the braces consistently for all these loops. Move NET_ASSERT_LOCKED() into t

Re: netstart: create virtual interfaces upfront when passing specific ones

2021-12-07 Thread Klemens Nanni
On Tue, Nov 23, 2021 at 01:17:14AM +, Klemens Nanni wrote: > On Tue, Nov 16, 2021 at 11:09:40PM +, Klemens Nanni wrote: > > Run on boot without arguments, netstart(8) creates all virtual > > interfaces *for which hostname.if files exist* before configuring them. > > > > This prevents order

Re: Please test: UVM fault unlocking (aka vmobjlock)

2021-12-07 Thread Scott Cheloha
On Tue, Dec 07, 2021 at 10:04:04AM -0600, Scott Cheloha wrote: > On Mon, Nov 29, 2021 at 10:50:32PM +0100, Martin Pieuchot wrote: > > On 24/11/21(Wed) 11:16, Martin Pieuchot wrote: > > > Diff below unlock the bottom part of the UVM fault handler. I'm > > > interested in squashing the remaining bug

Re: Add EVFILT_EXCEPT for pipes

2021-12-07 Thread Todd C . Miller
On Tue, 07 Dec 2021 16:25:59 +, Visa Hankala wrote: > In simple cases that do not have out-of-band data, the system can skip > registering the EVFILT_EXCEPT filter. A new flag could indicate when > the registration is done for select(2). The patch below does the > tweaking for FIFOs and pipes,

Re: IPsec delete TDB in ipo cache

2021-12-07 Thread Vitaliy Makkoveev
> On 7 Dec 2021, at 18:31, Alexander Bluhm wrote: > > Hi, > > In ipo_tdb the flow contains a reference counted TDB cache. This > may prevent that tdb_free() is called. It is not a real leak as > ipsecctl -F or termination of iked flush this cache. The kernel > does the cleanup itself if we mo

Re: Add EVFILT_EXCEPT for pipes

2021-12-07 Thread Visa Hankala
On Tue, Dec 07, 2021 at 08:40:53AM -0700, Todd C. Miller wrote: > On Mon, 06 Dec 2021 17:05:39 +, Visa Hankala wrote: > > > This adds EVFILT_EXCEPT handler for pipes. It is a subset of > > EVFILT_READ; it triggers on EOF only. This captures the POLLHUP > > condition of pipe_poll(), used with s

Re: Please test: UVM fault unlocking (aka vmobjlock)

2021-12-07 Thread Scott Cheloha
On Mon, Nov 29, 2021 at 10:50:32PM +0100, Martin Pieuchot wrote: > On 24/11/21(Wed) 11:16, Martin Pieuchot wrote: > > Diff below unlock the bottom part of the UVM fault handler. I'm > > interested in squashing the remaining bugs. Please test with your usual > > setup & report back. > > Thanks to

Re: Add EVFILT_EXCEPT for pipes

2021-12-07 Thread Todd C . Miller
On Mon, 06 Dec 2021 17:05:39 +, Visa Hankala wrote: > This adds EVFILT_EXCEPT handler for pipes. It is a subset of > EVFILT_READ; it triggers on EOF only. This captures the POLLHUP > condition of pipe_poll(), used with select(2)'s exceptfds and when > poll(2) has events without (POLLIN | POLLR

IPsec delete TDB in ipo cache

2021-12-07 Thread Alexander Bluhm
Hi, In ipo_tdb the flow contains a reference counted TDB cache. This may prevent that tdb_free() is called. It is not a real leak as ipsecctl -F or termination of iked flush this cache. The kernel does the cleanup itself if we move the code from tdb_free() to tdb_delete(). ok? bluhm Index: n

Re: lsearch(3): implement with lfind(3)

2021-12-07 Thread Todd C . Miller
On Mon, 06 Dec 2021 22:37:02 -0600, Scott Cheloha wrote: > lsearch(3) is just lfind(3) + append. If we write it that way we > shrink lsearch.c. The third function, linear_base(), is just added > complexity. The indirection buys us nothing. > > I don't think we need to keep the historical commen

Re: lsearch(3): implement with lfind(3)

2021-12-07 Thread Scott Cheloha
On Mon, Dec 06, 2021 at 10:37:02PM -0600, Scott Cheloha wrote: > lsearch(3) is just lfind(3) + append. If we write it that way we > shrink lsearch.c. The third function, linear_base(), is just added > complexity. The indirection buys us nothing. > > I don't think we need to keep the historical

Re: com(4) at acpi(4) on amd64

2021-12-07 Thread Patrick Wildt
On Tue, Dec 07, 2021 at 01:08:45PM +0100, Mark Kettenis wrote: > > Date: Tue, 7 Dec 2021 11:30:48 +0100 > > From: Anton Lindqvist > > > > On Mon, Dec 06, 2021 at 10:25:34PM +0100, Mark Kettenis wrote: > > > > Date: Mon, 6 Dec 2021 21:45:03 +0100 > > > > From: Anton Lindqvist > > > > > > > > On

Re: com(4) at acpi(4) on amd64

2021-12-07 Thread Mark Kettenis
> Date: Tue, 7 Dec 2021 11:30:48 +0100 > From: Anton Lindqvist > > On Mon, Dec 06, 2021 at 10:25:34PM +0100, Mark Kettenis wrote: > > > Date: Mon, 6 Dec 2021 21:45:03 +0100 > > > From: Anton Lindqvist > > > > > > On Mon, Dec 06, 2021 at 09:23:45PM +0100, Mark Kettenis wrote: > > > > > Date: Mon

Re: com(4) at acpi(4) on amd64

2021-12-07 Thread Anton Lindqvist
On Mon, Dec 06, 2021 at 10:25:34PM +0100, Mark Kettenis wrote: > > Date: Mon, 6 Dec 2021 21:45:03 +0100 > > From: Anton Lindqvist > > > > On Mon, Dec 06, 2021 at 09:23:45PM +0100, Mark Kettenis wrote: > > > > Date: Mon, 6 Dec 2021 21:08:04 +0100 > > > > From: Patrick Wildt > > > > > > > > Hi, >

Re: dhcpleased - set ciaddr per RFC

2021-12-07 Thread Florian Obser
anyone else? On 2021-12-04 17:26 -07, Joel Knight wrote: > We have a winner here. I tested from INIT through to REBINDING and the > behavior matches what's in the RFC now. ok joel@ > > One cosmetic thing I noticed this time around: log_dhcp_hdr() in > engine.c should be printing dhcp_hdr->xid i