smtpd: if?

2013-07-03 Thread Maxime Villard
Hi, - - - src/usr.sbin/smtpd/smtpd.c l.1326 if (! bsnprintf(key, sizeof key, "profiling.imsg.%s.%s.%s", proc_name(smtpd_process), proc_name(p->proc), imsg_to_str(imsg->hdr.type)));<-- ';' stat_set(key, stat_timesp

tmux leaving zombie behind

2013-07-03 Thread patrick keshishian
Hi, Back in 2010 (Apri-ish according to google) I reported that tmux left a zombie process behind on initial launch. If user detached and reattached, the zombie process cleared. I even provided a patch, which I believe was accepted, but then replaced with a slightly different version. However, sin

Re: libc malloc poison

2013-07-03 Thread Ted Unangst
On Wed, Jul 03, 2013 at 17:21, Theo de Raadt wrote: >> + int pval = 0xd0d0caca; > > Can you explain the choice of this? I thought it sounded clever. > There are arguments to make this MI; other arguments to make it MD; > and other arguments to introduce a bit of randomness. > > I'd like t

Re: libc malloc poison

2013-07-03 Thread Theo de Raadt
> + int pval = 0xd0d0caca; Can you explain the choice of this? There are arguments to make this MI; other arguments to make it MD; and other arguments to introduce a bit of randomness. I'd like to know which arguments you have

libc malloc poison

2013-07-03 Thread Ted Unangst
change the junking to be word size. maybe later we can also change the values to be random or something. Index: stdlib/malloc.c === RCS file: /cvs/src/lib/libc/stdlib/malloc.c,v retrieving revision 1.149 diff -u -p -r1.149 malloc.c --

Re: Removing -Wno-format from kernel makefiles, 4/16

2013-07-03 Thread Mark Kettenis
> Date: Wed, 3 Jul 2013 16:55:46 +0200 (CEST) > From: Stefan Fritsch > > format string fixes: long > > --- > sys/arch/i386/i386/esm.c |2 +- > sys/kern/kern_descrip.c |4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git sys/arch/i386/i386/esm.c sys/arch/i386/i386

Re: Removing -Wno-format from kernel makefiles, 3/16

2013-07-03 Thread Mark Kettenis
> Date: Wed, 3 Jul 2013 16:51:43 +0200 (CEST) > From: Stefan Fritsch > > fix: cast void * to char *, fix format args for (u)int64_t > > (tc_frequency is unsigned) > > diff --git sys/arch/i386/i386/db_disasm.c sys/arch/i386/i386/db_disasm.c > index c9446a0..e5b9f4c 100644 > --- sys/a

Re: Removing -Wno-format from kernel makefiles, 2/16

2013-07-03 Thread Stefan Fritsch
On Wed, 3 Jul 2013, Mark Kettenis wrote: > > Date: Wed, 3 Jul 2013 16:40:17 +0200 (CEST) > > From: Stefan Fritsch > > > > don't pass empty format string in subr_disk.c > > > > this is necessary to enable -Wformat or -Wno-error=format > > Don't think this one makes much sense. Better to just do

Re: Removing -Wno-format from kernel makefiles, 5/16

2013-07-03 Thread Stefan Fritsch
cast time_t to long long (time_t is signed) tv_nsec is long --- sys/dev/vmt.c |4 ++-- sys/miscfs/procfs/procfs_status.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git sys/dev/vmt.c sys/dev/vmt.c index 5fb5e1e..34f1aec 100644 --- sys/dev/vmt.c ++

Re: Removing -Wno-format from kernel makefiles, 4/16

2013-07-03 Thread Stefan Fritsch
format string fixes: long --- sys/arch/i386/i386/esm.c |2 +- sys/kern/kern_descrip.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git sys/arch/i386/i386/esm.c sys/arch/i386/i386/esm.c index c90b2c4..3dff69e 100644 --- sys/arch/i386/i386/esm.c +++ sys/arch/i386/i386/

Removing -Wno-format from kernel makefiles, 3/16

2013-07-03 Thread Stefan Fritsch
fix: cast void * to char *, fix format args for (u)int64_t (tc_frequency is unsigned) diff --git sys/arch/i386/i386/db_disasm.c sys/arch/i386/i386/db_disasm.c index c9446a0..e5b9f4c 100644 --- sys/arch/i386/i386/db_disasm.c +++ sys/arch/i386/i386/db_disasm.c @@ -1192,7 +1192,7 @@ db_d

Re: Removing -Wno-format from kernel makefiles, 2/16

2013-07-03 Thread Mark Kettenis
> Date: Wed, 3 Jul 2013 16:40:17 +0200 (CEST) > From: Stefan Fritsch > > don't pass empty format string in subr_disk.c > > this is necessary to enable -Wformat or -Wno-error=format Don't think this one makes much sense. Better to just do: log(pri, "%s", ""); and keep the rest of the code a

Re: Removing -Wno-format from kernel makefiles, 1/16

2013-07-03 Thread Mark Kettenis
> Date: Wed, 3 Jul 2013 16:35:24 +0200 (CEST) > From: Stefan Fritsch > > add support for %td for ptrdiff_t in kernel > > this also adds support in gcc 4.x kprintf I'm on the fence about the CTASSERT here. If we ever support a code model that's not ILP32 or LP64, we need a major overhaul of the

Removing -Wno-format from kernel makefiles, 2/16

2013-07-03 Thread Stefan Fritsch
don't pass empty format string in subr_disk.c this is necessary to enable -Wformat or -Wno-error=format --- sys/kern/subr_disk.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git sys/kern/subr_disk.c sys/kern/subr_disk.c index 4b500c1..2b1036a 100644 --- sys/kern/su

Removing -Wno-format from kernel makefiles, 1/16

2013-07-03 Thread Stefan Fritsch
add support for %td for ptrdiff_t in kernel this also adds support in gcc 4.x kprintf --- gnu/gcc/gcc/c-format.c |7 --- sys/kern/subr_prf.c|6 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git gnu/gcc/gcc/c-format.c gnu/gcc/gcc/c-format.c index b9eecee..1b1734b

Re: Removing -Wno-format from kernel makefiles, V2

2013-07-03 Thread Stefan Fritsch
On Wednesday 03 July 2013, Alexander Bluhm wrote: > On Wed, Jul 03, 2013 at 01:46:11PM +0200, Stefan Fritsch wrote: > > which the patches are applied does not matter. Therefore I > > thought that people could either review by patch from the above > > directory or by source file from the combined pa

Re: Removing -Wno-format from kernel makefiles, V2

2013-07-03 Thread Theo de Raadt
Please always include diffs in the emails; don't force us to go to a browser.

Re: Removing -Wno-format from kernel makefiles, V2

2013-07-03 Thread Alexander Bluhm
On Wed, Jul 03, 2013 at 01:46:11PM +0200, Stefan Fritsch wrote: > which the patches are applied does not matter. Therefore I thought that > people could either review by patch from the above directory or by source > file from the combined patch, just as they are comfortable. I would then > commi

Re: Removing -Wno-format from kernel makefiles, V2

2013-07-03 Thread Mark Kettenis
> Date: Wed, 3 Jul 2013 13:46:11 +0200 (CEST) > From: Stefan Fritsch > > Hi, > > I have updated my patchset to enable format string warnings in kernel > builds. Changes from the first version: > > - Regarding pointer differences, this now takes the approach favored by > kettenis@ and adds sup

Removing -Wno-format from kernel makefiles, V2

2013-07-03 Thread Stefan Fritsch
Hi, I have updated my patchset to enable format string warnings in kernel builds. Changes from the first version: - Regarding pointer differences, this now takes the approach favored by kettenis@ and adds support for %td in the kernel but does not add a typedef for ptrdiff_t. - It now removes