Received: by 2002:ab2:6046:0:b0:1fb:d597:ff75 with SMTP id a6csp88lqm; Tue, 4 Jun 2024 17:32:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWei4Iv8H+KDBgKPGE8vro6MJq1KDd+m/q/YVeJjDb+3AsaWf+ba36ACHu3R0BHghz3u6TJNcGUNgEQDwYPzQgH4RKTyR9BVP3WR/tSqg== X-Google-Smtp-Source: AGHT+IEfEOf90MsdM8SRBBIyiah293YGhbbmk+23gE3ldV4hifOOWkftbA2UNDIo6VQimGpa1nl8 X-Received: by 2002:ac8:590d:0:b0:43f:f238:f79d with SMTP id d75a77b69052e-4402b461a2bmr12655971cf.1.1717547551088; Tue, 04 Jun 2024 17:32:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717547551; cv=pass; d=google.com; s=arc-20160816; b=UrW0vk75H6Wm+RG0g1DHQ8hAh5gyFY8XNbcxmiE4Y+vpQ98juLTcr8LqGNwCRzxw4R VQMpPw2NONtORlrBUzORxO21Ybqh29NMkxXCESXOAKSygeCsdwUPFw9dVOF856/Sg9VY 8JLHDD5XMZseO+9pw3ey8KfQW2SFAUH9g0ImkFawLIj8MysgmAN0QWKB+39F4K/sQTl3 nQ6oG4shdiD4LLJT61FtWsazUY0ZhW/yYJS5hH5t+kW2/HjXn8HKFcE07tQkppdrxWMK Gx/zsJT9dC+gTjLQjN0bmrTkVQBwSvv4k3EVI3Rb6tPuukw3Fjam/oqo3lhQN+UPX5fj lX6g== 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=jjT1GSMCV5Nk8FWrC1MabZZkWiIxjy54HlrFMrQ5rxk=; fh=Y/y/ztjXR7aEronvE26r4mZ0eg4Xsop0N9w5JVKmVVc=; b=u0VQi/o5jbxi3n7JGTY7GVuqwAsQls4sB77ORVmO4NcCFfHXnOTQr8S7guoWNVgaiH 1fLgedQenuuNWg/OCLHZ0OjyO38M7/6iGPhVs0JaE3MJqApg7qKIorWV+c6QAY0TV9R5 AadTfg1i2leSUlvEW82+iLIM4eFPuq1/Rbbmlcx7qFgdE6EeDc3s4wRxE47yxM8yIpDo +qOlezPjnEriSoRrU+TDvXcQ6staNRg/B5jJ+dco0u55KHz+06F6+c9Mxso6RybAt2dA xNhe6bDK5nMYEF5lE3SyIjh/L+vh1Th5zk1jeajV06rWHfLaryUv7/SASzJj+G014IU5 5IxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OjIONyKY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201615-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 d75a77b69052e-43ff23ac765si41673761cf.80.2024.06.04.17.32.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 17:32:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201615-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=OjIONyKY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201615-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 A44F01C2259B for ; Wed, 5 Jun 2024 00:32:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69B9B107B6; Wed, 5 Jun 2024 00:25:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OjIONyKY" 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 8D77AEAF0; Wed, 5 Jun 2024 00:25:38 +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=1717547138; cv=none; b=AcS3bvxB81QBIJAwLHs5JypDHcaIsrkGNkDR9dl7xW86KOP94zQRczNUbc9Zi4Aez2B4SvsNrTieEaRy0PtxRl2iNiTjTaO5kM950hBSVGKUUiTpSFlUL1xb8MUXxf675JeQHaK+/+/85Xgj2wYR7IkjwZXyL64gzG7fJrXm2pE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717547138; c=relaxed/simple; bh=ZB4t6JlnJmyNfXJGfSg5ESgmhwAqw9FNf1Hmazm6kO0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CSP27qhTxNc7bFFjgyGN6ELh8ikgaidTHD64j4EaxadDeLx0XnnRPZ+2SeQmiaQg7x2ROHgMbdXg2TJr+d6sS6F0ituOdx0jk7sJeHRjkJw3tt0IgIpnKIUeq6pK7ZWLsiKo/FxkYegWe5Qhpbmg40l4hmsHF7o4KqsQ7osDzz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OjIONyKY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F9BAC2BBFC; Wed, 5 Jun 2024 00:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717547138; bh=ZB4t6JlnJmyNfXJGfSg5ESgmhwAqw9FNf1Hmazm6kO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OjIONyKYr0+xpTgXOjcVF6bOu02uR2+txTrRdm4Ixq+QkB+2eXEz0kuSKxOnhbNv+ n4Mw3XADEz/zMDgWgsnoCtNCX+wDYNP/uoyMk2FDPgaQ1IfIloSv/lZSECMlFyarar DpohbGRGcfJaJ4hdzHB3Tratzz77+u8gEQDjOEuiJw3aBaKwuO1bJZ8X0E/seeHgHX q2cx7mBYyK8gJ5dFXkXh8Y9Bxu99EhogGZY1NuRAP/ayKfGAuOcbZy1dmBkpKT9YW0 wz7tZsETraSeriNv1SZHfrH06MX7u9Gc8yZ7/mlxd/jNwiW4Z3R2XTqq4QIB08cT4I kLfEN+PJfbx9Q== 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 v3 6/9] docs/procfs: call out ioctl()-based PROCMAP_QUERY command existence Date: Tue, 4 Jun 2024 17:24:51 -0700 Message-ID: <20240605002459.4091285-7-andrii@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240605002459.4091285-1-andrii@kernel.org> References: <20240605002459.4091285-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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index 7c3a565ffbef..f2bbd1e86204 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/filesystems/proc.rst @@ -443,6 +443,14 @@ 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 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