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

Modifying fork.c file in kernel to print a customised message when fork() is...

I am trying to print to the system log the process ID of the child process as well as my name. I have tried using printk and displaying the messages with dmesg, but the message that I print does not...

View Article


Is there a way to lookup refcount for a kobject?

I expected to find a function along the lines of kobject_check_refcount, that returned the current refcount without altering it, in kobject.c, but as far as I can see there isn't one. Is there such a...

View Article


Using wait_event_interruptible and wake_up_all together

For a class project involving scheduling processes using blocking and locks, we're supposed to use two kernel functions:int wait_event_interruptible(wait_queue_head_t q, CONDITION);void...

View Article

When signal handler is not called when segment fault occurs?

Below is the operation method of my program, and there was a case where the registered handler was not called when the program was terminated due to the occurrence of a segment fault.Is there a case...

View Article

Setting GPIO on boot before drivers [closed]

I work on IMX8MQ with a custom Yocto Linux image.I have a device that is controlled by a driver(not mine). The driver detects the device on boot and controls it via I2C.I have a need to turn the power...

View Article


How do I delete virtual interface in Linux? [closed]

ip link shows this:[root@0-25-90-68-79-4a log]# ip link1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:002: eth0:...

View Article

How to register user app to get notified with battery events(low, critical...

I am writing power supply driver(mypower_driver.c) which registers two power supply and implements couple of power supply properties like status, present, capacity etc.BatteryAC(Mains)I am using Yocto...

View Article

dentry_path_raw ignoring the home directory

I wrote and lkm and I am trying to print the current dirctory but when i am on/homeit print only/and for example if I am at/home/danielit print only/danielbut if i am at /etc directory or any other...

View Article


32-Byte PCIe transaction from Linux driver

I want to do 32 bytes transaction to/from PCIe device inside the Linux driver.Compiling Intel AVX instrinsics for Linux Device Driver with GCCCode:base_4 = ioremap(bar_data->bar_paddr[4],...

View Article


How often does Linux page replacement try to move pages from active to...

I am on Linux 5.6. My understanding is when a page fault occurs, Linux puts the new page into the active_list using lru_cache_add_active_or_unevictable() (with the exception of file-backed pages which...

View Article

Disable reverse path filtering from Linux kernel space

Within a Linux kernel module, I need to disable rp_filter in some way.This would typically be possible from user-space via a couple of simple sysctl calls :sysctl net.ipv4.conf.all.rp_filter=0sysctl...

View Article

active/inactive list in linux kernel

Where can I get active/inactive page lists inside Linux kernel which is maintained for memory management?Basically I want to dump these lists' info periodically, so I could understand which pages are...

View Article

Is it possible to use gdb and nested qemu virtual machine to debug linux user...

I want to debug a user application running in a nested virtualization environment.So I build a static version of QEMU and run it with KVM support.I call the first VM running by QEMU as host VM, and...

View Article


What does it mean to have a zero sized array of pointers?

I came across definition of a struct that looked something like this in the linux kernel sources (net/ipv4/fib_trie.c)-struct key_vector { t_key key; unsigned char pos; /* 2log(KEYLENGTH) bits needed...

View Article

Editing the issue file in linux to display for a longer period of time before...

I'm a complete beginner in linux and I've been trying to get a message to show for a longer period of time (or being able to read an input) before the login screen, to do this I have to edit the file...

View Article


Reading memory to a file [closed]

I want to be able to write all memory from kernel and user space to a file. My machine is running Linux kernel version 4.18. Is there a straightforward way to read and write kernel memory?

View Article

ELF Header Magic - Why was 0x7F put in it?

Every resource I have read concerning the ELF header magic points out that it contains ASCII encoded "ELF", and then briefly mentions that 0x7F is prepended to it without explanation. Is there a reason...

View Article


Yocto project proble with qemu

after running source oe-init-build-env in poky(git of yocto) i run bitbake and i compile everything running smoothly after i do source oe-init-build-env i move into the right folder path and i do...

View Article

Where is this set of boot arguments coming from?

I'm using Yocto to port the EVL Core to an iMX6 Sabre SD board.I had an core-image-minimal of a kernel (apparently not mainline) that booted correctly with the following boot arguments being displayed...

View Article

What happens to preempted interrupt handler?

I could not find a proper answer for the following questions even in some well written kernel books:They are saying that an ISR can't sleep because its not possible to reschedule an ISR as it is not...

View Article
Browsing all 12339 articles
Browse latest View live


Latest Images

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