Category "linux-kernel"

Is the sscanf function in the Linux kernel susceptible to buffer overflow attacks?

From what I understand, a typical buffer overflow attack occurs when an attack overflows a buffer of memory on the stack, thus allowing the attacker to inject m

Why can the posix thread id be NULL in Linux kernel function filp_close?

Below is excerpted from linux kernel: /* * "id" is the POSIX thread ID. We use the * files pointer for this.. */ int filp_close(struct file *filp, fl_owner_

Determine architecture when compiling linux module

I am writing a kernel module and in it I have the following piece of code: dma_dev->coherent_dma_mask = DMA_BIT_MASK(64); I do not always want 64 in there

simple_read_from_buffer/simple_write_to_buffer vs. copy_to_user/copy_from_user

I recently wrote a module implementing these functions. What is the difference between the two? From my understanding, the copy_..._user functions are more sec

Linux Kernel Module - Create Directory

I've got a problem about creating a directory within a linux kernel module. What I want: Creating a directory within a kernel module. Here is my actual code:

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

why struct cdev has kobject member?

It's strange that struct cdev has struct kobject member, do any body knows the reason?