From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238AbdFAPCR (ORCPT ); Thu, 1 Jun 2017 11:02:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35032 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbdFAPCQ (ORCPT ); Thu, 1 Jun 2017 11:02:16 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E44E2448D82 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E44E2448D82 Date: Thu, 1 Jun 2017 10:02:14 -0500 From: Josh Poimboeuf To: Andy Lutomirski Cc: X86 ML , "linux-kernel@vger.kernel.org" , live-patching@vger.kernel.org, Linus Torvalds , Jiri Slaby , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra Subject: Re: [RFC PATCH 05/10] objtool, x86: add facility for asm code to provide CFI hints Message-ID: <20170601150214.x3lidkolgtvp5g5w@treble> References: <5ec63cefd2093152464b7bb1383938f6970e65eb.1496293620.git.jpoimboe@redhat.com> <20170601141659.yeh6enc5nc6z363s@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 01 Jun 2017 15:02:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 01, 2017 at 07:40:47AM -0700, Andy Lutomirski wrote: > On Thu, Jun 1, 2017 at 7:16 AM, Josh Poimboeuf wrote: > > On Thu, Jun 01, 2017 at 06:57:24AM -0700, Andy Lutomirski wrote: > >> On Wed, May 31, 2017 at 10:44 PM, Josh Poimboeuf wrote: > >> > Some asm (and inline asm) code does special things to the stack which > >> > objtool can't understand. (Nor can GCC or GNU assembler, for that > >> > matter.) In such cases we need a facility for the code to provide > >> > annotations, so the unwinder can unwind through it. > >> > > >> > This provides such a facility, in the form of CFI hints. They're > >> > similar to the GNU assembler .cfi* directives, but they give more > >> > information, and are needed in far fewer places, because objtool can > >> > fill in the blanks by following branches and adjusting the stack pointer > >> > for pushes and pops. > >> > >> Two minor suggestions: > >> > >> Could you prefix these with something other than "CFI_"? For those of > >> use who have read the binutils manual, using "CFI_" sounds awfully > >> like .cfi_, and people might expect the semantics to be the same. > > > > The intention was that even if this undwarf thing doesn't work out, the > > CFI_ macros could still be used by objtool to generate proper DWARF. > > Would prefixing them with CFI_HINT_ be better? Or UNWIND_HINT_? > > This has nothing to do with the data format or implementation. I > just think that "CFI_" suggests that they're semantically equivalent > to binutils' .cfi directives. If they're not, then maybe UNWIND_HINT > is better. Ok, I'll go with the UNWIND_HINT_ prefix. -- Josh