Re: mo junk mo problems

2014-04-23 Thread Otto Moerbeek
On Tue, Apr 22, 2014 at 09:49:42PM -0400, Ted Unangst wrote: On Mon, Apr 14, 2014 at 12:12, Otto Moerbeek wrote: On Sun, Apr 13, 2014 at 06:34:17PM -0400, Ted Unangst wrote: I took another look at the way junk works in malloc, and there's a few improvements I'd like to make. I

Re: [patch ping.c] replace malloc memset with calloc

2014-04-23 Thread Florian Obser
On Tue, Apr 22, 2014 at 03:08:45PM -0400, pe...@petermalone.org wrote: Thanks Florian team. Please review the following diff. tab vs. space, more in sync with ping6 OK? diff --git ping.c ping.c index 6a13a86..29cf84c 100644 --- ping.c +++ ping.c @@ -70,6 +70,7 @@ #include ctype.h #include

Re: [PATCH| zero a freed pointer passed in a struct, to prevent reuse after free

2014-04-23 Thread Dirk Engling
On 23.04.14 07:42, patrick keshishian wrote: Why not kill the 'if (ret-name != NULL)' check while at it? I am currently working on a patch that removes all superflous NULL checks before every free function throughout libressl. There will be a single commit fixing this. erdgeist

Re: bpf(4) obsolete data-link levels

2014-04-23 Thread Henning Brauer
* Jérémie Courrèges-Anglas j...@wxcvbn.org [2014-04-23 02:05]: If I'm not mistaken, we had no drivers left that use those types? correct, swing the burning axe. ok. - case DLT_FDDI: - case DLT_ATM_RFC1483: -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services GmbH,

Re: [patch complete.c] never read variables

2014-04-23 Thread Jérémie Courrèges-Anglas
Fritjof Bornebusch frit...@alokat.org writes: Hi tech, matchlen = 0; is never used. Committed, thanks. Fritjof Index: complete.c === RCS file: /cvs/src/usr.bin/ftp/complete.c,v retrieving revision 1.26 diff -u -p -r1.26

AI_ADDRCONFIG

2014-04-23 Thread Simon Perreault
(I sent this diff to Éric Faurot on the 12th, but received no reply.) Tech, While everyone's having fun removing code from OpenSSL, I decided to add some to libasr. I implemented AI_ADDRCONFIG, a getaddrinfo() flag defined in RFC 2553/3493. Basically, it tells getaddrinfo() to skip IPvX

Re: [patch ping.c] replace malloc memset with calloc

2014-04-23 Thread Jérémie Courrèges-Anglas
Florian Obser flor...@openbsd.org writes: On Tue, Apr 22, 2014 at 03:08:45PM -0400, pe...@petermalone.org wrote: Thanks Florian team. Please review the following diff. tab vs. space, more in sync with ping6 OK? ok. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE

ping/ping6 minor cleanup

2014-04-23 Thread Jérémie Courrèges-Anglas
j...@wxcvbn.org (Jérémie Courrèges-Anglas) writes: Florian Obser flor...@openbsd.org writes: On Tue, Apr 22, 2014 at 03:08:45PM -0400, pe...@petermalone.org wrote: Thanks Florian team. Please review the following diff. tab vs. space, more in sync with ping6 OK? ok. Some changes I'd

Re: AI_ADDRCONFIG

2014-04-23 Thread Brad Smith
On Wed, Apr 23, 2014 at 08:09:06AM -0400, Simon Perreault wrote: (I sent this diff to ??ric Faurot on the 12th, but received no reply.) Tech, While everyone's having fun removing code from OpenSSL, I decided to add some to libasr. I implemented AI_ADDRCONFIG, a getaddrinfo() flag defined

Re: AI_ADDRCONFIG

2014-04-23 Thread Stuart Henderson
On 2014/04/23 08:09, Simon Perreault wrote: + else if (ifa-ifa_addr-sa_family == PF_INET6 so... family is ipv6 + !IN6_IS_ADDR_LOOPBACK( + ((struct sockaddr_in6 *)ifa-ifa_addr) +

Re: AI_ADDRCONFIG

2014-04-23 Thread Simon Perreault
Le 2014-04-23 11:43, Stuart Henderson a écrit : On 2014/04/23 08:09, Simon Perreault wrote: +else if (ifa-ifa_addr-sa_family == PF_INET6 so... family is ipv6 +!IN6_IS_ADDR_LOOPBACK( +((struct

wol support for bge

2014-04-23 Thread Stefan Sperling
The reason we don't enable WOL with bge cards is that they contain ASF firmware support which should not be exposed to untrusted traffic, so it's safer to power down bge devices altogether on power down. Since all bges except the rare 5700 version support ASF, this currently means no WOL support

Re: wol support for bge

2014-04-23 Thread Abel Abraham Camarillo Ojeda
This should work on sparc64? if so I can test in my sunfire v210... - this box isn't set up to build a kernel so it will be some work to make it build - On Wed, Apr 23, 2014 at 11:15 AM, Stefan Sperling s...@openbsd.org wrote: The reason we don't enable WOL with bge cards is that they contain

Re: wol support for bge

2014-04-23 Thread Stefan Sperling
On Wed, Apr 23, 2014 at 11:43:06AM -0500, Abel Abraham Camarillo Ojeda wrote: This should work on sparc64? I have no idea, honestly. But I don't see the point since sparc64 can often be powered up remotely via ALOM.

Re: wol support for bge

2014-04-23 Thread Abel Abraham Camarillo Ojeda
I know that, I just think I could do something fun with that box today... On Wed, Apr 23, 2014 at 11:54 AM, Stefan Sperling s...@openbsd.org wrote: On Wed, Apr 23, 2014 at 11:43:06AM -0500, Abel Abraham Camarillo Ojeda wrote: This should work on sparc64? I have no idea, honestly. But I

[patch] cvs some values never read

2014-04-23 Thread Fritjof Bornebusch
Hi tech, there are some set operations, which are never read. Fritjof Index: rcsparse.c === RCS file: /cvs/src/usr.bin/cvs/rcsparse.c,v retrieving revision 1.7 diff -u -p -r1.7 rcsparse.c --- rcsparse.c 3 Jun 2013 17:04:35 -

[PATCH] xenocara/app/cwm: don't require quotes in autogroup configuration

2014-04-23 Thread Kent R. Spillner
I think I sent this out a long time ago but never followed up on it. :( According to cwmrc(5) you can configure an autogroup like so: autogroup group windowname,windowclass However, parse.y doesn't actually accept that syntax; you have to put quotes around windowname,windowclass so they're

Re: [patch] cvs some values never read

2014-04-23 Thread Henning Brauer
* Fritjof Bornebusch frit...@alokat.org [2014-04-23 19:30]: there are some set operations, which are never read. RCS file: /cvs/src/usr.bin/cvs/rcsparse.c,v guess we need to decide what to do with opencvs really. either there is someone who cares and picks it up, or we can straight delete it.

Re: [PATCH] usr.bin/sdiff/sdiff.c prompt bikeshedding

2014-04-23 Thread Kent R. Spillner
Moar bikeshedding: Index: sdiff.c === RCS file: /work/cvsroot/src/usr.bin/sdiff/sdiff.c,v retrieving revision 1.30 diff -p -u -r1.30 sdiff.c --- sdiff.c 26 Nov 2013 21:08:12 - 1.30 +++ sdiff.c 23 Apr 2014 17:58:07

Re: [patch] cvs some values never read

2014-04-23 Thread Fritjof Bornebusch
* Fritjof Bornebusch frit...@alokat.org [2014-04-23 19:30]: there are some set operations, which are never read. RCS file: /cvs/src/usr.bin/cvs/rcsparse.c,v guess we need to decide what to do with opencvs really. either there is

Re: [patch] cvs some values never read

2014-04-23 Thread Henning Brauer
* Fritjof Bornebusch frit...@alokat.org [2014-04-23 20:15]: * Fritjof Bornebusch frit...@alokat.org [2014-04-23 19:30]: there are some set operations, which are never read. RCS file: /cvs/src/usr.bin/cvs/rcsparse.c,v guess we need to decide

Re: [patch] cvs some values never read

2014-04-23 Thread Fritjof Bornebusch
* Fritjof Bornebusch frit...@alokat.org [2014-04-23 20:15]: * Fritjof Bornebusch frit...@alokat.org [2014-04-23 19:30]: there are some set operations, which are never read. RCS file:

ahci BSY retry

2014-04-23 Thread Chris Cappuccio
Peter J. Philipp recently ran into this on his Intel AHCI+Intel SSD system (see misc from yesterday): ahci2 at pci0 dev 31 function 2 Intel 8 Series AHCI rev 0x05: msi, AHCI 1.3 ahci2: device on port 1 didn't come ready, TFD: 0x80BSY ahci2: stopping the port, softreset slot 31 was still active.

[PATCH] ssh: variables never read

2014-04-23 Thread Fritjof Bornebusch
Hi tech, there are some unread set operations in the ssh code. Fritjof Index: clientloop.c === RCS file: /cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.258 diff -u -p -r1.258 clientloop.c --- clientloop.c2 Feb

libssl/src/apps don't cast {m,re}alloc

2014-04-23 Thread Thomas Pfaff
Don't cast {m,re}alloc. No point and it's inconsistent already. Index: apps.c === RCS file: /cvs/src/lib/libssl/src/apps/apps.c,v retrieving revision 1.42 diff -u -p -r1.42 apps.c --- apps.c 22 Apr 2014 14:54:13 - 1.42

Re: wol support for bge

2014-04-23 Thread Mark Kettenis
Date: Wed, 23 Apr 2014 11:43:06 -0500 From: Abel Abraham Camarillo Ojeda acam...@verlet.org This should work on sparc64? Unlikely.

Re: ahci BSY retry

2014-04-23 Thread Ian Darwin
On 2014-04-23 3:50 PM, Chris Cappuccio wrote: Peter J. Philipp recently ran into this on his Intel AHCI+Intel SSD system (see misc from yesterday): ahci2 at pci0 dev 31 function 2 Intel 8 Series AHCI rev 0x05: msi, AHCI 1.3 ahci2: device on port 1 didn't come ready, TFD: 0x80BSY ahci2:

Re: libssl/src/apps don't cast {m,re}alloc

2014-04-23 Thread Jean-Philippe Ouellet
This doesn't fix the problems, only removes markers alerting us to audit it. Memory management in these files is still missing integer overflow checks, NULL return checks, and is full of crazy abominations like: X509_NAME * parse_name(char *subject, long chtype, int multirdn) { size_t

libssl/src/crypto/x86_64cpuid.pl Vallhalla breakage

2014-04-23 Thread Ian Mcwilliam
(cd /usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/ ;  /usr/bin/perl ./x86_64cpuid.pl) x86_64cpuid.S syntax error at ./x86_64cpuid.pl line 198, near print Execution of ./x86_64cpuid.pl aborted due to compilation errors. *** Error 255 in lib/libcrypto/crypto (arch/amd64/Makefile.inc:54

Re: libssl/src/crypto/x86_64cpuid.pl Vallhalla breakage

2014-04-23 Thread Ted Unangst
On Thu, Apr 24, 2014 at 00:21, Ian Mcwilliam wrote: (cd /usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/ ; /usr/bin/perl ./x86_64cpuid.pl) x86_64cpuid.S syntax error at ./x86_64cpuid.pl line 198, near print Execution of ./x86_64cpuid.pl aborted due to compilation errors. *** Error 255

[patch bin/cp/utils.c] replace malloc memset with calloc

2014-04-23 Thread Peter Malone
Hi, Similar to previous patches replacing malloc memset with calloc. This time in src/bin/cp/utils.c Please let me know if this doesn't paste correctly this time. I suspect it's ok now. If not, I may just cry. I also attached it (I hope that's not frowned upon). Cheers! Index: utils.c

[patch bin/systrace/intercept.c] replace malloc memset with calloc

2014-04-23 Thread Peter Malone
Hi, Similar to previous patches replacing malloc memset with calloc, this time in src/bin/systrace/intercept.c Index: intercept.c === RCS file: /cvs/src/bin/systrace/intercept.c,v retrieving revision 1.60 diff -u -p -u -r1.60

Re: [patch bin/systrace/intercept.c] replace malloc memset with calloc

2014-04-23 Thread Ted Unangst
On Wed, Apr 23, 2014 at 21:24, Peter Malone wrote: Hi, Similar to previous patches replacing malloc memset with calloc, this time in src/bin/systrace/intercept.c - tlnew = malloc(sizeof(struct intercept_translate)); + tlnew = calloc(1, sizeof(struct intercept_translate));

Re: [patch bin/cp/utils.c] replace malloc memset with calloc

2014-04-23 Thread Ted Unangst
On Wed, Apr 23, 2014 at 21:15, Peter Malone wrote: Similar to previous patches replacing malloc memset with calloc. This time in src/bin/cp/utils.c Damn, I wrote this code. Thanks. Please let me know if this doesn't paste correctly this time. I suspect it's ok now. If not, I may just cry.

[patch sbin/nfsd/nfsd.c] replace malloc memset with calloc

2014-04-23 Thread Peter Malone
Hi, Similar to the others. malloc memset replacement with calloc, this time in sbin/nfsd/nfsd.c Index: nfsd.c === RCS file: /cvs/src/sbin/nfsd/nfsd.c,v retrieving revision 1.32 diff -u -p -u -r1.32 nfsd.c --- nfsd.c 11 Mar

Re: [patch bin/systrace/intercept.c] replace malloc memset with calloc

2014-04-23 Thread Peter Malone
As Ned Flanders infamously said... Take out the crayolas and color me tickled pink. Here's the _actual_ patch. Index: intercept.c === RCS file: /cvs/src/bin/systrace/intercept.c,v retrieving revision 1.60 diff -u -p -u -r1.60

Re: [patch sbin/nfsd/nfsd.c] replace malloc memset with calloc

2014-04-23 Thread Ted Unangst
On Wed, Apr 23, 2014 at 21:38, Peter Malone wrote: Hi, Similar to the others. malloc memset replacement with calloc, this time in sbin/nfsd/nfsd.c fd_size = howmany(maxsock + 1, NFDBITS) * sizeof(fd_mask); - sockbits = malloc(fd_size); + sockbits = calloc(1, fd_size);

Re: [patch sbin/nfsd/nfsd.c] replace malloc memset with calloc

2014-04-23 Thread Peter Malone
Sounds good. I'll work on that tomorrow afternoon/evening. On 04/23/14 21:55, Ted Unangst wrote: On Wed, Apr 23, 2014 at 21:38, Peter Malone wrote: Hi, Similar to the others. malloc memset replacement with calloc, this time in sbin/nfsd/nfsd.c fd_size = howmany(maxsock + 1, NFDBITS)

sudo alloc.c -- cleanup required?

2014-04-23 Thread Peter Malone
Hi, I see something with sudo which I would like to raise with the team. This impacts most of the source files in the sudo package. Before I go down this rat hole, I wanted to run it by you folks to see if you agree. /* * If there is no SIZE_MAX or SIZE_T_MAX we have to assume that size_t *

[patch src/usr.bin/mg/undo.c] replace malloc memset with calloc

2014-04-23 Thread Peter Malone
Hi, Same as the others, this time with src/usr.bin/mg/undo.c Index: undo.c === RCS file: /cvs/src/usr.bin/mg/undo.c,v retrieving revision 1.55 diff -u -p -u -r1.55 undo.c --- undo.c 20 Mar 2014 07:47:29 - 1.55 +++

[patch usr.sbin/snmpd/mib.c] replace malloc memset with calloc

2014-04-23 Thread Peter Malone
Hi, Same as the others. Replace malloc memset with calloc in usr.sbin/snmpd/mib.c Index: mib.c === RCS file: /cvs/src/usr.sbin/snmpd/mib.c,v retrieving revision 1.67 diff -u -p -u -r1.67 mib.c --- mib.c 8 Apr 2014 14:04:11

[patch usr.sbin/rwhod/rwhod.c] replace malloc memset with calloc

2014-04-23 Thread Peter Malone
Hi, Same as the others, replace malloc memset with calloc. This time in usr.sbin/rwhod/rwhod.c. Good night! Index: rwhod.c === RCS file: /cvs/src/usr.sbin/rwhod/rwhod.c,v retrieving revision 1.36 diff -u -p -u -r1.36 rwhod.c ---

[PATCH] xenocara/app/cwm: kill unnecessary memset in conf.c

2014-04-23 Thread Kent R. Spillner
The diff below removes an unncessary memset() on line 253 of conf.c. cwm used to support reloading the config file, but okan@ removed that functionality about a year ago in favor of simply restarting the whole thing. So while it used to be possible to call conf_init() multiple times, it is now

Re: [patch src/usr.bin/mg/undo.c] replace malloc memset with calloc

2014-04-23 Thread Miod Vallat
Same as the others, this time with src/usr.bin/mg/undo.c You are now losing a memset() in the `rec doesn't come from malloc' code path. Index: undo.c === RCS file: /cvs/src/usr.bin/mg/undo.c,v retrieving revision 1.55 diff -u

[PATCH] xenocara/app/cwm: remove unnecessary zero size check from xmalloc()

2014-04-23 Thread Kent R. Spillner
The diff below removes the check for siz == 0 in xmalloc() because it is unnecessary. I was curious about the check for siz == 0 in xmalloc() when I first saw it, so I dug in further and came to the conclusion it's unnecessary: * It errors out immediately, so aside from the zero size specific

patch: libssl/src/ssl/t1_enc.c

2014-04-23 Thread Michael W. Bombardieri
Hi tech@, Submitting patch to simplify code around free(3) in libssl. free() already handles the NULL case. Does this look ok? - Michael Index: t1_enc.c === RCS file: /cvs/src/lib/libssl/src/ssl/t1_enc.c,v retrieving revision

Re: sudo alloc.c -- cleanup required?

2014-04-23 Thread Nayden Markatchev
Hi, On Wed, Apr 23, 2014 at 8:08 PM, Peter Malone pe...@petermalone.org wrote: Hi, I see something with sudo which I would like to raise with the team. This impacts most of the source files in the sudo package. Before I go down this rat hole, I wanted to run it by you folks to see if you