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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F3AAC61DA4 for ; Thu, 9 Feb 2023 07:12:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbjBIHMw (ORCPT ); Thu, 9 Feb 2023 02:12:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbjBIHMs (ORCPT ); Thu, 9 Feb 2023 02:12:48 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E19FF41B59 for ; Wed, 8 Feb 2023 23:12:46 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id w5so1882823plg.8 for ; Wed, 08 Feb 2023 23:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4WVs22Kg7Btgcs7NcU/V4V2lSD7tkAUiSfve9Y1LNwY=; b=AoYrrJJs6k9GtmQ4jMGk0yXnsurRdiogv4N9KaUtAvk7czZiKUvynb//Bfa2EC5y3x bThSbc2PuWdlSa6zqhkSM3mNpiJHJPK8QHZP0bb0ANnmBRq9y6M6tosCkqa0HtjZEr7m pdZWvIjuSCgtmifIjb6P+QJwoD6nwQX/OA31bMpYqq3qigQS8QSqGSlSiq47cdl+XVQx 2JCuvOxpC3CK/kIQhAqtz+Zi7zTcsXfsqIKsjnrCzTvJoB5FP4M6IVUUoVQ4vN1tGuCr X41zK9YDiG7cBtw8BW3R1Jb/SbukYgAhUI7qDCI7mUA4yRA0v5Gq7Ipcnhb/YmqWIm3T qicw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4WVs22Kg7Btgcs7NcU/V4V2lSD7tkAUiSfve9Y1LNwY=; b=kt/WeExLuTCxEnkX9Q0Sgp6JemYqGj5Hn7TiTB90il5upaIK5r4hZd1i+OTyIiAnLv VUujzsLUWNwVGWfZVhvSYnvrgewtSrkXrGbh2w4jsCDT4xVFGD6ge2AiN9s/k04Vo624 9yORQTngsNyzPyOCI6t/2VYIGEP/yrF8qmqBDBVXQc8UNx6ZvstIZFHSDO7N5P4/k5x2 olKaXw61OjmbPCy4qJrRt1G0tqhizFfgfvgEtjrTSYiVKhSYyvS54BDAgIRXyXptW0Sj L1CTEKazIWWSU0IzTlRRgTnowVGr678gvLALiQU0GLR0eBQyYqytz+JOEjLLqCMWj1OL TP/A== X-Gm-Message-State: AO0yUKVnYnfLob+R7yD8nR0R3s085JOA4qkEhmm9vG+Kq5XobRvdbqpH R0jlMZND68En0nulk/7tsTe9m94uqOVnKgwvYBfrlQ== X-Google-Smtp-Source: AK7set/JAGjMaYyKUc3wik1Zpc3z1fF27fTbmID4hmKb+mM1VoQt/VnzqKCHgPPcXP/4CDxya8Ss+VkiNAm6JDV2cqw= X-Received: by 2002:a17:902:b78a:b0:199:26df:77b6 with SMTP id e10-20020a170902b78a00b0019926df77b6mr2518442pls.3.1675926766145; Wed, 08 Feb 2023 23:12:46 -0800 (PST) MIME-Version: 1.0 References: <20230201135737.800527-1-jolsa@kernel.org> In-Reply-To: From: Hao Luo Date: Wed, 8 Feb 2023 23:12:34 -0800 Message-ID: Subject: Re: [RFC 0/5] mm/bpf/perf: Store build id in file object To: Jiri Olsa Cc: Matthew Wilcox , Alexei Starovoitov , Andrii Nakryiko , Andrew Morton , Alexander Viro , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , bpf@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-perf-users@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Daniel Borkmann Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 2, 2023 at 7:33 AM Jiri Olsa wrote: > > On Thu, Feb 02, 2023 at 03:10:30PM +0000, Matthew Wilcox wrote: > > On Wed, Feb 01, 2023 at 02:57:32PM +0100, Jiri Olsa wrote: > > > hi, > > > we have a use cases for bpf programs to use binary file's build id. > > > > What is your use case? Is it some hobbyist thing or is it something > > that distro kernels are all going to enable? > > > > our use case is for hubble/tetragon [1] and we are asked to report > buildid of executed binary.. but the monitoring process is running > in its own pod and can't access the the binaries outside of it, so > we need to be able to read it in kernel > > I understand Hao Luo has also use case for that [2] > Sorry for the late reply. We use BPF to profile stacktraces and build id is more useful than instruction addresses. However, sometimes we need to record stacktraces from an atomic context. In that case, if the page that contains the build id string is not in the page cache, we would fail to get build id. Storing the build id in file object solves this problem and helps us get build id more reliably. > jirka > > > [1] https://github.com/cilium/tetragon/ > [2] https://lore.kernel.org/bpf/CA+khW7gAYHmoUkq0UqTiZjdOqARLG256USj3uFwi6z_FyZf31w@mail.gmail.com/