Re: LD_PRELOAD

2000-01-21 Thread Tony Finch
John Polstra <[EMAIL PROTECTED]> wrote: >Tony Finch <[EMAIL PROTECTED]> wrote: >> >> I'm experimenting with using LD_PRELOAD to implement "shim" >> wrappers around functions in libc. The first problem I had was >> compiling my shim library so that the rtld would accept it. > >The right way to do

Re: FreBSD 3.3, power off and power button stuff

2000-01-21 Thread Brooks Davis
On Fri, Jan 21, 2000 at 03:43:16PM -0800, Ralph Seguin wrote: > I'm having some difficulty getting APM and power > control working in FreeBSD 3.3 > I've built a kernel with APM enabled in the config > file and enabled it in > rc.conf, however apmd says it's starting up, but ps > never shows it run

FreBSD 3.3, power off and power button stuff

2000-01-21 Thread Ralph Seguin
Hi. I'm having some difficulty getting APM and power control working in FreeBSD 3.3 I've built a kernel with APM enabled in the config file and enabled it in rc.conf, however apmd says it's starting up, but ps never shows it running. >From /etc/rc.conf: apm_enable="YES" bash-2.03# apm -s apm: ca

new AT-GPIB and AT-GPIB/TNT driver version

2000-01-21 Thread John Galbraith
I have a new National Instruments AT-GPIB driver almost ready to go. The code is almost a total rewrite from what I had before. It has been ported to the newbus architecture and simplified quite a bit. It should also be faster, both in terms of throughput of large transfers and addressing overhe

Re: UDF

2000-01-21 Thread Conrad Minshall
At 1:20 AM -0800 1/15/00, Soren Schmidt wrote: >It seems Harold Gutch wrote: >> On Fri, Jan 14, 2000 at 09:29:58AM +0100, Soren Schmidt wrote: >> > I have it on my TODO list, but I'm not started yet, and probably wont for >> > some time to come. >> > The reason I've put it on the backburner for n

Re: LD_PRELOAD

2000-01-21 Thread John Polstra
In article <[EMAIL PROTECTED]>, Tony Finch <[EMAIL PROTECTED]> wrote: > I'm experimenting with using LD_PRELOAD to implement "shim" wrappers > around functions in libc. It's really easy to do on Solaris but I'm > having some difficulty on FreeBSD. > > The first problem I had was compiling my shi

Re: LD_PRELOAD

2000-01-21 Thread Tony Finch
Tony Finch <[EMAIL PROTECTED]> wrote: > > This brings me on to the second problem. I want to do some > initialization of my library before the real action starts. On Solaris > the linker calls a function in the object called _init() when it is > loaded; it's easy to make this work. I can see simi

LD_PRELOAD

2000-01-21 Thread Tony Finch
I'm experimenting with using LD_PRELOAD to implement "shim" wrappers around functions in libc. It's really easy to do on Solaris but I'm having some difficulty on FreeBSD. The first problem I had was compiling my shim library so that the rtld would accept it. On Solaris I can just use `gcc -c lib

Re: RLIMIT_NPROC can be exceeded via setuid/exec

2000-01-21 Thread Matthew Reimer
I solved the problem by making a small syscall KLD get_uid_nproc that just returns the result of chgproccnt(SCARG(uap, uid), 0); and by having suexec use this syscall to determine whether or not to exec the CGI: stat.version = sizeof(stat); mod_id = modfind("get_uid_nproc");

Re: Better fixit (was: Why was rsh removed from the fixit floppy?)

2000-01-21 Thread Warner Losh
In message <[EMAIL PROTECTED]> "Jordan K. Hubbard" writes: : > There's still space on there; what else could we put there? : : A copy of nethack to play while you're waiting for that fsck? : : [ducks] Jordan, you aren't being very #pragmaTIC about this, are you :-) Warner To Unsubscribe: sen

Re: Better fixit (was: Why was rsh removed from the fixit floppy?)

2000-01-21 Thread George Cox
On 21/01 04:42, Jordan K. Hubbard wrote: > > There's still space on there; what else could we put there? > > A copy of nethack to play while you're waiting for that fsck? Entirely sensible suggestion. I mean, OpenBSD has hangman in the kernel debugger. (It uses the system calls as its diction

Re: PR kern/14034: gettimeofday() returns negative value?

2000-01-21 Thread James C. Beyer
Actually, a line like temp =t1->tv_usec + 100; or using some other temp to save the t1 data before it is permuted will make the program work perfectly. t1->tv_usec += 100; Kills the correct value when t2 is updated. The another option would be to stop using pointers in the function c

Re: Better fixit (was: Why was rsh removed from the fixit floppy?)

2000-01-21 Thread Greg Lehey
On Friday, 21 January 2000 at 4:42:34 -0800, Jordan K. Hubbard wrote: >> There's still space on there; what else could we put there? > > A copy of nethack to play while you're waiting for that fsck? Is it OK if we have the non-X version only? Greg -- Finger [EMAIL PROTECTED] for PGP public key

Re: Using spinning time efficiently?

2000-01-21 Thread ROGIER MULHUIJZEN
>I'm the last person who you'd speak to for an authoritative answer to a >FreeBSD question, but I'll try fielding it. Same here =) What I have gathered about spinning on a lock is that it is indeed waiting for a lock, but not sleeping so that the process doesn't get context switches etc. and thu

Re: Using spinning time efficiently?

2000-01-21 Thread Michael Bacarella
> I once thought something might be wrong, and then found > (ALT)SYSCALL_LOCK spinning to wait for the lock to be released. Now I > am wondering if we can contribute spinning time to anything else, say > running another process, before the lock gets released. Is is possible > to do so? I'm the l

Re: Better fixit (was: Why was rsh removed from the fixitfloppy?)

2000-01-21 Thread ROGIER MULHUIJZEN
>If you want a better fixit floppy, you should consider the new custom >disk pair with PicoBSD (see picobsd(8) in -CURRENT). It includes >everything on the old fixit floppy, also real tar and a number of >other programs, including rsh. There's still space on there; what >else could we put there?

Re: RLIMIT_NPROC can be exceeded via setuid/exec

2000-01-21 Thread Michael Bacarella
On Fri, 21 Jan 2000, Doug White wrote: > On Thu, 20 Jan 2000, Matthew Reimer wrote: > > Background: in an attempt to manage our webserver to keep too many CGIs > > from taking down the machine, I've been experimenting with RLIMIT_NPROC. > > This appears to work fine when forking new processes,

Re: Better fixit (was: Why was rsh removed from the fixit floppy?)

2000-01-21 Thread Jordan K. Hubbard
> There's still space on there; what else could we put there? A copy of nethack to play while you're waiting for that fsck? [ducks] - Jordan To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Better fixit (was: Why was rsh removed from the fixit floppy?)

2000-01-21 Thread Greg Lehey
On Friday, 21 January 2000 at 2:27:02 -0800, Jordan K. Hubbard wrote: >> script. The script basically translates tar commands to cpio commands, >> which makes sense, since the cpio binary is a LOT smaller than tar. But >> there's no cpio on the fixit floppy... >> >> And there's no ifconfig on

Re: Why was rsh removed from the fixit floppy?

2000-01-21 Thread Jordan K. Hubbard
> script. The script basically translates tar commands to cpio commands, > which makes sense, since the cpio binary is a LOT smaller than tar. But > there's no cpio on the fixit floppy... > > And there's no ifconfig on the floppy either, so why even bother with > telnet/ftp/mount_nfs? You ne

Re: Why was rsh removed from the fixit floppy?

2000-01-21 Thread ROGIER MULHUIJZEN
This discussion sort of sparked my interest, so I started looking at what exactly is on the fixit floppy. As I expected there was a load of crunched binaries (interesting technique btw) but my eye fell on tar. It wasn't a hardlink to the crunched binary like the others, it was a shell script. The

Using spinning time efficiently?

2000-01-21 Thread Seigo Tanimura
I have my SMP(dual) box running -current at home for local news and mail/ML server. Last night, when the news-mail gateway started to feed the articles to the MLs, I noticed that the ratio of CPU time usage for system call exceeded more than 50%, showing 55-60% every now and then. The frequencies

Re: UDF approach comments?

2000-01-21 Thread ROGIER MULHUIJZEN
>Waht I was thinking about doing, was first writting, (probably using the >nullfs code a a base) a userfs, that would allow me to run most of the >guts of the filesystem code in a user process. Then I would write the UDF >filesystem to run in a user process. >What do you think, am I nuts? Is the

Re: indirection in bus space

2000-01-21 Thread KATO Takenori
Do you remember this topic? I have revised the indirection support patch. What I have changed are: - to make diff files more readable - introduce the bus_simple_create_bsh() that creates a bus_space_handle_tag from a base address. I have made PC98 GENERIC98 kernel and i386 LINT kernel a

Re: RLIMIT_NPROC can be exceeded via setuid/exec

2000-01-21 Thread Doug White
On Thu, 20 Jan 2000, Matthew Reimer wrote: > My question is, should setuid() fail if the target user's maximum number > of processes (RLIMIT_NPROC) would be exceeded? > > Background: in an attempt to manage our webserver to keep too many CGIs > from taking down the machine, I've been experimenti

Re: PR kern/14034: gettimeofday() returns negative value?

2000-01-21 Thread Doug White
On Wed, 19 Jan 2000, Sabrina Minshall wrote: > What's going one here? Successive calls to gettimeofday > yields negative elapsed time? I'm sorry, but this is plain bad math. If the samples t1 and t2 were taken in that order from a monotonically increasing value, then > s = t1->tv_sec -