Re: unlock mmap(2) for anonymous mappings

2022-01-13 Thread Christian Weisgerber
Klemens Nanni: > > > Now this is clearly a "slow" path. I don't think there is any reason > > > not to put all the code in that if (uvw_wxabort) block under the > > > kernel lock. For now I think making access to ps_wxcounter atomic is > > > just too fine grained. > > > > Right. Lock the

Re: rpki-client introduce validated cache

2022-01-13 Thread Theo Buehler
On Thu, Jan 13, 2022 at 05:05:57PM +0100, Claudio Jeker wrote: > This diff adds a new cache subdir called "valid". This is the place where > all verified and good files are stored after a run. It makes -n work a lot > better since -n will now only look at what's inside "valid" and ignore > "rsync"

Re: ix(4): enable TCPv6/UDPv6 cksum offloading

2022-01-13 Thread Alexander Bluhm
On Thu, Jan 13, 2022 at 12:43:57PM -0700, Theo de Raadt wrote: > > - m_getptr() returns the correct mbuf and offset to the header. I > > think we can assume that a single IPv6 header, that our stack has > > created, is in contiguous memory. The IPv4 case just above makes > > the same

Re: ix(4): enable TCPv6/UDPv6 cksum offloading

2022-01-13 Thread Mark Kettenis
> Date: Thu, 13 Jan 2022 20:34:36 +0100 > From: Alexander Bluhm > > On Wed, Jan 12, 2022 at 05:36:01PM +0100, Mark Kettenis wrote: > > > Date: Wed, 12 Jan 2022 17:02:03 +0100 > > > From: Jan Klemkow > > > > > > Hi, > > > > > > This diff enables TCP and UDP checksum offloading in ix(4) for IPv6.

Re: request for testing: malloc and large allocations

2022-01-13 Thread Leo Unglaub
Hey, On 1/9/22 14:54, Otto Moerbeek wrote: currently malloc does cache a number of free'ed regions up to 128k in size. This cache is indexed by size (in # of pages), so it is very quick to check. Some programs allocate and deallocate larger allocations in a frantic way. Accodomate those

Re: ix(4): enable TCPv6/UDPv6 cksum offloading

2022-01-13 Thread Theo de Raadt
> - m_getptr() returns the correct mbuf and offset to the header. I > think we can assume that a single IPv6 header, that our stack has > created, is in contiguous memory. The IPv4 case just above makes > the same assumption. And if the assumption is not met due to interations between

Re: ix(4): enable TCPv6/UDPv6 cksum offloading

2022-01-13 Thread Alexander Bluhm
On Wed, Jan 12, 2022 at 05:36:01PM +0100, Mark Kettenis wrote: > > Date: Wed, 12 Jan 2022 17:02:03 +0100 > > From: Jan Klemkow > > > > Hi, > > > > This diff enables TCP and UDP checksum offloading in ix(4) for IPv6. > > > > IPv6 extension headers aren't a problem in this case. > >

Re: request for testing: malloc and large allocations

2022-01-13 Thread Matthias Schmidt
Hi Otto, * Otto Moerbeek wrote: > Hi, > > currently malloc does cache a number of free'ed regions up to 128k in > size. This cache is indexed by size (in # of pages), so it is very > quick to check. > > Some programs allocate and deallocate larger allocations in a frantic > way. Accodomate

fix active scan on iwm and iwx

2022-01-13 Thread Stefan Sperling
At present active scans (which send probe requests, as opposed to just listening for beacons) are disabled on iwm 9k and iwx. This was done because firmware misbehaved after association. zxystd from the OpenIntelWireless project has debugged the issue and has sent me a patch against OpenBSD which

rpki-client introduce validated cache

2022-01-13 Thread Claudio Jeker
This diff adds a new cache subdir called "valid". This is the place where all verified and good files are stored after a run. It makes -n work a lot better since -n will now only look at what's inside "valid" and ignore "rsync" and "rrdp". The trust anchors are still stored in "ta" even if valid.

Re: rpki-client reshuffle deck chairs

2022-01-13 Thread Theo Buehler
On Thu, Jan 13, 2022 at 02:52:22PM +0100, Claudio Jeker wrote: > This diff just shuffles some functions around to reduce the size of the > validate cache diff. ok

Re: rpki-client stop checking stale manifests

2022-01-13 Thread Theo Buehler
On Thu, Jan 13, 2022 at 02:50:59PM +0100, Claudio Jeker wrote: > Noticed the other day, a stale manifest tries to check the fileandhash > data. But when running with -n none of this data will be around since it > was most probably removed on the previous run. The result is a lot of > warnings on

rpki-client reshuffle deck chairs

2022-01-13 Thread Claudio Jeker
This diff just shuffles some functions around to reduce the size of the validate cache diff. -- :wq Claudio Index: repo.c === RCS file: /cvs/src/usr.sbin/rpki-client/repo.c,v retrieving revision 1.23 diff -u -p -r1.23 repo.c ---

rpki-client stop checking stale manifests

2022-01-13 Thread Claudio Jeker
Noticed the other day, a stale manifest tries to check the fileandhash data. But when running with -n none of this data will be around since it was most probably removed on the previous run. The result is a lot of warnings on top of the warning about the mft being stale. It is better to skip

Re: rpki-client, adjust valid_filehash and callers for repo split

2022-01-13 Thread Claudio Jeker
On Thu, Jan 13, 2022 at 02:24:59PM +0100, Theo Buehler wrote: > On Thu, Jan 13, 2022 at 02:16:02PM +0100, Claudio Jeker wrote: > > Right now a file can only exist in one place in the rpki-client cache. > > This will change when we split valid data to its own repo. > > > > One step to get closer

Re: rpki-client, adjust valid_filehash and callers for repo split

2022-01-13 Thread Theo Buehler
On Thu, Jan 13, 2022 at 02:16:02PM +0100, Claudio Jeker wrote: > Right now a file can only exist in one place in the rpki-client cache. > This will change when we split valid data to its own repo. > > One step to get closer to that is to alter valid_filehash() to take an > open filedescriptor

rpki-client, adjust valid_filehash and callers for repo split

2022-01-13 Thread Claudio Jeker
Right now a file can only exist in one place in the rpki-client cache. This will change when we split valid data to its own repo. One step to get closer to that is to alter valid_filehash() to take an open filedescriptor instead of using open(2) itself. This allows the callers to decide which

Re: request for testing: malloc and large allocations

2022-01-13 Thread Stuart Henderson
On 2022/01/09 14:54, Otto Moerbeek wrote: > currently malloc does cache a number of free'ed regions up to 128k in > size. This cache is indexed by size (in # of pages), so it is very > quick to check. > > Some programs allocate and deallocate larger allocations in a frantic > way. Accodomate

Re: rpki-client real cleanup before snapshot

2022-01-13 Thread Theo Buehler
On Thu, Jan 13, 2022 at 12:24:55PM +0100, Claudio Jeker wrote: > This introduces a function remove_contents() which is implementing a basic > rm -r and uses it to clean the RRDP repository when downloading a > snapshot (especially after a delta failure). It also cleans out the temp > directory

Re: rpki-client prepare to use rsync --compare-dest

2022-01-13 Thread Theo Buehler
On Thu, Jan 13, 2022 at 11:42:24AM +0100, Claudio Jeker wrote: > This diff adds the code to pass --compare-dest to rsync. This will be > used once there is a valid cache and then the rsync repo will just act as > a delta on top. > > Now --compare-dest is a bit strange as in the directory passed

Re: rpki-client fix -n mode

2022-01-13 Thread Theo Buehler
On Thu, Jan 13, 2022 at 11:37:32AM +0100, Claudio Jeker wrote: > Since we push repository information over to the parser -n mode was broken > because in that case the TA repositories did not get sent. > This little diff fixes the problem. ok tb > > -- > :wq Claudio > > Index: repo.c >

rpki-client real cleanup before snapshot

2022-01-13 Thread Claudio Jeker
This introduces a function remove_contents() which is implementing a basic rm -r and uses it to clean the RRDP repository when downloading a snapshot (especially after a delta failure). It also cleans out the temp directory after a failure to fetch. With the introduction of a validated cache this

rpki-client prepare to use rsync --compare-dest

2022-01-13 Thread Claudio Jeker
This diff adds the code to pass --compare-dest to rsync. This will be used once there is a valid cache and then the rsync repo will just act as a delta on top. Now --compare-dest is a bit strange as in the directory passed is relative to the destination directory (last argument of rsync

rpki-client fix -n mode

2022-01-13 Thread Claudio Jeker
Since we push repository information over to the parser -n mode was broken because in that case the TA repositories did not get sent. This little diff fixes the problem. -- :wq Claudio Index: repo.c === RCS file: