linux-kernel

What is “Code” in Linux Kernel crash messages?

别来无恙 提交于 2021-01-27 11:50:55
问题 I have the following stack trace and crash information after the Linux kernel failed to load: [ 3.684670] ------------[ cut here ]------------ [ 3.695507] Bad FPU state detected at fpu__clear+0x91/0xc2, reinitializing FPU registers. [ 3.695508] traps: No user code available. [ 3.704745] invalid opcode: 0000 [#1] PREEMPT [ 3.715304] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.50-android-x86-geeb7e76-dirty #1 [ 3.724594] Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM21 09/01/2017 [ 3

cannot understand this “message sequence mismatch error”

本小妞迷上赌 提交于 2021-01-27 11:50:38
问题 I've used the program answered in this link with some modifications. Below is my modified code: #include <linux/netlink.h> #include <netlink/netlink.h> #include <netlink/route/qdisc.h> #include <netlink/route/qdisc/plug.h> #include <netlink/socket.h> #include <atomic> #include <csignal> #include <iostream> #include <stdexcept> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <thread> #include <queue> #include <chrono> /** * Netlink route socket. */ struct Socket {

What is “Code” in Linux Kernel crash messages?

半腔热情 提交于 2021-01-27 11:49:25
问题 I have the following stack trace and crash information after the Linux kernel failed to load: [ 3.684670] ------------[ cut here ]------------ [ 3.695507] Bad FPU state detected at fpu__clear+0x91/0xc2, reinitializing FPU registers. [ 3.695508] traps: No user code available. [ 3.704745] invalid opcode: 0000 [#1] PREEMPT [ 3.715304] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.50-android-x86-geeb7e76-dirty #1 [ 3.724594] Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM21 09/01/2017 [ 3

What is “Code” in Linux Kernel crash messages?

假如想象 提交于 2021-01-27 11:47:52
问题 I have the following stack trace and crash information after the Linux kernel failed to load: [ 3.684670] ------------[ cut here ]------------ [ 3.695507] Bad FPU state detected at fpu__clear+0x91/0xc2, reinitializing FPU registers. [ 3.695508] traps: No user code available. [ 3.704745] invalid opcode: 0000 [#1] PREEMPT [ 3.715304] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.50-android-x86-geeb7e76-dirty #1 [ 3.724594] Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM21 09/01/2017 [ 3

LInux Kernel API to find the vma corresponds to a virtual address

三世轮回 提交于 2021-01-27 10:29:25
问题 Is there any Kernel API to find the VMA corresponds to virtual address? Example : if a have an address 0x13000 i need some function like below struct vm_area_struct *vma = vma_corresponds_to (0x13000,task); 回答1: You're looking for find_vma in linux/mm.h . /* Look up the first VMA which satisfies addr < vm_end, NULL if none. */ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr); This should do the trick: struct vm_area_struct *vma = find_vma(task->mm, 0x13000);

How to enable CONFIG_PREEMPT option in Linux kernel?

我与影子孤独终老i 提交于 2021-01-27 06:48:38
问题 I am new bee in Linux kernel programming, trying to work with an old kernel Linux 2.6.32 on x86_64. I want to enable the CONFIG_PREEMPT option in it but can not find information about how can I do it. I can compile a new kernel with my preferred options, but do not know what I need to do in this case. So can anyone please tell me How can I enable CONFIG_PREEMPT option? Do I need to recompile the kernel again with new menuconfig? In that case which option is responsible for CONFIG_PREEMPT? I

How to check whether SMP is enabled or disabled in the kernel?

安稳与你 提交于 2021-01-27 04:52:05
问题 I was wondering how can I check on my running machine, whether the kernel is configured for SMP or not? Of course, I can look into the kernel .config file and can search for it. But, the question is let's say I don't have a source code, how will I check the SMP configuration? Is there any proc file to check it? The following says that I have no multi-cores: #cat /proc/cpuinfo processor : 1 cpu model : Broadcom BMIPS5000 V1.1 FPU V0.1 BogoMIPS : 651.26 cpu MHz : 1305.018 wait instruction : yes

How to check whether SMP is enabled or disabled in the kernel?

江枫思渺然 提交于 2021-01-27 04:50:36
问题 I was wondering how can I check on my running machine, whether the kernel is configured for SMP or not? Of course, I can look into the kernel .config file and can search for it. But, the question is let's say I don't have a source code, how will I check the SMP configuration? Is there any proc file to check it? The following says that I have no multi-cores: #cat /proc/cpuinfo processor : 1 cpu model : Broadcom BMIPS5000 V1.1 FPU V0.1 BogoMIPS : 651.26 cpu MHz : 1305.018 wait instruction : yes

How to check whether SMP is enabled or disabled in the kernel?

狂风中的少年 提交于 2021-01-27 04:49:19
问题 I was wondering how can I check on my running machine, whether the kernel is configured for SMP or not? Of course, I can look into the kernel .config file and can search for it. But, the question is let's say I don't have a source code, how will I check the SMP configuration? Is there any proc file to check it? The following says that I have no multi-cores: #cat /proc/cpuinfo processor : 1 cpu model : Broadcom BMIPS5000 V1.1 FPU V0.1 BogoMIPS : 651.26 cpu MHz : 1305.018 wait instruction : yes

in linux kernel, asm or asm-generic?

ぃ、小莉子 提交于 2021-01-26 22:51:46
问题 in mm/memory.c, it includes one file: #include <asm/tlb.h> the tlb.h is include/asm-generic/tlb.h or arch/arm/include/asm/tlb.h ? 回答1: If necessary, header files in arch/arm/include/asm , will include the corresponding header file in include/asm-generic . So in this instance, tlb.h is arch/arm/include/asm/tlb.h . And if necessary, it will include include/asm-generic/tlb.h . You can verify this by running the following command: # The memory.s target creates the assembly file for memory.c make