Calling a module method from inside the kernel - is it possible Inbox
Hi, all, I want to calling a module method (I am developing the module) from inside the kernel. How can I achieve it ? (BTW, I know that vice versa is possible by EXPORT_SYMBOL.) rgs, Kevin ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: s3c24xx_console_init in s3c2440.c
Your question is answered in this blog: http://mini2440.wordpress.com/2011/07/ Hope it helps. On Thu, Jan 5, 2012 at 7:42 AM, hz hanks hank...@gmail.com wrote: Hi, all I'm studying s3c2440.c of uart driver. In it, there is a macro called s3c24xx_console_init which is just the function of s3c24xx_serial_initconsole in samsung.c. But I didnot find any place for the s3c2440 uart driver to call this function (s3c24xx_console_init only displayed once as a definition). Is there any one know the detail about this? I would appreciate any idea about it. Thank you. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- Regards, Peter Teoh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: from where to start..
On Sat, Jan 21, 2012 at 4:52 AM, SaNtosh kuLkarni santosh.yesop...@gmail.com wrote: Hi Sukrit, Ya kernel development..kernel space is fun...but since kernel has loads of subsystems...you must be or will be later interested in certain subsytems,,,but you ought to understand the basic working and operations carried by a kernel and sorting of programming and structures required...i would suggest Kernel Development by Rober Love http://blog.rlove.org/2010/07/linux-kernel-development-third-edition.html as he doesnt dig deep into core kernel development instead focuses on stuff such as Process mgnt , synchronization ,VFS...etc etc...in a rather simple easy to understand manner...but if you are interested or rather want to get into specific subsystems like Networking ...network stack,...etc you can always start off with network internals...but my suggestion is Robert Love and start of writing few LKMstats my opinion On Sat, Jan 21, 2012 at 6:58 AM, Jeff Haran jha...@bytemobile.com wrote: From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Sukrit Sangwan Sent: Friday, January 20, 2012 4:19 PM To: Kernelnewbies@kernelnewbies.org Subject: from where to start.. I want to become a kernel developer. I have never done anything related to kernel uptil now. I am unable to figure out how to start off. Please help me doing my first exercise on kernel development. -- Sukrit Sangwan Hi Sukrit, People ask me this a lot so I wrote a post in blog about it, you can read it here: http://martinezjavier.blogspot.com/2011/10/what-is-best-way-to-learn-linux-kernel.html Also I used to maintain a repo with the Linux Device Drivers 3 book examples: But I haven't committed anything for over a year because I'm too busy to do it. So cloning that tree, forward porting those virtual drivers and send me the patches would be a good way to learn and also great for the newbies community. Even you can fork that tree and try to maintain yourself :) Good luck Javier ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Calling a module method from inside the kernel - is it possible Inbox
Can you be more specific...wot do u mean by inside the kerneldo like want to call a function written inside another kernel module On Sat, Jan 21, 2012 at 3:38 PM, Kevin Wilson wkev...@gmail.com wrote: Hi, all, I want to calling a module method (I am developing the module) from inside the kernel. How can I achieve it ? (BTW, I know that vice versa is possible by EXPORT_SYMBOL.) rgs, Kevin ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- *Regards, Santosh Kulkarni* ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: elf core dump - reading NT_PRPSINFO
Hi :) On Fri, Jan 20, 2012 at 13:57, Fredrick fjohn...@zoho.com wrote: Hi, $ readelf -n core is that core a core dump? Does anyone know how to read this NT_PRPSINFO ? Is hexdump the only way to decode this? Are there any tools to dump this data ? if it is indeed core dump, I think simply pass it to gdb, e.g: gdb program elf binary the above core name and start playing with it e.g dumping stack trace. NB: IMHO NT_PRPSINFO is just a section that describes the VMAs of the crashed program. Quite likely an ELF documentation will mention about it. Try googling... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: SIGKILL
On Fri, Jan 20, 2012 at 12:32 PM, Dave Hylands dhyla...@gmail.com wrote: Hi Darshan, HI Dave, Replying to all this time Thanks. On Thu, Jan 19, 2012 at 9:41 PM, Darshan Ghumare darshan.ghum...@gmail.com wrote: ...snip... What if, spin_lock_irqsave(lock, flags); for ( ; ; ) { ; } spin_lock_irqrestore(lock, flags); Since you're using spinlocks and disabling interrupts, this would be running in kernel space. On a single core machine - you'll have locked up your entire computer. On a multi-core machine you'll have locked up one core. You don't need to use the spinlock, just disabling interrupts is sufficient. Even on a multicore machine, the spinlocks would just prevent a second core from executing the code if it tried to acquire the same spinlock. I don't think that there is any convenient way to kill such a thread. IMHO, signals are handled when process is about to switch back to user-mode. If that is the case then what if, there are two threads(in user-mode) in the process where one is stuck in the syscall which has infinite loop other is executing some task in the user-mode, then still this process can not be killed? -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com Regards Darshan -- Darshan® ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: SIGKILL
Hi Darshan, On Sat, Jan 21, 2012 at 7:31 PM, Darshan Ghumare darshan.ghum...@gmail.com wrote: On Fri, Jan 20, 2012 at 12:32 PM, Dave Hylands dhyla...@gmail.com wrote: ...snip... On Thu, Jan 19, 2012 at 9:41 PM, Darshan Ghumare darshan.ghum...@gmail.com wrote: ...snip... What if, spin_lock_irqsave(lock, flags); for ( ; ; ) { ; } spin_lock_irqrestore(lock, flags); Since you're using spinlocks and disabling interrupts, this would be running in kernel space. On a single core machine - you'll have locked up your entire computer. On a multi-core machine you'll have locked up one core. You don't need to use the spinlock, just disabling interrupts is sufficient. Even on a multicore machine, the spinlocks would just prevent a second core from executing the code if it tried to acquire the same spinlock. I don't think that there is any convenient way to kill such a thread. IMHO, signals are handled when process is about to switch back to user-mode. If that is the case then what if, there are two threads(in user-mode) in the process where one is stuck in the syscall which has infinite loop other is executing some task in the user-mode, then still this process can not be killed? The one that's stuck in the infinite loop will essnetially lockup one core. If you have additional cores, then the other threads will continue to run normally. If you're on a single core machine, then the other threads will never get a chance to run, ergo thay can't be killed. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies