Translate POLLNVAL in ppollcollect()

2021-11-20 Thread Visa Hankala
The original poll(2) implementation resumed and returned error POLLNVAL if the file descriptor was closed by another thread. This patch adds POLLNVAL translation to ppollcollect(). Currently, the function returns POLLIN, POLLOUT or something else depending on the event filter. OK? Index: kern/sy

vmm(4): copyout guest regs, irqready on VM_EXIT_NONE

2021-11-20 Thread Dave Voutila
The below diff fixes an issue reported by kn@ on bugs@ [1]. joshe@ also observed the issue and confirmed the below diff resolves it. The symptoms were quite odd: errors from fdc(4) during an OpenBSD guest booting under vmm(4)/vmd(8). We don't emulate a floppy disk drive!!! I introduced a bug in r

Re: Expose TDBs with excess hardlimit in ipsec(4) statistics

2021-11-20 Thread Alexander Bluhm
On Sun, Nov 21, 2021 at 05:10:54AM +0300, Vitaliy Makkoveev wrote: > The order ipsecstat_inc(); pfkeyv2_expire(); tdb_delete(); looks > more consistent to me. ok? OK bluhm@

Re: tee(1): increase read buffer to MAXBSIZE bytes

2021-11-20 Thread Todd C . Miller
On Sat, 20 Nov 2021 20:19:47 -0600, Scott Cheloha wrote: > It's not the idiomatic loop from the manpage, but near as I can tell > it is equivalent. You are right, I didn't look closely enough. > ... should we make it idiomatic? Saves a few lines, is less > confusing, etc. OK millert@ - todd

Re: tee(1): increase read buffer to MAXBSIZE bytes

2021-11-20 Thread Scott Cheloha
On Sat, Nov 20, 2021 at 02:22:41PM -0700, Todd C. Miller wrote: > On Sat, 20 Nov 2021 11:19:13 -0600, Scott Cheloha wrote: > > > > One advantage to using stdio is that > > > it will use the optimal I/O blocksize automatically so you could > > > try using that instead of write(2) and see how it per

Re: Expose TDBs with excess hardlimit in ipsec(4) statistics

2021-11-20 Thread Vitaliy Makkoveev
> On 21 Nov 2021, at 04:14, Alexander Bluhm wrote: > > On Sun, Nov 21, 2021 at 02:56:58AM +0300, Vitaliy Makkoveev wrote: >> Also I found the `ipsec_notdb' counter description in header doesn't >> math to netstat(1) description. We never count `ipsec_notdb' and the >> netstat(1) description lo

Re: IPsec tdb ref counting

2021-11-20 Thread Alexander Bluhm
On Sun, Nov 21, 2021 at 03:17:08AM +0300, Vitaliy Makkoveev wrote: > Can I propose to commit the diff [1] to expose the TDB hardlimit excess > statistics and then test this diff? I want to see stable systems with > non null "TDBs with hard limit excess" couter in the statistics like > below. Yes

Re: Expose TDBs with excess hardlimit in ipsec(4) statistics

2021-11-20 Thread Alexander Bluhm
On Sun, Nov 21, 2021 at 02:56:58AM +0300, Vitaliy Makkoveev wrote: > Also I found the `ipsec_notdb' counter description in header doesn't > math to netstat(1) description. We never count `ipsec_notdb' and the > netstat(1) description looks more appropriate so I used it to avoid > confusion with the

Re: Rework UNIX sockets locking to be fine grained

2021-11-20 Thread Vitaliy Makkoveev
On Sat, Nov 20, 2021 at 07:16:40PM +0100, Matthias Schmidt wrote: > Hi Vitaliy, > > * Vitaliy Makkoveev wrote: > > Updated diff. Re-lock dances were simplified in the unix(4) sockets > > layer. > > I am running this diff and the one before on a Thinkpad T450s which is > my daily driver (office, c

Re: IPsec tdb ref counting

2021-11-20 Thread Vitaliy Makkoveev
On Sat, Nov 20, 2021 at 05:31:33PM +0100, Alexander Bluhm wrote: > New tdb refcounting diff. > > I delete and unref the timeouts earlier and fixed some leaks. At > least on my machine it does not crash and tcp InUse is 0 after > ipsecctl -F . > > Please test. > > mvs: Are some of your concerns

Expose TDBs with excess hardlimit in ipsec(4) statistics

2021-11-20 Thread Vitaliy Makkoveev
When I had playing with bluhm@'s ipsec(4) diffs I found my system always manages to complete rekeying and I have no TDB's with hardlimit excess. It seems I'm not the only such person and other testers also don't have panics Hrvoje Popovski had. I want to count the TDBs with hardlimit excess as the

Explicitly tag commands in vi(1)

2021-11-20 Thread Simon Branch
Hello! Here's a diff that adds explicit .Tg macros to vi(1), so that you can jump to vi or ex commands using -Otag or :t. This patch *should* include every command, but I couldn't figure out how to tag the '!' and ':!' commands; none of these worked: .Tg .Tg ! .Tg !\& .Tg "!" This p

Re: tee(1): increase read buffer to MAXBSIZE bytes

2021-11-20 Thread Todd C . Miller
On Sat, 20 Nov 2021 11:19:13 -0600, Scott Cheloha wrote: > > One advantage to using stdio is that > > it will use the optimal I/O blocksize automatically so you could > > try using that instead of write(2) and see how it performs. > > tee(1) needs to write input to N drains, N >= 1. If we use std

Re: asr(3): strip AD flag in responses

2021-11-20 Thread Otto Moerbeek
On Sat, Nov 20, 2021 at 06:44:58PM +0100, Florian Obser wrote: > On 2021-11-20 18:41 +01, Florian Obser wrote: > > On 2021-11-20 18:19 +01, Florian Obser wrote: > > > >> +/* > >> + * Clear AD flag in the answer. > >> + */ > >> +static void > >> +clear_ad(struct asr_result *ar) > >> +{ > >> + st

Re: Rework UNIX sockets locking to be fine grained

2021-11-20 Thread Matthias Schmidt
Hi Vitaliy, * Vitaliy Makkoveev wrote: > Updated diff. Re-lock dances were simplified in the unix(4) sockets > layer. I am running this diff and the one before on a Thinkpad T450s which is my daily driver (office, coding, web, videos, musik, etc) and noticed no regressions so far. Suspend/resume

Re: asr(3): strip AD flag in responses

2021-11-20 Thread Florian Obser
On 2021-11-20 18:41 +01, Florian Obser wrote: > On 2021-11-20 18:19 +01, Florian Obser wrote: > >> +/* >> + * Clear AD flag in the answer. >> + */ >> +static void >> +clear_ad(struct asr_result *ar) >> +{ >> +struct asr_dns_header *h; >> +uint16_t flags; >> + >> +h =

Re: asr(3): strip AD flag in responses

2021-11-20 Thread Florian Obser
On 2021-11-20 18:19 +01, Florian Obser wrote: > +/* > + * Clear AD flag in the answer. > + */ > +static void > +clear_ad(struct asr_result *ar) > +{ > + struct asr_dns_header *h; > + uint16_t flags; > + > + h = (struct asr_dns_header *)ar->ar_data; > + flags = nt

Re: asr(3): strip AD flag in responses

2021-11-20 Thread Florian Obser
On 2021-11-20 17:05 +01, Jeremie Courreges-Anglas wrote: > First, I'm happy to this subject considered again, even if I don't use > DNSSEC these days I think it makes sense to provide this support in libc. > > On Sat, Nov 20 2021, Florian Obser wrote: >> On 2021-11-20 14:40 +01, Otto Moerbeek wr

Re: tee(1): increase read buffer to MAXBSIZE bytes

2021-11-20 Thread Scott Cheloha
On Fri, Nov 19, 2021 at 08:38:27PM -0700, Todd C. Miller wrote: > On Fri, 19 Nov 2021 21:31:12 -0600, Scott Cheloha wrote: > > > Is there a nicer way to pick a "reasonable" buffer size when we just > > want to move as many bytes as possible on a given platform without > > hogging the machine? > >

Re: IPsec tdb ref counting

2021-11-20 Thread Alexander Bluhm
New tdb refcounting diff. I delete and unref the timeouts earlier and fixed some leaks. At least on my machine it does not crash and tcp InUse is 0 after ipsecctl -F . Please test. mvs: Are some of your concerns resolved by deleting the tdb_reaper() ? bluhm Index: net/if_bridge.c ===

Re: urndis0: IOERROR

2021-11-20 Thread Mikhail
Comparing Windows and OpenBSD tcpdumps I noticed some differences: 1) In REMOTE_NDIS_INITIALIZE_MSG (I patched the kernel to send it before getting MAC address and with proper minor version) bInterfaceClass on OpenBSD is set to Unknown (0x), on Windows it's properly set to Wireless Controller

Re: asr(3): strip AD flag in responses

2021-11-20 Thread Jeremie Courreges-Anglas
First, I'm happy to this subject considered again, even if I don't use DNSSEC these days I think it makes sense to provide this support in libc. On Sat, Nov 20 2021, Florian Obser wrote: > On 2021-11-20 14:40 +01, Otto Moerbeek wrote: >> On Sat, Nov 20, 2021 at 12:20:32PM +0100, Florian Obser

Re: uhidev: claim multiple report ids [3/N]

2021-11-20 Thread Damien Couderc
Le 12/11/2021 à 09:11, Anton Lindqvist a écrit : On Thu, Nov 11, 2021 at 05:09:35PM -0800, Greg Steuck wrote: Anton Lindqvist writes: On Thu, Nov 11, 2021 at 03:29:15PM +0100, Anton Lindqvist wrote: Hi, The second attempt to solve the uhidev claim multiple report ids conflict didn't work out

Re: snmpd: tweak listen on

2021-11-20 Thread Stuart Henderson
On 2021/11/20 10:20, Martijn van Duren wrote: > On Sun, 2021-11-14 at 22:30 +0100, Sebastian Benoit wrote: > > If there is no obvious reason (i.e. be different because you need it for a > > specific feature) why not to use the same host*() function as other parse.y? > > it would be better to stay i

Re: asr(3): strip AD flag in responses

2021-11-20 Thread Florian Obser
On 2021-11-20 14:40 +01, Otto Moerbeek wrote: > On Sat, Nov 20, 2021 at 12:20:32PM +0100, Florian Obser wrote: >> diff --git share/man/man5/resolv.conf.5 share/man/man5/resolv.conf.5 >> index 8d3b91c0832..ac64d3e6fd6 100644 >> --- share/man/man5/resolv.conf.5 >> +++ share/man/man5/resolv.conf.5 >>

Re: diff: improve legibility of structs in several manpages

2021-11-20 Thread Ingo Schwarze
Hi Jan, sorry that i failed to look at this earlier. Even with your diff, the style is still not completely consistent. I think that inside .Bd -literal, the best style is exactly the same as in source code: structname{ typename; type*name; }; where * can be more than one tab if some of

Re: asr(3): strip AD flag in responses

2021-11-20 Thread Otto Moerbeek
On Sat, Nov 20, 2021 at 02:40:59PM +0100, Otto Moerbeek wrote: > On Sat, Nov 20, 2021 at 12:20:32PM +0100, Florian Obser wrote: > > > The Authentic Data (AD) flag indicates that the nameserver validated > > the response using DNSSEC. For clients to trust this the nameserver > > and the path to th

Re: asr(3): strip AD flag in responses

2021-11-20 Thread Otto Moerbeek
On Sat, Nov 20, 2021 at 12:20:32PM +0100, Florian Obser wrote: > The Authentic Data (AD) flag indicates that the nameserver validated > the response using DNSSEC. For clients to trust this the nameserver > and the path to the nameserver must be trusted. In the general case > this is not true. > >

Fix ipsp_spd_lookup() for transport mode (was Re: Fix IPsec NAT-T for L2TP/IPsec)

2021-11-20 Thread YASUOKA Masahiko
Hi, On Wed, 12 May 2021 19:11:09 +0900 (JST) YASUOKA Masahiko wrote: > Radek reported a problem to misc@ that multiple Windows clients behind > a NAT cannot use a L2TP/IPsec server simultaneously. > > https://marc.info/?t=16099681611&r=1&w=2 > > There is two problems. First is pipex(4) doe

asr(3): strip AD flag in responses

2021-11-20 Thread Florian Obser
The Authentic Data (AD) flag indicates that the nameserver validated the response using DNSSEC. For clients to trust this the nameserver and the path to the nameserver must be trusted. In the general case this is not true. We can trust localhost so we set the AD flag on queries to request validati

Re: snmpd: tweak listen on

2021-11-20 Thread Martijn van Duren
On Sun, 2021-11-14 at 22:30 +0100, Sebastian Benoit wrote: > If there is no obvious reason (i.e. be different because you need it for a > specific feature) why not to use the same host*() function as other parse.y? > it would be better to stay in sync with otehrr daemons. That way if there is > an