Re: rthread suspension

2013-03-21 Thread Ted Unangst
On Thu, Mar 21, 2013 at 11:03, Taylan Ulrich B. wrote: I'm a GNU Guile 2.0 user, whose latest versions require latest versions of the Boehm garbage collector. This uses the functions pthread_suspend_np and pthread_resume_np, when built on OpenBSD, which don't exist in rthreads. Right. Early

Re: removal of some end macros in netinet

2013-03-19 Thread Ted Unangst
On Tue, Mar 19, 2013 at 14:24, Martin Pieuchot wrote: On 15/03/13(Fri) 16:59, Ted Unangst wrote: Replace LIST_END with NULL, for clarity and less characters. frag6.c was definitely a big fan of LIST_END. Careful, I had to edit your diff to be able to apply it correctly. I'm mostly ok

kern decrement

2013-03-19 Thread Ted Unangst
Maybe we want, maybe we don't. Here's a check to prevent a counter from going negative, which usually means an accounting mistake somewhere. On the shortcomiing side, it only catches double decrements, not missing decrements, so maybe it's not worthwhile. Anyway, it was like five minutes to make,

Re: nc(1) shutdown(2) typo

2013-03-19 Thread Ted Unangst
On Tue, Mar 19, 2013 at 17:39, Stuart Henderson wrote: On 2013/03/19 18:26, Otto Moerbeek wrote: On Tue, Mar 19, 2013 at 04:00:46PM +0100, Martin Pelikan wrote: wfd is stdin, so doing a shutdown on it will mostly be a noop, right? Of course you're right. I was so focused on finding the

Re: kern decrement

2013-03-19 Thread Ted Unangst
On Tue, Mar 19, 2013 at 11:13, Andres Perera wrote: +#define DECREMENT(x) x-- why not (x)--? I was lazy. (x) would be better. why not intmax_t instead of int64_t? 64 bits ought to be enough for anyone. :)

Re: nc(1) shutdown(2) typo

2013-03-19 Thread Ted Unangst
OK, thanks, I think I get it. Let me summarize: nc currently calls shutdown() when it gets EOF on input. This is the right thing to do, because that's how well written network clients indicate end of input. Some broken servers, however, treat shutdown as a disconnect and abort the connection. nc

Re: nc(1) shutdown(2) typo

2013-03-19 Thread Ted Unangst
On Tue, Mar 19, 2013 at 20:24, Otto Moerbeek wrote: Now that I better understand the problem, something like the -q [delay] option seems like the better solution. Even when talking to a broken server, we don't necessarily want nc hanging around forever, and maybe we don't know if the server

removal of some end macros in netinet

2013-03-15 Thread Ted Unangst
Replace LIST_END with NULL, for clarity and less characters. frag6.c was definitely a big fan of LIST_END. Index: netinet/if_ether.c === RCS file: /cvs/src/sys/netinet/if_ether.c,v retrieving revision 1.97 diff -u -p -r1.97

Re: Threads related SIGSEGV in random.c (diff, v2)

2013-03-14 Thread Ted Unangst
On Thu, Mar 14, 2013 at 14:30, Antoine Jacoutot wrote: FYI I am seeing a somehow similar crash when using sysutils/bacula (both 5.2 and 5.3). It is 100% reproducible on my setup. Obviously painful since it means I cannot run backups anymore... The following is brought to you without testing

Re: Threads related SIGSEGV in random.c (diff, v2)

2013-03-14 Thread Ted Unangst
On Thu, Mar 14, 2013 at 17:24, Antoine Jacoutot wrote: On Thu, Mar 14, 2013 at 11:41:52AM -0400, Ted Unangst wrote: On Thu, Mar 14, 2013 at 14:30, Antoine Jacoutot wrote: FYI I am seeing a somehow similar crash when using sysutils/bacula (both 5.2 and 5.3). It is 100% reproducible on my

Re: [PATCH] tftpd: DoS vuln

2013-03-14 Thread Ted Unangst
After reading your description, I was expecting the patch to include a line setting options to null after freeing it. Whatever else we do, shouldn't we do that too? On Fri, Mar 15, 2013 at 00:02, Maxime Villard wrote: Hi, there is a huge bug in the tftp daemon. --

kernel malloc poison

2013-03-14 Thread Ted Unangst
In prep for some other changes, I'm factoring some of the deadbeef checking. It doesn't change anything functional (yet), but at a minimum I think this is much clearer than all the pointers and casts and lions and tigers: - end = (int32_t *)freep-next + - (sizeof(freep-next) /

Re: tedu faith(4) and faithd(8)

2013-03-12 Thread Ted Unangst
On Tue, Mar 12, 2013 at 15:30, Martin Pieuchot wrote: Diffs below kill respectively faith(4) and faithd(8) as suggested some weeks ago after a submission by dhill. ok? I am, of course, implicitly ok will all deletions of obsolete code.

less list_end macros

2013-03-07 Thread Ted Unangst
Maybe I'm just easily confused, but when I see LIST_END() I tend to think it's going to be the last element in the list. I think NULL is clearer. As per the man page, The SLIST_END(), LIST_END(), SIMPLEQ_END() and TAILQ_END() macros are provided for symmetry with CIRCLEQ_END(). They expand to

Re: Fuse (and sshfs) support for OpenBSD

2013-03-06 Thread Ted Unangst
On Wed, Mar 06, 2013 at 22:27, Sylvestre Gallon wrote: Do you know if miscfs is the best place to put my code ? I think so. Do I keep the device code (fuse_device.c) in the same directory than the filesystem code? I'd prefer that. sys/dev is kind of cluttered as it is, and since the dev

Re: write(2) man page

2013-03-05 Thread Ted Unangst
On Tue, Mar 05, 2013 at 12:26, Sachidananda Urs wrote: Attaching patch for review. Hi, Any thoughts on this? It's in my queue. I wanted to touch it up a bit, but waited for the tree to unlock (it just did). Thanks again.

Re: out of memory errors seen on several AnonCVS servers

2013-03-04 Thread Ted Unangst
On Sun, Mar 03, 2013 at 22:17, Stuart Henderson wrote: On 2013/03/03 17:11, Ted Unangst wrote: On Sun, Mar 03, 2013 at 16:16, Stuart Henderson wrote: Summary of off-list mail exchange: anoncvs.usa consistently has a realloc failure in xenocara/font/misc-misc/18x18ja.bdf, some other servers

Re: out of memory errors seen on several AnonCVS servers

2013-03-04 Thread Ted Unangst
On Mon, Mar 04, 2013 at 15:55, Stuart Henderson wrote: The client arch and software doesn't make a difference, the problem is on the server side. Problems seen when using opencvs server-side include giving out the wrong file version, and giving a checkout which can't reliably be used against

Re: out of memory errors seen on several AnonCVS servers

2013-03-04 Thread Ted Unangst
On Mon, Mar 04, 2013 at 16:19, Stuart Henderson wrote: yes, that's older - stsp fixed one problem with it since then... Oh, missed that. Good to know. Hmm. Looking at the number of bytes in the error message which matches what's seen on anoncvs.usa and differs to my server... Todd, does the

Re: out of memory errors seen on several AnonCVS servers

2013-03-03 Thread Ted Unangst
On Sun, Mar 03, 2013 at 16:16, Stuart Henderson wrote: Summary of off-list mail exchange: anoncvs.usa consistently has a realloc failure in xenocara/font/misc-misc/18x18ja.bdf, some other servers have a failure the first time checking this file out when it's part of the whole directory, but

Re: write(2) man page

2013-02-23 Thread Ted Unangst
On Sun, Feb 24, 2013 at 09:12, Sachidananda wrote: Also, for the record, it's open that seeks to the end. You can open a file with O_APPEND and seek back to the beginning, and write will not seek to the end again. My observation is, if I open(2) the file with O_APPEND it seeks to the end.

Re: write(2) man page

2013-02-22 Thread Ted Unangst
On Sat, Feb 23, 2013 at 12:07, Sachidananda wrote: Hi, When a file is open(2)ed with O_APPEND flag, write(2) seeks to the end of file before writing. We are missing this in the man page. If this is a valid point to note, I will send a patch to the man page. That's documented in the open

Re: Fixing a phrase in /stable.html

2013-02-18 Thread Ted Unangst
On Mon, Feb 18, 2013 at 20:53, Alexander Hall wrote: On 02/18/13 19:48, Nick Holland wrote: a while/awhile means a short time? wow. I've always used it as meaning a long time. 'course, I usually say it with a sarcastic tone, so maybe it's the sarcasm that gets the point across. Not that

Re: missing include in sys/proc.h?

2012-11-20 Thread Ted Unangst
On Tue, Nov 20, 2012 at 16:08, Amit Kulkarni wrote: While porting boost-1.52.0 (latest boost) and checking affected ports, I came across this. In file included from /usr/include/sys/sysctl.h:42, I can patch and include sys/param.h in this graphics/mapnik port but sys/proc.h doesn't include

Re: [PATCH] mlockall() problem in OpenBSD 5.2

2012-11-08 Thread Ted Unangst
On Thu, Nov 08, 2012 at 13:34, Ilya Bakulin wrote: The problem seems to be in uvm_map_pageable_all() function (sys/uvm/uvm_map.c). This function is a special case of uvm_map_pageable, which tries to mlockall() all mapped memory regions. Prior to calling uvm_map_pageable_wire(), which actually

Re: Small memcpy optimization

2012-11-08 Thread Ted Unangst
On Thu, Nov 01, 2012 at 22:43, Stefan Fritsch wrote: On Tuesday 21 August 2012, Stefan Fritsch wrote: On x86, the xchg operation between reg and mem has an implicit lock prefix, i.e. it is a relatively expensive atomic operation. This is not needed here. OKs, anyone? What do other

Re: Scheduler improvements

2012-10-08 Thread Ted Unangst
On Mon, Oct 08, 2012 at 18:43, Christiano F. Haesbaert wrote: Ratchov is correct, when a process sleeps you specify the priority you should have when waking up. I think george was referring to the old version of his code. The 4.4 bsd scheduler relies heavily on these priority boosts, i

Re: Scheduler improvements

2012-10-04 Thread Ted Unangst
On Thu, Oct 04, 2012 at 23:42, Gregor Best wrote: As before, I'm looking forward to anything you have to comment, especially cool benchmark ideas or the like. A short one is building a kernel. Try before and after with make, make -j 2, and make -j 4. (or ncpu and ncpu * 2).

Re: [PATCH] Enable NTFS support on loongson

2012-10-04 Thread Ted Unangst
On Wed, Oct 03, 2012 at 22:26, Donovan Watteau wrote: Hello, The following diff enables NTFS support on loongson. I've been using it with external drives on my Yeeloong without any problem. Honestly, I think we should just enable it everywhere. You're unlikely to stick an ntfs disk in

Re: gem(4): simplify gem_attach_pci() variant detection code a bit

2012-09-27 Thread Ted Unangst
On Wed, Sep 26, 2012 at 15:32, Brad Smith wrote: Simplify the gem(4) variant detection code a bit. OK? Wouldn't a switch be a nicer simplification? Index: if_gem_pci.c === RCS file:

Re: Threads related SIGSEGV in random.c (diff, v2)

2012-09-26 Thread Ted Unangst
On Wed, Sep 26, 2012 at 11:18, Alexey Suslikov wrote: Hi. Any news on that? Can we do it without the local variables for speed part? I am not interested in making this function faster.

Re: make -j and errors

2012-09-26 Thread Ted Unangst
On Wed, Sep 26, 2012 at 18:21, Marc Espie wrote: I've been thinking some more about it. POSIX says very little about parallel makes. The more I think about it, the more I think gnu-make's approach on this is stupid: if a job errors out in a fatal way, what do we gain if we keep going ?

Re: Threads related SIGSEGV in random.c (diff, v2)

2012-09-26 Thread Ted Unangst
On Thu, Sep 27, 2012 at 00:18, Alexey Suslikov wrote: On Wed, Sep 26, 2012 at 9:51 PM, Ted Unangst t...@tedunangst.com wrote: On Wed, Sep 26, 2012 at 11:18, Alexey Suslikov wrote: Hi. Any news on that? Can we do it without the local variables for speed part? I am not interested in making

Re: make -j and errors

2012-09-26 Thread Ted Unangst
On Thu, Sep 27, 2012 at 00:05, Marc Espie wrote: You probably don't see the difference, because you run short stuff with not enough jobs. But for long running stuff, you will sometimes have an error, and notice it only a few minutes afterwards, 5000 lines of scrollback later, when they other

Re: fix disable lidsuspend on shutdown by init(8)

2012-09-23 Thread Ted Unangst
On Sat, Sep 22, 2012 at 14:01, Theo de Raadt wrote: Only concern I have is whether #include machine/cpu.h could have side-effects on architectures I don't know of (which, admittedly, is quite a few). it is a bad idea to pull machine/ header files. I was going to agree, but that's how

Re: Threads related SIGSEGV in random.c

2012-09-19 Thread Ted Unangst
On Wed, Sep 19, 2012 at 18:50, Alexey Suslikov wrote: On Wednesday, September 19, 2012, Theo de Raadt wrote: arc4random() is also thread-safe (it has interal locking) and very desirable for other reasons. But no way to save state. The last part of this is intentional. Saving the state of

Re: Threads related SIGSEGV in random.c

2012-09-18 Thread Ted Unangst
On Wed, Sep 19, 2012 at 00:48, Alexey Suslikov wrote: No, according to posix it should be thread safe. I don't know why, since rand() is one of the exempted functions, but random() is not. Standards gods are capricious gods. I think you should stress *should* here. Looking at the

Re: usermod: lock/unlock local password

2012-09-14 Thread Ted Unangst
On Fri, Sep 14, 2012 at 08:59, Antoine Jacoutot wrote: Anyone? +/* lock the account */ +if (strncmp(pwp-pw_shell+strlen(pwp-pw_shell) - 1, acctlock_str+strlen(acctlock_str) - 1, sizeof(acctlock_str) - 1) != 0) { This looks like a horifically

tcp ping

2012-09-13 Thread Ted Unangst
So sometimes a machine is hiding behind a firewall that blocks icmp (looking at you, amazon ec2), but I want to know if it's up and/or how long away it is. tcp to the rescue. This adds a -T portnum option to ping. I haven't polished the output because I'm not sure if this is desirable or not,

Re: tcp ping

2012-09-13 Thread Ted Unangst
On Thu, Sep 13, 2012 at 13:54, Matthew Dempsky wrote: On Thu, Sep 13, 2012 at 12:02 PM, Ted Unangst t...@tedunangst.com wrote: This adds a -T portnum option to ping. I haven't polished the output because I'm not sure if this is desirable or not, but I found it useful. If it's not a hell

Re: usermod: lock/unlock local password

2012-09-11 Thread Ted Unangst
On Mon, Sep 10, 2012 at 17:01, Antoine Jacoutot wrote: In effect locking/unlocking the password means to add a '!' in front of the encrypted entry in master.passwd. Note that this disable the _password_ not the account of course (you could still connect using ssh+key for e.g.). I am very

script to make installable disk image

2012-09-05 Thread Ted Unangst
We provide many forms of installation media, but neither floppy nor iso images are best suited for usb drives. It's pretty easy to make a hard drive image containing the installer bsd.rd. I tested this on i386, it should work on amd64 too. It's just a bunch of shell commands, save it to

Re: ksh sigwinch

2012-09-05 Thread Ted Unangst
On Wed, Sep 05, 2012 at 08:52, LEVAI Daniel wrote: On k, szept 04, 2012 at 18:15:29 -0400, Ted Unangst wrote: I move my windows around and even resize them sometimes. Sometimes ksh catches on, but a lot of the time it doesn't. The problem is if I'm running an editor like vi (kinda common

better home for pbkdf2

2012-09-05 Thread Ted Unangst
We have several programs using the pbkdf2 function. More people should (and are likely to) use it. So move it to libutil. I think this needs a man page now (not included), but this is the code. Index: lib/libutil/Makefile === RCS

mdoc.template license

2012-09-05 Thread Ted Unangst
More people would write man pages if they didn't have to reformat the license block. Provide a default. Index: mdoc.template === RCS file: /cvs/src/share/misc/mdoc.template,v retrieving revision 1.12 diff -u -p -r1.12 mdoc.template

pbkdf2 manpage

2012-09-05 Thread Ted Unangst
$ +.\ +.\ Copyright (c) 2012 Ted Unangst t...@openbsd.org +.\ +.\ 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 and this permission notice appear in all copies. +.\ +.\ THE SOFTWARE

delete compat aout

2012-09-05 Thread Ted Unangst
compat_aout has so far survived the purges by keeping its head down, but now its time has come. this code does not and cannot work anymore, since a.out binaries use system calls long since removed. not shown in the diff is removing of the compat/aout directory. in theory, this code could be

Re: delete compat aout

2012-09-05 Thread Ted Unangst
On Wed, Sep 05, 2012 at 16:55, Ted Unangst wrote: not shown in the diff is removing of the compat/aout directory. in theory, this code could be used by another architecture. but nobody's moving to elf soon, and even so, they can jump the old fashioned way by downloading a snapshot, so i'll

Re: msdosfs_vnops.c u_char toname diff [Was: Re: panic: smashed stack in msdosfs_rename]

2012-09-04 Thread Ted Unangst
On Tue, Sep 04, 2012 at 09:57, Kenneth R Westerback wrote: The problem seems to be rooted in a desire to printf() the dosname in a debug statement. Otherwise the dos file names are not treated as strings anywhere. An alternate solution, that restores the symmetry between unix2dosfn() and

arc4random_buf in bcrypt

2012-09-03 Thread Ted Unangst
There's an easy way to do this now. Index: bcrypt.c === RCS file: /cvs/src/lib/libc/crypt/bcrypt.c,v retrieving revision 1.24 diff -u -p -r1.24 bcrypt.c --- bcrypt.c2 Apr 2008 19:54:05 - 1.24 +++ bcrypt.c3 Sep 2012

Re: ThinkPad T60 x86emu panic on resume (w/patch)

2012-09-03 Thread Ted Unangst
On Mon, Sep 03, 2012 at 21:18, Alexander Polakov wrote: Now back to underlying issues: x86emu executes some code which causes parity check NMI (bit 7 set in port 0x61) to be generated, which causes drop to the debugger (I mistook it for a panic). Btw, is it intended to not include isa.h in

quiet ftp

2012-09-02 Thread Ted Unangst
Does anyone else find it weird that -V doesn't turn off the progress bar? Index: main.c === RCS file: /cvs/src/usr.bin/ftp/main.c,v retrieving revision 1.85 diff -u -p -r1.85 main.c --- main.c 26 Aug 2012 02:16:02 -

Re: pf(4) man page: include missing header in example program

2012-08-31 Thread Ted Unangst
On Thu, May 05, 2011 at 23:56, Stuart Henderson wrote: That change is correct but I'm not sure about keeping this example code at all. We've had divert-to since OpenBSD 4.4 - when this is used instead of rdr-to the destination address is preserved, so it can be fetched with getsockname()

Re: Argument list too long while copying

2012-08-23 Thread Ted Unangst
On Thu, Aug 23, 2012 at 21:17, Jan Stary wrote: On current/amd64 I created a MSDOS filesystem on a CF card inserted into a USB card reader # cp * /mnt cp: /mnt/202.the-hounds-of-baskerville.avi: Argument list too long cp: /mnt/201.a-scandal-in-belgravia.avi: Argument list too long cp:

Re: rdtsc timecounter

2012-08-16 Thread Ted Unangst
On Thu, Aug 16, 2012 at 14:00, Mark Kettenis wrote: A whitelist-based approach is probably best. What you could do is attach this timecounter on platforms that are not whitelisted as well, but give it a fairly low tc_quality if it isn't whitelisted. That way people can still select the TSC

acpihpet quality

2012-08-15 Thread Ted Unangst
The acpihpet timer is, in my testing, lots better than the acpitimer. Faster to read and more precise. They should not have the same quality value. Double acpihpet. Index: acpihpet.c === RCS file: /cvs/src/sys/dev/acpi/acpihpet.c,v

have timecounter, will stay

2012-08-15 Thread Ted Unangst
timecounters are here to stay, at least for those archs where timecounters have arrived. remove some now useless guards. Index: arch/i386/pci/geodesc.c === RCS file: /cvs/src/sys/arch/i386/pci/geodesc.c,v retrieving revision 1.9

Re: acpihpet quality

2012-08-15 Thread Ted Unangst
On Wed, Aug 15, 2012 at 17:21, Mark Kettenis wrote: Date: Wed, 15 Aug 2012 11:02:43 -0400 From: Ted Unangst t...@tedunangst.com The acpihpet timer is, in my testing, lots better than the acpitimer. Faster to read and more precise. They should not have the same quality value. Double

Re: CoDel

2012-08-14 Thread Ted Unangst
On Tue, Aug 14, 2012 at 09:42, Simon Perreault wrote: - CoDel needs to timestamp each packet when it gets queued. - I added a new member in struct pkthdr for this. Is this ok? - I end up calling microuptime() for each packet. Is this ok? You want to use getmicrouptime, it's faster. See the

fmt_scaled for netstat

2012-08-09 Thread Ted Unangst
Add an -h flag to print human numbers. Easier for me to read. Index: Makefile === RCS file: /cvs/src/usr.bin/netstat/Makefile,v retrieving revision 1.20 diff -u -p -r1.20 Makefile --- Makefile9 Jul 2011 00:45:40 - 1.20

Re: dhclient ignore

2012-07-27 Thread Ted Unangst
On Fri, Jul 27, 2012 at 00:42, Brynet wrote: On Thu, Jul 26, 2012 at 10:09:28PM -0400, Ted Unangst wrote: I have a system with two network interfaces (em0 and em1), running dhcp on both. Both dhcp servers provide me with a nameserver, but only one of them works (I can't fix

dhclient ignore

2012-07-26 Thread Ted Unangst
I have a system with two network interfaces (em0 and em1), running dhcp on both. Both dhcp servers provide me with a nameserver, but only one of them works (I can't fix this). There is a config file for dhclient I can use, but it only supports the supersede keyword. I don't want to statically

Re: sqlite secure delete

2012-07-25 Thread Ted Unangst
On Wed, Jul 25, 2012 at 09:34, Landry Breuil wrote: On Tue, Jul 24, 2012 at 08:20:55PM -0400, Ted Unangst wrote: I think this option should be available. Note sure it's a good idea, since it's a non-negligible performance loss for all sqlite users if you change it to default to true

sqlite secure delete

2012-07-24 Thread Ted Unangst
I think this option should be available. Index: Makefile === RCS file: /cvs/src/lib/libsqlite3/Makefile,v retrieving revision 1.8 diff -u -p -r1.8 Makefile --- Makefile22 Jun 2012 17:52:34 - 1.8 +++ Makefile24 Jul

vmt ref vmwh

2012-07-24 Thread Ted Unangst
The vmwh package is very handy, but somewhat hard to discover. Can we add a little hint to the man page for vmt? Index: vmt.4 === RCS file: /cvs/src/share/man/man4/vmt.4,v retrieving revision 1.5 diff -u -p -r1.5 vmt.4 --- vmt.4

rm -P

2012-07-23 Thread Ted Unangst
I bring more love to everybody's favorite rm option. So I'm wiping a file from a fairly slow USB stick and it's taking forever. I don't really give a shit about some guy with a quantum tachyon microscope taking it apart, I just want the files to be gone enough that a simple undelete tool won't

Re: ar9003.c uninitialized variable

2012-07-14 Thread Ted Unangst
On Sat, Jul 14, 2012 at 15:31, David Hill wrote: Hello, in file sys/dev/ic/ar9003.c, function ar9003_compute_predistortion(), there is an uninitialized variable, y4. It is then used: scale = ((y4 / SCALE_LOG) * (L + 1) - (y2 / SCALE_LOG) * sumy2) * SCALE_LOG; Email to damien and reyk

Re: Virtio drivers for OpenBSD

2012-07-11 Thread Ted Unangst
On Wed, Jul 11, 2012 at 14:07, Stefan Fritsch wrote: Hi, I have been working on porting NetBSD's virtio drivers to OpenBSD. I am not finished yet, but in order to prevent duplicate work, I thought I'd publish the current state (attached as diff to OpenBSD 5.1). It adds a virtio block

Re: bug fix: 'opencvs log' mangles RCS branch number

2012-07-01 Thread Ted Unangst
On Sun, Jul 01, 2012 at 11:17, Tobias Stoeckmann wrote: Your patch breaks this compatibility for every branch except the initial one. GNU CVS is not consistent about its behavior in many ways. Ha! This is the same bug I was looking into last week. I wasn't sure in what circumstances adding

Re: bug fix: 'opencvs log' mangles RCS branch number

2012-06-30 Thread Ted Unangst
On Sun, Jul 01, 2012 at 08:28, Michael W. Bombardieri wrote: Hi tech, I noticed this OpenCVS bug a couple of months ago but I've only just written this report. Comparing cvs log output between GNU CVS 1.11.1p1 and OpenCVS... - mwb: 1.1.1 + mwb: 1.1.0.1 OpenCVS mangles the

Re: Bridge rules

2012-06-29 Thread Ted Unangst
On Fri, Jun 29, 2012 at 15:08, sven falempin wrote: Code Rewriting (nothing new) and asking I seriously wonder if 'that' is good in sys/net/if_bridge.c if (flags == 0) goto return_action; Because if i m not wrong it could be rewritten this way (diff) That does look clearer to me.

Re: tinyscheme + mg

2012-06-28 Thread Ted Unangst
On Thu, Jun 28, 2012 at 15:07, Jérémie Courrèges-Anglas wrote: If the licence seems ok, why not just pull a complete tinyscheme instance, that would then be usable from other applications? (tinyscheme doesn't seem to be in ports). I don't want to be in the business of adding 20 different

Re: tinyscheme + mg

2012-06-28 Thread Ted Unangst
On Thu, Jun 28, 2012 at 15:21, Jasper Lievisse Adriaanse wrote: On Thu, Jun 28, 2012 at 08:35:18AM -0400, Kjell Wooding wrote: 2. I should point out that all of mg (other than theo.c) is currently PUBLIC DOMAIN, not merely BSD, so this change is significant, license-wise. Please be pedantic

Re: tinyscheme + mg

2012-06-28 Thread Ted Unangst
On Thu, Jun 28, 2012 at 08:09, Bob Beck wrote: I'd be a lot happier voicing an opinion in support of something like this if I also saw diffs and interest in *using* them to extend functionality later or replace some things easier to do with scheme to make the code simpler - something kjell

Re: tinyscheme + mg

2012-06-28 Thread Ted Unangst
On Thu, Jun 28, 2012 at 15:07, Jérémie Courrèges-Anglas wrote: Hi, + +typedef void *HMODULE; +typedef void (*FARPROC)(); +#define SUN_DL Hmmm. +#include dlfcn.h + +#if defined(SUN_DL) Huh? 8) old code is old. :) looks like jasper un-ifdeffed some win32 code, leaving a few

Re: setsockopt SO_SNDBUF and limit (No buffer space available)

2012-06-26 Thread Ted Unangst
On Tue, Jun 26, 2012 at 20:13, Philip Guenther wrote: Sorry, in this case, the C code *is* the documentation. If you're reading the kernel code then you should check things in the rough order: 2) does the C standard specify the behavior? Nitpick! This may be misleading in some cases,

Re: unsigned = 0 comparisons

2012-06-25 Thread Ted Unangst
On Mon, Jun 25, 2012 at 20:54, Arto Jonsson wrote: Hi, a couple of = 0 comparisons on unsigned integers. These refer to Bitrig commits 171e1f9d and 72337965 respectively. This is a little meta, but if we're going to start pulling changes from bitrig, I don't think commit 171e1f9d is the

nicer iostat

2012-06-23 Thread Ted Unangst
the columns get all raggedy when I run iostat because my overpowered three year old laptop just has too much speed. make the columns a little wider. I can still fit tty, sd{0,1,2}, and cpu on an 80 column display. Index: iostat.c

Re: icmp error mcopy diff

2012-06-22 Thread Ted Unangst
On Fri, Jun 22, 2012 at 04:58, Brad Smith wrote: On Thu, Mar 01, 2012 at 03:28:13PM +0100, Mike Belopuhov wrote: This is a well-known from thib and dlg originally with a length fix from yours truly, that marginally doubles througput (from 300kpps to 500-600kpps on selected hardware). The

Re: man page standards

2012-06-22 Thread Ted Unangst
On Fri, Jun 22, 2012 at 07:58, Jason McIntyre wrote: On Thu, Jun 21, 2012 at 11:31:34PM -0400, Ted Unangst wrote: some of our man pages are a little heavy with the posix macros, which expand into a wall of text, especially when repeated multiple times. here's a diff that cleans up a few

minor opencvs patch

2012-06-21 Thread Ted Unangst
While trying to dig into another problem, I decided that there's entirely too much reallocing taking place when parsing rcsnums. There's also some confusion over just how big an rcsnum we expect to see. In one place we 64 to mean the things between the dots, and in another we use 64 to mean

man page standards

2012-06-21 Thread Ted Unangst
some of our man pages are a little heavy with the posix macros, which expand into a wall of text, especially when repeated multiple times. here's a diff that cleans up a few offenders, by mostly trimming out what i think is excess verbiage. more man pages are likely afflicted as well, this is a

Re: vmyield diff (2) please test

2012-06-15 Thread Ted Unangst
On Fri, Jun 15, 2012 at 18:07, Ariane van der Steldt wrote: I'm wondering if if (curcpu()-ci_schedstate.spc_schedflags SPCF_SHOULDYIELD) preempt(NULL); shouldn't be a special function in kern_sched, I suspect its useful for more parts of the kernel (although I wouldn't know which ones). In

Re: vmyield diff (2) please test

2012-06-14 Thread Ted Unangst
. If neither is true, we don't preempt (thus not calling mpswitch(), not releasing the kernel lock etc etc). For this reason it doesn't work well on SMP. Unfortunately the above conditions may be false if for ex 2 processes are spread out across 2 cpus: the cpu with the biglock will not

Re: ramdisk overflow during make release with -stable on amd64

2012-06-06 Thread Ted Unangst
On Wed, Jun 06, 2012 at 12:26, Peter Bisroev wrote: Hi All! I am having an issue making a 5.1 stable release using a patch branch synced on 2012-06-05 using: cvs -q -d$CVSROOT checkout -P -rOPENBSD_5_1 src ports xenocara. amd64/ramdiskA kernel seems to be too big to fit on the default

Re: path correction

2012-04-14 Thread Ted Unangst
On Fri, Apr 13, 2012, Peter J. Philipp wrote: This probably saw some debate in the past, which I did not see. On my IRC channel it is concensus that the path given out is dangerous. Why? They whole point of putting home first is so you can override system software. If there are dangerous

Re: move systrace to the process struct

2012-04-12 Thread Ted Unangst
On Thu, Apr 12, 2012, Paul Irofti wrote: Requested by guenther, okay? It's harder than that. With this change, the first thread to exit will un-systrace the entire process.

Re: move systrace to the process struct

2012-04-12 Thread Ted Unangst
On Thu, Apr 12, 2012, Paul Irofti wrote: On Thu, Apr 12, 2012 at 12:44:55PM -0400, Ted Unangst wrote: On Thu, Apr 12, 2012, Paul Irofti wrote: Requested by guenther, okay? It's harder than that. With this change, the first thread to exit will un-systrace the entire process. Right... I

Re: [cwm patch 1/6] Implement shell-like tab-completion for menus

2012-04-08 Thread Ted Unangst
On Fri, Jan 20, 2012, Alexander Polakov wrote: I'm not sure how you got your clock so wrong, but I almost missed all your mails because they did not show up where I expected them.

Re: KERNEL MODIFICATION in config(8)

2012-03-21 Thread Ted Unangst
On Wed, Mar 21, 2012, Alexey E. Suslikov wrote: The kernel is too old (pre OpenBSD 2.6) and cannot support all of the functionality needed by the -e option. Isn't that OpenBSD 2.6-beta pmap arch config example somewhat exotic and outdated? So about too old pre OpenBSD 2.6 kernel comment.

Re: md5: new -C flag to skip non-existent files in checklist

2012-03-15 Thread Ted Unangst
On Mon, Mar 12, 2012, Stuart Henderson wrote: On 2012/03/12 00:49, Daniel C. Sinclair wrote: What do you think of making cksum output: (SHA256) nonexistant.txt: MISSING instead of FAILED and the extra output to stderr saying No such file or directory? I think this would be useful (in

Re: one usb_mem pool per host controller

2012-03-13 Thread Ted Unangst
On Wed, Mar 14, 2012, Tobias Ulmer wrote: I have a couple of machines with an EHCI controller that refuses to work with memory above 2G, causing all kinds of trouble. This diff enables setting a bus_dma boundary and allows me to make off-site backups again. Due to the bus_dma pool being

fix file sysctl

2012-03-12 Thread Ted Unangst
run fstat -u root. observe non root files. I don't know why you would pass -1 here to get all files when there's better ways to do that, but just the same, I won't change that. Index: kern_sysctl.c === RCS file:

Re: Sysctl(3) man page

2012-03-09 Thread Ted Unangst
On Fri, Mar 09, 2012, Donald Allen wrote: OpenBSD's pride in its man pages is justified, for the most part. But having recently decided to come back to OpenBSD after a long hiatus, I found myself completely baffled by how to get battery status information via sysctl(3). I use suckless.org's

Re: posix_spawn(3)

2012-03-09 Thread Ted Unangst
On Fri, Mar 09, 2012, Frank Denis wrote: Hi Matthew, Good catch. I'm going to fix that. On Mar 9, 2012, at 10:54 AM, Matthew Dempsky matt...@dempsky.org wrote: I briefly looked over this code, and the diff looks good to me except for one subtle FreeBSDism: memory writes done in a

Re: -not for find(1)

2012-02-27 Thread Ted Unangst
On Mon, Feb 27, 2012, Steffen Daode Nurpmeso wrote: this patch adds the -not operator to find(1). I personally always found -not easier to use due to shell escaping, but today may laziness has bitten back. And it's just one more non-POSIX-compliant option. This makes a lot of sense to me, but

Re: -not for find(1)

2012-02-27 Thread Ted Unangst
On Mon, Feb 27, 2012, Ingo Schwarze wrote: The argument that -not is easier to type than \! doesn't convince me at all; at best, it's a matter of taste. And even if it were a bit easier, that wouldn't excuse interface bloat. It's only a little easier to type, but it is more consistent. find

Re: NEW: libc getdelim(3) and getline(3)

2012-01-26 Thread Ted Unangst
On Thu, Jan 26, 2012, Jan Klemkow wrote: I miss some std libc functions in OpenBSD. So, I deside to implement a few of them by myself. This is a diff for getdelim(3) and getline(3). it is too late for this release, I'd advise sending again once 5.1 is released. At the moment this patch

allow more glob stats

2012-01-18 Thread Ted Unangst
The glob limit to only allow 128 stat calls seems rather low. We allow 16384 readdir calls, by comparison. We also have a limit on the amount of memory used, which effectively caps stats too. Why 2048? I have 1435 files in /usr/local/bin and I think even a limited glob should be able to list

Re: du close handle before exiting

2011-12-31 Thread Ted Unangst
why? On Sat, Dec 31, 2011, Loganaden Velvindron wrote: In du.c, fts_close() is missing before exit. fts_close() may also return -1 on hitting an error. Index: usr.bin/du/du.c === RCS file: /cvs/src/usr.bin/du/du.c,v

<    9   10   11   12   13   14   15   16   17   >