Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5594060pxu; Tue, 22 Dec 2020 23:53:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyExVd8v/6IJrWhsrrdLF5rdjLKmrAwhLl6nhngJNnT5QJuHWpc7EbbPxk4eLIbF6dVdlb2 X-Received: by 2002:a17:906:a015:: with SMTP id p21mr14084207ejy.49.1608709994099; Tue, 22 Dec 2020 23:53:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608709994; cv=none; d=google.com; s=arc-20160816; b=0MLt6BD2mLfdsCGTcA27m6YEQ2sd/0YHZLD9Tow6LQ+TyG5yOqfHigwRKIX3goaCAe +1ShAyCKz0HnlYpPBzj+3D9FAFOZffq28Yx0ssDjDug9Y4KnyirIlVi137Tt2wUwQSXZ zfe0WPIjfmHwLa/3DwaFC1RRuH9v6SrER3FHrOJR+9FFppKcVIHPjeWVSt9qowZTcPSm U+QgSUKZ+tKo8gdNOKzDlpPkJ6CdU4u1emfNxOuOBCsqBF0DtY6m04jzTGf7c++YXt4b 8UABnppo1SaLVZLTb3aGrfDGI2wIy1q2goljLnk8pQc5s1ueG69uKzV42UT6+hlsIwou DiUA== 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=DsUx9mdZt707uyB4UvQMhQtnSAx/QVWXa/XPYhsbpHk=; b=kSWaajiuLQa2yXCnwMQDikHy8Itz5pv8Ya29fVN/GjxJg4rUEs7G79Cj/1DBz2Q8y1 UuAwfmJ3kyUXBzOv8/dOsCU0IesZb3saJMNHhn1HPGHw6KeTgG09lMfy9gm2cs4y/Rp5 CEJWRtDa910qoJXN4XQxex5yyxwVHwYdN7T/imi5H6EBqfmdJfYX7/qtAqeSQfHS2Zum MtlbUoAVPd+Kq6qL6JkePz0M1n8dLN8W+WuD/M2l9bN/ROJRA4WStppvXijNTwgjEo0y CY44G3g4cey4U5ZRAoUGkiC6Mn1JuAsOTn7Zwii+V1OziEK/Y8Lh52rcsMMDGWN4adJW uHMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=JOxqt6e5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si11413318ejx.0.2020.12.22.23.52.52; Tue, 22 Dec 2020 23:53: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=@infradead.org header.s=casper.20170209 header.b=JOxqt6e5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727915AbgLWHvl (ORCPT + 99 others); Wed, 23 Dec 2020 02:51:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727063AbgLWHvl (ORCPT ); Wed, 23 Dec 2020 02:51:41 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25960C0613D3; Tue, 22 Dec 2020 23:51:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=DsUx9mdZt707uyB4UvQMhQtnSAx/QVWXa/XPYhsbpHk=; b=JOxqt6e59p0nOH9ElSu4Ow4Hgl TiduuNNekNGLdyKvSi9zc3opGxX4X7xqH0pdopvqdHxWxOqeylhmdX8KmirUxZm8TzOAtSoaJxvL4 QRveder0RjEfY0dsMfLcvOsHJqmobESmc/JUTBoVlzkNU3DF0etyLOAYkqCFUTO8e2ZAUKOMnPsG3 di09XN+NeLaE/OYI1toNu2olSscAPqyGn2oc1cdSa/CF7GcNa+y7xlzwDDQN4sXcFpMxitkQRolQU RebBLDaEQDgqKvu9F590yvKx1G5dj3lqqXAIGoiOrhmAhDqC09yJnoWxgT1D58EHVrzvF9B+gBgnU iopambxQ==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kryv1-0004HW-Ec; Wed, 23 Dec 2020 07:50:47 +0000 Date: Wed, 23 Dec 2020 07:50:47 +0000 From: Christoph Hellwig To: Florent Revest Cc: Christoph Hellwig , Yonghong Song , Alexei Starovoitov , Andrii Nakryiko , KP Singh , bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Florent Revest , open list Subject: Re: [PATCH bpf-next 1/2] bpf: Add a bpf_kallsyms_lookup helper Message-ID: <20201223075047.GA15781@infradead.org> References: <50047415-cafe-abab-a6ba-e85bb6a9b651@fb.com> <194b5a6e6e30574a035a3e3baa98d7fde7f91f1c.camel@chromium.org> <221fb873-80fc-5407-965e-b075c964fa13@fb.com> <20201222141818.GA17056@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 22, 2020 at 09:17:41PM +0100, Florent Revest wrote: > 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 ? Indeed, I thought of kallsyms_lookup_name. Let me take another look at the patch, but kallsyms_lookup still seems like a very lowlevel function to export to arbitrary eBPF programs.