configuring list debugging and poisoning list pointers

2010-11-21 Thread Robert P. J. Day
continuing my journey into the depths of kernel data structures, i'm curious about the design and usage of list poisoning. first, here are the magic values used to poison list node pointers, defined in poison.h: #define LIST_POISON1 ((void *) 0x00100100 + POISON_POINTER_DELTA) #define

CONFIG_DEBUG_FS and -ENODEV

2010-11-21 Thread Vasiliy Kulikov
Hi all, In include/linux/debugfs.h there is a comment: /* * We do not return NULL from these functions if CONFIG_DEBUG_FS is not enabled * so users have a chance to detect if there was a real error or not. We don't * want to duplicate the design decision mistakes of procfs and devfs again.

is there still an active kernel janitors project?

2010-11-21 Thread Robert P. J. Day
i can suggest some very specific cleanups people can work on if they're bored. one related to lists: list_for_each() - list_for_each_entry() calls that is, modifying the numerous (older-style) list_for_each() calls to the more convenient list_for_each_entry() calls, something that can be

Re: configuring list debugging and poisoning list pointers

2010-11-21 Thread Andrew Case
On Sun, Nov 21, 2010 at 4:45 AM, Robert P. J. Day rpj...@crashcourse.cawrote: continuing my journey into the depths of kernel data structures, i'm curious about the design and usage of list poisoning. first, here are the magic values used to poison list node pointers, defined in poison.h:

2 links good for newbies

2010-11-21 Thread Tapas Mishra
Hi, list I was searching for some information and came across 2 links which would be relevant to us. http://www.novell.com/coolsolutions/feature/14910.html http://www.novell.com/coolsolutions/feature/11254.html I have not checked the kernelnewbies wiki but any one who maintains that can include

Re: configuring list debugging and poisoning list pointers

2010-11-21 Thread Robert P. J. Day
On Sun, 21 Nov 2010, Andrew Case wrote: On Sun, Nov 21, 2010 at 4:45 AM, Robert P. J. Day rpj...@crashcourse.ca wrote:  continuing my journey into the depths of kernel data structures, i'm curious about the design and usage of list poisoning.  first, here are the magic

RE: crap, i think LKD3 explains linked list head nodes incorrectly ...

2010-11-21 Thread Bruce Blinn
that also suggests that a passage on p. 91 of LKD3 is inaccurate, where it claims that because the lists are circular, you can generally pass any element for head. but that can't be right, since you must *always* keep track of the head node for any list, to avoid processing it

RE: crap, i think LKD3 explains linked list head nodes incorrectly ...

2010-11-21 Thread Robert P. J. Day
On Sun, 21 Nov 2010, Bruce Blinn wrote: that also suggests that a passage on p. 91 of LKD3 is inaccurate, where it claims that because the lists are circular, you can generally pass any element for head. but that can't be right, since you must *always* keep track of the head node for

Re: is there still an active kernel janitors project?

2010-11-21 Thread hiren panchasara
Hi Robert, I would be interested in getting started :) Thanks, Hiren On Sun, Nov 21, 2010 at 5:06 AM, Robert P. J. Day rpj...@crashcourse.cawrote: i can suggest some very specific cleanups people can work on if they're bored. one related to lists: list_for_each() -

RE: crap, i think LKD3 explains linked list head nodes incorrectly ...

2010-11-21 Thread Bruce Blinn
that also suggests that a passage on p. 91 of LKD3 is inaccurate, where it claims that because the lists are circular, you can generally pass any element for head. but that can't be right, since you must *always* keep track of the head node for any list, to avoid

Re: and there's a routine for *sorting* a kernel linked list as well

2010-11-21 Thread Greg KH
On Sun, Nov 21, 2010 at 02:23:18AM -0500, Robert P. J. Day wrote: what started off as just some nonchalant poking around in kernel data structures has become moderately educational. i had no idea that there is support for *sorting* the nodes of a kernel LL in linux/list_sort.h: void

how does macro to get base address register in configuration space works

2010-11-21 Thread Bond
I am trying to understand working of pci_resource_start function So I browsed code via cscope and searched for string pci_resource_start and got following in pci.h #define pci_resource_start(dev, bar)((dev)-resource[(bar)].start) I am not able to understand how does this above macro works.

Re: guidelines, faqs and dos and don'ts document

2010-11-21 Thread sanjeev sharma
Hi all, It's been gud initiative by you but there should be some more point need to add like there should be general question need to be ask and before asking any question Subject and Question should be well formatted and understandable very well by anyone and also it should be well defined

how is a device detected

2010-11-21 Thread Bond
Hi, in some of the books I am reading I find a text which mentions MODULE_DEVICE_TABLE () macro makes a user defined structure available in the module image so that the module can be loaded on demand if the card is hotplugged. I am not clear with how is this detection happening inside the

RE: crap, i think LKD3 explains linked list head nodes incorrectly ...

2010-11-21 Thread Robert P. J. Day
On Sun, 21 Nov 2010, Bruce Blinn wrote: New task structures are added into the list in kernel/fork.c (line 1743 in my source). that's not what i see here, can you reproduce the few lines at that point? i had assumed it was in fork.c somewhere. But, my question is, how common is it for