Re: simple (but important) task for junior kernel hacker
On Wed, 12 May 1999 at 10:04:09 +0200, Poul-Henning Kamp wrote: I don't have time just now to attend this particular detail, which manifests itself by swapinfo/pstat -p showing /dev/(null) for device name. The problem in short is that libkvm:kvm_getswapinfo.c has it's fingers in the kernels memory and pulls out a dev_t without knowing how to (and it shouldn't be taught this!) convert it to a udev_t. The Right Way to solve this problem is to rewrite libkvm:kvm_getswapinfo.c to pick up the information using some (for this purpose constructed) sysctl variables (sysctlbyname(3) please!), and let the kernel convert the dev_t to udev_t before passing it out to userland. So for any aspiring kernel hackers out there: have at it. Patches accepted. In general libkvm should not grovel around in a running kernel but only use sysctlbyname(3). -- the only place in the entire libkvm where a dev_t is used is kvm_proc.c line 230 this particular section completely looses me Rob To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: simple (but important) task for junior kernel hacker
In message 19990512033344.e21...@phc.igs.net, Robert Garrett writes: On Wed, 12 May 1999 at 10:04:09 +0200, Poul-Henning Kamp wrote: I don't have time just now to attend this particular detail, which manifests itself by swapinfo/pstat -p showing /dev/(null) for device name. The problem in short is that libkvm:kvm_getswapinfo.c has it's fingers in the kernels memory and pulls out a dev_t without knowing how to (and it shouldn't be taught this!) convert it to a udev_t. The Right Way to solve this problem is to rewrite libkvm:kvm_getswapinfo.c to pick up the information using some (for this purpose constructed) sysctl variables (sysctlbyname(3) please!), and let the kernel convert the dev_t to udev_t before passing it out to userland. So for any aspiring kernel hackers out there: have at it. Patches accepted. In general libkvm should not grovel around in a running kernel but only use sysctlbyname(3). -- the only place in the entire libkvm where a dev_t is used is kvm_proc.c line 230 this particular section completely looses me There is a dev_t passed out to pstat -s in a datastructure. -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: simple (but important) task for junior kernel hacker
On Wed, 12 May 1999 at 10:38:41 +0200, Poul-Henning Kamp wrote: In message 19990512033344.e21...@phc.igs.net, Robert Garrett writes: On Wed, 12 May 1999 at 10:04:09 +0200, Poul-Henning Kamp wrote: I don't have time just now to attend this particular detail, which manifests itself by swapinfo/pstat -p showing /dev/(null) for device name. The problem in short is that libkvm:kvm_getswapinfo.c has it's fingers in the kernels memory and pulls out a dev_t without knowing how to (and it shouldn't be taught this!) convert it to a udev_t. The Right Way to solve this problem is to rewrite libkvm:kvm_getswapinfo.c to pick up the information using some (for this purpose constructed) sysctl variables (sysctlbyname(3) please!), and let the kernel convert the dev_t to udev_t before passing it out to userland. So for any aspiring kernel hackers out there: have at it. Patches accepted. In general libkvm should not grovel around in a running kernel but only use sysctlbyname(3). -- the only place in the entire libkvm where a dev_t is used is kvm_proc.c line 230 this particular section completely looses me There is a dev_t passed out to pstat -s in a datastructure. Right and thats where it comes from kvm_proc.c is responsible for dealing with pstat at least the way I read that file Rob -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: simple (but important) task for junior kernel hacker
In message 19990512034529.a5...@phc.igs.net, Robert Garrett writes: There is a dev_t passed out to pstat -s in a datastructure. Right and thats where it comes from kvm_proc.c is responsible for dealing with pstat at least the way I read that file pstat -s is what we're talking about right now. -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: simple (but important) task for junior kernel hacker
Hrmmm have any commits been made on this one yet? The reason Im asking is that as of about 2am my time last night I cvsupped to 4.0-CURRENT and I cant build, it dies on libkvm. It claims the error exists in /usr/src/sys/sys/vnode.h, exact error message as follows: In file included from /usr/src/lib/libkvm/kvm_getswapinfo.c:22: /usr/src/lib/libkvm/../../sys/sys/vnode.h:186: parse error before `udev_t' /usr/src/lib/libkvm/../../sys/sys/vnode.h:186: warning: no semicolon at end of struct or union /usr/src/lib/libkvm/../../sys/sys/vnode.h:191: parse error before `:' cc -nostdinc -O -pipe -DLIBC_SCCS -I/usr/src/lib/libkvm/../../sys -I/usr/obj/usr/src/tmp/usr/include -c /usr/src/lib/libkvm/kvm_proc.c -o kvm_proc.o cc -fpic -DPIC -nostdinc -O -pipe -DLIBC_SCCS -I/usr/src/lib/libkvm/../../sys -I/usr/obj/usr/src/tmp/usr/include -c /usr/src/lib/libkvm/kvmproc.c -o kvm_proc.So *** Error code 1 *** Error code 1 2 errors (I think this is right, I had to type it out but I think I got it ok). Any ideas? Cheers Andrew On Wed, 12 May 1999, Poul-Henning Kamp wrote: In message 19990512034529.a5...@phc.igs.net, Robert Garrett writes: There is a dev_t passed out to pstat -s in a datastructure. Right and thats where it comes from kvm_proc.c is responsible for dealing with pstat at least the way I read that file pstat -s is what we're talking about right now. -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: simple (but important) task for junior kernel hacker
Yes, I fixed that a few hours ago. In message pine.bsf.4.05.9905121205490.2472-100...@neophyte.h4x0rz.za.org, v ortexia writes: Hrmmm have any commits been made on this one yet? The reason Im asking is that as of about 2am my time last night I cvsupped to 4.0-CURRENT and I cant build, it dies on libkvm. It claims the error exists in /usr/src/sys/sys/vnode.h, exact error message as follows: In file included from /usr/src/lib/libkvm/kvm_getswapinfo.c:22: /usr/src/lib/libkvm/../../sys/sys/vnode.h:186: parse error before `udev_t' /usr/src/lib/libkvm/../../sys/sys/vnode.h:186: warning: no semicolon at end of struct or union /usr/src/lib/libkvm/../../sys/sys/vnode.h:191: parse error before `:' cc -nostdinc -O -pipe -DLIBC_SCCS -I/usr/src/lib/libkvm/../../sys -I/usr/obj/usr/src/tmp/usr/include -c /usr/src/lib/libkvm/kvm_proc.c -o kvm_proc.o cc -fpic -DPIC -nostdinc -O -pipe -DLIBC_SCCS -I/usr/src/lib/libkvm/../../sys -I/usr/obj/usr/src/tmp/usr/include -c /usr/src/lib/libkvm/kvmproc.c -o kvm_proc.So *** Error code 1 *** Error code 1 2 errors (I think this is right, I had to type it out but I think I got it ok). Any ideas? Cheers Andrew On Wed, 12 May 1999, Poul-Henning Kamp wrote: In message 19990512034529.a5...@phc.igs.net, Robert Garrett writes: There is a dev_t passed out to pstat -s in a datastructure. Right and thats where it comes from kvm_proc.c is responsible for dealing with pstat at least the way I read that file pstat -s is what we're talking about right now. -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message