Hello,
I'm reading "Understanding Linux Kernel". This is the snippet that explains how Linux uses Segmentation which I didn't understand.
Segmentation has been included in 80 x
86 microprocessors to encourage
programmers to split their
applications into logically related
entities, such as subroutines or
global and local da...
I am trying to figure out how to determine the user which triggered a specific event when monitoring some files with inotify. Is that even possible? Does the inotify_event structure has something like this?
...
hello, im writing a Usb driver and i have an issue.
when i insmod the driver with the device already plugged in before, the probe function is not called. it is only called after i disconnect the device and plug it again.
i wanna make it work when i start my pc with the device plugged in.
could someone please help me?
best regards,
jacob....
In Windows, I can set the processor affinity of driver code using KeSetSystemAffinityThread, and check which processor my code is running on using KeGetCurrentProcessorNumber.
I'm trying to do something similar in a Linux kernel module, but the only affinity calls I can see are for userland processes. Is there any way to do this, so tha...
hi,
consider a kernel tasklet scheduled and executing the tasklet function.
Is there a way to know which core the tasklet is running ?
I mean is there a function / variable to know at which core the tasklet is running at.
Architecture is arm.
Thanks!
...
Hello,
I am trying to implement my own transport layer protocol in Linux for an experiment. I am going to use socket interface and add my protocol using sock_register. For the proto_ops i can see that the parameters for the sendmsg and recvmsg are (struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len, int flags). But t...
Hope the question is clear :)
...
Basically, we want to run static programs compiled on one platform on another.
If it's not possible, what are the most significant changes in the kernel API between version 2.6.9 and 2.6.18?
...
I have a loadable module that is throwing a warning about phys_mem_access_prot when built under Ubuntu 9.10 (Linux 2.6.31-22-server).
[664] make -C /lib/modules/`uname -r`/build M=`pwd`
make: Entering directory `/usr/src/linux-headers-2.6.31-22-server'
LD /home/chuck/dev/svd/built-in.o
CC [M] /home/chuck/dev/svd/svd.o
LD [M...
I have a client server situation in which I receive data using
read(socket, char_buf, BUF_SIZE)
and then try to write it into a log file using
write(filefd, char_buf, strlen(char_buf))
Strangely enough this fails (write returns -1), and yet the errno is set to 0, and I can print the message, AND the log file descriptor works (I w...
Hi,
I am trying to understand Linux Kernel implementation of linked list and hash table. A link to the implementation is here. I understood the linked list implementation. But i am little confused of why double pointers is being used in hlist (**pprev). Link for hlist is here. I understand that hlist is used in implementation of hash t...
Can dirtiness of pages of a (non-shared) mmap be accessed from userspace under linux 2.6.30+? Platform-specific hacks and kludges welcome.
Ideally, I'm looking for an array of bits, one per page (4kB?) of the mmap'ed region, which are set if that page has been written to since the region was mmap'ed.
(I am aware, that the process doin...
I've been puzzled by a RTC problem for several days: i couldn't write to the RTC register.
Following is the code snippet and the value I read from the reg(last line) is always different from what i just wrote to the reg. Anyone can help me understand this ?
val = CMOS_READ(RTC_FREQ_SELECT);
printk(KERN_INFO "reading val=%d from...
hello. please forgive me if the question were asked before.
after some research on netfilter there are few loose ends that i cant comprehend.
where is the memory of the queue is and how is it being handled?
when you are using the queue is it being copied to the userspace or that you map the memory and how it influences the system perfo...
Looking through the scheduler source code (2.6.34, kernel/sched.c), I can see how the "pluggable" schedulers are used, and I believe I understand the interface to be implemented. What I don't understand yet is how to get my code built into the kernel. At the very least, pointers to other sites would be appreciated.
Right now, I'm grep...
struct inode_operations ext3_dir_inode_operations = {
.create = ext3_create,
.lookup = ext3_lookup,
}
This struct is assign to inode structure and further to file system operation structure.
My question is what is this flag .create? Do we do the assignment in the structure itself?
Or is it some other ver...
Hi
We're designing a network device based around SoC, which contains MIPS core and 5-ports
switch core, connected to the CPU via internal MII port.
Device driver provided by a chip vendor represents 5-port switch as a single inteface
from the OS perspective; the driver also supports VLAN and currently it splits 5 ports
in two VLAN grou...
As per the source,
http://lxr.linux.no/#linux+v2.6.31/include/linux/skbuff.h#L1204
1197 * skb_reserve - adjust headroom
1198 * @skb: buffer to alter
1199 * @len: bytes to move
1200 *
1201 * Increase the headroom of an empty &sk_buff by reducing the tail
1202 * room. This is only allowed for an empty buffer.
1203...
Hello,
I want to know how to see the changelogs or commit messages for a module in the kernel. Actually i modified virtio_net in kernel2.6.26. Now the virtio_net in 2.6.34 seems to be lot different from the one in 2.6.26. There should be some git commit messages or changelogs for the different versions of virtio_net. I want to know the...
I'm writing a driver and I want to get network counters of some device within it.
What data structure holds that information and how can I access it?
...