Re: module vs main kernel

2013-12-04 Thread Mulyadi Santosa
On Wed, Dec 4, 2013 at 3:19 AM, Abu Rasheda rcpilot2...@gmail.com wrote: On Mon, Dec 2, 2013 at 11:31 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: On Tue, Dec 3, 2013 at 8:33 AM, Abu Rasheda rcpilot2...@gmail.com wrote: I have my implementation of socket APIs, I

Re: Recovering Linux system from hung state via software

2013-12-04 Thread Peter Teoh
On Fri, Nov 29, 2013 at 8:28 AM, Vipul Jain vipu...@gmail.com wrote: Hi Kernel alias, I am a newbie and I am trying to figure out ways where in I can recover the Linux in below two scenarios: 1. my specific process hangs. how to recover i cannot tell you, because it is application specific

Re: Recovering Linux system from hung state via software

2013-12-04 Thread Mandeep Sandhu
assuming one mother process is monitoring 10 child process, so inside each child process, simply just setup a PERIODIC (eg, per 5 sec) mechanism to toggle a binary variables through IPC means. It will be reset when the mother process go around checking all the variable status and, if not

Re: Recovering Linux system from hung state via software

2013-12-04 Thread Mandeep Sandhu
You could also look at using existing s/w for monitoring processes like monit. I don't know your exact usecase but you could make your process as a 'service' and have something like systemd or upstart monitor it. These tools will typically 'restart' the hung process on detection. -mandeep On

Re: Recovering Linux system from hung state via software

2013-12-04 Thread Peter Teoh
On Wed, Dec 4, 2013 at 4:13 PM, Mandeep Sandhu mandeepsandhu@gmail.comwrote: assuming one mother process is monitoring 10 child process, so inside each child process, simply just setup a PERIODIC (eg, per 5 sec) mechanism to toggle a binary variables through IPC means. It will be

Make File error

2013-12-04 Thread Anil Joshi
Hi All, I have an make file like this obj-m := abc.o all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean when i do the make i am getting this error *make: Nothing to be done for `all'.*

Re: Make File error

2013-12-04 Thread Robert Clove
Add a tab after obj-m (tab) :=abc.o and after make too On Wed, Dec 4, 2013 at 2:04 PM, Anil Joshi aj27...@gmail.com wrote: Hi All, I have an make file like this obj-m := abc.o all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C

Re: Make File error

2013-12-04 Thread Anil Joshi
Thanks i did that now i am getting this error make make-C /lib/modules/2.6.32-220.el6.x86_64/build M=/root/Desktop/exp1 modules make: *** /lib/modules/2.6.32-220.el6.x86_64/build: No such file or directory. Stop. On Wed, Dec 4, 2013 at 2:13 PM, Robert Clove cloverob...@gmail.com wrote:

Re: Make File error

2013-12-04 Thread Sudip Mukherjee
On Wed, Dec 4, 2013 at 2:14 PM, Anil Joshi aj27...@gmail.com wrote: Thanks i did that now i am getting this error make make-C /lib/modules/2.6.32-220.el6.x86_64/build M=/root/Desktop/exp1 modules make: *** /lib/modules/2.6.32-220.el6.x86_64/build: No such file or directory. Stop.

Re: Make File error

2013-12-04 Thread Nav Kamal
Ker On Dec 4, 2013 3:42 PM, Sudip Mukherjee sudipm.mukher...@gmail.com wrote: On Wed, Dec 4, 2013 at 2:14 PM, Anil Joshi aj27...@gmail.com wrote: Thanks i did that now i am getting this error make make-C /lib/modules/2.6.32-220.el6.x86_64/build M=/root/Desktop/exp1 modules make: ***

Re: Make File error

2013-12-04 Thread Sudip Mukherjee
Whats the error? Hi Anil Please do not top post. For your error , please verify if /lib/modules/2.6.32-220.el6.x86_64/build is really linking to the folder containing the kernel files. Regards Sudip Thats the issue the link is not there how to create the link. On your mails please

Re: about cheating upper layers

2013-12-04 Thread Peter Teoh
On Mon, Dec 2, 2013 at 1:48 PM, Guibin(Bill) Tian gbt...@gmail.com wrote: Hi there, Right now, I am trying to do such a thing. If a computer has multiple interface A and B, assume the packet is from device A. At ip layer, before the packet is transmitted to transport layer, I change the

Re: How to test my patches for the (staging) android driver?

2013-12-04 Thread Matthias Beyer
Hi kernelnewbies! As I do not get any answer from the other MLs, this goes here, too. Maybe there is just too much noise in lkml... never mind! On 03-12-2013 16:57:08, Matthias Beyer wrote: Hi, Greg-KHs email bot tells me to send this message to a ML. It suggests to send it to this list or

Re: How to test my patches for the (staging) android driver?

2013-12-04 Thread Valdis . Kletnieks
On Wed, 04 Dec 2013 16:08:52 +0100, Matthias Beyer said: How to test my code beside compiling it? Do I even have a possibility to test it or should I just send it to you? If at all possible, you should cross-compile for an appropriate architecture and actually boot and test the code in

Re: about cheating upper layers

2013-12-04 Thread Peter Teoh
On Wed, Dec 4, 2013 at 7:49 PM, Peter Teoh htmldevelo...@gmail.com wrote: On Mon, Dec 2, 2013 at 1:48 PM, Guibin(Bill) Tian gbt...@gmail.comwrote: Hi there, Right now, I am trying to do such a thing. If a computer has multiple interface A and B, assume the packet is from device A. At

Re: about cheating upper layers

2013-12-04 Thread Guibin(Bill) Tian
Thanks Peter for your explanation. But in fact, I am not going to touch transport layer. The work shall be done inside the call stack of ip_rcv(). In ip layer, there is no specific process information, so the process assignment shouldn't be a problem. At the application layer, each application

Re: module vs main kernel

2013-12-04 Thread Abu Rasheda
rcpilot2...@gmail.com wrote: I have my implementation of socket APIs, I sock_unregister(AF_INET); sock_register(inet_family_ops), this replaces kernel resident socket related calls with my socket related calls. My code is loaded as kernel module. My question, is Linux kernel able to call

Re: How to test my patches for the (staging) android driver?

2013-12-04 Thread Matthias Beyer
On 04-12-2013 10:17:23, valdis.kletni...@vt.edu wrote: On Wed, 04 Dec 2013 16:08:52 +0100, Matthias Beyer said: How to test my code beside compiling it? Do I even have a possibility to test it or should I just send it to you? If at all possible, you should cross-compile for an

Re: How can I 'getchar()' in module code?

2013-12-04 Thread Daniel Baluta
On Tue, Dec 3, 2013 at 4:20 PM, Bernd Petrovitsch be...@petrovitsch.priv.at wrote: On Die, 2013-12-03 at 08:38 -0500, valdis.kletni...@vt.edu wrote: On Tue, 03 Dec 2013 20:35:41 +0800, said: For debugging purpose, I want something like 'getchar()' that can pause execution in the module

Re: watchdog pet in kernel module

2013-12-04 Thread Vipul Jain
On Tue, Dec 3, 2013 at 10:28 PM, Peter Teoh htmldevelo...@gmail.com wrote: Hi Vipul, I have seen this in a number of commercial software running on RHEL, and on other realtime OS as well. The watchdog mechanism is always working in pair: userspace feeding the dog (in the kernel). (btw,

Re: watchdog pet in kernel module

2013-12-04 Thread Valdis . Kletnieks
On Wed, 04 Dec 2013 16:45:44 -0800, Vipul Jain said: If you don't mind can you please provide me more insight as what can be false alarm I can encounter to move pet inside kernel module? The issue isn't false alarms - it's failure to alarm when it should. The problem is that it's possible for

Re: How can I 'getchar()' in module code?

2013-12-04 Thread Peter Teoh
yes, exactly - what u are describing is called kdb. don't mixed up with kgdb. kdb: this is debugging on the same computer - so no serial ports connection are needed. once exception occurred, you will be popped into a special debugger screen. problem is that now this debugger is running

Re: watchdog pet in kernel module

2013-12-04 Thread Peter Teoh
On Thu, Dec 5, 2013 at 8:45 AM, Vipul Jain vipu...@gmail.com wrote: On Tue, Dec 3, 2013 at 10:28 PM, Peter Teoh htmldevelo...@gmail.comwrote: Hi Vipul, I have seen this in a number of commercial software running on RHEL, and on other realtime OS as well. The watchdog mechanism is

Re: watchdog pet in kernel module

2013-12-04 Thread Rajat Sharma
Although /dev/watchdog is available in usermode, but nothing should stop you to write to it from a kernel thread. Rajat On Wed, Dec 4, 2013 at 5:50 PM, Peter Teoh htmldevelo...@gmail.com wrote: On Thu, Dec 5, 2013 at 9:06 AM, Vipul Jain vipu...@gmail.com wrote: On Wed, Dec 4, 2013 at

Re: watchdog pet in kernel module

2013-12-04 Thread Peter Teoh
On Thu, Dec 5, 2013 at 10:19 AM, Rajat Sharma fs.ra...@gmail.com wrote: Although /dev/watchdog is available in usermode, but nothing should stop you to write to it from a kernel thread. Rajat I don't think /dev/watchdog (literally, I meant) is available in the kernel. It is accessible in

Re: How can I 'getchar()' in module code?

2013-12-04 Thread 乃宏周
Thanks your replies! I found the target. 2013/12/5 上午9:34 於 Peter Teoh htmldevelo...@gmail.com 寫道: yes, exactly - what u are describing is called kdb. don't mixed up with kgdb. kdb: this is debugging on the same computer - so no serial ports connection are needed. once exception

Re: Recovering Linux system from hung state via software

2013-12-04 Thread Arun KS
Hi Vipul, On Fri, Nov 29, 2013 at 5:58 AM, Vipul Jain vipu...@gmail.com wrote: Hi Kernel alias, I am a newbie and I am trying to figure out ways where in I can recover the Linux in below two scenarios: 1. my specific process hangs. 2. kernel gets hung partially or completely. I have done