Little Help Debugging some MINOR kernel assembly
What I'm trying to do here is add an overhead to every single system call. I can do this either by modifying ~320 C methods or I can do it in one place in i386 assembly land. As you might have guessed I'd much rather make this change in one place, the problem is I such at assembly and I'm having a hard time finding a resource that can help, so here I am asking for some help.
I'm working with the 2.6.22 kernel, and I'm trying to modify the arch/i386/kernel/entry.S file (I think that's the path). Right around like 370 or so is the main entry point after the processor interrupt has occurred. Here's what I have now: Code:
# system call handler stub As you can see I'm just adding a loop that does something minimal like add some values together. It fails miserably. I'm sure it's because I'm overwriting something important and not putting it back, but I don't know how to do that. Any help would be GREATLY appreciated as I'm dead in the water here. Disclaimer: Yes, this is part of a project for my CS master's degree, I'm not trying to get anyone to help me cheat on my homework, just need some help. The real part of this assignment is doing the analysis on the effects of this overhead. Just want to get that out there. |
I changed my code a little bit but it's still overwriting something important.
Code:
ENTRY(system_call) I just want this stupid loop to eat up some processor cycles and not affect anything else. Any pointers on what I might be missing? |
Quote:
Do you think it's possible that you've discovered some sort of race condition elsewhere in the kernel code? |
All times are GMT -5. The time now is 01:18 AM. |