When i execute binary i want their stack segment to be filled with special data. All i do is just write program that allocate huge buffer on a stack, call a lot of malloc and mmap and for example fill all this memory with ‘A’ character. Then i check and see that about 80% of whole memory are used by
Tag: linux-kernel
Is shared standard C library first initialized by kernel?
I’m trying to understand the operation of linker and loader, and memory addresses(physical or virtual) regarding how a program is actually compiled and executed. I encountered two pieces of information and formed my own version of comprehension. 1st information: W.5.1 SHARED OBJECTS In a typical system, a number of programs will be running. Each program relies on a number of
SystemTap script to profile latency of functions
My goal is to profile the execution time of each function in a kernel module. Using the sample scripts I saw online, I came up with the following script to fulfill my need. But occasionally I get negative values for calculated latencies. Although, they happen rarely but I guess that indicates something is wrong with my script. Can anyone help
Accessing memory pointers in hardware registers
I’m working on enhancing the stock ahci driver provided in Linux in order to perform some needed tasks. I’m at the point of attempting to issue commands to the AHCI HBA for the hard drive to process. However, whenever I do so, my system locks up and reboots. Trying to explain the process of issuing a command to an AHCI
How to understand the ARM registers dumped by kernel panic?
After Linux kernel oops on ARM platform, registers are dumped to console. But I got confused with analyzing these registers. For example, Questions: What does the 0xc0705970 stands for in SP: 0xc0705970:? Code address or data address? Where to find it? Why sp : c07059f0 is not at the beginning or end of SP register? How is the stack organized
What is importance of using GPL lincense in linux device driver
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
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