faster fast grep

2013-04-30 Thread Ted Unangst
For simple patterns, grep has an optimization to avoid regex and run about 50% faster. The problem is its idea of simple patterns is too simple. This diff switches the logic around from a whitelist to a blacklist. We only need to abort the fast path if we see a magic regex character. Index:

Re: Test needed: ehci(4) suspend/resume rework

2013-05-01 Thread Ted Unangst
On Sun, Apr 28, 2013 at 15:44, Martin Pieuchot wrote: Diff below is a rework of the suspend/resume logic in ehci(4). In case this diff doesn't help or if you have a problem when resuming, I left an #ifdef 0 block in the DVACT_RESUME. Try enabling it and tell me if it changes something. Got

Re: faster fast grep

2013-05-01 Thread Ted Unangst
On Wed, May 01, 2013 at 04:28, J?r?mie Courr?ges-Anglas wrote: Ted Unangst t...@tedunangst.com writes: For simple patterns, grep has an optimization to avoid regex and run about 50% faster. The problem is its idea of simple patterns is too simple. IIUC the idea is to optimize for a lazy

Re: Behaviour of ksh(1)

2013-05-02 Thread Ted Unangst
On Thu, May 02, 2013 at 13:12, Steffen Daode Nurpmeso wrote: Hi, you should try echo BEFORE unset KSH_VERSION echo AFTER ksh: unset: KSH_VERSION is read only So don't unset it?

tweak for lockmgr

2013-05-03 Thread Ted Unangst
As much as I hate adding more code to lockmgr, the recent rototill made one incompatible change. We need to preserve the difference between shared and exclusive locks (only tmpfs seems to care). Index: kern_rwlock.c === RCS file:

Re: tweak for lockmgr

2013-05-03 Thread Ted Unangst
On Fri, May 03, 2013 at 09:55, Ted Unangst wrote: As much as I hate adding more code to lockmgr, the recent rototill made one incompatible change. We need to preserve the difference between shared and exclusive locks (only tmpfs seems to care). Thinking about this some more, I like it even

Re: ftpd log address format

2013-05-03 Thread Ted Unangst
On Sat, May 04, 2013 at 07:26, Martijn van Duren wrote: For a lot of cases this isn't a problem. But there are a couple of instances where the domain name resolves to something a little to generic to be useful to determine it's origin and hence I'm not able to decide if it's a legit connection

remove amd64 ioperm

2013-05-04 Thread Ted Unangst
We have never implemented amd64_get_ioperm and amd64_set_ioperm. There are libarch stubs, but the kernel support has never been enabled. I'm guessing nobody will miss it when it's gone. The man page also contains amusing lies like The permission bitmap contains 1024 bits in 32 longwords. It's

i387 cleanup

2013-05-04 Thread Ted Unangst
remove some old 387 flotsam and jetsam. Index: include/npx.h === RCS file: /cvs/src/sys/arch/i386/include/npx.h,v retrieving revision 1.17 diff -u -p -r1.17 npx.h --- include/npx.h 23 Mar 2011 16:54:35 - 1.17 +++

realloc errno

2013-05-06 Thread Ted Unangst
If growing the current region fails, realloc will leave errno set, even though the function will eventually succeed. Index: stdlib/malloc.c === RCS file: /cvs/src/lib/libc/stdlib/malloc.c,v retrieving revision 1.149 diff -u -p

Re: CryptoCard support broken on AMD64

2013-05-07 Thread Ted Unangst
On Tue, May 07, 2013 at 11:13, Matthias Pitzl wrote: Hi! I think the support for CryptoCards is broken on AMD64. The diff below fixes it again. Very good!

Re: ftpd log address format

2013-05-07 Thread Ted Unangst
On Sun, May 05, 2013 at 15:18, Stuart Henderson wrote: I don't feel too strongly about it but my preference would be to log both. There are circumstances (e.g. dhcp with dynamic dns updates) where it's useful to have the reverse at the time of connection. Are you talking about internal or

Re: ftpd log address format

2013-05-07 Thread Ted Unangst
On Tue, May 07, 2013 at 20:54, Stuart Henderson wrote: I don't like logging both because there's a not unreasonable chance the reverse name will be a complete lie, which will just mislead you. Oh, it doesn't do a forward check of the name it got from reverse lookup? Yes that's bad. Well,

Re: ftpd log address format

2013-05-07 Thread Ted Unangst
On Tue, May 07, 2013 at 21:15, Stuart Henderson wrote: On 2013/05/07 16:09, Ted Unangst wrote: On Tue, May 07, 2013 at 20:54, Stuart Henderson wrote: I don't like logging both because there's a not unreasonable chance the reverse name will be a complete lie, which will just mislead you

Re: add nl(1)

2013-05-08 Thread Ted Unangst
On Tue, Apr 30, 2013 at 18:57, Arto Jonsson wrote: Taken from netbsd with minor modifications. Comments? I don't think you've received much feedback. I don't know how other developers feel, but the question I have is can't this be done with a rather simple awk script? or perl? One of the reasons

Re: adduser default blowfish rounds

2013-05-13 Thread Ted Unangst
On Mon, May 13, 2013 at 20:44, Stuart Henderson wrote: On 2013/05/13 19:32, Mark Lumsden wrote: I agree. tedu suggest 9 for the number of user rounds and 11 for root back in 2010. Are these numbers reasonable on most archs? Note that login.conf defaults can be adjusted on a per arch basis. We

Re: adduser default blowfish rounds

2013-05-14 Thread Ted Unangst
On Tue, May 14, 2013 at 13:16, Mike Belopuhov wrote: I think the minimum number of rounds needs to be documented somehow. I think this magic number needs to be documented. Here is a simpler version with fewer magic numbers. Nothing uses this yet, of course, I just want to get the facility

Re: cvsweb says 'No viewable change' for i915_drv.c diffs

2013-05-15 Thread Ted Unangst
On Wed, May 15, 2013 at 13:25, Stefan Sperling wrote: This should make it work. See also r1.82 of usr.bin/diff/diffreg.c. I love this bug! There's lots of copies so everybody gets a chance to fix it. Index: diff.c === RCS

apmd messages

2013-05-15 Thread Ted Unangst
I would like for apmd to tell me when the system goes to sleep, not just when it wakes up. Index: apmd.c === RCS file: /cvs/src/usr.sbin/apmd/apmd.c,v retrieving revision 1.59 diff -u -p -r1.59 apmd.c --- apmd.c 29 Apr 2013

Re: [PATCH] add filter by host functionality to syslogd

2013-05-22 Thread Ted Unangst
On Wed, May 22, 2013 at 12:06, Gregory Edigarov wrote: works for me, with only one limitation: now only for resolvable hosts, i.e one cannot have +192.168.2.1 * /some/file Looking at the diff, I think it's not resolvable hosts, but whatever hostname the sending machine decides

Re: [PATCH] add filter by host functionality to syslogd

2013-05-23 Thread Ted Unangst
On Thu, May 23, 2013 at 12:57, Gregory Edigarov wrote: On 05/22/2013 06:39 PM, Ted Unangst wrote: On Wed, May 22, 2013 at 12:06, Gregory Edigarov wrote: works for me, with only one limitation: now only for resolvable hosts, i.e one cannot have +192.168.2.1 * /some/file Looking

Re: [PATCH] add filter by host functionality to syslogd

2013-05-23 Thread Ted Unangst
On Thu, May 23, 2013 at 19:55, Gregory Edigarov wrote: That's just a string compare. The remote host can send any string it wants. yes, it doesn't do any host resolution itself and there is no need in this, because syslogd already does this. (the resolution happens in main cycle, namely

mandoc strlcat

2013-05-23 Thread Ted Unangst
I was looking at mandoc and noticed it has too many strlcats (a common affliction affecting quite a few programs.) It's faster and simpler to use snprintf. The code in roff.c was doing something twisty with the length argument to strlcpy. Doing fancy length tricks kind of defeats the purpose of

simplify strlcat in tcpdump

2013-05-23 Thread Ted Unangst
just pfctl_osfp.c. harder to replace strlcat when it's in a loop, but some of the straight line calls can be done as snprintf followed by one strlcat. worth it? Index: pfctl_osfp.c === RCS file:

Re: mandoc strlcat

2013-05-23 Thread Ted Unangst
On Thu, May 23, 2013 at 21:38, Theo de Raadt wrote: In glibc snprintf has a memory allocation failure mode. I'm curious: is OpenBSD committed to avoiding extensions (locale features, etc) which might trigger allocation failure? Yes. I mean, what in the world is snprintf doing allocating some

Re: Fuse (and sshfs) support for OpenBSD

2013-06-03 Thread Ted Unangst
On Mon, Jun 03, 2013 at 17:14, Sylvestre Gallon wrote: You will find in this mail a patch for fuse support in kernel. I will send 2 other mails for the userland and the ports patch. There is still work to do on my fuse implementation but as I understand there is an hackathon occuring at the

put procs on rb tree

2013-06-04 Thread Ted Unangst
Instead of using a fixed size hash table for procs, use an rb tree. Makes thread/process lookup even more web scale. Index: kern/init_main.c === RCS file: /cvs/src/sys/kern/init_main.c,v retrieving revision 1.189 diff -u -p -r1.189

Re: correct includes in man(3) pages

2013-06-04 Thread Ted Unangst
On Mon, Jun 03, 2013 at 23:21, Jan Klemkow wrote: This diff converts all obsolete '.Fd' tags into '.In' tags of manpages of category three. I hope this diff is ok so. If something is wrong with is, just wrote me and I will fix it. Thanks! I fixed most of them, the ones that are clearly our

Re: correct includes in man(2) pages

2013-06-05 Thread Ted Unangst
On Wed, Jun 05, 2013 at 17:56, Jason McIntyre wrote: we should be careful here. mandoc renders it like this: SYNOPSIS #include ufs/ufs/quota.h /* for ufs quotas */ #include unistd.h whereas groff does this: SYNOPSIS #include ufs/ufs/quota.h /* for ufs quotas */ #include unistd.h

Re: correct mistake in logger(1) man page

2013-06-05 Thread Ted Unangst
On Wed, Jun 05, 2013 at 19:28, Andr? St?be wrote: logger -f, as described in the man page, -f file Log to the specified file. actually logs (the contents of) the specified file. Thanks. I changed the wording to Read from the specified file. so it's even more clear.

Re: put procs on rb tree

2013-06-05 Thread Ted Unangst
On Wed, Jun 05, 2013 at 14:13, Alexandre Ratchov wrote: On Tue, Jun 04, 2013 at 11:33:12PM -0400, Ted Unangst wrote: Instead of using a fixed size hash table for procs, use an rb tree. Makes thread/process lookup even more web scale. any measurement? o ye of little faith... stock 54.65

bzip2

2013-06-05 Thread Ted Unangst
} ${DESTDIR}${BINDIR}/bzip2 + + +.include bsd.prog.mk --- /dev/null Wed Jun 5 20:55:02 2013 +++ bzip2/bzip2.pl Wed Jun 5 20:53:23 2013 @@ -0,0 +1,113 @@ +#!/usr/bin/perl -w +# $OpenBSD$ +# Copyright (c) Ted Unangst t...@openbsd.org +# +# Permission to use, copy, modify, and distribute

Re: bzip2

2013-06-06 Thread Ted Unangst
On Thu, Jun 06, 2013 at 14:20, Mark Kettenis wrote: I've ranted before about implementing standard tools in Perl. The user experience just isn't the same as with C code. But even more so than with nl(1), why would we want to use something that's different from what everybody else uses? If

Re: sysctl fix

2013-06-06 Thread Ted Unangst
On Thu, Jun 06, 2013 at 15:39, Sylvestre Gallon wrote: Hi tech@ I was currently trying to get the fuse sysctls working when I found a bug in sbin/sysctl.c If you look at sys/kern/vfs_init.c MOUNT_FUSEFS use the biggest typenum : 18. So when the function vfsinit in sbin/sysctl.c gets

Re: sysctl fix

2013-06-06 Thread Ted Unangst
On Thu, Jun 06, 2013 at 11:42, patrick keshishian wrote: Just curious, how do the variable name changes help any warrnings? nflag - nf -Wshadow. nflag is a global, which becomes hidden by giving a local parameter the same name. The code is kind of silly anyway, since the only call to that

Re: sysctl fix

2013-06-06 Thread Ted Unangst
On Thu, Jun 06, 2013 at 23:53, Sylvestre Gallon wrote: Hi, Sorry for the last mistakes. Here is a new diff that allow the maxtypenum to be reached. Cheers, Index: sysctl.c === RCS file: /cvs/src/sbin/sysctl/sysctl.c,v

Re: add nl(1)

2013-06-07 Thread Ted Unangst
On Tue, May 28, 2013 at 20:52, Arto Jonsson wrote: ping Updated diff. I removed the int width handling and modified the separator printing based on your comment. I suppose since I stuck my nose in this before, I'm on the hook to give you a decent reply. I have an active interest in chasing

Re: sysctl fix

2013-06-09 Thread Ted Unangst
On Thu, Jun 06, 2013 at 23:58, Sylvestre Gallon wrote: Here is a second one to add fuse sysctls. +#define FUSEFS_NB_OPENDEVS 1 /* # of fuse devices opened */ Applied, except I changed this to FUSEFS_OPENDEVS, which seemed a little simpler. Thanks.

Re: pxeboot hd0a:/bsd tries to nfs_boot...

2010-06-28 Thread Ted Unangst
You can build a kernel that knows where root is. man config On Mon, Jun 28, 2010 at 3:52 PM, Nick Bender nben...@gmail.com wrote: Hi All, First the problem. Once a machine is automatically installed we want to change things so that it will boot from the hard drive. We have two

better cpu throttling

2010-06-30 Thread Ted Unangst
I like this one better. Slow down the poll interval just a little so it's not so hysterical, but also go straight to 100. If you need CPU, you need CPU. It still backs down slowly, but that's just to prevent getting caught in slow mode again. It also pays attention to per-core load, much

Re: better cpu throttling

2010-06-30 Thread Ted Unangst
On Wed, Jun 30, 2010 at 3:23 PM, Luis Henriques luis.hen...@gmail.com wrote: Probably, a silly question, but here it goes: With this patch, I will not be able to set the perflevel to, say, 50% and keep the system using that performance level forever. Is this correct? I guess that with

Re: [resend] Please test this ACPI panic check diff

2010-07-01 Thread Ted Unangst
On Thu, Jul 1, 2010 at 2:53 PM, Jordan Hargrave jor...@cvs.openbsd.org wrote: Index: dev/acpi/acpi.c === RCS file: /cvs/src/sys/dev/acpi/acpi.c,v retrieving revision 1.169 diff -u -p -u -p -b -r1.169 acpi.c --- dev/acpi/acpi.c

Re: Adding support for Camellia on OpenSSH.

2010-07-17 Thread Ted Unangst
In general, other people do it is a weak justification. I don't see any reason to believe camellia would actually be better than aes. Nessie picked aes too, you know. Not to mention there are software patent claims againt camellia. That's a no go right there. On Jul 17, 2010, at 7:12 PM,

Re: Adding support for Camellia on OpenSSH.

2010-07-19 Thread Ted Unangst
On Mon, Jul 19, 2010 at 8:22 PM, Joerg Sonnenberger jo...@britannica.bec.de wrote: On Mon, Jul 19, 2010 at 06:37:21PM -0400, STeve Andre' wrote: On Monday 19 July 2010 18:26:15 Ted Unangst wrote: Free software you can't modify is not free software. Algorithm != implementation (== software

small mount_mfs nit

2010-07-22 Thread Ted Unangst
There's no reason mount_mfs can't handle force mounts. Without this, -f just prints a silly warning. Index: newfs.c === RCS file: /home/tedu/cvs/src/sbin/newfs/newfs.c,v retrieving revision 1.86 diff -u -r1.86 newfs.c --- newfs.c

nicer disklabel -p

2010-08-07 Thread Ted Unangst
1. accept capital letters too, like the interactive -E command does. 2. usage() is not the most appropriate error response. be more helpful. Index: disklabel.c === RCS file: /home/tedu/cvs/src/sbin/disklabel/disklabel.c,v

minor disklabel cleanup

2010-08-11 Thread Ted Unangst
Noticed this on a previous commit, just before lock. Index: disklabel.c === RCS file: /cvs/src/sbin/disklabel/disklabel.c,v retrieving revision 1.170 diff -u -r1.170 disklabel.c --- disklabel.c 8 Aug 2010 05:24:46 - 1.170

ntfs cleanup

2010-08-11 Thread Ted Unangst
clean up some chunks of the baboon code in here. as a bonus, it fixes an off by one error in a string copy. yes, a fucking off by one string termination bug in 2010. otherwise, i don't think this changes any behavior. Index: ntfs.h

cleanup portmap

2010-08-12 Thread Ted Unangst
little bits to make things better. mostly style. things of note are checking return value of chdir and changing a loop bound to be more clear. unfortunately, rpc xdr code still uses char * as a generic pointer type, and I'm not sure if this code really wants long instead of int, or why.

Re: RLIMIT_AS missing

2010-08-15 Thread Ted Unangst
On Sun, Aug 15, 2010 at 12:55 PM, Philippe Meunier meun...@ccs.neu.edu wrote: Hello, I just tried to compile some software on OpenBSD and it failed because OpenBSD does not provide RLIMIT_AS: http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/resource.h?rev=1.8;content- type=text%2Fplain even

misc. ctl parser.c cleanup

2010-08-22 Thread Ted Unangst
I think this is slightly better, though there isn't much functional change. This code certainly gets around... Index: dvmrpctl/parser.c === RCS file: /home/tedu/cvs/src/usr.sbin/dvmrpctl/parser.c,v retrieving revision 1.4 diff -u

Re: end the VOP experiment

2010-08-27 Thread Ted Unangst
Very good then. Hard to remember what c99 features are supported where. On Aug 27, 2010, at 10:44 AM, Thordur I Bjornsson bzt...@gmail.com wrote: On Fri, Aug 27, 2010 at 09:34:30AM -0400, Ted Unangst wrote: On Fri, Aug 27, 2010 at 4:54 AM, Thordur I Bjornsson bzt...@gmail.com wrote

Re: generating new host key...

2010-09-07 Thread Ted Unangst
On Tue, Sep 7, 2010 at 6:47 PM, Alexander Hall ha...@openbsd.org wrote: This isn't C. :) first=1 first=true first= first=false [ $first ] || echo $first || echo

Re: generating new host key...

2010-09-08 Thread Ted Unangst
On Tue, Sep 7, 2010 at 7:18 PM, Alexander Hall ha...@openbsd.org wrote: $ which true false /usr/bin/true /usr/bin/false while those should be available to /etc/rc, I'd prefer not using them. -5 points for using which. :) $ whence -v true true is a shell builtin I happen to think that

unify some malloc and pool flags

2010-09-09 Thread Ted Unangst
A few related changes here. Make pool flags the same as malloc flags with the same behavior. Give every flag a real value, so nobody screws up trying to test for a 0 flag. Assert that one of the wait ok or not flags is specified. Index: kern/kern_malloc.c

Re: revised kernel perf control

2010-09-10 Thread Ted Unangst
On Fri, Sep 10, 2010 at 10:41 AM, Alexander Hall ha...@openbsd.org wrote: + if (!totalticks) + if (!(totalticks = malloc(sizeof(*totalticks) * ncpusfound, + M_DEVBUF, M_NOWAIT | M_ZERO))) { + free(idleticks, M_DEVBUF); +

Re: revised kernel perf control

2010-09-13 Thread Ted Unangst
On Fri, Sep 10, 2010 at 4:34 PM, Alexander Hall ha...@openbsd.org wrote: I wasn't aware of any problems with suspend. My laptop doesn't resume reliably anyway, so it's not something I tested for. But it's just running some code in a timeout. If timeouts are still running during suspend, I'd

Re: bioctl patch (inline) diff -uNp

2010-09-14 Thread Ted Unangst
On Tue, Sep 14, 2010 at 3:46 PM, merlyn merlyn...@gmail.com wrote: I am not a fan of this. Why wouldn't you do this in the wrapping script? Just because I think such a basic thing should be presend. And I'm not a fan of doing this in wrapping script. However I respect your decision. I'm

Re: Handling sysctl hw.serialno

2010-09-28 Thread Ted Unangst
You're asking why something that doesn't exist can't be found? It can't be found because it doesn't exist. What would you like the sysctl to return if there's no serialno? On Tue, Sep 28, 2010 at 10:36 AM, Destan YILANCI (Parta) dyila...@parta.com.tr wrote: Hello Everyone, I want to get

random.4

2010-10-02 Thread Ted Unangst
Is this the best way to deprecate support for the srandom and urandom devices? The devices themselves are going to stick around for a while, but we only need to tell people about one, right? Index: random.4 === RCS file:

Re: random.4

2010-10-02 Thread Ted Unangst
On Sat, 2 Oct 2010, Jason McIntyre wrote: On Sat, Oct 02, 2010 at 12:00:30PM -0400, Ted Unangst wrote: Is this the best way to deprecate support for the srandom and urandom devices? The devices themselves are going to stick around for a while, but we only need to tell people about one

Re: timer randomness in random

2010-10-03 Thread Ted Unangst
On Sun, Oct 3, 2010 at 9:08 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Sat, 2 Oct 2010 11:54:13 -0400 (EDT) From: Ted Unangst ted.unan...@gmail.com Speaking of the entropy pool, it should be difficult for a user to influence, right? So it's not the greatest idea to allow anyone

important new unit

2010-10-13 Thread Ted Unangst
Let's say you have a football field in need of a trimming, but the lawn mowers are all broken, but you have an oxen store nearby. Oh, and the big match is in an hour. How many oxen do you need? Normally, you'd use units, but... You have: m2/hr You want: ox unknown unit 'ox' Easy fix.

yield in long kernel loops

2010-10-13 Thread Ted Unangst
So it's not a good idea to perform long lasting operations in the kernel. The scheduler doesn't deal well with it and nobody else gets to run. One of those long loops is loading a large table into pf. If you're lucky, you'll run out of memory and pool will finally sleep. I stuck a couple

Re: smtpd w/ async DNS

2010-10-14 Thread Ted Unangst
On Thu, Oct 14, 2010 at 10:47 AM, Gilles Chehade gil...@openbsd.org wrote: eric@ has written an (awesome :p) asynchronous resolver that allows us to do non-blocking DNS lookups. Why not use the evdns resolver in libevent? If you're already using libevent, wouldn't that be a good fit? DNS

Re: smtpd w/ async DNS

2010-10-14 Thread Ted Unangst
On Thu, Oct 14, 2010 at 11:17 AM, Gilles Chehade gil...@poolp.org wrote: we don't have evdns in our libevent and I'm pretty confident it's not going to happen any time soon given how many times I heard no fucking way by different hackers :p In that case, here's some more constructive feedback

Re: yield in long kernel loops

2010-10-14 Thread Ted Unangst
On Thu, Oct 14, 2010 at 11:29 AM, Mike Belopuhov m...@crypt.org.ru wrote: On Thu, Oct 14, 2010 at 2:08 AM, Ted Unangst ted.unan...@gmail.com wrote: So it's not a good idea to perform long lasting operations in the kernel. The scheduler doesn't deal well with it and nobody else gets to run

Re: testing rthreads

2010-10-25 Thread Ted Unangst
On Sun, Oct 24, 2010 at 7:21 PM, Vladimir Kirillov pro...@uaoug.org.ua wrote: I get this segfault almost always: #0 pthread_exit (retval=0x0) at /usr/src/lib/librthread/rthread.c:223 223 for (clfn = thread-cleanup_fns; clfn; ) { That's weird. Can you print out thread at that

Re: yield in pf_table

2010-10-28 Thread Ted Unangst
On Fri, 29 Oct 2010, Ted Unangst wrote: now that the atomic flag is gone, the yield diff is simpler. once again, the idea is that unbounded (or of unknown bounds) loops in the kernel are bad because you hog the cpu. so be polite and yield from time to time. anybody use tables heavily

Re: yield in pf_table

2010-10-31 Thread Ted Unangst
On Fri, 29 Oct 2010, Ted Unangst wrote: On Fri, 29 Oct 2010, Ted Unangst wrote: now that the atomic flag is gone, the yield diff is simpler. once again, the idea is that unbounded (or of unknown bounds) loops in the kernel are bad because you hog the cpu. so be polite and yield from

Re: Writing to mmaped region cause segfault

2010-11-03 Thread Ted Unangst
On Wed, Nov 3, 2010 at 8:33 AM, Alexey Suslikov alexey.susli...@gmail.com wrote: This is somewhat ports related, but I decided to ask here before going further with diff. Well, we have Asterisk 1.6.2.14-rc1 going segfault: #0 generic_http_callback (format=FORMAT_XML, remote_address=0x4001,

Re: pool_sethardlimit should not imply pool_sethiwat

2010-11-03 Thread Ted Unangst
On Wed, Nov 3, 2010 at 11:22 AM, Mike Belopuhov m...@crypt.org.ru wrote: there are situations when you need to keep around more pages than the default (which is 8 btw), but surely this isn't the same as a possible maximum of entries pool can give away. these pools can call pool_sethiwat

Re: document ldapd schema files

2010-11-04 Thread Ted Unangst
On Wed, Nov 3, 2010 at 4:00 PM, Martin Hedenfalk mar...@bzero.se wrote: On Wed, Nov 03, 2010 at 01:19:26PM -0400, Ted Unangst wrote: Am I missing something, or is there no documentation for the schema files? man ldapd.conf tells me I can include additional schema files via the schema keyword

Re: document ldapd schema files

2010-11-04 Thread Ted Unangst
On Thu, Nov 4, 2010 at 3:10 PM, Adam M. Dutko dutko.a...@gmail.com wrote: I can't really comment on the accuracy because I'm trying to avoid learning about LDAP at all cost, but this gives me enough info to start searching with, so I think it's a great addition. What is the technical reason

Re: Add Xbox 360 Controller USB support

2010-11-08 Thread Ted Unangst
On Mon, Nov 8, 2010 at 3:38 PM, Joe Gidi j...@entropicblur.com wrote: This is taken pretty much straight from FreeBSD ( see http://marc.info/?l=freebsd-commits-allm=113600388101707w=2 ). It is tested and working on my amd64 box. Some usbhidctl output: At a minimum, should probably be inside

wifid

2010-11-11 Thread Ted Unangst
here's a little lump of perl i've been using to hop wireless networks, which i found considerably easier to use than fiddling with hostname files all the time. if you leave home and go to work, you want to pick up the new net there. or if you turn the radio off to save power at a conference,

Re: iostat and more than one core

2010-11-17 Thread Ted Unangst
2010/11/17 Mike Belopuhov m...@crypt.org.ru: I think this time around it's kernel that's wrong. top(1) calls CPTIME2 when 'ncpus 1' to get detailed per-cpu information. CPTIME is only valid on UP systems, but can represent an average value on MP without having userland programs figure out

posix mistake is here to stay

2010-11-19 Thread Ted Unangst
Speed up libc compiles by not copying a useless string into the command line of every cc invocation. :) Index: Makefile.inc === RCS file: /home/tedu/cvs/src/lib/libc/regex/Makefile.inc,v retrieving revision 1.6 diff -u -r1.6

too much stack use in localtime.c

2010-11-19 Thread Ted Unangst
I don't know if this was caused by an update, or just by nobody ever using time functions in a thread, but this union is too big for threaded stacks. Index: time/localtime.c === RCS file:

tar -N for numeric

2010-11-19 Thread Ted Unangst
i just discovered tar has a really sweet feature where it takes the name of a user or group in the archive and uses that to guess what uid and gid to create the file as when using p. it turned out this was not at all what i wanted, since i was processing the tar files on a system that had

Re: sys/types.h in sys/socket.h

2010-11-20 Thread Ted Unangst
On Sat, Nov 20, 2010 at 9:18 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: openbsd is apparently among the last operating systems to require sys/types.h before sys/socket.h. posix doesn't require this and it runs contrary to current recommendations i think, so it's just one more weird

Re: sys/types.h in sys/socket.h

2010-11-20 Thread Ted Unangst
On Sat, Nov 20, 2010 at 11:54 AM, Ted Unangst ted.unan...@gmail.com wrote: On Sat, Nov 20, 2010 at 9:18 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: openbsd is apparently among the last operating systems to require sys/types.h before sys/socket.h. posix doesn't require this and it runs

Re: add an example to mbrtowc(3) man page

2010-11-20 Thread Ted Unangst
On Sat, Nov 20, 2010 at 11:48 AM, Stefan Sperling s...@openbsd.org wrote: I'm currently going through the man pages for the multibyte-widechar conversion APIs. No examples are provided so it's hard to tell at a glance how to use a function safely. Below is a first stab at adding an example

Re: sys/types.h in sys/socket.h

2010-11-21 Thread Ted Unangst
Is this enough to compile socket.h by itself? I think sockcred needs to be hidden inside bsd visible too, because you aren't providing uid_t that i can see. On Sun, Nov 21, 2010 at 3:45 AM, Philip Guenther guent...@gmail.com wrote: ...and here's a diff for discussion that removes the

Re: tar -N for numeric

2010-11-21 Thread Ted Unangst
On Sat, 20 Nov 2010, Ted Unangst wrote: this diff adds a -N flag to turn off this behavior, -N for numeric (or no names, if you prefer). i found a similar --long-option-only in gnu tar. slightly improved. should now work for creating archives as well, and some man page improvemnts. Index

usb mem wait

2010-11-21 Thread Ted Unangst
instead of faking an assertwaitok check, let's use the real thing. this is almost the opposite of progress on the whole bluetooth issue, but it shortens the stack trace considerably. the curproc check isn't terribly accurate, either, so it misses bugs. i don't see any reason to avoid

zap stats and ioctl from rnd

2010-11-21 Thread Ted Unangst
is any of this useful? has anybody ever manually stirred the random device or tried interpreting the nonsense spit out by sysctl kern.random? [this would also delete the rndioctl.h header entirely.] Index: dev/rnd.c === RCS file:

Re: tar -N for numeric

2010-11-21 Thread Ted Unangst
On Sun, Nov 21, 2010 at 7:29 PM, Alexander Hall ha...@openbsd.org wrote: On 11/21/10 18:15, Ted Unangst wrote: On Sat, 20 Nov 2010, Ted Unangst wrote: this diff adds a -N flag to turn off this behavior, -N for numeric (or no names, if you prefer). i found a similar --long-option-only in gnu

Re: usb mem wait

2010-11-22 Thread Ted Unangst
On Mon, Nov 22, 2010 at 12:06 AM, Jacob Meuser jake...@sdf.lonestar.org wrote: On Sun, Nov 21, 2010 at 06:47:01PM -0500, Ted Unangst wrote: instead of faking an assertwaitok check, let's use the real thing. this is almost the opposite of progress on the whole bluetooth issue, but it shortens

Re: mount_vnd salt file nits

2010-11-26 Thread Ted Unangst
This implies they created their own salt file? That's probably a bad idea, because it implies they don't understand what it's for. On Nov 26, 2010, at 4:35 AM, Janne Johansson icepic...@gmail.com wrote: As j...@freenode found out, the salt file needs to be 128 bytes (or larger), but no part of

maxdsiz tweaking

2010-11-28 Thread Ted Unangst
What follows is a somewhat older mail I had forgotten about. It's suddenly become more interesting to be because I was playing around with jruby which requires a big heap size. It pisses me off to own a 3GB laptop and only be able to use 1GB of that memory. This does 2.5 things. 1. If

Re: allow bioctl to read passphrase from stdin

2010-11-30 Thread Ted Unangst
err, the last time this came up you said you would do it right... :) http://marc.info/?l=openbsd-miscm=125613898224309w=2 On Tue, Nov 30, 2010 at 5:16 AM, Marco Peereboom sl...@peereboom.us wrote: I like this. On Mon, Nov 29, 2010 at 02:22:35PM -0800, Chris Kuethe wrote: Currently bioctl

more hotplug events

2010-11-30 Thread Ted Unangst
there are a lot of usb devices that attach more than 16 things at once, notably the endless stream of nonsense uhid type gadgetry. increase the limit. this will use more kernel memory of course (only a tiny bit really, but whatever) so it's allocated at first open. if you don't use hotplug,

recv buffer scaling doesn't work

2010-12-01 Thread Ted Unangst
here is the patch i have ended up using since the removal of the tcp sysctls. if something doesn't change, 4.9 will be an embarrassingly bad regression in network performance. at least with prevous releases, bumping the recvspace was an available workaround to sucky performance, but now the

Re: recv buffer scaling doesn't work

2010-12-01 Thread Ted Unangst
On Wed, Dec 1, 2010 at 10:22 PM, Ben Aitchison b...@plain.co.nz wrote: In my own tests, when I got apalling speeds like that I discovered that the remote connection had timestamps turned off. not the problem here. I'm not sure why you're trying to both raise the starting point as well as the

maxdsiz tweaking (fwd)

2010-12-01 Thread Ted Unangst
reminder that i tested this and it works responses are more helpful than yo this is awesome responses. :) -- Forwarded message -- Date: Sun, 28 Nov 2010 18:51:45 -0500 (EST) From: Ted Unangst ted.unan...@gmail.com To: tech@openbsd.org Subject: maxdsiz tweaking What follows

Re: maxdsiz tweaking (fwd)

2010-12-02 Thread Ted Unangst
On Thu, Dec 2, 2010 at 8:37 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Wed, 1 Dec 2010 23:05:41 -0500 (EST) From: Ted Unangst ted.unan...@gmail.com reminder that i tested this and it works responses are more helpful than yo this is awesome responses. :) Unless Theo withdraws hos

Re: Killing nfsd and then running netstat -m causes lockup

2010-12-03 Thread Ted Unangst
On Fri, Dec 3, 2010 at 9:09 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: Calling pool_init() multiple times is bad. This happens when you kill nfsd on a machine. Daniel does this fix your problem? ok? what happens when you restart nfsd? Index: nfs_syscalls.c

Re: Remove COMPAT_LINUX leftover from arm

2010-12-06 Thread Ted Unangst
On Mon, Dec 6, 2010 at 12:54 PM, Jasper Lievisse Adriaanse jas...@humppa.nl wrote: None of the arm ports are using COMPAT_LINUX, hence this is commented. And should be removed too? do it.

Re: hotplug(4) r1.10 ignoring hotplug_put_event() prior to hotplugopen() [Was: hotplugd(8) ignoring devices attached before boot]

2010-12-11 Thread Ted Unangst
On Sat, Dec 11, 2010 at 2:11 PM, MERIGHI Marcus mcmer-open...@tor.at wrote: the latest modification of src/sys/dev/hotplug.c (1) changes hotplug(4) behaviour concerning devices that are attached before the hotplug device is opened (by hotplugd(8), for example). such devices are ignored in

<    1   2   3   4   5   6   7   8   9   10   >