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

2014-04-21 Thread Otto Moerbeek
On Tue, Apr 22, 2014 at 12:45:25AM -0400, Peter Malone wrote: Hi, malloc memset can be replaced with calloc in ping.c. Please see below for patch details: Better rework this to get rid of fdmasks. -Otto Index: ping.c

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

2014-04-22 Thread Otto Moerbeek
, (fd_set *)NULL, timeout) 1) Quoting Otto Moerbeek o...@drijf.net: On Tue, Apr 22, 2014 at 12:45:25AM -0400, Peter Malone wrote: Hi, malloc memset can be replaced with calloc in ping.c. Please see below for patch details: Better rework this to get rid of fdmasks. -Otto

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: IPv6 by default

2014-04-29 Thread Otto Moerbeek
On Tue, Apr 29, 2014 at 10:04:35AM -0400, Simon Perreault wrote: Le 2014-04-29 09:55, Henning Brauer a ?crit : Wouldn't it be better if libasr would run A and requests in parallel? Whichever response arrives first wins. no, since that gives extremely unpredictable results. How

Re: IPv6 by default

2014-04-29 Thread Otto Moerbeek
On Tue, Apr 29, 2014 at 04:57:28PM +, Christian Weisgerber wrote: On 2014-04-29, Mark Kettenis mark.kette...@xs4all.nl wrote: Google's data [1] shows a few third-world countries where what you say is true, plus Japan because of a single particularly broken ISP [2]. Isn't there a

Re: better free checking

2014-05-16 Thread Otto Moerbeek
On Wed, May 14, 2014 at 03:28:02PM -0400, Ted Unangst wrote: As I learned the hard way not long ago, free() doesn't detect all errors because of the delay mechanism. We can make two improvements. 1. Perform the sanity checking from free_bytes before we insert something into the delay array.

Re: better free checking

2014-05-16 Thread Otto Moerbeek
On Wed, May 14, 2014 at 03:28:02PM -0400, Ted Unangst wrote: As I learned the hard way not long ago, free() doesn't detect all errors because of the delay mechanism. We can make two improvements. 1. Perform the sanity checking from free_bytes before we insert something into the delay array.

move all stats under MALLOC_STATS

2014-05-22 Thread Otto Moerbeek
Hi, some stats are always computed. Move them under #ifdef MALLOC_STATS And a small thing for error reporting. ok? -Otto Index: malloc.c === RCS file: /cvs/src/lib/libc/stdlib/malloc.c,v retrieving revision 1.165 diff -u

move random bytes buffer to mmap'ed region

2014-05-29 Thread Otto Moerbeek
Hi, more localized data access, and there's room in the allocated page(s) anyway. ok? -Otto Index: malloc.c === RCS file: /cvs/src/lib/libc/stdlib/malloc.c,v retrieving revision 1.166 diff -u -p -r1.166 malloc.c ---

ld.so malloc

2014-06-02 Thread Otto Moerbeek
1970 00:00:00 - +++ malloc.c2 Jun 2014 12:35:48 - @@ -0,0 +1,1022 @@ +/* $OpenBSD: malloc.c,v 1.166 2014/05/26 06:19:07 otto Exp $ */ +/* + * Copyright (c) 2008, 2010, 2011 Otto Moerbeek o...@drijf.net + * Copyright (c) 2012 Matthew Dempsky matt...@openbsd.org + * Copyright (c

ld.so take 2

2014-06-05 Thread Otto Moerbeek
: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $ */ +/* + * Copyright (c) 2008 Otto Moerbeek o...@drijf.net + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice

Re: ld.so take 2

2014-06-05 Thread Otto Moerbeek
OK, Grrr... messed this up, sent thw wrong version. Both the To: header and the text contain errors, but the intend should be clear. Diff is the right version. Take care when replying. -Otto On Thu, Jun 05, 2014 at 02:22:01PM +0200, Otto Moerbeek wrote: Hi, The new malloc has

Re: ld.so take 2

2014-06-05 Thread Otto Moerbeek
On Thu, Jun 05, 2014 at 09:04:25AM -0600, Theo de Raadt wrote: + if (optr != NULL) { + _dl_write(STDERR_FILENO, msg1, sizeof(msg1) - 1); + _dl_exit(7); + } I think this is a trap. A true realloc is not much to add. It can be the simple always

mfi(4) vs WT and WB

2014-06-06 Thread Otto Moerbeek
Hi, I have an PERC 6/i Integrated adapter here: mfi0 at pci2 dev 0 function 0 Symbios Logic SAS1078 rev 0x04: apic 1 int 0 mfi0: PERC 6/i Integrated, firmware 6.2.0-0013, 256MB cache Which has an OK battery but still reports itself as being in WT mode: # sysctl hw.sensors.mfi0.indicator0

Re: mfi(4) vs WT and WB

2014-06-06 Thread Otto Moerbeek
On Fri, Jun 06, 2014 at 02:46:35PM -0400, Jim wrote: On Fri, Jun 06, 2014 at 11:45:49AM +0200, Otto Moerbeek wrote: Hi, I have an PERC 6/i Integrated adapter here: mfi0 at pci2 dev 0 function 0 Symbios Logic SAS1078 rev 0x04: apic 1 int 0 mfi0: PERC 6/i Integrated, firmware 6.2.0

Re: mfi(4) vs WT and WB

2014-06-10 Thread Otto Moerbeek
On Fri, Jun 06, 2014 at 08:54:24PM +0200, Otto Moerbeek wrote: This volumes feel pretty fast, so I suspect caching mode is OK. Still it is confusing to have a flag that doesn't reflect reality. I'm planning to upgrade the firmware next week. We'll see if that changes anything. BTW, al

Re: mfi(4) vs WT and WB

2014-06-10 Thread Otto Moerbeek
On Tue, Jun 10, 2014 at 09:52:23PM +0200, Mark Kettenis wrote: Date: Tue, 10 Jun 2014 21:34:56 +0200 From: Otto Moerbeek o...@drijf.net On Fri, Jun 06, 2014 at 08:54:24PM +0200, Otto Moerbeek wrote: This volumes feel pretty fast, so I suspect caching mode is OK. Still

Re: ld.so take 2

2014-06-14 Thread Otto Moerbeek
On Fri, Jun 06, 2014 at 10:11:57AM +0200, Otto Moerbeek wrote: On Thu, Jun 05, 2014 at 09:41:03AM -0600, Theo de Raadt wrote: The new malloc has been comitted, so now take the next step. This changes _dl_malloc to a regular non-zeroing _dl_malloc and uses _dl_calloc

Re: Undefined symbol in ld.so

2014-06-24 Thread Otto Moerbeek
On Tue, Jun 24, 2014 at 01:30:55AM -0700, William Orr wrote: ld.so in -current isn't building right now, due to an undefined reference to _dl_realloc caused by the recent addition of _dl_reallocarray. The following diff implements _dl_realloc, largely copied from the implementation in

Re: cvs admin for commitids

2014-06-30 Thread Otto Moerbeek
On Sun, Jun 29, 2014 at 07:37:18PM -0500, joshua stein wrote: This adds a -C option to cvs's admin command which can add, change, or delete a revision's commitid. I couldn't find any similar functionality in any other CVS implementations, nor any using 'admin -C'. Add or change a

Re: sort(1) updates

2014-07-02 Thread Otto Moerbeek
On Tue, Jul 01, 2014 at 03:56:39PM -0400, Jared Yanovich wrote: On Mon, Jun 30, 2014 at 11:53:04AM +0200, Otto Moerbeek wrote: This indeed solves some problems, but I have a test file on which it cores. Patch relative to the original diff I posted. diff -ru sort.new/fsort.c sort.new2

Re: sort(1) updates

2014-07-02 Thread Otto Moerbeek
Op 2 jul. 2014 om 15:03 heeft Jared Yanovich slovic...@gmail.com het volgende geschreven: On Wed, Jul 02, 2014 at 12:37:53PM +0200, Otto Moerbeek wrote: On Tue, Jul 01, 2014 at 03:56:39PM -0400, Jared Yanovich wrote: This works better indeed. But is initing the int member only safe

Re: sort(1) updates

2014-07-02 Thread Otto Moerbeek
On Wed, Jul 02, 2014 at 02:11:11PM -0400, Ted Unangst wrote: On Wed, Jul 02, 2014 at 12:37, Otto Moerbeek wrote: On Tue, Jul 01, 2014 at 03:56:39PM -0400, Jared Yanovich wrote: On Mon, Jun 30, 2014 at 11:53:04AM +0200, Otto Moerbeek wrote: This indeed solves some problems, but I have

Re: sort(1) updates

2014-07-06 Thread Otto Moerbeek
On Sat, Jul 05, 2014 at 01:09:51PM -0400, Jared Yanovich wrote: On Wed, Jul 02, 2014 at 12:45:04PM -0400, Jared Yanovich wrote: Index: fsort.c If this patch is accepted it should include the NetBSD copyright I forgot to include. There's more to be done here, such as: $ { echo 0;

Re: growfs error message, lack of comprehension

2014-07-08 Thread Otto Moerbeek
On Tue, Jul 08, 2014 at 09:41:08PM -0500, Adam Thompson wrote: On 5.4-RELEASE, I'm trying to use growfs to expand a root filesystem. I've grown the disk from 2GB to 10GB, I've used disklabel(8) to adjust the OpenBSD area and the size of partition 'a'. All those numbers line up. Rebooting

Re: PATCH: add more malloc.conf details to malloc.3

2014-07-11 Thread Otto Moerbeek
On Fri, Jul 11, 2014 at 01:38:23AM -0600, Theo de Raadt wrote: I am a bit concerned. The description is trying too hard to be overly precise, and may be cumbersome for the typical reader of this page. indeed, and I also dislike putting too much implementation details into a man page. Things

Re: faster malloc in threads

2014-07-11 Thread Otto Moerbeek
On Fri, Jul 11, 2014 at 06:28:04AM -0400, Ted Unangst wrote: We don't need to hold the malloc lock when making syscalls like mmap and munmap if we're just a little careful about the order of operations. This will allow other threads to concurrently allocate perhaps smaller chunks while the

Re: lynx: disable old protocols

2014-07-13 Thread Otto Moerbeek
On Sun, Jul 13, 2014 at 02:26:10AM -0500, Shawn K. Quinn wrote: On Sat, 2014-07-12 at 23:58 -0700, William Orr wrote: wrt. auditing it, should we send patches here? Or upstream? I'd send them both places, if they apply cleanly to both sets of code. Otherwise, send them here. I'd love to be

Re: faster malloc in threads

2014-07-14 Thread Otto Moerbeek
On Sat, Jul 12, 2014 at 01:10:38PM -0400, Ted Unangst wrote: On Fri, Jul 11, 2014 at 08:11, Ted Unangst wrote: I also think there's one simple case that can be added: the MMAP call at the bottom of map(). On further inspection, I think this needed a slight reordering to be safe. I

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-18 Thread Otto Moerbeek
On Thu, Sep 18, 2014 at 08:40:44AM +0100, bytevolc...@safe-mail.net wrote: This patch adds an option -t template to mount_tmpfs, which populates the new tmpfs volume with a directory immediately after creation. Man page update included for explanation. Much of the code was grafted from

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Otto Moerbeek
On Fri, Sep 19, 2014 at 10:21:13PM +1000, Adam wrote: Patch for argument parsing below. Diff taken in relation to Revision 3 of the aforementioned patch. I do not understand why this should be a separate diff for this, as it is essentially part of the functionality itself. Let me know

Re: swap affinity?

2014-09-20 Thread Otto Moerbeek
On Fri, Sep 19, 2014 at 10:05:35PM -0700, patrick keshishian wrote: Hi, Just ran into something strange. I was running 'sudo cdio cdrip' and in another shell running a memory-hungry perl script, this caused a bunch of processes to swap out (namely Xorg). Once the cdrip was done, and I

Re: [Patch]openrcs: atoi to strtonum

2014-09-24 Thread Otto Moerbeek
On Wed, Sep 24, 2014 at 05:13:47PM +0200, Fritjof Bornebusch wrote: Hi, I changed atoi to strtonum in order to avoid overflows. One concern: atoi() does not mind trailing stuff, while strtonum() does. Did you verify that the strings are just numbers in all cases? -Otto fritjof

Re: [Patch]openrcs: atoi to strtonum

2014-09-27 Thread Otto Moerbeek
On Fri, Sep 26, 2014 at 09:23:08PM +0200, Fritjof Bornebusch wrote: On Wed, Sep 24, 2014 at 10:31:17PM +0200, Otto Moerbeek wrote: Hi, On Wed, Sep 24, 2014 at 05:13:47PM +0200, Fritjof Bornebusch wrote: Hi, I changed atoi to strtonum in order to avoid overflows. One

Re: [Patch] avoid typecast

2014-09-27 Thread Otto Moerbeek
On Sat, Sep 27, 2014 at 03:48:54PM +0200, Fritjof Bornebusch wrote: Hi, there is no need for the typecast. Committed, thanks, -Otto fritjof Index: xmalloc.c === RCS file: /cvs/src/usr.bin/rcs/xmalloc.c,v

Re: [Patch] use exit() directly in usage()

2014-09-30 Thread Otto Moerbeek
On Tue, Sep 30, 2014 at 10:05:00AM +0100, Nicholas Marriott wrote: If we do this then these usage functions also need to be marked __dead. Agreed, Fritjof, can you aadd that to your diff? -Otto On Sat, Sep 27, 2014 at 07:10:01PM +0200, Fritjof Bornebusch wrote: Hi, after

Re: [patch]lock and unlock like GnuRCS

2014-10-01 Thread Otto Moerbeek
On Wed, Oct 01, 2014 at 07:58:16PM -0700, Philip Guenther wrote: On Wed, Oct 1, 2014 at 4:41 PM, Daniel Dickman didick...@gmail.com wrote: posix commands (like ls(1) for example) keep the last option when mutually exclusive options are specified. does it make sense to keep rcs consistent

Re: [Patch] use exit() directly in usage()

2014-10-01 Thread Otto Moerbeek
On Wed, Oct 01, 2014 at 05:41:11PM -0500, Kent R. Spillner wrote: ok kspillner@. It would be nice to replace some of those exit(1) with exit(EXIT_FAILURE), but that should be a separate diff that also updates the err/errx's as well. In general EXIT_XXX is frowned upon in OpenBSD.

Re: [patch]lock and unlock like GnuRCS

2014-10-07 Thread Otto Moerbeek
to happen then better to match -l -u like Fritjof's diff. On Fri, Oct 03, 2014 at 12:55:35PM +0200, Otto Moerbeek wrote: On Thu, Oct 02, 2014 at 12:56:10AM +0100, Nicholas Marriott wrote: OTOH, check out what we do with rcs -L and -U... I kinda like that, because it tells you

Re: [patch]lock and unlock like GnuRCS

2014-10-07 Thread Otto Moerbeek
On Tue, Oct 07, 2014 at 02:56:07PM +0200, Fritjof Bornebusch wrote: On Tue, Oct 07, 2014 at 09:34:33AM +0200, Otto Moerbeek wrote: On Tue, Oct 07, 2014 at 03:10:44AM -0400, Daniel Dickman wrote: Fritjof, have you let the gnu rcs project know about the segfault? Maybe see how

Re: On this -lightly loaded- machine a second lasts two or three seconds

2014-10-28 Thread Otto Moerbeek
On Tue, Oct 28, 2014 at 04:42:55AM -0600, Abel Abraham Camarillo Ojeda wrote: $ while sleep 1; do date; done Tue Oct 28 04:34:04 CST 2014 Tue Oct 28 04:34:06 CST 2014 Tue Oct 28 04:34:08 CST 2014 Tue Oct 28 04:34:11 CST 2014 Tue Oct 28 04:34:13 CST 2014 Tue Oct 28 04:34:15 CST 2014 Tue

Re: fsck vs fsck_ffs WHAT'S THE DIFFERENCE?

2013-06-18 Thread Otto Moerbeek
On Tue, Jun 18, 2013 at 11:09:20AM -0700, Matthew Dempsky wrote: On Tue, Jun 18, 2013 at 11:04 AM, laborat...@cpnetserver.net wrote: Please, What is the difference between 'fsck' and 'fsck_ffs' command? fsck detects the filesystem on disk and runs the appropriate fsck_${FILESYSTEM}

Re: help X11 performance: make sigprocmask(2) SY_NOLOCK

2013-06-20 Thread Otto Moerbeek
On Wed, Jun 19, 2013 at 07:39:15PM +, Miod Vallat wrote: - p-p_sigmask = mask ~ sigcantmask; + p-p_sigmask = mask; On the right architecture where a word store isn't atomic enough and with the right compiler that decides to put p_sigmask on an

panic while resuming with connected ucom

2013-06-21 Thread Otto Moerbeek
Hi, I have a Thinkpad T430 with an internal 3G modem that shows up as a (couple of) umodem. If I have a connection to the corresponding ucom active (with cu or pppd) and suspend the machine followed by a resume, it panics (or rather gets a trap) during resume; hand typed: kernel: protection

Re: libc malloc poison

2013-07-05 Thread Otto Moerbeek
On Thu, Jul 04, 2013 at 05:24:20PM +0200, Mark Kettenis wrote: From: Theo de Raadt dera...@cvs.openbsd.org Date: Thu, 04 Jul 2013 09:04:54 -0600 I suspect the best approach would be a hybrid value. The upper half of the address should try to land in an unmapped zone, or into the zero

Re: SSLHonorCipherOrder for OpenBSD's httpd

2013-07-07 Thread Otto Moerbeek
On Sun, Jul 07, 2013 at 08:40:52PM -0700, Aaron Stellman wrote: On Mon, Jul 08, 2013 at 05:30:22AM +0200, J??r??mie Courr??ges-Anglas wrote: Otto Moerbeek had already done work about this, but no one commented on the mailing-list: http://marc.info/?l=openbsd-techm=136670100711787w=2 I am

Re: SSLHonorCipherOrder for OpenBSD's httpd

2013-07-07 Thread Otto Moerbeek
On Sun, Jul 07, 2013 at 08:18:18PM -0700, Aaron Stellman wrote: As you may or may not know, SSLHonorCipherOrder is supported since apache 2.1. This diff ports this feature to OpenBSD's httpd. Its effects can be tested @ https://www.ssllabs.com/ssltest/analyze.html?d=example.com by playing

Re: base apache and HonorCipherOrder

2013-07-09 Thread Otto Moerbeek
On Mon, Jul 08, 2013 at 01:53:46PM +1000, Damien Miller wrote: On Sun, 7 Jul 2013, Aaron Stellman wrote: On Tue, Apr 23, 2013 at 09:08:19AM +0200, Otto Moerbeek wrote: If there is any interest, I might add the manual stuff, get ok's and commit it. I find it useful to have

Re: SSLHonorCipherOrder for OpenBSD's httpd

2013-07-10 Thread Otto Moerbeek
On Sun, Jul 07, 2013 at 10:17:11PM -0700, Aaron Stellman wrote: On Mon, Jul 08, 2013 at 07:06:43AM +0200, Otto Moerbeek wrote: I think you missed the renogiate case. Anyway, I posted almost the same diff some time ago. You're right -- renegotiate case was missed. Your patch from April

Re: SSLHonorCipherOrder for OpenBSD's httpd

2013-07-11 Thread Otto Moerbeek
On Wed, Jul 10, 2013 at 10:28:32AM +0200, Otto Moerbeek wrote: On Sun, Jul 07, 2013 at 10:17:11PM -0700, Aaron Stellman wrote: On Mon, Jul 08, 2013 at 07:06:43AM +0200, Otto Moerbeek wrote: I think you missed the renogiate case. Anyway, I posted almost the same diff some time ago

Re: SSLHonorCipherOrder for OpenBSD's httpd

2013-07-12 Thread Otto Moerbeek
Example lines for the config file. ok? -Otto Index: httpd.conf === RCS file: /cvs/src/usr.sbin/httpd/conf/httpd.conf,v retrieving revision 1.26 diff -u -p -r1.26 httpd.conf --- httpd.conf 3 Jun 2009 18:28:21 -

Re: src/sbin/ifconfig: missing include

2013-08-19 Thread Otto Moerbeek
On Mon, Aug 19, 2013 at 12:52:41PM +0200, David Coppa wrote: This misses util.h: cc -O2 -pipe -fno-pie -Wall -DINET6 -c /usr/src/sbin/ifconfig/ifconfig.c /usr/src/sbin/ifconfig/ifconfig.c: In function 'setifwpakey': /usr/src/sbin/ifconfig/ifconfig.c:1759: warning: implicit declaration

Re: Iso image integrity verification

2013-09-11 Thread Otto Moerbeek
On Wed, Sep 11, 2013 at 03:17:20PM +0300, Valentin Zagura wrote: Yes, we know, but that file can also be easily compromised if it's not available for download with a secure protocol (HTTPS) So get the CD. You'll support the project as well. -Otto On Wed, Sep 11, 2013 at 1:59 PM,

Re: Iso image integrity verification

2013-09-12 Thread Otto Moerbeek
On Thu, Sep 12, 2013 at 09:22:51AM -0400, Kenneth R Westerback wrote: On Thu, Sep 12, 2013 at 10:49:30AM +0200, InterNetX - Robert Garrett wrote: The real problem here is that in order to be added to certain lists of trusted PKI providers, you must be audited by security Assessors one of

Re: rman.h

2013-09-18 Thread Otto Moerbeek
Op 17 sep. 2013 om 21:54 heeft Kyle R W Milz k...@getaddrinfo.net het volgende geschreven: tech@, I was porting over some freebsd kernel code and came across a struct rman and some rman_* utility functions, defined in fbsd's sys/rman.h . Does obsd have an equivalent interface? It might

loongson panic on current

2013-09-28 Thread Otto Moerbeek
Hi, I recently upgraded my yeeloong and now I'm seeing this panic, it happened twice already. All hand-transcribed. panic: kernel diagnostic assertion p-p_wchan == NULL failed: file ../../../../kern/kern_sched.c, line 322 trace: Debugger+0x4 panic+0xe4 addupc_intr+0x0 active process is 2 0 0

Re: Possible buffer overflow in nd6_rtr.c

2013-10-03 Thread Otto Moerbeek
On Thu, Oct 03, 2013 at 08:42:17AM -0700, Loganaden Velvindron wrote: Hi All, From nd6_rtr.c: bzero(ifra, sizeof(ifra)); /* * in6_update_ifa() does not use ifra_name, but we accurately set it * for safety. */ strncpy(ifra.ifra_name, ifp-if_xname,

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Otto Moerbeek
On Tue, Nov 05, 2013 at 08:54:00PM +0100, Marc Espie wrote: On Tue, Nov 05, 2013 at 02:20:00PM +0100, Janne Johansson wrote: I think this would help the port yt to not crash on such urls, and I think it uses ftp to collect the youtube movies. Fix yt, then. I hate this. Like others say,

Re: Weird loop in ftp client

2013-11-23 Thread Otto Moerbeek
On Fri, Nov 22, 2013 at 10:04:02PM +0100, Maxime Villard wrote: Le 22/11/2013 17:48, Ted Unangst a ??crit : On Fri, Nov 22, 2013 at 10:09, Stuart Henderson wrote: On 2013/11/22 07:25, Maxime Villard wrote: If write() fails without EPIPE, d is decremented, and the function keeps

Re: 5.5beta wierds

2014-01-20 Thread Otto Moerbeek
On Tue, Jan 21, 2014 at 03:52:23PM +1100, Rod Whitworth wrote: I had a short run-up of the first 5.5 i386 snap install and it looked pretty much as expected but a more recent one showed up and I grabbed it and loaded it onto my little Shuttle. The dmesg is below but I'll make some

Re: 5.5beta wierds

2014-01-21 Thread Otto Moerbeek
On Tue, Jan 21, 2014 at 09:08:18PM +1300, Philip Guenther wrote: On Tue, Jan 21, 2014 at 8:33 PM, Otto Moerbeek o...@drijf.net wrote: ... Right. what happens is that localtime(3) returns NULL, because the year is not representable as an int. struct tm.tm_year must be an int according

Re: 5.5beta wierds

2014-01-21 Thread Otto Moerbeek
On Tue, Jan 21, 2014 at 09:34:51AM +0100, Otto Moerbeek wrote: On Tue, Jan 21, 2014 at 09:08:18PM +1300, Philip Guenther wrote: On Tue, Jan 21, 2014 at 8:33 PM, Otto Moerbeek o...@drijf.net wrote: ... Right. what happens is that localtime(3) returns NULL, because the year

Re: 5.5beta wierds

2014-01-22 Thread Otto Moerbeek
On Tue, Jan 21, 2014 at 11:58:44AM -0700, Todd C. Miller wrote: On Tue, 21 Jan 2014 10:44:00 +0100, Otto Moerbeek wrote: And here's the man page diff, our ctime and asctime actually do not ever return NULL, while posix allows that. Isn't it worth documenting that ctime and asctime

Re: mo junk mo problems

2014-04-14 Thread Otto Moerbeek
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. 1. Remove the Z option. In general, I think malloc options should make programs crash more, not less. This option is a bandaid,

Re: malloc chunk info in region

2014-04-14 Thread Otto Moerbeek
On Mon, Apr 14, 2014 at 11:54:32AM -0600, Bob Beck wrote: On Mon, Apr 14, 2014 at 11:39 AM, Ted Unangst t...@tedunangst.com wrote: Small tweak. Use a union, instead of casts. There's still casting for the call to insert(), but I think this is a little better. Also use the correct type for

Re: malloc chunk info in region

2014-04-14 Thread Otto Moerbeek
On Mon, Apr 14, 2014 at 02:21:27PM -0400, Ted Unangst wrote: On Mon, Apr 14, 2014 at 20:09, Otto Moerbeek wrote: static int -insert(struct dir_info *d, void *p, size_t sz, void *f) +insert(struct dir_info *d, void *p, uintptr_t sz, void *f) Doesn't it make sense for sz to stay

Re: segfault in dhclient 5.4 please help

2014-04-15 Thread Otto Moerbeek
On Mon, Apr 14, 2014 at 09:32:43PM -0400, sven falempin wrote: so i got gdb back to the machine because i cannot reproduce outside of the box. gdb too old cannot gcore. The state is nasty, but i do get the trace of the dhcp transaction. [..] DHCPREQUEST on trunk0 to 255.255.255.255

Re: segfault in dhclient 5.4 please help

2014-04-15 Thread Otto Moerbeek
Op 15 apr. 2014 om 13:13 heeft Kenneth Westerback kwesterb...@gmail.com het volgende geschreven: On 15 April 2014 08:34, Otto Moerbeek o...@drijf.net wrote: On Mon, Apr 14, 2014 at 09:32:43PM -0400, sven falempin wrote: so i got gdb back to the machine because i cannot reproduce outside

Re: ffs2 boot

2014-04-16 Thread Otto Moerbeek
) 2011 Joel Sing js...@openbsd.org * Copyright (c) 2010 Otto Moerbeek o...@openbsd.org * Copyright (c) 2003 Tom Cosgrove tom.cosgr...@arches-consulting.com @@ -91,6 +92,7 @@ struct sym_data pbr_symbols[] = { {_inodeblk, 4}, {_inodedbl, 4}, {_nblocks,2

Re: ffs2 boot

2014-04-17 Thread Otto Moerbeek
On Wed, Apr 16, 2014 at 11:16:00PM -0700, Philip Guenther wrote: On Thursday, April 17, 2014, Otto Moerbeek o...@drijf.net wrote: ... But bear in mind that ffs2 has more overhead in terms of metadata. IMO, making it the default is not a good idea. You have fewer than 24 years left

Re: ffs2 boot

2014-04-17 Thread Otto Moerbeek
17, 2014 at 5:09 AM, Otto Moerbeek o...@drijf.net wrote: On Wed, Apr 16, 2014 at 11:16:00PM -0700, Philip Guenther wrote: On Thursday, April 17, 2014, Otto Moerbeek o...@drijf.net wrote: ... But bear in mind that ffs2 has more overhead in terms of metadata. IMO, making

Re: IP option IP_RECVTTL question

2011-02-03 Thread Otto Moerbeek
On Thu, Feb 03, 2011 at 12:24:37PM +0100, Peter J. Philipp wrote: Hi, I wrote a DNS server and I'm collecting TTL information from the remote nameservers that query my daemon. Everything works well, when I view the logs I see: Feb 3 10:43:48 uranus wildcarddnsd[5705]: request on

Re: compat/linux: add mprotect() syscall

2011-02-10 Thread Otto Moerbeek
On Thu, Feb 10, 2011 at 02:08:07PM +0200, Paul Irofti wrote: This adds the mprotect syscall to the linux compat layer. This plus the other time syscalls that went in will make the new versions of applications such as Opera and Skype work. Okay? maybe, but your timing is wrong, we're in

Re: compat/linux: add mprotect() syscall

2011-02-10 Thread Otto Moerbeek
On Thu, Feb 10, 2011 at 02:45:31PM +0200, Paul Irofti wrote: On Thu, Feb 10, 2011 at 01:15:37PM +0100, Otto Moerbeek wrote: On Thu, Feb 10, 2011 at 02:08:07PM +0200, Paul Irofti wrote: This adds the mprotect syscall to the linux compat layer. This plus the other time syscalls

Re: compat/linux: add mprotect() syscall

2011-02-10 Thread Otto Moerbeek
On Thu, Feb 10, 2011 at 02:58:31PM +0200, Paul Irofti wrote: On Thu, Feb 10, 2011 at 01:53:21PM +0100, Otto Moerbeek wrote: On Thu, Feb 10, 2011 at 02:45:31PM +0200, Paul Irofti wrote: On Thu, Feb 10, 2011 at 01:15:37PM +0100, Otto Moerbeek wrote: On Thu, Feb 10, 2011 at 02:08:07PM

Re: typo in chroot(2)

2011-02-11 Thread Otto Moerbeek
ok, -Otto On Fri, Feb 11, 2011 at 09:40:42PM +0100, Paul de Weerd wrote: chroot(2) speaks of a non-existing setreseuid in its example. The below patch removes the extraneous e. ok ? Index: chroot.2 === RCS

Re: Syslogd: Adding log sockets that are only writeable by a single group

2011-02-12 Thread Otto Moerbeek
On Sat, Feb 12, 2011 at 12:53:47PM -0500, Eric wrote: On Sat, Feb 12, 2011 at 12:00 PM, Ted Unangst ted.unan...@gmail.com wrote: On Sat, Feb 12, 2011 at 9:49 AM, Eric airu...@gmail.com wrote: I'm making some modifications to syslogd/syslog so that I can control access to log sockets and

Re: Syslogd: Adding log sockets that are only writeable by a single group

2011-02-12 Thread Otto Moerbeek
On Sat, Feb 12, 2011 at 02:22:21PM -0500, Eric wrote: On Sat, Feb 12, 2011 at 1:56 PM, Otto Moerbeek o...@drijf.net wrote: On Sat, Feb 12, 2011 at 12:53:47PM -0500, Eric wrote: On Sat, Feb 12, 2011 at 12:00 PM, Ted Unangst ted.unan...@gmail.com wrote: On Sat, Feb 12, 2011 at 9:49 AM

Re: History for bc(1)

2011-02-15 Thread Otto Moerbeek
On Tue, Feb 15, 2011 at 12:23:41PM +0100, Gabriel Linder wrote: On 02/14/11 17:43, Christiano F. Haesbaert wrote: Any news on this ? The diff still apply on -current. If there are changes needed I can work on it, but I have no news. sorry, in have a diff in my tree, but I see myself

Re: History for bc(1)

2011-03-02 Thread Otto Moerbeek
On Tue, Feb 15, 2011 at 01:01:33PM +0100, Otto Moerbeek wrote: On Tue, Feb 15, 2011 at 12:23:41PM +0100, Gabriel Linder wrote: On 02/14/11 17:43, Christiano F. Haesbaert wrote: Any news on this ? The diff still apply on -current. If there are changes needed I can work

Re: History for bc(1)

2011-03-02 Thread Otto Moerbeek
On Wed, Mar 02, 2011 at 10:18:08AM +, Jason McIntyre wrote: On Wed, Mar 02, 2011 at 10:13:35AM +0100, Otto Moerbeek wrote: Lets try to make some progress here. This is the diff I have had in my tree for a while. It is a port of the freebsd code. What is lacking is the man page

Re: History for bc(1)

2011-03-07 Thread Otto Moerbeek
On Wed, Mar 02, 2011 at 12:33:49PM +0100, Otto Moerbeek wrote: On Wed, Mar 02, 2011 at 10:18:08AM +, Jason McIntyre wrote: On Wed, Mar 02, 2011 at 10:13:35AM +0100, Otto Moerbeek wrote: Lets try to make some progress here. This is the diff I have had in my tree for a while

Re: NFS writes lock up system with -o tcp,-w32768

2011-03-29 Thread Otto Moerbeek
On Tue, Mar 29, 2011 at 03:55:40PM +0200, Walter Haidinger wrote: Am 29.03.2011 15:16, schrieb Marco Peereboom: use udp instead of tcp. A bit OT, but since I run NFS over Gigabit ethernet: Does the following warning apply to OpenBSD too? Can somebody clarify this? The Linux nfs(5) man

Re: horribly slow fsck_ffs pass1 performance

2011-03-31 Thread Otto Moerbeek
On Wed, Mar 30, 2011 at 03:45:02PM -0500, Amit Kulkarni wrote: Hi, In fsck_ffs's pass1.c it just takes forever for large sized partitions and also if you have very high number of files stored on that partition (used inodes count goes high). fsck main limitation is in pass1.c. In

Re: horribly slow fsck_ffs pass1 performance

2011-03-31 Thread Otto Moerbeek
On Thu, Mar 31, 2011 at 09:13:41AM +, Stuart Henderson wrote: On 2011-03-31, Otto Moerbeek o...@drijf.net wrote: On Wed, Mar 30, 2011 at 03:45:02PM -0500, Amit Kulkarni wrote: In fsck_ffs's pass1.c it just takes forever for large sized partitions and also if you have very high number

Re: horribly slow fsck_ffs pass1 performance

2011-03-31 Thread Otto Moerbeek
On Thu, Mar 31, 2011 at 12:30:29PM +0200, Benny Lofgren wrote: On 2011-03-31 11.13, Stuart Henderson wrote: On 2011-03-31, Otto Moerbeek o...@drijf.net wrote: On Wed, Mar 30, 2011 at 03:45:02PM -0500, Amit Kulkarni wrote: In fsck_ffs's pass1.c it just takes forever for large sized

Re: horribly slow fsck_ffs pass1 performance

2011-03-31 Thread Otto Moerbeek
On Thu, Mar 31, 2011 at 12:30:29PM +0200, Benny Lofgren wrote: For example, this is what one of my file systems looks like right now: skynet:~# df -ih /u0 Filesystem SizeUsed Avail Capacity iused ifree %iused Mounted on /dev/raid1a 12.6T7.0T5.5T56% 881220

Re: horribly slow fsck_ffs pass1 performance

2011-03-31 Thread Otto Moerbeek
On Thu, Mar 31, 2011 at 02:50:36PM -0500, Amit Kulkarni wrote: If you really have a lot of used inodes, skipping the unused ones isn't going to help :-) You could always build your large-sized filesystems with a larger value of bytes-per-inode. newfs -i 32768 or 65536 is good for

Re: horribly slow fsck_ffs pass1 performance

2011-03-31 Thread Otto Moerbeek
So here's an initial, only lightly tested diff. Beware, this very well could eat your filesystems. To note any difference, you should use the -p mode of fsck_ffs (rc does that) and the fs should have been mounted with softdep. I have seen very nice speedups already. -Otto Index: dir.c

Re: horribly slow fsck_ffs pass1 performance

2011-03-31 Thread Otto Moerbeek
On Thu, Mar 31, 2011 at 10:14:46PM +0200, Otto Moerbeek wrote: So here's an initial, only lightly tested diff. Beware, this very well could eat your filesystems. To note any difference, you should use the -p mode of fsck_ffs (rc does that) and the fs should have been mounted with softdep

Re: horribly slow fsck_ffs pass1 performance

2011-03-31 Thread Otto Moerbeek
On Thu, Mar 31, 2011 at 10:12:07PM +0200, Otto Moerbeek wrote: So, if I read it correctly, setting just the block size higher to say 64Kb does auto tune frag size to 1/8 which is 8Kb (newfs complains appropriately) but the auto tune inode length to 4 times frag which is 32Kb

Re: horribly slow fsck_ffs pass1 performance

2011-04-01 Thread Otto Moerbeek
Op 31 mrt. 2011 om 22:25 heeft Otto Moerbeek o...@drijf.net het volgende geschreven: On Thu, Mar 31, 2011 at 10:14:46PM +0200, Otto Moerbeek wrote: So here's an initial, only lightly tested diff. Beware, this very well could eat your filesystems. To note any difference, you should use

Re: horribly slow fsck_ffs pass1 performance

2011-04-01 Thread Otto Moerbeek
fOn Fri, Apr 01, 2011 at 12:03:19PM -0500, Amit Kulkarni wrote: Hi Otto, fsck -p is not possible to do in multi-user because of # fsck -p /extra NO WRITE ACCESS /dev/rwd0m: UNEXPECTED INCONSISTENCY; RUN fsck_ffs MANUALLY. Of course. What's the point of checking a mounted filesystem.

Re: no swapping to vnds

2011-04-04 Thread Otto Moerbeek
On Mon, Apr 04, 2011 at 09:22:41AM +, Thordur Bjornsson wrote: Hi, 1) Swapping to svnds has issues (pagedaemon deadlocks) and has been broken since forever. 2) Swapping to vnds makes no sense, why add another layer when you can just swap to a regular file instead ? so stop

Re: rc.subr: quote daemon flags

2011-04-05 Thread Otto Moerbeek
On Tue, Apr 05, 2011 at 01:47:52PM +0200, Antoine Jacoutot wrote: On Tue, 5 Apr 2011, Piotr Sikora wrote: Hello, $daemon_flags are sanitized using echo and tr, but the input isn't quoted, which makes it indistinguishable from echo's options. Effect of this is that when $daemon_flags

Re: rc.subr: quote daemon flags

2011-04-05 Thread Otto Moerbeek
On Tue, Apr 05, 2011 at 02:08:57PM +0200, Otto Moerbeek wrote: On Tue, Apr 05, 2011 at 01:47:52PM +0200, Antoine Jacoutot wrote: On Tue, 5 Apr 2011, Piotr Sikora wrote: Hello, $daemon_flags are sanitized using echo and tr, but the input isn't quoted, which makes

Re: rc.subr: quote daemon flags

2011-04-05 Thread Otto Moerbeek
On Tue, Apr 05, 2011 at 04:44:27AM -0700, Philip Guenther wrote: On Tue, Apr 5, 2011 at 4:07 AM, Piotr Sikora piotr.sik...@frickle.com wrote: $daemon_flags are sanitized using echo and tr, but the input isn't quoted, which makes it indistinguishable from echo's options. Effect of this is

fsck_ffs diff needs testing

2011-04-07 Thread Otto Moerbeek
Hi, I got little feedeback on this diff posed in a rather long thread, so I am posting it again. Please test this, it makes fsck_ffs much faster (especially with -p) and less memory hungry in a lot of cases. Note that to force a check with -p you need to unmount the filesystem, mosty practical

Re: fsck_ffs diff needs testing

2011-04-07 Thread Otto Moerbeek
On Thu, Apr 07, 2011 at 04:28:25PM +0200, Benny Lofgren wrote: On 2011-04-07 15.06, Otto Moerbeek wrote: On Thu, Apr 07, 2011 at 02:34:27PM +0200, Benny Lofgren wrote: On 2011-04-07 11.08, Otto Moerbeek wrote: Hi, I got little feedeback on this diff posed in a rather long thread, so

Re: fsck_ffs diff needs testing

2011-04-07 Thread Otto Moerbeek
On Thu, Apr 07, 2011 at 11:05:42AM -0500, Amit Kulkarni wrote: Also, depending on the usage patterns, you might have a fs where high numbered inodes are used, while the fs itself is pretty empty. Filling up a fs with lots of files and them removing a lot of them is an example that could

  1   2   3   4   5   6   7   8   >