Re: malloc: fix setting errno on out-of-memory

2016-05-10 Thread Otto Moerbeek
On Tue, May 10, 2016 at 02:48:18PM -0400, Daniel Micay wrote: > The ENOMEM errno wasn't being set in some code paths where it was gated > behind mopts.malloc_xmalloc: Called functions do set errno..., you're effectively overriding those. Which means those can go if this is applied. This needs

free size for descript tables

2016-05-10 Thread Ted Unangst
this is tricky, but not too hard. expanded dfff context to see the malloc. Index: kern_descrip.c === RCS file: /cvs/src/sys/kern/kern_descrip.c,v retrieving revision 1.130 diff -u -p -u -1 -7 -r1.130 kern_descrip.c --- kern_descrip.c

bcopy in libkvm

2016-05-10 Thread Ted Unangst
memcpy is newer and better. Index: kvm.c === RCS file: /cvs/src/lib/libkvm/kvm.c,v retrieving revision 1.59 diff -u -p -r1.59 kvm.c --- kvm.c 19 Dec 2015 18:40:30 - 1.59 +++ kvm.c 10 May 2016 22:46:07 - @@

Re: Allow top(1) to search arguments (again)

2016-05-10 Thread Ted Unangst
Edd Barrett wrote: > On Thu, Apr 28, 2016 at 03:26:48PM +0100, Edd Barrett wrote: > > Resubmitting this diff, as I've been unable to get an OK. > > Style tweaks fixed, as pointed out by Michal Mazurek. Thanks for this. > > OK? ok

Re: Allow top(1) to search arguments (again)

2016-05-10 Thread Edd Barrett
On Thu, Apr 28, 2016 at 03:26:48PM +0100, Edd Barrett wrote: > Resubmitting this diff, as I've been unable to get an OK. Style tweaks fixed, as pointed out by Michal Mazurek. Thanks for this. OK? Index: machine.c === RCS file:

smu(4) PWM Fan Support

2016-05-10 Thread Marcus Glocker
I've recently noticed that two of five fans in my G5 don't spin up. That's because smu(4) currently just supports RPM fans. The attached diff adds initial support for PWM fans as well. sysctl before: # sysctl -a | grep fan hw.sensors.smu0.fan0=994 RPM (Rear Fan 0) hw.sensors.smu0.fan1=994 RPM

Re: sed/regcomp bug?

2016-05-10 Thread Todd C. Miller
On Tue, 10 May 2016 22:34:54 +0200, Martijn van Duren wrote: > I reread the REG_STARTEND section again and it turns out I > misinterpreted it's intention and I thought the current behaviour > was wrong/incomplete. So the change was intentional, but for the > wrong reasons. > > I changed the diff

Re: malloc: add full delayed chunk double-free detection

2016-05-10 Thread Michael McConville
Daniel Micay wrote: > This uses a hash table to maintain a set of delayed allocations, > allowing full and efficient double-free detection. The current code > can only catch it when the two pointers being swapped are equal, so > double-frees that could be caught are missed. A naive loop over every

malloc: add full delayed chunk double-free detection

2016-05-10 Thread Daniel Micay
This uses a hash table to maintain a set of delayed allocations, allowing full and efficient double-free detection. The current code can only catch it when the two pointers being swapped are equal, so double-frees that could be caught are missed. A naive loop over every delayed chunk would work

Re: malloc: fix setting errno on out-of-memory

2016-05-10 Thread Daniel Micay
Sorry, my mail client was being stupid. Lets try again in good old mutt: diff --git a/stdlib/malloc.c b/stdlib/malloc.c index bc328d2..aa6f0a3 100644 --- a/stdlib/malloc.c +++ b/stdlib/malloc.c @@ -1224,8 +1224,9 @@ malloc(size_t size) r = omalloc(d, size, 0, CALLER); d->active--;

Re: sed/regcomp bug?

2016-05-10 Thread Ingo Schwarze
Hi Martijn, Martijn van Duren wrote on Tue, May 10, 2016 at 08:08:34PM +0200: > On 05/10/16 19:29, Ingo Schwarze wrote: >> Martijn van Duren wrote on Tue, May 10, 2016 at 02:43:54PM +0200: >>> Index: ./lib/libc/regex/engine.c >>>

malloc: fix setting errno on out-of-memory

2016-05-10 Thread Daniel Micay
The ENOMEM errno wasn't being set in some code paths where it was gated behind mopts.malloc_xmalloc: diff --git a/stdlib/malloc.c b/stdlib/malloc.c index bc328d2..aa6f0a3 100644 --- a/stdlib/malloc.c +++ b/stdlib/malloc.c @@ -1224,8 +1224,9 @@ malloc(size_t size) r = omalloc(d, size, 0,

Re: sed/regcomp bug?

2016-05-10 Thread Martijn van Duren
On 05/10/16 19:29, Ingo Schwarze wrote: > Hi Martijn, > > Martijn van Duren wrote on Tue, May 10, 2016 at 02:43:54PM +0200: > >> Index: ./lib/libc/regex/engine.c >> === >> RCS file: /cvs/src/lib/libc/regex/engine.c,v >> retrieving

Re: sed/regcomp bug?

2016-05-10 Thread Ingo Schwarze
Hi Martijn, Martijn van Duren wrote on Tue, May 10, 2016 at 02:43:54PM +0200: > Index: ./lib/libc/regex/engine.c > === > RCS file: /cvs/src/lib/libc/regex/engine.c,v > retrieving revision 1.19 > diff -u -p -r1.19 engine.c > ---

diff: httpd: add client side certificate checks + test

2016-05-10 Thread Jan Klemkow
Hi, This diff adds client side certificate checks to httpd. Most parts are straight forward. But, to transfer the whole certificate authority store to the server process through the imsg infrastructure I had to change this in an chunked transfer. The Documentation of this feature is included

Re: proot: why is it a bigger deal than you think

2016-05-10 Thread Marc Espie
On Tue, May 10, 2016 at 01:48:18PM +, Christian Weisgerber wrote: > On 2016-05-09, Marc Espie wrote: > > > So far, I've been underwhelmed by the response to proot. Seems people don't > > get the picture yet. > > Probably because there has been no coherent explanation what

make patch: more extensive sinclude support

2016-05-10 Thread Marc Espie
Both bmake and gmake support a list of files in include/sinclude "systemV style". Adding this to our make would make us slightly more compatible. It also allows modern dependency patterns a la .sinclude ${SRC:R:=.d} Just went thru a full make build. could use a few eyes. The change is

Re: proot: why is it a bigger deal than you think

2016-05-10 Thread Christian Weisgerber
On 2016-05-09, Marc Espie wrote: > So far, I've been underwhelmed by the response to proot. Seems people don't > get the picture yet. Probably because there has been no coherent explanation what proot is, how it works, and how to use it. -- Christian "naddy" Weisgerber

Re: sed/regcomp bug?

2016-05-10 Thread Martijn van Duren
ping any OKs? On 05/05/16 00:17, Martijn van Duren wrote: > Hello tech@, > > On 04/23/16 07:21, Jonathan Gray wrote on bugs@: >> $ cat foo.sh >> #!/bin/sh >> >> $1 -r ' >> s/[[:space:]]//g >> s/\> ' >> $ cat foo.csv >> R32G32B32A32_FLOAT , 128, 1, 1,

make mbufs in bpf const

2016-05-10 Thread David Gwynne
bpf only reads packets, so we can claim theyre const. now that we have the caller mark the packet as dropped based on the return from the tap functions, it simplifies some of the internals of the bpf code too. ok? Index: bpf.c ===