Re: free(9) while holding a rwlock

2018-02-21 Thread Philip Guenther
On Wed, Feb 21, 2018 at 1:26 AM, Martin Pieuchot wrote: > Is it safe? What kind of deadlock/weird situation can occur? > > I'm asking because the diff below, that introduces a lock to protect uid > globals, has an XXX comment from guenther@ asking if it is a problem. > The

Re: ifconfig: add -rdomain option

2018-02-21 Thread Ayaka Koshibe
On Wed, Feb 21, 2018 at 03:42:58PM +0100, Sebastian Benoit wrote: > Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.20 21:20:20 -0800: > > On Tue, Feb 20, 2018 at 4:48 AM, Reyk Floeter wrote: > > > > > >> Am 20.02.2018 um 11:15 schrieb Klemens Nanni : > > >> > >

Re: vmd(8) sends global config too late

2018-02-21 Thread Carlos Cardenas
On Wed, Feb 21, 2018 at 11:27:05PM +0100, Martijn van Duren wrote: > Hello tech@, > > When playing around with local prefix in vm.conf(5) I noticed that it > wasn't picked up by my vm. The reason for this was that config_setvm was > called before config_setconfig. Diff below fixes this. > > OK?

Re: getentropy does not explicit_bzero if copyout fails

2018-02-21 Thread Mateusz Guzik
On Wed, Feb 21, 2018 at 10:28 PM, Ted Unangst wrote: > Mateusz Guzik wrote: > > As the subject states. By the time the code gets to copyout, buf is > > already populated. Clearing it only if copyout succeeds looks like a > > braino, thus the following trivial proposal: > >

vmd(8) sends global config too late

2018-02-21 Thread Martijn van Duren
Hello tech@, When playing around with local prefix in vm.conf(5) I noticed that it wasn't picked up by my vm. The reason for this was that config_setvm was called before config_setconfig. Diff below fixes this. OK? martijn@ Index: vmd.c

Re: free(9) while holding a rwlock

2018-02-21 Thread David Gwynne
> On 21 Feb 2018, at 19:26, Martin Pieuchot wrote: > > Is it safe? What kind of deadlock/weird situation can occur? i think it is safe. > > I'm asking because the diff below, that introduces a lock to protect uid > globals, has an XXX comment from guenther@ asking if it is

Re: getentropy does not explicit_bzero if copyout fails

2018-02-21 Thread Ted Unangst
Mateusz Guzik wrote: > As the subject states. By the time the code gets to copyout, buf is > already populated. Clearing it only if copyout succeeds looks like a > braino, thus the following trivial proposal: If the secret random data is not copied out, it will not be used, and there's nothing to

getentropy does not explicit_bzero if copyout fails

2018-02-21 Thread Mateusz Guzik
As the subject states. By the time the code gets to copyout, buf is already populated. Clearing it only if copyout succeeds looks like a braino, thus the following trivial proposal: diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index e33cb5fd7c0..fa876a950b9 100644 --- a/sys/dev/rnd.c +++

Re: ifconfig: add -rdomain option

2018-02-21 Thread Tom Smyth
Hi Ayaka, All, the diff from a user experience point of view :) ... ill stop right there... I was going to ask another slightly related question regarding ifconfig output consistency would there be a way to display the rdomain of interfaces that are in the default rdomain , as rdomain

Re: arm64 MP

2018-02-21 Thread Juan Francisco Cantero Hurtado
On Mon, Feb 19, 2018 at 01:49:48PM +0100, Mark Kettenis wrote: > The diff below attempts to make the arm64 pmap "mpsafe" and enables MP > support. This diff survived a full build on my Firefly-RK3399 board. > It also seems to work on the Overdrive 1000. It might even work on > the Raspberry Pi

Re: ifconfig: add -rdomain option

2018-02-21 Thread Theo de Raadt
>From be...@openbsd.org Wed Feb 21 07:48:51 2018 >Delivered-To: dera...@cvs.openbsd.org >Date: Wed, 21 Feb 2018 15:48:49 +0100 >From: Sebastian Benoit >To: Theo de Raadt >Cc: akosh...@openbsd.org, r...@openbsd.org, k...@openbsd.org, tech@openbsd.org

Re: ifconfig: add -rdomain option

2018-02-21 Thread Sebastian Benoit
Theo de Raadt(dera...@openbsd.org) on 2018.02.20 22:27:27 -0700: > > If you read through all the options in the manual page carefully, > ifconfig is not consistant. As a result it cannot use getopt. > It isn't a POSIX argument grammar. It grew up with that funky > table, and there we are. > >

Re: ifconfig: add -rdomain option

2018-02-21 Thread Sebastian Benoit
Ayaka Koshibe(akosh...@openbsd.org) on 2018.02.20 21:20:20 -0800: > On Tue, Feb 20, 2018 at 4:48 AM, Reyk Floeter wrote: > > > >> Am 20.02.2018 um 11:15 schrieb Klemens Nanni : > >> > >>> On Mon, Feb 19, 2018 at 05:09:58PM -0800, Ayaka Koshibe wrote: > >>> This

Re: default route and route socket filter on priority

2018-02-21 Thread Martin Pieuchot
On 19/02/18(Mon) 14:00, Sebastian Benoit wrote: > Martin Pieuchot(m...@openbsd.org) on 2018.02.12 15:23:45 +0100: > > On 12/02/18(Mon) 12:02, Sebastian Benoit wrote: > > > routefilter currently filters the default route, > > > if it's priority is higher than the filter prio. > > > > Then why not

"unlock" socket(2) & socketpair(2)

2018-02-21 Thread Martin Pieuchot
These two syscalls enter the socket layer first then mess with file descriptors. So it is possible to grab the KERNEL_LOCK() once we're done with socket operations. This won't buy us much, but the my goal is currently to draw a line. Note that unix/pfkey/routing sockets still need the

Re: drm: DP update that fixes T460 external monitors through docks

2018-02-21 Thread Paul Irofti
On Fri, Jan 26, 2018 at 10:39:39AM +0200, Paul Irofti wrote: > Hi, > > I have a T460 Lenovo model that, when connected to an external monitor > via a docking station, freezes the machine and produces the "snowflake" > effect on the monitor. Last time I saw this was in 2010 when working on >

SA_RESETHAND race (or the mpv(1) hanging story)

2018-02-21 Thread Martin Pieuchot
Diff below fixes a race in signal handling that can be triggered when a multi-threaded process installs a signal handler with SA_RESETHAND. I described a case of this problem on bugs@ a month ago: https://marc.info/?l=openbsd-bugs=151672599508049=2 The race occurs when one of the threads is

Re: ifconfig: add -rdomain option

2018-02-21 Thread Stefan Sperling
On Tue, Feb 20, 2018 at 09:49:30PM -0800, Ayaka Koshibe wrote: > On Tue, Feb 20, 2018 at 5:08 AM, Stefan Sperling wrote: > > I haven't tested this idea, though. > > Does your change work without the new function unsetrdomain? > > I.e. a diff which only adds this to ifconfig.c: > >

Re: match linux i915 ioctl numbers (xenocara)

2018-02-21 Thread Mark Kettenis
> Date: Wed, 21 Feb 2018 11:28:58 +1100 > From: Jonathan Gray > > Correct a pointless longstanding difference in ioctl numbering between > linux and add back struct members. > > Avoids diffs in inteldrm, libdrm and Mesa >= 17.2. > > This breaks ioctl compat. ok kettenis@ >

Re: match linux i915 ioctl numbers (src)

2018-02-21 Thread Mark Kettenis
> Date: Wed, 21 Feb 2018 11:26:08 +1100 > From: Jonathan Gray > > Correct a pointless longstanding difference in ioctl numbering between > linux and add back struct members. > > Avoids diffs in inteldrm, libdrm and Mesa >= 17.2. > > This breaks ioctl compat. Yeah. It's time

free(9) while holding a rwlock

2018-02-21 Thread Martin Pieuchot
Is it safe? What kind of deadlock/weird situation can occur? I'm asking because the diff below, that introduces a lock to protect uid globals, has an XXX comment from guenther@ asking if it is a problem. There's currently multiple free(9) happening while the NET_LOCK() is being held, so I

Re: pf generic packet delay

2018-02-21 Thread Martin Pieuchot
On 21/02/18(Wed) 02:37, Henning Brauer wrote: > Here comes generic delay functionality for pf. > The manpage bits are missing for the moment, but it's really simple to > use: > > match in set delay 1 > > delay is in ms. should I change the parser to explicitely require > "ms", as in "match