Re: lladdr support for netstart/hostname.if

2022-11-23 Thread Theo de Raadt
Theo de Raadt wrote: > > The other, that if both exist, > > /etc/hostname.$if will override /etc/hostname.$lladdr. > > We do need to decide which one is priority, and document that. > > I am still unsure which is better. (I've seen a lot of spurious comments > from folk, so please think about

Re: lladdr support for netstart/hostname.if

2022-11-23 Thread Theo de Raadt
> The other, that if both exist, > /etc/hostname.$if will override /etc/hostname.$lladdr. We do need to decide which one is priority, and document that. I am still unsure which is better. (I've seen a lot of spurious comments from folk, so please think about realistic cases, and don't make stuff

Re: lladdr support for netstart/hostname.if

2022-11-23 Thread Andrew Hewus Fresh
On Wed, Nov 23, 2022 at 05:28:35PM -0800, Andrew Hewus Fresh wrote: > On Tue, Nov 22, 2022 at 08:09:11AM -0700, Theo de Raadt wrote: > > Florian Obser wrote: > > > ifconfig(8) already knows about these (see -C option). Which made me > > > think, it might be easier to just ask ifconfig(8). > > >

Re: OpenSSH and -current out-of-tree patched for ~C?

2022-11-23 Thread Theo de Raadt
> I noticed that ~C stopped working in my -current, from last Saturday, > holding the message "commandline disabled". The rest of the ~-escapes > work tho, and ~C is no longer present in ~?. Went to check the code, > currenlty sitting on Git commit e0b284df3ba7772329d85f200545e3bc5a84d54e > only to

OpenSSH and -current out-of-tree patched for ~C?

2022-11-23 Thread Lucas
Hi tech@, I noticed that ~C stopped working in my -current, from last Saturday, holding the message "commandline disabled". The rest of the ~-escapes work tho, and ~C is no longer present in ~?. Went to check the code, currenlty sitting on Git commit e0b284df3ba7772329d85f200545e3bc5a84d54e only t

Re: lladdr support for netstart/hostname.if

2022-11-23 Thread Andrew Hewus Fresh
On Tue, Nov 22, 2022 at 08:09:11AM -0700, Theo de Raadt wrote: > Florian Obser wrote: > > ifconfig(8) already knows about these (see -C option). Which made me > > think, it might be easier to just ask ifconfig(8). > > I've done it as -M With `ifconfig -M $lladdr` support, and ignoring the check

Re: newsyslog alt compression support?

2022-11-23 Thread Todd T. Fries
tar -j .. uses bzip2. "The bzip2 utility must be installed separately." I figured it was a long shot. Certainly not as I've done it in any event. Thanks, Penned by Theo de Raadt on 20221118 18:23.33, we have: | I completely disagree on this, of course. | | We do not make base use ports. | |

Re: splassert on boot

2022-11-23 Thread Alexandr Nedvedicky
Hello, On Thu, Nov 24, 2022 at 08:51:51AM +1000, David Gwynne wrote: > im ok with this, but you need sashan@ to ok it too. he's been working up to > this anyway. > > dlg > > > On 24 Nov 2022, at 06:18, Vitaliy Makkoveev wrote: > > > > On Wed, Nov 23, 2022 at 02:59:05PM -0500, David Hill wrote

Re: splassert on boot

2022-11-23 Thread David Gwynne
im ok with this, but you need sashan@ to ok it too. he's been working up to this anyway. dlg > On 24 Nov 2022, at 06:18, Vitaliy Makkoveev wrote: > > On Wed, Nov 23, 2022 at 02:59:05PM -0500, David Hill wrote: >> Hello - >> >> I am seeing splasserts on boot (before kern.splassert=2 can be set

Re: mbufs growing in 7.2

2022-11-23 Thread Joe Miller
I also was not able to recreate the issues I initially saw w/ high traffic on 7.2 after I re-upgraded. I can't explain it but openbsd 7.2 igc has been solid for about 1.5 weeks now, no patches. On Tue, Nov 22, 2022 at 11:21 PM Greg Steuck wrote: > > The watched kettle never boiled. No more crashe

Re: Let nd6_if{at,de}tach() be void and take an ifp argument

2022-11-23 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 10:47:53PM +0100, Claudio Jeker wrote: > On Wed, Nov 23, 2022 at 02:54:08PM +, Klemens Nanni wrote: > > void > > -nd6_ifdetach(struct nd_ifinfo *nd) > > +nd6_ifdetach(struct ifnet *ifp) > > { > > + struct nd_ifinfo *nd = ifp->if_nd; > > > > Would it make sense to

Re: Let nd6_if{at,de}tach() be void and take an ifp argument

2022-11-23 Thread Vitaliy Makkoveev
> On 24 Nov 2022, at 00:47, Claudio Jeker wrote: > > On Wed, Nov 23, 2022 at 02:54:08PM +, Klemens Nanni wrote: >> Do it like the rest of at/detach routines which modify a struct ifnet >> pointer without returning anything. >> >> OK? >> >> diff --git a/sys/net/if.c b/sys/net/if.c >> index c

Re: Let nd6_if{at,de}tach() be void and take an ifp argument

2022-11-23 Thread Claudio Jeker
On Wed, Nov 23, 2022 at 02:54:08PM +, Klemens Nanni wrote: > Do it like the rest of at/detach routines which modify a struct ifnet > pointer without returning anything. > > OK? > > diff --git a/sys/net/if.c b/sys/net/if.c > index c30d7e30e4f..3cb8bbf9176 100644 > --- a/sys/net/if.c > +++ b/sy

Re: splassert on boot

2022-11-23 Thread David Hill
On 11/23/22 15:18, Vitaliy Makkoveev wrote: On Wed, Nov 23, 2022 at 02:59:05PM -0500, David Hill wrote: Hello - I am seeing splasserts on boot (before kern.splassert=2 can be set) with -current. spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM isa0 at pcib0 isadma0 at isa0 v

Re: splassert on boot

2022-11-23 Thread Vitaliy Makkoveev
On Wed, Nov 23, 2022 at 02:59:05PM -0500, David Hill wrote: > Hello - > > I am seeing splasserts on boot (before kern.splassert=2 can be set) with > -current. > > > > spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM > isa0 at pcib0 > isadma0 at isa0 > vga0 at isa0 port 0x3b0/48 i

splassert on boot

2022-11-23 Thread David Hill
Hello - I am seeing splasserts on boot (before kern.splassert=2 can be set) with -current. spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM isa0 at pcib0 isadma0 at isa0 vga0 at isa0 port 0x3b0/48 iomem 0xa/131072 wsdisplay at vga0 not configured pcppi0 at isa0 port 0x61 s

Re: netstart(8): remove sed

2022-11-23 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 08:55:56AM -0700, Theo de Raadt wrote: > > It mounts /usr before running /etc/netstart. > > yes that is a fairly recent change. So no problem with sed/awk in netstart and thus no need for ksh bits? Sounds good.

Document struct nd_ifinfo protection, remove unused .initialized member

2022-11-23 Thread Klemens Nanni
"Push kernel lock into in6_ioctl()" on tech@ talks about ND6 locking, here is one cleanup and one documentation change (squashed) for this. --- Remove struct nd_ifinfo's unused .initialized member Added/set in 2002 nd6.h r1.17/nd6.c r1.42, respectively, but never read: attach nd_ifinfo struct

Re: cwm: fix annoying bug with group_show()

2022-11-23 Thread Luís Henriques
On Tue, Nov 01, 2022 at 10:47:40PM +, Luís Henriques wrote: > Hi! > > I've been seeing a bug since... forever (?) in cwm, and I finally decided > to try to fix it. Here's how I reproduce it: > > 1. open emacs on group 1 > 2. start gnus, which will ask me a password > 3. before emacs asks me

Re: Get rid of UVM_VNODE_CANPERSIST

2022-11-23 Thread Martin Pieuchot
On 23/11/22(Wed) 16:34, Mark Kettenis wrote: > > Date: Wed, 23 Nov 2022 10:52:32 +0100 > > From: Martin Pieuchot > > > > On 22/11/22(Tue) 23:40, Mark Kettenis wrote: > > > > Date: Tue, 22 Nov 2022 17:47:44 + > > > > From: Miod Vallat > > > > > > > > > Here is a diff. Maybe bluhm@ can try t

Re: netstart(8): remove sed

2022-11-23 Thread Theo de Raadt
Klemens Nanni wrote: > 449 mount -s /var >/dev/null 2>&1 # cannot be on NFS > 450 mount -s /var/log >/dev/null 2>&1 # cannot be on NFS > 451 mount -s /usr >/dev/null 2>&1 # if NFS, fstab must use IP > address > 452 > 453 start_daemon slaacd dhcpleased resolvd

Re: Get rid of UVM_VNODE_CANPERSIST

2022-11-23 Thread Mark Kettenis
> Date: Wed, 23 Nov 2022 10:52:32 +0100 > From: Martin Pieuchot > > On 22/11/22(Tue) 23:40, Mark Kettenis wrote: > > > Date: Tue, 22 Nov 2022 17:47:44 + > > > From: Miod Vallat > > > > > > > Here is a diff. Maybe bluhm@ can try this on the macppc machine that > > > > triggered the original

Re: Let nd6_if{at,de}tach() be void and take an ifp argument

2022-11-23 Thread Vitaliy Makkoveev
On Wed, Nov 23, 2022 at 02:54:08PM +, Klemens Nanni wrote: > Do it like the rest of at/detach routines which modify a struct ifnet > pointer without returning anything. > > OK? > ok mvs@ > diff --git a/sys/net/if.c b/sys/net/if.c > index c30d7e30e4f..3cb8bbf9176 100644 > --- a/sys/net/if.c

Re: Inline useless ND_IFINFO() macro

2022-11-23 Thread Vitaliy Makkoveev
On Wed, Nov 23, 2022 at 02:56:27PM +, Klemens Nanni wrote: > A single cast-free struct pointer dereference needs no indirection. > ND_IFINFO() is under _KERNEL. > > OK? > ok mvs@ > diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c > index 1924c36c813..d6ccfd3a272 100644 > --- a/sys/netin

Inline useless ND_IFINFO() macro

2022-11-23 Thread Klemens Nanni
A single cast-free struct pointer dereference needs no indirection. ND_IFINFO() is under _KERNEL. OK? diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 1924c36c813..d6ccfd3a272 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -367,7 +367,7 @@ nd6_llinfo_timer(struct rtentry *r

Let nd6_if{at,de}tach() be void and take an ifp argument

2022-11-23 Thread Klemens Nanni
Do it like the rest of at/detach routines which modify a struct ifnet pointer without returning anything. OK? diff --git a/sys/net/if.c b/sys/net/if.c index c30d7e30e4f..3cb8bbf9176 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -460,7 +460,7 @@ if_attachsetup(struct ifnet *ifp) if_addgr

Re: ospf6d and loopback interface hellotimer

2022-11-23 Thread Wouter Prins
Hello Klemens, Thanks for the curiosity, effort and the patch :), i have just applied the patches and it works: dev$ doas ospf6ctl show interface Interface Address State HelloTimer Linkstate Uptime lo1 2001:db8::1 LOOP - unknown00

Re: netstart(8): remove sed

2022-11-23 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 11:35:32AM +0100, Martijn van Duren wrote: > On Wed, 2022-11-23 at 10:03 +, Klemens Nanni wrote: > > On Wed, Nov 23, 2022 at 10:48:22AM +0100, Martijn van Duren wrote: > > > On Wed, 2022-11-23 at 09:25 +, Klemens Nanni wrote: > > > > On Wed, Nov 23, 2022 at 10:15:20A

Re: Remove unused struct ifnet's *if_afdata[] and struct domain's dom_if{at,de}tach()

2022-11-23 Thread Claudio Jeker
On Wed, Nov 23, 2022 at 01:20:43PM +0100, Alexander Bluhm wrote: > On Wed, Nov 23, 2022 at 11:09:31AM +, Klemens Nanni wrote: > > Feedback? Objection? OK? > > OK bluhm@ Also OK claudio@ on this and the other diff. > > diff --git a/regress/sys/net/rtable/util.c b/regress/sys/net/rtable/util.

Re: ospf6d and loopback interface hellotimer

2022-11-23 Thread Klemens Nanni
On Sat, Nov 19, 2022 at 01:40:14PM +, Wouter Prins wrote: > hello, > > Using OpenBSD 7.2 (and previous versions), i noticed when running > ospf6d on a loopback interface, the output of 'doas ospf6ctl show > interface' HelloTimer field contains a weird value: > > dev$ doas ospf6ctl show interf

Re: Push kernel lock into in6_ioctl()

2022-11-23 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 03:39:54PM +0300, Vitaliy Makkoveev wrote: > On Wed, Nov 23, 2022 at 08:46:41AM +, Klemens Nanni wrote: > > Mechanical move that "unlocks" the errno(2) cases. > > > > This is another step towards more read-only interface ioctls running > > with the shared net lock alone

Re: Remove unused struct ifnet's *if_afdata[] and struct domain's dom_if{at,de}tach()

2022-11-23 Thread Vitaliy Makkoveev
On Wed, Nov 23, 2022 at 11:09:31AM +, Klemens Nanni wrote: > On Wed, Nov 23, 2022 at 11:04:55AM +, Klemens Nanni wrote: > > > I don't mind them to be two commits but please share both of them at the > > > same time. Because they should hit the tree at the same time. Changing > > > header fi

Re: Push kernel lock into in6_ioctl()

2022-11-23 Thread Vitaliy Makkoveev
On Wed, Nov 23, 2022 at 08:46:41AM +, Klemens Nanni wrote: > Mechanical move that "unlocks" the errno(2) cases. > > This is another step towards more read-only interface ioctls running > with the shared net lock alone. > > Feedback? OK? > Could this be merged with the following non "Mec

Re: Remove unused struct ifnet's *if_afdata[] and struct domain's dom_if{at,de}tach()

2022-11-23 Thread Alexander Bluhm
On Wed, Nov 23, 2022 at 11:09:31AM +, Klemens Nanni wrote: > Feedback? Objection? OK? OK bluhm@ > diff --git a/regress/sys/net/rtable/util.c b/regress/sys/net/rtable/util.c > index f2c770f936f..abf9b318d7c 100644 > --- a/regress/sys/net/rtable/util.c > +++ b/regress/sys/net/rtable/util.c > @@

Re: Add *if_nd to struct ifnet, call nd6_if{at,de}tach() directly

2022-11-23 Thread Alexander Bluhm
On Wed, Nov 23, 2022 at 11:04:55AM +, Klemens Nanni wrote: > Feedback? Objection? OK? OK bluhm@ > diff --git a/sys/net/if.c b/sys/net/if.c > index f3fba33de3f..a540f564887 100644 > --- a/sys/net/if.c > +++ b/sys/net/if.c > @@ -461,6 +461,10 @@ if_attachsetup(struct ifnet *ifp) > if_addg

Remove unused struct ifnet's *if_afdata[] and struct domain's dom_if{at,de}tach()

2022-11-23 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 11:04:55AM +, Klemens Nanni wrote: > > I don't mind them to be two commits but please share both of them at the > > same time. Because they should hit the tree at the same time. Changing > > header files like net/if_var.h comes at a cost so don't let people suffer > > tw

Re: Add *if_nd to struct ifnet, call nd6_if{at,de}tach() directly

2022-11-23 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 11:40:15AM +0100, Claudio Jeker wrote: > While I agree, I think bad code should not be copied. It makes the code > not more complex makes the diff shorter and is quite obvious. > Lets do this right. New *if_nd diff without spl dance below. > I don't mind them to be two c

Re: Add *if_nd to struct ifnet, call nd6_if{at,de}tach() directly

2022-11-23 Thread Claudio Jeker
On Wed, Nov 23, 2022 at 09:06:55AM +, Klemens Nanni wrote: > On Wed, Nov 23, 2022 at 09:49:17AM +0100, Claudio Jeker wrote: > > On Wed, Nov 23, 2022 at 08:24:11AM +, Klemens Nanni wrote: > > > *if_afdata[] and struct domain's dom_if{at,de}tach() are only used with > > > IPv6 Neighbour Disco

Re: netstart(8): remove sed

2022-11-23 Thread Martijn van Duren
On Wed, 2022-11-23 at 10:03 +, Klemens Nanni wrote: > On Wed, Nov 23, 2022 at 10:48:22AM +0100, Martijn van Duren wrote: > > On Wed, 2022-11-23 at 09:25 +, Klemens Nanni wrote: > > > On Wed, Nov 23, 2022 at 10:15:20AM +0100, Martijn van Duren wrote: > > > > Here's an attempt to remove sed f

Re: netstart(8): remove sed

2022-11-23 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 10:48:22AM +0100, Martijn van Duren wrote: > On Wed, 2022-11-23 at 09:25 +, Klemens Nanni wrote: > > On Wed, Nov 23, 2022 at 10:15:20AM +0100, Martijn van Duren wrote: > > > Here's an attempt to remove sed from netstart. > > > > I don't see the point in this. > > On Mo

Re: Get rid of UVM_VNODE_CANPERSIST

2022-11-23 Thread Martin Pieuchot
On 22/11/22(Tue) 23:40, Mark Kettenis wrote: > > Date: Tue, 22 Nov 2022 17:47:44 + > > From: Miod Vallat > > > > > Here is a diff. Maybe bluhm@ can try this on the macppc machine that > > > triggered the original "vref used where vget required" problem? > > > > On a similar machine it panic

Re: netstart(8): remove sed

2022-11-23 Thread Martijn van Duren
On Wed, 2022-11-23 at 09:25 +, Klemens Nanni wrote: > On Wed, Nov 23, 2022 at 10:15:20AM +0100, Martijn van Duren wrote: > > Here's an attempt to remove sed from netstart. > > I don't see the point in this. On Mon, 2022-11-21 at 20:42 -0700, Theo de Raadt wrote: > Oh, except that using grep,

Re: netstart(8): remove sed

2022-11-23 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 10:15:20AM +0100, Martijn van Duren wrote: > Here's an attempt to remove sed from netstart. I don't see the point in this. > Since we use sed in a > simple string replacement without any fancy regex stuff I think we can > relatively easy use something based on shell built-

netstart(8): remove sed

2022-11-23 Thread Martijn van Duren
Here's an attempt to remove sed from netstart. Since we use sed in a simple string replacement without any fancy regex stuff I think we can relatively easy use something based on shell built-ins. Risk of the current code is that if someone places search inside replacement we get an infinite loop,

Re: Add *if_nd to struct ifnet, call nd6_if{at,de}tach() directly

2022-11-23 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 09:49:17AM +0100, Claudio Jeker wrote: > On Wed, Nov 23, 2022 at 08:24:11AM +, Klemens Nanni wrote: > > *if_afdata[] and struct domain's dom_if{at,de}tach() are only used with > > IPv6 Neighbour Discovery in6_dom{at,de}tach(), which allocate/init and > > free single stru

Re: Add *if_nd to struct ifnet, call nd6_if{at,de}tach() directly

2022-11-23 Thread Claudio Jeker
On Wed, Nov 23, 2022 at 08:24:11AM +, Klemens Nanni wrote: > *if_afdata[] and struct domain's dom_if{at,de}tach() are only used with > IPv6 Neighbour Discovery in6_dom{at,de}tach(), which allocate/init and > free single struct nd_ifinfo. > > Set up a new ND-specific *if_nd member directly to a

Push kernel lock into in6_ioctl()

2022-11-23 Thread Klemens Nanni
Mechanical move that "unlocks" the errno(2) cases. This is another step towards more read-only interface ioctls running with the shared net lock alone. Feedback? OK? diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 3fe9386f8af..47a381a1065 100644 --- a/sys/netinet6/in6.c +++ b/sys/

Add *if_nd to struct ifnet, call nd6_if{at,de}tach() directly

2022-11-23 Thread Klemens Nanni
*if_afdata[] and struct domain's dom_if{at,de}tach() are only used with IPv6 Neighbour Discovery in6_dom{at,de}tach(), which allocate/init and free single struct nd_ifinfo. Set up a new ND-specific *if_nd member directly to avoid yet another layer of indirection and thus make the generic domain AP