Skip to contentSkip to conversation

how do i get register state from process before interrupt?

DISCUSSION Jim 5 participants 6 messages May 1, 2006 – May 3, 2006 MIPS

lore
Share & tools
lore

Jim

author
#0 lore raw

I have a number of processes and drivers on a SB1250 card and I suspect one of the drivers is misbehaving such that user processes are not getting a chance to run. I implemented a rudimentary watchdog in the timer interrupt which is kicked by one such user process if things when things are fine. How would I capture the register state of the process that was running before the interrupt is run? I'm on linux 2.4.18.

Thanks,
Jim

#1 lore raw
Quoted 8 lines · Jim

I have a number of processes and drivers on a SB1250 card and I suspect one of the drivers is misbehaving such that user processes are not getting a chance to run. I implemented a rudimentary watchdog in the timer interrupt which is kicked by one such user process if things when things are fine. How would I capture the register state of the process that was running before the interrupt is run? I'm on linux 2.4.18.

You can find a struct pt_regs at

(unsigned long)task_stack_page(p) + THREAD_SIZE - 32

Ralf

#2 lore raw

changing IP address on mipsel-linux

I am not sure if this is the right mailing list (new here) but how would you change the IP address parmanently on a box having IDT C32H434 CPU ? There seems to be no /etc/init.d/network on this box. I could
do it with ifconfig but I need to make parmanent change as well as effective right away.

The other question is when I change the IP address on the fly with ifconfig, is there a way to make the inet listener apps (that are running in the background) to autometically listen on the new IP address?

Thanks,

Ratin

#3 lore raw

Re: changing IP address on mipsel-linux

Hi Ratin,

Quoted 3 lines · Ratin

I am not sure if this is the right mailing list (new here) but how would you change the IP address parmanently on a box having IDT C32H434 CPU ?

Changing the ip address permanently does not depend on the cpu used, but more on the GNU/Linux distribution used.

Quoted 3 lines

There seems to be no /etc/init.d/network on this box. I could do it with ifconfig but I need to make parmanent change as well as effective right away.

You should first tell me which GNU/Linux distribution you use and then I can give you a clue on where to change it permanently. Say for instance Debian uses /etc/network/interfaces . S.u.S.E has a thing called YaST if I remember correctly and Red Hat and the likes use a directory called /etc/sysconfig/network-scripts/

But you tell me there does exist no /etc/init.d/network. So maybe you are running BusyBox or something and then you are completely on your own how to do things. Althought conforming to well known practice will not hurt you. :-)

The best thing to do is check out /etc/inittab and learn how it works ($ man inittab). Then you will be able to find out how your GNU/Linux system boots and after some thorough searching you will find where the ip address is set.
Then there is also the possibility that the ip address is set using the command to boot the kernel. Well, then you know where to permanently change it :-)

As you can see, lot's of possibilities. Good luck!

Quoted 4 lines

The other question is when I change the IP address on the fly with ifconfig, is there a way to make the inet listener apps (that are running in the background) to autometically listen on the new IP address?

This depends completely on the application used. If the application listens on a specific ip address, then you should probably restart the application to make it listen to the new ip address. But than you would in between the restart also have to configure the application to listen on the new ip address. If you have the application listen to INADDR_ANY (0.0.0.0) then you don't have to do anything.

Again, good luck!

Signature · 4 lines
$ cat ~/.signature
Freddy Spierenburg <[email protected]>  http://freddy.snarl.nl/
GnuPG: 0x7941D1E1=C948 5851 26D2 FA5C 39F1  E588 6F17 FD5D 7941 D1E1
$ # Please read http://www.ietf.org/rfc/rfc2015.txt before complain!
#4 lore raw

Re: changing IP address on mipsel-linux

Hi Freddy, Thanks for your response, I appreciate your help. I am kind of new to this version of Linux. The uname -a gives me this:

Linux 192.168.0.62 2.6.10-idt20050328 #1 Tue Dec 13 10:36:55 PST 2005 mips unknown

But it is referred as Mipsel-Linux. It is running busybox. I guess I have to dig more into kernel code to see how the kernel sets the IP address during init. I was hoping somebody here would know the Mipsel-Linux IP address assignment process. Thanks,

Ratin

----- Original Message ----- From: "Freddy Spierenburg" <[email protected]>
To: "Ratin" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, May 03, 2006 12:11 AM
Subject: Re: changing IP address on mipsel-linux

#5 lore raw

Re: changing IP address on mipsel-linux

Quoted 4 lines · Ratin

Hi Freddy, Thanks for your response, I appreciate your help. I am kind of new to this version of Linux.
The uname -a gives me this:

Quoted 8 lines

Linux 192.168.0.62 2.6.10-idt20050328 #1 Tue Dec 13 10:36:55 PST 2005 mips unknown

But it is referred as Mipsel-Linux. It is running busybox. I guess I have to dig more into kernel code to see how the
kernel sets the IP address during init. I was hoping somebody here would know the Mipsel-Linux IP address assignment
process. Thanks,

The kernel does not set the IP address during init. That's the responsibility of user space, i.e. the scripts that call busybox in your case.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds