How to include linux driver source files in a kernel module written in C?
I am currently writing a linux kernel module that needs to include a file from the linux driver source code. The particular file I am trying to include is:...
View ArticleHow to send multipart messages using libnl and generic netlink?
I'm trying to send a relatively big string (6Kb) through libnl and generic netlink, however, I'm receiving the error -5 (NL_ENOMEM) from the function nla_put_string in this process. I've made a lot of...
View ArticleFailed to start the kernel (Jupyter notebook)
I just installed anaconda, and jupyter notebook by pip install.when, I try to make new notebook, there is kernel error on the right side of the top.And, there is a unhandled error message.How can I...
View ArticleThe Linux kernel high mapping is not safe enough?
In the source codes of Linux kernel 3.10.0, I have noticed that the virtual address range [__START_KERNEL_map, __START_KERNEL_map+size] is mapped to the physical address range [phys_base,...
View Articleshowing kernel died in jupyter notebook [closed]
Hello sir/mam i have installed Anaconda to use jupyter notebook. After opening jupyter notebook via anaconda prompt it is showing that failed to establish a connection with jupyter notebook and showing...
View Articlelinux kernel module, problem when I delete a file [closed]
I have a simple problem with my kernel filesystem module.When I delete the file from my kernel module (not the RM shell command), everything is fine, but when I want to create a new file with the same...
View ArticleWhere I should use "swapgs" instruction
Hi I'm a kernel learner and have some questions about swapgs.According to AMD's documentation, it swaps the gs.base hidden register and KernelGSBase MSR.Furthermore, the addressing with "gs:XXXX" are...
View ArticleHow to reduce the probability of page allocation failure?
Are there still some methods that could be used by the Linux kernel to the probability of page allocation failure while both CONFIG-MIGRATION and CONFIG-COMPACTION are disabled?Are there some system...
View ArticleHow is the kernel process kswapd started step by step?
I understand the impacts and functions of the kernel processkswapd.As the output of ps -elf | grep swapd, I found kswapd is started by kthreadd. But how is it started step by step? Where's the extract...
View Articlesave_stack_trace_tsk and struct stack_trace is no longer available in Linux 5.2+
In kernel version before 5.2, I use save_stack_trace_tsk to retrieve call stack.But this method is no longer available in Linux kernel 5.2+, what should I use?
View ArticleWFP verifier issue
According to documentation for FWPM_LAYER_ALE_AUTH_CONNECT_REDIRECT,"Starting with Windows 8, memory allocated for localRedirectContext will have its ownership taken by WFP, and will be freed when the...
View ArticleRunning a userspace process in user mode with Linux kernel call_usermodehelper
I tried to execute a userspace binary inside the Linux kernel module with call_usermodehelper. I found the launched application is running in root mode. Is it possible to run the application in a user...
View Articleconntrack delete does not stop runnig copy of big file
I have a router with nat port forwarding configured. I launched a http copy of big file via the nat. The http server is hosted on the LAN PC which contains the big file to download. I launched the file...
View ArticleWhich type page is prefered when kmalloc is invoked with the argument of...
Which type page is prefered when kmalloc is invoked with the argument of GFP_KERNEL solely, unmovable, reclaimable or movable pages? And could you please tell me your reasons?I think maybe it's...
View ArticleWhy do movable pages of normal zone decrease rapidly when invoking...
Why do movable pages of normal zone decrease rapidly when invoking __vmalloc(80MB,GFP_KERNEL|__GFP_ZERO,...) repeatly?Why does not it use the memory of other types,e.g.: unmovable pages, movable pages,...
View ArticleIs it possible to configure ssh during u-boot?
Usually u-boot can be accessed with a serial communication such as UART.I am using raspberry pi 3 b+, and I need to access u-boot with ssh through an Ethernet cable.Is is it possible to configure ssh...
View ArticleHow to make a compiled kernel android "Image.gz" to "zImage" or "Image.gz-dtb"
How to make a compiled kernel android "Image.gz" to "zImage" or "Image.gz-dtb" ? In arch/arm64/boot only shows Image and Image.gz
View ArticleHow to code in JupiterLab "Restart kernel and run all"
I have a script what I run for all day for downloading data from some API. My problem is that the the connection is sometimes lost and the code can run only if I restart the kernel and run again...
View ArticleHow does Unix know about a new driver?
What are the operation that must be performed in order to create and make known to the Unix kernel a new peripheral and a new driver? What are the structures that internally change?I thought that a...
View Articleaccess to nanosecond in struct inode
In linux kernel v4.19.3In my module, I need to get the inode last modification time in nanosecondes and not in seconds, but it always returns 0.struct timespec64 i_mtime;for example in this code...
View Article