Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp312655lqb; Thu, 23 May 2024 21:14:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPgePJ6z7tradygVVG0RwEXPZEhk3Ta54rK5BR2bVSNeMVl1fEaSR7VbOCmX+vZ2xWafYf0FTZFrSnQYq0OArOP02cPv6ZKuLo8GyaGw== X-Google-Smtp-Source: AGHT+IFXK0gfwSAZUN42yVvx9TYA6GG7qP4LPSlAjWrwO3LpfCY6k/WecOyQ7DYzb02dWE/l3KZu X-Received: by 2002:a17:903:228e:b0:1f2:fee2:82ed with SMTP id d9443c01a7336-1f448246e73mr17377865ad.30.1716524055206; Thu, 23 May 2024 21:14:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716524055; cv=pass; d=google.com; s=arc-20160816; b=Kc6xDAs7DIbjHH8HmYBRgWJvybKHgM9TvIICVQ8FGTRuEkTxWNcB4B9mg16KEq1Tb6 GEo5adNxQ47gBmJE9pTBbvTMRT3PuySGsr6MvmZ/c2exCwJmUMsQApsawzcVedEsrSl7 8F08JXt2djLLIunucHPXeaV2vvroZJgcReD10vhO0gDwlFu4RnFgQtg8paT5OXwqXddr awvLuJu8ELLUfoozAkWME5m/9ZPyO1Dwu/9vzHQqU9trkUrX9veBIkq5nw0vwAJ3Hcam iI1ajdJY1pU5h6xyXgRMsZdhAxMt2UI9FXnXfdusA/g3dICbI6d2RkE0r+u3/1jCPyHa koKA== 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=tFmzoEWiGg+WKc3QXHRY2btZDHVddgYWGP/9GFz+4YS2U4SLvsdVVIzXD95tJSvinE 9Dz8z05YM9n9mu636liN2rlEsN+y0QI3iikRAx0gJmqTnvAHA7ndVtesU7Dtb2HQQ630 RveeF0ysPTg+JCrGGKJEUlAr3T21fRpjITX5IaNBzgVRKGj27hRhijZZhP969uYxFXn0 52hFtTL6iUH7jAUn/K5pHE1O/q48mCzyzzEzvgpAlpMus6WWFr73CREsekbI+OZWXz9b yG4PKLmZOm0Rr3cSblB5apNgXgCTcIGoA2a+gulhzafMcA2bYHMl8pVcl+FrR28kwFvM n8TA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X0X12B5Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-188300-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c790b21si5900425ad.80.2024.05.23.21.14.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 21:14:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188300-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X0X12B5Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-188300-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188300-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6464DB20E5F for ; Fri, 24 May 2024 04:12:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED85D50263; Fri, 24 May 2024 04:10:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X0X12B5Z" 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 172963A1CD; Fri, 24 May 2024 04:10:57 +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=1716523858; cv=none; b=YFVmSDdi3bpRrjLAurCC93y1zhKyd5VPNXQhJNGIMKUO4PU49P5ze5kdrwhqAxwvyI+Y+vvEMgRCwN5QvXvjHvcjY7zZ9gyl5SsDGMdgKht4AQgs5urO+QYmBry9LMyIZuzwbSULfJ//LkoWrm1/3BY1+wkb2ygqIqQm1J8nBpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716523858; c=relaxed/simple; bh=ZB4t6JlnJmyNfXJGfSg5ESgmhwAqw9FNf1Hmazm6kO0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PWjAzbkBRqKD6qD77U+gOVxN3tewBOHtl0YibBdCBpxOis+y0lz4jhOiRBF5ivAIatr4eJoCElOnYUCXuoRkoc8/l4X9LlWq37RPFpKINgiDFLGYuxNoUzjs7odVTa/Ikjon1eAvxxvlWAXFpLbdVEi9i07RgO4p0dWTglpxCx0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X0X12B5Z; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FDF9C32786; Fri, 24 May 2024 04:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716523857; bh=ZB4t6JlnJmyNfXJGfSg5ESgmhwAqw9FNf1Hmazm6kO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X0X12B5ZJO7+/PmdMn4HdgAZbKU1NH+gvRopfoxD3GC/v/a1MKLtcxCgm4Fxl6zGU qiUBA/ew+RLkhKXqCxfCoAtsqhZfug5eG/NEIJzm6Sfw5g/TB2YS7fi8zcPdA+H6yR 8aUMuRwLuaddhdyOI3zU3vqdBvUXESYGPsbc4SLxHsg6g/RIWLXqlkrv6CgVPLuBtP LMaN16sNkRBz0sg5eqjHZk0ktrW+4MXpk3AE9CY7C7W95zL+Jyq4tz7yLQNHRPYNMd qsWmQUdn70zaWixVwAf8AOsxjk9TE8dZemBTjpQx6cRp+oA7vXVeYIIkCz7X74raUB 8GpR/4E/3s9qA== 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 v2 6/9] docs/procfs: call out ioctl()-based PROCMAP_QUERY command existence Date: Thu, 23 May 2024 21:10:28 -0700 Message-ID: <20240524041032.1048094-7-andrii@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240524041032.1048094-1-andrii@kernel.org> References: <20240524041032.1048094-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