Skip to content

Tag: linux-kernel

Playing with shmat and shm_open

I just read the manpages for shm_open and shmat and was trying out the following example. In a file test.c I do, And in a wrapper file I do, I tried adding in a strerror(errno) at test.c and I get Identifier removed. What does that mean? What am I doing wrong? Given a shared memory identifier(shmid), shouldn&…

What’s the CONFIG_OF in linux?

I see that it is being widely used at many places but could not understand in what scenarios I need to use it. What is CONFIG_OF? What is the full name of “OF”? Answer Open Firmware. This was invented long time ago when Apple was producing laptops based on PowerPC CPUs and Sun Microsystems worksta…

pci device info access in linux from userspace

I want to access the pci device tree information from user space programatically. Like the root complex and the devices connected to it. How can I do it please let me know. Regards, Pradeep Answer libpci or pcilib (on which lspci is based) uses sysfs, procfs, and possibly other means to access PCI information…

how to find Linux module path

in the linux, lsmod lists a lot of modules. but how can we find where those module loaded from. for some modules,linux command “modprobe -l” shows a path but some are not. edited i also tried “find” and “locate”. both of them lists all kind of versions Answer You can use &#…

What’s the difference between insmod and modprobe?

I know insmod and modprobe are used to insert module into the kernel. But, what’s the difference between them? And, why is it dangerous to insert modules with force option in modprobe? Answer modprobe is the intelligent version of insmod. insmod simply adds a module where modprobe looks for any dependen…