Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2214533pxm; Thu, 24 Feb 2022 19:38:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwA/6v5Owz17WQZdkiacLFRkIyGynQ7IRj2iAondFg9lQ2EvprAR+cavwMSCm1tnG9QPGlD X-Received: by 2002:a17:906:7fc9:b0:6cf:d288:c9ef with SMTP id r9-20020a1709067fc900b006cfd288c9efmr4570065ejs.751.1645760333801; Thu, 24 Feb 2022 19:38:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645760333; cv=none; d=google.com; s=arc-20160816; b=aMZRvEWnmc/xjj7MMK4MN+xAUiANLztoxjb/Tes4M8xaUIVrzO7y4m7gFn9x11EeDh wjwwGZn8YCn0axTKNMoVtC9eZbX9wxe9VRgQh6It6xhTnjd2QPLXhPv/TvsxoLE0NVUv 84/HSy364Ncv2DQPnp7MlebSNBFuAsRSvKMEgkY9w2E1BUcSKVXFB4kVRxgZxXRJ7gaT FTYrmaB/mkBfKA0hWWtiS0wu0WWWi4cMxlh748eq3NUWaSAmwNVIIZRyMGDIzBFu10fl 1nTwjKqOTT1MM1G3U2QM8vXVcW7BOagkz9/cKycmBhy5Nip5UgyhbzwQxyauKAVsLq5c bR/w== 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; bh=NU0oYLilR2sn4Wu07ROxtQcris2k9ZIP/TiNvRLn7JU=; b=DZSQ09/1ApM6KeBmNB/faaopWqxhUhgTVFylCrILulJyiuvXBPsQNFXCvMkbXrXg/c FNEJE8sd2PI9iz0qJr+4J56AbWYn84XkJxABk9rAupbrjtGHTMDm39ZFPpXRbcrYhFRJ YcIab1wDaDfC6nM736EDicA4QSVyUBS4hEShLC72TT9xHwI0ip10zqdfy/gvvS2McrwC Bi3YehcZQGvAxV3xHDjFpqQAuYKcadPYnpq2BTSqj4QnQD/cK93eeaqCnFCdFL0TPO57 lSbIxEulFQ+RzlZw0Y22/DuxyXk4Mx4HtG65AXR2oxPTbH1qKti4nltYfSbOmEgrZOGZ hQ2A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx26-20020a170906ca5a00b0066108c1a50csi792127ejb.67.2022.02.24.19.38.29; Thu, 24 Feb 2022 19:38:53 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235834AbiBXWw1 (ORCPT + 99 others); Thu, 24 Feb 2022 17:52:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235694AbiBXWwS (ORCPT ); Thu, 24 Feb 2022 17:52:18 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7828228998 for ; Thu, 24 Feb 2022 14:51:46 -0800 (PST) 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 14FEA61B75 for ; Thu, 24 Feb 2022 22:51:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E418FC340F1; Thu, 24 Feb 2022 22:51:43 +0000 (UTC) Date: Thu, 24 Feb 2022 17:51:41 -0500 From: Steven Rostedt To: Josh Poimboeuf Cc: Masami Hiramatsu , Peter Zijlstra , x86@kernel.org, joao@overdrivepizza.com, hjl.tools@gmail.com, andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org, ndesaulniers@google.com, keescook@chromium.org, samitolvanen@google.com, mark.rutland@arm.com, alyssa.milburn@intel.com, mbenes@suse.cz, alexei.starovoitov@gmail.com Subject: Re: [PATCH v2 12/39] x86/ibt,ftrace: Search for __fentry__ location Message-ID: <20220224175141.6a318d61@gandalf.local.home> In-Reply-To: <20220224224631.tr3odcwacpoejftn@treble> References: <20220224145138.952963315@infradead.org> <20220224151322.714815604@infradead.org> <20220225005520.c69be2fbdbd28028361792d9@kernel.org> <20220224105847.5c899324@gandalf.local.home> <20220224110130.4f4ae4ac@gandalf.local.home> <20220224224631.tr3odcwacpoejftn@treble> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; 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=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 Thu, 24 Feb 2022 14:46:31 -0800 Josh Poimboeuf wrote: > > > > > + rec = lookup_rec(ip - offset, (ip - offset) + size); > > If 'offset' is zero then why the math here? ^^^^^^^^^^^ ^^^^^^^^^^^ Because it didn't check for offset being zero when we wrote that line. ;-) Yes, checking for !offset makes that logic irrelevant. Good catch. -- Steve