Re: relayd.conf.5: less SSL

2023-10-26 Thread Klemens Nanni
On Tue, Oct 24, 2023 at 09:09:21AM +0200, Peter N. M. Hansteen wrote: > On Tue, Oct 24, 2023 at 06:54:30AM +0000, Klemens Nanni wrote: > > - parse.y still accepting undocumented "ssl" with a warning since 2014 > > - more "SSL/TLS" instead of "TLS" in m

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-25 Thread Klemens Nanni
10/24/23 14:03, Crystal Kolipe пишет: > On Tue, Oct 24, 2023 at 01:44:08AM +0000, Klemens Nanni wrote: >> Rereading the code, I now question why it checks the 'a' label type at all. >> >> Taking your sd0d example through devboot(): >> >> |#ifdef S

relayd.conf.5: less SSL

2023-10-23 Thread Klemens Nanni
Wanted to learn about TLS usage in relayd(8) and thought these SSL history bits in the TLS RELAYS section read out of place. Index: relayd.conf.5 === RCS file: /cvs/src/usr.sbin/relayd/relayd.conf.5,v retrieving revision 1.206 diff -u

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-23 Thread Klemens Nanni
On Mon, Oct 23, 2023 at 06:36:21PM -0300, Crystal Kolipe wrote: > On Mon, Oct 23, 2023 at 11:04:07AM +0000, Klemens Nanni wrote: > > 10/16/23 04:02, Klemens Nanni ??: > > > The current check implies one could use, e.g. SWAP or MSDOS partitions > > > as soft

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-23 Thread Klemens Nanni
10/16/23 04:02, Klemens Nanni пишет: > The current check implies one could use, e.g. SWAP or MSDOS partitions > as softraid(4) chunks, but sys/dev/softraid.c always expects FS_RAID, > thus using chunks with different partition types is not possible: > > # vmctl create

Re: installer: support encryption with key disks

2023-10-16 Thread Klemens Nanni
On Mon, Sep 04, 2023 at 09:57:40PM +, Klemens Nanni wrote: > Extend the yes/no question to no/passphrase/keydisk and have users pick an > existing, preformated RAID partition; no support (yet) for creating one. > > Thanks to how ask_which() works, users can always say 'd

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-15 Thread Klemens Nanni
On Mon, Oct 16, 2023 at 01:02:07AM +, Klemens Nanni wrote: > The current check implies one could use, e.g. SWAP or MSDOS partitions > as softraid(4) chunks, but sys/dev/softraid.c always expects FS_RAID, > thus using chunks with different partition types is not possible: > >

boot loaders: softraid volumes must be on RAID partitions

2023-10-15 Thread Klemens Nanni
The current check implies one could use, e.g. SWAP or MSDOS partitions as softraid(4) chunks, but sys/dev/softraid.c always expects FS_RAID, thus using chunks with different partition types is not possible: # vmctl create -s100M disk.img # vnd=`vnconfig disk.img` # echo 'sw

Re: vmd testers: serial console hangs fix

2023-10-15 Thread Klemens Nanni
On Sun, Oct 15, 2023 at 07:51:00AM -0400, Dave Voutila wrote: > > Dave Voutila writes: > > > Looking for folks that use the serial console connection in vmd(8) and > > experience the host CPU spikes & delays associated with things like > > hitting the up key (to cycle shell command history) or c

Re: prevent re-upgrade in powerpc64 boot loader

2023-10-08 Thread Klemens Nanni
9/23/23 14:11, Mark Kettenis пишет: >> Date: Thu, 21 Sep 2023 22:30:01 + >> From: Klemens Nanni >> >> In comparison to MI boot which only cares about /bsd.upgrade's x bit, >> powerpc64 rdboot just wants a regular file. >> >> Require and strip u+x

Re: gzip: fix pledge violation

2023-10-08 Thread Klemens Nanni
On Sun, Oct 08, 2023 at 12:18:34AM -0400, George Koehler wrote: > On Fri, 8 Jul 2022 16:04:47 + > Guilherme Janczak wrote: > > > gzip violates wpath if you tell it to extract stdin and restore the > > original filename. > > More than a year ago, Guilherme Janczak reported that OpenBSD's > "g

bioctl: expect non-empty passphrase

2023-10-06 Thread Klemens Nanni
[this change was lost between others and private mails...] Passphrases must not be empty or else volume creation/unlock fails: # bioctl -cC -lvnd0a softraid0 New passphrase: Re-type passphrase: bioctl: bcrypt_pbkdf failed [-p passfile] already says "invalid pass

Re: [patch] [arm64] cpu.c patch based on amd64 idea, provides more debug for multicore kernel

2023-10-04 Thread Klemens Nanni
On Mon, Sep 25, 2023 at 01:33:31PM +, Klemens Nanni wrote: > On Tue, Jul 25, 2023 at 01:30:43PM +0300, Slava Voronzoff wrote: > > Hi, pinging and refreshing this patch > > > > What it does: > > allow arm64 cpus to break from the loop of waiting to start cor

Re: sysupgrade: omit default sets answer

2023-09-29 Thread Klemens Nanni
On Fri, Sep 29, 2023 at 05:28:46PM +0200, Florian Obser wrote: > On 2023-09-29 14:41 UTC, Klemens Nanni wrote: > > The response file contains only to non-defaults, except for > > Set name(s)? (or 'abort' or 'done') [done] done > > >

sysupgrade: omit default sets answer

2023-09-29 Thread Klemens Nanni
The response file contains only to non-defaults, except for Set name(s)? (or 'abort' or 'done') [done] done which is the hardcoded default since 2009: ask "Set name(s)? (or 'abort' or 'done')" done We pass it since r1.23 in 2019 Let sysupgrade(8) create auto_upgrade.co

Re: [patch] [arm64] cpu.c patch based on amd64 idea, provides more debug for multicore kernel

2023-09-25 Thread Klemens Nanni
On Tue, Jul 25, 2023 at 01:30:43PM +0300, Slava Voronzoff wrote: > Hi, pinging and refreshing this patch > > What it does: > allow arm64 cpus to break from the loop of waiting to start core and > drop to DDB or OS. > > Patch based on same concept in amd64 cpu.c > > Any suggestions? Good to go?

Re: prevent re-upgrade in powerpc64 boot loader

2023-09-25 Thread Klemens Nanni
On Mon, Sep 25, 2023 at 05:35:40AM +, Visa Hankala wrote: > On Sat, Sep 23, 2023 at 02:26:18PM +0000, Klemens Nanni wrote: > > On Sat, Sep 23, 2023 at 01:11:32PM +0200, Mark Kettenis wrote: > > > > Date: Thu, 21 Sep 2023 22:30:01 + > > > > From: K

Re: powerpc64 BOOT kernel question

2023-09-23 Thread Klemens Nanni
On Sat, Sep 23, 2023 at 09:55:03AM -0600, Theo de Raadt wrote: > Mark Kettenis wrote: > > > > Date: Fri, 22 Sep 2023 23:19:30 +0000 > > > From: Klemens Nanni > > > > > > Does the tiny kexec kernel actually need network, bio(4) or HID devices? &

Re: prevent re-upgrade in powerpc64 boot loader

2023-09-23 Thread Klemens Nanni
On Sat, Sep 23, 2023 at 01:11:32PM +0200, Mark Kettenis wrote: > > Date: Thu, 21 Sep 2023 22:30:01 + > > From: Klemens Nanni > > > > In comparison to MI boot which only cares about /bsd.upgrade's x bit, > > powerpc64 rdboot just wants a regular file. &g

powerpc64 BOOT kernel question

2023-09-22 Thread Klemens Nanni
Does the tiny kexec kernel actually need network, bio(4) or HID devices? octeon/BOOT does not have any of this. Looks like too much of powerpc64/RAMDISK remained, but I might be missing some obvious difference between these platforms. The Raptor CS Blackbird used for the re-upgrade prevention dif

prevent re-upgrade in octeon boot loader

2023-09-22 Thread Klemens Nanni
On Thu, Sep 21, 2023 at 10:30:01PM +, Klemens Nanni wrote: > In comparison to MI boot which only cares about /bsd.upgrade's x bit, > powerpc64 rdboot just wants a regular file. > > Require and strip u+x before execution to prevent sysupgrade(8) loop. > I'm new to pow

prevent re-upgrade in powerpc64 boot loader

2023-09-21 Thread Klemens Nanni
In comparison to MI boot which only cares about /bsd.upgrade's x bit, powerpc64 rdboot just wants a regular file. Require and strip u+x before execution to prevent sysupgrade(8) loop. I'm new to powerpc64 and can't think of a reason to be different. Feedback? Objection? OK? Regular boot and sysu

build softraid(4) in powerpc64 RAMDISK

2023-09-19 Thread Klemens Nanni
powerpc64 already has bio(4) and bioctl(8) like macppc, but lacks softriad(4), which looks like an oversight. Neither architecture has boot support, but they still ought to be able to access softraid volumes during install/upgrade. distrib/powerpc64/ramdisk builds and fits; I did not have a free

Re: Use counters_read(9) from ddb(4)

2023-09-06 Thread Klemens Nanni
On Wed, Sep 06, 2023 at 12:23:33PM -0500, Scott Cheloha wrote: > On Wed, Sep 06, 2023 at 01:04:19PM +0100, Martin Pieuchot wrote: > > Debugging OOM is hard. UVM uses per-CPU counters and sadly > > counters_read(9) needs to allocate memory. This is not acceptable in > > ddb(4). As a result I cann

installer: support encryption with key disks

2023-09-04 Thread Klemens Nanni
Extend the yes/no question to no/passphrase/keydisk and have users pick an existing, preformated RAID partition; no support (yet) for creating one. Thanks to how ask_which() works, users can always say 'done' to land back at question to either skip crypto or use a passphrase instead. All code re

Re: installer: disk crypto: crank KDF rounds to hardware based default

2023-08-23 Thread Klemens Nanni
On Fri, Aug 11, 2023 at 03:51:38PM +0100, Stuart Henderson wrote: > On 2023/08/11 16:43, Mark Kettenis wrote: > > See the recent discussion about _bcrypt_autorounds() in libc. > > > > System performance varies, and even on modern hardware it can provide > > varying results. The ramdisk environmen

Re: bioctl: print errors on stderr

2023-08-18 Thread Klemens Nanni
On Fri, Aug 18, 2023 at 04:20:13PM +, Klemens Nanni wrote: > Messages from the driver always land on standard output, but they may > contain errors, which ought to land on standard error. > > Seen when scripted creation silently failed: > > # bioctl -Cforce -cC -lvnd0

bioctl: print errors on stderr

2023-08-18 Thread Klemens Nanni
Messages from the driver always land on standard output, but they may contain errors, which ought to land on standard error. Seen when scripted creation silently failed: # bioctl -Cforce -cC -lvnd0a softraid0 1>/dev/null ; echo $? 1 # ./obj/bioctl -Cforce -cC -lvnd0a softr

Re: bioctl: do not confirm new passphrases on stdin

2023-08-18 Thread Klemens Nanni
On Fri, Aug 18, 2023 at 10:35:37AM +0200, Omar Polo wrote: > sorry for the noise, noticed just now re-reading the diff. > > On 2023/08/17 09:32:43 +, Klemens Nanni wrote: > > --- bioctl.86 Jul 2023 21:08:50 - 1.111 > > +++ bioctl.817 Au

Re: bioctl: do not confirm new passphrases on stdin

2023-08-17 Thread Klemens Nanni
On Thu, Aug 17, 2023 at 06:43:36PM +1000, Joel Sing wrote: > I agree with the intent, however the man page should probably reflect this > change (i.e. -s makes it non-interactive and you will not get confirmation). Done. > > > Index: bioctl.c > > =

Re: bioctl: do not confirm new passphrases on stdin

2023-08-16 Thread Klemens Nanni
On Fri, Aug 11, 2023 at 03:44:46PM +, Klemens Nanni wrote: > On Wed, Aug 02, 2023 at 10:37:36AM +0000, Klemens Nanni wrote: > > Creating new volumes prompts > > Passphrase: > > Re-type passphrase: > > which is sane for interative usage, but -s (which omit

cksum.1: use imperative tense

2023-08-16 Thread Klemens Nanni
Consistent with other options and our manuals in general. Index: cksum.1 === RCS file: /cvs/src/bin/md5/cksum.1,v retrieving revision 1.40 diff -u -p -r1.40 cksum.1 --- cksum.1 4 Aug 2022 06:20:24 - 1.40 +++ cksum.1

Re: installer: proper disk crypto passphrase prompt loop

2023-08-15 Thread Klemens Nanni
On Wed, Aug 02, 2023 at 11:51:09AM +, Klemens Nanni wrote: > An alternative approach could be a new bioctl(8)) flag > -K Keep prompting until new and re-typed passphrases match. > to repeat the prompt (during interactive creation only) until match or ^C: > > #

Re: installer: disk crypto: crank KDF rounds to hardware based default

2023-08-15 Thread Klemens Nanni
On Mon, Aug 14, 2023 at 05:47:35PM +, Lucas wrote: > Klemens Nanni wrote: > > @@ -1117,13 +1117,6 @@ bio_changepass(char *dev) > > > > /* Current passphrase. */ > > bio_kdf_derive(&kdfinfo1, &kdfhint, "Old passphrase: ", 0); > >

Re: installer: disk crypto: crank KDF rounds to hardware based default

2023-08-14 Thread Klemens Nanni
On Fri, Aug 11, 2023 at 05:38:41PM +0200, Mark Kettenis wrote: > > From: "Theo de Raadt" > > I think this case is different, because the ramdisk has no process > > contention. > > > > The code still sticks to minimum 16: > > > > if (r < 16) > > r = 16; > > > > On faster

Re: httpd server "default" is not what I expected

2023-08-13 Thread Klemens Nanni
13.08.2023 12:13, Omar Polo пишет: > [moving to tech@, there's a diff for the manpage below] > > On 2023/08/13 01:04:11 -0700, Alfred Morgan wrote: >> I was surprised that `server "default"` didn't act like I expected. In this >> example I expected `test1` to get 200 and everything else to get 40

Re: bioctl: do not confirm new passphrases on stdin

2023-08-11 Thread Klemens Nanni
On Wed, Aug 02, 2023 at 10:37:36AM +, Klemens Nanni wrote: > Creating new volumes prompts > Passphrase: > Re-type passphrase: > which is sane for interative usage, but -s (which omits prompts) to read > from stdin also prompts twice. > > I think that&#x

Re: installer: disk crypto: crank KDF rounds to hardware based default

2023-08-11 Thread Klemens Nanni
On Fri, Aug 11, 2023 at 03:51:38PM +0100, Stuart Henderson wrote: > Agreed. (Re bcrypt, I usually completely ignore auto rounds, I had just > forgotten to set that up on the machine where I noticed the problem..) > > Also, am I right in thinking that this only affects the time when > entering the

bioctl: default KDF rounds to hardware based value

2023-08-11 Thread Klemens Nanni
Joel encouraged me to switch to '-r auto' by default sooner than later. The alternative installer diff on tech@ would thus be obsolete/a NOOP. If you do encrypted disk installs on one machine, but use them on another, or you want a specific number of rounds, just use '-r N' during creation or pass

Re: installer: disk crypto: crank KDF rounds to hardware based default

2023-08-11 Thread Klemens Nanni
On Mon, May 08, 2023 at 11:00:27AM +, Klemens Nanni wrote: > On Sun, Apr 23, 2023 at 05:07:30PM +0000, Klemens Nanni wrote: > > For new installs, it seems adequate to base the number on the actual > > hardware, > > assuming the CRYPTO volume will stay in that

Re: installer: proper disk crypto passphrase prompt loop

2023-08-10 Thread Klemens Nanni
On Wed, Aug 02, 2023 at 11:38:57AM +, Klemens Nanni wrote: > This needs "bioctl: do not confirm new passphrases on stdin" on tech@. > > Current code tries thrice to get matching passphrases before aborting; > simple enough to get the feature going, but also due to code

Re: installer: always create new softraid volume

2023-08-10 Thread Klemens Nanni
On Fri, Aug 04, 2023 at 11:45:00AM +, Klemens Nanni wrote: > If the root disk contains a valid CRYPTO volume, bioctl(8) by default > unlocks that instead of creating a new one. > > Use `-C force' to prevent reuse of old volumes, which happens if you, e.g. > restart an en

Re: ldomctl: status: Make stopped ldom utilization appear as zero

2023-08-07 Thread Klemens Nanni
On Sat, Apr 22, 2023 at 12:00:44AM +, Klemens Nanni wrote: > On Fri, Apr 21, 2023 at 11:29:11PM +, Koakuma wrote: > > I noticed that when using `ldomctl status` the utilization value of > > stopped ldoms is always a copy of the previous entry's value, > > w

installer: always create new softraid volume

2023-08-04 Thread Klemens Nanni
If the root disk contains a valid CRYPTO volume, bioctl(8) by default unlocks that instead of creating a new one. Use `-C force' to prevent reuse of old volumes, which happens if you, e.g. restart an encrypted installation past this point or install onto an old disk without wiping it first:

changelist: add xorg.conf

2023-08-02 Thread Klemens Nanni
I had a few important changes in there and drm related crashes whilst editing/testing /etc/X11/xorg.conf did result in that file being empty afer reset and fsck, so a backup would be valuable. xorg.conf(5) lists a various .../xorg.conf and .../conf.d/*.conf files, but the single (default?) path se

Re: installer: proper disk crypto passphrase prompt loop

2023-08-02 Thread Klemens Nanni
On Wed, Aug 02, 2023 at 02:38:57PM +0300, Klemens Nanni wrote: > This needs "bioctl: do not confirm new passphrases on stdin" on tech@. > > Current code tries thrice to get matching passphrases before aborting; > simple enough to get the feature going, but also due to code

installer: proper disk crypto passphrase prompt loop

2023-08-02 Thread Klemens Nanni
This needs "bioctl: do not confirm new passphrases on stdin" on tech@. Current code tries thrice to get matching passphrases before aborting; simple enough to get the feature going, but also due to code limitations. One possible fix is to let the installer (not bioctl) prompt the passphrase like

bioctl: do not confirm new passphrases on stdin

2023-08-02 Thread Klemens Nanni
Creating new volumes prompts Passphrase: Re-type passphrase: which is sane for interative usage, but -s (which omits prompts) to read from stdin also prompts twice. I think that's neither intuitive nor ergonomical and as intended for non-interactive scripts, -s should take a new pa

Re: pf(4) should mention DIOCXEND

2023-07-05 Thread Klemens Nanni
On Wed, Jul 05, 2023 at 11:15:41AM +0200, Alexandr Nedvedicky wrote: > Hello, > > > On Wed, Jul 05, 2023 at 11:10:11AM +0200, Alexandr Nedvedicky wrote: > > > > > thanks for your help to put my update to pf(4) to shape. > > updated diff is below. > > > > diff in my earlier email was wrong

Re: btrace(8) allow to store kstack in a map

2023-06-27 Thread Klemens Nanni
On Tue, Jun 27, 2023 at 03:27:55PM +0200, Claudio Jeker wrote: > On Mon, Jun 26, 2023 at 08:58:47PM +0000, Klemens Nanni wrote: > > On Mon, Jun 26, 2023 at 10:52:20PM +0200, Claudio Jeker wrote: > > > count() is strange since it only works on maps (at least from what I > >

Re: Introduce M_IFGROUP type of memory allocation

2023-06-27 Thread Klemens Nanni
On Tue, Jun 27, 2023 at 01:32:37PM +0300, Vitaliy Makkoveev wrote: > M_TEMP seems unreasonable for interface groups data allocations. After claudio pointed out the wrong type, I thought of the same name, no other malloc(9) type fits. FWIW OK kn, but please wait for other to chime in. > > Don't

Re: btrace(8) allow to store kstack in a map

2023-06-26 Thread Klemens Nanni
On Mon, Jun 26, 2023 at 10:52:20PM +0200, Claudio Jeker wrote: > count() is strange since it only works on maps (at least from what I > figured out). I need to double check how min() and max() work. Since the > usage also seems non-intuitive. > > I find the documentation of bt(5) rather weak. So m

Re: btrace(8) allow to store kstack in a map

2023-06-26 Thread Klemens Nanni
On Mon, Jun 26, 2023 at 05:24:53PM +0200, Claudio Jeker wrote: > I created this simple btrace script to help find malloc(9) leaks but > it did not work. First step was adding kstack support to the map > implementation. But then it still did not work because btrace did not > enable the kstack report

Re: pfioctl: drop net lock from DIOCGETIFACES, DIOC{SET,CLR}IFFLAG

2023-06-08 Thread Klemens Nanni
On Fri, May 26, 2023 at 04:18:45PM +, Klemens Nanni wrote: > On Fri, May 26, 2023 at 05:28:01PM +0300, Vitaliy Makkoveev wrote: > > On Fri, May 26, 2023 at 01:03:13PM +, Klemens Nanni wrote: > > > snmpd(8) and 'pfctl -s Interfaces' dump pf&#

Re: ifconfig description for wireguard peers

2023-05-31 Thread Klemens Nanni
On Wed, May 31, 2023 at 10:27:13AM +0200, Claudio Jeker wrote: > On Tue, May 30, 2023 at 11:56:01PM +0000, Klemens Nanni wrote: > > On Tue, May 23, 2023 at 07:13:28PM +, Klemens Nanni wrote: > > > On Sat, Jan 14, 2023 at 02:28:27PM +, Stuart Henderson wrote: > >

Re: ifconfig description for wireguard peers

2023-05-30 Thread Klemens Nanni
On Tue, May 23, 2023 at 07:13:28PM +, Klemens Nanni wrote: > On Sat, Jan 14, 2023 at 02:28:27PM +, Stuart Henderson wrote: > > On 2023/01/12 04:49, Mikolaj Kucharski wrote: > > > Hi, > > > > > > Is there anything else which I can do, to help this diff r

Re: pfioctl: drop net lock from DIOCGETIFACES, DIOC{SET,CLR}IFFLAG

2023-05-26 Thread Klemens Nanni
On Fri, May 26, 2023 at 05:28:01PM +0300, Vitaliy Makkoveev wrote: > On Fri, May 26, 2023 at 01:03:13PM +0000, Klemens Nanni wrote: > > snmpd(8) and 'pfctl -s Interfaces' dump pf's internal list of interfaces. > > > > pf.conf's 'set skip on ifN

pfioctl: drop net lock from DIOCGETIFACES, DIOC{SET,CLR}IFFLAG

2023-05-26 Thread Klemens Nanni
snmpd(8) and 'pfctl -s Interfaces' dump pf's internal list of interfaces. pf.conf's 'set skip on ifN' and 'pfctl -F all|Reset' set and clear flags, PFI_IFLAG_SKIP being the only flag. (There's no other usage of these ioctls in base.) pf's internal interface list is completely protected by the pf

Re: Virtio fix for testing

2023-05-25 Thread Klemens Nanni
On Wed, May 24, 2023 at 08:50:26PM +0200, Stefan Fritsch wrote: > I forgot to mention that no stress test is necessary. If it boots and the > virtio devices work at all, that should be enough. amd64 bsd.mp keeps working with disks and network interfaces behind VirtIO, no dmesg or behaviour change

installer: simplify yes/no answer handling

2023-05-25 Thread Klemens Nanni
ask_yn() returns 0/1 for no/yes, so almost all users in install.sub use the same 'ask_yn && do-it', 'ask_yn || skip' idioms. Adjust two MD calls accordingly. OK? Index: amd64/common/install.md === RCS file: /cvs/src/distrib/amd64/co

Re: pfioctl: drop net lock from SIOC{S,G}LIMIT

2023-05-25 Thread Klemens Nanni
On Thu, May 25, 2023 at 03:28:45AM +, Klemens Nanni wrote: > On Thu, May 25, 2023 at 03:20:04AM +0000, Klemens Nanni wrote: > > pfsync_in_bus() looks like the only place where the static array > > pf_pool_limits[] is accessed without the pf lock, so grab it there. > >

Re: pfioctl: drop net lock from SIOC{S,G}LIMIT

2023-05-24 Thread Klemens Nanni
On Thu, May 25, 2023 at 03:20:04AM +, Klemens Nanni wrote: > pfsync_in_bus() looks like the only place where the static array > pf_pool_limits[] is accessed without the pf lock, so grab it there. > > Limits themselves are protected by the pf lock and pool(9)s are never > des

pfioctl: drop net lock from SIOC{S,G}LIMIT

2023-05-24 Thread Klemens Nanni
pfsync_in_bus() looks like the only place where the static array pf_pool_limits[] is accessed without the pf lock, so grab it there. Limits themselves are protected by the pf lock and pool(9)s are never destroyed and have builtint per-pool locks, so the net lock is not needed. (pf_pool_limits[] a

Re: Installer: use $(

2023-05-24 Thread Klemens Nanni
24 мая 2023 г. 18:05:29 Todd C. Miller : > On Tue, 23 May 2023 22:22:04 -0000, Klemens Nanni wrote: > >> I'm pointing this out because the error message we'd get provides less >> information with your diff: >> >>     $ echo $(cat /nope) 2>/dev/null &

Re: Installer: use $(

2023-05-23 Thread Klemens Nanni
On Tue, May 23, 2023 at 11:41:32PM +0200, Christian Weisgerber wrote: > This replaces "$(cat file)" with the ksh construct "$( Admittedly cosmetic. Functional behaviour won't change, but stderr handling is subtly different, as you're gladly aware of. > I have left the line > > local _sec

Re: ifconfig description for wireguard peers

2023-05-23 Thread Klemens Nanni
On Sat, Jan 14, 2023 at 02:28:27PM +, Stuart Henderson wrote: > On 2023/01/12 04:49, Mikolaj Kucharski wrote: > > Hi, > > > > Is there anything else which I can do, to help this diff reviwed and > > increase the chance of getting in? > > > > Thread at https://marc.info/?t=16347829861&r=1&

Re: remove net.inet6.ip6.soiikey from userland

2023-05-21 Thread Klemens Nanni
On Sat, May 20, 2023 at 07:47:46PM +0200, Florian Obser wrote: > On 2023-05-20 19:37 +02, Paul de Weerd wrote: > > On Sat, May 20, 2023 at 05:33:11PM +0200, Florian Obser wrote: > > | In case this turns out to be useful for unlocking work in the kernel. > > | > > | It's a minimum diff, if we want

Re: installer: amd64 EFI: default to GPT

2023-05-16 Thread Klemens Nanni
On Tue, May 16, 2023 at 10:07:20AM -0700, Chris Cappuccio wrote: > I don't quite understand the case this patch solves, because my installs to > fresh media always get EFI/GPT. It doesn't default to MBR. However, if > there is a case where it tries to use MBR, that isn't going to work so well. If

Re: cwm: add fvwm and tvm as default wm entries

2023-05-15 Thread Klemens Nanni
On Mon, May 15, 2023 at 09:42:47AM -0400, Bryan Steele wrote: > On Mon, May 15, 2023 at 09:17:00AM -0400, Okan Demirmen wrote: > > On Mon 2023.05.15 at 10:41 +0200, Matthieu Herrb wrote: > > > On Mon, May 15, 2023 at 06:26:41AM +0000, Klemens Nanni wrote: > > > >

cwm: add fvwm and tvm as default wm entries

2023-05-14 Thread Klemens Nanni
Both fvwm(1) and twm(1) have a restart menu that contains other window managers by default, which is useful if you want to switch around without restarting X and/or custom window manager config. cwm(1) only offers to restart into itself by deafult. Add the other two we ship by default so users can

Re: nd6 remove kernel lock

2023-05-12 Thread Klemens Nanni
On Fri, May 12, 2023 at 12:18:12AM +0200, Alexander Bluhm wrote: > Hi, > > I would like to remove the kernel lock from nd6 resolve and use nd6 > mutex instead. > > Access rt_llinfo and check for NULL without checking RTF_LLINFO > flag before. They are changed togehter with the arp or nd6 mutex.

rc.shutdown.8: document stopping vmd(8)

2023-05-10 Thread Klemens Nanni
Came here after reading /etc/rc wrt. the shutdown sequence. Feedback? Index: rc.shutdown.8 === RCS file: /cvs/src/share/man/man8/rc.shutdown.8,v retrieving revision 1.16 diff -u -p -r1.16 rc.shutdown.8 --- rc.shutdown.8 16 May

Re: installer: disk crypto: crank KDF rounds to hardware based default

2023-05-08 Thread Klemens Nanni
On Sun, Apr 23, 2023 at 05:07:30PM +, Klemens Nanni wrote: > For new installs, it seems adequate to base the number on the actual hardware, > assuming the CRYPTO volume will stay in that hardware for a while. > > The current default of 16 is from old PKCS5 PBKDF2 times and ch

Re: nd6 RTM_ADD logic

2023-05-07 Thread Klemens Nanni
On Thu, May 04, 2023 at 08:43:19AM +0200, Alexander Bluhm wrote: > To make ND6 mp-safe, I have to guarantee the life time of ln = > rt->rt_llinfo. This call to nd6_llinfo_settimer(ln) looks strange. It reads like two distinct cases folded into one overly clever block. > The complicated logic can

Re: installer: amd64 EFI: default to GPT

2023-05-07 Thread Klemens Nanni
On Sun, May 07, 2023 at 06:22:55PM +0200, Mark Kettenis wrote: > > Date: Sat, 6 May 2023 22:47:55 + > > From: Klemens Nanni > > > > On Sat, Apr 29, 2023 at 06:47:48PM +, Klemens Nanni wrote: > > > Installing to a wiped disk on EFI machines suggest

Re: installer: amd64 EFI: default to GPT

2023-05-06 Thread Klemens Nanni
On Sat, Apr 29, 2023 at 06:47:48PM +, Klemens Nanni wrote: > Installing to a wiped disk on EFI machines suggests MBR not GPT when chosing > (E)dit because MBR vs. GPT in this manual case is picked based on existing > data on the disk, not whether it has EFI. > > Fix that so us

Re: pfioctl: drop net lock from DIOCOSFP{FLUSH,ADD,GET}

2023-05-06 Thread Klemens Nanni
On Sat, May 06, 2023 at 09:33:05PM +0200, Alexander Bluhm wrote: > On Sat, May 06, 2023 at 11:11:25AM +0000, Klemens Nanni wrote: > > pf_osfp.c contains all the locking for these three ioctls, this removes > > the net lock from it. > > > > All data is protected by the

pfioctl: drop net lock from DIOCOSFP{FLUSH,ADD,GET}

2023-05-06 Thread Klemens Nanni
pf_osfp.c contains all the locking for these three ioctls, this removes the net lock from it. All data is protected by the pf lock, new asserts verify that. Beside the pf ioctl handler, pf_match_rule()'s call to pf_osfp_match() is the only hook into it. tcpbump still compiles pf_osfp.c without o

Re: cron: better error checking of random values

2023-05-05 Thread Klemens Nanni
On Thu, May 04, 2023 at 05:40:10PM -0600, Todd C. Miller wrote: > I'm fairly certain that doesn't do what you think it does. When I > tested it "~/10" behaved the same as "~". The step value is not > even parsed. Oh I see, it is actually picking a random minute and ignores steps, so entries run

Re: cron: better error checking of random values

2023-05-04 Thread Klemens Nanni
On Thu, May 04, 2023 at 03:30:30PM -0600, Todd C. Miller wrote: > This fixes two issues with the parsing of random values: > > 1) A random value with a step is now rejected. For example: > > ~/10* * * * echo invalid I've ben using ~/10 to randomly distribute four similar tasks so that t

Re: nd6 less kernel lock

2023-05-03 Thread Klemens Nanni
On Wed, May 03, 2023 at 12:22:16AM +0200, Alexander Bluhm wrote: > Hi, > > Some checks in nd6_resolve() do not require kernel lock. The analog > code for ARP has been unlocked in if_ether.c revision 1.250 since > 2022/06/27 20:47:10. Same diff here, thought I sent/committed that already. OK kn i

installer: amd64 EFI: default to GPT

2023-04-29 Thread Klemens Nanni
Installing to a wiped disk on EFI machines suggests MBR not GPT when chosing (E)dit because MBR vs. GPT in this manual case is picked based on existing data on the disk, not whether it has EFI. Fix that so users get correct instructions and don't end up with legacy partitioning in fresh installs o

pfioctl: DIOCGETRULESET{,S}: drop net lock

2023-04-29 Thread Klemens Nanni
Both walk the list of rulesets aka. anchors, first one yields a count, second yields a specific's anchor name. Same data access pattern, different copy out, basically. pf_anchor_global are contained within pf_ioctl.c and pf_ruleset.c and fully protected by the pf lock. Same for pf_main_ruleset a

pfioctl: DIOCGETQUEUE: drop net lock

2023-04-28 Thread Klemens Nanni
Same logic and argument as for the parent *S ioctl, might as well have committed them together: --- Remove net lock from DIOCGETQUEUES Both ticket and number of queues stem from the pf_queues_active list which is effectively static to pf_ioctl.c and fully protected by the pf lock.

Re: Remove kernel lock from rtfree(9)

2023-04-27 Thread Klemens Nanni
On Thu, Apr 27, 2023 at 03:22:10PM +0300, Vitaliy Makkoveev wrote: > > On 27 Apr 2023, at 15:16, Alexander Bluhm wrote: > > > > On Wed, Apr 26, 2023 at 11:17:37PM +0300, Vitaliy Makkoveev wrote: > >> Route timers and route labels protected by corresponding mutexes. `ifa' > >> uses references coun

Re: arm64 install.md: fix softraid crypto installation on Mac

2023-04-27 Thread Klemens Nanni
Another approach would be to make installboot(8) -p to retain existing EFI Sys partitions instead of always recreating them. This way, it was nothing to do with softraid, but installing on machines like Apple arm64 depends on existing non-OpenBSD partitions and files on them. We hacked 'installbo

Re: changlist: add apmd(8) hooks

2023-04-27 Thread Klemens Nanni
On Thu, Apr 27, 2023 at 10:53:03AM +, Klemens Nanni wrote: > Would be nice to record changes to critical scripts run on state changes > and have modifications recorded through security(8). > > Feedback? Objection? OK? This gets ugly if you use binary files instead of scripts, so

changlist: add apmd(8) hooks

2023-04-27 Thread Klemens Nanni
Would be nice to record changes to critical scripts run on state changes and have modifications recorded through security(8). Feedback? Objection? OK? Index: changelist === RCS file: /cvs/src/etc/changelist,v retrieving revision 1.13

apmd: zap dead cancel code

2023-04-27 Thread Klemens Nanni
#if 0 since import, APM_CANCEL does not appear anywhere else. OK? Index: apmd.c === RCS file: /cvs/src/usr.sbin/apmd/apmd.c,v retrieving revision 1.111 diff -u -p -r1.111 apmd.c --- apmd.c 8 Mar 2023 04:43:13 - 1.111 +

Re: acpithinkpad: do not report fans running at 65535 rpm

2023-04-26 Thread Klemens Nanni
On Mon, Apr 24, 2023 at 02:07:11PM +, Miod Vallat wrote: > After suspending a machine with acpithinkpad(4) and resuming, the fan > senors report a value of 65535 (i.e. 0x) for a few seconds, and > then start reporting correct values. I don't see these bogus values on an intel t14 gen3 when

Re: arpresolve reduce kernel lock

2023-04-25 Thread Klemens Nanni
On Tue, Apr 25, 2023 at 04:15:49PM +, Klemens Nanni wrote: > A clearer version of this diff would use two new bools `expired' and `reject' > rather than a ternary `reject', but that can be polished and retested later. Or simpler even, use new `expired' and exist

Re: arpresolve reduce kernel lock

2023-04-25 Thread Klemens Nanni
On Tue, Apr 25, 2023 at 11:44:34AM +0200, Alexander Bluhm wrote: > Hi, > > Mutex arp_mtx protects the llinfo_arp la_... fields. So kernel > lock is only needed for changing the route rt_flags. > > Of course there is a race between checking and setting rt_flags. > But the other checks of the RTF

riscv64 RAMDISK: enable softraid

2023-04-25 Thread Klemens Nanni
(Thought I already committed this months ago, noticed now looking into bootloaders again...) GENERIC, efiboot and installboot(8) all have softraid support already, softraid(4) documents boot support for riscv64, "just" the ramdisk kernel lacks it. Still boots fine on the SiFive HiFive Unmatched A

changelist: add tmux.conf

2023-04-24 Thread Klemens Nanni
Would be nice to have a backup of it and track changes. OK? No? Index: changelist === RCS file: /cvs/src/etc/changelist,v retrieving revision 1.135 diff -u -p -r1.135 changelist --- changelist 18 Apr 2023 08:50:37 - 1.135 +

Re: vmd: silence error on missing optional config

2023-04-24 Thread Klemens Nanni
On Mon, Apr 24, 2023 at 01:46:17PM +, Klemens Nanni wrote: > I have on vm.conf, vmd does not need it, but complains: > Apr 23 17:12:50 atar vmd[79320]: failed to open /etc/vm.conf: No such file or > directory > > We've fixed the same for dhcpleased a year ago, port

vmd: silence error on missing optional config

2023-04-24 Thread Klemens Nanni
I have on vm.conf, vmd does not need it, but complains: Apr 23 17:12:50 atar vmd[79320]: failed to open /etc/vm.conf: No such file or directory We've fixed the same for dhcpleased a year ago, port the diff from there. Works for me with good, with bad and without /etc/vm.conf. Feedback? OK? Ind

Re: ps: accept numerical user IDs

2023-04-24 Thread Klemens Nanni
On Sun, Apr 16, 2023 at 01:37:30AM +, Klemens Nanni wrote: > ps(1) -U expects names, top(1) and pgrep(1) -U take numbers as well. > > With the new tree view, I start using 'ps -fU55' more often instead of > 'top -U55' to watch ports builds, but keep doing >

Re: in_ioctl*: hoist identical privilege checks

2023-04-23 Thread Klemens Nanni
On Tue, Apr 18, 2023 at 10:44:36PM +, Klemens Nanni wrote: > On Sat, Apr 15, 2023 at 01:48:02PM +0000, Klemens Nanni wrote: > > On Fri, Apr 14, 2023 at 11:33:18PM +, Klemens Nanni wrote: > > > All cases do the same check up first, so merge it before the switch. > >

installer: disk crypto: crank KDF rounds to hardware based default

2023-04-23 Thread Klemens Nanni
For new installs, it seems adequate to base the number on the actual hardware, assuming the CRYPTO volume will stay in that hardware for a while. The current default of 16 is from old PKCS5 PBKDF2 times and changing it in bioctl(8) is a more invasive change (for later, perhaps). Thoughts? Feedba

Re: ldomctl: status: Make stopped ldom utilization appear as zero

2023-04-21 Thread Klemens Nanni
On Fri, Apr 21, 2023 at 11:29:11PM +, Koakuma wrote: > I noticed that when using `ldomctl status` the utilization value of > stopped ldoms is always a copy of the previous entry's value, > which is probably incorrect? > > Zeroing utilization value in `ldomctl status` at the start of the loop >

  1   2   3   4   5   6   7   8   9   10   >