mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
This problem was observed with a kernel built using clang and LTO. When the section header index of a section that contains mcount calls coincides with SHN_ABS, recordmcount ends up selecting a STT_FILE symbol as the base for mcount offset relocation. Since the STT_FILE symbol value is 0, it's not a suitable candidate as the base for relocation and results in the __mcount_loc table containing an invalid entry causing kernel oops in ftrace_init(): [ 0.000000] ftrace: allocating 45789 entries in 179 pages [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at arch/arm64/kernel/ftrace.c:172 ftrace_make_nop+0x11c/0x150 [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.4.69-0-1pre+ #1 [ 0.000000] Hardware name: BCM972180HB_V20 (DT) [ 0.000000] pstate: 20400085 (nzCv daIf +PAN -UAO) [ 0.000000] pc : ftrace_make_nop+0x11c/0x150 [ 0.000000] lr : ftrace_make_nop+0x5c/0x150 [ 0.000000] sp : ffffffc011a43ef0 [ 0.000000] x29: ffffffc011a43f00 x28: 0000000000000001 [ 0.000000] x27: ffffff8027801380 x26: 0000000000000000 [ 0.000000] x25: ffffff8027880008 x24: 0000000000000000 [ 0.000000] x23: 0000000000000000 x22: 0000000000000008 [ 0.000000] x21: ffffffc010f5acdc x20: 0000000000000000 [ 0.000000] x19: 0000000000000020 x18: ffffffc011a79020 [ 0.000000] x17: 000000000000003c x16: 0000000000000022 [ 0.000000] x15: dead000000000100 x14: 0000000000000001 [ 0.000000] x13: 0000000000000000 x12: 0000000000000000 [ 0.000000] x11: 0000000000000000 x10: 0000000008000000 [ 0.000000] x9 : 0000000000000002 x8 : 0000000000000001 [ 0.000000] x7 : 0000000000000000 x6 : 000000000000003f [ 0.000000] x5 : 00000000000235b8 x4 : 0000000000000001 [ 0.000000] x3 : 0000000000000001 x2 : ffffffc010f5acdc [ 0.000000] x1 : ffffff8027880000 x0 : 0000000000000001 [ 0.000000] Call trace: [ 0.000000] ftrace_make_nop+0x11c/0x150 [ 0.000000] ftrace_process_locs+0x338/0x3e0 [ 0.000000] ftrace_init+0xac/0xdc [ 0.000000] start_kernel+0x194/0x43c [ 0.000000] random: get_random_bytes called from __warn+0xe0/0x138 with crng_init=0 [ 0.000000] ---[ end trace a8999690c4edae16 ]--- [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:2008 ftrace_bug+0x94/0x268 [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Tainted: G W 5.4.69-0-1pre+ #1 [ 0.000000] Hardware name: BCM972180HB_V20 (DT) [ 0.000000] pstate: 60400085 (nZCv daIf +PAN -UAO) [ 0.000000] pc : ftrace_bug+0x94/0x268 [ 0.000000] lr : ftrace_process_locs+0x364/0x3e0 [ 0.000000] sp : ffffffc011a43ef0 [ 0.000000] x29: ffffffc011a43ef0 x28: 0000000000000001 [ 0.000000] x27: ffffff8027801380 x26: 0000000000000000 [ 0.000000] x25: ffffff8027880008 x24: 0000000000000000 [ 0.000000] x23: 0000000000000000 x22: 0000000000000008 [ 0.000000] x21: ffffffc010f5acdc x20: 0000000000000020 [ 0.000000] x19: ffffff8027880000 x18: ffffffc011a79020 [ 0.000000] x17: 000000000000003c x16: 0000000000000022 [ 0.000000] x15: dead000000000100 x14: 0000000000000001 [ 0.000000] x13: 0000000000000000 x12: ffffffc010f5ed94 [ 0.000000] x11: ffffffc011a4f000 x10: ffffffc011a4f000 [ 0.000000] x9 : 0000000000000001 x8 : ffffffc011a4f000 [ 0.000000] x7 : 0000000000000000 x6 : 000000000000003f [ 0.000000] x5 : 00000000000235b8 x4 : 0000000000000001 [ 0.000000] x3 : 0000000000000001 x2 : ffffffc010f5acdc [ 0.000000] x1 : ffffff8027880000 x0 : ffffffc01151ade2 [ 0.000000] Call trace: [ 0.000000] ftrace_bug+0x94/0x268 [ 0.000000] ftrace_process_locs+0x364/0x3e0 [ 0.000000] ftrace_init+0xac/0xdc [ 0.000000] start_kernel+0x194/0x43c [ 0.000000] ---[ end trace a8999690c4edae17 ]--- [ 0.000000] ftrace failed to modify [ 0.000000] [<0000000000000020>] 0x20 [ 0.000000] actual: [ 0.000000] Unable to handle kernel read from unreadable memory at virtual address 0000000000000020 [ 0.000000] Mem abort info: [ 0.000000] ESR = 0x96000005 [ 0.000000] EC = 0x25: DABT (current EL), IL = 32 bits [ 0.000000] SET = 0, FnV = 0 [ 0.000000] EA = 0, S1PTW = 0 [ 0.000000] Data abort info: [ 0.000000] ISV = 0, ISS = 0x00000005 [ 0.000000] CM = 0, WnR = 0 [ 0.000000] [0000000000000020] user address but active_mm is swapper [ 0.000000] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Tainted: G W 5.4.69-0-1pre+ #1 [ 0.000000] Hardware name: BCM972180HB_V20 (DT) [ 0.000000] pstate: 60400085 (nZCv daIf +PAN -UAO) [ 0.000000] pc : print_ip_ins+0x48/0x80 [ 0.000000] lr : print_ip_ins+0x2c/0x80 [ 0.000000] sp : ffffffc011a43eb0 [ 0.000000] x29: ffffffc011a43eb0 x28: 0000000000000001 [ 0.000000] x27: ffffff8027801380 x26: 0000000000000000 [ 0.000000] x25: ffffff8027880008 x24: 0000000000000000 [ 0.000000] x23: ffffffc0115f1abc x22: ffffffc01160e929 [ 0.000000] x21: 0000000000000000 x20: ffffffc011577a9c [ 0.000000] x19: 0000000000000020 x18: ffffffc011a79028 [ 0.000000] x17: 000000000000002c x16: ffffffc010f33fec [ 0.000000] x15: 0000000000000004 x14: ffff0000ffffff00 [ 0.000000] x13: 0000000000000000 x12: 0000000000000000 [ 0.000000] x11: 0000000000000000 x10: 00000000ffffffff [ 0.000000] x9 : 0000000000000000 x8 : 0000000000000000 [ 0.000000] x7 : 3030303030303030 x6 : ffffffc011c031a3 [ 0.000000] x5 : 000000000000000b x4 : ffffffc011c00866 [ 0.000000] x3 : 0000000000000020 x2 : 000000000000000b [ 0.000000] x1 : ffffffc011c00871 x0 : 000000000000000b [ 0.000000] Call trace: [ 0.000000] print_ip_ins+0x48/0x80 [ 0.000000] ftrace_bug+0xcc/0x268 [ 0.000000] ftrace_process_locs+0x364/0x3e0 [ 0.000000] ftrace_init+0xac/0xdc [ 0.000000] start_kernel+0x194/0x43c [ 0.000000] Code: aa1f03f5 9124a6d6 912af2f7 912a7294 (38756a62) [ 0.000000] ---[ end trace a8999690c4edae18 ]--- [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! This can be fixed by avoiding STT_FILE symbols as the base for mcount offset relocation. Bug: 168835511 Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com> Signed-off-by: Pierre Couillaud <pierre@broadcom.com> Change-Id: I9e73706d5104bfa81bccd091e956660364f294de |
||
| .. | ||
| atomic | ||
| basic | ||
| coccinelle | ||
| dtc | ||
| gcc-plugins | ||
| gdb | ||
| genksyms | ||
| kconfig | ||
| ksymoops | ||
| mod | ||
| package | ||
| selinux | ||
| tracing | ||
| .gitignore | ||
| adjust_autoksyms.sh | ||
| asn1_compiler.c | ||
| bin2c.c | ||
| bloat-o-meter | ||
| bootgraph.pl | ||
| bpf_helpers_doc.py | ||
| cc-can-link.sh | ||
| check_extable.sh | ||
| checkincludes.pl | ||
| checkkconfigsymbols.py | ||
| checkpatch.pl | ||
| checkstack.pl | ||
| checksyscalls.sh | ||
| checkversion.pl | ||
| clang-android.sh | ||
| clang-version.sh | ||
| cleanfile | ||
| cleanpatch | ||
| coccicheck | ||
| config | ||
| conmakehash.c | ||
| const_structs.checkpatch | ||
| decode_stacktrace.sh | ||
| decodecode | ||
| depmod.sh | ||
| diffconfig | ||
| documentation-file-ref-check | ||
| export_report.pl | ||
| extract-cert.c | ||
| extract-ikconfig | ||
| extract-module-sig.pl | ||
| extract-sys-certs.pl | ||
| extract-vmlinux | ||
| extract_xc3028.pl | ||
| faddr2line | ||
| file-size.sh | ||
| find-unused-docs.sh | ||
| gcc-goto.sh | ||
| gcc-ld | ||
| gcc-plugin.sh | ||
| gcc-version.sh | ||
| gcc-x86_32-has-stack-protector.sh | ||
| gcc-x86_64-has-stack-protector.sh | ||
| gen_autoksyms.sh | ||
| gen_compile_commands.py | ||
| gen_ksymdeps.sh | ||
| generate_initcall_order.pl | ||
| get_abi.pl | ||
| get_dvb_firmware | ||
| get_maintainer.pl | ||
| gfp-translate | ||
| headerdep.pl | ||
| headers_check.pl | ||
| headers_install.sh | ||
| insert-sys-cert.c | ||
| kallsyms.c | ||
| Kbuild.include | ||
| Kconfig.include | ||
| kernel-doc | ||
| ld-version.sh | ||
| leaking_addresses.pl | ||
| Lindent | ||
| link-vmlinux.sh | ||
| Makefile | ||
| Makefile.asm-generic | ||
| Makefile.build | ||
| Makefile.clean | ||
| Makefile.dtbinst | ||
| Makefile.extrawarn | ||
| Makefile.gcc-plugins | ||
| Makefile.headersinst | ||
| Makefile.host | ||
| Makefile.kasan | ||
| Makefile.kcov | ||
| Makefile.lib | ||
| Makefile.modbuiltin | ||
| Makefile.modfinal | ||
| Makefile.modinst | ||
| Makefile.modpost | ||
| Makefile.modsign | ||
| Makefile.package | ||
| Makefile.ubsan | ||
| makelst | ||
| markup_oops.pl | ||
| mkcompile_h | ||
| mkmakefile | ||
| mksysmap | ||
| mkuboot.sh | ||
| module-common.lds | ||
| module-lto.lds | ||
| modules-check.sh | ||
| namespace.pl | ||
| nsdeps | ||
| objdiff | ||
| parse-maintainers.pl | ||
| patch-kernel | ||
| pnmtologo.c | ||
| profile2linkerlist.pl | ||
| prune-kernel | ||
| recordmcount.c | ||
| recordmcount.h | ||
| recordmcount.pl | ||
| setlocalversion | ||
| show_delta | ||
| sign-file.c | ||
| sortextable.c | ||
| sortextable.h | ||
| spdxcheck-test.sh | ||
| spdxcheck.py | ||
| spelling.txt | ||
| sphinx-pre-install | ||
| split-man.pl | ||
| stackdelta | ||
| stackusage | ||
| subarch.include | ||
| tags.sh | ||
| tools-support-relr.sh | ||
| unifdef.c | ||
| ver_linux | ||
| xen-hypercalls.sh | ||
| xz_wrap.sh | ||