Here is a question about the details happening during system call. However, one thing surprises me that the TSS maintains different stacks for different priviliges. That is, codes running in user mode and system mode are using different stack context. Since system call is actually a function call, why couldn’t we just reuse the user stack and just create a
Tag: linux-kernel
How to send and execute multiple events in one file stream by writting to “/dev/input/EventX”
I am writting to a specific eventX file in /dev/input/, to trigger “hardware” events. The problem is, the events get executed, only after the file has closed and to trigger new events, the file needs to be reopened. It’s as if all the events are put on a queue and then when the file closes, they get executed. For example
Why is there a while loop in wait function of a semaphore, when if can be used too?
this is my code: there is a while loop in the wait function of a semaphore, can’t I use an if statement simply? Answer Because we can’t assume that after a thread is woken up and it requires the lock another thread has not already come along and taken the resource this is guarding:
modifying u-boot environment in kernel init
I’m trying to modify a u-boot env arg within the kernel code. I’ve found boot_command_line var in main.c and setup.c, which contains an arg, so that made me think it is possible, however, I coudn’t find where this var is being updated with the u-boot env arg value, or how to get a different arg and then write it back
How are memory regions on ARM Cortex A denoted as “device” or “strongly ordered” under Linux
On the ARM Cortex-A9 that comprises part of the Zynq SoC I’m using, regions of memory are labelled as “normal”, “device” or “strongly ordered”. This is described in the Zynq technical reference manual, but I understand it is a property of ARMs more generally. Obviously, the ability to have strongly ordered memory accesses for memory mapped devices (which includes many
Get Character String Written to Custom /dev/ file
I’m currently working with a custom device driver that I installed. I’m very new to this and having trouble understanding how to get the data that I write into it from the command line. For example, I write data to the file like so: And then I merely want to get the string here, so I can use the characters
The vboxdrv kernel module is not loaded (Unknown rela relocation – debian buster) [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
Why am I not able to view the clone() system call in strace output when typing ‘strace ls’ in terminal?
My understanding is that when we type ls in the terminal: It invokes fork() library function which invokes system call clone() to create a child process. Then system call execve() is invoked to replace address space of the new process created with new content. In that case I was expecting to see system calls clone() and execve() in the strace
TheFatRat Installation Issues mingw-32 →NOT OK mingw-w64 → NOT OK [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
ld: Final link Failed: Memory exhausted while building Linux kernel 5.8.9
I am trying to compile Linux Kernel 5.8.9 on Ubuntu 16.04 installed on VirtualBox ( specifications: 22 + 3 GB, Memory : 2 GB). After successfully making the .config file using make menuconfig, I compiled it using make. The compilation ran for around 100 minutes and stopped abruptly displaying error memory exhausted. How can I remove this error? Answer As