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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5DAD5EB64DA for ; Wed, 28 Jun 2023 15:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tMGVkJ85A9mnCep96kpQA9oTBHKB/dlJaz1YmB66EY4=; b=u0kKBxGGl9gDAT U9TnLHygfWl7TTb6RilF55KLqnwGDHVkoSMg7srv/1s4vlFmDKaKfEBZ2T+LCXiDj/m8GT+TCFO8x 3EbZpy7WyyMWtYKKtQFuuq6q5CfOr/a+p8pOXzBL/k1ESZOSTJgGLv8aaIDwuaUMntUN3spsQr3sV c3L4OFswQxLPdLrl2OjJb1rOH5tGyR7SabAvKl7yLV5t90j52XkdKzmdpd9lGDh7rMwRLUtXoAD7b /0L6etUi8rwG3xDeWBJOjDuZotyTLd2IfPij8cHhfXZEhF8OJQJmZyF1BtSX447gWUYUm/GMU22KG Zh+lO5ij0/sU5qKDkz7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qEXKN-00G18t-1v; Wed, 28 Jun 2023 15:43:31 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qEXKL-00G18S-04 for linux-arm-kernel@lists.infradead.org; Wed, 28 Jun 2023 15:43:30 +0000 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 734D161366; 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-Disposition: inline In-Reply-To: <20230628153246.GA22090@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230628_084329_128510_CCDDF283 X-CRM114-Status: GOOD ( 24.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel