syscall nesting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I made some test with Oprofile and Vtune profilers in linux. This programs insert customs syscalls to perform some statistics and calculations. The fact is that when we want to remove the module, both of them freely restore the system calls, but in a non-safe way. They just swap some pointers. The Intel documentation noticed this.

I'm trying to fix this problem. I use a variable to keep track of the system calls in progress. This is an example:

my_syscall()
{
  atomic_inc(&work_in_progress);

...
...

atomic_dec(&work_in_progress);
}

In the function that performs the restore of the syscalls I tried with:

while(atomic_read(&work_in_progress)!=0);

to block until there are not more syscalls in progress.

But this doesn't work. The module (not the system) blocks and I can't remove the module. I'm not sure why is this.

Any ideas?
Thanks in advance


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux