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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE039C74A5B for ; Fri, 17 Mar 2023 21:14:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B78496B0075; Fri, 17 Mar 2023 17:14:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B01586B0078; Fri, 17 Mar 2023 17:14:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9C7A76B007B; Fri, 17 Mar 2023 17:14:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 89EE36B0075 for ; Fri, 17 Mar 2023 17:14:28 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 4F21BABD91 for ; Fri, 17 Mar 2023 21:14:28 +0000 (UTC) X-FDA: 80579643816.04.F967C2F Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) by imf29.hostedemail.com (Postfix) with ESMTP id 5BA45120018 for ; Fri, 17 Mar 2023 21:14:25 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.org.uk header.s=zeniv-20220401 header.b=ThJc2vpS; spf=none (imf29.hostedemail.com: domain of viro@ftp.linux.org.uk has no SPF policy when checking 62.89.141.173) smtp.mailfrom=viro@ftp.linux.org.uk; dmarc=pass (policy=none) header.from=zeniv.linux.org.uk ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679087665; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=cHqfWu/5jLA19Bc4SPAq+8G3pCotHNCQZAShat/fUf4=; b=Qu0LNFFdaSatdrX6vBRKVBwl9QMe67+hhChyLGazg6FzT4k0iavk+HUqtgMYFmHX+PdvPg pzMOSqwMeAYvXfjD6IM6mlvaJ4swfo3hl/xTyipJHeiKQaOL2KTvTskntQgaI1RrOiKvq6 R+TXPk0nLe6qnj1SD5333wLEg+z53Ps= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.org.uk header.s=zeniv-20220401 header.b=ThJc2vpS; spf=none (imf29.hostedemail.com: domain of viro@ftp.linux.org.uk has no SPF policy when checking 62.89.141.173) smtp.mailfrom=viro@ftp.linux.org.uk; dmarc=pass (policy=none) header.from=zeniv.linux.org.uk ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679087665; a=rsa-sha256; cv=none; b=B1BIsFR4fwQqgmdJjUepu0ibVetvci4XmaupsDcPogR2by3Lim+hZAewQ2UJvoQ3HgdHhk VwqbN36vf7A1oQmZ+a7zxNx0d6uVSrObuFjkQewwWo3KaDlfav6YrMMnMIVEm3thGZU9yK W6//YH6D2Qfq4Edp3+kj2XPNky5VJaE= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cHqfWu/5jLA19Bc4SPAq+8G3pCotHNCQZAShat/fUf4=; b=ThJc2vpScZAiBQxgjZDotCj6p9 DTMXzCRy/yOVCF1einZD1BU3rJhnQlNH/lx0rME2jZK8WR2dHAQCIrEvB7h+6AuCu2BbZMhLp0Q00 nTH6K91KnBffoDwCNL9mWkxkDt119Qqu2/YNsFWqzbKjFjUHE0YRZOL0HNo27frzNWUMmSiPS/RrA vaJ19v53ST1t6XJKO8KVCuiX7sa9MO4YtCw2PcXkZt7xKzB3MGXTHTztFzp0+U4jZWfUduusForhh XiwJ6m3g2kURSNAnW4uDwXALalBS5zSd/NEhT8m1wOrCLKqKICf2NMWUdxUCp9JkxOHQg9ozJu8u/ ZOqYY8aw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pdHOl-00HSsX-0w; Fri, 17 Mar 2023 21:14:03 +0000 Date: Fri, 17 Mar 2023 21:14:03 +0000 From: Al Viro To: Andrii Nakryiko Cc: Matthew Wilcox , Ian Rogers , Jiri Olsa , Alexei Starovoitov , Andrii Nakryiko , Hao Luo , Andrew Morton , 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 , Namhyung Kim , Dave Chinner Subject: Re: [PATCHv3 bpf-next 0/9] mm/bpf/perf: Store build id in file object Message-ID: <20230317211403.GZ3390869@ZenIV> References: <20230316170149.4106586-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 5BA45120018 X-Rspam-User: X-Stat-Signature: saexijfj6ta39p1d3w9wytxqd5yqbrdc X-HE-Tag: 1679087665-891523 X-HE-Meta: U2FsdGVkX19v4PsVV2PTPmbX7DFPgYbIdyA0dyA11bLcPvGJ0Cmbto89MBNEj8kP3KyMbRkk0RV0aw6TBvCV+Y+9kk4bdMc5Zt09BteUTBTWofUU3SXmVyoQBU4Dtd0EA/Tl7IRuVSiEGWYoLphlVvwGoPgh8gcEPlP2JKU8ayxFgh/2ZWomJD0Jdi8O8tBedujgroV/eGsGRBOiMoJhvOVB804n+LT5V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Ua5gH8pka6vPAyLt///rznXeDef6drSmzSdzHRjSEAyq0JQq8UccoCcWAUOgBMeezOa1MzNGA2xQvBqqN8iZNug2ikRINUKcHvjZsIArxLgWTk6/IIo4l4Ylah7FoWT7GXw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Mar 17, 2023 at 09:33:17AM -0700, Andrii Nakryiko wrote: > > But build IDs are _generally_ available. The only problem (AIUI) > > is when you're trying to examine the contents of one container from > > another container. And to solve that problem, you're imposing a cost > > on everybody else with (so far) pretty vague justifications. I really > > don't like to see you growing struct file for this (nor struct inode, > > nor struct vm_area_struct). It's all quite unsatisfactory and I don't > > have a good suggestion. > > There is a lot of profiling, observability and debugging tooling built > using BPF. And when capturing stack traces from BPF programs, if the > build ID note is not physically present in memory, fetching it from > the BPF program might fail in NMI (and other non-faultable contexts). > This patch set is about making sure we always can fetch build ID, even > from most restrictive environments. It's guarded by Kconfig to avoid > adding 8 bytes of overhead to struct file for environment where this > might be unacceptable, giving users and distros a choice. Lovely. As an exercise you might want to collect the stats on the number of struct file instances on the system vs. the number of files that happen to be ELF objects and are currently mmapped anywhere. That does depend upon the load, obviously, but it's not hard to collect - you already have more than enough hooks inserted in the relevant places. That might give a better appreciation of the reactions...