This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: interesting option of stap
Hi,
Someone from Linaro pointed me to a very recent commit on ARM kernel http://ftp.arm.linux.org.uk/git/gitweb.cgi?p=linux-2.6-arm.git;a=commitdiff;h=dc810efb0ca5702c9d with good comments.
Basically:
- --build-id option has been added in "Makefile" by Roland in 2007. ARM toolchain uses it but places section at 0
- as it was raising issues, problem was worked-around in ARM kernel through options of "objcopy" phase to remove the section. Still vmlinux contains it
- problem was reopened but not closed in 2010
- commit mentioned above uses correct fix:"place correctly notes section in the linker script"
+ the note:"...and to get it exposed as /sys/kernel/notes used by perf tools."
I guess this addresses all our findings.
Regards
Fred
Frederic Turgis
OMAP Platform Business Unit - OMAP System Engineering - Platform Enablement
Texas Instruments France SA, 821 Avenue Jack Kilby, 06270 Villeneuve Loubet. 036 420 040 R.C.S Antibes. Capital de EUR 753.920
-----Original Message-----
From: systemtap-owner@sourceware.org [mailto:systemtap-owner@sourceware.org] On Behalf Of Turgis, Frederic
Sent: Thursday, February 24, 2011 11:43 PM
To: Frank Ch. Eigler
Cc: Roland McGrath; William Cohen; systemtap@sourceware.org
Subject: RE: interesting option of stap
Hello,
Are you opening the defect yourself ?
By the way, I asked to Linaro guys about ARM .note-less kernel, I will come back to you if I get a good answer
Thanks for your help
Regards
Fred
Frederic Turgis
OMAP Platform Business Unit - OMAP System Engineering - Platform Enablement
Texas Instruments France SA, 821 Avenue Jack Kilby, 06270 Villeneuve Loubet. 036 420 040 R.C.S Antibes. Capital de EUR 753.920
-----Original Message-----
From: Frank Ch. Eigler [mailto:fche@redhat.com]
Sent: Wednesday, February 23, 2011 5:54 PM
To: Turgis, Frederic
Cc: Roland McGrath; William Cohen; systemtap@sourceware.org
Subject: Re: interesting option of stap
f-turgis wrote:
> [...] Hopefully I already digged some time ago in linker cmd file
> syntax and init call stuff so I am not 100% lost ;-). Here are my
> findings: [...]
Good job.
> - /sys/kernel/notes does not exist on these kernels. I found in all my
> kern els in .zImage.cmd "arm-linux-gnueabi-objcopy ... -R .note -R
> .note.gnu.build-id ... arch/arm/boot/compressed/vmlinux
> arch/arm/boot/zImage", -R being "Remove section xxx from the output".
> That could be why I don't see "notes" in the kernel.
Yes. Considering how small the .notes* are, it'd be reassuring to have them be present in the linked image for runtime verification.
> Well, digging further, I simply read again the code and I found:
> /* Don't save build-id if it is located before _stext.
> * This probably means that build-id will not be loaded at all and
> * happens for example with ARM kernel.
> *
> * See also:
> * http://sources.redhat.com/ml/systemtap/2009-q4/msg00574.html
> */
> if (build_id_len > 0 && (build_id_vaddr > base + extra_offset)) {
> [...] commit 66f65c4fb0ddcdf8a85a29662a23a546cfd5dffe [put the test
> in] [...] commit 155bb07a5bfdd16b112870f7064f012970b7fbd9 [took the
> test out]
OK. So as a .note-less kernel compatibility measure, a check-disabling kludge should be put back in, for kernels with a suspicious build_id_vaddr.
- FChE