Meaning of "(OF)" or "(OF+)" in linux kernel crash report - linux-kernel

I am trying to know the meaning of these symbols i.e "(OF)" or "(OF)+" specified along with module name in Linux kernel trace. Can some one help to understand this as i am unable to find anything about this online.
Here is the trace i got.
general protection fault: 0000 [#1]
Modules linked in: cxgb4(OF+) toecore(OF) ip6table_filter ip6_tables
ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack
.....
....
CPU: 5 PID: 15240 Comm: modprobe Tainted: GF O 3.11.10 #1
Hardware name: Supermicro X9DRD-iF/LF/X9DRD-iF, BIOS 3.0b 12/05/2013
task: ffff88046c1660c0 ti: ffff88045f4da000 task.ti: ffff88045f4da000
RIP: 0010:[<ffffffff812674aa>] [<ffffffff812674aa>]
kobject_uevent_env+0x5a/0x5e0
...
Thanks a lot.

'P' - Proprietary module has been loaded.
'F' - Module has been forcibly loaded.
'S' - SMP with CPUs not designed for SMP.
'R' - User forced a module unload.
'M' - System experienced a machine check exception.
'B' - System has hit bad_page.
'U' - Userspace-defined naughtiness.
'D' - Kernel has oopsed before
'A' - ACPI table overridden.
'W' - Taint on warning.
'C' - modules from drivers/staging are loaded.
'I' - Working around severe firmware bug.
'O' - Out-of-tree module has been loaded.
'+' - Module is being loaded, probably running module_init
'-' - Module is being unloaded (state is set only after module_exit returns)
Sources:
Documentation/oops-tracing.txt
kernel/module.c
include/linux/module.h
kernel/panic.c

Related

usb Mass Storage driver for am335x

i want to loard a usb drive storage module so i make when i load usb mass storage module the usb drive detect in /media or /dev/sda1
I have one customized bord using an am335x processor and this board has one USB port(for USB drive connector) and one micro USB port. and also have kernel source code and version is 4.4.16 now i follow the command to compile kernel source code
make distclean CROSS_COMPILE=arm-linux-gnueabihf-
make am335x_fujitel_defconfig CROSS_COMPILE=arm-linux-gnueabihf-
note= am335x_fujitel_defconfig is my edited defconfig file according to my bord and after that type
make menuconfig
The reason is I want to make module of USB storage driver so i can install module first to connect my usb drive to the device
so i follow this link https://processors.wiki.ti.com/index.php/Usbgeneralpage#Mass_Storage_Gadget as reference
and changes some driver configurations.
I found that when i uncheck
< > Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)
MUSB Mode Selection (Dual Role mode) --->
my usb drive not work on my device so I make module 'm' for Inventra Highspeed Dual Role Controller and generate musb-hdrc.ko file
I load new zImage and /lib/module/4/4/16 to my board and found .ko file in /lib... directory
root#arm:~# ls /lib/modules/4.4.16/kernel/drivers/usb/musb/musb_hdrc.ko
Now run "modprobe musb-hdrc" command and write "musb_hdrc" vi /etc/modules-load.d/modules.conf
above command run successfully and not see any error
after that reboot, the board run "lsmod" command to the sure module is load or not
root#arm:~# lsmod
Module Size Used by Not tainted
bridge 87777 0
stp 2111 1 bridge
llc 5184 2 bridge,stp
usb_f_rndis 21887 2
usb_f_ecm 9211 2
u_ether 11816 2 usb_f_rndis,usb_f_ecm
libcomposite 42715 16 usb_f_rndis,usb_f_ecm
omap_sham 22202 0
omap_aes_driver 19511 0
omap_rng 4212 0
rng_core 7198 1 omap_rng
musb_hdrc 78777 0
musb_hdrc load is successful.BUT when I connect my USB drive to USB port my USB drive not mount in /media also not show me at /dev why ?? am I missing something ?? also i check Kconfig file
config USB_MUSB_HDRC
tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)'
depends on (USB || USB_GADGET)
help
Say Y here if your system has a dual role high speed USB
controller based on the Mentor Graphics silicon IP. Then
configure options to match your silicon and the board
it's being used with, including the USB peripheral role,
or the USB host role, or both.
Texas Instruments families using this IP include DaVinci
(35x, 644x ...), OMAP 243x, OMAP 3, and TUSB 6010.
Analog Devices parts using this IP include Blackfin BF54x,
BF525 and BF527.
Allwinner SoCs using this IP include A10, A13, A20, ...
If you do not know what this is, please say N.
To compile this driver as a module, choose M here; the
module will be called "musb-hdrc".
So after exploring many things, I found that when I mark 'm' in Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...) there are two another support which automatically goes to < > like
<M> Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)
MUSB Mode Selection (Dual Role mode) --->
*** Platform Glue Layer ***
< > OMAP2430 and onwards
< > AM35x
< > TI DSPS platforms
*** MUSB DMA mode ***
[ ] Disable DMA (always use PIO)
Here I forgot to notice that TI DSPS platforms and Disable DMA also goes to empty(< >) automatically when I select Inventra Highspeed Dual Role Controller. so I also check TI DSPS platforms and <*> for Disable DMA and then cross compile kernel and modules again
Now after when my board boot up successfully I see 3 new modules
root#arm:~# ls /lib/modules/4.4.16/kernel/drivers/usb/musb/musb_
musb_am335x.ko musb_dsps.ko musb_hdrc.ko
Then type lsmod command
root#arm:~# lsmod
Module Size Used by Not tainted
bridge 87777 0
stp 2111 1 bridge
llc 5184 2 bridge,stp
usb_f_rndis 21887 2
usb_f_ecm 9211 2
u_ether 11816 2 usb_f_rndis,usb_f_ecm
libcomposite 42715 16 usb_f_rndis,usb_f_ecm
musb_dsps 9418 0
musb_hdrc 72752 1 musb_dsps
omap_aes_driver 19511 0
omap_sham 22202 0
omap_rng 4212 0
rng_core 7198 1 omap_rng
musb_am335x 1547 0 [permanent]
and I successfully connect my USB drive to device which detect in /media location
But I am surprised here how to Musb_* module load automatically? I can't understand also when i remove am335x from /lib directory, all musb* module remove automatically
So how do I solve this automatically load module issue? anyone help me

How can I configure yocto to compile linaro eglibc for kernel 3.10.0

I'm working on a bsp layer for SBC Pine64 and my image is successfully generated but I'm getting "FATAL: kernel too old" when booting init
from busybox. I've checked my busybox binary and it's being compiled for kernel 3.14.0.
My kernel is version 3.10 and I've used Linaro 5.3 toolchain. I've tried adding: OLDEST_KERNEL = "3.10.0" and I've also tried using Linaro 4.9 but I
still get the same error. I'm using yocto Krogoth and generating core-image-minial. Please, see below a snip of the error from boot log:
[13.068932] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[13.086717] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[13.112988] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[13.127040] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[13.143393] devtmpfs: mounted
[13.151972] Freeing unused kernel memory: 520K (ffffffc0009e4000 - ffffffc000a66000)
FATAL: kernel too old
[13.198566] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[13.198566]
[13.218884] CPU: 2 PID: 1 Comm: init Not tainted 3.10.102-pine64 #1
[13.230876] Call trace:
How can I configure yocto to compile linaro eglibc for kernel 3.10.0?
Thx,
Montez
When you want to override an existing variable that is not "soft-assigned", which is to say does not use the ?= syntax but instead = syntax, you need to use one of the variables in OVERRIDES as part of changing the value. You can see how overrides work already as in conf/bitbake.conf we have:
##################################################################
# Kernel info.
##################################################################
OLDEST_KERNEL = "3.2.0"
OLDEST_KERNEL_aarch64 = "3.14"
OLDEST_KERNEL_nios2 = "3.19"
And aarch64 is already found in your overrides list. Fortunately there are other values in that list, and when evaluating variables the ones later in the list in OVERRIDES take precedence. So in your local.conf you can do:
OLDEST_KERNEL_forcevariable = "3.10"
And then confirm that it has taken effect:
$ bitbake -e busybox | grep -E ^OLDEST_KERNEL=
OLDEST_KERNEL="3.10"

What does "kernel tainted" mean?

My OS is Fedora 17. Recently, kernel tainted warning "kernel bug at kernel/auditsc.c:1772!-abrt" occurs:
This problem should not be reported (it is likely a known problem). A kernel problem occurred, but your kernel has been tainted (flags:GD). Kernel maintainers are unable to diagnose tainted reports.
Then, I get the following:
# cat /proc/sys/kernel/tainted
128
# dmesg | grep -i taint
[ 8306.955523] Pid: 4511, comm: chrome Tainted: G D 3.9.10-100.fc17.i686.PAE #1 Dell Inc.
[ 8307.366310] Pid: 4571, comm: chrome Tainted: G D 3.9.10-100.fc17.i686.PAE #1 Dell Inc.
It seems that the value "128" is much serious:
128 – The system has died.
How about this warning? Since chrome is flagged as the "Tainted" source, anybody also meet this matter?
To (over) simplify, 'tainted' means that the kernel is in a state other than what it would be in if it were built fresh from the open source origin and used in a way that it had been intended. It is a way of flagging a kernel to warn people (e.g., developers) that there may be unknown reasons for it to be unreliable, and that debugging it may be difficult or impossible.
In this case, 'GD' means that all modules are licensed as GPL or compatible (ie not proprietary), and that a crash or BUG() occurred.
The reasons are listed below:
See: oops-tracing.txt
---------------------------------------------------------------------------
Tainted kernels:
Some oops reports contain the string 'Tainted: ' after the program
counter. This indicates that the kernel has been tainted by some
mechanism. The string is followed by a series of position-sensitive
characters, each representing a particular tainted value.
1: 'G' if all modules loaded have a GPL or compatible license, 'P' if
any proprietary module has been loaded. Modules without a
MODULE_LICENSE or with a MODULE_LICENSE that is not recognised by
insmod as GPL compatible are assumed to be proprietary.
2: 'F' if any module was force loaded by "insmod -f", ' ' if all
modules were loaded normally.
3: 'S' if the oops occurred on an SMP kernel running on hardware that
hasn't been certified as safe to run multiprocessor.
Currently this occurs only on various Athlons that are not
SMP capable.
4: 'R' if a module was force unloaded by "rmmod -f", ' ' if all
modules were unloaded normally.
5: 'M' if any processor has reported a Machine Check Exception,
' ' if no Machine Check Exceptions have occurred.
6: 'B' if a page-release function has found a bad page reference or
some unexpected page flags.
7: 'U' if a user or user application specifically requested that the
Tainted flag be set, ' ' otherwise.
8: 'D' if the kernel has died recently, i.e. there was an OOPS or BUG.
9: 'A' if the ACPI table has been overridden.
10: 'W' if a warning has previously been issued by the kernel.
(Though some warnings may set more specific taint flags.)
11: 'C' if a staging driver has been loaded.
12: 'I' if the kernel is working around a severe bug in the platform
firmware (BIOS or similar).
13: 'O' if an externally-built ("out-of-tree") module has been loaded.
14: 'E' if an unsigned module has been loaded in a kernel supporting
module signature.
15: 'L' if a soft lockup has previously occurred on the system.
16: 'K' if the kernel has been live patched.
The primary reason for the 'Tainted: ' string is to tell kernel
debuggers if this is a clean kernel or if anything unusual has
occurred. Tainting is permanent: even if an offending module is
unloaded, the tainted value remains to indicate that the kernel is not
trustworthy.
Also showing numbers for the content of /proc/sys/kernel/tainted file:
Non-zero if the kernel has been tainted. Numeric values, which can be
ORed together. The letters are seen in "Tainted" line of Oops reports.
1 (P): A module with a non-GPL license has been loaded, this
includes modules with no license.
Set by modutils >= 2.4.9 and module-init-tools.
2 (F): A module was force loaded by insmod -f.
Set by modutils >= 2.4.9 and module-init-tools.
4 (S): Unsafe SMP processors: SMP with CPUs not designed for SMP.
8 (R): A module was forcibly unloaded from the system by rmmod -f.
16 (M): A hardware machine check error occurred on the system.
32 (B): A bad page was discovered on the system.
64 (U): The user has asked that the system be marked "tainted". This
could be because they are running software that directly modifies
the hardware, or for other reasons.
128 (D): The system has died.
256 (A): The ACPI DSDT has been overridden with one supplied by the user
instead of using the one provided by the hardware.
512 (W): A kernel warning has occurred.
1024 (C): A module from drivers/staging was loaded.
2048 (I): The system is working around a severe firmware bug.
4096 (O): An out-of-tree module has been loaded.
8192 (E): An unsigned module has been loaded in a kernel supporting module
signature.
16384 (L): A soft lockup has previously occurred on the system.
32768 (K): The kernel has been live patched.
65536 (X): Auxiliary taint, defined and used by for distros.
131072 (T): The kernel was built with the struct randomization plugin.
Source: https://www.kernel.org/doc/Documentation/sysctl/kernel.txt
Credit: https://askubuntu.com/questions/248470/what-does-the-kernel-taint-value-mean

Kernel not booting in armada 370 board

I am using customized armada 370 board based on ARMv7.
I am able to successfully load the u-boot. But when loaded the linux kernel through "loadb command" directly into DRAM, i am getting below error.
Error:-
########################################
[    0.400000] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
[    0.400000] Internal error: : 1406 [#1] PREEMPT
[    0.400000] last sysfs file:
[    0.400000] Modules linked in:
[    0.400000] CPU: 0    Not tainted  (2.6.34.10-WR4.3.0.0_standard #73)
[    0.400000] PC is at trace_hardirqs_on+0x0/0x10
[    0.400000] LR is at kernel_thread_helper+0x4/0x14
########################################
Below is the specification at which board is running.
CPU freq - 1000MHz
DDR & L2 cache freq - 667MHz
I am using DDR3 SDRAM
I am using linux kernel 2.6.34 marvel armada370 package from Windriver Linux.
I tried booting the same kernel image in the marvel reference board and it is working fine.
I read in some article, this errors are related to RAM.
But in u-boot, i am able to do successfull read and write operations.
I analysed the log and i found that the value 0x1406 specifies the Data fault status register.
In this article, i decoded the value and the error is pointing to AXI slave read error.
Can you help why i am getting this error.
Thanks in advance.
Thanks & Regards
Shamshad

Linux debugging with Jtag - [ARM9][AT91SAM9G25] - Amontec, openocd, gdb, eclipse

I'm trying to start kernel debugging with this sytem:
Amontec JTAGkey2, openocd, gdb, eclipse.
At the end I would like to debug kernel and application that is running within.
I have few problems, and it seems that I need to solve them sequently.
Now I have CPU suspend/resume, read/write RAM
What is missing: Step into, Step over, C/C++ Level debugging.
I do following:
- Connect JTAG, Power up board, start uImage with Debug messages via Uboot
- start openocd:
# openocd -f /usr/share/openocd/scripts/interface/jtagkey2.cfg -f /usr/share/openocd/scripts/board/at91sam9g20-ek.cfg
Output:
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
RCLK - adaptive
TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr
---|--------------------|---------|------------|------------|------|------|------|---------
0 | at91sam9g20.cpu | Y | 0x00000000 | 0x0792603f | 0x04 | 0x01 | 0x0f | 0x0f
Info : max TCK change to: 30000 kHz
Info : RCLK (adaptive clock speed)
Info : JTAG tap: at91sam9g20.cpu tap/device found: 0x0792603f (mfg: 0x01f, part: 0x7926, ver: 0x0)
Info : Embedded ICE version 6
And problems starts here:
openocd:
Warn : acknowledgment received, but no packet pending
undefined debug reason 6 - target needs reset
Warn : target not halted
eclipse:
symbol-file /opt/Tixi_Repos/KiwiG6v2/buildroot-2011.05/package_tixi/linux-2.6.39/arch/arm/boot/compressed/vmlinux
target remote localhost:3333
start () at arch/arm/boot/compressed/head.S:108
108 kphex r5, 8 /* end of kernel */
It seems also that JTAG is trying to load the code into 0x0, what is incorrect I suppose:
Update 1:
After analyzing some online tutorials for ARM:
Eclipse Reset and Halt commands doesn't work perfect. It is better to uncheck them and write into command window. Also load address can be add:
monitor halt
load arch/arm/boot/compressed/vmlinux 0x22000000
I don't use
monitor reset
I let Uboot start and initialize RAM and other peripherals. Then I stop Uboot by getting into shell. Then I let eclipse write linux into RAM, and start it. It takes very long, but works bit better. Kernel starts and stopps on RPC initialization without giving console back.
would it be possible to load kernel into RAM within Uboot console, and start JTAG session afterwards ?
What is the difference between [load ...] and [monitor load...] commands
Why do I need to load /compressed/vmlinux instead of uImage ?
in eclipse window I have two load fields: load image i load symbol. I disable both options but write only load arch/arm/boot/compressed/vmlinux 0x22000000. Is it maybe the reason for next problems ?
Update 2:
Ok. Thank you for hints.
I've made some progress. Could you give me some advices, maybe I'm still doing something wrong.
Now my kernel runs under JTAG control, but I still can't debug on source code level.
I do as follows:
Power up the board, go into uboot shell.
start openOCD session
Set Uboot breakpoint in bootm.c on theKernel call:
cleanup_before_linux ();
theKernel (0, machid, bd->bi_boot_params);
start eclipse debug session :
monitor halt
load uboot-a without offset
load u-boot-2010.06/u-boot
Loading section .text, size 0x349ec lma 0x26f00000
start uboot and let it run
uboot stopps on "theKernel" call
I know that kernel is located on address 0x20008000.
restart openOCD session
start ecipse debugger once more with kernel configuration:
monitor halt
load kernel on address 0x20008000
load arch/arm/boot/compressed/vmlinux 0x20008000
Loading section .text, size 0x8bdc7c lma 0x20008000
start debugg session
Everything works fine now, and kernel starts, but I still can't debug on source code level.
"symbol is not available"
DEBUG and DEBUG_INFO are on for kernel.
vmlinux screenshot
What seems starnge for me that there are around 50 function symbols in this file.

Resources