From patchwork Sat May 4 00:30:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrii Nakryiko X-Patchwork-Id: 13653691 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 4FA4CC25B10 for ; Sat, 4 May 2024 00:30:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D87116B009A; Fri, 3 May 2024 20:30:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D375F6B009B; Fri, 3 May 2024 20:30:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD8C86B009C; Fri, 3 May 2024 20:30:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9E5CF6B009A for ; Fri, 3 May 2024 20:30:26 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 194DF801F1 for ; Sat, 4 May 2024 00:30:26 +0000 (UTC) X-FDA: 82078832052.28.AA90197 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf15.hostedemail.com (Postfix) with ESMTP id 149DBA0005 for ; Sat, 4 May 2024 00:30:23 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=mEFOCn6M; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of andrii@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=andrii@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714782624; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mvVGVT6MCss+2/h0HFTvcSkj9lK/aARweXx6f1UKJ7Y=; b=N1ngGT0OVfOayePWumQzpZdJV0B1CwkIqcrU0C/jsrZESNVN//HiYzwOE60eKSyeioj0Bn H54erXRkAH1IvIHATXFtNrgVhvF0tYUY9j/Cx16F0p8r1eUbdutTcKgCLGQOZxTBv0iCPW 8THeVfWrkEPumY9Q2lsmd7I3BBlPGks= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=mEFOCn6M; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of andrii@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=andrii@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714782624; a=rsa-sha256; cv=none; b=r9yf43K8HfW1OPsppdDvW+iJLwqE9ajVMR9ZhAEMtOfdxy252NWDCfe//YlAcLCnlx7fTH 62Si+lPWWXsy/CnamB4S490qRkMVqpP00R4+EfvsOhVX4ey8ijgU33C+s8IIFmrhVOU7uM j40tyaj1bjqXsMg+ng3Fs6gnDYPpE7w= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 0407FCE1A2E; Sat, 4 May 2024 00:30:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2A35C4AF1A; Sat, 4 May 2024 00:30:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714782618; bh=akE5P6xvZT48f5LRQWKFAyRAluTFD6SKWbtJB6gxXDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mEFOCn6M0/9FUvNcIDMh645SuA6hG0akoQKvB+ogesqfmOVkkryzy317thFixlYaT jT0pIGyWZec5FtbBb2fvSdERaUl+MA2M1GiODZsWdBqLdR2zAzt2TR1GUqAn8TgJ6c jtGuzWWJ8q5/TpHhLac5Df+dU4ptxTmZiiBA1VOXmgXkQ0+5v8eSxYTuoLpj92koNh aLG4yZedRRylNI0sepW39uw9NDJcJBauAHNY0kq9ZhmbPUPAQ5HWjbrP+A/QWCMhh4 UlFI5mCAFWYuZr40FZlblG//YUIcPds3/uSqo0HtePPOViVrumGVaDLsbMz2j7riB+ zH166DwWwqaVw== 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, Andrii Nakryiko Subject: [PATCH 3/5] tools: sync uapi/linux/fs.h header into tools subdir Date: Fri, 3 May 2024 17:30:04 -0700 Message-ID: <20240504003006.3303334-4-andrii@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240504003006.3303334-1-andrii@kernel.org> References: <20240504003006.3303334-1-andrii@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 149DBA0005 X-Stat-Signature: qw9iq3jrum65nxbwynzb9f3mszzh9ats X-HE-Tag: 1714782623-275985 X-HE-Meta: U2FsdGVkX18RR6JfqA/Wi0ii7gsDDXgc8kR9LPnxHijP+2r/eEZgYG1ngTOXwOuJVn3wlyAttmJEqxnFRSItxnFPPbeeDH3B2jfe8zQMEi/5bjqwK58x6+xZTvbd38IYkTVrstSoarxQsKXchMAOF//u6G/Hwpxrel7Q6N9hqjTDbioSJ+xM44Vc+vZplF1LvHPVA4XQR5dZPxNk1APjQQtQAHBaNN0Kvu9YO1aCbEi0ztjeO8iaqzITtmbFTa5+070wo/IGBY/BE+xiGCnB5ZySpqV+W4TkwXq9VrPeU99y5wFasR5+STib2BtGdeX8BXe/OKQP/CCNYc/TztOKl/Oz8Bt/l3fNn2EE2tqIdVpp2fDJlF44uN1p+2V+O7JHZpOp9l4RxoWZ2aRh1o4tGtBr8hn044hKUMix9b8Nj6mesYNg/YP8AD55ikzu4C9fMAtHgBB9c2hgRo3IU6p8x9mn3m6eHNv2Kc+MGURra3zVvFUjhSNIhWiA2Wj/xTJk4McZZUuBoVgeDbG8tVX2Vt+hg0KGH1JwPGcDGNuMDlbL5xgRP8wU1j97Hedi7/OFBAYe75TgkTwtYgftIQmdXhhUobtNG1yG5U4GWFalLWmrohP/oPmTRIQlcOpPnEg6h0dgM9L7xi4gRL6WJaB80ady3CxFVti/dsC/jd/r/9I/oUp+p+D2VfXfXjMfjg+nFZF56X8mTKcZOLKZ85VrC94S22eB8pPVKl7iSEx13nb7kqIixON2WQsZZVmH5aitbU3a0IvxCq2jIahQqLYHOIUEIyP1cwQj8u3aARbivTjh1eqSRqreYUZTJEGw8wr19wX4Dcjhq0uF7+QuOYWEKRMsu3+xlQmEdmOl1kSW5glQszkK7gAgcmyVxYqr9EFHCMHW+cyLsTxLV9sMjOSESk5+l42snhDwWXBl6QgebxcMVPYYOQsk3DVtJJncbxVxz8t5U15xvfNllSXkRn8 ExYy7Qda j0BxkYIzL4J5nGy5CWtkXgYSWiISKx22MDQx32uGXnQvIpGSGcafAHEnjB8G/b30q1S33CeoPX5ljHa537R+RpMq28IfuLCsEP/+qbpxbkOtqSC3qd+WNJjmY155NFh1lSW2raTv0jOpeMKyDNrYP0NCXtjyY9MFHrtdQo7PEeY0+zrpyV8qfolaCLVPxeKg/vrLHDGfPk5cTID128QE4OQ0yFEYvIDq6BFcO7az5z9/Kcnw= 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: List-Subscribe: List-Unsubscribe: Keep them in sync for use from BPF selftests. Signed-off-by: Andrii Nakryiko --- .../perf/trace/beauty/include/uapi/linux/fs.h | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tools/perf/trace/beauty/include/uapi/linux/fs.h b/tools/perf/trace/beauty/include/uapi/linux/fs.h index 45e4e64fd664..fe8924a8d916 100644 --- a/tools/perf/trace/beauty/include/uapi/linux/fs.h +++ b/tools/perf/trace/beauty/include/uapi/linux/fs.h @@ -393,4 +393,36 @@ struct pm_scan_arg { __u64 return_mask; }; +/* /proc//maps ioctl */ +#define PROCFS_IOCTL_MAGIC 0x9f +#define PROCFS_PROCMAP_QUERY _IOWR(PROCFS_IOCTL_MAGIC, 1, struct procfs_procmap_query) + +enum procmap_query_flags { + PROCFS_PROCMAP_EXACT_OR_NEXT_VMA = 0x01, +}; + +enum procmap_vma_flags { + PROCFS_PROCMAP_VMA_READABLE = 0x01, + PROCFS_PROCMAP_VMA_WRITABLE = 0x02, + PROCFS_PROCMAP_VMA_EXECUTABLE = 0x04, + PROCFS_PROCMAP_VMA_SHARED = 0x08, +}; + +struct procfs_procmap_query { + __u64 size; + __u64 query_flags; /* in */ + __u64 query_addr; /* in */ + __u64 vma_start; /* out */ + __u64 vma_end; /* out */ + __u64 vma_flags; /* out */ + __u64 vma_offset; /* out */ + __u64 inode; /* out */ + __u32 dev_major; /* out */ + __u32 dev_minor; /* out */ + __u32 vma_name_size; /* in/out */ + __u32 build_id_size; /* in/out */ + __u64 vma_name_addr; /* in */ + __u64 build_id_addr; /* in */ +}; + #endif /* _UAPI_LINUX_FS_H */