Re: linked list within a kernel probe

2023-01-12 Thread chrishell
Hi Tom, thank you for your support. in my example, I used a spin_lock(&sl) for blocking traversing the list, despite this function does nothing but reading or traversing the linked list. No adding or removing is done within the kprobe function. The other function called _kprobe_setup_cache_eleme

Re: linked list within a kernel probe

2023-01-12 Thread chrishell
hello Billie, thank you for your support. As you can see I have 2 different structures. The first one is defined for a global structure, which holds all information which I need within the kprobe (called kprobe_head). Then I have another structure (called kprobe_mem_cache), which is defined to

Re: linked list within a kernel probe

2023-01-08 Thread chrishell
kernel oops or even kernel panics Hope there is someone who can give me a hint. Thanks in advance BR /Christian Am 03.01.23 um 19:52 schrieb chrishell: Hello out there, I have an issue with a linked list which holds pointers to memory pages for a kprobe. The linked list get initialised but I

linked list within a kernel probe

2023-01-03 Thread chrishell
Hello out there, I have an issue with a linked list which holds pointers to memory pages for a kprobe. The linked list get initialised but I cannot use it within the kprobe. I use main or head pointer to hold everything in one place: struct kprobe_head { struct list_head*p_mem_

Re: only one element get stored in kfifo

2022-10-11 Thread chrishell
I got it. The correct way to pull out a struct from the kfifo, could be: rc = kfifo_out(&pfops->mymod_fifo, &r_cache1, sizeof(struct mymod_data_pkt)); BR Christian hello, Im struggle with a simple kfifo. I try to do it dynamicly. For the sake of simplicity I changed the code in a way that

only one element get stored in kfifo

2022-10-11 Thread chrishell
hello, Im struggle with a simple kfifo. I try to do it dynamicly. For the sake of simplicity I changed the code in a way that everything with the kfifo is done in the open function of my module. First of all, I have a struct, in which I store the pointer to that kfifo: struct mymod_private_fop

Re: Subject: Problems with of_find_compatible_node

2013-10-11 Thread chrishell
Hello Vishwas, thanks for your reply. But I don not have a /proc/device-tree at all. I solved the problem by writing a appropriate node into the .dts-file and recompile the whole kernel. I exchanged also "xilinx,cpld-led" with "cpld-led". After that it worked. Regards /Chris > Hi Chris, >

Problems with of_find_compatible_node

2013-10-01 Thread chrishell
Hello out there, I got a problem with the kernel function "of_find_compatible_node". I use it with: np = of_find_compatible_node(NULL,NULL, "xilinx,cpld-led"); or with np = of_find_compatible_node(NULL,NULL, "cpld-led"); but none of this works, because I get a null-pointer back. But it suppose