Is CPU affinity enforced across system calls?
So if I set a process's CPU affinity using:sched_setaffinity()and then perform some other system call using that process, is that system call ALSO guaranteed to execute on the same CPU enforced by...
View ArticleCreating and deleting directories and files in Linux kernel
I am writing a Linux kernel module. Create directories along the way:/etc/data_stor/user/id/{0001}/etc/data_stor/user/id/{0002}/etc/data_stor/user/id/{0003}/etc/data_stor/user/id/{0004}Create the same...
View ArticleWhat is the difference between the kernel space and the user space?
What is the difference between the kernel space and the user space? Do kernel space, kernel threads, kernel processes and kernel stack mean the same thing? Also, why do we need this differentiation?
View ArticleCustom built kernel produces non-bootable initramfs on Centos 7
I've been building my own kernel (4.19.37) and have no issues during build (make) or install (make install_modules+make install). Everything seems to go fine until I execute grub2-mkconfig -o...
View ArticleThe jupyter kernel dies while using np.array to convert a list to numpy array...
I have made a list of size 15000*512*512 successfully. But while converting it to numpy array the kernel dies The kernel for Desktop/RESERCH/V3.ipynb appears to have died. It will restart...
View ArticleMy windows kernel driver produces bugchecks due to using a priviledged...
I was just testing my kernel driver and it caused a bugcheck with the code 0x1E and the first parameter being 0xFFFFFFFF'c0000096. As far as I was aware the privileged instruction exception was only...
View ArticleDebugging a driver with WinDbg - How set a breakpoint at DriverEntry?
I have a driver which is, for some unknown reasons causing a bugcheck 0x0000003b. So I decided to set up a Hyper-V VM and use kernel debugging to see what exactly is going on. I already enable testing...
View ArticleCan't make menuconfig
I use Debian 7.4 Wheezy. I trying to upgrade my kernel, but when I type "make menuconfig" it says: *** Unable to find the ncurses libraries or the *** required header files. *** 'make menuconfig'...
View ArticleHow do I know if my server has NUMA?
Hopping from Java Garbage Collection, I came across JVM settings for NUMA. Curiously I wanted to check if my CentOS server has NUMA capabilities or not. Is there a *ix command or utility that could...
View ArticleHow to know or set a PCI/PCIe device address map?
I'm trying to understand how to instruct the CPU to instruct a PCI device to map its memory to the physical address of the CPU.I've read...
View ArticleIGMP: Host rejecting igmp query from src "0.0.0.0"
As per RFC4541, it is valid scenario for a proxy to send IGMP query with src as 0.0.0.0.Also, the RFC says, section 2.1.1 (4) that "If the switch is not the Querier, it should use the 'all-zeros' IP...
View ArticleHow do operating systems isolate processes from each other?
Assuming the CPU is in protected mode:When a ring-0 kernel sets up a ring-3 userspace process, which CPU-level datastructure does it have to modify to indicate which virtual address space this specific...
View ArticleLinux Block System Calls
I am trying to implement functionality in a linux 2.6.32.60 x86 kernel that would allow me to block all system calls based on a field I added in the task struct. This would basically be of the...
View ArticleMEMBER)"?">How to understand "((size_t) &((TYPE *)0)->MEMBER)"?
the codes in linux-2.6.16/include/linux/stddef.h is: #undef offsetof #ifdef __compiler_offsetof #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) #else #define offsetof(TYPE, MEMBER)...
View Articlex86: Triple fault on call instruction after switching page directory
I've been building my version of the xv6 OS, but just as I switch to a newly created page directory and try to call a function, it triple faults.A lot of similar questions have been asked and usually...
View ArticleWhere is the iOS kernel located in the filesystem?
This may be a very silly question, but it has me stumped:Where is the iOS kernel located on-disk? Is it even located on the filesystem accessible to a jailbroken iOS user?
View ArticleHow do debug the Linux kernel code path when I press ctrl-c during an...
I'm getting a kernel hang when I kill a process (ctrl-c) running on my customized Linux kernel. So I'm really curious what happens when I press ctrl-c on that process.I used "QEMU + gdb" to debug my...
View Articlehow to use i2c driver in kernel space
I have wrote a character driver to control my embedded hardware with my application, In my driver there is a feature to send a command to an I2C device which is connected to my embedded device.in...
View ArticleHow does kernel know, which pages in the virtual address space correspond to...
Consider the following situation: the kernel has exhausted the physical RAM and needs to swap out a page. It picks least recently used page frame and wants to swap its contents out to the disk and...
View ArticleIs there a system in computers that can be used instead of Interrupt Handler?
Assume that the interrupt handler is not working, how can multi-processes occur on the computer?Is there any system similar to the interrupt handler?
View Article