Re: vlan: use SMR_SLIST instead of SRP to protect instance lists

2020-01-26 Thread Alexandr Nedvedicky
Hello, > > I agree we should protect against that - if I add a sleep there, I can easily > cause a panic with 'ifconfig vlan10 destroy & ifconfig vlan10 destroy'. > I think that's a separate issue though, as the same window is present in > the existing code. > that's true. it's

Re: vlan: use SMR_SLIST instead of SRP to protect instance lists

2020-01-26 Thread Jonathan Matthew
On Mon, Jan 27, 2020 at 12:48:49AM +0100, Alexandr Nedvedicky wrote: > Hello, > > > > > I'm not sure about your diff see below. > > > > visa@ pointed out that PF_LOCK will introduce a potential sleep inside > > if_vinput(), > > making this unsafe, so here's a less optimistic diff where

Re: Teach du(1) the -m flag, disk usage in megabytes

2020-01-26 Thread David Goerger
Monday, 20200127 10:05+1100, Jonathan Gray wrote: > On Sun, Jan 26, 2020 at 11:59:33AM -0500, David Goerger wrote: > > This diff teaches du(1) the -m flag, report disk usage in megabytes. > > This brings us in line with implementations in the other BSDs, Linux, > > and Illumos. > > Why is it

Re: vlan: use SMR_SLIST instead of SRP to protect instance lists

2020-01-26 Thread Alexandr Nedvedicky
Hello, > > I'm not sure about your diff see below. > > visa@ pointed out that PF_LOCK will introduce a potential sleep inside > if_vinput(), > making this unsafe, so here's a less optimistic diff where only the vlan list > traversal is inside the SMR read section, and vlan_softcs are still

Re: vlan: use SMR_SLIST instead of SRP to protect instance lists

2020-01-26 Thread Jonathan Matthew
On Sun, Jan 26, 2020 at 11:02:29PM +0100, Alexandr Nedvedicky wrote: > Hello, > > > On Sun, Jan 26, 2020 at 10:06:24AM +1100, Jonathan Matthew wrote: > > Converting vlan(4) to use SMR instead of SRP to protect the instance lists > > is pretty simple. vlan_input() doesn't keep a reference to

Re: Teach du(1) the -m flag, disk usage in megabytes

2020-01-26 Thread Ted Unangst
Jonathan Gray wrote: > On Sun, Jan 26, 2020 at 11:59:33AM -0500, David Goerger wrote: > > This diff teaches du(1) the -m flag, report disk usage in megabytes. > > This brings us in line with implementations in the other BSDs, Linux, > > and Illumos. > > Why is it needed? -k is required by

Re: [patch] signify's file name parsing broken

2020-01-26 Thread Christian Weisgerber
Marcus Müller: > > Files with ) are not used within openbsd > > I didn't know that! So, I couldn't un-tar an archive with )-containing > file names on openbsd (it just so happens that I came across this when > I was rolling tarballs)? That's a misunderstanding. Obviously OpenBSD has Unix file

Re: Teach du(1) the -m flag, disk usage in megabytes

2020-01-26 Thread Jonathan Gray
On Sun, Jan 26, 2020 at 11:59:33AM -0500, David Goerger wrote: > This diff teaches du(1) the -m flag, report disk usage in megabytes. > This brings us in line with implementations in the other BSDs, Linux, > and Illumos. Why is it needed? -k is required by POSIX, adding arguments for

Re: SMP friendly pfsync(4) ready for testing

2020-01-26 Thread Alexandr Nedvedicky
Hello, here is a revised diff, which makes my change to play nicely with witness. Hrvoje found a panic with stack below when running my diff with witness enabled: witness: acquiring duplicate lock of same type: ">sc_mtx[q]" 1st >sc_mtx[q] 2nd >sc_mtx[q] Starting stack trace...

Re: Teach du(1) the -m flag, disk usage in megabytes

2020-01-26 Thread Sebastian Benoit
Maybe the manpage text could be better, but i'll leave that to jmc@ ok benno@ David Goerger(da...@goerger.info) on 2020.01.26 11:59:33 -0500: > This diff teaches du(1) the -m flag, report disk usage in megabytes. > This brings us in line with implementations in the other BSDs, Linux, > and

Re: vlan: use SMR_SLIST instead of SRP to protect instance lists

2020-01-26 Thread Alexandr Nedvedicky
Hello, On Sun, Jan 26, 2020 at 10:06:24AM +1100, Jonathan Matthew wrote: > Converting vlan(4) to use SMR instead of SRP to protect the instance lists > is pretty simple. vlan_input() doesn't keep a reference to vlan_softcs > outside > the read critical section, so we don't need to reference

Teach du(1) the -m flag, disk usage in megabytes

2020-01-26 Thread David Goerger
This diff teaches du(1) the -m flag, report disk usage in megabytes. This brings us in line with implementations in the other BSDs, Linux, and Illumos. Other base utilities where this flag might be useful include df(1) and quot(8), although it doesn't appear to be universally adopted among the

Patch to hide processes from people

2020-01-26 Thread Bo Granlund
Hi! I wrote this patch with the similar stuff like what FreeBSD got and there it is. Please, if you want this fucntionally and more, let me know so I can implement them for you. Basically: # sysctl -w kern.hide_others=1 and the most of other people's processes vanish, execpt for the root user.

Re: [patch] signify's file name parsing broken

2020-01-26 Thread Hiltjo Posthuma
On Tue, Jan 21, 2020 at 05:22:17PM -0500, Ted Unangst wrote: > Ted Unangst wrote: > > MarcusMüller wrote: > > > I've just stumbled across a malfunction in signify: It cannot handle > > > file names that contain a `)` character, when checking a list of hashes > > > generated by `sha256` command

Re: [patch] signify's file name parsing broken

2020-01-26 Thread Marcus Müller
On Tue, 2020-01-21 at 17:22 -0500, Ted Unangst wrote: > Ted Unangst wrote: > Not much simpler, but maybe this is easier to follow. Keeps the hair > in a > separate function. I appreciate the effort put into this issue very much! I agree, moving it into a separate function is beneficial; and the

Re: MSI-X & Interrupting CPU > 0

2020-01-26 Thread David Gwynne
> On 25 Jan 2020, at 10:57 am, Mark Kettenis wrote: > > David Gwynne schreef op 2020-01-25 01:28: >>> On 23 Jan 2020, at 10:38 pm, Mark Kettenis wrote: >>> Martin Pieuchot schreef op 2020-01-23 11:28: I'd like to make progress towards interrupting multiple CPUs in order to one day