From: David Mosberger <davidm@napali.hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Re: gas generates incorrect ia64 unwind rlen values
Date: Thu, 19 Dec 2002 20:19:18 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805617@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590709805569@msgid-missing>
>>>>> On Tue, 17 Dec 2002 08:33:38 -0800, "Patil, Harish" <harish.patil@intel.com> said:
Harish> I have a RHAS kernel compiled with *gcc3.2*. Using a script
Harish> based on readelf/objdmp I found out that there are 7
Harish> instances in this kernel where 'rlen' may be wrong. The
Harish> invariant the script is looking for is this: Sum(rlen for
Harish> various regions) = Number of slots in the code range.
Harish> The script found following violations of the invariant:
Harish> <ia64_trace_syscall>:
Harish> <ia64_ret_from_clone>:
Harish> <ia64_prepare_handle_unaligned>:
Harish> <ia32_ret_from_clone>:
Harish> <memset>:
Harish> <memcpy>:
These are all handwritten assembly routines. I think I see what's wrong:
(a) for the first 4 routines, note how they all start with an empty
prologue (e.g., PT_REGS_UNWIND_INFO(0)); these empty prologues
seem to cause gas to not count the "nop"s at the beginning of the
code. Or perhaps gas never counts the starting "nop"s and this is
just one of the places where the first instruction cannot go into
the first slot of a bundle.
(b) for memcpy and memset, I suspect the ".align 32" directives are
confusing gas
(a) is probably a bug in gas. For (b), gas can't guarantee much
because (in general) it can't know the alignment of the first
instruction of a procedure (not beyond the minimum of 16 bytes). We
should fix the assembly source here (use label_state/copy_state around
the .align directives, or get rid of them alltogether). One thing we
could do in gas, however, is add a warning so that a programmer will
know when s/he accidentally uses a .align directive inside a region.
Harish> code_range= 0xe000000004b18000-0xe000000004b182b0
Harish> lo = 4B18000 hi = 4B182B0
Harish> sum_rlen = 130 no_slots = 129
Harish> *******ERROR ***********
Harish> sum_rlen: 130 != no_slots:129
Do you know what code this is? The addresses are not terribly useful
because they'll vary from one kernel to another.
Is your script fully automatic? If so, perhaps we could add it to the
kernel sources and run it as part of "make check". I'd love to have
better unwind-info checking tools. Actually, it's even more important
to use such tools to verify the correctness of the user-level unwind
info.
Someone wants to volunteer to fix this stuff?
--david
next prev parent reply other threads:[~2002-12-19 20:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-16 9:00 [Linux-ia64] Re: gas generates incorrect ia64 unwind rlen values Keith Owens
2002-12-16 22:12 ` Keith Owens
2002-12-16 22:12 ` David Mosberger
2002-12-16 22:16 ` David Mosberger
2002-12-16 23:10 ` Jim Wilson
2002-12-17 2:34 ` Keith Owens
2002-12-17 2:51 ` David Mosberger
2002-12-17 3:19 ` David Mosberger
2002-12-17 3:20 ` Keith Owens
2002-12-17 3:25 ` David Mosberger
2002-12-17 3:43 ` Keith Owens
2002-12-17 16:33 ` Patil, Harish
2002-12-19 20:19 ` David Mosberger [this message]
2002-12-20 1:46 ` [Linux-ia64] Re: gas generates incorrect ia64 unwind rlen val Patil, Harish
2003-01-18 2:30 ` David Mosberger
2003-03-07 22:28 ` [Linux-ia64] Re: gas generates incorrect ia64 unwind rlen val ues Bjorn Helgaas
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=marc-linux-ia64-105590709805617@msgid-missing \
--to=davidm@napali.hpl.hp.com \
--cc=linux-ia64@vger.kernel.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