Category "kernel"

How to debug in kernel mode using printk

I am trying to add some stuff to Linux task_struct. In this area I copy a string from the user and try to store it in my struct. I try to debug my code by add

Netlink : Receiving data multiple times from kernel

I recently encounter a problem when I'm using netlink to transfer many data between userspace and kernelspace. For example, function in userspace releases a req

How to read a sector using a bio request in Linux kernel

How do I create my own bio request to read a sector from the disk drive ? I am trying the following but it freezes the system. static void read_bio() { st

Debugging 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 exa

I have an error when compiling android Q kernel

I have this error:CROSS_COMPILE_ARM32 not defined or empty, the compat vDSO will not be built when i trying to compile android kernel. My phone is aarch64, and

Linux: buddy system free memory

Could anyone explain this code? page_idx = page_to_pfn(page) & ((1 << MAX_ORDER) - 1); page_to_pfn() have already return the page_idx, so what does

kernel make error "arch/x86/entry/syscall_64.o:(.rodata+0x1120): undefined reference to"

This error stops my kernel make process ld: arch/x86/entry/syscall_64.o:(.rodata+0x1120): undefined reference to `__x64_sys_fd' BTF .btf.vmlinux.bin.o pahol

wait_for_completion for submit_bio in make_request not returning

I am writing a custom block driver in the Linux kernel and in my make_request routine, on writes I need to read the data of the bio's specified sector (from the