Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Browsing all 12310 articles
Browse latest View live

How to get mount point for a given path in custom linux kernel module

As the title says I have a problem with my custom kernel module. My goal is to retrieve the root mount point of a given path. Just like using df:df "/tmp/some_dir/some_file"vvvvvvvv out...

View Article


USB bus ports representation in sysfs

Following is the output of /sys/bus/usb/devices/ in the embedded system.# ls /sys/bus/usb/devices/1-0:1.0 1-1 1-1.1 1-1.1:1.0 1-1.1:1.1 1-1.1:1.2 1-1:1.0 usb1#While trying to understand this output, it...

View Article


what is the head of the table of stabs?

when I use the commandobjdump -G obj/kern/kernelPart of information on the screen such like thisSymnum n_type n_othr n_desc n_value n_strx String-1 HdrSym 0 1222 000018d7 1 0 SO 0 0 f0100000 1...

View Article

How to find the scsi_host_template functions for a block device

I was looking into the IO path of the linux kernel, and towards the bottom in the function scsi_dispatch_cmd(), the driver code is invoked,rtn = host->hostt->queuecommand(host, cmd);So, for my...

View Article

How to automatically run 'sudo modprobe -r ftdi_sio' whenever the device is...

I have a USB device that I'm using and I'm developing an application using WebUSB with Google Chrome.The thing is whenever I plug the USB device into my Linux computer, I have to manually run sudo...

View Article


How does Linux kernel temporarily disable SMAP protection in copy_from_user?

I want to know how the Linux kernel disabled SMAP when executing copy_from_user function, I tried to find something in source code, but I failed

View Article

serialport access in kernel space

I want to use serial port in kernel space, I have found some code which was in user space, I tried to convert the codes to work in kernel space...this is my code#include <linux/termios.h>#include...

View Article

insmod error in kernel module programming

I am just starting with modular programming. Above are my two files:hello.c#include <linux/init.h>#include <linux/module.h>static int hello_init(void){ printk(KERN_ALERT "TEST: Hello...

View Article


Linux Kernel Module crashes when needs to connect to remote computer

I am trying to make a kernel module that gets a ping from a computer that listens on port 1234, and returns a reverse shell to that computer.I tried to insmod my kernel module that connects to a...

View Article


How can the linux bottom halfs execute in interrupt context?

While understanding the concepts of top halves and bottom halves, I came across with a question. Here is my understanding: Top half and Bottom half executes in interrupt context. The only difference...

View Article

Why would one call stat64 explicitly?

Env: Ubuntu 18.04, Linux Kernel 5.3I'm debugging some binary with gdb. Here is what I found when catching stat system call:(gdb) bt#0 0x00007f2d8ecae775 in __GI___xstat (vers=vers@entry=1,...

View Article

Getting container of a void pointer

I am currently trying to get rid of a backref I need for the following function:/** * amd_sfh_hid_poll - Updates the input report for a HID device. * @work: The delayed work * * Polls input reports...

View Article

Disable a gpio-key using the sys interface

I have a gpio line defined as a gpio-keys in the dts file . I am trying to use the sys interface to enable/disable keys under /sys/devices/platform/gpio-keys/I can see the gpio line when I view...

View Article


How does /proc//file get created?

Hi I'm studying about the Linux kernel. In recent lab,we need to modify the /fs/proc/base.c and add a function which can create a proc file in the <pid>/ dir. The proc file records some...

View Article

How does Linux kernel temporarily disable SMAP protection in copy_from_user...

The question is about x86 architecture.I want to know how the Linux kernel disabled SMAP when executing copy_from_user function, I tried to find something in source code, but I failedSupervisor Mode...

View Article


SOLVED: Error building program using gcc plugin from linux kernel source tree

I am trying to use a grsecurity gcc plugin that I found on their unofficial linux kernel source tree (the respectre_plugin/ one).My GCC version is 4.7, I modified scripts/gcc-plugins/Makefile to make...

View Article

How to disable SELinux in Android 8.1 Oreo?

I want to disable SELinux at boot time for Android Oreo 8.1. I want to execute a script at boot in init.rc file. But it returns this error at boot:does not have a SELinux domain definedI've already...

View Article


get filesystem mount point in kernel module

I want to get the filesystem mount point for a file system in my kernel module, which is a stackable filesystem.Eg. if /home/ab/abc is a file and /home is mounted on a different filesystem I want to...

View Article

Read/write files within a Linux kernel module

I know all the discussions about why one should not read/write files from kernel, instead how to use /proc or netlink to do that. I want to read/write anyway. I have also read Driving Me Nuts - Things...

View Article

How to turn on virtualisation in linux, kvm android emulator

I am interested in programming and app development. i want to study flutter my phone dies always and it dosen't charge while debuging so i decided to use a android emulator. i use ubuntu on a acer...

View Article
Browsing all 12310 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>