Re: Compiling a file without O2 in linux kernel

2010-10-26 Thread Mulyadi Santosa
On Tue, Oct 26, 2010 at 12:09, Ram Sharma ram99.sha...@gmail.com wrote: How can I edit net/core/Makefile to compile tmp.c without O2? AFAIK, check the Makefile in the top directory of the kernel source, then manually delete -O2 in CFLAGS regards, Mulyadi Santosa Freelance Linux trainer and

Re: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER'

2010-10-26 Thread Mulyadi Santosa
Hi... On Wed, Oct 27, 2010 at 00:00, Onkar Mahajan kern.de...@gmail.com wrote: I am getting this error while compiling some code : aclocal.m4:344657: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER' Uhm, are you sure the above problem has anything to do with kernel development?

Re: File size from Linux Kernel Module

2010-10-26 Thread Dev Null
Hi Rajat, I couldn't find kern_path function in Linux Kernel 2.6.27.20. Could you please let me know how to get the file size in detail? Thanks, Dev On Mon, Oct 25, 2010 at 8:21 PM, Rajat Sharma fs.ra...@gmail.com wrote: Do a lookup of the file using kern_path kernel function and then use

Asking for process management exercise suggestions

2010-10-26 Thread Gustavo Silva
Hello my friends, At this moment I'm reading the Process management chapter of Linux Kernel Development Third edition so I'm thinking about some exercises in order to get the most out of the lecture. I'm thinking about to implement a System call that receives a Process ID as input and gives as

Re: Asking for process management exercise suggestions

2010-10-26 Thread Rajat Sharma
Hi Friend, modifying system call table would require you to compile the kernel again and again. If you really want to quickly test for these experimentation, I would suggest try making some /proc files in procfs, you will be more productive this way. Also learning procfs is fun exersize too :), I

Re: Asking for process management exercise suggestions

2010-10-26 Thread Gavin Guo
2010/10/27 Gustavo Silva silvagustavosi...@gmail.com: Hello my friends, At this moment I'm reading the Process management chapter of Linux Kernel Development Third edition so I'm thinking about some exercises in order to get the most out of the lecture. I'm thinking about to implement a

/dev/mem

2010-10-26 Thread Prabhu nath
Dear All, Can you please clarify my doubt on /dev/mem When I open /dev/mem, Is that entire physical address space is associated to /dev/mem or only the system memory ? * If I can mmap the kernel memory in read write mode, I can screw up the whole kernel. Is that right

Re: /dev/mem

2010-10-26 Thread Dave Hylands
Hi Prabhu, On Tue, Oct 26, 2010 at 9:19 PM, Prabhu nath gprabhun...@gmail.com wrote: Dear All,   Can you please clarify my doubt on /dev/mem When I open /dev/mem, Is that entire physical address space is associated to /dev/mem or only the system memory ? * If I

Re: /dev/mem

2010-10-26 Thread Prabhu nath
Thanks a lot for the clarification. Is that not a big hole that the kernel provides ?. If I have a root access, then I can spoil the whole system. Is there any motive for the kernel to support this ? Thanks, Prabhu On Wed, Oct 27, 2010 at 10:04 AM, Dave Hylands dhyla...@gmail.com wrote: Hi

Re: /dev/mem

2010-10-26 Thread Mulyadi Santosa
On Wed, Oct 27, 2010 at 11:39, Prabhu nath gprabhun...@gmail.com wrote: Thanks a lot for the clarification. Is that not a big hole that the kernel provides ?. Naively...you can say so...but AFAIK it serves for some (legacy) purpose: - Wine...or DOSEMU..or dosbox...can't recall which one that

Re: /dev/mem

2010-10-26 Thread Prabhu nath
Please see inline. Plz correct me if I am wrong. On Wed, Oct 27, 2010 at 10:26 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: On Wed, Oct 27, 2010 at 11:39, Prabhu nath gprabhun...@gmail.com wrote: Thanks a lot for the clarification. Is that not a big hole that the kernel provides ?.

Re: Asking for process management exercise suggestions

2010-10-26 Thread Rajat Sharma
Gavin, ioctl is also quicker to do but it needs you to implement a character driver + a user space utility to issue ioctl command to kernel. Relatively I find it much faster with procfs. Gustavo: Well I have not tried much with process as such, you can dig into its address space mapping and

Re: /dev/mem

2010-10-26 Thread Dave Hylands
Hi Prabhu, On Tue, Oct 26, 2010 at 9:39 PM, Prabhu nath gprabhun...@gmail.com wrote: Thanks a lot for the clarification. Is that not a big hole that the kernel provides ?. If I have a root access, then I can spoil the whole system. There are many ways to spoil the whole system if you have

Re: /dev/mem

2010-10-26 Thread Alexandre Courbot
 IMHO, I feel mem could have been restricted to device addresses rather than memory address. Though at this point I do not know whether it servers any bigger purpose. Clever point - and actually there is a configuration option in the kernel that does what you describe since 2.6.27: