lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20140814153312.GO2718@kernel.org> Date: Thu, 14 Aug 2014 12:33:12 -0300 From: Arnaldo Carvalho de Melo <acme@...nel.org> To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com> Cc: Jiri Olsa <jolsa@...hat.com>, Namhyung Kim <namhyung@...il.com>, David Ahern <dsahern@...il.com>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Subject: perf probe: request: Better message when no debug info is found on vmlinux Hi Masami, I was trying to figure out why sys_perf_event_open was returning EACCES when trying to record, as a non priviledged user, a 'ping' process started by this user, while it has no problem doing the same thing if the monitored process is 'sleep' (reusing of ptrace perms seems to be what is causing this, but I digress), when I stumbled in something annoying: [root@...andy ~]# perf probe -v -L icmp_rcv Looking at the vmlinux_path (6 entries long) Using /lib/modules/3.16.0+/build/vmlinux for symbols Failed to open debuginfo file. Error: Failed to show lines. (-2) [root@...andy ~]# Huh? Why? So I went to look to see why it was "failing to open debuginfo file": [root@...andy ~]# ls -la /lib/modules/3.16.0+/build/vmlinux -rwxrwxr-x. 3 acme acme 22505817 Aug 13 11:54 /lib/modules/3.16.0+/build/vmlinux [root@...andy ~]# ls -la /lib/modules/3.16.0+/build lrwxrwxrwx. 1 root root 29 Aug 13 12:10 /lib/modules/3.16.0+/build -> /home/acme/git/build/v3.16.0+ The file is there, but... I forgot I had disabled CONFIG_DEBUG_INFO on this machine: [root@...andy ~]# ls -la /lib/modules/3.16.0+/build/.config -rw-rw-r--. 1 acme acme 136217 Aug 13 11:40 /lib/modules/3.16.0+/build/.config [root@...andy ~]# grep CONFIG_DEBUG_INFO /lib/modules/3.16.0+/build/.config # CONFIG_DEBUG_INFO is not set [root@...andy ~]# So, only the CFI ELF section was there, not the other with the -g stuff: [root@...andy ~]# readelf -SW /lib/modules/3.16.0+/build/vmlinux | grep \.debug_ [29] .debug_frame PROGBITS 0000000000000000 1266030 0021d0 00 0 0 8 [root@...andy ~]# So, I suggest that we improve that error message to be more clear: [root@...andy ~]# perf probe -L icmp_rcv Failed to open debuginfo file. Error: The /lib/modules/3.16.0+/build/vmlinux file has no debugging information, rebuild with CONFIG_DEBUG_INFO=y [root@...andy ~]# Since it knows it is a kernel image file, and that the config option to enable it is CONFIG_DEBUG_INFO. Thanks, - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists