acpi: free() size

2017-10-11 Thread Anton Lindqvist
Hi, Add missing size to free(), tested on amd64. Comments? OK? Index: dsdt.c === RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v retrieving revision 1.234 diff -u -p -r1.234 dsdt.c --- dsdt.c 28 May 2017 15:36:45 - 1.234 +++

ifioctl() cleanup, step 2

2017-10-11 Thread Martin Pieuchot
Moar cleanup to be able to selectively take the NET_LOCK() around some ioctls. This diff change many "return (error)" into "break". It adds error checks for SIOC{A,D}IFGROUP. The only driver handling these ioctl(2)s is... carp(4)! ok? Index: net/if.c

Re: ifioctl() cleanup, step 2

2017-10-11 Thread Alexandr Nedvedicky
Hello, just for my curiosity: why do you leave some returns untreated? is that intentional? just like here: @@ -2048,8 +2048,11 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) case SIOCGVNETID: case SIOCGIFPAIR: case

Re: inteldrm: reduce i2c busy-wait to 100us

2017-10-11 Thread Mark Kettenis
> Date: Tue, 10 Oct 2017 15:42:26 -0500 > From: joshua stein > > On my Kaby Lake laptop, running xbacklight or xrandr causes the > audio and mouse cursor to pause briefly. This is because those > codepaths do DRM operations that have to probe all of the available > connectors,

LLVM 5.0 on armv7

2017-10-11 Thread Mark Kettenis
Diff below makes clang and lld build again on armv7. Sorted the files such that they match the order in the CMakeLists.txt file. ok? Index: gnu/usr.bin/clang/libLLVMARMCodeGen/Makefile === RCS file:

Re: mg: fgetln -> getline

2017-10-11 Thread Florian Obser
On Sun, Sep 17, 2017 at 02:56:32AM +, Scott Cheloha wrote: > Hi, > > This will make mg(1) ever so slightly more portable: downstream > will appreciate it. And fgetln(3) was recently deprecated. > > Misc. comments: > > The comments about NUL and "the last line problem" aren't per se >

Re: ifioctl() cleanup, step 2

2017-10-11 Thread Alexandr Nedvedicky
On Wed, Oct 11, 2017 at 12:43:45PM +0200, Martin Pieuchot wrote: > On 11/10/17(Wed) 12:28, Alexandr Nedvedicky wrote: > > Hello, > > > > just for my curiosity: > > > > why do you leave some returns untreated? is that intentional? > > Yes it is intentional to make the diff shorter and easier

Re: [PATCH] VMD: Remove switch on reload prior to re-creating

2017-10-11 Thread Carlos Cardenas
On 10/10/17 23:31, Claudio Jeker wrote: > On Tue, Oct 10, 2017 at 10:52:42PM -0700, Mike Larkin wrote: >> On Wed, Oct 11, 2017 at 06:46:22AM +0200, Claudio Jeker wrote: >>> On Tue, Oct 10, 2017 at 03:57:25PM -0700, Carlos Cardenas wrote: Destroy switch on `vmctl reload` to allow SIOCBRDGADD

Re: LLVM 5.0 on armv7

2017-10-11 Thread Patrick Wildt
On Wed, Oct 11, 2017 at 12:19:47PM +0200, Mark Kettenis wrote: > Diff below makes clang and lld build again on armv7. Sorted the files > such that they match the order in the CMakeLists.txt file. The lists are explicitly sorted alphabetically and not like in the CMakeLists. I would actually

Re: rw locks vs memory barriers and adaptive spinning

2017-10-11 Thread Martin Pieuchot
On 10/10/17(Tue) 20:19, Mateusz Guzik wrote: > On Tue, Oct 10, 2017 at 10:15:48AM +0200, Martin Pieuchot wrote: > > Hello Mateusz, > > > > On 09/10/17(Mon) 21:43, Mateusz Guzik wrote: > > > I was looking at rw lock code out of curiosity and noticed you always do > > > membar_enter which on

Re: ifioctl() cleanup, step 2

2017-10-11 Thread Martin Pieuchot
On 11/10/17(Wed) 12:28, Alexandr Nedvedicky wrote: > Hello, > > just for my curiosity: > > why do you leave some returns untreated? is that intentional? Yes it is intentional to make the diff shorter and easier to review. > just like here: > @@ -2048,8 +2048,11 @@ ifioctl(struct

additions

2017-10-11 Thread Martin Pieuchot
To make our CTF tools (and any ELF-related tool) easier to port to other OSes, I'd like to follow the Solaris/FreeBSD/OSX lead and use a header instead of our current mix of & . However devel/libelf will use instead of its own, if it is available. But with the current content of our two

Send sysctl_mq() where it belongs

2017-10-11 Thread Martin Pieuchot
sysctl_mq() messes with 'struct mbuf_queue' internals, so keep it in kern/uipc_mbuf.c with the rest of the mq* functions. ok? Index: net/if.c === RCS file: /cvs/src/sys/net/if.c,v retrieving revision 1.514 diff -u -p -r1.514 if.c

Re: LLVM 5.0 on armv7

2017-10-11 Thread Mark Kettenis
> Date: Wed, 11 Oct 2017 14:21:17 +0200 > From: Patrick Wildt > > On Wed, Oct 11, 2017 at 12:19:47PM +0200, Mark Kettenis wrote: > > Diff below makes clang and lld build again on armv7. Sorted the files > > such that they match the order in the CMakeLists.txt file. > > The

Re: [patch] hostname.if5 additional info on point to point addressing

2017-10-11 Thread Tom Smyth
Hello Stuart, all, Thanks for the corrections Stuart, I have corrected the patch to take into account your suggestions and I hope this proposed patch is more correct and useful Index: src/share/man/man5/hostname.if.5 === RCS file:

Re: IPsec w/o KERNEL_LOCK()

2017-10-11 Thread Alexander Bluhm
On Wed, Oct 11, 2017 at 05:01:46PM +0200, Martin Pieuchot wrote: > Tests and comments welcome. All regress tests passed. Code looks reasonable. OK bluhm@ > Index: net/if_enc.c > === > RCS file: /cvs/src/sys/net/if_enc.c,v >

route warning

2017-10-11 Thread Julien Dhaille
Hi, when a default gateway is not set : # route get 4.4.4.4 route: writing to routing socket: No such process this small patch uses oerrno translation : # route get 4.4.4.4 get host 4.4.4.4: not in table Index: route.c === RCS

Re: Send sysctl_mq() where it belongs

2017-10-11 Thread Alexander Bluhm
On Wed, Oct 11, 2017 at 02:58:21PM +0200, Martin Pieuchot wrote: > sysctl_mq() messes with 'struct mbuf_queue' internals, so keep it in > kern/uipc_mbuf.c with the rest of the mq* functions. I wonder whether it should be called mq_sysctl() as it will be located in the mq_ namespace. A grep for

IPsec w/o KERNEL_LOCK()

2017-10-11 Thread Martin Pieuchot
OpenBSD 6.2 includes nice performance and latency improvements due to the work done in the Network Stack in the previous years. However as soon as IPsec is enabled, all network related processing are affected. In other words you cannot profit from the last MP work in the Network stack if you use

Re: perl 5.24.3 update (OK?)

2017-10-11 Thread Alexander Bluhm
On Fri, Sep 22, 2017 at 06:56:27PM -0700, Andrew Fresh wrote: > Hoping this will be able to go in before the lock, I've heard good Updating Perl after unlock is better. Running with it for a while without problems. No library bump needed. OK bluhm@ for Perl v5.24.3

Re: ifioctl() cleanup, step 2

2017-10-11 Thread Alexander Bluhm
On Wed, Oct 11, 2017 at 10:44:22AM +0200, Martin Pieuchot wrote: > Moar cleanup to be able to selectively take the NET_LOCK() around some > ioctls. > > This diff change many "return (error)" into "break". It looks a bit inconsistent, where you replace the return and where not. But I am sure

Re: [PATCH] tests for vmd config parsing

2017-10-11 Thread Alexander Bluhm
On Tue, Oct 10, 2017 at 10:57:22PM -0700, Mike Larkin wrote: > On Tue, Oct 10, 2017 at 07:54:20PM -0700, Carlos Cardenas wrote: > > This patch adds a set of tests for vmd config parsing. > > > > Comments? Ok? > > > > ok by me. I think bluhm@ also looked at this. > > bluhm, ok to commit? > >

Re: mg: fgetln -> getline

2017-10-11 Thread Scott Cheloha
> On Oct 11, 2017, at 2:36 AM, Florian Obser wrote: > > On Sun, Sep 17, 2017 at 02:56:32AM +, Scott Cheloha wrote: >> >> >> if (buf[len - 1] == '\n') >> buf[len - 1] = '\0'; > > the diff reads fine to me, but code tends to get copied around, > can

Re: rw locks vs memory barriers and adaptive spinning

2017-10-11 Thread Mateusz Guzik
On Wed, Oct 11, 2017 at 03:15:42PM +0200, Martin Pieuchot wrote: > On 10/10/17(Tue) 20:19, Mateusz Guzik wrote: > > On Tue, Oct 10, 2017 at 10:15:48AM +0200, Martin Pieuchot wrote: > > > Hello Mateusz, > > > > > > On 09/10/17(Mon) 21:43, Mateusz Guzik wrote: > > > > I was looking at rw lock code

Re: [PATCH] VMD: Remove switch on reload prior to re-creating

2017-10-11 Thread Claudio Jeker
On Tue, Oct 10, 2017 at 10:52:42PM -0700, Mike Larkin wrote: > On Wed, Oct 11, 2017 at 06:46:22AM +0200, Claudio Jeker wrote: > > On Tue, Oct 10, 2017 at 03:57:25PM -0700, Carlos Cardenas wrote: > > > Destroy switch on `vmctl reload` to allow SIOCBRDGADD to succeed > > > when creating new bridge

Re: [PATCH] tests for vmd config parsing

2017-10-11 Thread Mike Larkin
On Tue, Oct 10, 2017 at 07:54:20PM -0700, Carlos Cardenas wrote: > This patch adds a set of tests for vmd config parsing. > > Comments? Ok? > ok by me. I think bluhm@ also looked at this. bluhm, ok to commit? -ml > > diff --git regress/usr.sbin/Makefile regress/usr.sbin/Makefile > index