Re: hostname.if(5): lladdr tweaks

2022-12-14 Thread Jason McIntyre
On Thu, Dec 15, 2022 at 05:19:14AM +, Klemens Nanni wrote: > On Wed, Dec 14, 2022 at 04:27:37PM -0800, Andrew Hewus Fresh wrote: > > On Mon, Dec 12, 2022 at 06:48:36AM +, Jason McIntyre wrote: > > > On Fri, Dec 09, 2022 at 09:32:13PM +, Jason McIntyre wrote: > > > > hi. > > > > > > >

Re: Switch priority of hostname.if lladdr over name

2022-12-14 Thread Klemens Nanni
On Sun, Dec 11, 2022 at 01:05:13PM -0800, Andrew Hewus Fresh wrote: > This would be the diff to swap priority of name/lladdr as some folks > wanted to see. I still don't recommend having both as you can still > have surprising outcomes with more complex configurations. > > The install.sub

Re: Switch priority of hostname.if lladdr over name

2022-12-14 Thread Klemens Nanni
On Tue, Dec 13, 2022 at 09:16:16AM -0700, Theo de Raadt wrote: > My gut feeling is that hostname.laddr should be given priority over > hostname.if, because it is a more precise and enduring match. I agree. Reading the following in the manual diff striked me as counter-intuitive for this very

Re: hostname.if(5): lladdr tweaks

2022-12-14 Thread Klemens Nanni
On Wed, Dec 14, 2022 at 04:27:37PM -0800, Andrew Hewus Fresh wrote: > On Mon, Dec 12, 2022 at 06:48:36AM +, Jason McIntyre wrote: > > On Fri, Dec 09, 2022 at 09:32:13PM +, Jason McIntyre wrote: > > > hi. > > > > > > two points about the recent ability to use lladdr: > > > > > > - the

Re: netstart: do not try to create physical interfaces

2022-12-14 Thread Andrew Hewus Fresh
OK afresh1@, I would have to dig for a device to actually test it with, but my reading of the code makes me think it's correct. I do wonder if moving the ifcreate logic into vifscreate would allow for a friendlier message from `-n`. (untested diff follows, also missing the deletion of ifcreate)

Re: settimeofday(2): validate input time immediately after copyin(9)

2022-12-14 Thread Theo de Raadt
I don't agree. While the 2nd parameter is basically a dud, there is still an order of erroring reporting here, and you are changing that order. Right now it tests for the EFAULT conditions on both parameters. You change the order into EFAULT, EINVAL, EFAULT, etc. Right now, it clusters the

settimeofday(2): validate input time immediately after copyin(9)

2022-12-14 Thread Scott Cheloha
Unless there's a good reason to wait, we ought to validate the input as soon as we have it. There is no reason to wait to validate the input time in this context. ok? Index: kern_time.c === RCS file: /cvs/src/sys/kern/kern_time.c,v

Re: hostname.if(5): lladdr tweaks

2022-12-14 Thread Andrew Hewus Fresh
On Mon, Dec 12, 2022 at 06:48:36AM +, Jason McIntyre wrote: > On Fri, Dec 09, 2022 at 09:32:13PM +, Jason McIntyre wrote: > > hi. > > > > two points about the recent ability to use lladdr: > > > > - the example of "bridge0" made sense when bridge was regarded as a > > separate entity

Re: sxitimer(4): switch to clockintr

2022-12-14 Thread Scott Cheloha
On Wed, Dec 14, 2022 at 11:45:31PM +0100, Mark Kettenis wrote: > > Date: Fri, 9 Dec 2022 11:28:43 -0600 > > From: Scott Cheloha > > > > sxitimer(4) is the fourth and final armv7 clock interrupt driver that > > needs to switch to clockintr. > > > > - Remove everything related to STATTIMER. We

constify ether_sprintf and a few globals

2022-12-14 Thread David Hill
Hello - This constify's ether_sprintf and some globals and adjusts the users accordingly. Feel free to commit if OK. Index: dev/ic/if_wi_hostap.c === RCS file: /cvs/src/sys/dev/ic/if_wi_hostap.c,v retrieving revision 1.52 diff -u

Re: sxitimer(4): switch to clockintr

2022-12-14 Thread Mark Kettenis
> Date: Fri, 9 Dec 2022 11:28:43 -0600 > From: Scott Cheloha > > sxitimer(4) is the fourth and final armv7 clock interrupt driver that > needs to switch to clockintr. > > - Remove everything related to STATTIMER. We can multiplex TICKTIMER > to handle all clock interrupt events. > - Remove

Re: games: add dots and boxes game

2022-12-14 Thread Theo de Raadt
Marc Espie wrote: > Do we actually have any tty in wide use that doesn't accept > ANSI color sequences these days ? Are you proposing that terminfo get replaced by ANSI only support? > It's nice to be pedantic about it, but be real, the world > of actual VT220 and other Wyse thingies is long

Re: games: add dots and boxes game

2022-12-14 Thread Marc Espie
On Tue, Dec 13, 2022 at 02:29:22PM +, Stuart Henderson wrote: > On 2022/12/13 14:27, Stuart Henderson wrote: > > On 2022/12/13 14:13, Janne Johansson wrote: > > > Den tis 13 dec. 2022 kl 14:11 skrev Alireza Arzehgar > > > : > > > > I implemented an interesting game. I thought this game is cool

Re: dmtimer(4): switch to clockintr

2022-12-14 Thread Scott Cheloha
On Fri, Dec 09, 2022 at 11:26:33AM -0600, Scott Cheloha wrote: > On Fri, Dec 09, 2022 at 06:03:38PM +0100, Mark Kettenis wrote: > > > Date: Fri, 9 Dec 2022 10:32:26 -0600 > > > From: Scott Cheloha > > > > > > dmtimer(4) is a third armv7 clock interrupt driver that needs to > > > switch to

Re: rpki-client much improved stats and openmetric support

2022-12-14 Thread Theo Buehler
> > > > + io_read_buf(b, , sizeof(id)); > > > > + rp = repo_byid(id); > > > > > > Can we assert(rp != NULL) here or should we error? For example, the > > > repo_id() call in roa_insert_vrps() could result in a crash otherwise. > > > > I added an assert and added an if (rp != NULL)

Re: vmd(8): create a proper e820 bios memory map

2022-12-14 Thread Mischa
On 2022-12-14 14:57, Dave Voutila wrote: Mischa writes: On 2022-12-13 20:29, Dave Voutila wrote: Dave Voutila writes: tech@, The below diff tweaks how vmd and vmm define memory ranges (adding a "type" attribute) so we can properly build an e820 memory map to hand to things like SeaBIOS or

Re: rpki-client much improved stats and openmetric support

2022-12-14 Thread Claudio Jeker
On Wed, Dec 14, 2022 at 06:40:19PM +0100, Claudio Jeker wrote: > On Wed, Dec 14, 2022 at 05:54:54PM +0100, Theo Buehler wrote: > > On Wed, Dec 14, 2022 at 12:14:55PM +0100, Claudio Jeker wrote: > > > This diff adds per repository statistics, tracks a few more bits like how > > > long it took to

Re: rpki-client much improved stats and openmetric support

2022-12-14 Thread Theo Buehler
I'm ok with landing your second version. ok tb

Re: rpki-client much improved stats and openmetric support

2022-12-14 Thread Claudio Jeker
On Wed, Dec 14, 2022 at 05:54:54PM +0100, Theo Buehler wrote: > On Wed, Dec 14, 2022 at 12:14:55PM +0100, Claudio Jeker wrote: > > This diff adds per repository statistics, tracks a few more bits like how > > long it took to sync a repo and finally adds a new openmetrics output. > > The ometric

Re: rpki-client much improved stats and openmetric support

2022-12-14 Thread Theo Buehler
On Wed, Dec 14, 2022 at 12:14:55PM +0100, Claudio Jeker wrote: > This diff adds per repository statistics, tracks a few more bits like how > long it took to sync a repo and finally adds a new openmetrics output. > The ometric code is from bgpctl but currently has two hacks in to display > the info

Re: bgpd: no need to check capa.mp for each prefix

2022-12-14 Thread Theo Buehler
On Wed, Dec 14, 2022 at 03:02:48PM +0100, Claudio Jeker wrote: > From my ASPA tree. > > In rde_update_dispatch() the MP capability check for IPv4 is done for > every prefix again instead of once for withdraws and once for updates. > In the real MP case this is not an issue since the code does not

OpenBSD Errata: December 14, 2022 (xserver vmd gpuinv)

2022-12-14 Thread Alexander Bluhm
Errata patches for Xorg(1), vmd(8), and inteldrm(4) have been released for OpenBSD 7.2. Errata patches for Xorg(1) and inteldrm(4) have been released for OpenBSD 7.1. Binary updates for the amd64, i386 and arm64 platform are available via the syspatch utility. Source code patches can be found

bgpd: no need to check capa.mp for each prefix

2022-12-14 Thread Claudio Jeker
>From my ASPA tree. In rde_update_dispatch() the MP capability check for IPv4 is done for every prefix again instead of once for withdraws and once for updates. In the real MP case this is not an issue since the code does not loop on that level. Move the extra check into its own if block. This

Re: vmd(8): create a proper e820 bios memory map

2022-12-14 Thread Dave Voutila
Mischa writes: > On 2022-12-13 20:29, Dave Voutila wrote: >> Dave Voutila writes: >> >>> tech@, >>> The below diff tweaks how vmd and vmm define memory ranges (adding >>> a >>> "type" attribute) so we can properly build an e820 memory map to >>> hand to >>> things like SeaBIOS or the OpenBSD

Re: bgpd: inline a few functions for convenience

2022-12-14 Thread Theo Buehler
On Wed, Dec 14, 2022 at 12:43:26PM +0100, Claudio Jeker wrote: > This helps me in regress for the new ASAP unittest. > I think making these accessors static inline makes sense here. ok I would use parens after return for all or none of them. rde.h isn't super consistent about this - it uses them

bgpd: inline a few functions for convenience

2022-12-14 Thread Claudio Jeker
This helps me in regress for the new ASAP unittest. I think making these accessors static inline makes sense here. -- :wq Claudio Index: rde.h === RCS file: /cvs/src/usr.sbin/bgpd/rde.h,v retrieving revision 1.273 diff -u -p

rpki-client much improved stats and openmetric support

2022-12-14 Thread Claudio Jeker
This diff adds per repository statistics, tracks a few more bits like how long it took to sync a repo and finally adds a new openmetrics output. The ometric code is from bgpctl but currently has two hacks in to display the info and stateset types as gauge because node_exporter is unable to

acme-client: don't leak ECDSA_SIG

2022-12-14 Thread Theo Buehler
Noticed while looking for the buffer overwrite mentioned on bugs. ec_sig is allocated by d2i_ECDSA_SIG() and needs to be freed. PS: There are a few things that should be cleaned up and fixed in this file. I'll send a diff after the overwrite is resolved. Index: acctproc.c

Re: vmd(8): create a proper e820 bios memory map

2022-12-14 Thread Mischa
On 2022-12-13 20:29, Dave Voutila wrote: Dave Voutila writes: tech@, The below diff tweaks how vmd and vmm define memory ranges (adding a "type" attribute) so we can properly build an e820 memory map to hand to things like SeaBIOS or the OpenBSD ramdisk kernel (when direct booting bsd.rd).

Re: rpki-client: small io optimization

2022-12-14 Thread Theo Buehler
On Wed, Dec 14, 2022 at 10:40:47AM +0100, Claudio Jeker wrote: > rpki-client IO buffers start with a small header (the size of the full > message) followed by the payload. io_buf_read() currently does this in > two steps. Because of this simple messages require two calls through the > event loop

Re: rpki-client use CLOCK_MONOTONIC for runtime calculation

2022-12-14 Thread Theo Buehler
On Wed, Dec 14, 2022 at 09:25:03AM +0100, Claudio Jeker wrote: > Use clock_gettime(CLOCK_MONOTONIC) to calculate the runtime of > rpki-client. While there switch all timevals in the stats struct to > timespecs in preparation for openmetric support. > I also resorted the headers and added the

rpki-client: small io optimization

2022-12-14 Thread Claudio Jeker
rpki-client IO buffers start with a small header (the size of the full message) followed by the payload. io_buf_read() currently does this in two steps. Because of this simple messages require two calls through the event loop and poll(2) for one message. By retrying the read after parsing the

Re: rpki-client use CLOCK_MONOTONIC for runtime calculation

2022-12-14 Thread Theo Buehler
On Wed, Dec 14, 2022 at 09:25:03AM +0100, Claudio Jeker wrote: > Use clock_gettime(CLOCK_MONOTONIC) to calculate the runtime of > rpki-client. While there switch all timevals in the stats struct to > timespecs in preparation for openmetric support. > I also resorted the headers and added the

rpki-client use CLOCK_MONOTONIC for runtime calculation

2022-12-14 Thread Claudio Jeker
Use clock_gettime(CLOCK_MONOTONIC) to calculate the runtime of rpki-client. While there switch all timevals in the stats struct to timespecs in preparation for openmetric support. I also resorted the headers and added the missing time headers. -- :wq Claudio Index: extern.h