Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp551058lqp; Tue, 11 Jun 2024 12:00:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBB8E2xw519DI4cptrOlmTWmg6412IahHEpco4cs1KTSKjUg2Ro+/HFb3EQNksp9ixEjLU9a3e3LufQWtJLv06/VaKf/jHq2zF/UW0zQ== X-Google-Smtp-Source: AGHT+IF1Q1E4Z27slr4nfOHey7mIkWvOxN3pdZFNjKyUmtmnkxlpF++Cq5+JPaoOGL4dkgBuh9aF X-Received: by 2002:a17:902:d504:b0:1f7:1931:6123 with SMTP id d9443c01a7336-1f719316628mr69067225ad.38.1718132410743; Tue, 11 Jun 2024 12:00:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718132410; cv=pass; d=google.com; s=arc-20160816; b=eObFIfkLL2qgen7x0othjqpVNaZmyuO7TIQUYqISkLiKifKTDp2G4tYK3oS4AVgdTB p+k9UkQ1Sym7Ju3xjEK7SzTjxoZ/vHhL0pLai13tNeIKz0X1dyk8bhZc379GGWx0gzXg Q+P7rd7hooOuvwAOLkGiYUbe3s+6KoTSN32EHL+BHPz+gvEDbPthlhEiiyCNgu5Z6ldm kqLrqH0+s/So9JzdbD/Weio225n5kb0xZhadTuuPUYMbO5XWSi51/K/+csloHsYWQpkB On8B1NjIzfpQupUstAUov3SWK8qsVcMlxYBpXkpi1yfPONs6Farm8U9pEke7uQjJgcSf 40Fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=vH+e3oLjYKgjh/NF0+F3hNDMBS6gfTp/YjQme6nvaM0=; fh=EIg0Bpe3FYDnDYWpk0HgA+NsVqIundMoMfizs6Us4cw=; b=N/eJ90dz5nP366E7iWDTpNMhpkpwjMBHggGqYkDUrI3jK2f8oUvIkSpga/VhKFS3X7 Eg0QOrkR/iGSP63mxpr2lWWh8siRdoRN7/6Nn/lDGBVgU0s9r/YK2EuEYdweMyQCV5w3 6kE66ZmS01Pe+VXOKRO2ZzzvrmXaTNdKc6pneYWsfxnb912rckACvhSO0Ul/W4q6W3gj 7BGlYXG0MP0ZGDGpDsEsLYxape2qw/SKjuJ3oCOPAJJEv3rRMfxjPVH1/XuwAkMvUBIt oFLIu9lM3QlgE+ulsGe11KU222sLjgtsmKZibm6xvqpvkWYQrBk8l6r7MS+acal/Kv7W /d/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=CpNB9mt7; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-210477-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210477-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f722cf7866si25237135ad.113.2024.06.11.12.00.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 12:00:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210477-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=CpNB9mt7; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-210477-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210477-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 430D9283C91 for ; Tue, 11 Jun 2024 19:00:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDE3D7F7E3; Tue, 11 Jun 2024 18:59:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="CpNB9mt7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F052B7E563; Tue, 11 Jun 2024 18:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718132392; cv=none; b=c28mNAfP2TZFOv3IaDOWDyvojR6HamBcrn+l+9Xi+UBKT8AoSqb47hLUVzuyP+jT+RDaBz95w3t3J3OixSPeY6S/fILwrgo16Vt4xl5X0g55m0maY9FXtFFl1bYIxD9RNU2qovtljb3gsp/H8xi5guZPNzIljfWDbTkcQS1Lc/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718132392; c=relaxed/simple; bh=Z0AdnMQuPM/Bin8KMAQKa4YF3YN0x9Dx2QEDp/iveXM=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=tZEyzTgq5Mi5g0FYEv7jOgWx/ofYErDii10SxJwZwnKEVqhGWYS3JiyW/KO5KU4BIDIqc4SHF0Ff6OelGjZYnh/A8PZP9CTMvF8G8uetaoPS6DB6grzaySSKt+g9MRF4S3VAWG1HeC1KUovrPdvnWtuzr6v5P1Stmxd58Wmonuw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=CpNB9mt7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D6CBC2BD10; Tue, 11 Jun 2024 18:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1718132391; bh=Z0AdnMQuPM/Bin8KMAQKa4YF3YN0x9Dx2QEDp/iveXM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CpNB9mt7iK6m7a1s7BE80uyrEbYDQ23XIzOC8afqYvNTO/jYEX7DS+XoovRYE4nem 21ezMNwnb8PmAtxttYf9hkWWH9L2USPR8Tcjiz4WqqFzdRWBd9tWstqCEEiEyo23ZW r4O8+3h8XCu4WEkmDHutyhpGUbbwi6EdYxOnu5jc= Date: Tue, 11 Jun 2024 11:59:50 -0700 From: Andrew Morton To: Andrii Nakryiko Cc: linux-fsdevel@vger.kernel.org, brauner@kernel.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, gregkh@linuxfoundation.org, linux-mm@kvack.org, liam.howlett@oracle.com, surenb@google.com, rppt@kernel.org, Alexey Dobriyan Subject: Re: [PATCH v4 0/7] ioctl()-based API to query VMAs from /proc//maps Message-Id: <20240611115950.35197b36eafe0a804ecaa0de@linux-foundation.org> In-Reply-To: <20240611110058.3444968-1-andrii@kernel.org> References: <20240611110058.3444968-1-andrii@kernel.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit (Please cc Alexey on procfs changes) On Tue, 11 Jun 2024 04:00:48 -0700 Andrii Nakryiko wrote: > Implement binary ioctl()-based interface to /proc//maps file to allow > applications to query VMA information more efficiently than reading *all* VMAs > nonselectively through text-based interface of /proc//maps file. Looks nice but I'll await further reviewer input. > > ... > > Documentation/filesystems/proc.rst | 9 + > fs/proc/task_mmu.c | 366 +++++++++++-- > include/uapi/linux/fs.h | 156 +++++- > tools/include/uapi/linux/fs.h | 550 ++++++++++++++++++++ > tools/testing/selftests/bpf/.gitignore | 1 + > tools/testing/selftests/bpf/Makefile | 2 +- > tools/testing/selftests/bpf/procfs_query.c | 386 ++++++++++++++ > tools/testing/selftests/bpf/test_progs.c | 3 + > tools/testing/selftests/bpf/test_progs.h | 2 + > tools/testing/selftests/bpf/trace_helpers.c | 104 +++- > 10 files changed, 1508 insertions(+), 71 deletions(-) > create mode 100644 tools/include/uapi/linux/fs.h > create mode 100644 tools/testing/selftests/bpf/procfs_query.c Should the selftests be under bpf/? This is a procfs feature which could be used by many things apart from bpf and it really isn't a bpf thing at all. Wouldn't tools/testing/selftests/proc/ be a more appropriate place?