Questions tagged [userspace]
109 questions
0
votes
3 answers
Linux tool to send a SET_CONFIGURATION message to a device connected to the USB bus
I have developed a kernel driver for a USB device. Such a device has some pins that can provide functionality both as CDC ACM serial port or as input buttons. So to implement that I had to use two different USB configuration descriptors.
The driver…

aicastell
- 2,182
- 2
- 21
- 33
0
votes
1 answer
How user virtual address access the physical memory , if all the memory is mapped directly with kernel virtual address
If we have a 32bit CPU, it can have 4GB of virtual address space. the first 3GB ( 0- 3GB) is for user space virtual addresses and rest 1GB ( 3GB - 4GB) is for kernel virtual addresses.
But as I can read in many articles , and even in LDD book ,…

Puneet Gupta
- 19
- 3
0
votes
0 answers
Passing parameters to custom syscall in unix
I am attempting to create a custom system call that inputs an (long) array and outputs some basic information about this array for a class assignment.
I am having some trouble passing the appropriate arguments into the system call.
Below is the test…

Wahotaho
- 9
- 3
0
votes
0 answers
Kernel module starting userspace application from docker
I have a Kernel module program which executes an userspace app named binary as shown below.
struct subprocess_info *info;
static char *envp[] = {
"HOME=/",
"TERM=linux",
…

Sriram.K
- 45
- 7
0
votes
1 answer
File System in Userspace (FUSE) compilation error
/*This is a simple try to create a File System in UserSpace
The pre_init function just initializes the filesystem */
#include
#include
#include
#include
static void* pre_init(struct fuse_conn_info…

vignesh_md
- 15
- 12
0
votes
0 answers
Which are the ways to redirect the execution flow, from user-space to kernel in x86_64?
I know two ways to redirect the execution flow, from user-space to kernel in x86_64:
1. SYSCALL Service
2. Software interrupts
Is there any other way to go into kernel from user-space?
Any help would be appreciated.

Puffy
- 401
- 6
- 13
0
votes
1 answer
How is it possible to update the firmware from userspace?
This is one of those things that has always blown my mind. How is it possible that when I am logged into windows I can run an application that allows me to upgrade my devive BIOS or install firmware for my hard disk and etc.
I have not found any…

ng.newbie
- 2,807
- 3
- 23
- 57
0
votes
2 answers
Including Drivers in User Space Programs/ SPI Application
Right now I am looking to use the Cadence SPI driver to perform some basic reading and writing on Linux. I have just used the I2C driver, but I am still a little confused as to how all of these drivers fit together and if there is a general…

John Frye
- 255
- 6
- 22
0
votes
1 answer
linux syscall using spinlock returning value to userspace
I'm, currently struggling with the correct implementation of a kernel-spinlock in combination with a return statement which should return a value to userspace. I implemented a kernel syscall 'sys_kernel_entropy_is_recording' which should return the…

OliverJL
- 23
- 5
0
votes
1 answer
free(): invalid pointer only after zerocopy DMA driver access
I have a driver that does a DMA transfer to a memory thats malloc'ed in a userspace application and then handed down to the kernel (get_user_pages...).
Problem: I get the "invalid pointer" message when calling free(). I print both pointer values,…

Thomas S.
- 61
- 4
0
votes
1 answer
how to create *.a to *.so in linux user-space?
i done compile file makefile.am and i need shared link for my lib, for example after compile i see /usr/lib64/libtest.a but i need libtest.so because i need my lib to other C source file,
example :g++ -llibtest test.c
i read about this here but i…

Ramin Farajpour Cami
- 1,605
- 3
- 11
- 21
0
votes
0 answers
cross platform (mac/win) way to write uboot to specific location on sd card
I am working on a cross platform (mac / windows) updater tool to write an uboot SPL to a specific location on an SD card.
I basically want to do the equivalent of this linux command, from my user space C++ application:
sudo dd if=out of=/dev/sdb…

b20000
- 995
- 1
- 12
- 30
0
votes
0 answers
How to send a simple message from kernel to user space?
I have a very simple (I think) problem.
I have a very simple kernel module, which handling an interrupt coming from my hardware (its all described in my device tree). I get the interrupt in kernel. Now I want to send a message (just 64 Bit, two…

alabamajack
- 642
- 8
- 23
0
votes
1 answer
How to change the batch size at NIC for DPDK application?
I am using intel 2P X520 Adapter on Xeon(R) CPU E5-2640 v3 based server running Ubuntu 16.04. I am interested in measuring the performance(throughput) of the application when we change the batching factor at NIC and in application. By changing the…

A-B
- 487
- 2
- 23
0
votes
1 answer
When would one choose to write software in kernelspace rather than in userspace?
Let's say you have an embedded device (e.g. a raspberry pi) running embedded linux and want to communicate with an external module.
In which cases would you decide to communicate with the device by writing a kernelspace driver?
In which cases…

jithophipr
- 25
- 2