From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3E9DC28CC0 for ; Thu, 30 May 2019 23:14:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C6910262FD for ; Thu, 30 May 2019 23:14:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DnhOnhof"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="jBLwuMjb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6910262FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MbOHgIsqzdUDjarrP8vMZXj52h+pK8lk2Gb8IPamifc=; b=DnhOnhofeCUtPt aU+eSuziWLTX4xK1+19VvSCcSe+4v7+8ji/5t4qiCaB1ObTj8TX6OjTQE/R/CbCyiVWmzhz1gE5UX f5bnJ0R+6i4eH0muXV4w9CKR9vjWqAgZT55WFhpMjgUpxz+0CPOw3upq5KgELgUI8azVE+AkTpKqi ZHhwPjRkWYDyMBzFoHXt8u9O+HAzZ6gwcfLvNdnZ1CRXapQ/10cgFv6hPr2uNFTtM1ZOGPjub1znW l+0dWCt6JldRYvHA3j0cfPLLJrDEKXsAy9T4Yfezjov9DYfp7jVdeAlLXjytCAvYPXbDNoTAFGeFw xMl22mrwAsPqLHbge4pA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hWUFk-0006RF-71; Thu, 30 May 2019 23:14:32 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hWUFg-0006Qg-Sz for linux-arm-kernel@lists.infradead.org; Thu, 30 May 2019 23:14:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XMtokYBuXFzIrBfx9/5SjcHYThm21r8rc5PsXoMbxPI=; b=jBLwuMjbqoKB4zmyB2KzNL6+y ylTMc8hZngSJdSnQ+AYe8kDj65u1XdWuPZFyVICELCBIwm9C3jeliyRUhFf6hd862wh1cu+mPnEBD mFiUvziZIBGMivraHnUBkXqduHl8o8mXHhsvNXIlM0B347+v4UD88cezi5XknI9TxMn51+Jo37EHk k9i+xPGNaxlVS+WoPUUS5iAzL+tlCnIxON2/G9eLrr4K1ZGxP4+v4E+MGQO/LU91FxRTzegUKtxbG cIzDCzZdyumaA8DzRCeiLD13ADw6q56urFzSMHKrKTQw82BAbaPg6trNS5TwcwNwwMKMVwjlAPdXd bz6/5Gpkg==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:56080) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hWUFY-0005dA-VE; Fri, 31 May 2019 00:14:21 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1hWUFW-0005mx-TE; Fri, 31 May 2019 00:14:18 +0100 Date: Fri, 31 May 2019 00:14:18 +0100 From: Russell King - ARM Linux admin To: Ian Rogers Subject: Re: CONFIG_FRAME_POINTER support for Clang Message-ID: <20190530231418.nuwn2kfatcn6cxlc@shell.armlinux.org.uk> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190530_161428_989405_9A9A38C4 X-CRM114-Status: GOOD ( 18.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tri Vo , Nick Desaulniers , Stefan Agner , clang-built-linux , Matthias Kaehlcke , Manoj Gupta , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 30, 2019 at 04:12:05PM -0700, Ian Rogers wrote: > Would it be practical to use __builtin_return_address for the caller's PC? That works for arguments of zero, but guaranteed for non-zero arguments. > > Thanks, > Ian > > On Thu, May 30, 2019 at 3:58 PM Nick Desaulniers > wrote: > > > > + Some more lists/people > > > > On Thu, May 30, 2019 at 3:56 PM Tri Vo wrote: > > > > > > Hello Russell, > > > > > > I'm trying to implement support for CONFIG_FRAME_POINTER when building Linux > > > with Clang compiler. > > > > > > Currently, CONFIG_FRAME_POINTER relies on function prologue that is emitted by > > > GCC using -mapcs flag. However, APCS is obsolete and Clang doesn't support it. > > > > > > So in order to accommodate Clang-emitted frame layout, I'm thinking of > > > providing Clang-specific implementation of code that relies on frame pointer, > > > most notably in these files: > > > lib/backtrace.S > > > arch/arm/kernel/stacktrace.c > > > arch/arm/net/bpf_jit_32.c > > > > > > This will likely involve putting "#ifdef CC_IS_CLANG" statements in the source > > > code. Is that OK? > > > > > > Another caveat is that Clang implementation of backtracing won't be able to > > > dump saved registers or dump precise pc value of the caller, because IIUC that > > > information is derived from APCS's fixed prologue. > > > > > > What do you think about this approach? > > > > > > Thanks, > > > Tri > > > > > > > > -- > > Thanks, > > ~Nick Desaulniers > -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel