Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5267661pxu; Tue, 22 Dec 2020 12:19:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4nwZn1qs4KqefIzmkp8mo3d0nY3M/7UmRDItv4jl44fjRkx3NOOdlMvtuHcNkBB8mSX2T X-Received: by 2002:a50:d6d3:: with SMTP id l19mr21839788edj.340.1608668354019; Tue, 22 Dec 2020 12:19:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608668354; cv=none; d=google.com; s=arc-20160816; b=W3RIYGfZKqAWhHJaErzYI5sEF8p3JsEJT26bZ3iLEnz+fiIk1fuBwBgk4rz93NyW4/ nWaqeJGswRpdqs/NjJdoKjt/C7PqH8LahbXMPZc3tFgrKCgLoUM3FZrYGJyiq6K14b0Y 5Z8TyQWGLDqKwtClxbfpcE5koEiHfxGrZ+1mv5zEO4giBFj72RC8607scHN+zdnPzfJ5 UMa9SH1EWirW+0JqKrspJ5gfpsZGGakKMskDFZMZX+irAtWV7+4b9BpCkcYszJDyiQCD fb6R9AelUJoBr0lZ9KsnbPJsR8dRIKouJoxg89dT9hUptaC1CorYjzdflw+suTDVLN1O 4dfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/zLJLP7tCAUwtOH7bnIcDYFQtzmD3kgV+pxzg546b1k=; b=HM4RacjN0u/UH9s2Ymk9zRYq01QHGeKtyE2KH2piD+q2P+EWmw/yOPk8d6HK0Q3VRd 9t6VjlBLsMULiMNZrowfZdxRJPWOYSJpdVvPAlYOpp8ftbn3/6WzWCu2X2nzM0ZgqED5 1Ki2i1ixJetX/VkLY6bdt4UQsp6p/nNuODjX6161PXKwaHwIKpZ3q86snVTBI/S703IU +zA6nSBxoLMequpwzwt6Uj0gz9NY2P648t2N/xAfdRH3GpeJpphz8Y39KiQDhsD80MyW l+LbGlVP1OvXLZXZl9MymUZ31xl94tZhRa+MqJmuNS4LrvP3lRhxd9/1Vh4ysEBUY1uC UjBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XC6Br8D+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn20si12653567ejc.47.2020.12.22.12.18.51; Tue, 22 Dec 2020 12:19:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XC6Br8D+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727889AbgLVUSf (ORCPT + 99 others); Tue, 22 Dec 2020 15:18:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726756AbgLVUSe (ORCPT ); Tue, 22 Dec 2020 15:18:34 -0500 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 776CEC0613D6 for ; Tue, 22 Dec 2020 12:17:54 -0800 (PST) Received: by mail-io1-xd2b.google.com with SMTP id p187so13123083iod.4 for ; Tue, 22 Dec 2020 12:17:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/zLJLP7tCAUwtOH7bnIcDYFQtzmD3kgV+pxzg546b1k=; b=XC6Br8D+89r1c0JcPMrO3nO6KaRrr8ocyrLF47pEfYQUJe3E1u/P6NZigHGMMumbIK HCdQ77TvBkYou2+v7emwbJdr7rc4fVDh2qnGN/1YRKfbuGAcnhh3b9sBd3fOg/TW/8B5 k1YCh2Gzk/m/wddzgZnfSjui9OSQhIdclFkY0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/zLJLP7tCAUwtOH7bnIcDYFQtzmD3kgV+pxzg546b1k=; b=TLYDJcKMnl0BC4PdV7lOvs0A97CdYzWFViEEBOYnMoLkNctNcXLEp1k0SokWi1cHeX usDCB/Px+mebAsMcY4mDyI672WR0Yb6vh0Z2XK3XxGEkuWaFRBYJMbkSuk4RCBiyx7QS 1myZBaHVwqFlF6cjmqjxmuEwutDonl7sOfhhbveB4fNw0GwmnErk87C86N4bTviHzfqy uDXe9/WdHRXF4zg81P4ZK2xRL3ln8SJa1Me/6iOqD0KmCISM6Hi/aKojptBGA44ZGWmW LY4MljsgLaR/fkZAQX4euKHpyXHMs3Qty8DuE2BAlDkYCGRecygAfXRRc7OIK0MyKctI i+eA== X-Gm-Message-State: AOAM532TdqWBvzOD+IB5qcK+51T5VWOPsUEIVoaHA+E9CHuehko8jMCt EItK+lsqYJXqapmGldyJF+pviWx/UOEr2P+G+bZDBA== X-Received: by 2002:a6b:8b88:: with SMTP id n130mr19051497iod.122.1608668273230; Tue, 22 Dec 2020 12:17:53 -0800 (PST) MIME-Version: 1.0 References: <20201126165748.1748417-1-revest@google.com> <50047415-cafe-abab-a6ba-e85bb6a9b651@fb.com> <194b5a6e6e30574a035a3e3baa98d7fde7f91f1c.camel@chromium.org> <221fb873-80fc-5407-965e-b075c964fa13@fb.com> <20201222141818.GA17056@infradead.org> In-Reply-To: <20201222141818.GA17056@infradead.org> From: Florent Revest Date: Tue, 22 Dec 2020 21:17:41 +0100 Message-ID: Subject: Re: [PATCH bpf-next 1/2] bpf: Add a bpf_kallsyms_lookup helper To: Christoph Hellwig Cc: Yonghong Song , Alexei Starovoitov , Andrii Nakryiko , KP Singh , bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Florent Revest , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 22, 2020 at 3:18 PM Christoph Hellwig wrote: > > FYI, there is a reason why kallsyms_lookup is not exported any more. > I don't think adding that back through a backdoor is a good idea. Did you maybe mean kallsyms_lookup_name (the one that looks an address up based on a symbol name) ? It used to be exported but isn't anymore indeed. However, this is not what we're trying to do. As far as I can tell, kallsyms_lookup (the one that looks a symbol name up based on an address) has never been exported but its close cousins sprint_symbol and sprint_symbol_no_offset (which only call kallsyms_lookup and pretty print the result) are still exported, they are also used by vsprintf. Is this an issue ?