Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12371

How can we obtain a userspace file descriptor from the kernel's struct file (and vice versa)?

$
0
0

I need to open a file as a struct file in kernel space and return the file's int descriptor to the userspace, and I also need to pass an int descriptor to the kernel space and be able to retrieve the corresponding kernel struct file.

How do I do that? I open the files in the kernel with filp_open.


Viewing all articles
Browse latest Browse all 12371

Trending Articles