3
votes
0answers
25 views

Kernel bisect: when a patch is failing for a reason other than original bisect purpose, what do you do?

Let's say you're trying to find the cause of a bug between 3.11.0 and 3.12.0. The bug is really difficult to catch, because it may or may not manifest itself over several days of regular workload ...
0
votes
0answers
23 views

Can I use lldb to remotely debug the Linux kernel?

With GDB, I can remotely debug the Linux kernel. lldb, which promises to completely replace GDB, should be able to remotely debug the Linux kernel too. However, I cannot find any tutorial about this ...
7
votes
2answers
628 views

How exactly does printk work internally?

I know printf needs help from the OS to do its job. I also know printf does not work in the Linux source code as there is no library. And so we have printk for debugging. How does printk work ...
1
vote
0answers
34 views

sysrq-trigger doesn't accept parameter 'g'

I'm trying to debug the kernel. But I couldn't trigger kgdb with echo g > /proc/sysrq-trigger, it just prints help message. I have enabled kernel debugging, kgdb over serial, frame pointer etc. ...
2
votes
1answer
199 views

How can I run gdb in one machine and run kgdb kernel in another machine?

I want to run two machine: debugged machine: compiled kernel with kgdb option. debugger machine: for running gdb How can I debug machine 1 from machine 2?
1
vote
1answer
542 views

How to avoid overflowing the kernel printk ring buffer?

I'm trying to debug a linux driver and a particular piece of code is behaving very strangely. In order to see what's going on I've filled the code with printk statements so I can see exactly what the ...
2
votes
0answers
52 views

kgdb not returning control to gdb

I've compiled a kernel with kgdb support and I'm trying to debug it. I have two machines running, a debug machine (running the kgdb kernel) and the machine I'm using to debug it. They are connected ...
2
votes
1answer
1k views

Kernel and QEMU : Unable to mount root fs error

I am trying to run a distro in the virtual disk image with a custom kernel,so that I can experiment and debug the kernel. I followed this to make a disk image and then install Debian to it. Now I ...
2
votes
1answer
786 views

Debugging Linux Kernel with QEMU

I was trying to study the debugging of kernel using QEMU. I tried initially and failed due to the fact that there was no virtual file system. The answers to this post suggests that there should be a ...
2
votes
0answers
102 views

How to find where driver.mod.c links to?

I'm trying to port the webcam composite gadget from kernel 2.6.37 to 2.6.32. I don't have a choice on this since I depend on other drivers and a SDK which only compile for this version. My train of ...
4
votes
1answer
2k views

What is the difference between /proc/self/stack and output from pstack?

I have been looking through the documentation for /proc and the "stack" object being a new'ish object in proc, I have also looked through the kernel commit to create it -- however the documentation ...
2
votes
0answers
593 views

Linux kernel slab usage growing on embedded system

I'm in the process of QA/debugging a project on a custom embedded linux system. The problem we're VERY tight on memory, and even a couple megs can cause issues with our software. What I'm seeing ...
2
votes
1answer
647 views

Dump Page table layout (KERNEL CONFIG)

While configuring kernel for debugging found this option: CONFIG_X86_PTDUMP: Export kernel pagetable layout to userspace via debugfs Does this mean RAM page-table layouts ? any guides on how ...
18
votes
4answers
2k views

Kernel Hacking Environment

I have been working in embedded OS like uCOS, ThreadX. While I have coded apps in Linux, now I’m planning to start learning Linux Kernel. I have few questions regarding the environment. Which is ...
6
votes
2answers
2k views

How do I debug a kernel module in which a NULL pointer appears?

I have a custom kernel module that I compiled from this patch that adds support for the logitech G19 keyboard among other G series devices. I compiled it just fine against Ubuntu's maverick kernel's ...
4
votes
2answers
331 views

How to debug an inserted kernel module?

I would like to debug a loaded kernel module I don't have the source code to; I suspect it's a virus. Is there a way to feed it into GDB for analysis?
3
votes
3answers
666 views

Debugging ethernet before NFS boot

I'm trying to boot Linux from U-boot on an embedded ARM board using a filesystem on a remote machine served via NFS. It appears that the ethernet connection is not coming up correctly, which results ...
2
votes
3answers
320 views

Kernel debugging

I would like to study the flow of some linux device drivers and some minimal flow of kernel (threading cum context switching and interrupt management). How can I debug the linux kernel? What are the ...