From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755104AbaKERNN (ORCPT ); Wed, 5 Nov 2014 12:13:13 -0500 Received: from mail.emea.novell.com ([130.57.118.101]:46160 "EHLO mail.emea.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753303AbaKERNL convert rfc822-to-8bit (ORCPT ); Wed, 5 Nov 2014 12:13:11 -0500 Message-Id: <545A5AA402000078000C1067@mail.emea.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.1 Date: Wed, 05 Nov 2014 17:13:08 +0000 From: "Jan Beulich" To: , , , Cc: , Subject: Re: [PATCH, RFC] x86: also CFI-annotate certain inline asm()s References: <5458A9600200007800044AE5@mail.emea.novell.com> <54592BB4.4040703@amacapital.net> In-Reply-To: <54592BB4.4040703@amacapital.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> Andy Lutomirski 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