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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 2CBA5C3A59E for ; Thu, 22 Aug 2019 02:33:29 +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 F113C214DA for ; Thu, 22 Aug 2019 02:33:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kKK9uNqw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="FdCFi7GW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F113C214DA Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n4nZ+Oh6Tr+LLIwQ7RcG1REQfNdkqAsRfbnHllyMRSI=; b=kKK9uNqwmarQ/a wRqm8v0B2EBx1j+b6t8HfTaFWxcJmcHhQUVCPPoNdfe9B1ffjdy7QfIUCL9MLG/IAYjFMyfUiu43x V/X8Lul0TzPFckZAUA21FdLb/pxyktnjaTbkaXQofl19Osx9xFFODwiqciQsE7bJSMDxWuKIdpnph ZPZsquuHnmqeH9ceVLxWWjUGoGGdrsI7kOdBM5sZ79DF+8ACX84B9pdNsBiY7I1T4+emEwGx8Dtl7 7jP8D+DSQZygqSHh83Sjrqq0DLWUz6yezs22BMhrBQJf8dEb1PtucXv4DARseG1wxgiZfl9f6fsW4 68n+Klkc6y6HMZHVGUyQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i0cuf-0000Xi-OM; Thu, 22 Aug 2019 02:33:21 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i0cuc-0000WN-5m for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2019 02:33:19 +0000 Received: by mail-pf1-x442.google.com with SMTP id d85so2820489pfd.2 for ; Wed, 21 Aug 2019 19:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+tDasAzwNiV2HiRhPGR1ntFxNV2BKl3GP2YTPs2bTao=; b=FdCFi7GWOi0sBNctiSyST5JgiXFc3Dpm4Ny9r0Z8N6YB1RGX4IGNdRSGDqXckQLFiP kP41+izIX1OKcH3u/ztOWxFdyj4NNtvjgdKMMZdMcwRcLwAzWfRnEtq3kQbenMlQFwuM ByhsEOohxtooyNcFYI9nrAsc9n/4HVDoK/Eo2eZ0f869f60fP4KBgjSrN/n/79Kol50B NAVSKjMgtGXrrJeh9fiX/PJg8E1gtuVMK3I/3ZJhREsqOnOmwtX0NGSafNXqjQjk8z1P FaN57WfagrT/k8a88PaMBOG6M2dxJ0KzK5GN1gENWohFwhBq3GhckEjAK4qYbZuuy1Iy m0nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+tDasAzwNiV2HiRhPGR1ntFxNV2BKl3GP2YTPs2bTao=; b=WIdchhc99jq3ypgjsiQdt68+DMMzWd3qZCtj0ijwjYzJkVWV01SbGHYPMtbkCPXqYB ebO7uK8UzHt/Dkp7yLIBwg7dWb3Wodsc5kzqeB//NbuRkW7EUiPBePQB39LSiAyFl264 zxLJ+ee8S7GIbMkZBU9bwj3M682csu6/sA6BcO33fV6En/B23LeEzVxajFAVqsbW2Fnv XxL5qe7hc3WwtkYYAoU0IHX8vuvxdjRMwpPNjlymDVmAmwHqca10Nixdrw+VQ6C1Kb7y AQN6K3T7wQSzrEyroEyxfvAhJwzkDPYWLSmZE+RbxS4gZ/H2gJsaM7qB1AGqrt3G/XjP O0aA== X-Gm-Message-State: APjAAAVdTO6mQ0uc1pF3Yi4P4cZAJAPLRqUFhSx7ie2VhTZ6tldgONSp 24LW9HeS0dK4DYhWURsiHraeHHV8afkO5xtk5ijpOQ== X-Google-Smtp-Source: APXvYqz3Wvbr27kKwSLKzNFjnFQjspOUDKGv55jK/OXyb9guHXmQpT5LPH9sicMq4DgljVSA6U/iNJtBNCDviS3stlw= X-Received: by 2002:aa7:8085:: with SMTP id v5mr39314885pff.165.1566441194307; Wed, 21 Aug 2019 19:33:14 -0700 (PDT) MIME-Version: 1.0 References: <20190820194351.107486-1-nhuck@google.com> In-Reply-To: From: Nick Desaulniers Date: Wed, 21 Aug 2019 19:33:02 -0700 Message-ID: Subject: Re: [PATCH] ARM: UNWINDER_FRAME_POINTER implementation for Clang To: Nathan Huckleberry , Catalin Marinas X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190821_193318_238782_AEDD6E62 X-CRM114-Status: GOOD ( 18.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tri Vo , Arnd Bergmann , Ard Biesheuvel , Russell King , LKML , clang-built-linux , =?UTF-8?B?TWlsZXMgQ2hlbiAo6Zmz5rCR5qi6KQ==?= , 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 Wed, Aug 21, 2019 at 10:43 AM Nathan Huckleberry wrote: > > On Tue, Aug 20, 2019 at 2:39 PM Nick Desaulniers > wrote: > > > > On Tue, Aug 20, 2019 at 12:44 PM Nathan Huckleberry wrote: ...snip... > > > +tst r1, #0x10 @ 26 or 32-bit mode? > > > +moveq mask, #0xfc000003 > > > > Should we be using different masks for ARM vs THUMB as per the > > reference implementation? > The change that introduces the arm/thumb code looked like a script > that was run over all arm in the kernel. Neither this code nor the > reference solution is compatible with arm, so there's no need for the > change. Looks like you're referring to commit 8b592783a2e8 ("Thumb-2: Implement the unified arch/arm/lib functions"). Currently, arch/arm/Kconfig.debug has: 57 config UNWINDER_FRAME_POINTER 58 bool "Frame pointer unwinder" 59 depends on !THUMB2_KERNEL && !CC_IS_CLANG So it looks like UNWINDER_FRAME_POINTER and THUMB2_KERNEL are mutually exclusive. Probably could send a patch cleaning that up. (ie. removing the different masks; essentially removing the hunk from arch/arm/lib/backtrace.S from 8b592783a2e8). > > > +for_each_frame: tst frame, mask @ Check for address exceptions > > > + bne no_frame > > > + > > > +/* > > > + * sv_fp is the stack frame with the locals for the current considered > > > + * function. > > > + * sv_pc is the saved lr frame the frame above. This is a pointer to a > > > + * code address within the current considered function, but > > > + * it is not the function start. This value gets updated to be > > > + * the function start later if it is possible. > > > + */ > > > +1001: ldr sv_pc, [frame, #4] @ get saved 'pc' > > > +1002: ldr sv_fp, [frame, #0] @ get saved fp > > > > The reference implementation applies the mask to sv_pc and sv_fp. I > > assume we want to, too? > The mask is already applied to both. See for_each_frame: ah, under the finished_setup label. -- Thanks, ~Nick Desaulniers _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel