What the documentation of Linux Programmer's Manual is documenting?
I have worked with the manual page of the socket() in my Linux system and I was wondering what the functions it is documenting are belonged to.For example, the function int socket(int domain, int type,...
View ArticleMeaning of 'vector' in asm context
For something like:int $0x80I understand that it is executing the int instruction on the destination operand value 0x80 or 128. And, if I'm understanding correctly, 128 is a system call and it'll...
View ArticleHow to write a Linux hook function to get called when a packet is received on...
I'm writing a software on a Linux Gateway device which receives data on RS485 interface.I want to write a Linux hook function that shall be invoked when message is received on RS485 interface.My hook...
View ArticleHow does one configure a pin as an input with a pull-up using Linux's gpiod...
Looking at the function devm_gpiod_get, it is possible to configure the initial mode of the pin using one of the variants of the gpiod_flags enum:/** * Optional flags that can be passed to one of...
View Articlefor_each_possible_cpu macro in vmalloc_init() function, does the code run in...
this is not about programming, but I ask it here..in linux start_kernel() function, in the mm_start() function, I see vmalloc_init() function.inside the function I see codes like this.void __init...
View ArticleAutomatic yes command when patching?
I am trying to patch a kernel with the following command:patch -p1 < 0001-Linux-3.4.4.patchHowever i keep receiving y/n? responses such as:The next patch would create the file...
View ArticleSu brute-force with dictionary attack
I have a dictionary file, which contains a list of possible passwords.I have written the script below to read the file and pass each line into the SU command.The dictionary contains 637 lines of...
View ArticleWhat To Do With cdev_init When Converting file_operations To proc_ops?
According to this question Passing argument 4 of ‘proc_create’ from incompatible pointer typeYou have to use proc_ops instead of file_operations structs on newer kernels.How should we handle...
View ArticleIs there a ARM processor support on-chip hardware random number generator?
Intel supports RDRAND (also known as Intel secure key) instruction for returning random numbers. And it's available in Ivy Bridge processors.I wonder, is there any ARM processor featuring instructions...
View ArticleHow does libdrm communicate with kernel/graphics card?
This can be a silly question as I do not know much about this topic at all... It seems that user applications can talk directly to GPU to render an image, for example using OpenGL, through mesa and...
View ArticleHow can this client-server communication method save two kernel crossings?
In an OS book, when it talks about client-server communication, it says:Client-server communication is a common pattern in many systems, and so one can ask: how can we improve its performance? One step...
View ArticleCan you crash the host system using a docker container?
If yes, is there anyway to prevent the crash by using a kernel designed to not crash. I would like to run docker image from strangers, would like to know if there is anyway i could get griefed. Thanks...
View ArticleHow to build a working TPM2 image for Raspberry Pi with Yocto?
I want to build a Linux System with Yocto for the Raspberry Pi with enabled IMA & TPM2.0 support. Therefore I want to compile the kernel with IMA/EVM and TPM Configs and Recipes.The IMA support...
View ArticleMinimalistic Linux Kernel not compiling
I want to compile an own minimalistic Linux Kernel with make tinyconfig and after doing all steps (like here:)I get this error message:arch/x86/kernel/apic/apic.c:2282:6: error: redefinition of...
View ArticleHaving issue with linux export DIR path
I install NodeJS using NVM, but to run npm commands every time I have to run the following commandsexport NVM_DIR="$HOME/.nvm"[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"otherwise it shows...
View ArticleHow to use "socketcall" function which in linux/net.h properly?
I have been trying to create a socket using the function int socketcall(int call, unsigned long *args);, the constant SYS_SOCKET and the pointer to the args array({AF_INET, SOCK_STREAM, 0}).However,...
View ArticleAndroid - Read "device attribute" fails with error "invalid length"
I am working on the TI OMAP platform with Android as the operating system. For one UseCase, we have to toggle one of the LED's in the device. The LED has number of "Device Attributes" and from the...
View ArticleIs there any module dependency definition for linux kernel module in source...
I know that we can check the Linux kernel module dependency at runtime with the lsmod or modprobe command.But what if we only have the kernel code, is there a way to check the kernel module's...
View ArticleIf statement with ZERO as condition
I am readin linux sources and notice statements like if (0) {....}What is this magic about?Example: http://lxr.free-electrons.com/source/arch/x86/include/asm/percpu.h#L132
View Articlemissing-syscalls error during linux kernel 2.6 compilation
i am trying to experiment with linux kernel by adding a custom system call into the kernel.I succeeded at first and later I made some modifications to the file containing the new call code and when i...
View Article