Re: mmap and stacks

2010-04-21 Thread Dragos Tatulea
s/fixed addresses/mmap fixed address -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to ecar...@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ

Re: hlist_for_each_entry

2010-04-21 Thread Bernd Petrovitsch
On Die, 2010-04-20 at 16:52 +0530, Onkar Mahajan wrote: Hi All , Please correct me otherwise , if I am wrong here : #define hlist_for_each_entry(tpos, pos, head, member) \ for (pos = (head)-first; \ pos ({ prefetch(pos-next); 1;}) \ --(1) ({ tpos =

Re: mmap and stacks

2010-04-21 Thread Dragos Tatulea
I can think of 2 things you could do if you need fixed addresses: - write a page-fault handler in a driver and do the mmap through that driver. With that handler you can control access to the mmap'ed memory. I can't (and also don't want to) modify the kernel :) Not even with a harmless

Re: mmap and stacks

2010-04-21 Thread Chetan Nanda
On Wed, Apr 21, 2010 at 6:02 PM, Dragos Tatulea dragos.tatu...@gmail.comwrote: I can think of 2 things you could do if you need fixed addresses: - write a page-fault handler in a driver and do the mmap through that driver. With that handler you can control access to the mmap'ed memory.

New to Kernel programming and device drivers

2010-04-21 Thread Tharanga Abeyseela
Hi Guys, Iam a fan of linux and opensource systems. i have done some perl,php programming on linux but havent done much of C programming stuff . I like to get your expert advice on writing linux device drivers. Acatually i have a fair knowledge in C .(iam familiar with OS concepts) can some

Re: New to Kernel programming and device drivers

2010-04-21 Thread Mulyadi Santosa
On Thu, Apr 22, 2010 at 06:48, Tharanga Abeyseela tharanga.abeyse...@gmail.com wrote: I like to get your expert advice on writing linux device drivers. I think, you better learn by doing. Try to pick digital version of Linux Device Driver 3rd edition here http://lwn.net/Kernel/LDD3/ and try to

Re: mmap and stacks

2010-04-21 Thread Mulyadi Santosa
On Thu, Apr 22, 2010 at 03:41, Andrei Matei andreimat...@gmail.com wrote: Thanks for the link! Everything is clear now, the kernel will autogrow a mapping with the MAP_GROWSDOWN as long as the stack pointer is around the location the program has just accessed. So there is no magic specific to

Re: mmap and stacks

2010-04-21 Thread Chetan Nanda
On Thu, Apr 22, 2010 at 2:11 AM, Andrei Matei andreimat...@gmail.comwrote: Thanks for the link! Everything is clear now, the kernel will autogrow a mapping with the MAP_GROWSDOWN as long as the stack pointer is around the location the program has just accessed. So there is no magic specific to