Re: Questions about the code review process in OpenBSD

2022-11-07 Thread bug
On Mon, Nov 07, 2022 at 03:48:27AM +0100, i...@tutanota.com wrote: > > I'm sorry I cannot communicate any longer with you because you won't> give > > assurances that your company doesn't have really terrible> practices.> > > > Or, maybe you are just speaking dishonestly.I am literally laughing

Re: sysupgrade: apply bsd.re-config(5) to /bsd.upgrade

2022-11-07 Thread Theo Buehler
On Fri, Oct 14, 2022 at 11:38:41AM +, Klemens Nanni wrote: > On Thu, Oct 06, 2022 at 05:22:17PM +, Klemens Nanni wrote: > > On Tue, Sep 06, 2022 at 03:11:45PM +, Klemens Nanni wrote: > > > On rare occasions, I need 'disable xxx' in /etc/bsd.re-config to be able > > > to > > > boot a

Re: ssh-keygen(1): by default generate ed25519 key (instead of rsa)

2022-11-07 Thread Solène Rapenne
Le Sun, 6 Nov 2022 18:41:50 +0400, Loganaden Velvindron a écrit : > On Sun, 6 Nov 2022 at 18:31, Job Snijders wrote: > > > > Dear all, > > > > Support for using Ed25519 for server and user authentication was > > introduced in 2014. I like the compactness of Ed25519 public keys. > > > > Perhaps

Re: Questions about the code review process in OpenBSD

2022-11-07 Thread Peter Nicolai Mathias Hansteen
> 6. nov. 2022 kl. 21:32 skrev i...@tutanota.com: > > I am the sysadmin at our company responsible for the OpenBSD > based projects. When I read about the problems at FreeBSD, after > which I wrote to their list, I was sure that the process was different > in OpenBSD, to which several users on

Update to xterm 375

2022-11-07 Thread Matthieu Herrb
Hi, this xterm update is quite small, but still I'd prefer to get some testing/oks before committing it Apply in /usr/xenocara/app/xterm make obj make build Patch #375 - 2022/10/23 * improve error-recovery when setting a bitmap font for the VT100 window,

Re: update to libpciaccess 0.17

2022-11-07 Thread Theo Buehler
On Mon, Nov 07, 2022 at 12:41:14PM +, Matthieu Herrb wrote: [...] > Fix a small leak in pci_system_openbsd_destroy() while there. Similar leaks exist in pci_system_openbsd_create() which I think should call pci_system_openbsd_destroy() in both early returns instead of duplicating it in the

Re: reorder_kernel: set up syslog traps before logfile

2022-11-07 Thread Theo Buehler
On Sun, Nov 06, 2022 at 07:47:35PM +, Klemens Nanni wrote: > On Mon, Oct 31, 2022 at 11:11:22AM +, Klemens Nanni wrote: > > On Sun, Oct 16, 2022 at 05:22:57AM +, Klemens Nanni wrote: > > > On Sat, Oct 08, 2022 at 07:25:26PM +, Klemens Nanni wrote: > > > > If /usr is mounted

Re: ssh-keygen(1): by default generate ed25519 key (instead of rsa)

2022-11-07 Thread Stuart Henderson
On 2022/11/07 12:02, Solène Rapenne wrote: > Le Sun, 6 Nov 2022 18:41:50 +0400, > Loganaden Velvindron a écrit : > > > On Sun, 6 Nov 2022 at 18:31, Job Snijders wrote: > > > > > > Dear all, > > > > > > Support for using Ed25519 for server and user authentication was > > > introduced in 2014. I

Re: amd64: switch to clockintr(9)

2022-11-07 Thread Mark Kettenis
> Date: Sun, 6 Nov 2022 19:41:25 + > From: Scott Cheloha > > This patch switches amd64 to clockintr(9). So a generic comment on this series of patches: I think we should switch two architectures early on such that we get some broad testing done without creating too much churn if we need to

Re: arm64: switch to clockintr(9)

2022-11-07 Thread Mark Kettenis
> Date: Sun, 6 Nov 2022 19:42:11 + > From: Scott Cheloha > > This patch switches arm64 to clockintr(9). > > This has survived about a dozen parallel kernel builds, parallel > release builds, and bsd.rd upgrades on my RPi4b. > > kettenis@ said he tried it on one of his M1 machines, too. >

reorder_kernel: Use variable and shorter logic for NFS check

2022-11-07 Thread Klemens Nanni
No need to hardcode a parent path if we can reuse an existing variable for the specific path that is in being used. Negate the file system type in df(1) so the `|| exit 1' can be dropped in favour of the errexit option, as is done for all else in there. (I should've proposed it like this back in

Re: sysupgrade: apply bsd.re-config(5) to /bsd.upgrade

2022-11-07 Thread Theo de Raadt
> I'm a bit torn on this one since it is pretty niche, but since this > actually helps you, I am ok with the diff. I worry about unexpected results, which might even be dangerous. The bsd.re-config file is written by people to perform against a GENERIC or GENERIC.MP kernel. It is not written to

Re: ssh-keygen(1): by default generate ed25519 key (instead of rsa)

2022-11-07 Thread Umgeher Torgersen
On Mon, Nov 07, 2022 at 01:45:28AM -0500, A Tammy wrote: > > On 11/6/22 09:29, Job Snijders wrote: > > Dear all, > > > > Support for using Ed25519 for server and user authentication was > > introduced in 2014. I like the compactness of Ed25519 public keys. > > > > Perhaps now is a good time to

Re: ssh-keygen(1): by default generate ed25519 key (instead of rsa)

2022-11-07 Thread Renaud Allard
On 11/6/22 15:29, Job Snijders wrote: Dear all, Support for using Ed25519 for server and user authentication was introduced in 2014. I like the compactness of Ed25519 public keys. Perhaps now is a good time to make Ed25519 the default key type when invoking ssh-keygen(1) without arguments?

Re: Questions about the code review process in OpenBSD

2022-11-07 Thread Stuart Henderson
On 2022/11/04 23:32, i...@tutanota.com wrote: > I am trying to understand how the code review process is conducted in > OpenBSD. I can see all the OK's in the commit log, but not every commit > has the OK. > > On FreeBSD there where a serious problem with a developer who was hired > to by Netgear

update to libpciaccess 0.17

2022-11-07 Thread Matthieu Herrb
Hi again, the patch below updates libpciaccess to version 0.17. Most of the changes are for other operating systems. There is a minor library version bump because a new function pci_device_disable() has been added (not implemented for OpenBSD). Fix a small leak in pci_system_openbsd_destroy()

simplify handling of 'once' rules in pf(4)

2022-11-07 Thread Alexandr Nedvedicky
Hello, diff below simplifies handling of 'once' rules in pf(4). Currently matching packet marks 'once' rule as expired and puts it to garbage collection list, where the rule waits to be removed from its ruleset by timer. diff below simplifies that. matching packet marks once rule as expired and

potential memory leak in bgpd rde_dump_ctx_new

2022-11-07 Thread Moritz Buhl
Hi tech, Dear claudio, ctx might leak due to a prefix/rib dump new/subtree failing in calloc and then going to nomem in rde_dump_ctx_new. I am wondering if a similar fix is missing in rde_dump_done after the nomem label. thoughts? mbuhl Found by CodeChecker. Index: usr.sbin/bgpd/rde.c

Re: rc(8): reorder_libs(): print names of relinked libraries

2022-11-07 Thread Klemens Nanni
On Fri, Jul 29, 2022 at 07:33:50PM -0500, Scott Cheloha wrote: > Recently I've been doing some MIPS64 stuff on my EdgeRouter PoE. It > has a USB disk, two 500MHz processors, and 512MB of RAM. > > So, every time I reboot to test the next iteration of my kernel > patch, I get to here: > >

Re: potential memory leak in bgpd rde_dump_ctx_new

2022-11-07 Thread Claudio Jeker
On Mon, Nov 07, 2022 at 08:36:10PM +0100, Moritz Buhl wrote: > Hi tech, > Dear claudio, > > ctx might leak due to a prefix/rib dump new/subtree failing in calloc > and then going to nomem in rde_dump_ctx_new. > > I am wondering if a similar fix is missing in rde_dump_done after > the nomem

Re: riscv64: switch to clockintr(9)

2022-11-07 Thread Jeremie Courreges-Anglas
On Sun, Nov 06 2022, Scott Cheloha wrote: > This patch switches riscv64 to clockintr(9). > > jca@ has been testing it (on a SiFive board?). It has survived two > parallel release builds and upgrades from the resulting bsd.rd. I still get the same results on my HiFive Unmatched (produced by

Re: update to libpciaccess 0.17

2022-11-07 Thread Matthieu Herrb
On Mon, Nov 07, 2022 at 02:32:44PM +0100, Theo Buehler wrote: > On Mon, Nov 07, 2022 at 12:41:14PM +, Matthieu Herrb wrote: > > [...] > > > Fix a small leak in pci_system_openbsd_destroy() while there. > > Similar leaks exist in pci_system_openbsd_create() which I think should > call

Re: simplify handling of 'once' rules in pf(4)

2022-11-07 Thread Klemens Nanni
On Mon, Nov 07, 2022 at 04:09:44PM +0100, Alexandr Nedvedicky wrote: > Hello, > > resending the same diff, just updated to current. > (pointed out by dlg@) Oh and this needs a pf.conf(5) update: onceCreates a one shot rule that will remove itself from an active ruleset

Re: reorder_kernel: Use variable and shorter logic for NFS check

2022-11-07 Thread Klemens Nanni
On Mon, Nov 07, 2022 at 04:59:31PM +0100, Theo Buehler wrote: > > NB: I was certain that we use a similar skip-if-on-NFS idiom elsewhere > > in our tree, but couldn't find it, so I probably misremember things. > > Do you think of the "Don't kill NFS" check in /etc/rc? No, specifically using

Re: sparc64: switch to clockintr(9)

2022-11-07 Thread Scott Cheloha
On Mon, Nov 07, 2022 at 04:12:06PM +, Miod Vallat wrote: > > This patch switches sparc64 to clockintr(9). > > [...] > > > Testing on the UltraSPARC IIe ("Hummingbird") would also be helpful. > > Apparently it has %SYS_TICK and %SYS_TICK_COMPARE, but in an unusual > > hardware configuration.

push kernel lock down in ifioctl()

2022-11-07 Thread Klemens Nanni
Not all interface ioctls need the kernel lock, but they all grab it. Here's a mechanical diff splitting the single lock/unlock around ifioctl() into individual lock/unlock dances inside ifioctl(). >From there we can unlock individual ioctls piece by piece. Survives regress on sparc64 and didn't

Re: installboot: skip keydisk silently

2022-11-07 Thread Klemens Nanni
On Sun, Nov 06, 2022 at 06:45:10PM +, Klemens Nanni wrote: > On Sat, Oct 22, 2022 at 06:16:34PM +, Klemens Nanni wrote: > > Logging the presence of a keydisk the same way offline data chunks are > > reported seems unjustified. > > > > Noting offline chunks serves as warning, so the user

Re: bgpd and ldpd pfkey_reply might access uninitialized stack memory

2022-11-07 Thread Claudio Jeker
On Mon, Nov 07, 2022 at 08:12:23PM +0100, Moritz Buhl wrote: > Hi tech, > Dear claudio, > > there could be an uninitialized stack memory access in pfkey_reply. > > It looks like this: > struct sadb_msg hdr, *msg; > ... > > do { > rv = pfkey_read(sd, ); >

Re: simplify handling of 'once' rules in pf(4)

2022-11-07 Thread Alexandr Nedvedicky
Hello, resending the same diff, just updated to current. (pointed out by dlg@) thanks and regards sashan 8<---8<---8<--8< diff --git a/sys/net/pf.c b/sys/net/pf.c index 2c6124e74f2..6295b4eb9d7 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c

Re: push kernel lock down in ifioctl()

2022-11-07 Thread Martin Pieuchot
On 07/11/22(Mon) 15:16, Klemens Nanni wrote: > Not all interface ioctls need the kernel lock, but they all grab it. > > Here's a mechanical diff splitting the single lock/unlock around > ifioctl() into individual lock/unlock dances inside ifioctl(). > > From there we can unlock individual ioctls

Re: push kernel lock down in ifioctl()

2022-11-07 Thread Klemens Nanni
On Mon, Nov 07, 2022 at 03:48:46PM +, Martin Pieuchot wrote: > On 07/11/22(Mon) 15:16, Klemens Nanni wrote: > > Not all interface ioctls need the kernel lock, but they all grab it. > > > > Here's a mechanical diff splitting the single lock/unlock around > > ifioctl() into individual

Re: reorder_kernel: Use variable and shorter logic for NFS check

2022-11-07 Thread Theo Buehler
On Mon, Nov 07, 2022 at 02:21:53PM +, Klemens Nanni wrote: > No need to hardcode a parent path if we can reuse an existing variable > for the specific path that is in being used. > > Negate the file system type in df(1) so the `|| exit 1' can be dropped > in favour of the errexit option, as

installboot: efi: make -p softraid aware, fix arm64 softraid install

2022-11-07 Thread Klemens Nanni
On EFI platforms, 'installboot -p' on a softraid volume will only prepare the filesysem inside the volume and leave physical softraid chunks untouched, which leaves you with unbootable chunks. The current workaround is to prepare chunks manually (see regress). Here is a fix in the same spirit we

bgpd and ldpd pfkey_reply might access uninitialized stack memory

2022-11-07 Thread Moritz Buhl
Hi tech, Dear claudio, there could be an uninitialized stack memory access in pfkey_reply. It looks like this: struct sadb_msg hdr, *msg; ... do { rv = pfkey_read(sd, ); if (rv == -1) return (-1); } while (rv);

Re: simplify handling of 'once' rules in pf(4)

2022-11-07 Thread Klemens Nanni
On Mon, Nov 07, 2022 at 04:09:44PM +0100, Alexandr Nedvedicky wrote: > Hello, > > resending the same diff, just updated to current. > (pointed out by dlg@) I like trading the rule garbage collector for a simple flag. OK kn, but... pfctl(8) already skips printing PFRULE_EXPIRED rules (unless

Re: sparc64: switch to clockintr(9)

2022-11-07 Thread Miod Vallat
> This patch switches sparc64 to clockintr(9). [...] > Testing on the UltraSPARC IIe ("Hummingbird") would also be helpful. > Apparently it has %SYS_TICK and %SYS_TICK_COMPARE, but in an unusual > hardware configuration. I imagine this machine is a bit rare, though. All Sun Blade 100 and 150

Re: simplify handling of 'once' rules in pf(4)

2022-11-07 Thread Alexandr Nedvedicky
Hello, updated diff. It buys suggestions from Klemens: pf.conf(5) section which covers once rules reads as follows: onceCreates a one shot rule. The first matching packet marks rule as expired. The expired rule is never evaluated then. pfctl(8) does not

Re: ssh-keygen(1): by default generate ed25519 key (instead of rsa)

2022-11-07 Thread Darren Tucker
On Tue, 8 Nov 2022 at 11:05, Joerg Sonnenberger wrote: > Am Mon, Nov 07, 2022 at 12:53:43PM +0100 schrieb Renaud Allard: [...] > > Wouldn't it also be a good idea for ssh client to also try the ed25519 key > > first if there are multiple keys? > > That's already happening. Not quite: the default

Re: mbufs growing in 7.2

2022-11-07 Thread Joe Miller
I have had (somewhat) similar sounding issues with igc and 7.2 immediately after upgrading. I am able to reproduce it reliably by running an iperf3 test to another machine on the network. Within a few seconds the NIC will stop working. No traffic, no ping. No errors in dmesg or syslog. The issue

Re: ssh-keygen(1): by default generate ed25519 key (instead of rsa)

2022-11-07 Thread Joerg Sonnenberger
Am Mon, Nov 07, 2022 at 12:53:43PM +0100 schrieb Renaud Allard: > > > On 11/6/22 15:29, Job Snijders wrote: > > Dear all, > > > > Support for using Ed25519 for server and user authentication was > > introduced in 2014. I like the compactness of Ed25519 public keys. > > > > Perhaps now is a

Re: ssh-keygen(1): by default generate ed25519 key (instead of rsa)

2022-11-07 Thread Joerg Sonnenberger
Am Tue, Nov 08, 2022 at 01:23:52PM +1100 schrieb Darren Tucker: > On Tue, 8 Nov 2022 at 11:05, Joerg Sonnenberger wrote: > > Am Mon, Nov 07, 2022 at 12:53:43PM +0100 schrieb Renaud Allard: > [...] > > > Wouldn't it also be a good idea for ssh client to also try the ed25519 key > > > first if

Re: rc(8): reorder_libs(): print names of relinked libraries

2022-11-07 Thread Theo de Raadt
Klemens Nanni wrote: > > I know this makes rc(8) a bit noisier but it really does improve my > > (for want of a better term) "user experience" as I wait for my machine > > to boot. > > I like this and it doesn't add more **lines** to the boot log, but maybe > print library names without