Re: [patch] Avoid change of permissions in /etc/resolv.conf

2023-04-21 Thread Stuart Henderson
On 2023/04/21 02:45, Juan Picca wrote: > On Thu, Apr 20, 2023 at 11:33:30PM -0600, Theo de Raadt wrote: > > But this situation does not arise, not in this program, and not in 20 other > > daemons. > > > > You changed something to cause this problem. > > Yes. > > I found a similar case in >

Re: efi(4): Support for EFI variables and tables in the kernel

2023-04-21 Thread Sergii Dmytruk
Hi Mark, I must have made a mistake while checking that the patch was applied, I can see it's there now. Great to know everything was upstreamed, thank you! I'll make sure efivar port works and will submit it soon. I think there are other dependencies, but that was the hardest one due to

bgpctl ext-communities fixup

2023-04-21 Thread Claudio Jeker
Similar diff as I sent out for bgpd. Adjust the community code to handle the generic transitive extended communities used by flowspec. -- :wq Claudio ? obj Index: bgpctl.c === RCS file: /cvs/src/usr.sbin/bgpctl/bgpctl.c,v

bgpd sync with bgpctl

2023-04-21 Thread Claudio Jeker
This adjusts the bgpd code (which was copied to bgpctl) to be like the version in bgpctl (after input from tb@). -- :wq Claudio Index: parse.y === RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v retrieving revision 1.449 diff -u -p

Re: efi(4): Support for EFI variables and tables in the kernel

2023-04-21 Thread Stuart Henderson
On 2023/04/20 00:55, Mark Kettenis wrote: > > Date: Tue, 18 Apr 2023 19:11:40 +0300 > > From: Sergii Dmytruk > > > > Hi there, > > > > Pinging to say that this thread is silent for 3 months. EFI runtime and > > bootloader changes are there, /dev/efi is the last piece left to be > > committed

Re: bgpd sync with bgpctl

2023-04-21 Thread Theo Buehler
On Fri, Apr 21, 2023 at 11:15:15AM +0200, Claudio Jeker wrote: > This adjusts the bgpd code (which was copied to bgpctl) to be like the > version in bgpctl (after input from tb@). ok

bgpd: adjust ext-community parser for flowspec specific communities

2023-04-21 Thread Claudio Jeker
Flowspec added some new ext communities. They use new type (generic transitive types). Adjust the ext community code to handle these types as well. I need to cycle back to this but this gets us of the ground. -- :wq Claudio Index: parse.y

Re: bgpctl document flowspec commands

2023-04-21 Thread Theo Buehler
On Fri, Apr 21, 2023 at 05:18:09PM +0200, Claudio Jeker wrote: > Document the various flowspec commands now supported in bgpctl. > > Like with network the show command has an alias as `bgpctl show flowspec` > which is not documented. Maybe we could add an extra sentence in both > cases. Yes,

Re: plt section in kernel due to endbr64

2023-04-21 Thread Alexander Bluhm
On Fri, Apr 21, 2023 at 07:35:22AM -0600, Theo de Raadt wrote: > It may still be better to add it to match the style. On i386, also. Here is the diff for arm64. No -fcf-protection for i386 yet. Before: root@ot11:.../GENERIC.MP# objdump -s obj/gapdummy.o | grep 'Contents of section' Contents

bgpctl document flowspec commands

2023-04-21 Thread Claudio Jeker
Document the various flowspec commands now supported in bgpctl. Like with network the show command has an alias as `bgpctl show flowspec` which is not documented. Maybe we could add an extra sentence in both cases. -- :wq Claudio Index: bgpctl.8

Re: [patch] Avoid change of permissions in /etc/resolv.conf

2023-04-21 Thread Theo de Raadt
Well, now you get to own the consequences of your change, which is wrong. You pointed a gun at your own foot. Have you noticed that noone else has holes in their feet? Juan Picca wrote: > > I'm saying you will find this "problem" in 100 places, because the real > > problem is your own

llvm15: Implement support for PT_OPENBSD_NOBTCFI in lld(1)

2023-04-21 Thread Christian Weisgerber
Mark Kettenis: > CVSROOT: /cvs > Module name: src > Changes by: kette...@cvs.openbsd.org2023/04/19 10:04:33 > > Modified files: > gnu/llvm/lld/ELF: Config.h Driver.cpp Writer.cpp > gnu/llvm/llvm/include/llvm/BinaryFormat: ELF.h >

ldomctl: status: Make stopped ldom utilization appear as zero

2023-04-21 Thread Koakuma
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 makes it so that stopped ldoms' utilization appear as a zero, which

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

Re: [patch] Avoid change of permissions in /etc/resolv.conf

2023-04-21 Thread Juan Picca
> I'm saying you will find this "problem" in 100 places, because the real > problem is your own change. Yes, you are right. The change that gives the error correctly infered by you and Stuart: --- /etc/login.conf.orig +++ /etc/login.conf @@ -40,7 +40,7 @@ # default:\ :path=/usr/bin

Re: plt section in kernel due to endbr64

2023-04-21 Thread Christian Weisgerber
Alexander Bluhm: > After enabling -fcf-protection=branch for the kernel, we have a new > .plt section in the kernel. It was not there before. Same issue in userland: At least /usr/lib/crt0.o and /usr/lib/crtbegin.o have grown .plt and .note.gnu.property sections and some tools (ld.bfd?) don't

Re: plt section in kernel due to endbr64

2023-04-21 Thread Theo de Raadt
Christian Weisgerber wrote: > Alexander Bluhm: > > > After enabling -fcf-protection=branch for the kernel, we have a new > > .plt section in the kernel. It was not there before. > > Same issue in userland: At least /usr/lib/crt0.o and /usr/lib/crtbegin.o > have grown .plt and

Push kernel lock deep down to sys_sysctl()

2023-04-21 Thread Vitaliy Makkoveev
At least network subset of sysctl(8) MIBs relies on netlock or another locks and doesn't require kernel lock. Also some integers in other subsets can be read without kernel lock held. Diff below actually pushes kernel lock down to net_sysctl(). It is required for MPLS and PFLOW cases. The

Re: Call pfkeyv2_sysctl_policydumper() with shared netlock

2023-04-21 Thread Alexander Bluhm
On Fri, Apr 21, 2023 at 02:18:54PM +0300, Vitaliy Makkoveev wrote: > It does read-olny access to tetlock protected data, so the radix tree > will not be modified during spd_table_walk() run. > > The second spd_table_walk() call in PF_KEY layer can't be performed with > shared netlock, because

Re: bgpd sync with bgpctl

2023-04-21 Thread Pablo Méndez Hernández
Hi Claudio, Format nit: El vie., 21 abr. 2023 11:16, Claudio Jeker escribió: > This adjusts the bgpd code (which was copied to bgpctl) to be like the > version in bgpctl (after input from tb@). > > -- > :wq Claudio > > Index: parse.y >

Re: bgpd: adjust ext-community parser for flowspec specific communities

2023-04-21 Thread Theo Buehler
On Fri, Apr 21, 2023 at 11:21:11AM +0200, Claudio Jeker wrote: > Flowspec added some new ext communities. They use new type (generic > transitive types). Adjust the ext community code to handle these types as > well. I need to cycle back to this but this gets us of the ground. Both this and the

Re: efi(4): Support for EFI variables and tables in the kernel

2023-04-21 Thread Stuart Henderson
On 2023/04/21 12:32, Landry Breuil wrote: > Le Fri, Apr 21, 2023 at 09:27:35AM +0100, Stuart Henderson a écrit : > > On 2023/04/20 00:55, Mark Kettenis wrote: > > > > Date: Tue, 18 Apr 2023 19:11:40 +0300 > > > > From: Sergii Dmytruk > > > > > > > > Hi there, > > > > > > > > Pinging to say that

Re: efi(4): Support for EFI variables and tables in the kernel

2023-04-21 Thread Landry Breuil
Le Fri, Apr 21, 2023 at 09:27:35AM +0100, Stuart Henderson a écrit : > On 2023/04/20 00:55, Mark Kettenis wrote: > > > Date: Tue, 18 Apr 2023 19:11:40 +0300 > > > From: Sergii Dmytruk > > > > > > Hi there, > > > > > > Pinging to say that this thread is silent for 3 months. EFI runtime and > >

Call pfkeyv2_sysctl_policydumper() with shared netlock

2023-04-21 Thread Vitaliy Makkoveev
It does read-olny access to tetlock protected data, so the radix tree will not be modified during spd_table_walk() run. The second spd_table_walk() call in PF_KEY layer can't be performed with shared netlock, because pfkeyv2_policy_flush() modifies tree and the following tdb_walk() requires

Re: pfctl + bgpd for loop ugliness

2023-04-21 Thread Alexandr Nedvedicky
Hello, On Tue, Apr 18, 2023 at 02:43:26PM +0200, Theo Buehler wrote: > On Tue, Apr 18, 2023 at 02:06:46PM +0200, Claudio Jeker wrote: > > This and the others are IIRC streight from pfctl. So if someone wants a > > free commit :) > > How about this. pfctl and bgpd are the same, except that the

Re: vmd(8): fix restoring virtio devs on vm receive

2023-04-21 Thread Dave Voutila
ping Dave Voutila writes: > Moving vmd to use zero-copy semantics for virtqueues introduced a bug in > the vm send/receive functionality. The host va is potentially invalid on > restore if vmd has restarted and re-randomized the address space of the > vmm process that forks vm's. > > This

Re: [patch] Avoid change of permissions in /etc/resolv.conf

2023-04-21 Thread Theo de Raadt
I'm saying you will find this "problem" in 100 places, because the real problem is your own change. Juan Picca wrote: > On Thu, Apr 20, 2023 at 11:33:30PM -0600, Theo de Raadt wrote: > > But this situation does not arise, not in this program, and not in 20 other > > daemons. > > > > You changed

Re: plt section in kernel due to endbr64

2023-04-21 Thread Alexander Bluhm
On Thu, Apr 20, 2023 at 05:21:37PM -0600, Theo de Raadt wrote: > I wonder if the same happens on arm64. On amd64 with the strange behavior linking gapdummy.o to gap.o adds a .plt. root@ot32:.../obj# objdump -s gapdummy.o | grep 'Contents of section' Contents of section .note.gnu.property:

Re: plt section in kernel due to endbr64

2023-04-21 Thread Theo de Raadt
It may still be better to add it to match the style. On i386, also. It is quite surprising compiler behaviour to create a PLT for such .rodata.. Alexander Bluhm wrote: > On Thu, Apr 20, 2023 at 05:21:37PM -0600, Theo de Raadt wrote: > > I wonder if the same happens on arm64. > > On amd64