Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp900908iob; Wed, 4 May 2022 10:14:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfiMD66ZB2eu0vvPQLc/HqDefVg1axeJ2pO7MQtFBv9Dj/3G7j3Of2qID+rNy/nzKXRaeU X-Received: by 2002:a17:907:6e07:b0:6f4:d185:9f57 with SMTP id sd7-20020a1709076e0700b006f4d1859f57mr2441876ejc.668.1651684449307; Wed, 04 May 2022 10:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651684449; cv=none; d=google.com; s=arc-20160816; b=TkQrpzCdxSTzsxy6SflbsVLsVgeFdwk/rdOVcU322WNYYUON/LdP0NxZc/TUTOWgyl Mh1K4d4CYwxMSvsYpiCNrdkYntn1hJbMwvqgWXWFwyS8sXjvqRkXbVHyUgFyzjzHK9qg 2mFLF2dSLKF/3FYdNDj0SB5USkEvhLvXRbExXRgDdzZY4ok6KDx4cVZUTwvATcUH01nU AeHRLx08p04A2O2urTJRlU3SlwC4ar0K6Doo+zAiBdsENrBZys72ZymjLb9DW4/sbozH g32iLatyjf/ud6bF8V5/pMmili8ydcfmpkX2m60Fbw+qKWc/x/dg5onDhAZ3BoN5tBXz n2Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Vh13rBCQ70SFzbsmVFC7DJ4c81mtjcysjlK8/dAYChM=; b=gQOKdRO2Gg2gIEckPRhh+f1tja0ZXbHQdvTosBtYaso9BtZ9FyQJOXRG0AHKx9snsL Fec/ZHJ983d+8uFy4y4yc327GF7oIHivdz+zIa+UVFMuW+3tfC9ZG9FPZRA2GHpgJwbJ KJy/mYiD/ACyqucyH6Dcpw/LyEtB6T872Zq4uLOUuN9TAxTnB1ZwD/Ekus2gr+YR4bgN t1RByfNglXhPqFahC0fgGAZsr4suYN3tGWvdlvy3t8byQalnvN1ZDRtzb9LWLwPoOQkI Xi6aR9Otw4K9NA0BG7JlQlN+ZbznprHzwvmI5aM2eWadPg8EXmfKlfTHMor8Y9Tn/GES ZXnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=INtG+fMG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a20-20020a1709065f9400b006f39d2f5f98si15698570eju.727.2022.05.04.10.13.45; Wed, 04 May 2022 10:14:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=INtG+fMG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352708AbiEDPqM (ORCPT + 99 others); Wed, 4 May 2022 11:46:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352690AbiEDPp7 (ORCPT ); Wed, 4 May 2022 11:45:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF6F14551E for ; Wed, 4 May 2022 08:42:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8A81661CD7 for ; Wed, 4 May 2022 15:42:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B4B8C385A5; Wed, 4 May 2022 15:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651678939; bh=rskwEFdpilIG2nL3FAfN32P0yaiAWDS1OUSeNHtqptc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=INtG+fMGb7nn1Zj75PcWGN3kXjFhwsGSfawFI+DwWjW2NeRy0kdcyKCtT90EhYi3B ZyTKpnr0E59HrA8b83hNrvDllVJx9BLX5xfrRjTUCyskQHWrYCTMyryHtpXfs37vxr daRw34ELX8rL2Yt8Lz54q6y3LBb+30wfxFt6wDufDeQfmlO0wJ7R7ffhdSNF4jtYwu 1lGPe4X4uX69ztu6K5w7ZVAg1SWLoGVywMXqPrinyJNmAIUd+MWOKy8JeJaNDlz50A q/WmfFfoYY2qzgq/lmMZ5V86egwfdvU5YOFgsXwNY/ZwQBO51XtWpcvpHnDOzLlAbp FAWDj+RaQaZqw== Date: Thu, 5 May 2022 00:42:14 +0900 From: Masami Hiramatsu To: Josh Poimboeuf Cc: Peter Zijlstra , x86@kernel.org, linux-kernel@vger.kernel.org, Masami Hiramatsu Subject: Re: [PATCH] objtool: Fix STACK_FRAME_NON_STANDARD reloc type Message-Id: <20220505004214.1e4e69f5ded3b591112851a0@kernel.org> In-Reply-To: <20220502175921.oruktb6dleabvdyx@treble> References: <20220429092024.GT2731@worktop.programming.kicks-ass.net> <20220429225636.6qm2orq4uwnl33ii@treble> <20220502175921.oruktb6dleabvdyx@treble> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 May 2022 10:59:21 -0700 Josh Poimboeuf wrote: > On Sat, Apr 30, 2022 at 01:44:00PM +0200, Peter Zijlstra wrote: > > > > I also don't see any kprobe/optprobe hooks in unwind.h, so what happens > > > > if we hit an optprobe? > > > > > > Same as for any other generated code, the unwinder will try to fall back > > > to frame pointers, and if that doesn't work, the unwind stops. > > > > > > That commit didn't change anything since it was already not being > > > directly executed anyway, but rather used to generate code on the fly. Ah, OK. So ORC will not work on the dynamically generated trampoline code. Can we generate ORC information entry dynamically? (E.g. copying ORC data from the original code) > > > > > > And before that commit it was being ignored by ORC anyway, thanks to > > > STACK_FRAME_NON_STANDARD. Which can now be removed since this code is > > > now data and objtool will no longer try to understand it. > > > > Right; but I suppose I'm wondering if we should fix this. It seems a > > rather sub-optimal state of affairs. > > Masami recently fixed some kprobes ORC issues but I don't know if this > one was fixed. I've fixed the kretprobe ORC unwinder issue. I need to check the optprobe case too. > > As to the whether it's worth fixing, I dunno. There are trade offs. > > Depends on how common the stack trace is -- I'm guessing not very, since > I've never seen a bug report -- and how important it is to get to full > ORC coverage. If our goal is full coverage, we'd need a way for > generated code to add/remove ORC entries. Agreed, if I can copy the ORC entries for the original code to the entries for generated code, I can fix it. Thank you, > > -- > Josh > -- Masami Hiramatsu