Merge uipc_bind() with unp_bind()

2022-11-14 Thread Vitaliy Makkoveev
uipc_bind() only calls unp_bind(). Also it is the only caller of unp_bind(). Index: sys/kern/uipc_usrreq.c === RCS file: /cvs/src/sys/kern/uipc_usrreq.c,v retrieving revision 1.192 diff -u -p -r1.192 uipc_usrreq.c ---

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Klemens Nanni
On Tue, Sep 06, 2022 at 01:16:47AM +, Klemens Nanni wrote: > The installer considers a disk a root disk if 'a' is FFS and contains > expected files. > > Furthermore, unattended upgrades will always install to the first root > disk that is found. > > This works fine on machines with only one

Re: Merge uipc_bind() with unp_bind()

2022-11-14 Thread Klemens Nanni
On Mon, Nov 14, 2022 at 12:11:46PM +0300, Vitaliy Makkoveev wrote: > uipc_bind() only calls unp_bind(). Also it is the only caller of > unp_bind(). For *_bind() alone this looks like zapping a useless indirection, but the rest of uipc_*() seems to consistently use unp_*() still, so I'm not

Turn sowriteable(), sballoc() and sbfree() macro to inline functions

2022-11-14 Thread Vitaliy Makkoveev
We have soreadable() already presented as inline function, but corresponding sowriteable() is still macro. Also it's no reason to keep sballoc() and sbfree() as macro. Index: sys/sys/protosw.h === RCS file:

non regression tests for some packaging scripts

2022-11-14 Thread Marc Espie
I'd like to add some non-regression tests for some scripts, most notably register-plist, which is... let's say not perfect at the moment. I believe ${PORTSDIR}/regress is probably the simplest least disturbing way to do that. Since the manpages already exist under src, I could also (somehow) put

Re: Merge uipc_bind() with unp_bind()

2022-11-14 Thread Vitaliy Makkoveev
On Mon, Nov 14, 2022 at 09:28:34AM +, Klemens Nanni wrote: > On Mon, Nov 14, 2022 at 12:11:46PM +0300, Vitaliy Makkoveev wrote: > > uipc_bind() only calls unp_bind(). Also it is the only caller of > > unp_bind(). > > For *_bind() alone this looks like zapping a useless indirection, but > the

Re: special case mpe(4) in in6_ifattach()

2022-11-14 Thread Klemens Nanni
On Thu, Nov 10, 2022 at 04:13:33PM +, Klemens Nanni wrote: > On Fri, Nov 04, 2022 at 03:40:04PM +0100, Claudio Jeker wrote: > > So mpe(4) is a special device. It is a point-to-multipoint interface that > > does not do multicast. So setting IFF_MULTICAST on the interface is not > > correct but

Re: Turn sowriteable(), sballoc() and sbfree() macro to inline functions

2022-11-14 Thread Vitaliy Makkoveev
On Mon, Nov 14, 2022 at 12:00:28PM +, Klemens Nanni wrote: > On Mon, Nov 14, 2022 at 02:14:27PM +0300, Vitaliy Makkoveev wrote: > > We have soreadable() already presented as inline function, but > > corresponding sowriteable() is still macro. Also it's no reason to keep > > sballoc() and

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Theo de Raadt
Klemens Nanni wrote: > This is because the installer always considers the first root disk it > finds as the one to upgrade, which is certainly not what I intend or > expect when booting/upgrading the softraid installation on sd1-3. What does first root disk Mean? There is only one root

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Theo de Raadt
> sd1-3 are softraid chunks hosting a separate installation for testing. > Booting into this I think this is where you went wrong. Expecting this to work is going to result in 20-40 diffs bloating all the media for a configuration which less than than 1 in a thousand people need.

Re: libX11 patch for X*IfEvent() API issues, take #2

2022-11-14 Thread Walter Alejandro Iglesias
Hi Matthiew, On Nov 11 2022, Walter Alejandro Iglesias wrote: > On Nov 11 2022, Matthieu Herrb wrote: > > On Fri, Nov 11, 2022 at 03:17:21PM +0100, Walter Alejandro Iglesias wrote: > > > On Nov 11 2022, Matthieu Herrb wrote: > > > > Hi, > > > > > > > > So the patch provided by Adam Jackson

Netbooting Sparc64

2022-11-14 Thread Andrew Grillet
Does anyone know what could cause this ... SC Alert: Host System has Reset \ Sun Fire T200, No Keyboard Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. OpenBoot 4.30.4.b, 16256 MB memory available, Serial #82196894. Ethernet address 0:14:4f:e6:39:9e, Host ID:

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Mark Kettenis
> Date: Mon, 14 Nov 2022 09:22:13 + > From: Klemens Nanni > > On Tue, Sep 06, 2022 at 01:16:47AM +, Klemens Nanni wrote: > > The installer considers a disk a root disk if 'a' is FFS and contains > > expected files. > > > > Furthermore, unattended upgrades will always install to the

Re: Turn sowriteable(), sballoc() and sbfree() macro to inline functions

2022-11-14 Thread Klemens Nanni
On Mon, Nov 14, 2022 at 12:00:28PM +, Klemens Nanni wrote: > On Mon, Nov 14, 2022 at 02:14:27PM +0300, Vitaliy Makkoveev wrote: > > We have soreadable() already presented as inline function, but > > corresponding sowriteable() is still macro. Also it's no reason to keep > > sballoc() and

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Theo de Raadt
Mark Kettenis wrote: > > > The installer considers a disk a root disk if 'a' is FFS and contains > > > expected files. > > > > > > Furthermore, unattended upgrades will always install to the first root > > > disk that is found. > > > > > > This works fine on machines with only one root disk,

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Theo de Raadt
Klemens Nanni wrote: > I'd like to get on with this, can also add sysctl.2 bits to document > those before sending diffs using them. I want you to prove the use case first. > Mark asked whether CTLTYPE_QUAD would be more suited, but I still don't > understand how that is supposed to work and

OpenBSD Errata: November 15, 2022 (pixman)

2022-11-14 Thread Alexander Bluhm
Errata patches for X11 pixman library have been released for OpenBSD 7.1 and 7.2. Binary updates for the amd64, i386 and arm64 platform are available via the syspatch utility. Source code patches can be found on the respective errata page: https://www.openbsd.org/errata71.html

Re: Turn sowriteable(), sballoc() and sbfree() macro to inline functions

2022-11-14 Thread Klemens Nanni
On Mon, Nov 14, 2022 at 02:14:27PM +0300, Vitaliy Makkoveev wrote: > We have soreadable() already presented as inline function, but > corresponding sowriteable() is still macro. Also it's no reason to keep > sballoc() and sbfree() as macro. This reads as an improvement to me. sballoc() and

Re: non regression tests for some packaging scripts

2022-11-14 Thread Jeremie Courreges-Anglas
On Mon, Nov 14 2022, Marc Espie wrote: > I'd like to add some non-regression tests for some scripts, most notably > register-plist, which is... let's say not perfect at the moment. > > I believe > ${PORTSDIR}/regress is probably the simplest least disturbing way to do that. We have

mount_ntfs.8: Fix swapped -g user and -u group

2022-11-14 Thread Josiah Frentsos
Index: mount_ntfs.8 === RCS file: /cvs/src/sbin/mount_ntfs/mount_ntfs.8,v retrieving revision 1.17 diff -u -p -r1.17 mount_ntfs.8 --- mount_ntfs.820 Aug 2022 07:03:24 - 1.17 +++ mount_ntfs.814 Nov 2022

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Klemens Nanni
On Mon, Nov 14, 2022 at 05:45:33AM -0700, Theo de Raadt wrote: > Mark Kettenis wrote: > > > > > The installer considers a disk a root disk if 'a' is FFS and contains > > > > expected files. > > > > > > > > Furthermore, unattended upgrades will always install to the first root > > > > disk that

Re: mount_ntfs.8: Fix swapped -g user and -u group

2022-11-14 Thread Stuart Henderson
ha, good catch. committed, thanks.

xenodm: save ~/.xesssion to ~/.xsession.old

2022-11-14 Thread Klemens Nanni
X segfaulted when I opened a window, Xorg.log.old only showed the address without anything specific, no core dump was created and xenodm automatically restarted. After I logged in I checked ~/.xsession for possible indications, but that file gets truncated on login. I've restarted xenodm again,

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Theo de Raadt
An OpenBSD machine only has one OpenBSD install. As soon as we leave that model, and allow other setup models, perhaps you think there will be two or three potential configurations that people setup. I don't think so, I think it will keep being extended by people who do more and more scewed up

Re: mips64, loongson, octeon: switch to clockintr(9)

2022-11-14 Thread Visa Hankala
On Sun, Nov 06, 2022 at 07:48:09PM +, Scott Cheloha wrote: > This patch switches loongson and octeon to clockintr(9). > > It has survived several release builds and upgrades from the resulting > bsd.rd images on my ER-4. The ER-4 doesn't have enough RAM to crunch a > parallel release build.

Re: xenodm: save ~/.xesssion to ~/.xsession.old

2022-11-14 Thread Aaron Bieber
Klemens Nanni writes: > X segfaulted when I opened a window, Xorg.log.old only showed the > address without anything specific, no core dump was created and > xenodm automatically restarted. > > After I logged in I checked ~/.xsession for possible indications, but > that file gets truncated on

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Klemens Nanni
On Mon, Nov 14, 2022 at 07:49:11AM -0700, Theo de Raadt wrote: > Klemens Nanni wrote: > > > This is because the installer always considers the first root disk it > > finds as the one to upgrade, which is certainly not what I intend or > > expect when booting/upgrading the softraid installation

Re: xenodm: save ~/.xesssion to ~/.xsession.old

2022-11-14 Thread Stuart Henderson
On 2022/11/14 16:50, Klemens Nanni wrote: > X segfaulted when I opened a window, Xorg.log.old only showed the > address without anything specific, no core dump was created and > xenodm automatically restarted. > > After I logged in I checked ~/.xsession for possible indications, but > that file

Re: xenodm: save ~/.xesssion to ~/.xsession.old

2022-11-14 Thread Theo de Raadt
Stuart Henderson wrote: > > Index: app/xenodm//config/Xsession.in > > === > > RCS file: /cvs/xenocara/app/xenodm/config/Xsession.in,v > > retrieving revision 1.2 > > diff -u -p -r1.2 Xsession.in > > ---

Re: reorder_kernel: suport ro /usr like library_aslr does

2022-11-14 Thread Theo de Raadt
Readonly /usr is not a supported or recomended configuration. This is adding a lot of scripting that we don't everyone to run. I disagree strongly with this direction of OpenBSD having undocumented (undocumentable?) little behaviours that allow root to configure their machine in novel

Re: reorder_kernel: suport ro /usr like library_aslr does

2022-11-14 Thread Theo de Raadt
Klemens Nanni wrote: > Reading /etc/rc I was under the impression that read-only /usr is indeed > a scenario we support, since reorder_libs() already does what I propose, > only in a more complicated way: > > revision 1.481 > date: 2016/05/26 14:59:48; author: rpe; state: Exp;

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Mon, 14 Nov 2022 10:02:40 -0700 > > An OpenBSD machine only has one OpenBSD install. I have to disagree here. Not everyone has a pile of test machines lying around. > As soon as we leave that model, and allow other setup models, perhaps you > think there will

Re: export {b,r}ootduid as sysctl, installer/sysupgrade improvements

2022-11-14 Thread Theo de Raadt
Mark Kettenis wrote: > > From: "Theo de Raadt" > > Date: Mon, 14 Nov 2022 10:02:40 -0700 > > > > An OpenBSD machine only has one OpenBSD install. > > I have to disagree here. Not everyone has a pile of test machines > lying around. Are you going to work on the install script? And then,

Re: Push kernel lock into pru_control()

2022-11-14 Thread Vitaliy Makkoveev
> On 10 Nov 2022, at 13:54, Klemens Nanni wrote: > > Purely mechanical, then in6_control() and in_control() can be pushed > further individually. > > Feedback? OK? SS_PRIV is immutable, no reason to check it with kernel lock held. > --- > sys/kern/sys_socket.c | 2 -- > sys/netinet/in.c |

Re: reorder_kernel: suport ro /usr like library_aslr does

2022-11-14 Thread Klemens Nanni
On Mon, Nov 14, 2022 at 03:15:53PM -0700, Theo de Raadt wrote: > Readonly /usr is not a supported or recomended configuration. > > This is adding a lot of scripting that we don't everyone to run. > > I disagree strongly with this direction of OpenBSD having undocumented > (undocumentable?)

Re: reorder_kernel: suport ro /usr like library_aslr does

2022-11-14 Thread Klemens Nanni
On Tue, Nov 08, 2022 at 11:10:19AM +, Klemens Nanni wrote: > More read-only filesystems mean less fsck during boot after crashes. > Especially on crappy machines like the Pinebook Poop, I keep /usr > read-only and run with this diff so I still get a relinked kernel. > > rc's reorder_libs()

Re: xenodm: save ~/.xesssion to ~/.xsession.old

2022-11-14 Thread Theo de Raadt
Klemens Nanni wrote: > On Mon, Nov 14, 2022 at 10:33:44AM -0700, Theo de Raadt wrote: > > Stuart Henderson wrote: > > > > > > Index: app/xenodm//config/Xsession.in > > > > === > > > > RCS file:

Re: xenodm: save ~/.xesssion to ~/.xsession.old

2022-11-14 Thread Klemens Nanni
On Mon, Nov 14, 2022 at 10:33:44AM -0700, Theo de Raadt wrote: > Stuart Henderson wrote: > > > > Index: app/xenodm//config/Xsession.in > > > === > > > RCS file: /cvs/xenocara/app/xenodm/config/Xsession.in,v > > > retrieving revision