linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@suse.com>
To: <luto@amacapital.net>, <mingo@elte.hu>, <tglx@linutronix.de>,
	<hpa@zytor.com>
Cc: <tonyj@suse.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH, RFC] x86: also CFI-annotate certain inline asm()s
Date: Wed, 05 Nov 2014 17:13:08 +0000	[thread overview]
Message-ID: <545A5AA402000078000C1067@mail.emea.novell.com> (raw)
In-Reply-To: <54592BB4.4040703@amacapital.net>

>>> Andy Lutomirski <luto@amacapital.net> 11/04/14 8:40 PM >>>
>On 11/04/2014 01:24 AM, Jan Beulich wrote:
>> The main obstacle to having done this long ago was the need to
>> determine whether annotations are needed in the first place: They need
>> to be avoided when a frame pointer got set up. Since I can't see a way
>> to determine this before the compilation phase, this is being achieved
>> by inspecting the memory address generated by the compiler in an
>> interposed assembler macro. Of course this isn't really nice code, and
>> this the main reason I'm posting this as RFC only at this point (with
>> the hope that maybe someone has an idea of how to achieve the same
>> thing in a more elegant way).
>
>Ask binutils for help?

Binutils know as little about the code the compiler generated as we do.

>Is the issue that the CFI annotation you need is different depending on
>whether there's a frame pointer or not?

No - as said above, they need to be avoided altogether when there's a
frame pointer.

> If so, can you add some
>comments so that mere asm mortals have some prayer of understanding how
>your magic works and what the desired output annotations are in the
>various cases?

Honestly I have a hard time seeing where comments would help here. Plus
the difficult part isn't how the annotations look like, but (see above) simply
whether to emit them at all.

Jan



  reply	other threads:[~2014-11-05 17:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04  9:24 [PATCH, RFC] x86: also CFI-annotate certain inline asm()s Jan Beulich
2014-11-04 19:40 ` Andy Lutomirski
2014-11-05 17:13   ` Jan Beulich [this message]
2014-11-05 17:23     ` Andy Lutomirski
2014-11-06 10:35       ` Jan Beulich
2014-11-06 17:00         ` Andy Lutomirski
2014-11-10 10:01 ` Ingo Molnar
     [not found]   ` <CA+55aFw9MV1n8T7_k5oftfY-sOu8s1ywKYM-3k4+PF022vv9ow@mail.gmail.com>
2014-11-10 18:10     ` Linus Torvalds
2014-11-11  7:52       ` Jan Beulich
2014-11-10 18:17     ` Ingo Molnar
2014-11-11  7:42     ` Jan Beulich
2014-11-12 20:36       ` Linus Torvalds
2014-11-13  7:49         ` Jan Beulich

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=545A5AA402000078000C1067@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=tonyj@suse.de \
    /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 NNTP newsgroup(s).