Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19462467rwd; Wed, 28 Jun 2023 09:34:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5wT0htLSq9+4/UowLcjfx8TYhu/lwNmoguyry4gRlZREa8fnv4vFe+EoOXxHwxy2EXJh2e X-Received: by 2002:a05:6a20:3d17:b0:123:1cad:e753 with SMTP id y23-20020a056a203d1700b001231cade753mr19349600pzi.47.1687970045423; Wed, 28 Jun 2023 09:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687970045; cv=none; d=google.com; s=arc-20160816; b=eBHCTdccutiXl7o9qOxsuZLAyVQbUDmItDddgHzPZVj5gpOwXK8qWx8UGaG9wWAuC3 OnHiotNUn7YxCbLfIN4+0EaKmA/NudCGRQbn0YNcRDsx4nmKps+c2OlXcCmbtwrIvItY 3pwTfeDzRWb+U+A8ScAMJ+yVy8bEG3K3en17KUHtBUQ5/I8L+W4kzhBLnpS+12O5J8gV Exn46FpVa96bW0rBWIVEwj+IZ2YgOIjYEMz524bVwoY4W/LEURpd1eFka4lXsdYyU69b kFMW8jPr+JonN2pSbDKDdu87+P+vmfEW6uANrn75pgs83m10J1R4EFGE0APx7z1chQyg vetg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ECi/WmVIrMjJQAsbR4HKxLYILtJgUc1gfMb7oxMhXQs=; fh=CGRlF+nVQxmcrukrF5Z/KxaaSl/vJIlplzzwXGvARHo=; b=cG5UoVyzKsTEG3fJ9Gr2PBLNHWw0YJtw/6jDZwPfoT03cenruEvL3l4QDr2bhK6FRu BM9PM4tfb/0gqD23sEg2jgXAsaZX7/7EYP5io2K/vrRHQe+ccU74bbaZzxkSYJr5cwt2 upKiE257rnkv+Iv9/8s5bMkH9GX2UKuHYix8Eda76QWyOMPtpkMiLKiCy1REzQocR3ur Y1BQVa8IMRJOWyLVI5htSlSJ1rUvgYiI6ByjdGYAeaMqrL5cLjR5ltRWCHBhdPpqvjDe ZBOvQce/A/FQgB+dXnpfEfShNsiTbAGI7IKUmBYnVC4a61fkMMRu5ps5t5JsfW13zque qA5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tlPmZc5w; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r19-20020a63ec53000000b005574bf28173si9594196pgj.481.2023.06.28.09.33.51; Wed, 28 Jun 2023 09:34:05 -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=@linuxfoundation.org header.s=korg header.b=tlPmZc5w; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231828AbjF1Pne (ORCPT + 99 others); Wed, 28 Jun 2023 11:43:34 -0400 Received: from dfw.source.kernel.org ([139.178.84.217]:54314 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230287AbjF1Pn3 (ORCPT ); Wed, 28 Jun 2023 11:43:29 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7F9D26136F; Wed, 28 Jun 2023 15:43:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61F6DC433C0; Wed, 28 Jun 2023 15:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687967007; bh=QafBLFEUSubIM0CHvXTdPIXFnVTEgRgzGG04lDEXW5s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tlPmZc5wm/YQdCJ7H8wF7mko03Bw8ML0pQaHXsDTii81r62St9LdDepg8mzMWmCp6 erGIUwBdJu49dRTVY0rroxrRSbS2wHJTILgPe6nJ4m+h+NFC8hHau96ibNsgMsY5Ub o1xePnLiaA7yiaT3/mhqWkGGBoHxBjNlAoYB21HQ= Date: Wed, 28 Jun 2023 17:43:25 +0200 From: Greg KH To: Will Deacon Cc: Mukesh Ojha , Pavan Kondeti , corbet@lwn.net, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com, mathieu.poirier@linaro.org, catalin.marinas@arm.com, linus.walleij@linaro.org, andy.shevchenko@gmail.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-hardening@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH v4 02/21] kallsyms: Export kallsyms_lookup_name Message-ID: <2023062852-jurist-sitcom-e0d6@gregkh> References: <1687955688-20809-1-git-send-email-quic_mojha@quicinc.com> <1687955688-20809-3-git-send-email-quic_mojha@quicinc.com> <86c104a6-a685-4d05-08f4-e1be595f9d31@quicinc.com> <20230628153246.GA22090@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230628153246.GA22090@willie-the-truck> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 28, 2023 at 04:32:47PM +0100, Will Deacon wrote: > On Wed, Jun 28, 2023 at 08:52:57PM +0530, Mukesh Ojha wrote: > > > > > > On 6/28/2023 7:23 PM, Pavan Kondeti wrote: > > > On Wed, Jun 28, 2023 at 06:04:29PM +0530, Mukesh Ojha wrote: > > > > Module like minidump providing debugging support will need to > > > > get the symbol information from the core kernel e.g to get > > > > the linux_banner, kernel section addresses bss, data, ro etc. > > > > > > > One might ask why we would need such a debug driver to > > > be compiled as module? What would you do if we need to capture more > > > kernel data structures later? Do you plan to continue use > > > kallsyms_lookup_name() to query all the symbols? > > > > You are on point, i needed this driver to be static but i don't have > > any example at present to collect more than just _linux_banner_ from > > my existing set of patches.. > > > > Agree, it will be easier to make this driver as static instead of > > opening up the doors for modules to abuse via exporting > > kallsyms_lookup_name() and also it will be very slow for production > > kernel uses. > > Right, I unexported that symbol deliberately in 0bd476e6c671 ("kallsyms: > unexport kallsyms_lookup_name() and kallsyms_on_each_symbol()") and I > don't think we should add it back for this driver. I agree, it shouldn't be needed by any in-kernel module/driver. If you really want the name, look it up afterward in userspace :) thanks, greg k-h