locking spinlocks during copy_to_user, copy_from_user

2013-01-25 Thread Pablo Pessolani
Hi: It is well know that is not recomended to keep a spinlock locked during operations that can be preempted. Some of these operations are copy_to_user, copy_from_user. Below is the code of the write_lock() as a sample. 340 static inline void __write_lock(rwlock_t *lock) 341{ 342pr

locking spinlocks during copy_to_user, copy_from_user

2013-01-25 Thread Pablo Pessolani
Hi: It is well know that is not recomended to keep a spinlock locked during operations that can be preempted. Some of these operations are copy_to_user, copy_from_user. Below is the code of the write_lock() as a sample. 340 static inline void __write_lock(rwlock_t *lock) 341{ 342pr

locking spinlocks during copy_to_user, copy_from_user

2013-01-25 Thread Pablo Pessolani
Hi: It is well know that is not recomended to keep a spinlock locked during operations that can be preempted. Some of these operations are copy_to_user, copy_from_user. Below is the code of the write_lock() as a sample. 340 static inline void __write_lock(rwlock_t *lock) 341{ 342pr

Sorry, a problem with hotmail

2013-01-25 Thread Pablo Pessolani
I sent 3 identical emails to the list because hotmail does not acknowledge them. I am sorry. PAP ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kerne

Intercepting a system call

2013-01-25 Thread Paul Davies C
Hi, [1] is the module I wrote for intercepting the system call fork(). I have taken the conventional way of hooking the system call. Firstly I found out the address of the sys_call_table from the System.map. Then I used it in the module to substitute for the original fork() with my own version of

Re: Intercepting a system call

2013-01-25 Thread Paul Davies C
You can access the code also from the below link. https://gist.github.com/4634681 On Fri, Jan 25, 2013 at 6:58 PM, Paul Davies C wrote: > Hi, > [1] is the module I wrote for intercepting the system call fork(). I > have taken the conventional way of hooking the system call. Firstly I found > o

Re: Intercepting a system call

2013-01-25 Thread Paul Davies C
Hi Grzegorz, To my knowledge if we try write to a read only area ,the kernel gives an OOPS.As I stated in the question,the module does not give me any errors.I have disabled page protections before writing to sys_call_table. I believe that is enough to make the sys_call_table RW. What do you thi

How to know the default mail delivery agent ?

2013-01-25 Thread horseriver
hi: I have to know the default mail delivery agent on my system to configure mail client. Is there mothod? How mail delivery agent work for receiving mails? thanks! ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://li

Re: locking spinlocks during copy_to_user, copy_from_user

2013-01-25 Thread anish kumar
On Fri, 2013-01-25 at 10:00 -0300, Pablo Pessolani wrote: > Hi: >It is well know that is not recomended to keep a spinlock locked > during operations that can be preempted. Some of these operations are > copy_to_user, copy_from_user. > Below is the code of the write_lock() as a sample. > > 34

Re: Intercepting a system call

2013-01-25 Thread Valdis . Kletnieks
On Fri, 25 Jan 2013 18:58:29 +0530, Paul Davies C said: > [1] is the module I wrote for intercepting the system call fork(). Totally skipping over the details of actually doing it - it's usually considered a Bad Idea to hook a system call, and 98% of the time there's a much better way to achiev

Re: locking spinlocks during copy_to_user, copy_from_user

2013-01-25 Thread Valdis . Kletnieks
On Fri, 25 Jan 2013 09:58:42 -0300, Pablo Pessolani said: > My question is: Is there any know consequence if I enable preemption before > copy_to_user/copy_from user (keeping the spinlock locked) and then disable > preemption again after the copy? Well, at that point, you potentially have "a s

guides to board files -> device-tree and Android -> mainline?

2013-01-25 Thread Paul Wise
Hi all, Are there any guides for developers new to Linux for: * converting board files to device-tree * porting drivers and patches from Android to current mainline? There are a lot of ARM mobile devices out there that aren't supported by Linux mainline and having these guides availa