What is the exactly benefit of using MODULE_LICENSE(“GPL”) in linux device driver development. i mean what will we lack or gain by not using or using it. which kernel symbols we will not able to use when we will define MODULE as non GPL. Answer The big difference is the symbols that are exposed to your module when it is
Tag: linux-kernel
What’s the purpose of `on_rq` field in `task_struct`?
I am now reading the source code of try_to_wake_up() function of Linux Kernel. This function does a lot and includes this: return p->on_rq == TASK_ON_RQ_QUEUED. So, what is the actually purpose of on_rq field in task_struct. BTW, does there exist some manuals or reading materials to introduce all the fields in task_struct? I think a fully understanding of these fields
How to limit privileged user access at Linux Kernel level?
I found this answer on learning Linux Kernel Programming and my question is more specific for the security features of the Linux Kernel. I want to know how to limit privileged users or process’s access rights to other processes and files in contrast to full access of root. Until now I found: user and group for Discretionary Access Control (DAC),
Dynamically find the address at which the kernel is loaded
I’d like to be able to programmatically find out the address at which the linux kernel is loaded. If there are tools out there that already do that, I’d be willing to use them. However, inspecting the PARAMS_PHYS field in the .config during the kernel build is not an option. How could I go about doing this? Answer From where
Coding of Admin-Guest login section in an OS
I developed an authentication algorithm for user authentication as part of my masters thesis and implemented it in PHP. I intend to know how can I implement the algorithm for operating system login, in which language (for linux)? also where the code will reside because it will not be click and run code it will automatically load upon the starting
How to achieve accurate timer in linux kernel
When i write a infrared remote control driver, I have to control delay accurate time during enabling and disabling PWM. At first i used udelay() function in kernel, but i found it’s not accurate at all as i said in another post AFAIK, other timeout functions provided by kernel can’t provide accurate time because of scheduler, when timeout, kernel still
How to have a separate kernel parameter for a newly created network namespace under Linux?
I am creating a new network namespace called OAM, along wit the veth interfaces to communicate between the new namespace and the default namespace: Now I check the value of ip_default_ttl parameter from within the default namespace: It is set to 64. Next I check the same parameter in the newly created OAM namespace: So, there isn’t a copy of
How to add poll function to the kernel module code?
As I know, to inform the user space from kernel space, one way is to using poll. That means kernel driver should provide poll method first. Below code is found from internet, and it really works! I can do like this to make it work: And then to see the result. But how to add poll method to it? I
Audio Channel change/swap automatically
I am working with digital TV in Linux platform. Currently I am facing with one issue in audio. When I give stereo audio to Function and after long time running the audio channels get swapped. That is, right channel audio hearing in Left channel and Left in Right. I dumped the PCM data in to a file before giving to
C program works on my Ubuntu VM terminal but not on school Linux server?
I have this C program that runs perfectly on my Ubuntu Virtual Machine but does not run at all(doesn’t prompt user for input, just finishes) on the school Linux server. School Linux version: Linux 2.6.18-371.9.1.e15 x86_64 My Ubuntu VM version: Linux 3.16.0-33-generic x86_64 Here is the program: Any idea why this is?? P.S. thanks to those who helped me with