Re: prevent opening of dead tun/tap devices

2022-02-14 Thread Visa Hankala
On Tue, Feb 15, 2022 at 02:35:33PM +1000, David Gwynne wrote: > if an open tun (or tap) device is destroyed via ifconfig destroy, > there is a window while the open device is being revoked on the vfs > side that a third thread can come and open it again. this in turn > triggers a kassert in the

Re: rewritten vxlan(4)

2022-02-14 Thread David Gwynne
On Fri, Feb 11, 2022 at 03:13:25PM +1000, David Gwynne wrote: > On Fri, Mar 05, 2021 at 05:09:29PM +1000, David Gwynne wrote: > > On Thu, Mar 04, 2021 at 03:36:19PM +1000, David Gwynne wrote: > > > as the subject says, this is a rewrite of vxlan(4). > > > > > > vxlan(4) relies on bridge(4) to

Re: Adjust bpf event filter

2022-02-14 Thread David Gwynne
On Mon, Feb 14, 2022 at 08:34:42AM +, Visa Hankala wrote: > This makes bpf(4) use knote_modify_fn() and knote_process_fn(). > > Since the code has only one event function, it makes sense to use it > directly instead of going through struct filterops f_event pointer. > > OK? ok. > > Index:

Re: [External] : check pf rule set prio values consistently in the pf ioctl code

2022-02-14 Thread Alexandr Nedvedicky
Hello, On Tue, Feb 15, 2022 at 03:29:19PM +1000, David Gwynne wrote: > consistently means we do the check in pf_rule_copyin() so both > DIOCADDRULE and DIOCCHANGERULE have the prio values checked. this in > turn prevents invalid prio values getting set on a rule via > DIOCCHANGERULE, which in

check pf rule set prio values consistently in the pf ioctl code

2022-02-14 Thread David Gwynne
consistently means we do the check in pf_rule_copyin() so both DIOCADDRULE and DIOCCHANGERULE have the prio values checked. this in turn prevents invalid prio values getting set on a rule via DIOCCHANGERULE, which in turn stops a kassert in the ifq priq code firing. i think this fixes

prevent opening of dead tun/tap devices

2022-02-14 Thread David Gwynne
if an open tun (or tap) device is destroyed via ifconfig destroy, there is a window while the open device is being revoked on the vfs side that a third thread can come and open it again. this in turn triggers a kassert in the ifconfig destroy path where it expects the device to be closed. i think

[PATCH] Report versioned lib.so in cc --print-file-name given short name

2022-02-14 Thread Greg Steuck
LLVM OpenBSD guardians, I want to get a closure on "Power-up cc --print-file-name for .so names" thread on tech@. I care because it helps me with lang/ghc port. Here's a is fairly finished diff. I'll be taking it through the make-build-twice dance (because I can). If somebody has a good idea

Re: fw_update perl glue tweaks

2022-02-14 Thread Andrew Hewus Fresh
On Mon, Feb 14, 2022 at 11:37:55AM +0100, Marc Espie wrote: > - you don't need to call unlock_db. When the process dies, the fd dies with > it, and the lock. Makes sense. it probably doesn't need the $SIG{TERM} handler if we don't need to trigger the END block anymore either. > - I've

Re: Power-up cc --print-file-name for .so names

2022-02-14 Thread Theo de Raadt
Mark Kettenis wrote: > > From: "Theo de Raadt" > > Date: Mon, 14 Feb 2022 00:34:53 -0700 > > > > > The solution would be to add symlinks like all the other OSes do. But > > > Theo doesn't like that. > > > > No, the problem is you add symbolic links, how long before software > > ecosystems in

Re: Power-up cc --print-file-name for .so names

2022-02-14 Thread Theo de Raadt
Mark Kettenis wrote: > > From: Philip Guenther > > Date: Sun, 13 Feb 2022 23:29:06 -0800 > > > > On Sun, Feb 13, 2022 at 11:18 PM Mark Kettenis > > wrote: > > > > > From: Greg Steuck > > > Date: Sun, 13 Feb 2022 22:37:13 -0800 > > > > > > To give a sense of the kind of change required

Re: Power-up cc --print-file-name for .so names

2022-02-14 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Mon, 14 Feb 2022 00:34:53 -0700 > > > The solution would be to add symlinks like all the other OSes do. But > > Theo doesn't like that. > > No, the problem is you add symbolic links, how long before software > ecosystems in ports choose the short names in

Re: Power-up cc --print-file-name for .so names

2022-02-14 Thread Mark Kettenis
> From: Philip Guenther > Date: Sun, 13 Feb 2022 23:29:06 -0800 > > On Sun, Feb 13, 2022 at 11:18 PM Mark Kettenis > wrote: > > > From: Greg Steuck > > Date: Sun, 13 Feb 2022 22:37:13 -0800 > > > > To give a sense of the kind of change required to get the feature I > > want, see the

Driver for PolarFire SoC MSS I2C controller

2022-02-14 Thread Visa Hankala
This patch adds a basic driver for the PolarFire SoC MSS I2C controller. OK? Index: share/man/man4/iic.4 === RCS file: src/share/man/man4/iic.4,v retrieving revision 1.122 diff -u -p -r1.122 iic.4 --- share/man/man4/iic.424

Re: Power-up cc --print-file-name for .so names

2022-02-14 Thread Greg Steuck
"Theo de Raadt" writes: > Philip Guenther wrote: > >> On Sun, Feb 13, 2022 at 11:18 PM Mark Kettenis >> wrote: >> >> > > From: Greg Steuck >> > > Date: Sun, 13 Feb 2022 22:37:13 -0800 >> > > >> > > To give a sense of the kind of change required to get the feature I >> > > want, see the patch

Re: fw_update perl glue tweaks

2022-02-14 Thread Marc Espie
On Mon, Feb 14, 2022 at 11:37:55AM +0100, Marc Espie wrote: > - you don't need to call unlock_db. When the process dies, the fd dies with > it, and the lock. > > - I've committed glue to PackageInfo.pm to make lock_db self-contained > (it will pull BaseState in on an "as needed" basis, which also

Re: mvpcie(4): fix panic if "reset-gpios" is not available

2022-02-14 Thread Theo Buehler
On Mon, Feb 14, 2022 at 12:00:24PM +1100, Jonathan Gray wrote: > On Sun, Feb 13, 2022 at 03:17:27PM +0100, Theo Buehler wrote: > > On Sun, Feb 13, 2022 at 02:30:21PM +0100, Tobias Heider wrote: > > > OF_getproplen() will return -1 if "reset-gpios" is not found which > > > currently causes a panic:

Re: mvpcie(4): fix panic if "reset-gpios" is not available

2022-02-14 Thread Tobias Heider
On Mon, Feb 14, 2022 at 12:00:24PM +1100, Jonathan Gray wrote: > On Sun, Feb 13, 2022 at 03:17:27PM +0100, Theo Buehler wrote: > > On Sun, Feb 13, 2022 at 02:30:21PM +0100, Tobias Heider wrote: > > > OF_getproplen() will return -1 if "reset-gpios" is not found which > > > currently causes a panic:

fw_update perl glue tweaks

2022-02-14 Thread Marc Espie
- you don't need to call unlock_db. When the process dies, the fd dies with it, and the lock. - I've committed glue to PackageInfo.pm to make lock_db self-contained (it will pull BaseState in on an "as needed" basis, which also comes in handy for other locks prior to having a state) Index:

Adjust bpf event filter

2022-02-14 Thread Visa Hankala
This makes bpf(4) use knote_modify_fn() and knote_process_fn(). Since the code has only one event function, it makes sense to use it directly instead of going through struct filterops f_event pointer. OK? Index: net/bpf.c === RCS

Unify f_modify and f_process event filter callbacks for FIFOs

2022-02-14 Thread Visa Hankala
This patch unifies f_modify and f_process event filter callbacks for FIFOs. This is similar to recent sys_pipe.c changes. In addition, the patch adds missing flag FILTEROP_MPSAFE to fifoexcept_filtops. OK? Index: miscfs/fifofs/fifo_vnops.c

Unify f_modify and f_process event filter callbacks for sockets

2022-02-14 Thread Visa Hankala
This patch unifies f_modify and f_process event filter callbacks for sockets. This is similar to recent sys_pipe.c changes. OK? Index: kern/uipc_socket.c === RCS file: src/sys/kern/uipc_socket.c,v retrieving revision 1.272 diff -u