Re: Is rdomain correct for rtable in man ifconfig?

2022-07-13 Thread YASUOKA Masahiko
Hello, On Thu, 14 Jul 2022 14:09:52 +0900 (JST) Masato Asou wrote: > The TUNNEL in the man ifconfig(8) is described as follows: > > TUNNEL > > tunneldomain rtable > ^^here > Use routing table rtable instead of the default table. The >

Re: dhcpleased(8): close unneeded bpf FDs

2022-07-13 Thread Florian Obser
On 2022-07-12 14:35 +02, Florian Obser wrote: > When the autoconf flag flaps around we might end up with multiple bpf > FDs in flight. Things then get confusing. The kernel tells us we can > read from the bpf FD but the data is actually "on the other FD", so > read(2) returns 0. > > Found the hard

Is rdomain correct for rtable in man ifconfig?

2022-07-13 Thread Masato Asou
Hi, The TUNNEL in the man ifconfig(8) is described as follows: TUNNEL tunneldomain rtable ^^here Use routing table rtable instead of the default table. The ^^here tunnel does not need to terminate in the sam

Re: unp_solock_peer() and READ_ONCE()

2022-07-13 Thread Vitaliy Makkoveev
> On 14 Jul 2022, at 05:51, Visa Hankala wrote: > > On Thu, Jul 14, 2022 at 04:39:33AM +0300, Vitaliy Makkoveev wrote: >> It looks like sometimes the `unp_conn' doesn't reloaded in >> the "unp->unp_conn != unp2" check, and READ_ONCE() should prevent this. > > Are you sure about the non-reloading

Re: unp_solock_peer() and READ_ONCE()

2022-07-13 Thread Visa Hankala
On Thu, Jul 14, 2022 at 04:39:33AM +0300, Vitaliy Makkoveev wrote: > It looks like sometimes the `unp_conn' doesn't reloaded in > the "unp->unp_conn != unp2" check, and READ_ONCE() should prevent this. Are you sure about the non-reloading of unp->unp_conn? I did a quick look in the compiled output

unp_solock_peer() and READ_ONCE()

2022-07-13 Thread Vitaliy Makkoveev
It looks like sometimes the `unp_conn' doesn't reloaded in the "unp->unp_conn != unp2" check, and READ_ONCE() should prevent this. unp_solock_peer(struct socket *so) { struct unpcb *unp, *unp2; struct socket *so2; unp = so->so_pcb; again: if ((unp2 = unp->unp_conn

Re: [v3] amd64: simplify TSC sync testing

2022-07-13 Thread Theo de Raadt
Christian Weisgerber wrote: > Scott Cheloha: > > > > kern.timecounter.tick=1 > > > kern.timecounter.timestepwarnings=0 > > > kern.timecounter.hardware=i8254 > > > kern.timecounter.choice=i8254(0) tsc(-1000) acpihpet0(1000) > > > acpitimer0(1000) > > > > This is expected behavior with the patch

Re: ifconfig description for wireguard peers

2022-07-13 Thread Mikolaj Kucharski
On Wed, Jul 13, 2022 at 05:43:59PM +0100, Stuart Henderson wrote: > > > > Not sure how to handle long output in different way. If you don't > > specify wgdesc to the ifconfig, the diff doesn't change anything and > > ifconfig(8) output is exactly the same. If you don't find this feature > > useful

Re: ifconfig description for wireguard peers

2022-07-13 Thread Stuart Henderson
On 2022/07/13 16:18, Mikolaj Kucharski wrote: > On Wed, Jul 13, 2022 at 10:02:30AM -0600, Theo de Raadt wrote: > > Mikolaj Kucharski wrote: > > > > > I took the libery and refreshed the patch. What I did so far: > > > > > > - compiled GENERIC.MP on amd64 > > > - compiled new ifconfig, same arch

Re: ifconfig description for wireguard peers

2022-07-13 Thread Mikolaj Kucharski
On Wed, Jul 13, 2022 at 10:02:30AM -0600, Theo de Raadt wrote: > Mikolaj Kucharski wrote: > > > I took the libery and refreshed the patch. What I did so far: > > > > - compiled GENERIC.MP on amd64 > > - compiled new ifconfig, same arch > > - booted up new bsd.mp with the patch > > - when wgdesc

Re: ifconfig description for wireguard peers

2022-07-13 Thread Theo de Raadt
Mikolaj Kucharski wrote: > I took the libery and refreshed the patch. What I did so far: > > - compiled GENERIC.MP on amd64 > - compiled new ifconfig, same arch > - booted up new bsd.mp with the patch > - when wgdesc is not set, pre-patch ifconfig seems to work > - when with new ifconfig I set w

Re: ifconfig description for wireguard peers

2022-07-13 Thread Mikolaj Kucharski
On Wed, Jul 13, 2022 at 03:37:05PM +, Mikolaj Kucharski wrote: > Example from running -current: > > pce-0067# ifconfig.new wg0 > wg0: flags=80c3 mtu 1420 > index 8 priority 0 llprio 3 > wgport 51820 > wgpubkey qcb... > wgpeer klM... > descriptio

Re: ifconfig description for wireguard peers

2022-07-13 Thread Mikolaj Kucharski
I took the libery and refreshed the patch. What I did so far: - compiled GENERIC.MP on amd64 - compiled new ifconfig, same arch - booted up new bsd.mp with the patch - when wgdesc is not set, pre-patch ifconfig seems to work - when with new ifconfig I set wgdesc, old ifconfig wg segfaults Example

Re: Race in disk_attach_callback?

2022-07-13 Thread Stefan Sperling
On Wed, Jul 13, 2022 at 02:18:53PM +0200, Otto Moerbeek wrote: > Hi, > > after a prompt from stsp@ and florian@, reporting that newfs_msdos > fails when given an $duid.i argument, I set down to see what could be > going on. My test using an USB stick failed to reprdouce the problem. > Then I start

Re: Race in disk_attach_callback?

2022-07-13 Thread Otto Moerbeek
On Wed, Jul 13, 2022 at 02:18:53PM +0200, Otto Moerbeek wrote: > Hi, > > after a prompt from stsp@ and florian@, reporting that newfs_msdos > fails when given an $duid.i argument, I set down to see what could be > going on. My test using an USB stick failed to reprdouce the problem. > Then I star

Race in disk_attach_callback?

2022-07-13 Thread Otto Moerbeek
Hi, after a prompt from stsp@ and florian@, reporting that newfs_msdos fails when given an $duid.i argument, I set down to see what could be going on. My test using an USB stick failed to reprdouce the problem. Then I started using a vnd, and that shows the issue (once in a while). The feeling is

Re: ifconfig description for wireguard peers

2022-07-13 Thread Mikolaj Kucharski
Hi, I'm sorry I didn't test this, as I don't have -current OpenBSD on all my machines, but I do have one WireGuard gateway running -stable with few peers: # ifconfig wg | grep -cw wgpeer 25 I would love to have this merged into main repo, as it would make my life a tiny bit easier to see which p

Introduce fine grained pipex(4) locking

2022-07-13 Thread Vitaliy Makkoveev
Use per-session `pxs_mtx' mutex(9) to protect session context. Except MPPE encryption, PPPOE sessions are mostly immutable, so no lock required for that case. Global pipex(4) data is already protected by `pipex_list_mtx', so pipex(4) doesn't rely on netlock anymore. Netlock could be also removed f

Re: amd64 serial console changes, part 2

2022-07-13 Thread Mark Kettenis
> Date: Tue, 12 Jul 2022 20:03:15 +0200 > From: Denis Fondras > > Le Wed, Jul 06, 2022 at 10:45:39PM +0200, Mark Kettenis a écrit : > > Now that the kernel supports the extended BOOTARG_CONSDEV struct and > > snaps with that change are out there, here is the diff that changes > > the amd64 bootlo