CRx registers and paging in linux - x86
I'm trying to learn a bit about the linux kernel and memory management. To do this I've written a small bit of kernel module code to dump CR0 register content. I understand that bit 31 in CR0, when...
View ArticleIs `sysfs_notify()` raising POLLPRI/exceptfds a design bug?
According to POSIX poll, it says POLLPRI:High-priority data may be read without blocking.It is a special read event, likely to read OOB data, etc.Now in Linux, if /sys/class/gpio/gpio<N>/value is...
View ArticleCgroup instance not creating "net_cls.classid" file [closed]
After creating cgroup i can see it is listed under 'lscgroup'cgcreate -g net_cls:123456#lscgroup | grep 123456 net_cls,net_prio:/123456But no child files got created under /sys/fs/cgroup/net_cls/I...
View ArticleHow to prevent a Kernel module to be removed
I've a Kernel module, and in some specific cases I want to prevent it to be removed with rmmod, I've read about try_get_module and module_put but that doesn't fits right to my case, there is another...
View ArticleInstalling custom kernel in Ubuntu results in error
I am installing linux kernel 5.8.10 in my existing Ubuntu system.After going all the steps. When I started to install modules by command sudo make modules_install , I found 2 errors.I can't find any...
View ArticleIs it possible to run multiple handlers in case of an interrupt?
If I want to register my own handler with a device say timer for example. So I have a handler which does something on a timer interrupt. Say, I want to monitor the same interrupt and execute one more...
View ArticleWhy does linux kernel enable interrupt in preempt_schedule_irq?
I'm reading linux source code to learn how scheduling works. I learn that in a preemptible kernel(CONFIG_PREEMPT is set), there is a chance for preemption after returning to kernel-space from interrupt...
View Articleprintk in init function only pops up after module removed [duplicate]
I have a simple module which just allocate memory and deallocate memory, they both happens on the init function, everything is built correctly but when I use insmod on my module and then check...
View ArticleInotify read single event
I have an app that registers multiple inotify watches on the same inotify fd. Due to the way the app is structured, I need events to be read one-by-one (instead of a single read(2) possibly returning...
View ArticleWhy my kernel log is not showing the latest output?
I'm coding a simple kernel module, in Ubuntu 17.04, that takes a string and prints it in the kernel...
View ArticleWhat is an simple example of copy_from_user
There is already a question about copy_from_user, but it is a little bit too advanced for me, I want to see simple example of using the copy_from_user method within kernel module, what is the simplest...
View ArticleWhich C version is used in the Linux kernel?
Does the Linux kernel use only the old C90 syntax or has it been optimized with C99 / C11 features?I was wondering if the newest versions of C are used when possible.
View Articleany example of copy_from_user() ? kernel and userspace
I am looking for copying PID value from User space to Kernel space, here is my code snaps.Kernel Module:#include <linux/module.h>#include <linux/kernel.h>#include...
View ArticleWhy does the Linux kernel enable interrupts in preempt_schedule_irq?
I'm reading Linux source code to learn how scheduling works. I learn that in a preemptible kernel (CONFIG_PREEMPT is set), there is a chance for preemption after returning to kernel-space from...
View ArticleKeyboard problem on Lichee Pi Zero with kernel 5.2+
My question is about Lichee Pi Zero board (based on Allwinner/Sunxi V3s SoC).Initially I used pre-built Linux image (kernel 4.10.02), it has no built-in Wi-Fi support (for Realtek 8327BS chip), so I...
View Articlechanging product
The App source changes are completed but without DB it would fail. is there a way to fix this?
View ArticleEnable kernels on jupyterhub on ec2 spin up from deep learning Linux 2 AMI
I have spin up an EC2 from deep learning Linux 2 AMI. I have installed jupyterhub on it from scratch. I am not able to fetch environments present on deep learning Linux 2 AMI as kernels on jupyterhub...
View Articlemailx command in Linux
Can anyone pls help me for below issue.Below code is working fine in unix sever for sending mail along with attachments from an array variable i.e DISCARDED_FILE_NAME. But same code is not working in...
View ArticleThe maximum summarized size of argv, envp, argc (command line arguments) is...
I wrote a program which should calculate the total size of arguments passed to execve system call.I have tested this program with maximum size of arguments, expecting that the "Argument list too long"...
View ArticleHow to prevent Yocto project BadValue error?
After running source oe-init-build-env in poky (Git of yocto), I run bitbake and I compile, everything is running smoothly. After I do source oe-init-build-env, I move into the right folder path and I...
View Article