Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp755762rwd; Thu, 1 Jun 2023 06:15:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7UDimdEF0tW9R2n0fBVQz5js/DW7DvA1VoXlONgojyGNUAPTUTH7OG24pblF28aDcECYyw X-Received: by 2002:a05:6a00:1509:b0:64c:ef3a:407f with SMTP id q9-20020a056a00150900b0064cef3a407fmr8573108pfu.29.1685625349136; Thu, 01 Jun 2023 06:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685625349; cv=none; d=google.com; s=arc-20160816; b=hBfhn68G+WMU7UO9jcNzcrwlZX7xadJpzFL6AUNvRfLrdePj+8l7BG6ID9mrOgZ7Cv AO16Pu8AfyvOMyF5F+QtCDG1jR/hlAhLy0lI2LCSmDC2sMG6cjTBcLnx3DbgFxZ1mKO0 mCVzt9aPC1X/U5I7UYD0iLDlABOyX+wlpY9ToHY5Iup3N6f5dsBBFHfMtXZGJoCTvA1d RmhEDUrKqtV9sUsJd9y4OMiRmkb3QnO/1rijxDhQdoCIUmOtj6T4D014tCHmHyG5deK5 MNZeouFqcOvAlfz6WuJe3JvWTSnVUUXq8ID0lT1x1FMFuFQWkrRh2gu5hByw8z1gIqRF WOIg== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=OZ/5HE/soAZZFHMXDiilpjDsIee5iu2+4q2X3qd67Kk=; b=RLGT6OtonnUjqOjdHYfhuwpGTxC7QG1Z6vMNU2/KogS2/+v9n2fen8wpiFO5f4ogGr jhFYlSPt7d2e6eShWrtPPcJdXJiBfX1vZK87HpO4zVTDJJ+/Yr2Q75TFo8/YkbghjjoA 24SeYsqeN2J9j+21gujpSs6Fui4mnW8+NeitMu+QNNEjDKXUYsyoLOoZRwlR3eECHsW5 OnxQcV/TGZ4jK+XFF5eM+hDKYAk3R/c4eXAREo3LFtFYmMa5S9of7yke7/G8Bd3K87I1 knVh0J914BkmHDjneakdkhmjfmFwYNklCVeug05+cRiNWS0zj4X9lFmtrRvk8+PsalFX NHoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="Gzr/Hmhj"; 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 b9-20020aa79509000000b0065002f81d1dsi913056pfp.25.2023.06.01.06.15.36; Thu, 01 Jun 2023 06:15:48 -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=@ellerman.id.au header.s=201909 header.b="Gzr/Hmhj"; 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 S232673AbjFAMzB (ORCPT + 99 others); Thu, 1 Jun 2023 08:55:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232252AbjFAMyw (ORCPT ); Thu, 1 Jun 2023 08:54:52 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68576124; Thu, 1 Jun 2023 05:54:49 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4QX5gm3jPHz4whk; Thu, 1 Jun 2023 22:54:44 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1685624085; bh=OZ/5HE/soAZZFHMXDiilpjDsIee5iu2+4q2X3qd67Kk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Gzr/Hmhjs2KUDi4nnp0MTHzIyL0PHDDlwEtr+CBgyllamdBOtERawuTPq1+Z0snRe RqvCFjm/AWFD80J4BeLp2QSQym1ZXeBiTft476K8ziJUbnMOsjsA8RguD3AXyBM5ye BB8D+ZLSQhYU4+sMbj/eMXeZOxXpMmvnOSbuYx4SljrZQOjCTWzd6GgU2ijA91cw2e hBlD1wH6lVO9+LZrJWD78PbLEnkVDbcqxmqj/xz6NryKP4Qh8wL5EamqBP+0kxiavr heyBgrKUWteT0TNw6HQ7F6eykkAzJNWrx0xo+P2Vm3YnPQiCg8krOBryTkoo95eIfg HINee5Siuuv1g== From: Michael Ellerman To: Miguel Ojeda Cc: Maninder Singh , bcain@quicinc.com, npiggin@gmail.com, christophe.leroy@csgroup.eu, keescook@chromium.org, nathanl@linux.ibm.com, ustavoars@kernel.org, alex.gaynor@gmail.com, gary@garyguo.net, ojeda@kernel.org, pmladek@suse.com, wedsonaf@google.com, linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Onkarnath Subject: Re: [PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size In-Reply-To: References: <20230529111337.352990-1-maninder1.s@samsung.com> <20230529111337.352990-2-maninder1.s@samsung.com> <87ilc8ym6v.fsf@mail.lhotse> Date: Thu, 01 Jun 2023 22:54:42 +1000 Message-ID: <87jzwngx65.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 Miguel Ojeda writes: > On Thu, Jun 1, 2023 at 4:02=E2=80=AFAM Michael Ellerman wrote: >> >> > Side-note: in `get_function_bounds()`, I see `kallsyms_lookup()` being >> > used, but the name seems discarded? Can >> > `kallsyms_lookup_size_offset()` be used instead, thus avoiding the >> > usage of the buffer there to begin with? >> >> A few lines below it uses the modname, and AFAICS there's no (easy) way >> to lookup the modname without also looking up the name. > > Hmm... I think you are looking at the `xmon_print_symbol()` one? I was > referring to the `get_function_bounds()` one, where the `modname` > parameter is `NULL` (and the `name` contents are not used, only > whether it was found or not). Yes you're right, apparently I can't read :} cheers