From: David Smith <dsmith@redhat.com>
To: Adam Guderski <a.guderski@gmail.com>, systemtap@sourceware.org
Subject: Re: Problem with vfs probe on Proxmox kernel
Date: Thu, 26 Jan 2017 22:41:00 -0000 [thread overview]
Message-ID: <ce3c76c8-da30-9c17-8abd-7e5e96f6c44c@redhat.com> (raw)
In-Reply-To: <3ef01dd5-79e9-8cfd-26b0-6be57a29fb51@gmail.com>
On 01/26/2017 03:51 PM, Adam Guderski wrote:
> On 26/01/17 22:34, David Smith wrote:
>> On 01/26/2017 03:26 PM, Adam Guderski wrote:
>>
>> ... stuff deleted ...
>>
>>>> Based on the paths stored when compiling your kernel, systemtap is
>>>> looking for the vmlinux file in '/lib/modules/4.4.35-2-pve/build/'.
>>>> Obviously it isn't there. Can you search around and see if you can find
>>>> it and link it to its proper place?
>>>
>>> I can't find it (find / -type f -name '*vmlinux*'). When I compiled from
>>> source, I noticed this lines in Makefile for Proxmox VE kernel:
>>>
>>> # strip debug info
>>> find tmp/lib/modules -name \*.ko -print | while read f ; do strip
>>> --strip-debug "$$f"; done
>>>
>>> I thought that when I comment this out my kernel will have debug info
>>> compiled into it.
>>
>> That line you commented out is stripping debuginfo from kernel modules
>> (*.ko), not the kernel itself.
>>
>>> Interestingly, the config file for my kernel says that
>>> CONFIG_DEBUG_INFO is enabled:
>>>
>>> # grep DEBUG_INFO /boot/config-4.4.35-2-pve
>>> CONFIG_DEBUG_INFO=y
>>> # CONFIG_DEBUG_INFO_REDUCED is not set
>>> # CONFIG_DEBUG_INFO_SPLIT is not set
>>> CONFIG_DEBUG_INFO_DWARF4=y
I doubt this will make a difference, but CONFIG_DEBUG_INFO_DWARF4 isn't
usually set on the kernels we use. See
<https://sourceware.org/systemtap/wiki/SystemTapWithSelfBuiltKernel>.
>> I'd guess you missed another line in the Proxmox kernel Makefile where
>> it strips debuginfo from the kernel itself.
>>
>> What does "file" say on the kernel you built?
>
> It says:
>
> # file /boot/vmlinuz-4.4.35-2-pve
> /boot/vmlinuz-4.4.35-2-pve: Linux kernel x86 boot executable bzImage,
> version 4.4.35-2-pve (root@pve-test) #1 SMP Sun Jan 22 00:59:19 CET 201,
> RO-rootFS, swap_dev 0x6, Normal VGA
>
> While looking for the vmlinux file, I found a script that (I think)
> uncompresses a compressed kernel, so I did some testing:
>
> # /usr/src/linux-headers-4.4.35-2-pve/scripts/extract-vmlinux
> /boot/vmlinuz-4.4.35-2-pve > vmlinux
> # file vmlinux
> vmlinux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically
> linked, BuildID[sha1]=c23f97de3c8765073fbecf0b529383f1305c8e81, stripped
>
> So yes, this appears that the kernel I compiled is still stripped, so I
> missed something, I'll give it another look but the documentation is
> sparse and I don't see another strip command in it. If you wonder how
> this Makefile looks like, it's here:
> https://git.proxmox.com/?p=pve-kernel.git;a=blob_plain;f=Makefile;hb=HEAD
>
> Best regards and many thanks for your help.
I looked through that Makefile and I didn't see where the kernel gets
stripped either. You are going to have to dig deeper to find where
vmlinux gets deleted.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
next prev parent reply other threads:[~2017-01-26 22:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 22:44 Adam Guderski
2017-01-26 4:51 ` Arkady
2017-01-26 17:38 ` David Smith
2017-01-26 18:43 ` Adam Guderski
2017-01-26 19:05 ` David Smith
2017-01-26 21:27 ` Adam Guderski
2017-01-26 21:34 ` David Smith
2017-01-26 21:52 ` Adam Guderski
2017-01-26 22:41 ` David Smith [this message]
2017-01-27 2:04 ` Adam Guderski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce3c76c8-da30-9c17-8abd-7e5e96f6c44c@redhat.com \
--to=dsmith@redhat.com \
--cc=a.guderski@gmail.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).