Re: Per-cpu counters for TDB stats

2021-12-17 Thread Alexander Bluhm
On Wed, Dec 15, 2021 at 07:21:46PM +0300, Vitaliy Makkoveev wrote: > The previous version of this diff exposed UAF issue we had after > tdb_delete(). bluhm@ fixed this and proposes to put per-cpu counters > diff again to tree. This is the updated diff to be against the resent > sources. OK bluhm@

ipsec tdb walk

2021-12-17 Thread Alexander Bluhm
Hi, There are occasions where the walker in tdb_walk() might sleep. Case SADB_DUMP is such a case. And mvs@ has a diff that sleeps to read the counters. So holding the tdb_sadb_mtx() when calling walker() is not allowed. Move the TDB from the TDB-Hash to a list that is protected by netlock. Th

Re: fix ping(8) and traceroute(8) source selection

2021-12-17 Thread Theo de Raadt
I am not a fan of solving this in ping and traceroute, because there are other places this alternative-srcaddr mechanism is not working, and it feels like all of the solutions need to be in the kernel. Also, there is no urgency to fix it immediately. So a kernel option can be invested in a leisur

fix ping(8) and traceroute(8) source selection

2021-12-17 Thread Denis Fondras
Here is an attempt to fix ping(8) and traceroute(8) source selection. Currently these tools do not obey route sourceaddr set by the operator. This leads to frustration at best and erroneous diagnosis at worse on multi-homed systems. The "real" fix would be to rework source selection in the kernel

Re: : provide ElfW() macro

2021-12-17 Thread Mark Kettenis
> Date: Fri, 17 Dec 2021 13:04:35 + > From: Klemens Nanni > > An upcoming port uses ElfW(). I first patched the port, but looking > around shows that both NetBSD and FreeBSD adopted the macro: > > https://mail-index.netbsd.org/source-changes-hg/2018/07/31/msg027523.html > +#defineEl

Re: sndiod: -F does not switch back to preferred device

2021-12-17 Thread Klemens Nanni
On Thu, Dec 09, 2021 at 11:29:04PM +, Klemens Nanni wrote: > On Thu, Dec 09, 2021 at 10:21:56AM +0100, Alexandre Ratchov wrote: > > On Wed, Dec 08, 2021 at 10:30:08PM +, Klemens Nanni wrote: > > > Following https://www.openbsd.org/faq/faq13.html#usbaudio and reading > > > sndiod(8)'s > > >

: provide ElfW() macro

2021-12-17 Thread Klemens Nanni
An upcoming port uses ElfW(). I first patched the port, but looking around shows that both NetBSD and FreeBSD adopted the macro: https://mail-index.netbsd.org/source-changes-hg/2018/07/31/msg027523.html +#defineElfW(x) CONCAT(Elf,CONCAT(ELFSIZE,CONCAT(_,x))) https://cgit.freebsd.