mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@suse.com>
To: <mjw@redhat.com>
Cc: <fweisbec@gmail.com>, <x86@kernel.org>, <tglx@linutronix.de>,
	<ak@linux.intel.com>, <mingo@redhat.com>,
	<linux-kernel@vger.kernel.org>, <hpa@zytor.com>
Subject: Re: [PATCH] x86-64: Fix CFI data for common_interrupt
Date: Wed, 22 Feb 2012 08:05:35 +0000	[thread overview]
Message-ID: <4F44A1CF020000780007F637@nat28.tlf.novell.com> (raw)
In-Reply-To: <20120221220810.GE2590@toonder.wildebeest.org>

>>> Mark Wielaard <mjw@redhat.com> 02/21/12 11:08 PM >>>
>On Tue, Feb 21, 2012 at 03:26:30PM +0000, Jan Beulich wrote:
>> >>> On 21.02.12 at 15:43, Mark Wielaard <mjw@redhat.com> wrote:
>> > For DW_CFA_def_register DWARF4 explicitly says so: "This operation is
>> > valid only if the current CFA rule is defined to use a register and
>> > offset." So one needs to use CFI_DEF_CFA with both a register and an
>> > offset here after the def_cfa_expression.
>> 
>> Hmm, that's in contrast to the gas implementation (but I'd certainly
>> give the specification preference if it explicitly states so, so gas
>> should at least emit a warning here rather than considering this
>> valid).
>
>I am afraid gas cannot help us here. Since like you pointed out in your
>patch:
>
>This requires the use of .cfi_escape (allowing arbitrary byte
>streams to be emitted into .eh_frame), as there is no
>.cfi_def_cfa_expression (which also cannot reasonably be
>expected, as it would require a full expression parser).
>
>So we are on our own here.

Hmm, yes, probably it wouldn't be nice if gas reset all its state when
.cfi_escape is used.

>> But provided the specification mandates this, I'm okay with the change
>> in principle. Just that specifying an offset of 0 doesn't look right then.
>
>Yeah, I dunno what I was thinking. The offset should be set to the offset
>that was there before when rsi was pushed. The attached patch does that
>by using the same value as was used at the start of common_interrupt.
>Does that look OK?

I would have thought that it should be SS+8-RBP (as %rbp is at the top
of the stack at that point). I can't verify this immediately, though, as I'm
not in the office today.

Jan


  reply	other threads:[~2012-02-22  8:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21 14:06 Mark Wielaard
2012-02-21 14:26 ` Jan Beulich
2012-02-21 14:43   ` Mark Wielaard
2012-02-21 15:26     ` Jan Beulich
2012-02-21 22:08       ` Mark Wielaard
2012-02-22  8:05         ` Jan Beulich [this message]
2012-02-24  9:49         ` Jan Beulich
2012-02-24 10:32           ` Mark J. Wielaard
2012-02-27 12:08             ` [tip:x86/debug] x86-64: Fix CFI data for common_interrupt() tip-bot for Mark Wielaard

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=4F44A1CF020000780007F637@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=ak@linux.intel.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mjw@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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

all inboxes | Powered by JetHome®