Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp263654lqp; Tue, 11 Jun 2024 04:02:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX8gxY8Chs04BQs413AIPIjdkw9vYrjH/Sr/b6sSrXrQ4SjpQh1OIr7LzJr9Lm8V/CjnSZLuqwFFMqUklxSPTNBESJCci0CVF0TaT5vCQ== X-Google-Smtp-Source: AGHT+IF1TRpYYKS2ADQf8sSihfZj1iCe2N7aGo4bY1ugTNxbOVnAWBCJpoOSvBkK4wGURcxN8zbh X-Received: by 2002:a05:620a:1792:b0:795:81ae:e0f2 with SMTP id af79cd13be357-79581aee3cdmr738748785a.2.1718103755795; Tue, 11 Jun 2024 04:02:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718103755; cv=pass; d=google.com; s=arc-20160816; b=JknvhIMztVsIudTbzMQJ4R44wvh/LwTTk0OkpLwIFLzftBh0r9JavMDUJ1PMQxBBb6 vmlEUjkxuWGU/hn1KbjgRlBan7eNxELT9USWS/ptYlPx9AjktOxn+0AeR9pfxGhPwtJN e1MgdK9c8fKzsBx+MKhE2egndAAaCVngE/va5hhvYKUescV1sGlxvlKl3efbGQUgSjea yU+vFOOdpsXuMLHyz6tzXNC6rGkbTjm8vrr8a3vNeGZldt1MP7ja1oTgSSVciTNdvyvY oWyQ4h2sburQ3y5crcbkJf4G5DYSjEmkholDrF51f+3DE+1VnBBZsgpm3ktVtBKukSPY EeiQ== 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 :date:subject:cc:to:from:dkim-signature; bh=uaSDq1lGIzGZFGTm4J0RFROnpeOyP4Nkt1fRMznsfm4=; fh=Y/y/ztjXR7aEronvE26r4mZ0eg4Xsop0N9w5JVKmVVc=; b=ShaKfmHddSvQiLEFF/qPxogpjfoeI1IEoVOyEP0S/t9+65q+HubVispvPxTL/3/Luk qOTYfTukbaWujNzppdFy/dQacrrQoahj3gO35r+TxBZKnyB4QK4KLakIbROxkoXJEs5J nS7pAGThks4AXL04V/lUCCikCEeBCpDYAtJjPNIE623q+jftO1UHYp9AIIaohb391Y9s cguwMS8l++kkdZAJYHg+N7UvgmN/OFo7RhyFXfftWTJyA/ZnSOK5+p0X7Wp8n9R0usql 5MH9I6ryofWoYytLwFTLVOBETD4nTREdEE1bshNuxq/UPQaCRcnlYQQfiA57dXMJp+WM Vjcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Foktfj8Q; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-209692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209692-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-79532894570si936901985a.222.2024.06.11.04.02.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 04:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Foktfj8Q; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-209692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209692-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B42221C21EB7 for ; Tue, 11 Jun 2024 11:02:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0817A17B511; Tue, 11 Jun 2024 11:01:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Foktfj8Q" 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 2455F17BB2D; Tue, 11 Jun 2024 11:01:14 +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=1718103674; cv=none; b=f16xh1h7UVbEkeZdd2/Tp/riBI3Aw1QtSIn+LaE7XNSSsXeyVLt1eeonhnOr2X7xvqCPa4leoMBUgVQeu/Tr6EJBwRWR1Sh1Xb/tHiY6TLjCfr1OzY5Po/ZbxvD3lIbN5PpA0UjBrTNTSTXFm7HIzjFOmRV/7MRPLZjy3x+MNvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718103674; c=relaxed/simple; bh=vBH/6OYdVjsNNyjp2pikvMXvKQezYlNPmAqHiQSiZF0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ui+sVjaOV/Z4dYj2vrSmbDYbkgKcSt/blORZc9ZYbhneqpUEwjUP/Fx/7sFNDcmQxMiaTQ0FfUIJbPjhlvmmtN+ElVVBU5N+VVSx/AIBdLH1PVh/k/dsv6fdhCmZEzx7+JzcWct0yPf5yjFbV2B0xbRkl3Rebaw2rIw4+3FDBDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Foktfj8Q; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C79B1C4AF1C; Tue, 11 Jun 2024 11:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718103674; bh=vBH/6OYdVjsNNyjp2pikvMXvKQezYlNPmAqHiQSiZF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Foktfj8QEBkhkirvVOBKEf6XICDJq6ObR9pscnonkImbxnlWTGr+tmP5foto8XmEs JoieWu/Q+B5NF5ppUo3rK96S6DYaVxtt8zdpgPWcXb9MNP8J9Y6/imP934OE7VMnNc Rke55cMw9xbBNa0vw5kM/EP0l+vlE3ax5ezQ+Pg827CfLwaSeWk2qSXGPeiLibAZbe DHyZrsCQOX/GqneNFqoU46MnMxtUEjFcwKNRr09+xmXZMu3GHEcXqTA7vnJ/90mQ+e 0aQadq0REIZuepZIkD46DlaV2S/RRDewk1IE9M91fzJQa2ADAjjk2ifEm7ejw2KCA6 tH1SJ1l6Wg27w== From: Andrii Nakryiko To: linux-fsdevel@vger.kernel.org, brauner@kernel.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org Cc: 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, Andrii Nakryiko Subject: [PATCH v4 4/7] docs/procfs: call out ioctl()-based PROCMAP_QUERY command existence Date: Tue, 11 Jun 2024 04:00:52 -0700 Message-ID: <20240611110058.3444968-5-andrii@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240611110058.3444968-1-andrii@kernel.org> References: <20240611110058.3444968-1-andrii@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Call out PROCMAP_QUERY ioctl() existence in the section describing /proc/PID/maps file in documentation. We refer user to UAPI header for low-level details of this programmatic interface. Signed-off-by: Andrii Nakryiko --- Documentation/filesystems/proc.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index 7c3a565ffbef..3a86d12c881f 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/filesystems/proc.rst @@ -443,6 +443,15 @@ is not associated with a file: or if empty, the mapping is anonymous. +Starting with 6.11 kernel, /proc/PID/maps provides an alternative +ioctl()-based API that gives ability to flexibly and efficiently query and +filter individual VMAs. This interface is binary and is meant for more +efficient and easy programmatic use. `struct procmap_query`, defined in +linux/fs.h UAPI header, serves as an input/output argument to the +`PROCMAP_QUERY` ioctl() command. See comments in linus/fs.h UAPI header for +details on query semantics, supported flags, data returned, and general API +usage information. + The /proc/PID/smaps is an extension based on maps, showing the memory consumption for each of the process's mappings. For each mapping (aka Virtual Memory Area, or VMA) there is a series of lines such as the following:: -- 2.43.0