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

Char Driver Linux: What is the correct implementation of file_operations read...

I am trying to read and write to a char driver. When i use a C program to open the device file and read and write it gives a SEG fault. When I use a cat to the device file it goes to infinite loop.1)...

View Article


What does commands uname -r, uname -i, uname -p in linux do? [closed]

For example from the command:$ ls /lib/modules/ print out all directories name as 4.15.0-XX-genericand from the command$ ls /lib/modules/$(uname -r) prints out different module binaries, and...

View Article


Why when i compile my kernel it gives errors [closed]

Im modifying the kernel for a Samsung Galaxy Core Prime SM-G316F to add external wifi dongle support and HID compatibility And when i enable USB functions configurable through configfs it gives errors...

View Article

Difference between skb_header_pointer and skb_transport_header?

I'm trying to implement a netfilter module, while processing sk_buff I found two possible ways to retrieve TCP header:struct iphdr *ip_header = (struct iphdr *)skb_network_header(skb); struct tcphdr...

View Article

what is the difference between kernel panic and software exception?

A software interrupt, also called an exception, is an interrupt that is caused by software, usually by a program in user mode. kernel panic is caused by Hosed updates, failing hardware, unsupported...

View Article


Is it possible to re-transmit a packet after capturing it using XDP and...

I need to write an application that sits between two servers and modifies HTTP packets sent from one server to another by adding a specific HTTP header to each packet. Apparently it has to be done as...

View Article

Can't get data (payload) from sk_buff

I try to create a module for encrypt network packets but when try get data from sk_buff and print it in Hexa not get a correct packet. I use this method to print data in Hexa :void pkt_hex_dump(struct...

View Article

Getting random junk output from my simple syscall test

Using Ubuntu 18.04.3 LTS (GNU/Linux 5.0.21+ x86_64)I created a simple syscall and am trying to pass input (the integer 5) through it by calling it in a c program and then see if I can get the input...

View Article


error: implicit declaration of function ‘sys_kill’

I've created a system call to return a tag variable (that I added in the kernel) of a specific process. When I make I get error: implicit declaration of function ‘sys_kill’. Does anyone know what might...

View Article


Command cc not found : /bin/sh: 1: cc: not found

which gcc : o/p : /usr/bin/gccwhich g++ o/p : /usr/bin/g++which cc: o/p : nothingI have installed the build essential and gcc. But cc is somehow missing.Can anyone help me to install cc in this scenar

View Article

How to "invalidate" or "flush" a range of CPU cache in PowerPC architecture?

I am working with an embedded device which communicates with my PowerPC CPU via PCIe. Due to the SDK constraints i have to use linux kernel version 4.1.8. This version doesn't have functions related to...

View Article

So I did edit my bash profile but I cant get out of bash due to errors that I...

[Bash Error} So I did edit my bash profile but I cant get out of bash due to errors that I have in my command? What should I do to exit. I using linux software

View Article

How to load Linux module while debugging Linux kernel with QEMU and gdb?

I am trying to debug the function "apply_relocate_add" in the Linux kernel with QEMU and gdb. This function called when the kernel loads new module.Qemu command:$ qemu-system-x86_64 -kernel...

View Article


What are the steps to create patchset in git

So I want to create a patchset - total 3 different patches for a code fix. Its a git based project.I have thought following steps-I am in master branch. Did by git checkout master Create 3 different...

View Article

How to include kernel headers in a program

I am writing a libnetfilter_queue program. I am new to linux kernel programming. I need to include linux/skbuff.h, net/checksum.h and many related kernel headers which are not present in...

View Article


Unable to copy files / folders in /dev/sda partitions

I have recently installed linux 18.04 on my machine. previously I had installed windows & created 4 partitions that is C,D,E,F. I have installed linux on C drive. other 3 partitions are displaying...

View Article

Kernel module to filter NFS requests

I'm working on a proof-of-concept kernel module to filter NFS requests based on some criteria (client IP address, type of operation performed, etc.) I used a hacky method described in this question but...

View Article


Linux Kernel Changing Default CPU Scheduler

I am trying to hack the Linux kernel and I am wondering. How can I change the default Linux Process scheduler with another one? And can I just set every processes as a real time process?

View Article

How do i decode the output of /proc/$$/statm?

I am trying to understand the output given by statm. This is part of task to analyze memory usage of a process which keeps bothering the system performance.From few blogs i got to know "statm" is the...

View Article

Can't open owasp-mantra, firefox already opened

I'm learning Kali Linux, tried to boot Mantra, but I always got the error msg like this:'Firefox is already running, but is not responding. To open a new window, you must first close the existing...

View Article
Browsing all 12244 articles
Browse latest View live


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