From patchwork Fri Jun 14 02:30:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 804683 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2086.outbound.protection.outlook.com [40.107.93.86]) (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 C22801836E1; Fri, 14 Jun 2024 02:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332227; cv=fail; b=HQFJCv91yVRavYYY5WitBpzSbnfyVQ1ST//75koFzxfAGDy3AvltSlN6sai7p1Qu8dn5MTMEs5qdAuNpKD3RzYPdFeRI2JcD8SMms3PfEyMf4vLql/IlB1E1wJ1mhrC84Z/tcbAkCeZ4ExryjYTLp9XQyqOwF9kN9nqDFkQn9RY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332227; c=relaxed/simple; bh=nzg2s3rjz0B1UeiVMDdEWpPXwFGw/HMBxRd5c7n9sVE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=YhcKiQbWlwtgpiHe9bFgTh/ljp/5K92hKYQEzw0Vs0esUBi8gV+37IqnF0d67xvl7mHovmF1XvTcUvZ4cEG+6bMUfxdu6ILlHnKoUNkiSO76cbU1/9HzZIkctu27FcqL0jTQZvS1llYlJO41CwOwOwc9XWEjtAnFOoBmonGLxAk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=VyH2OoCK; arc=fail smtp.client-ip=40.107.93.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="VyH2OoCK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ia+KAlpr4KHyVH8Fz2DupwZ+3mO8imjxAcB4mqvD3O0+y13sBgaRYdABo2+qjUR+sgRCxLjJ2wGExeyIanUYuqeygAsxKkmJMqzZc3dy0Fxq1SfYkwB8nijQDM+OowwBuHrkE6BB4j4vWyayZ0UdRjMIU7iOOrvbesSiGXgD7tsVd0vbqBfbAjKaRw/FYh72KgsTf4c1x0zyMSX/IHZsmTBhT0UPQCHMGwFVQ3cVzsi74AtwCvu4cMpzP1mYtmz6E6K8a6ifkBmD9XMoMF28Ym3IknCwxppPe3EX+oEAVqnFHx7ugJgcK2HmTN8UIueOvjERn+duaZfU5Y+B3X5/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0/zjSJMPwPRfSrnEgDC+WhbZiIld+wnTeetp4tazPdo=; b=RbshwjQTZmRxT2fCFu7kVFAiw5MdbKxaCPrH7LSj/K+0r+Y2fNqdarIqertxPEBgho+l8CFQy6GWfZfuKPiBbwAaAqbCI5ACoAZ2VKCUWpX0s7hxA+DS+j6oI/Y1tGcUcmhQpQCjOJwc51afKV8B866Rc+GEczs0LHGSq9jcp06n3JHS+pw0hNgWwc2cf8RkVw4zeUbQqQRQ8zdsu7TfF+hlIR4Z74+DGSEjoSfw7LdxGj/IJDAAg+kXWiGkPlgccVeawL3OFYH23wDT3KeDQUl+J3WkyxiXZKDz9p2sh4ZerU/wP2gOaZq+jDMhycGIM42FT/xC1tHEK4AM8sgHDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0/zjSJMPwPRfSrnEgDC+WhbZiIld+wnTeetp4tazPdo=; b=VyH2OoCK5aZvluJ+9MBcJ0CGBW+TnBGRfSnphNxY2xdmOMLv66ifwq+4u8O+ziKXilG8Qy6iEvkrxbHC6vVgIiJxKctpC3tdTyORFBLXxSRP2ANIHZsLYr6tI3Yk8XjxGENPRZX1Y2Pn/7JCxTK5O/G+lmR1TEBznlLIDFTrdZ5eZ5BpiBKjnk84G4tpOnHRNLBsdMaPo5CdCIrMEykvjnr+GPQ17bmEQGgGTt1On5nL4YhXTWUMUEsndWNVWv0xCGz2w9Fb25ksJn2Dw4Gc/i+y8GTmDPrUftZE505Bj1itD4GSpkEUIVmsh2+MNCc1dlmIR2pgJhYdaxrtKcaDMQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by PH0PR12MB7932.namprd12.prod.outlook.com (2603:10b6:510:280::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Fri, 14 Jun 2024 02:30:11 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7633.037; Fri, 14 Jun 2024 02:30:11 +0000 From: John Hubbard To: Andrew Morton , Jeff Xu , Shuah Khan Cc: Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML , John Hubbard Subject: [PATCH v2 1/6] selftests/mm: mseal, self_elf: fix missing __NR_mseal Date: Thu, 13 Jun 2024 19:30:04 -0700 Message-ID: <20240614023009.221547-2-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614023009.221547-1-jhubbard@nvidia.com> References: <20240614023009.221547-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR13CA0150.namprd13.prod.outlook.com (2603:10b6:a03:2c6::35) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|PH0PR12MB7932:EE_ X-MS-Office365-Filtering-Correlation-Id: a237918b-bd26-4e06-b461-08dc8c19eaa0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|1800799019|366011|7416009|376009; X-Microsoft-Antispam-Message-Info: A/CTa7JrUkn99wOGkNFNnCfRjV7+mPe0gxTesTtba2ZBywLV0DUpx8JHmuQZGSnDfwq6vPhLZ7bjpHGwbZ8gwmGCqXhil9YnuT+fbNioE8ju+FslikoBN6pLFBMs8oqq/S4TAW5vallLR0U5YB2PR0a19qGPDU0vfUrTfuIbqlVU/Tzjt6nfRHnSRPKzKCbzqh+XMHp3amJ9l/h6sFqZqfcm24G8R5lj7j2WHPS0PDleAt1lN8nJenX5D2CbhilfqQskEwduRsR0wihiFEe3bca6aCo+bvG3Mac8iLJ6+yH6ZEUBjI+/97YJk1Gkt//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V:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230035)(1800799019)(366011)(7416009)(376009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5kLdwgIHgIfE78gVq3yvBfUiLdbhx/eyaz4SD0frYGtpMXvwgWpeVYAJOltNTj5wZEo0/y4wCix0ATbOOFigPd4hzs9RpYg7nMBryNhxpWzZug0/VlPtAhm7XLbDKEGQZ7wL6Imnv2s4oumojbI3V2OkgkLGkSwkfmgsbnEZrDXQa1lJWeXD5ABqsjNH+LLsYUCasdJ0FbQ2d3zaigteWQFxatMJnpSV20ckdP1oBJhn6RVApbS9McaggBhyVCwQ5fk1X+qHSogBXwQGuhDIVAz/IEyz51GSAt4kCE70EdH6XpjGqZEM71YmZJfswk0xH9tQdrr8mhl/Q51N8hGVL7hI8bl6cJA+rXQQMlIJvMy8oL+KvDJGiqJT8TYF7uvWYn14DV6vt+2L+9r9xr6/5dmPsPJpZ31F+Yls662H0kLlHVpuNSc7quovqncOKvZOxEvyb8BC+rY/yfnV+Kv6i9SdQqi5sy3R+ji+Q0IVKCASqUkIYGEDCgSEegcCFoylwos6pctEoLAEUXaPfPdkvnJLXfgYQRN6mHqoLe9iMSWzAX3GjcYtQ2JDq0FmEp6HBRBrTsqTOSZYmF5lGdrDMWo4qi7wCpmrlMhYWhQWIj8ImyKftfxcsA+0ap36hlUnw2KoDO93g83J5SxNGy6tNQHb385ZQfYCT1rF36ESoMl7BcXWsnlvsW1VTapP16bVT7aKcnLizRm/iw6xvtZ5DQmI0FJFdq7Lh9XiRw0DAiCMGLS9/rkM4YeoT0EowXdio6+JGVremj0d1ZgAhqvPj5yAmd8Y6u6DbP3ZKCUUrSHeduGREeSZ/9cmtJrBDa9lewAEtnShxf7umbylDFze33XJL67REV2MWl9D8zx3lk5M3SoS4HRW/wGmmFjGmW6mBgyIqxn6LqnyH0RF0Prs4hjujyM4C7BG7sQBRqqThFhZnc6DggEMNYkkPNwDTN/UPysWmFUtlImVfQOino5pKtf5D5SqOuoX0o+8wl6xCovVgI456usc+tH/hUvCOfG7vBnnQpfc5AZcWoQPfC/FOW4gAiSrGIaKqPRQUOmrxdiyG8OoJZvBgOkklmavND71sGsOoR9Lnwh81eXHGS1EvioH0wAUhtkVueWInfYOdWICGnK7i/6UQvDgCymCqFr58i4AcY57bLs2tHyY3/cMZEsrNy3wq/IFyl1bGfAAvZfSMgeeK1K/aGq5XFeTTfmufeYfUI7mliQcZHT9aqM7kEyO4/bl0TCqY49M2EUcE1IclaUww/dNqVXg9hj+muP6ujH5NckOj8JtJEbwwilMQwFoGW3AiIY3qryii6mFBKD6/7A3BSHIpPgMojsP9htYruacyAcBoalGW6eUhwx6yxLb0ywIdrse8hC8oE8yTjp9hm7J7bRoCud53i+VIBkKUSeAE/okGBP10AsQRtcT1O46tDxNWP/OUmtvkmorxW9YpGU1t2KfebOH1ieFd0DPNjk2keCh+IVjqEwAtITDlrl+hP1oR8p07+sTBiD6xPE7JRvaEIoiyaVN5ZX1BPi+/5EZEir7F3kWMNhTkacZ8q0e6rlLxYXPtFG/4pahnnaJ4yVpmAfX1uEiF1cm/b0s X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: a237918b-bd26-4e06-b461-08dc8c19eaa0 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 02:30:11.8991 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SJN/ZfadH90jB3QSFVAqRHBMqUDmL+Z9epyleXLw23GPzmMJ6f6ABHjh3GH2XtoiZacu4Tv8n3FVbeeMl1PjEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7932 The selftests/mm build isn't exactly "broken", according to the current documentation, which still claims that one must run "make headers", before building the kselftests. However, according to the new plan to get rid of that requirement [1], they are future-broken: attempting to build selftests/mm *without* first running "make headers" will fail due to not finding __NR_mseal. Therefore, add ./usr/include/asm/unistd_[32|x32|64].h (created via "make headers") to tools/uapi/, and change the selftests/mm files that require __NR_mseal to include from the correct location. The way to do so is to include instead of just . [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") Fixes: 4926c7a52de7 ("selftest mm/mseal memory sealing") Cc: Jeff Xu Cc: David Hildenbrand Signed-off-by: John Hubbard --- tools/include/uapi/asm/unistd_32.h | 458 ++++++++++++++++++++++++ tools/include/uapi/asm/unistd_64.h | 380 ++++++++++++++++++++ tools/include/uapi/asm/unistd_x32.h | 369 +++++++++++++++++++ tools/testing/selftests/mm/mseal_test.c | 2 +- tools/testing/selftests/mm/seal_elf.c | 2 +- 5 files changed, 1209 insertions(+), 2 deletions(-) create mode 100644 tools/include/uapi/asm/unistd_32.h create mode 100644 tools/include/uapi/asm/unistd_64.h create mode 100644 tools/include/uapi/asm/unistd_x32.h diff --git a/tools/include/uapi/asm/unistd_32.h b/tools/include/uapi/asm/unistd_32.h new file mode 100644 index 000000000000..fb7b8b169bfa --- /dev/null +++ b/tools/include/uapi/asm/unistd_32.h @@ -0,0 +1,458 @@ +#ifndef _ASM_UNISTD_32_H +#define _ASM_UNISTD_32_H + +#define __NR_restart_syscall 0 +#define __NR_exit 1 +#define __NR_fork 2 +#define __NR_read 3 +#define __NR_write 4 +#define __NR_open 5 +#define __NR_close 6 +#define __NR_waitpid 7 +#define __NR_creat 8 +#define __NR_link 9 +#define __NR_unlink 10 +#define __NR_execve 11 +#define __NR_chdir 12 +#define __NR_time 13 +#define __NR_mknod 14 +#define __NR_chmod 15 +#define __NR_lchown 16 +#define __NR_break 17 +#define __NR_oldstat 18 +#define __NR_lseek 19 +#define __NR_getpid 20 +#define __NR_mount 21 +#define __NR_umount 22 +#define __NR_setuid 23 +#define __NR_getuid 24 +#define __NR_stime 25 +#define __NR_ptrace 26 +#define __NR_alarm 27 +#define __NR_oldfstat 28 +#define __NR_pause 29 +#define __NR_utime 30 +#define __NR_stty 31 +#define __NR_gtty 32 +#define __NR_access 33 +#define __NR_nice 34 +#define __NR_ftime 35 +#define __NR_sync 36 +#define __NR_kill 37 +#define __NR_rename 38 +#define __NR_mkdir 39 +#define __NR_rmdir 40 +#define __NR_dup 41 +#define __NR_pipe 42 +#define __NR_times 43 +#define __NR_prof 44 +#define __NR_brk 45 +#define __NR_setgid 46 +#define __NR_getgid 47 +#define __NR_signal 48 +#define __NR_geteuid 49 +#define __NR_getegid 50 +#define __NR_acct 51 +#define __NR_umount2 52 +#define __NR_lock 53 +#define __NR_ioctl 54 +#define __NR_fcntl 55 +#define __NR_mpx 56 +#define __NR_setpgid 57 +#define __NR_ulimit 58 +#define __NR_oldolduname 59 +#define __NR_umask 60 +#define __NR_chroot 61 +#define __NR_ustat 62 +#define __NR_dup2 63 +#define __NR_getppid 64 +#define __NR_getpgrp 65 +#define __NR_setsid 66 +#define __NR_sigaction 67 +#define __NR_sgetmask 68 +#define __NR_ssetmask 69 +#define __NR_setreuid 70 +#define __NR_setregid 71 +#define __NR_sigsuspend 72 +#define __NR_sigpending 73 +#define __NR_sethostname 74 +#define __NR_setrlimit 75 +#define __NR_getrlimit 76 +#define __NR_getrusage 77 +#define __NR_gettimeofday 78 +#define __NR_settimeofday 79 +#define __NR_getgroups 80 +#define __NR_setgroups 81 +#define __NR_select 82 +#define __NR_symlink 83 +#define __NR_oldlstat 84 +#define __NR_readlink 85 +#define __NR_uselib 86 +#define __NR_swapon 87 +#define __NR_reboot 88 +#define __NR_readdir 89 +#define __NR_mmap 90 +#define __NR_munmap 91 +#define __NR_truncate 92 +#define __NR_ftruncate 93 +#define __NR_fchmod 94 +#define __NR_fchown 95 +#define __NR_getpriority 96 +#define __NR_setpriority 97 +#define __NR_profil 98 +#define __NR_statfs 99 +#define __NR_fstatfs 100 +#define __NR_ioperm 101 +#define __NR_socketcall 102 +#define __NR_syslog 103 +#define __NR_setitimer 104 +#define __NR_getitimer 105 +#define __NR_stat 106 +#define __NR_lstat 107 +#define __NR_fstat 108 +#define __NR_olduname 109 +#define __NR_iopl 110 +#define __NR_vhangup 111 +#define __NR_idle 112 +#define __NR_vm86old 113 +#define __NR_wait4 114 +#define __NR_swapoff 115 +#define __NR_sysinfo 116 +#define __NR_ipc 117 +#define __NR_fsync 118 +#define __NR_sigreturn 119 +#define __NR_clone 120 +#define __NR_setdomainname 121 +#define __NR_uname 122 +#define __NR_modify_ldt 123 +#define __NR_adjtimex 124 +#define __NR_mprotect 125 +#define __NR_sigprocmask 126 +#define __NR_create_module 127 +#define __NR_init_module 128 +#define __NR_delete_module 129 +#define __NR_get_kernel_syms 130 +#define __NR_quotactl 131 +#define __NR_getpgid 132 +#define __NR_fchdir 133 +#define __NR_bdflush 134 +#define __NR_sysfs 135 +#define __NR_personality 136 +#define __NR_afs_syscall 137 +#define __NR_setfsuid 138 +#define __NR_setfsgid 139 +#define __NR__llseek 140 +#define __NR_getdents 141 +#define __NR__newselect 142 +#define __NR_flock 143 +#define __NR_msync 144 +#define __NR_readv 145 +#define __NR_writev 146 +#define __NR_getsid 147 +#define __NR_fdatasync 148 +#define __NR__sysctl 149 +#define __NR_mlock 150 +#define __NR_munlock 151 +#define __NR_mlockall 152 +#define __NR_munlockall 153 +#define __NR_sched_setparam 154 +#define __NR_sched_getparam 155 +#define __NR_sched_setscheduler 156 +#define __NR_sched_getscheduler 157 +#define __NR_sched_yield 158 +#define __NR_sched_get_priority_max 159 +#define __NR_sched_get_priority_min 160 +#define __NR_sched_rr_get_interval 161 +#define __NR_nanosleep 162 +#define __NR_mremap 163 +#define __NR_setresuid 164 +#define __NR_getresuid 165 +#define __NR_vm86 166 +#define __NR_query_module 167 +#define __NR_poll 168 +#define __NR_nfsservctl 169 +#define __NR_setresgid 170 +#define __NR_getresgid 171 +#define __NR_prctl 172 +#define __NR_rt_sigreturn 173 +#define __NR_rt_sigaction 174 +#define __NR_rt_sigprocmask 175 +#define __NR_rt_sigpending 176 +#define __NR_rt_sigtimedwait 177 +#define __NR_rt_sigqueueinfo 178 +#define __NR_rt_sigsuspend 179 +#define __NR_pread64 180 +#define __NR_pwrite64 181 +#define __NR_chown 182 +#define __NR_getcwd 183 +#define __NR_capget 184 +#define __NR_capset 185 +#define __NR_sigaltstack 186 +#define __NR_sendfile 187 +#define __NR_getpmsg 188 +#define __NR_putpmsg 189 +#define __NR_vfork 190 +#define __NR_ugetrlimit 191 +#define __NR_mmap2 192 +#define __NR_truncate64 193 +#define __NR_ftruncate64 194 +#define __NR_stat64 195 +#define __NR_lstat64 196 +#define __NR_fstat64 197 +#define __NR_lchown32 198 +#define __NR_getuid32 199 +#define __NR_getgid32 200 +#define __NR_geteuid32 201 +#define __NR_getegid32 202 +#define __NR_setreuid32 203 +#define __NR_setregid32 204 +#define __NR_getgroups32 205 +#define __NR_setgroups32 206 +#define __NR_fchown32 207 +#define __NR_setresuid32 208 +#define __NR_getresuid32 209 +#define __NR_setresgid32 210 +#define __NR_getresgid32 211 +#define __NR_chown32 212 +#define __NR_setuid32 213 +#define __NR_setgid32 214 +#define __NR_setfsuid32 215 +#define __NR_setfsgid32 216 +#define __NR_pivot_root 217 +#define __NR_mincore 218 +#define __NR_madvise 219 +#define __NR_getdents64 220 +#define __NR_fcntl64 221 +#define __NR_gettid 224 +#define __NR_readahead 225 +#define __NR_setxattr 226 +#define __NR_lsetxattr 227 +#define __NR_fsetxattr 228 +#define __NR_getxattr 229 +#define __NR_lgetxattr 230 +#define __NR_fgetxattr 231 +#define __NR_listxattr 232 +#define __NR_llistxattr 233 +#define __NR_flistxattr 234 +#define __NR_removexattr 235 +#define __NR_lremovexattr 236 +#define __NR_fremovexattr 237 +#define __NR_tkill 238 +#define __NR_sendfile64 239 +#define __NR_futex 240 +#define __NR_sched_setaffinity 241 +#define __NR_sched_getaffinity 242 +#define __NR_set_thread_area 243 +#define __NR_get_thread_area 244 +#define __NR_io_setup 245 +#define __NR_io_destroy 246 +#define __NR_io_getevents 247 +#define __NR_io_submit 248 +#define __NR_io_cancel 249 +#define __NR_fadvise64 250 +#define __NR_exit_group 252 +#define __NR_lookup_dcookie 253 +#define __NR_epoll_create 254 +#define __NR_epoll_ctl 255 +#define __NR_epoll_wait 256 +#define __NR_remap_file_pages 257 +#define __NR_set_tid_address 258 +#define __NR_timer_create 259 +#define __NR_timer_settime 260 +#define __NR_timer_gettime 261 +#define __NR_timer_getoverrun 262 +#define __NR_timer_delete 263 +#define __NR_clock_settime 264 +#define __NR_clock_gettime 265 +#define __NR_clock_getres 266 +#define __NR_clock_nanosleep 267 +#define __NR_statfs64 268 +#define __NR_fstatfs64 269 +#define __NR_tgkill 270 +#define __NR_utimes 271 +#define __NR_fadvise64_64 272 +#define __NR_vserver 273 +#define __NR_mbind 274 +#define __NR_get_mempolicy 275 +#define __NR_set_mempolicy 276 +#define __NR_mq_open 277 +#define __NR_mq_unlink 278 +#define __NR_mq_timedsend 279 +#define __NR_mq_timedreceive 280 +#define __NR_mq_notify 281 +#define __NR_mq_getsetattr 282 +#define __NR_kexec_load 283 +#define __NR_waitid 284 +#define __NR_add_key 286 +#define __NR_request_key 287 +#define __NR_keyctl 288 +#define __NR_ioprio_set 289 +#define __NR_ioprio_get 290 +#define __NR_inotify_init 291 +#define __NR_inotify_add_watch 292 +#define __NR_inotify_rm_watch 293 +#define __NR_migrate_pages 294 +#define __NR_openat 295 +#define __NR_mkdirat 296 +#define __NR_mknodat 297 +#define __NR_fchownat 298 +#define __NR_futimesat 299 +#define __NR_fstatat64 300 +#define __NR_unlinkat 301 +#define __NR_renameat 302 +#define __NR_linkat 303 +#define __NR_symlinkat 304 +#define __NR_readlinkat 305 +#define __NR_fchmodat 306 +#define __NR_faccessat 307 +#define __NR_pselect6 308 +#define __NR_ppoll 309 +#define __NR_unshare 310 +#define __NR_set_robust_list 311 +#define __NR_get_robust_list 312 +#define __NR_splice 313 +#define __NR_sync_file_range 314 +#define __NR_tee 315 +#define __NR_vmsplice 316 +#define __NR_move_pages 317 +#define __NR_getcpu 318 +#define __NR_epoll_pwait 319 +#define __NR_utimensat 320 +#define __NR_signalfd 321 +#define __NR_timerfd_create 322 +#define __NR_eventfd 323 +#define __NR_fallocate 324 +#define __NR_timerfd_settime 325 +#define __NR_timerfd_gettime 326 +#define __NR_signalfd4 327 +#define __NR_eventfd2 328 +#define __NR_epoll_create1 329 +#define __NR_dup3 330 +#define __NR_pipe2 331 +#define __NR_inotify_init1 332 +#define __NR_preadv 333 +#define __NR_pwritev 334 +#define __NR_rt_tgsigqueueinfo 335 +#define __NR_perf_event_open 336 +#define __NR_recvmmsg 337 +#define __NR_fanotify_init 338 +#define __NR_fanotify_mark 339 +#define __NR_prlimit64 340 +#define __NR_name_to_handle_at 341 +#define __NR_open_by_handle_at 342 +#define __NR_clock_adjtime 343 +#define __NR_syncfs 344 +#define __NR_sendmmsg 345 +#define __NR_setns 346 +#define __NR_process_vm_readv 347 +#define __NR_process_vm_writev 348 +#define __NR_kcmp 349 +#define __NR_finit_module 350 +#define __NR_sched_setattr 351 +#define __NR_sched_getattr 352 +#define __NR_renameat2 353 +#define __NR_seccomp 354 +#define __NR_getrandom 355 +#define __NR_memfd_create 356 +#define __NR_bpf 357 +#define __NR_execveat 358 +#define __NR_socket 359 +#define __NR_socketpair 360 +#define __NR_bind 361 +#define __NR_connect 362 +#define __NR_listen 363 +#define __NR_accept4 364 +#define __NR_getsockopt 365 +#define __NR_setsockopt 366 +#define __NR_getsockname 367 +#define __NR_getpeername 368 +#define __NR_sendto 369 +#define __NR_sendmsg 370 +#define __NR_recvfrom 371 +#define __NR_recvmsg 372 +#define __NR_shutdown 373 +#define __NR_userfaultfd 374 +#define __NR_membarrier 375 +#define __NR_mlock2 376 +#define __NR_copy_file_range 377 +#define __NR_preadv2 378 +#define __NR_pwritev2 379 +#define __NR_pkey_mprotect 380 +#define __NR_pkey_alloc 381 +#define __NR_pkey_free 382 +#define __NR_statx 383 +#define __NR_arch_prctl 384 +#define __NR_io_pgetevents 385 +#define __NR_rseq 386 +#define __NR_semget 393 +#define __NR_semctl 394 +#define __NR_shmget 395 +#define __NR_shmctl 396 +#define __NR_shmat 397 +#define __NR_shmdt 398 +#define __NR_msgget 399 +#define __NR_msgsnd 400 +#define __NR_msgrcv 401 +#define __NR_msgctl 402 +#define __NR_clock_gettime64 403 +#define __NR_clock_settime64 404 +#define __NR_clock_adjtime64 405 +#define __NR_clock_getres_time64 406 +#define __NR_clock_nanosleep_time64 407 +#define __NR_timer_gettime64 408 +#define __NR_timer_settime64 409 +#define __NR_timerfd_gettime64 410 +#define __NR_timerfd_settime64 411 +#define __NR_utimensat_time64 412 +#define __NR_pselect6_time64 413 +#define __NR_ppoll_time64 414 +#define __NR_io_pgetevents_time64 416 +#define __NR_recvmmsg_time64 417 +#define __NR_mq_timedsend_time64 418 +#define __NR_mq_timedreceive_time64 419 +#define __NR_semtimedop_time64 420 +#define __NR_rt_sigtimedwait_time64 421 +#define __NR_futex_time64 422 +#define __NR_sched_rr_get_interval_time64 423 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 +#define __NR_open_tree 428 +#define __NR_move_mount 429 +#define __NR_fsopen 430 +#define __NR_fsconfig 431 +#define __NR_fsmount 432 +#define __NR_fspick 433 +#define __NR_pidfd_open 434 +#define __NR_clone3 435 +#define __NR_close_range 436 +#define __NR_openat2 437 +#define __NR_pidfd_getfd 438 +#define __NR_faccessat2 439 +#define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 +#define __NR_memfd_secret 447 +#define __NR_process_mrelease 448 +#define __NR_futex_waitv 449 +#define __NR_set_mempolicy_home_node 450 +#define __NR_cachestat 451 +#define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 + + +#endif /* _ASM_UNISTD_32_H */ diff --git a/tools/include/uapi/asm/unistd_64.h b/tools/include/uapi/asm/unistd_64.h new file mode 100644 index 000000000000..da439afee1cf --- /dev/null +++ b/tools/include/uapi/asm/unistd_64.h @@ -0,0 +1,380 @@ +#ifndef _ASM_UNISTD_64_H +#define _ASM_UNISTD_64_H + +#define __NR_read 0 +#define __NR_write 1 +#define __NR_open 2 +#define __NR_close 3 +#define __NR_stat 4 +#define __NR_fstat 5 +#define __NR_lstat 6 +#define __NR_poll 7 +#define __NR_lseek 8 +#define __NR_mmap 9 +#define __NR_mprotect 10 +#define __NR_munmap 11 +#define __NR_brk 12 +#define __NR_rt_sigaction 13 +#define __NR_rt_sigprocmask 14 +#define __NR_rt_sigreturn 15 +#define __NR_ioctl 16 +#define __NR_pread64 17 +#define __NR_pwrite64 18 +#define __NR_readv 19 +#define __NR_writev 20 +#define __NR_access 21 +#define __NR_pipe 22 +#define __NR_select 23 +#define __NR_sched_yield 24 +#define __NR_mremap 25 +#define __NR_msync 26 +#define __NR_mincore 27 +#define __NR_madvise 28 +#define __NR_shmget 29 +#define __NR_shmat 30 +#define __NR_shmctl 31 +#define __NR_dup 32 +#define __NR_dup2 33 +#define __NR_pause 34 +#define __NR_nanosleep 35 +#define __NR_getitimer 36 +#define __NR_alarm 37 +#define __NR_setitimer 38 +#define __NR_getpid 39 +#define __NR_sendfile 40 +#define __NR_socket 41 +#define __NR_connect 42 +#define __NR_accept 43 +#define __NR_sendto 44 +#define __NR_recvfrom 45 +#define __NR_sendmsg 46 +#define __NR_recvmsg 47 +#define __NR_shutdown 48 +#define __NR_bind 49 +#define __NR_listen 50 +#define __NR_getsockname 51 +#define __NR_getpeername 52 +#define __NR_socketpair 53 +#define __NR_setsockopt 54 +#define __NR_getsockopt 55 +#define __NR_clone 56 +#define __NR_fork 57 +#define __NR_vfork 58 +#define __NR_execve 59 +#define __NR_exit 60 +#define __NR_wait4 61 +#define __NR_kill 62 +#define __NR_uname 63 +#define __NR_semget 64 +#define __NR_semop 65 +#define __NR_semctl 66 +#define __NR_shmdt 67 +#define __NR_msgget 68 +#define __NR_msgsnd 69 +#define __NR_msgrcv 70 +#define __NR_msgctl 71 +#define __NR_fcntl 72 +#define __NR_flock 73 +#define __NR_fsync 74 +#define __NR_fdatasync 75 +#define __NR_truncate 76 +#define __NR_ftruncate 77 +#define __NR_getdents 78 +#define __NR_getcwd 79 +#define __NR_chdir 80 +#define __NR_fchdir 81 +#define __NR_rename 82 +#define __NR_mkdir 83 +#define __NR_rmdir 84 +#define __NR_creat 85 +#define __NR_link 86 +#define __NR_unlink 87 +#define __NR_symlink 88 +#define __NR_readlink 89 +#define __NR_chmod 90 +#define __NR_fchmod 91 +#define __NR_chown 92 +#define __NR_fchown 93 +#define __NR_lchown 94 +#define __NR_umask 95 +#define __NR_gettimeofday 96 +#define __NR_getrlimit 97 +#define __NR_getrusage 98 +#define __NR_sysinfo 99 +#define __NR_times 100 +#define __NR_ptrace 101 +#define __NR_getuid 102 +#define __NR_syslog 103 +#define __NR_getgid 104 +#define __NR_setuid 105 +#define __NR_setgid 106 +#define __NR_geteuid 107 +#define __NR_getegid 108 +#define __NR_setpgid 109 +#define __NR_getppid 110 +#define __NR_getpgrp 111 +#define __NR_setsid 112 +#define __NR_setreuid 113 +#define __NR_setregid 114 +#define __NR_getgroups 115 +#define __NR_setgroups 116 +#define __NR_setresuid 117 +#define __NR_getresuid 118 +#define __NR_setresgid 119 +#define __NR_getresgid 120 +#define __NR_getpgid 121 +#define __NR_setfsuid 122 +#define __NR_setfsgid 123 +#define __NR_getsid 124 +#define __NR_capget 125 +#define __NR_capset 126 +#define __NR_rt_sigpending 127 +#define __NR_rt_sigtimedwait 128 +#define __NR_rt_sigqueueinfo 129 +#define __NR_rt_sigsuspend 130 +#define __NR_sigaltstack 131 +#define __NR_utime 132 +#define __NR_mknod 133 +#define __NR_uselib 134 +#define __NR_personality 135 +#define __NR_ustat 136 +#define __NR_statfs 137 +#define __NR_fstatfs 138 +#define __NR_sysfs 139 +#define __NR_getpriority 140 +#define __NR_setpriority 141 +#define __NR_sched_setparam 142 +#define __NR_sched_getparam 143 +#define __NR_sched_setscheduler 144 +#define __NR_sched_getscheduler 145 +#define __NR_sched_get_priority_max 146 +#define __NR_sched_get_priority_min 147 +#define __NR_sched_rr_get_interval 148 +#define __NR_mlock 149 +#define __NR_munlock 150 +#define __NR_mlockall 151 +#define __NR_munlockall 152 +#define __NR_vhangup 153 +#define __NR_modify_ldt 154 +#define __NR_pivot_root 155 +#define __NR__sysctl 156 +#define __NR_prctl 157 +#define __NR_arch_prctl 158 +#define __NR_adjtimex 159 +#define __NR_setrlimit 160 +#define __NR_chroot 161 +#define __NR_sync 162 +#define __NR_acct 163 +#define __NR_settimeofday 164 +#define __NR_mount 165 +#define __NR_umount2 166 +#define __NR_swapon 167 +#define __NR_swapoff 168 +#define __NR_reboot 169 +#define __NR_sethostname 170 +#define __NR_setdomainname 171 +#define __NR_iopl 172 +#define __NR_ioperm 173 +#define __NR_create_module 174 +#define __NR_init_module 175 +#define __NR_delete_module 176 +#define __NR_get_kernel_syms 177 +#define __NR_query_module 178 +#define __NR_quotactl 179 +#define __NR_nfsservctl 180 +#define __NR_getpmsg 181 +#define __NR_putpmsg 182 +#define __NR_afs_syscall 183 +#define __NR_tuxcall 184 +#define __NR_security 185 +#define __NR_gettid 186 +#define __NR_readahead 187 +#define __NR_setxattr 188 +#define __NR_lsetxattr 189 +#define __NR_fsetxattr 190 +#define __NR_getxattr 191 +#define __NR_lgetxattr 192 +#define __NR_fgetxattr 193 +#define __NR_listxattr 194 +#define __NR_llistxattr 195 +#define __NR_flistxattr 196 +#define __NR_removexattr 197 +#define __NR_lremovexattr 198 +#define __NR_fremovexattr 199 +#define __NR_tkill 200 +#define __NR_time 201 +#define __NR_futex 202 +#define __NR_sched_setaffinity 203 +#define __NR_sched_getaffinity 204 +#define __NR_set_thread_area 205 +#define __NR_io_setup 206 +#define __NR_io_destroy 207 +#define __NR_io_getevents 208 +#define __NR_io_submit 209 +#define __NR_io_cancel 210 +#define __NR_get_thread_area 211 +#define __NR_lookup_dcookie 212 +#define __NR_epoll_create 213 +#define __NR_epoll_ctl_old 214 +#define __NR_epoll_wait_old 215 +#define __NR_remap_file_pages 216 +#define __NR_getdents64 217 +#define __NR_set_tid_address 218 +#define __NR_restart_syscall 219 +#define __NR_semtimedop 220 +#define __NR_fadvise64 221 +#define __NR_timer_create 222 +#define __NR_timer_settime 223 +#define __NR_timer_gettime 224 +#define __NR_timer_getoverrun 225 +#define __NR_timer_delete 226 +#define __NR_clock_settime 227 +#define __NR_clock_gettime 228 +#define __NR_clock_getres 229 +#define __NR_clock_nanosleep 230 +#define __NR_exit_group 231 +#define __NR_epoll_wait 232 +#define __NR_epoll_ctl 233 +#define __NR_tgkill 234 +#define __NR_utimes 235 +#define __NR_vserver 236 +#define __NR_mbind 237 +#define __NR_set_mempolicy 238 +#define __NR_get_mempolicy 239 +#define __NR_mq_open 240 +#define __NR_mq_unlink 241 +#define __NR_mq_timedsend 242 +#define __NR_mq_timedreceive 243 +#define __NR_mq_notify 244 +#define __NR_mq_getsetattr 245 +#define __NR_kexec_load 246 +#define __NR_waitid 247 +#define __NR_add_key 248 +#define __NR_request_key 249 +#define __NR_keyctl 250 +#define __NR_ioprio_set 251 +#define __NR_ioprio_get 252 +#define __NR_inotify_init 253 +#define __NR_inotify_add_watch 254 +#define __NR_inotify_rm_watch 255 +#define __NR_migrate_pages 256 +#define __NR_openat 257 +#define __NR_mkdirat 258 +#define __NR_mknodat 259 +#define __NR_fchownat 260 +#define __NR_futimesat 261 +#define __NR_newfstatat 262 +#define __NR_unlinkat 263 +#define __NR_renameat 264 +#define __NR_linkat 265 +#define __NR_symlinkat 266 +#define __NR_readlinkat 267 +#define __NR_fchmodat 268 +#define __NR_faccessat 269 +#define __NR_pselect6 270 +#define __NR_ppoll 271 +#define __NR_unshare 272 +#define __NR_set_robust_list 273 +#define __NR_get_robust_list 274 +#define __NR_splice 275 +#define __NR_tee 276 +#define __NR_sync_file_range 277 +#define __NR_vmsplice 278 +#define __NR_move_pages 279 +#define __NR_utimensat 280 +#define __NR_epoll_pwait 281 +#define __NR_signalfd 282 +#define __NR_timerfd_create 283 +#define __NR_eventfd 284 +#define __NR_fallocate 285 +#define __NR_timerfd_settime 286 +#define __NR_timerfd_gettime 287 +#define __NR_accept4 288 +#define __NR_signalfd4 289 +#define __NR_eventfd2 290 +#define __NR_epoll_create1 291 +#define __NR_dup3 292 +#define __NR_pipe2 293 +#define __NR_inotify_init1 294 +#define __NR_preadv 295 +#define __NR_pwritev 296 +#define __NR_rt_tgsigqueueinfo 297 +#define __NR_perf_event_open 298 +#define __NR_recvmmsg 299 +#define __NR_fanotify_init 300 +#define __NR_fanotify_mark 301 +#define __NR_prlimit64 302 +#define __NR_name_to_handle_at 303 +#define __NR_open_by_handle_at 304 +#define __NR_clock_adjtime 305 +#define __NR_syncfs 306 +#define __NR_sendmmsg 307 +#define __NR_setns 308 +#define __NR_getcpu 309 +#define __NR_process_vm_readv 310 +#define __NR_process_vm_writev 311 +#define __NR_kcmp 312 +#define __NR_finit_module 313 +#define __NR_sched_setattr 314 +#define __NR_sched_getattr 315 +#define __NR_renameat2 316 +#define __NR_seccomp 317 +#define __NR_getrandom 318 +#define __NR_memfd_create 319 +#define __NR_kexec_file_load 320 +#define __NR_bpf 321 +#define __NR_execveat 322 +#define __NR_userfaultfd 323 +#define __NR_membarrier 324 +#define __NR_mlock2 325 +#define __NR_copy_file_range 326 +#define __NR_preadv2 327 +#define __NR_pwritev2 328 +#define __NR_pkey_mprotect 329 +#define __NR_pkey_alloc 330 +#define __NR_pkey_free 331 +#define __NR_statx 332 +#define __NR_io_pgetevents 333 +#define __NR_rseq 334 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 +#define __NR_open_tree 428 +#define __NR_move_mount 429 +#define __NR_fsopen 430 +#define __NR_fsconfig 431 +#define __NR_fsmount 432 +#define __NR_fspick 433 +#define __NR_pidfd_open 434 +#define __NR_clone3 435 +#define __NR_close_range 436 +#define __NR_openat2 437 +#define __NR_pidfd_getfd 438 +#define __NR_faccessat2 439 +#define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 +#define __NR_memfd_secret 447 +#define __NR_process_mrelease 448 +#define __NR_futex_waitv 449 +#define __NR_set_mempolicy_home_node 450 +#define __NR_cachestat 451 +#define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 +#define __NR_mseal 462 + + +#endif /* _ASM_UNISTD_64_H */ diff --git a/tools/include/uapi/asm/unistd_x32.h b/tools/include/uapi/asm/unistd_x32.h new file mode 100644 index 000000000000..4fcb607c724b --- /dev/null +++ b/tools/include/uapi/asm/unistd_x32.h @@ -0,0 +1,369 @@ +#ifndef _ASM_UNISTD_X32_H +#define _ASM_UNISTD_X32_H + +#define __NR_read (__X32_SYSCALL_BIT + 0) +#define __NR_write (__X32_SYSCALL_BIT + 1) +#define __NR_open (__X32_SYSCALL_BIT + 2) +#define __NR_close (__X32_SYSCALL_BIT + 3) +#define __NR_stat (__X32_SYSCALL_BIT + 4) +#define __NR_fstat (__X32_SYSCALL_BIT + 5) +#define __NR_lstat (__X32_SYSCALL_BIT + 6) +#define __NR_poll (__X32_SYSCALL_BIT + 7) +#define __NR_lseek (__X32_SYSCALL_BIT + 8) +#define __NR_mmap (__X32_SYSCALL_BIT + 9) +#define __NR_mprotect (__X32_SYSCALL_BIT + 10) +#define __NR_munmap (__X32_SYSCALL_BIT + 11) +#define __NR_brk (__X32_SYSCALL_BIT + 12) +#define __NR_rt_sigprocmask (__X32_SYSCALL_BIT + 14) +#define __NR_pread64 (__X32_SYSCALL_BIT + 17) +#define __NR_pwrite64 (__X32_SYSCALL_BIT + 18) +#define __NR_access (__X32_SYSCALL_BIT + 21) +#define __NR_pipe (__X32_SYSCALL_BIT + 22) +#define __NR_select (__X32_SYSCALL_BIT + 23) +#define __NR_sched_yield (__X32_SYSCALL_BIT + 24) +#define __NR_mremap (__X32_SYSCALL_BIT + 25) +#define __NR_msync (__X32_SYSCALL_BIT + 26) +#define __NR_mincore (__X32_SYSCALL_BIT + 27) +#define __NR_madvise (__X32_SYSCALL_BIT + 28) +#define __NR_shmget (__X32_SYSCALL_BIT + 29) +#define __NR_shmat (__X32_SYSCALL_BIT + 30) +#define __NR_shmctl (__X32_SYSCALL_BIT + 31) +#define __NR_dup (__X32_SYSCALL_BIT + 32) +#define __NR_dup2 (__X32_SYSCALL_BIT + 33) +#define __NR_pause (__X32_SYSCALL_BIT + 34) +#define __NR_nanosleep (__X32_SYSCALL_BIT + 35) +#define __NR_getitimer (__X32_SYSCALL_BIT + 36) +#define __NR_alarm (__X32_SYSCALL_BIT + 37) +#define __NR_setitimer (__X32_SYSCALL_BIT + 38) +#define __NR_getpid (__X32_SYSCALL_BIT + 39) +#define __NR_sendfile (__X32_SYSCALL_BIT + 40) +#define __NR_socket (__X32_SYSCALL_BIT + 41) +#define __NR_connect (__X32_SYSCALL_BIT + 42) +#define __NR_accept (__X32_SYSCALL_BIT + 43) +#define __NR_sendto (__X32_SYSCALL_BIT + 44) +#define __NR_shutdown (__X32_SYSCALL_BIT + 48) +#define __NR_bind (__X32_SYSCALL_BIT + 49) +#define __NR_listen (__X32_SYSCALL_BIT + 50) +#define __NR_getsockname (__X32_SYSCALL_BIT + 51) +#define __NR_getpeername (__X32_SYSCALL_BIT + 52) +#define __NR_socketpair (__X32_SYSCALL_BIT + 53) +#define __NR_clone (__X32_SYSCALL_BIT + 56) +#define __NR_fork (__X32_SYSCALL_BIT + 57) +#define __NR_vfork (__X32_SYSCALL_BIT + 58) +#define __NR_exit (__X32_SYSCALL_BIT + 60) +#define __NR_wait4 (__X32_SYSCALL_BIT + 61) +#define __NR_kill (__X32_SYSCALL_BIT + 62) +#define __NR_uname (__X32_SYSCALL_BIT + 63) +#define __NR_semget (__X32_SYSCALL_BIT + 64) +#define __NR_semop (__X32_SYSCALL_BIT + 65) +#define __NR_semctl (__X32_SYSCALL_BIT + 66) +#define __NR_shmdt (__X32_SYSCALL_BIT + 67) +#define __NR_msgget (__X32_SYSCALL_BIT + 68) +#define __NR_msgsnd (__X32_SYSCALL_BIT + 69) +#define __NR_msgrcv (__X32_SYSCALL_BIT + 70) +#define __NR_msgctl (__X32_SYSCALL_BIT + 71) +#define __NR_fcntl (__X32_SYSCALL_BIT + 72) +#define __NR_flock (__X32_SYSCALL_BIT + 73) +#define __NR_fsync (__X32_SYSCALL_BIT + 74) +#define __NR_fdatasync (__X32_SYSCALL_BIT + 75) +#define __NR_truncate (__X32_SYSCALL_BIT + 76) +#define __NR_ftruncate (__X32_SYSCALL_BIT + 77) +#define __NR_getdents (__X32_SYSCALL_BIT + 78) +#define __NR_getcwd (__X32_SYSCALL_BIT + 79) +#define __NR_chdir (__X32_SYSCALL_BIT + 80) +#define __NR_fchdir (__X32_SYSCALL_BIT + 81) +#define __NR_rename (__X32_SYSCALL_BIT + 82) +#define __NR_mkdir (__X32_SYSCALL_BIT + 83) +#define __NR_rmdir (__X32_SYSCALL_BIT + 84) +#define __NR_creat (__X32_SYSCALL_BIT + 85) +#define __NR_link (__X32_SYSCALL_BIT + 86) +#define __NR_unlink (__X32_SYSCALL_BIT + 87) +#define __NR_symlink (__X32_SYSCALL_BIT + 88) +#define __NR_readlink (__X32_SYSCALL_BIT + 89) +#define __NR_chmod (__X32_SYSCALL_BIT + 90) +#define __NR_fchmod (__X32_SYSCALL_BIT + 91) +#define __NR_chown (__X32_SYSCALL_BIT + 92) +#define __NR_fchown (__X32_SYSCALL_BIT + 93) +#define __NR_lchown (__X32_SYSCALL_BIT + 94) +#define __NR_umask (__X32_SYSCALL_BIT + 95) +#define __NR_gettimeofday (__X32_SYSCALL_BIT + 96) +#define __NR_getrlimit (__X32_SYSCALL_BIT + 97) +#define __NR_getrusage (__X32_SYSCALL_BIT + 98) +#define __NR_sysinfo (__X32_SYSCALL_BIT + 99) +#define __NR_times (__X32_SYSCALL_BIT + 100) +#define __NR_getuid (__X32_SYSCALL_BIT + 102) +#define __NR_syslog (__X32_SYSCALL_BIT + 103) +#define __NR_getgid (__X32_SYSCALL_BIT + 104) +#define __NR_setuid (__X32_SYSCALL_BIT + 105) +#define __NR_setgid (__X32_SYSCALL_BIT + 106) +#define __NR_geteuid (__X32_SYSCALL_BIT + 107) +#define __NR_getegid (__X32_SYSCALL_BIT + 108) +#define __NR_setpgid (__X32_SYSCALL_BIT + 109) +#define __NR_getppid (__X32_SYSCALL_BIT + 110) +#define __NR_getpgrp (__X32_SYSCALL_BIT + 111) +#define __NR_setsid (__X32_SYSCALL_BIT + 112) +#define __NR_setreuid (__X32_SYSCALL_BIT + 113) +#define __NR_setregid (__X32_SYSCALL_BIT + 114) +#define __NR_getgroups (__X32_SYSCALL_BIT + 115) +#define __NR_setgroups (__X32_SYSCALL_BIT + 116) +#define __NR_setresuid (__X32_SYSCALL_BIT + 117) +#define __NR_getresuid (__X32_SYSCALL_BIT + 118) +#define __NR_setresgid (__X32_SYSCALL_BIT + 119) +#define __NR_getresgid (__X32_SYSCALL_BIT + 120) +#define __NR_getpgid (__X32_SYSCALL_BIT + 121) +#define __NR_setfsuid (__X32_SYSCALL_BIT + 122) +#define __NR_setfsgid (__X32_SYSCALL_BIT + 123) +#define __NR_getsid (__X32_SYSCALL_BIT + 124) +#define __NR_capget (__X32_SYSCALL_BIT + 125) +#define __NR_capset (__X32_SYSCALL_BIT + 126) +#define __NR_rt_sigsuspend (__X32_SYSCALL_BIT + 130) +#define __NR_utime (__X32_SYSCALL_BIT + 132) +#define __NR_mknod (__X32_SYSCALL_BIT + 133) +#define __NR_personality (__X32_SYSCALL_BIT + 135) +#define __NR_ustat (__X32_SYSCALL_BIT + 136) +#define __NR_statfs (__X32_SYSCALL_BIT + 137) +#define __NR_fstatfs (__X32_SYSCALL_BIT + 138) +#define __NR_sysfs (__X32_SYSCALL_BIT + 139) +#define __NR_getpriority (__X32_SYSCALL_BIT + 140) +#define __NR_setpriority (__X32_SYSCALL_BIT + 141) +#define __NR_sched_setparam (__X32_SYSCALL_BIT + 142) +#define __NR_sched_getparam (__X32_SYSCALL_BIT + 143) +#define __NR_sched_setscheduler (__X32_SYSCALL_BIT + 144) +#define __NR_sched_getscheduler (__X32_SYSCALL_BIT + 145) +#define __NR_sched_get_priority_max (__X32_SYSCALL_BIT + 146) +#define __NR_sched_get_priority_min (__X32_SYSCALL_BIT + 147) +#define __NR_sched_rr_get_interval (__X32_SYSCALL_BIT + 148) +#define __NR_mlock (__X32_SYSCALL_BIT + 149) +#define __NR_munlock (__X32_SYSCALL_BIT + 150) +#define __NR_mlockall (__X32_SYSCALL_BIT + 151) +#define __NR_munlockall (__X32_SYSCALL_BIT + 152) +#define __NR_vhangup (__X32_SYSCALL_BIT + 153) +#define __NR_modify_ldt (__X32_SYSCALL_BIT + 154) +#define __NR_pivot_root (__X32_SYSCALL_BIT + 155) +#define __NR_prctl (__X32_SYSCALL_BIT + 157) +#define __NR_arch_prctl (__X32_SYSCALL_BIT + 158) +#define __NR_adjtimex (__X32_SYSCALL_BIT + 159) +#define __NR_setrlimit (__X32_SYSCALL_BIT + 160) +#define __NR_chroot (__X32_SYSCALL_BIT + 161) +#define __NR_sync (__X32_SYSCALL_BIT + 162) +#define __NR_acct (__X32_SYSCALL_BIT + 163) +#define __NR_settimeofday (__X32_SYSCALL_BIT + 164) +#define __NR_mount (__X32_SYSCALL_BIT + 165) +#define __NR_umount2 (__X32_SYSCALL_BIT + 166) +#define __NR_swapon (__X32_SYSCALL_BIT + 167) +#define __NR_swapoff (__X32_SYSCALL_BIT + 168) +#define __NR_reboot (__X32_SYSCALL_BIT + 169) +#define __NR_sethostname (__X32_SYSCALL_BIT + 170) +#define __NR_setdomainname (__X32_SYSCALL_BIT + 171) +#define __NR_iopl (__X32_SYSCALL_BIT + 172) +#define __NR_ioperm (__X32_SYSCALL_BIT + 173) +#define __NR_init_module (__X32_SYSCALL_BIT + 175) +#define __NR_delete_module (__X32_SYSCALL_BIT + 176) +#define __NR_quotactl (__X32_SYSCALL_BIT + 179) +#define __NR_getpmsg (__X32_SYSCALL_BIT + 181) +#define __NR_putpmsg (__X32_SYSCALL_BIT + 182) +#define __NR_afs_syscall (__X32_SYSCALL_BIT + 183) +#define __NR_tuxcall (__X32_SYSCALL_BIT + 184) +#define __NR_security (__X32_SYSCALL_BIT + 185) +#define __NR_gettid (__X32_SYSCALL_BIT + 186) +#define __NR_readahead (__X32_SYSCALL_BIT + 187) +#define __NR_setxattr (__X32_SYSCALL_BIT + 188) +#define __NR_lsetxattr (__X32_SYSCALL_BIT + 189) +#define __NR_fsetxattr (__X32_SYSCALL_BIT + 190) +#define __NR_getxattr (__X32_SYSCALL_BIT + 191) +#define __NR_lgetxattr (__X32_SYSCALL_BIT + 192) +#define __NR_fgetxattr (__X32_SYSCALL_BIT + 193) +#define __NR_listxattr (__X32_SYSCALL_BIT + 194) +#define __NR_llistxattr (__X32_SYSCALL_BIT + 195) +#define __NR_flistxattr (__X32_SYSCALL_BIT + 196) +#define __NR_removexattr (__X32_SYSCALL_BIT + 197) +#define __NR_lremovexattr (__X32_SYSCALL_BIT + 198) +#define __NR_fremovexattr (__X32_SYSCALL_BIT + 199) +#define __NR_tkill (__X32_SYSCALL_BIT + 200) +#define __NR_time (__X32_SYSCALL_BIT + 201) +#define __NR_futex (__X32_SYSCALL_BIT + 202) +#define __NR_sched_setaffinity (__X32_SYSCALL_BIT + 203) +#define __NR_sched_getaffinity (__X32_SYSCALL_BIT + 204) +#define __NR_io_destroy (__X32_SYSCALL_BIT + 207) +#define __NR_io_getevents (__X32_SYSCALL_BIT + 208) +#define __NR_io_cancel (__X32_SYSCALL_BIT + 210) +#define __NR_lookup_dcookie (__X32_SYSCALL_BIT + 212) +#define __NR_epoll_create (__X32_SYSCALL_BIT + 213) +#define __NR_remap_file_pages (__X32_SYSCALL_BIT + 216) +#define __NR_getdents64 (__X32_SYSCALL_BIT + 217) +#define __NR_set_tid_address (__X32_SYSCALL_BIT + 218) +#define __NR_restart_syscall (__X32_SYSCALL_BIT + 219) +#define __NR_semtimedop (__X32_SYSCALL_BIT + 220) +#define __NR_fadvise64 (__X32_SYSCALL_BIT + 221) +#define __NR_timer_settime (__X32_SYSCALL_BIT + 223) +#define __NR_timer_gettime (__X32_SYSCALL_BIT + 224) +#define __NR_timer_getoverrun (__X32_SYSCALL_BIT + 225) +#define __NR_timer_delete (__X32_SYSCALL_BIT + 226) +#define __NR_clock_settime (__X32_SYSCALL_BIT + 227) +#define __NR_clock_gettime (__X32_SYSCALL_BIT + 228) +#define __NR_clock_getres (__X32_SYSCALL_BIT + 229) +#define __NR_clock_nanosleep (__X32_SYSCALL_BIT + 230) +#define __NR_exit_group (__X32_SYSCALL_BIT + 231) +#define __NR_epoll_wait (__X32_SYSCALL_BIT + 232) +#define __NR_epoll_ctl (__X32_SYSCALL_BIT + 233) +#define __NR_tgkill (__X32_SYSCALL_BIT + 234) +#define __NR_utimes (__X32_SYSCALL_BIT + 235) +#define __NR_mbind (__X32_SYSCALL_BIT + 237) +#define __NR_set_mempolicy (__X32_SYSCALL_BIT + 238) +#define __NR_get_mempolicy (__X32_SYSCALL_BIT + 239) +#define __NR_mq_open (__X32_SYSCALL_BIT + 240) +#define __NR_mq_unlink (__X32_SYSCALL_BIT + 241) +#define __NR_mq_timedsend (__X32_SYSCALL_BIT + 242) +#define __NR_mq_timedreceive (__X32_SYSCALL_BIT + 243) +#define __NR_mq_getsetattr (__X32_SYSCALL_BIT + 245) +#define __NR_add_key (__X32_SYSCALL_BIT + 248) +#define __NR_request_key (__X32_SYSCALL_BIT + 249) +#define __NR_keyctl (__X32_SYSCALL_BIT + 250) +#define __NR_ioprio_set (__X32_SYSCALL_BIT + 251) +#define __NR_ioprio_get (__X32_SYSCALL_BIT + 252) +#define __NR_inotify_init (__X32_SYSCALL_BIT + 253) +#define __NR_inotify_add_watch (__X32_SYSCALL_BIT + 254) +#define __NR_inotify_rm_watch (__X32_SYSCALL_BIT + 255) +#define __NR_migrate_pages (__X32_SYSCALL_BIT + 256) +#define __NR_openat (__X32_SYSCALL_BIT + 257) +#define __NR_mkdirat (__X32_SYSCALL_BIT + 258) +#define __NR_mknodat (__X32_SYSCALL_BIT + 259) +#define __NR_fchownat (__X32_SYSCALL_BIT + 260) +#define __NR_futimesat (__X32_SYSCALL_BIT + 261) +#define __NR_newfstatat (__X32_SYSCALL_BIT + 262) +#define __NR_unlinkat (__X32_SYSCALL_BIT + 263) +#define __NR_renameat (__X32_SYSCALL_BIT + 264) +#define __NR_linkat (__X32_SYSCALL_BIT + 265) +#define __NR_symlinkat (__X32_SYSCALL_BIT + 266) +#define __NR_readlinkat (__X32_SYSCALL_BIT + 267) +#define __NR_fchmodat (__X32_SYSCALL_BIT + 268) +#define __NR_faccessat (__X32_SYSCALL_BIT + 269) +#define __NR_pselect6 (__X32_SYSCALL_BIT + 270) +#define __NR_ppoll (__X32_SYSCALL_BIT + 271) +#define __NR_unshare (__X32_SYSCALL_BIT + 272) +#define __NR_splice (__X32_SYSCALL_BIT + 275) +#define __NR_tee (__X32_SYSCALL_BIT + 276) +#define __NR_sync_file_range (__X32_SYSCALL_BIT + 277) +#define __NR_utimensat (__X32_SYSCALL_BIT + 280) +#define __NR_epoll_pwait (__X32_SYSCALL_BIT + 281) +#define __NR_signalfd (__X32_SYSCALL_BIT + 282) +#define __NR_timerfd_create (__X32_SYSCALL_BIT + 283) +#define __NR_eventfd (__X32_SYSCALL_BIT + 284) +#define __NR_fallocate (__X32_SYSCALL_BIT + 285) +#define __NR_timerfd_settime (__X32_SYSCALL_BIT + 286) +#define __NR_timerfd_gettime (__X32_SYSCALL_BIT + 287) +#define __NR_accept4 (__X32_SYSCALL_BIT + 288) +#define __NR_signalfd4 (__X32_SYSCALL_BIT + 289) +#define __NR_eventfd2 (__X32_SYSCALL_BIT + 290) +#define __NR_epoll_create1 (__X32_SYSCALL_BIT + 291) +#define __NR_dup3 (__X32_SYSCALL_BIT + 292) +#define __NR_pipe2 (__X32_SYSCALL_BIT + 293) +#define __NR_inotify_init1 (__X32_SYSCALL_BIT + 294) +#define __NR_perf_event_open (__X32_SYSCALL_BIT + 298) +#define __NR_fanotify_init (__X32_SYSCALL_BIT + 300) +#define __NR_fanotify_mark (__X32_SYSCALL_BIT + 301) +#define __NR_prlimit64 (__X32_SYSCALL_BIT + 302) +#define __NR_name_to_handle_at (__X32_SYSCALL_BIT + 303) +#define __NR_open_by_handle_at (__X32_SYSCALL_BIT + 304) +#define __NR_clock_adjtime (__X32_SYSCALL_BIT + 305) +#define __NR_syncfs (__X32_SYSCALL_BIT + 306) +#define __NR_setns (__X32_SYSCALL_BIT + 308) +#define __NR_getcpu (__X32_SYSCALL_BIT + 309) +#define __NR_kcmp (__X32_SYSCALL_BIT + 312) +#define __NR_finit_module (__X32_SYSCALL_BIT + 313) +#define __NR_sched_setattr (__X32_SYSCALL_BIT + 314) +#define __NR_sched_getattr (__X32_SYSCALL_BIT + 315) +#define __NR_renameat2 (__X32_SYSCALL_BIT + 316) +#define __NR_seccomp (__X32_SYSCALL_BIT + 317) +#define __NR_getrandom (__X32_SYSCALL_BIT + 318) +#define __NR_memfd_create (__X32_SYSCALL_BIT + 319) +#define __NR_kexec_file_load (__X32_SYSCALL_BIT + 320) +#define __NR_bpf (__X32_SYSCALL_BIT + 321) +#define __NR_userfaultfd (__X32_SYSCALL_BIT + 323) +#define __NR_membarrier (__X32_SYSCALL_BIT + 324) +#define __NR_mlock2 (__X32_SYSCALL_BIT + 325) +#define __NR_copy_file_range (__X32_SYSCALL_BIT + 326) +#define __NR_pkey_mprotect (__X32_SYSCALL_BIT + 329) +#define __NR_pkey_alloc (__X32_SYSCALL_BIT + 330) +#define __NR_pkey_free (__X32_SYSCALL_BIT + 331) +#define __NR_statx (__X32_SYSCALL_BIT + 332) +#define __NR_io_pgetevents (__X32_SYSCALL_BIT + 333) +#define __NR_rseq (__X32_SYSCALL_BIT + 334) +#define __NR_pidfd_send_signal (__X32_SYSCALL_BIT + 424) +#define __NR_io_uring_setup (__X32_SYSCALL_BIT + 425) +#define __NR_io_uring_enter (__X32_SYSCALL_BIT + 426) +#define __NR_io_uring_register (__X32_SYSCALL_BIT + 427) +#define __NR_open_tree (__X32_SYSCALL_BIT + 428) +#define __NR_move_mount (__X32_SYSCALL_BIT + 429) +#define __NR_fsopen (__X32_SYSCALL_BIT + 430) +#define __NR_fsconfig (__X32_SYSCALL_BIT + 431) +#define __NR_fsmount (__X32_SYSCALL_BIT + 432) +#define __NR_fspick (__X32_SYSCALL_BIT + 433) +#define __NR_pidfd_open (__X32_SYSCALL_BIT + 434) +#define __NR_clone3 (__X32_SYSCALL_BIT + 435) +#define __NR_close_range (__X32_SYSCALL_BIT + 436) +#define __NR_openat2 (__X32_SYSCALL_BIT + 437) +#define __NR_pidfd_getfd (__X32_SYSCALL_BIT + 438) +#define __NR_faccessat2 (__X32_SYSCALL_BIT + 439) +#define __NR_process_madvise (__X32_SYSCALL_BIT + 440) +#define __NR_epoll_pwait2 (__X32_SYSCALL_BIT + 441) +#define __NR_mount_setattr (__X32_SYSCALL_BIT + 442) +#define __NR_quotactl_fd (__X32_SYSCALL_BIT + 443) +#define __NR_landlock_create_ruleset (__X32_SYSCALL_BIT + 444) +#define __NR_landlock_add_rule (__X32_SYSCALL_BIT + 445) +#define __NR_landlock_restrict_self (__X32_SYSCALL_BIT + 446) +#define __NR_memfd_secret (__X32_SYSCALL_BIT + 447) +#define __NR_process_mrelease (__X32_SYSCALL_BIT + 448) +#define __NR_futex_waitv (__X32_SYSCALL_BIT + 449) +#define __NR_set_mempolicy_home_node (__X32_SYSCALL_BIT + 450) +#define __NR_cachestat (__X32_SYSCALL_BIT + 451) +#define __NR_fchmodat2 (__X32_SYSCALL_BIT + 452) +#define __NR_map_shadow_stack (__X32_SYSCALL_BIT + 453) +#define __NR_futex_wake (__X32_SYSCALL_BIT + 454) +#define __NR_futex_wait (__X32_SYSCALL_BIT + 455) +#define __NR_futex_requeue (__X32_SYSCALL_BIT + 456) +#define __NR_statmount (__X32_SYSCALL_BIT + 457) +#define __NR_listmount (__X32_SYSCALL_BIT + 458) +#define __NR_lsm_get_self_attr (__X32_SYSCALL_BIT + 459) +#define __NR_lsm_set_self_attr (__X32_SYSCALL_BIT + 460) +#define __NR_lsm_list_modules (__X32_SYSCALL_BIT + 461) +#define __NR_mseal (__X32_SYSCALL_BIT + 462) +#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512) +#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513) +#define __NR_ioctl (__X32_SYSCALL_BIT + 514) +#define __NR_readv (__X32_SYSCALL_BIT + 515) +#define __NR_writev (__X32_SYSCALL_BIT + 516) +#define __NR_recvfrom (__X32_SYSCALL_BIT + 517) +#define __NR_sendmsg (__X32_SYSCALL_BIT + 518) +#define __NR_recvmsg (__X32_SYSCALL_BIT + 519) +#define __NR_execve (__X32_SYSCALL_BIT + 520) +#define __NR_ptrace (__X32_SYSCALL_BIT + 521) +#define __NR_rt_sigpending (__X32_SYSCALL_BIT + 522) +#define __NR_rt_sigtimedwait (__X32_SYSCALL_BIT + 523) +#define __NR_rt_sigqueueinfo (__X32_SYSCALL_BIT + 524) +#define __NR_sigaltstack (__X32_SYSCALL_BIT + 525) +#define __NR_timer_create (__X32_SYSCALL_BIT + 526) +#define __NR_mq_notify (__X32_SYSCALL_BIT + 527) +#define __NR_kexec_load (__X32_SYSCALL_BIT + 528) +#define __NR_waitid (__X32_SYSCALL_BIT + 529) +#define __NR_set_robust_list (__X32_SYSCALL_BIT + 530) +#define __NR_get_robust_list (__X32_SYSCALL_BIT + 531) +#define __NR_vmsplice (__X32_SYSCALL_BIT + 532) +#define __NR_move_pages (__X32_SYSCALL_BIT + 533) +#define __NR_preadv (__X32_SYSCALL_BIT + 534) +#define __NR_pwritev (__X32_SYSCALL_BIT + 535) +#define __NR_rt_tgsigqueueinfo (__X32_SYSCALL_BIT + 536) +#define __NR_recvmmsg (__X32_SYSCALL_BIT + 537) +#define __NR_sendmmsg (__X32_SYSCALL_BIT + 538) +#define __NR_process_vm_readv (__X32_SYSCALL_BIT + 539) +#define __NR_process_vm_writev (__X32_SYSCALL_BIT + 540) +#define __NR_setsockopt (__X32_SYSCALL_BIT + 541) +#define __NR_getsockopt (__X32_SYSCALL_BIT + 542) +#define __NR_io_setup (__X32_SYSCALL_BIT + 543) +#define __NR_io_submit (__X32_SYSCALL_BIT + 544) +#define __NR_execveat (__X32_SYSCALL_BIT + 545) +#define __NR_preadv2 (__X32_SYSCALL_BIT + 546) +#define __NR_pwritev2 (__X32_SYSCALL_BIT + 547) + + +#endif /* _ASM_UNISTD_X32_H */ diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c index 41998cf1dcf5..b65bc20c04fc 100644 --- a/tools/testing/selftests/mm/mseal_test.c +++ b/tools/testing/selftests/mm/mseal_test.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/testing/selftests/mm/seal_elf.c b/tools/testing/selftests/mm/seal_elf.c index f2babec79bb6..6212434bd6e3 100644 --- a/tools/testing/selftests/mm/seal_elf.c +++ b/tools/testing/selftests/mm/seal_elf.c @@ -2,7 +2,7 @@ #define _GNU_SOURCE #include #include -#include +#include #include #include #include From patchwork Fri Jun 14 02:30:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 804685 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2064.outbound.protection.outlook.com [40.107.93.64]) (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 1EB9B138495; Fri, 14 Jun 2024 02:30:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332220; cv=fail; b=QRoxWFU3nAV6Bh/omfBh3o2oQVlIxOfT8JegfSuHG0mQjnriBMiCdZv0/DHJvJgvtFX0Dq2MCtx0Kem/EbkeHVA/XtrJib3E8JZVPzIDR/SOw4xllmonqX59Igtmsx6UqdXr8SgM6dQdMhori0ZG8A2UBnsumglILn4LNp/8Uz4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332220; c=relaxed/simple; bh=2TDW0nPDUC7dxg1i8N2caDS8VUqbVY1jqhl9ncG6rSU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=DEHMg9a5uwawJvOVWXZ4L7rkdBjQIcOeVY4zBQisY7Q6+3qvDVnnOaBe2yNnLmV/lJkeGMrU6dG9aUAvyhuzpDHaPz6qtXXeDcH909JijV5btJhYfghOrWSqcMTqpMpeiCklR9MDukwm3xQ0AM7QwkMsLJmG6va7fkJXSqTXcIk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=RIFBUElG; arc=fail smtp.client-ip=40.107.93.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="RIFBUElG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ahhm3SO59FFI0hWMFNbVVuzdzlcM+L8Ene8ZXq6ypw4VwEF15lwGMZiYgZ+V6e77FaviBvLF2mOMIQeJLlJZqYXvFi/kN4quG0eUPKCNhaLNj4MwWwpEJ+V0/vjeo2DGs+3T/Je7I+MiwYFbjtCiqLMsTxPD399t9lpRgEZ0RFhvXZIAhijWvBcOJuK60oUvmqKaYxxL14u34K/aLiRNDb3OE41452lB+u+aROqs+aeEDu154qJvl4ZJ8TCtLwoC3dfEjzdA+TDurS6rNKlI1gPTgs0aat3ut5nMe6b/WNymO6BUtDE/Vdo8W8BudKE7WBPJYrxy3RIOsp/QWC69Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5Lt2eL/4RhlpXOKr7DkYkcD248gcAkhriafXFFjq05w=; b=P445YND6x3/fXFCgtTUyiPs5lVlw1EhDSalwEM8NLEsMfQ+v7DeN7+VtMWZGAqt+tR1RHuDGxYV5wSVN1bl6GUav8Q9dIxXQN556P19FllOT9n+lS8E6JKNzCEsACFjh920udHKxByomQMa5TKpruoOpClo5k/S5zqIMVUR/th1lYlLs9JZdDf8om4btOYg3cLQaAbk0wzYLp/8cvDcIZBy0HwyJs8lis27dejDZVPxmFSpE/QG3DSOVj9dPt1ouPiCyGmJi7Lq4V3XP2KrsrE5j6RjqD2b4S1dCGQEPc8rVPacQyZx5xy1CEF4Vxz/6dWQlczF7uzKxT7vI9Dgmcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5Lt2eL/4RhlpXOKr7DkYkcD248gcAkhriafXFFjq05w=; b=RIFBUElGJ6Xii+oqIG/1vAvDgcMq8av4OPfBHNMuSWtBA5SEbUypGGAerH4f6hfqmruSNlnSXSRnGQdVTuRMI48bRFsEws7u9yVLojn5iB9+wYDHILVE25qJpdUvRvI282HU4TEtD+2XdjaSQMceFxWx7icn6M8FtN/tT0/vShZDntPsYtosrGRXQL1+/8HLglAZFhTgk+eyefA/zBjEEv4bIPh6eUTL5Nj2agnweUWeBU6EbrdNLCC3YL1PYWDGWfM5GFzhAtyKz9EO+H+2e+0/S678crqUwEsuV1Gho24rSykHRqNv3TyM5UTLyFCEkCh+zf5sA/l2OCRL7E3kVA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by PH0PR12MB7932.namprd12.prod.outlook.com (2603:10b6:510:280::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Fri, 14 Jun 2024 02:30:12 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7633.037; Fri, 14 Jun 2024 02:30:12 +0000 From: John Hubbard To: Andrew Morton , Jeff Xu , Shuah Khan Cc: Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML , John Hubbard Subject: [PATCH v2 2/6] selftests/mm: mseal, self_elf: factor out test macros and other duplicated items Date: Thu, 13 Jun 2024 19:30:05 -0700 Message-ID: <20240614023009.221547-3-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614023009.221547-1-jhubbard@nvidia.com> References: <20240614023009.221547-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR13CA0161.namprd13.prod.outlook.com (2603:10b6:a03:2c7::16) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|PH0PR12MB7932:EE_ X-MS-Office365-Filtering-Correlation-Id: fe1acee1-14f4-4c58-3847-08dc8c19eb0f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|1800799019|366011|7416009|376009; X-Microsoft-Antispam-Message-Info: OlQudQyAfA73L6cLVJs9FxKdgvH8/XgSmT+AKuQYLbbsNDgmxp3XUhvVfvuQuFuVgBp2vU0Lw/ywS4AGSNGHLOq6YQnLmtjTdaU5aPz+g1rF+MAwPKVhvaDxjg2ne7Ql65ww3eJIeepL9EhFWwWIElKzgXbRhACBm+MhzUrIbdwXmMl3qJu5oqYNshyryHFP8FSrmOzOkDUHQfo5sy9d+63Q03JQ8iygVNHVRSnPcUAyE5LbzHI6TaLKC9pg8ml8ZoVIVs3OCXGXXd8l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IP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230035)(1800799019)(366011)(7416009)(376009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: l3ngnR539LgbgcQtgzKX4yn/g6GQ4ZvABl+NMsJoAWqbSVHUkTO9BfHWrCX6a6fLVbhqCgtvJnuwdpzm5KDoJUlnAxPWakI3UsG/NQiz8/T78Qc6ncHq2zrt/WvywOf/J+jbairIf4lSSuv6UB6qxbzArxoVsT2LMOpYYGoSzPPj5+vMbO8r8R8cehOjBt9vTXnbIXzPf8Hp83lMvC0U9kSRITABcWS0OI11BwydLHY4WK6HGTJpe04KhfEHkO3setCtfra6jEAVi6S0daPa5jDQF8czM9AcfN8+p0bfva7SP1zyeoDTaZ7q56Llb3DTo9dl3L61TqIw4LAR9V4mNEOmHrkZaVNQ8k+etRrfMrAdAADyc1Mfz9CcmiNAeFeCKOBkGjx6Zs2CB2NlZNVxx4gpTIQS8ElGY29PiHQ/5X0VIQQBxNY5KY5+4YttnZE/gy2kA/Y/IZtrfkc/VxPi15jKOAjb1bjDf7iKqGyOtW8AKhZoyDUgDaTrRxEFbfDRTCxfarOSLUZdu7Iaa3hZ3c/O8ZcXraGLrWAYJ8UaDNrcV4HDrRQweNn2s74cht0Ab5R5m8H819HZj6Qk/VnmCjypUZQMA2XZ7yPsSEyV20yeHIoMyTbDptiP6RXoXmLTcJRrIvZslRYll6W/xNf+p/4NLZRF+vjIB/v4pPTgheNDm2YrCKXCWjU6xXsfgAwB9pGHdBdUaO2EWbFJYdWUvdSXsEmPnf9HpMYMNLr6j9lA++56JmtqJt1rUZx5/d/liM0DFj1nX9R/1kjYt/s8TFa/BCOh6+Gio2/0cQorLeV9jG5N8qZuDK6X1viG1AzbuUY2Am2SAcppL9MPtsqP3aMgOukWPURIbSX1nIHR3CPGrDJqKFlu9qzzSapENA9TDAjeXg/wDvuoG+j48whrdcM+ySAPZTjLWPPVJAi3wQnLUAAxjcNpq0xjT5dbYeZtrj5KMJ9oWkYT+SNjGAn1mTgIApoxPr54Y7abvQrGNIhdtRtZb/6iEuT448293LfGjJnnxNupEEi8tH5sHoOqo9AomCx41RW8lkNA/zfnkSAspP8NPuZzIx6AhsLlQjMt2h0q/3YoOvsbUl9ZABuGZvWpSk2ozwuYxKPKdmTF7bsBQBVF13X+wg4gZbOkuGtMc7aI+t2ZRQzjTVDYWpClQdcSQl6TQRPmhOr1hystauRGktZX4yAr4ZK9P8nJGShA1Y8U68tszqBQeTCWBN0aUOKZJmsHSFYxu5ZLSC1sDeBYY/1zQlWb8vBijrHxesMnaqSemoD4ayA2ECkHiSjL3Xyv0NgOr9NcRImN+vbOEr/NRt2SdVB2Ucwt2Gknq9e6bELVxQz8xylol44fVHNvIVmnxDMcYylNueRDYPXEGVsuA+EpO7cG+4PLsopenL/WHUuRFF47OxYPvDsk1EO+dEofvsb0+pPnESKcj8sjsCLvooHcopx9zn8RKneCe6nT3KfJdWvA7KQT6oK/01e5sxFXWlhoeabCruTAJ2TL4hZOKfWMk36xmQKl68WCFAoKDMopc25t0JdPVhRi2wQc1sJrjkh9hD/2wnrOUCjlG6y+hm6um17NjjLII3MPHj5z X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe1acee1-14f4-4c58-3847-08dc8c19eb0f X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 02:30:12.6029 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: z4oLGoKrZxJrdHGIzDLrtezh7BvHUFep7LiCiyR9EpzWqPdksy0iQfR4JTnl1FtIDCnLRI0+w0oNbJJYxmQgHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7932 Clean up and move some copy-pasted items into a new mseal_helpers.h. 1. The test macros can be made safer and simpler, by observing that they are invariably called when about to return. This means that the macros do not need an intrusive label to goto; they can simply return. 2. PKEY* items. We cannot, unfortunately use pkey-helpers.h. The best we can do is to factor out these few items into mseal_helpers.h. 3. These tests still need their own definition of u64, so also move that to the header file. Cc: Jeff Xu Cc: David Hildenbrand Signed-off-by: John Hubbard --- tools/testing/selftests/mm/mseal_helpers.h | 41 ++++++++++++++++++ tools/testing/selftests/mm/mseal_test.c | 49 +--------------------- tools/testing/selftests/mm/seal_elf.c | 33 +-------------- 3 files changed, 43 insertions(+), 80 deletions(-) create mode 100644 tools/testing/selftests/mm/mseal_helpers.h diff --git a/tools/testing/selftests/mm/mseal_helpers.h b/tools/testing/selftests/mm/mseal_helpers.h new file mode 100644 index 000000000000..108d3fd0becb --- /dev/null +++ b/tools/testing/selftests/mm/mseal_helpers.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#define FAIL_TEST_IF_FALSE(test_passed) \ + do { \ + if (!(test_passed)) { \ + ksft_test_result_fail("%s: line:%d\n", \ + __func__, __LINE__); \ + return; \ + } \ + } while (0) + +#define SKIP_TEST_IF_FALSE(test_passed) \ + do { \ + if (!(test_passed)) { \ + ksft_test_result_skip("%s: line:%d\n", \ + __func__, __LINE__); \ + return; \ + } \ + } while (0) + +#define TEST_END_CHECK() ksft_test_result_pass("%s\n", __func__) + +#ifndef PKEY_DISABLE_ACCESS +#define PKEY_DISABLE_ACCESS 0x1 +#endif + +#ifndef PKEY_DISABLE_WRITE +#define PKEY_DISABLE_WRITE 0x2 +#endif + +#ifndef PKEY_BITS_PER_PKEY +#define PKEY_BITS_PER_PKEY 2 +#endif + +#ifndef PKEY_MASK +#define PKEY_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) +#endif + +#ifndef u64 +#define u64 unsigned long long +#endif diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c index b65bc20c04fc..a28912fbecab 100644 --- a/tools/testing/selftests/mm/mseal_test.c +++ b/tools/testing/selftests/mm/mseal_test.c @@ -17,54 +17,7 @@ #include #include #include - -/* - * need those definition for manually build using gcc. - * gcc -I ../../../../usr/include -DDEBUG -O3 -DDEBUG -O3 mseal_test.c -o mseal_test - */ -#ifndef PKEY_DISABLE_ACCESS -# define PKEY_DISABLE_ACCESS 0x1 -#endif - -#ifndef PKEY_DISABLE_WRITE -# define PKEY_DISABLE_WRITE 0x2 -#endif - -#ifndef PKEY_BITS_PER_PKEY -#define PKEY_BITS_PER_PKEY 2 -#endif - -#ifndef PKEY_MASK -#define PKEY_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) -#endif - -#define FAIL_TEST_IF_FALSE(c) do {\ - if (!(c)) {\ - ksft_test_result_fail("%s, line:%d\n", __func__, __LINE__);\ - goto test_end;\ - } \ - } \ - while (0) - -#define SKIP_TEST_IF_FALSE(c) do {\ - if (!(c)) {\ - ksft_test_result_skip("%s, line:%d\n", __func__, __LINE__);\ - goto test_end;\ - } \ - } \ - while (0) - - -#define TEST_END_CHECK() {\ - ksft_test_result_pass("%s\n", __func__);\ - return;\ -test_end:\ - return;\ -} - -#ifndef u64 -#define u64 unsigned long long -#endif +#include "mseal_helpers.h" static unsigned long get_vma_size(void *addr, int *prot) { diff --git a/tools/testing/selftests/mm/seal_elf.c b/tools/testing/selftests/mm/seal_elf.c index 6212434bd6e3..7f6a95613dd6 100644 --- a/tools/testing/selftests/mm/seal_elf.c +++ b/tools/testing/selftests/mm/seal_elf.c @@ -16,38 +16,7 @@ #include #include #include - -/* - * need those definition for manually build using gcc. - * gcc -I ../../../../usr/include -DDEBUG -O3 -DDEBUG -O3 seal_elf.c -o seal_elf - */ -#define FAIL_TEST_IF_FALSE(c) do {\ - if (!(c)) {\ - ksft_test_result_fail("%s, line:%d\n", __func__, __LINE__);\ - goto test_end;\ - } \ - } \ - while (0) - -#define SKIP_TEST_IF_FALSE(c) do {\ - if (!(c)) {\ - ksft_test_result_skip("%s, line:%d\n", __func__, __LINE__);\ - goto test_end;\ - } \ - } \ - while (0) - - -#define TEST_END_CHECK() {\ - ksft_test_result_pass("%s\n", __func__);\ - return;\ -test_end:\ - return;\ -} - -#ifndef u64 -#define u64 unsigned long long -#endif +#include "mseal_helpers.h" /* * define sys_xyx to call syscall directly. From patchwork Fri Jun 14 02:30:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 804684 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2086.outbound.protection.outlook.com [40.107.93.86]) (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 97DDA183097; Fri, 14 Jun 2024 02:30:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332223; cv=fail; b=AZbfkAsgZ/K9OmyZKhRfDEPoczBKLfLhOc8vNPvpYPlJfGR9B9iXrc6f2sv2zXCoj+DfJ1kdfmyvlBYV6Y9sZfzJiVbht/HuKH0XCotnKeV7U4gRiXQXaNKd26tEifX2bwUJZIBmI5dXB//XaIk16t+O/0D8zVmTT7nMNprZbHA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332223; c=relaxed/simple; bh=TjFYh8xk5i7tftgztRAw1br9ljng0w3MWEW+D2AcbGQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Fez3MfQCOqExX6eg05Ef29S5ghbfLeNfxYqGi1xgpusi35RznhLUGaxHE3Ap5R5Vx0MGXBQtsyCbku6z20AJsChykUqX3u8HjY1UB80JhVqku2avPk6mFbT26k1i0h0VVGSiEK2TxIjkBMUAP0wCyhFhklhs56Ab3SYxLfxZiwo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=qZUI1UpE; arc=fail smtp.client-ip=40.107.93.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="qZUI1UpE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CT2B5koETb/7WXPgqXWSetRWCSStayy6WOp81tjv6034kv4nGNMujkOkahQdcImJv/EXC/cEkFlub3RXQZW8Rlu0cn6HMymBFZvkXSgpNypSLS+nxhumD5IfdKNJG1MVihaXP4lZrawhjWf14TZMicWXPPXEid+Nzml1QAOZk2E8BfltHR9RG72vJzaY3HPUlatU0SGmDu3MHXGyEL+D1j6fSstuOBvT0GyYNi6/AhxoCApFiBTjTHTOS/nLdP5QIYjsvFvKJ3KjCoiwW5JX7ko1tyRBBZE0CcgP+Sg6EoNq7ZgtyCjYqtlZw3PFkSgstA0Hs0vdg2X/AbBMr4IWfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ELhIipCA5a26Y55PWno65iZaFhnhGz7WGaf+5hkdpTo=; b=JzbeE7g5Cx1gus6nk6KSW3ml3I0SpV2bbc3D0K0nCH+8NFRH9z5e7FbhSyOYRzqj7q4jiwfc2/sl/uh/g0tI3NEGU8fqj52nPePB1J10y0lfbOau1UHeNROaVttxVkQYhFxSL6RU0HyByxxu7sSoZC+4QjT0V7n9EITf7NZHTh8yDfwZb+bw4YCfJmZS8/QYH92TnRcB5v8HTKNaCQ+A4J73KcCkJEVkBJdh1DBbXhuXA0qJUYaS1xQ189OAVW8m3XsViATvfosu7LZSpW4OOkutsbcxu7OcnXETUCSMUI39KGKj+mzuTLWupYrtpPLNw4nZgInEJXB/stJJp6iNrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ELhIipCA5a26Y55PWno65iZaFhnhGz7WGaf+5hkdpTo=; b=qZUI1UpEV1O6Y5Tsq4rAOh2KvC7OfspeKVTmLthfQxiBY6QQvExLLBxqV9I4SAJUukevkDUoJ4ENkzXScrjATpWUfi+ghCsKepZOJMWKqYS69ffuIU72MMeG/2WVhG8TqY3tFu9zHzf5OuYIOLwgGS4qbdo80rFmorP/he/HiOT3qR6MEvAmcLbSnJhsBdq5NTKs94YVWeTVIZADtVO4QuJ3GiWZomsxNrPp4gkODJjfMQxvRbMPhPHZINLEU5z+SjRCB0lFJOFOdMywLlPmkck/6Ru/lKoxzfsZ5Rz6uNBeKYbdtiEzn01VzDwMH4UFnvwLDOwe0DLpmIXCJu4etw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by PH0PR12MB7932.namprd12.prod.outlook.com (2603:10b6:510:280::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Fri, 14 Jun 2024 02:30:13 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7633.037; Fri, 14 Jun 2024 02:30:13 +0000 From: John Hubbard To: Andrew Morton , Jeff Xu , Shuah Khan Cc: Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML , John Hubbard Subject: [PATCH v2 3/6] selftests/mm: mseal, self_elf: rename TEST_END_CHECK to REPORT_TEST_PASS Date: Thu, 13 Jun 2024 19:30:06 -0700 Message-ID: <20240614023009.221547-4-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614023009.221547-1-jhubbard@nvidia.com> References: <20240614023009.221547-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0P220CA0004.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::9) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|PH0PR12MB7932:EE_ X-MS-Office365-Filtering-Correlation-Id: af80fed2-942c-4623-3eed-08dc8c19eb4c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|1800799019|366011|7416009|376009; X-Microsoft-Antispam-Message-Info: dBl/ZrVhVT1l6i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TqnlgxqUwhk+ZygpwHRkziwy7TnYQ9zD0fQR3TZu2PFoX8Uuf5VXDOSIvjPj6R3q99DLBVSiqAl7FrtETgexELENghhUI2kK2X/6Kt/OKCe9kWzb5HUzu8xFDcnhVm7VIR4NjVw8EbkiISnq3dfre9V+FTlpw7p3/8ewTIOaEwCqBv5mrIL//6azGHPkGx9JpzDrnb3i6RDvqdV+zOQfJS3qNO2FZx6bJGvqCjjmv2/bI7XpqfMHAFp X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230035)(1800799019)(366011)(7416009)(376009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6AWFnYCNzg+L2XlXDOSX18vivnKz0xs58pqLhnkxmRpRs+PAtg4yr2HRSzoKGjZtyrOk+ffvuRcaJa0JuwjSoGoXrNpdqroAGxErYnovexKvmEswHVJA9LOS7naNPB/wnWsQs0jhaZoZ3Tjfvo4Y4/BmVo3wC9wvqBeoHulVDdWrb85iKf1L/vigZAPbaIXJU9AWT6narvLYmIe5vdJOjEwsXjlwKGaC3iMd+xc38PRldXtTLlsscUBznSTR6m9qYEHs8QsY14jr2o30NMTuvM/LGMnADbrmCx09ERWPH4g+zy4DO7xC2xvXK+G8eMPfTz52/a5CMErohyge3hO9f2GZFzNI9fP7FEpFJ51VcAaN51Az+ZiXVaXyCI/YP4m9a56gdtDJ4kxmNAqbyxkCaBZXYEIP2RjUzoIpOAAqySUa2iAubzIexUR0ljK41lzwsDxKt9oJ+dCg79D/ORpRqKmyJLmY+yuVOgEHIox1FRM5q/Dv95leKRm9Dp9BE+xHwm8IRABYdpHdXBdEjTrQaLbZI8v79xX+Cxr7FtxJFKaKR4kTh37EvoAY//nCfoQlnDWMSjF/2WLDUf7GBeL0oOiUoKa0Vwx/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exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 02:30:13.0775 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: giV4Hpf7QEEvwidWUQQj4Y8mflKYyTW3ehMilVPpXstD97i/OkrSVWLZLWuX2Stmor/zyhR+8utfBwfj4n8O2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7932 Now that the test macros are factored out into their final location, and simplified, it's time to rename TEST_END_CHECK to something that represents its new functionality: REPORT_TEST_PASS. Cc: David Hildenbrand Reviewed-by: Jeff Xu Tested-by: Jeff Xu Signed-off-by: John Hubbard --- tools/testing/selftests/mm/mseal_helpers.h | 2 +- tools/testing/selftests/mm/mseal_test.c | 92 +++++++++++----------- tools/testing/selftests/mm/seal_elf.c | 2 +- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/tools/testing/selftests/mm/mseal_helpers.h b/tools/testing/selftests/mm/mseal_helpers.h index 108d3fd0becb..0cfce31c76d2 100644 --- a/tools/testing/selftests/mm/mseal_helpers.h +++ b/tools/testing/selftests/mm/mseal_helpers.h @@ -18,7 +18,7 @@ } \ } while (0) -#define TEST_END_CHECK() ksft_test_result_pass("%s\n", __func__) +#define REPORT_TEST_PASS() ksft_test_result_pass("%s\n", __func__) #ifndef PKEY_DISABLE_ACCESS #define PKEY_DISABLE_ACCESS 0x1 diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c index a28912fbecab..a556b7e51caa 100644 --- a/tools/testing/selftests/mm/mseal_test.c +++ b/tools/testing/selftests/mm/mseal_test.c @@ -240,7 +240,7 @@ static void test_seal_addseal(void) ret = sys_mseal(ptr, size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_unmapped_start(void) @@ -268,7 +268,7 @@ static void test_seal_unmapped_start(void) ret = sys_mseal(ptr + 2 * page_size, 2 * page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_unmapped_middle(void) @@ -300,7 +300,7 @@ static void test_seal_unmapped_middle(void) ret = sys_mseal(ptr + 3 * page_size, page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_unmapped_end(void) @@ -329,7 +329,7 @@ static void test_seal_unmapped_end(void) ret = sys_mseal(ptr, 2 * page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_multiple_vmas(void) @@ -360,7 +360,7 @@ static void test_seal_multiple_vmas(void) ret = sys_mseal(ptr, size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_split_start(void) @@ -385,7 +385,7 @@ static void test_seal_split_start(void) ret = sys_mseal(ptr + page_size, 3 * page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_split_end(void) @@ -410,7 +410,7 @@ static void test_seal_split_end(void) ret = sys_mseal(ptr, 3 * page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_invalid_input(void) @@ -445,7 +445,7 @@ static void test_seal_invalid_input(void) ret = sys_mseal(ptr - page_size, 5 * page_size); FAIL_TEST_IF_FALSE(ret < 0); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_zero_length(void) @@ -469,7 +469,7 @@ static void test_seal_zero_length(void) ret = sys_mprotect(ptr, size, PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_zero_address(void) @@ -495,7 +495,7 @@ static void test_seal_zero_address(void) ret = sys_mprotect(ptr, size, PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_twice(void) @@ -515,7 +515,7 @@ static void test_seal_twice(void) ret = sys_mseal(ptr, size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect(bool seal) @@ -539,7 +539,7 @@ static void test_seal_mprotect(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_start_mprotect(bool seal) @@ -569,7 +569,7 @@ static void test_seal_start_mprotect(bool seal) PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_end_mprotect(bool seal) @@ -599,7 +599,7 @@ static void test_seal_end_mprotect(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_unalign_len(bool seal) @@ -628,7 +628,7 @@ static void test_seal_mprotect_unalign_len(bool seal) PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_unalign_len_variant_2(bool seal) @@ -656,7 +656,7 @@ static void test_seal_mprotect_unalign_len_variant_2(bool seal) PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_two_vma(bool seal) @@ -691,7 +691,7 @@ static void test_seal_mprotect_two_vma(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_two_vma_with_split(bool seal) @@ -738,7 +738,7 @@ static void test_seal_mprotect_two_vma_with_split(bool seal) PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_partial_mprotect(bool seal) @@ -764,7 +764,7 @@ static void test_seal_mprotect_partial_mprotect(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_two_vma_with_gap(bool seal) @@ -807,7 +807,7 @@ static void test_seal_mprotect_two_vma_with_gap(bool seal) ret = sys_mprotect(ptr + 3 * page_size, page_size, PROT_READ); FAIL_TEST_IF_FALSE(ret == 0); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_split(bool seal) @@ -844,7 +844,7 @@ static void test_seal_mprotect_split(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_merge(bool seal) @@ -878,7 +878,7 @@ static void test_seal_mprotect_merge(bool seal) ret = sys_mprotect(ptr + 2 * page_size, 2 * page_size, PROT_READ); FAIL_TEST_IF_FALSE(ret == 0); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_munmap(bool seal) @@ -903,7 +903,7 @@ static void test_seal_munmap(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } /* @@ -943,7 +943,7 @@ static void test_seal_munmap_two_vma(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } /* @@ -981,7 +981,7 @@ static void test_seal_munmap_vma_with_gap(bool seal) ret = sys_munmap(ptr, size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_munmap_start_freed(bool seal) @@ -1021,7 +1021,7 @@ static void test_munmap_start_freed(bool seal) FAIL_TEST_IF_FALSE(size == 0); } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_munmap_end_freed(bool seal) @@ -1051,7 +1051,7 @@ static void test_munmap_end_freed(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_munmap_middle_freed(bool seal) @@ -1095,7 +1095,7 @@ static void test_munmap_middle_freed(bool seal) FAIL_TEST_IF_FALSE(size == 0); } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_shrink(bool seal) @@ -1124,7 +1124,7 @@ static void test_seal_mremap_shrink(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_expand(bool seal) @@ -1156,7 +1156,7 @@ static void test_seal_mremap_expand(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move(bool seal) @@ -1189,7 +1189,7 @@ static void test_seal_mremap_move(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mmap_overwrite_prot(bool seal) @@ -1217,7 +1217,7 @@ static void test_seal_mmap_overwrite_prot(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == ptr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mmap_expand(bool seal) @@ -1248,7 +1248,7 @@ static void test_seal_mmap_expand(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == ptr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mmap_shrink(bool seal) @@ -1276,7 +1276,7 @@ static void test_seal_mmap_shrink(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == ptr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_shrink_fixed(bool seal) @@ -1307,7 +1307,7 @@ static void test_seal_mremap_shrink_fixed(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == newAddr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_expand_fixed(bool seal) @@ -1338,7 +1338,7 @@ static void test_seal_mremap_expand_fixed(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == newAddr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move_fixed(bool seal) @@ -1368,7 +1368,7 @@ static void test_seal_mremap_move_fixed(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == newAddr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move_fixed_zero(bool seal) @@ -1400,7 +1400,7 @@ static void test_seal_mremap_move_fixed_zero(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move_dontunmap(bool seal) @@ -1429,7 +1429,7 @@ static void test_seal_mremap_move_dontunmap(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move_dontunmap_anyaddr(bool seal) @@ -1463,7 +1463,7 @@ static void test_seal_mremap_move_dontunmap_anyaddr(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } @@ -1556,7 +1556,7 @@ static void test_seal_merge_and_split(void) FAIL_TEST_IF_FALSE(size == 22 * page_size); FAIL_TEST_IF_FALSE(prot == 0x4); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon_on_rw(bool seal) @@ -1585,7 +1585,7 @@ static void test_seal_discard_ro_anon_on_rw(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon_on_pkey(bool seal) @@ -1632,7 +1632,7 @@ static void test_seal_discard_ro_anon_on_pkey(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon_on_filebacked(bool seal) @@ -1669,7 +1669,7 @@ static void test_seal_discard_ro_anon_on_filebacked(bool seal) FAIL_TEST_IF_FALSE(!ret); close(fd); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon_on_shared(bool seal) @@ -1698,7 +1698,7 @@ static void test_seal_discard_ro_anon_on_shared(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon(bool seal) @@ -1728,7 +1728,7 @@ static void test_seal_discard_ro_anon(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } int main(int argc, char **argv) diff --git a/tools/testing/selftests/mm/seal_elf.c b/tools/testing/selftests/mm/seal_elf.c index 7f6a95613dd6..619da94b9f33 100644 --- a/tools/testing/selftests/mm/seal_elf.c +++ b/tools/testing/selftests/mm/seal_elf.c @@ -127,7 +127,7 @@ static void test_seal_elf(void) FAIL_TEST_IF_FALSE(ret < 0); ksft_print_msg("somestr is sealed, mprotect is rejected\n"); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } int main(int argc, char **argv) From patchwork Fri Jun 14 02:30:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 804362 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2064.outbound.protection.outlook.com [40.107.93.64]) (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 DFC8B183089; Fri, 14 Jun 2024 02:30:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332223; cv=fail; b=hMgauUeRfTq0p93DpuBAxRd3aq2gM3uKUfxkmoOdo2lKDe5lZfdq9cL20nobaeP+7et0xviH55J5RxhoGxsJuf73qsvvi2ZlMzjH2u7mq8xGP1jgsnUTj+E627z/mSXPoceV8G8Uz7DKvnb6JQyPBL9zqlAr2xuJNr5vsTEytUg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332223; c=relaxed/simple; bh=qdRWUqit2zt27Rf7I2FXQyMcGNwGWl5gyBtLyWFLXYc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=j82dsg10jbnsmrvRFzHGv7SwvfC0hcQLGRSn4xcnY5SyGEL3WZxrobuvP6GKHfXzYRpsPTPC7hGNTyYlczSdKjTTHdgMTtBNZ5tdlCTTFHpYB+myzVYIFJPsCqaJYCoTTbQcCTsXZXFao3PEQQqXBpLsiKT6E8il9BNrRa/dDLo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=XSGnh9Ys; arc=fail smtp.client-ip=40.107.93.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="XSGnh9Ys" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+teUa1lsFgw9IndVXCcJaLbWg8TxygQEpEg01R+pc9g9UR7KIgk11sq4m/60W1kTYSMyGAuXGAsEAwmolH138OYcbgO5dBBgMZGOWnfoy3SYwtLglkhSZdzcZxdsfHo9+66+2V7Z6+ahMPMfS6gfUca/5ZzKe352TsYge8Z1/MJZFVbH+kEZgCWMEp3LZnlE43yQi8vQwqQ1W35n2tQN9q4iGQzzd8or4KerC3YJc9N9tx7O6CcG9N3b1HVRrBh0xVIUI3K3LvUNAEM6qwk5HAsg4o9haoNlui+P/RHQswpo2vybIOcL/TqbCLLzqLqGUj2qusu1KmKy9JR8WX22w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NoWxrNu2/lNGxpSyzZvJOSkpzkLkvc49dciH5tTtUsE=; b=b40th1DDgbcabrufVNcoWz6okaukX1jKL7Ay0NP53djLRcrL6+8SyTjjVW04hnIlQb+i55kN6/Lmx/D7QYmeZcHIluHDeKAkAw+0vcLcoYoIHO+hvVm5yrs3vYlXjPMBHnzHmBk/i/Oz/qsBuevDw8v6dNrHycS360mz0Hg4Pg+0A8rOQdRTM4Mhrakah1hNN8IXVxevBKuwQpK2gH+4LJ7D1wFsQY3ynMEZPTfCXhFOEYtDinT7ZZuKYK8z0pjTpuIwt0azDnWqJbmNLTeVWO/cI3+AkCY4S7eXqWoITXq9bPGgjE4Gz/BuzD6t9F9F7cDYK9dj0u5yWmXhFKPSBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NoWxrNu2/lNGxpSyzZvJOSkpzkLkvc49dciH5tTtUsE=; b=XSGnh9YsaDJBYBx/xfxprChgw5anYIdirbQEtKNaShLdWVG5f9p5FwcSAvbuo53QhA3hS1vRVJeVQSzeqGl53HuQBLpQgVOc2QBHkt30wi8w1RYyO6oPHhUt1+JVRcflisl2BiKNT+WLEUIfy3p/WW+oFn/pj20HMxIzXSKUg6eHljdEksaf8MjjEr6n6HISCjo9Uszg8R28cPFs5hySnLcETD3+dac7X/SJTSmA+t6MsC2MpxcpOt8DLOd13d+ASigQF97TCM/2o/iLgH2RaWuA3moW/bNKXhCgDncIsakZkYqr5u2JN7HhcI2rIZxcnay5/uTTPrnVKa4IO4836g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by PH0PR12MB7932.namprd12.prod.outlook.com (2603:10b6:510:280::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Fri, 14 Jun 2024 02:30:13 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7633.037; Fri, 14 Jun 2024 02:30:13 +0000 From: John Hubbard To: Andrew Morton , Jeff Xu , Shuah Khan Cc: Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML , John Hubbard Subject: [PATCH v2 4/6] selftests/mm: fix vm_util.c build failures: add snapshot of fs.h Date: Thu, 13 Jun 2024 19:30:07 -0700 Message-ID: <20240614023009.221547-5-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614023009.221547-1-jhubbard@nvidia.com> References: <20240614023009.221547-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0P220CA0029.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::13) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|PH0PR12MB7932:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b723ddc-931b-4407-cba1-08dc8c19ebc8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;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gj7eXGBu8o2RgSOTR8H0NVxfPJIrd+VO7U2+BLnUllAw9hOVrYK+3ddBUVuSOm3SX7mWYM1+J9l/Qb6CiFG0VSuk+DrQhE3c8rmuZKVL5kLVmi2EG5o3cfsJY3wSxviS2sBJPLsmf796a/3gXd8DmYjExzMvfegQ2GvsaJ7jFLAacQ62skrScauIxFKHDuO72JMXTsI9+drWaeZ5IQpSm7pODexbEkRmTC2oTZLPlXW3FvxZMguFqVSYIXlO+1WD2n2F1hPXSdA2laIgTeqErtiKILbEYG+1v3DUl3OE5SDG X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230035)(1800799019)(366011)(7416009)(376009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Bd+ApD8ZrIBaQUhXhgPwpe50GSqxJ3BEgxAXR/MlMaKs+sNPO0r38prkE892I22O46gqBDWqIWdzN0c9/EfhN+pUoLqAY45+Lc4zv0NlRfBTVC9k3FglEXUSfwfTHrYGCe3HTQpZibglNq76Ru4FHF853Dkw41G5iVP/Sualug1xle/06wGy6naj1KrKzDzxzVz5zZ1vb+sg6tm0SoJVF/uuPwsLP9onz5UId3GzmhTlT/Bs4hf1SMfudBI2LAC1MZPQndVAVf3L4YV3EEFQz6YATvZ0q8p6+waFOarGfu/bmRfc2fZCD9bl7ehBlJNmuirGNTr31ILJSri1oq2pwXv/cJFBW2zks9duklFB+YMURDqKeDkKTtYk+Cr6iRQA/5NSZxQlwSsaFYIaSWHPejoa2crPrPUEWtf2gtnQH8zp7K7NfwumumF4wFJgLeIjbI8Jf+dhKxCG0fntjSeqM8xKLIms8XW8+YSIxW7eUgHHN5N02RWLTfgqZOtCfDlmXLnkHfmorwb/0XJwQT8yeKkr/vouG0x+YGTGHdO9TFxyoESgYRbndm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-Id: 1b723ddc-931b-4407-cba1-08dc8c19ebc8 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 02:30:13.8429 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5crfw4ZB2CNsc4vx3Wxkcu2HJqM54pOPhbaAhUzqH+VlwkiurgEP35vbQeUG8nkoN2D5OR+PTV9lKI34XHh0KA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7932 On Ubuntu 23.04, on a clean git tree, the selftests/mm build fails due 10 or 20 missing items, all of which are found in fs.h, which is created via "make headers". However, as per [1], the idea is to stop requiring "make headers", and instead, take a snapshot of the files and check them in. Here are a few of the build errors: vm_util.c:34:21: error: variable has incomplete type 'struct pm_scan_arg' struct pm_scan_arg arg; ... vm_util.c:45:28: error: use of undeclared identifier 'PAGE_IS_WPALLOWED' ... vm_util.c:55:21: error: variable has incomplete type 'struct page_region' ... vm_util.c:105:20: error: use of undeclared identifier 'PAGE_IS_SOFT_DIRTY' To fix this, add fs.h, taken from a snapshot of ./usr/include/linux/fs.h after running "make headers". [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") Cc: David Hildenbrand Signed-off-by: John Hubbard --- tools/include/uapi/linux/fs.h | 392 ++++++++++++++++++++++++++++++++++ 1 file changed, 392 insertions(+) create mode 100644 tools/include/uapi/linux/fs.h diff --git a/tools/include/uapi/linux/fs.h b/tools/include/uapi/linux/fs.h new file mode 100644 index 000000000000..ca9d754bae04 --- /dev/null +++ b/tools/include/uapi/linux/fs.h @@ -0,0 +1,392 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _LINUX_FS_H +#define _LINUX_FS_H + +/* + * This file has definitions for some important file table structures + * and constants and structures used by various generic file system + * ioctl's. Please do not make any changes in this file before + * sending patches for review to linux-fsdevel@vger.kernel.org and + * linux-api@vger.kernel.org. + */ + +#include +#include +#include +#include + +/* Use of MS_* flags within the kernel is restricted to core mount(2) code. */ +#include + +/* + * It's silly to have NR_OPEN bigger than NR_FILE, but you can change + * the file limit at runtime and only root can increase the per-process + * nr_file rlimit, so it's safe to set up a ridiculously high absolute + * upper limit on files-per-process. + * + * Some programs (notably those using select()) may have to be + * recompiled to take full advantage of the new limits.. + */ + +/* Fixed constants first: */ +#undef NR_OPEN +#define INR_OPEN_CUR 1024 /* Initial setting for nfile rlimits */ +#define INR_OPEN_MAX 4096 /* Hard limit for nfile rlimits */ + +#define BLOCK_SIZE_BITS 10 +#define BLOCK_SIZE (1< X-Patchwork-Id: 804361 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2064.outbound.protection.outlook.com [40.107.93.64]) (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 2EF4A1836D4; Fri, 14 Jun 2024 02:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332225; cv=fail; b=X8NaluDtJZ/IytFFo7KlLxMuThFAOfOcVjk2ZpnhN7AEoUNj/gUpsPI/qOQR6C+AJv8KufQL7nnJ5vUjXv49y6oqEVx8nK5wQTVQ6/Bg05DDnnBJjAQFQohSBXE3jkBnYGHUo7hmov2eGB6BPNmeFrNpT07Ud6qmxel0XKf5POA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332225; c=relaxed/simple; bh=uuJELeuSegd5T7IZ4PbDBzKeC3iAaUnxpJilz/0MSoQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=DE/H1RZ48SESGPf7riFJuxd7lfQxirxvzgm1iTtEDl3JwlG7ArljBkYdOKLHzBf2PeW+jPjNxmAT5jE6rVvpsHAbsUuvQ908G9DhBr+mtpvcrSbWMXN70FPMLchV5MYr+SwFzXhUT2d9DZblE4Ss90K+f8OiA7MpH9vEs4pjaik= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=XjtCL5M9; arc=fail smtp.client-ip=40.107.93.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="XjtCL5M9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yz5fNajO1Ht8QsTCJjpjqR2r2S/oevvFiYWbI8mithve+lVijMlnzrpClH4Ame7kD6YSAcqVB3+uQ5kbAzCsPDJsb7HuvsK2Hqwsd7z+/RZJrmGeYbJptuMB7CTB4dt1lBpZdauGbzIX0SLghYHwaR+TUbQ7Gz1lApmmL+TtK90GqmdATN8eC51VQLeaxOWXbfk8P1GHpsziE510XIxg8zZAjA8nmHdikrbGOLmiexsNlP+iKK0AFREAj9He/fNtE57fmWSmLqZdgUdlBcQCr4vHubehleGFXsVLs5TcF0iWwu+Xs1GyZEBnXO80SfatxOPB41gbwuKvJdAZ57cJ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=D9+g6+820LN46VxxBOfmNDi/NM5Xoh65XECL3YB/2Cw=; b=E1T6r8fvkoAo/tJej/IhbwyhkJtpUmfJZnfG+MdaI4V+a25SK6fUFNkinzDrlmSDu2oNcDqWlv2JKVLpX6KDEZMsgFWSqV1pFdjJ2LON2OrW+wF0DjynkNnNKbG73rViN0OGlNsWZWKhB3gVg20daAqCxhZfkk69HJgkRpepbVYH//Ibt+POPA8ekAgHbKN3dpYBkdIYZEblXUdqmWPo4F1FdsA1MKskxsi8dZyBGtgaSVdq89H8NTs2rrM9nRAnRczCUlTObDXV9vrINOt9XGkgKQSYRHR3KwhRjkWQj7noejiZrm7xnccawrq7/U5glPBcxR56T1PXBTDrCEY+eQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D9+g6+820LN46VxxBOfmNDi/NM5Xoh65XECL3YB/2Cw=; b=XjtCL5M9PGDDLLTjCkGUk6gMSVnzOTy9dLREMdLZAzdMjZRKGYnontHK2tNx2K0o7wpdCF/Lu4h8lwdvbTJyYRsfXdP/NPrwld7UhRwI7uOtJNDYA5+YDJp2ylX4Q9xCFwfJZdUXwBxfEms5d5JFvwCKHagWihBU1mYHXQhaef+iMm4u1ir3XVFtroNvjLrI9dqYUHq8Nuo9WkcNDC4mcjtS4cwkQxoRlmqCIT1GKapKhrDw+Xn0VrEdlhNMcyDD8TEp4seBmXNJFA4yUC8xIUC56j3hrQ1HVi6yDtS5UIEXdb+OAI8Vb7CPtKt+IfsIgVjonxGg9U0t3+C0ol7iNA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by PH0PR12MB7932.namprd12.prod.outlook.com (2603:10b6:510:280::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Fri, 14 Jun 2024 02:30:14 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7633.037; Fri, 14 Jun 2024 02:30:14 +0000 From: John Hubbard To: Andrew Morton , Jeff Xu , Shuah Khan Cc: Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML , John Hubbard Subject: [PATCH v2 5/6] selftests/mm: kvm, mdwe fixes to avoid requiring "make headers" Date: Thu, 13 Jun 2024 19:30:08 -0700 Message-ID: <20240614023009.221547-6-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614023009.221547-1-jhubbard@nvidia.com> References: <20240614023009.221547-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR13CA0177.namprd13.prod.outlook.com (2603:10b6:a03:2c7::32) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|PH0PR12MB7932:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ecdf677-0c85-4db7-3263-08dc8c19ec3c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|1800799019|366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r1ZBYvta1UL826jUXCUMELkrpz/30ND5AGuSiNRzqfDmUw0PhBLgHRYrEJ3yErZOqv2wQ3cqCDGavM6q6MPd+MW+yirxg5spGSEujsJbTF1vhNmUZrLCYc7OS8ZU9Wak3SvrCLlcggkAd4V8n/UBHqPhB21i5ra0eFwfKOcUtDmh23OmjzdQurtH/iXvjUwN69Ap20DaUIyt03XxvfAhQgsEuPMcJGmuVCtjbFcgIy3BtrxQ8PCw9moaj8N8yi8t/wpK6odYZTRUYb2jIuvlzzOdJdAbqFquiGDwv X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230035)(1800799019)(366011)(7416009)(376009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AiLhD4X+TfP3MafMziNMjYJrldP6s5127O4a8h0Kv43u8gT8RL6o4WYlf+eQ2di9uOwhEHfiCcjRiP4ZAG+izyueiygbcmrP9w57ZxQ4tQZuProuudHEe6v56rx9wLuCFzdr26lMX8c3k++EsWBkWk30DDrb5BIaiFL6kkTLfZgyTFUNaDDAhf6HoJArb62mXLMGrF9uAYmz31TNO+6TcQSA1Mw2tFQvhmWJCCgN2l070SdnWC0VbQ2/VhWrQ84jh6ocMAQqV56c0Ji3S3Aj9NNvAhWdEyO4NHRm6m8BAD1Lfw0NJ+s2O0MNOlCGIml9/tYIGFWBnnecChudQLQ+Xcx0FwRVqJZeY8Lh8MaV4XQ2+p02ypRJ7Fn/cefPS8WJ6HxK6QaRgsvFnzntf50hK2mPFP8aTCDC4NFp1ylIsR9yzlS7NuDLrAYzVwpWmMiUd6oWXSWVjinb8GQuBT2qhU7pqWxjP/23g6u2kVF9du4s/B+fnU9H9bDZNEbwcOIxnfVdmhzbcTDuxCfhgm8isk1QiVhfMKLQYnGWqYWOX+srnq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CrossTenant-Network-Message-Id: 9ecdf677-0c85-4db7-3263-08dc8c19ec3c X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 02:30:14.5874 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SPjY3FTrQ8Icnkgh7VoMj+BYMoOtR+p7sif1CvGLKvKpGYzFZebgj9tgPieW/0qg4TKPUYlCgrX7K+SqNgVGIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7932 On Ubuntu 23.04, the kvm and mdwe selftests/mm build fails due to missing a few items that are found in prctl.h. Here is an excerpt of the build failures: ksm_tests.c:252:13: error: use of undeclared identifier 'PR_SET_MEMORY_MERGE' ... mdwe_test.c:26:18: error: use of undeclared identifier 'PR_SET_MDWE' mdwe_test.c:38:18: error: use of undeclared identifier 'PR_GET_MDWE' Fix these errors by adding the missing items to vm_util.h, and include vm_util.h from mdwe_test.c. Cc: David Hildenbrand Signed-off-by: John Hubbard --- tools/testing/selftests/mm/mdwe_test.c | 1 + tools/testing/selftests/mm/vm_util.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/tools/testing/selftests/mm/mdwe_test.c b/tools/testing/selftests/mm/mdwe_test.c index 200bedcdc32e..cfe0b64d1567 100644 --- a/tools/testing/selftests/mm/mdwe_test.c +++ b/tools/testing/selftests/mm/mdwe_test.c @@ -15,6 +15,7 @@ #include #include "../kselftest_harness.h" +#include "vm_util.h" #ifndef __aarch64__ # define PROT_BTI 0 diff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h index 9007c420d52c..99cbb7c0ea9d 100644 --- a/tools/testing/selftests/mm/vm_util.h +++ b/tools/testing/selftests/mm/vm_util.h @@ -61,3 +61,18 @@ unsigned long get_free_hugepages(void); #define PAGEMAP_PRESENT(ent) (((ent) & (1ull << 63)) != 0) #define PAGEMAP_PFN(ent) ((ent) & ((1ull << 55) - 1)) + +#ifndef PR_SET_MEMORY_MERGE +#define PR_SET_MEMORY_MERGE 67 +#endif + +#ifndef PR_GET_MEMORY_MERGE +#define PR_GET_MEMORY_MERGE 68 +#endif + +#ifndef PR_SET_MDWE +#define PR_SET_MDWE 65 +#define PR_MDWE_REFUSE_EXEC_GAIN (1UL << 0) +#define PR_MDWE_NO_INHERIT (1UL << 1) +#define PR_GET_MDWE 66 +#endif From patchwork Fri Jun 14 02:30:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 804360 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2064.outbound.protection.outlook.com [40.107.93.64]) (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 D4095184108; Fri, 14 Jun 2024 02:30:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332227; cv=fail; b=AcH3EkzFv2u8a2l2LS8iCHbniAnrARTMp9X3M+4CCtBoyB/Dwd3TaEN2bpbHN36yAp6BO36VJMCm17izqOBhFCkyu5/luomlroRTnu9D3/aw9m8x2qVAa+Vaqg8ouPfacdALYbPz2D90wzvnNugBDotX8zymKwXK2mpNW1RYyDs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718332227; c=relaxed/simple; bh=cxZteq0dC5JNyuYb/vtfehRaJNlL6iL3gBhYjxWOzDA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Sn6N7uzP2uWgxD6hSmo8eJ4GJoiFrTbM3w5DzrBosQPkIpntWwHtvNTtZ9zdFn/mYrYvhlE0gYJmQDRVJve6fz+EDcew7ygYffSXoM1f7iNjj/+/btXJG5BhbcH5n+GXDPpm0HyezOiR+UplllNgld1/wOIUTBpNTyFafA7HaA4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=ZzJoLkAa; arc=fail smtp.client-ip=40.107.93.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="ZzJoLkAa" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MrlaRwCq9sGJMIRlDAlDL35Rs+Cobfnf9x1DPFxh0ndYuVcEh+HsTteZ9RtlpDKVKdRC0rgHQMV8Rh+FMmbzaHQCJCT7c/ZoxaKrcfjstksA9H/o8U30yyXHgd3foz0DlWz789r5/noBJ/ZLNLhUQPiaaxkfnlQAM/6wAGzTHwy/JHo1JhM+604qLaJ6CsnbevBDJ5/G+S0UgCJloPJmLyfveSqs86kSiLj0Flr11G+s+mzV2/k2IYOT7NcMOHXR5b9FwXsctyh6U+VqtXhLMiVpEiyEouW49Hl083y2+Vl8+TfUmds/hveHckqEpEsyZjBXRplwA9/2UlJkiuPlAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lhPpRj+9yaeRdjrqVKe2AajeBxh6x9UGdGkPrZPPJ40=; b=neuzttqk0Hav87amCCDqonemyxg+dPkVhgxgMgAEcPfwfwGonAaoIlplnAgjvBFTj22l82wfmoI9QHrmh1Yo5ScEdpdrRUtSu1Gy3Kh1F0hMAVggtVjktDtJNnl8gMXAPM+TV8GOhvXBgDsk6yVqwm9btYSBymK0B4J/O5tjhSkseW7KDuK0585eCQA8nI9aehKAQkZELLLXBTo/B+I6iCSYjB1w4fx3fhRVK2sLXeFZ8vxc9RNz1Wi0xwC8t5xxiXxZUxb3k65Iiqa8J4RDUZjB0jSKwJ7e/xuwmIs8WAdsV5E1FmoUbxKwHX01goWPNxqmYI355gVxs2DQc8OEhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lhPpRj+9yaeRdjrqVKe2AajeBxh6x9UGdGkPrZPPJ40=; b=ZzJoLkAatOrCA9jv8XrVLP5e25iqwhPyFljrlByBKPE5PP7mWgoq4rXdFF7ftuM2oCs10PPPmAMO0SrtKJLW3Srnz5eiAqgLuPx/GyqqnFJS/KZKHLdI2S1u1BocOr4uPyJePSHG/whBdG+LTxo3oT0XTMpjGeh62qyGqUoierHryOYT0dG/CIzF/AagaF1Hh6tuvoXxDWcGAjQCNdrvSogZqAfUqY+3MT878bCtt+f8eAcrZWSoSlC4983lIrFc1cxRDcaR+9J82kfwXzodYOtVbssyMBI6JNBZ83MRl3AABl/Mll7IrkWdi2RMrT0oADJtAq3XLXRUebStvg8Atw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by PH0PR12MB7932.namprd12.prod.outlook.com (2603:10b6:510:280::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Fri, 14 Jun 2024 02:30:15 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7633.037; Fri, 14 Jun 2024 02:30:15 +0000 From: John Hubbard To: Andrew Morton , Jeff Xu , Shuah Khan Cc: Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML , John Hubbard Subject: [PATCH v2 6/6] selftests/mm: remove local __NR_* definitions Date: Thu, 13 Jun 2024 19:30:09 -0700 Message-ID: <20240614023009.221547-7-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614023009.221547-1-jhubbard@nvidia.com> References: <20240614023009.221547-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR13CA0152.namprd13.prod.outlook.com (2603:10b6:a03:2c7::7) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|PH0PR12MB7932:EE_ X-MS-Office365-Filtering-Correlation-Id: 09e2e3b4-b642-4139-3379-08dc8c19ec7c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|1800799019|366011|7416009|376009; X-Microsoft-Antispam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AnlMyaTT9YMRD5goklXM2s90UHANNp9M0yirHQ3BdiAINBfDQiYyAZfVEcJeFAkjKB164+aZSeKICkTEaNVH1N3g7MqjVVykwpY1Mcgnd6Rm4C1UTpFRICNEKzRnsTbnLPGnB87MLo7qMejO7sMrU1CTUvHye8w/qZSMrUhJwOKs2l+T4XtKm3BfljSV3SAIPR9UoPSz5E71nxQwV/a9vc6qOiXvW8xqDrh++Tj3yFiFDoVlR1fDGsTRu9t38VMAI5QIrz6wMEWuz++nWp3kMXH X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230035)(1800799019)(366011)(7416009)(376009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y0Q+qVAedrLV9rJkHNTZYKFYbT2NXzZ+OCLdZm9iu+l/TBpmUhqoSuuy2It/B7CA/99pTuAT6lwkXlUDGzXSuX9NFcO5k1qIqji82xlYCQm3r5y326J/yifB3rbN2XnTeLzvrRgPGWp2AmFT4UqeE8i8o8dwLM7oLW9oWuCyWVznVAWdrRxfgn46/TSMlMA/K9I43WgxFXDh3GmFvZrDOG01oj5rY02t6NIeIpUBmifIjYDKVxn2wBw0Y+KcPI5CG4DV2iU+aBLroiG157d6ORFQa9DDgOttKEvgXCXQaPxSzqjFE8TXyqW3QxAkHkEJhPkbUoSJ9Ky3iEXP4bGLIexwSCuGjTJUH3TxB+bpbpdNLZ/dCqKnE7YoD2LEswhC8THH+eWhMaQ/fmGC0yWjZdQliL9o9OwWqQfq/9MbvaINoxGnNuwSyf46P+e3OadFVZIjmciE4R1iMHVqRcF3o6mMyUfu+M35x7+i5TdIzKVRuO+xum5KsqKDYdoXtjs/DOiUafqAtTV8H+IMFcRTnDkMOsKyVoQcjXyWAzIV0l3RGSlwmLTGYl4QiJ2oNl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139-3379-08dc8c19ec7c X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 02:30:15.0077 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zUu1l8nLqLCh39svDfAWPnpmKac4bEiuUGbYus+CVldCis4Jn0bE//QXtKlrrlzraoZxep428Z+EccwYnsqISQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7932 This continues the work on getting the selftests to build without requiring people to first run "make headers" [1]. Now that the system call numbers are in the correct, checked-in locations in the kernel tree (./tools/include/uapi/asm/unistd*.h), make sure that the mm selftests include that file (indirectly). Doing so provides guaranteed definitions at build time, so remove all of the checks for "ifdef __NR_xxx" in the mm selftests, because they will always be true (defined). [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") Cc: David Hildenbrand Cc: Jeff Xu Signed-off-by: John Hubbard --- tools/testing/selftests/mm/hugepage-mremap.c | 2 +- .../testing/selftests/mm/ksm_functional_tests.c | 8 +------- tools/testing/selftests/mm/memfd_secret.c | 14 +------------- tools/testing/selftests/mm/mkdirty.c | 8 +------- tools/testing/selftests/mm/mlock2.h | 1 + tools/testing/selftests/mm/mrelease_test.c | 2 +- tools/testing/selftests/mm/pagemap_ioctl.c | 2 +- tools/testing/selftests/mm/protection_keys.c | 2 +- tools/testing/selftests/mm/uffd-common.c | 4 ---- tools/testing/selftests/mm/uffd-stress.c | 16 +--------------- tools/testing/selftests/mm/uffd-unit-tests.c | 14 +------------- 11 files changed, 10 insertions(+), 63 deletions(-) diff --git a/tools/testing/selftests/mm/hugepage-mremap.c b/tools/testing/selftests/mm/hugepage-mremap.c index c463d1c09c9b..2893bc002639 100644 --- a/tools/testing/selftests/mm/hugepage-mremap.c +++ b/tools/testing/selftests/mm/hugepage-mremap.c @@ -15,7 +15,7 @@ #define _GNU_SOURCE #include #include -#include +#include #include #include #include /* Definition of O_* constants */ diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c b/tools/testing/selftests/mm/ksm_functional_tests.c index 37de82da9be7..1d584a415bde 100644 --- a/tools/testing/selftests/mm/ksm_functional_tests.c +++ b/tools/testing/selftests/mm/ksm_functional_tests.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -369,7 +369,6 @@ static void test_unmerge_discarded(void) munmap(map, size); } -#ifdef __NR_userfaultfd static void test_unmerge_uffd_wp(void) { struct uffdio_writeprotect uffd_writeprotect; @@ -430,7 +429,6 @@ static void test_unmerge_uffd_wp(void) unmap: munmap(map, size); } -#endif /* Verify that KSM can be enabled / queried with prctl. */ static void test_prctl(void) @@ -665,9 +663,7 @@ int main(int argc, char **argv) exit(test_child_ksm()); } -#ifdef __NR_userfaultfd tests++; -#endif ksft_print_header(); ksft_set_plan(tests); @@ -694,9 +690,7 @@ int main(int argc, char **argv) test_unmerge(); test_unmerge_zero_pages(); test_unmerge_discarded(); -#ifdef __NR_userfaultfd test_unmerge_uffd_wp(); -#endif test_prot_none(); diff --git a/tools/testing/selftests/mm/memfd_secret.c b/tools/testing/selftests/mm/memfd_secret.c index 9a0597310a76..1fcf65c08c87 100644 --- a/tools/testing/selftests/mm/memfd_secret.c +++ b/tools/testing/selftests/mm/memfd_secret.c @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -28,8 +28,6 @@ #define pass(fmt, ...) ksft_test_result_pass(fmt, ##__VA_ARGS__) #define skip(fmt, ...) ksft_test_result_skip(fmt, ##__VA_ARGS__) -#ifdef __NR_memfd_secret - #define PATTERN 0x55 static const int prot = PROT_READ | PROT_WRITE; @@ -334,13 +332,3 @@ int main(int argc, char *argv[]) ksft_finished(); } - -#else /* __NR_memfd_secret */ - -int main(int argc, char *argv[]) -{ - printf("skip: skipping memfd_secret test (missing __NR_memfd_secret)\n"); - return KSFT_SKIP; -} - -#endif /* __NR_memfd_secret */ diff --git a/tools/testing/selftests/mm/mkdirty.c b/tools/testing/selftests/mm/mkdirty.c index b8a7efe9204e..7dde5b9a9ef5 100644 --- a/tools/testing/selftests/mm/mkdirty.c +++ b/tools/testing/selftests/mm/mkdirty.c @@ -9,7 +9,7 @@ */ #include #include -#include +#include #include #include #include @@ -265,7 +265,6 @@ static void test_pte_mapped_thp(void) munmap(mmap_mem, mmap_size); } -#ifdef __NR_userfaultfd static void test_uffdio_copy(void) { struct uffdio_register uffdio_register; @@ -322,7 +321,6 @@ static void test_uffdio_copy(void) munmap(dst, pagesize); free(src); } -#endif /* __NR_userfaultfd */ int main(void) { @@ -335,9 +333,7 @@ int main(void) thpsize / 1024); tests += 3; } -#ifdef __NR_userfaultfd tests += 1; -#endif /* __NR_userfaultfd */ ksft_print_header(); ksft_set_plan(tests); @@ -367,9 +363,7 @@ int main(void) if (thpsize) test_pte_mapped_thp(); /* Placing a fresh page via userfaultfd may set the PTE dirty. */ -#ifdef __NR_userfaultfd test_uffdio_copy(); -#endif /* __NR_userfaultfd */ err = ksft_get_fail_cnt(); if (err) diff --git a/tools/testing/selftests/mm/mlock2.h b/tools/testing/selftests/mm/mlock2.h index 4417eaa5cfb7..b74ddf0a2c39 100644 --- a/tools/testing/selftests/mm/mlock2.h +++ b/tools/testing/selftests/mm/mlock2.h @@ -3,6 +3,7 @@ #include #include #include +#include static int mlock2_(void *start, size_t len, int flags) { diff --git a/tools/testing/selftests/mm/mrelease_test.c b/tools/testing/selftests/mm/mrelease_test.c index 100370a7111d..a1b761940058 100644 --- a/tools/testing/selftests/mm/mrelease_test.c +++ b/tools/testing/selftests/mm/mrelease_test.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include "vm_util.h" #include "../kselftest.h" diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c index 2d785aca72a5..5652e5930854 100644 --- a/tools/testing/selftests/mm/pagemap_ioctl.c +++ b/tools/testing/selftests/mm/pagemap_ioctl.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/testing/selftests/mm/protection_keys.c b/tools/testing/selftests/mm/protection_keys.c index 48dc151f8fca..ec968db9e6c7 100644 --- a/tools/testing/selftests/mm/protection_keys.c +++ b/tools/testing/selftests/mm/protection_keys.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include diff --git a/tools/testing/selftests/mm/uffd-common.c b/tools/testing/selftests/mm/uffd-common.c index 7ad6ba660c7d..717539eddf98 100644 --- a/tools/testing/selftests/mm/uffd-common.c +++ b/tools/testing/selftests/mm/uffd-common.c @@ -673,11 +673,7 @@ int uffd_open_dev(unsigned int flags) int uffd_open_sys(unsigned int flags) { -#ifdef __NR_userfaultfd return syscall(__NR_userfaultfd, flags); -#else - return -1; -#endif } int uffd_open(unsigned int flags) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index f78bab0f3d45..6aff0e8cd961 100644 --- a/tools/testing/selftests/mm/uffd-stress.c +++ b/tools/testing/selftests/mm/uffd-stress.c @@ -33,11 +33,9 @@ * pthread_mutex_lock will also verify the atomicity of the memory * transfer (UFFDIO_COPY). */ - +#include #include "uffd-common.h" -#ifdef __NR_userfaultfd - #define BOUNCE_RANDOM (1<<0) #define BOUNCE_RACINGFAULTS (1<<1) #define BOUNCE_VERIFY (1<<2) @@ -466,15 +464,3 @@ int main(int argc, char **argv) nr_pages, nr_pages_per_cpu); return userfaultfd_stress(); } - -#else /* __NR_userfaultfd */ - -#warning "missing __NR_userfaultfd definition" - -int main(void) -{ - printf("skip: Skipping userfaultfd test (missing __NR_userfaultfd)\n"); - return KSFT_SKIP; -} - -#endif /* __NR_userfaultfd */ diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c index 21ec23206ab4..6298a2045095 100644 --- a/tools/testing/selftests/mm/uffd-unit-tests.c +++ b/tools/testing/selftests/mm/uffd-unit-tests.c @@ -5,12 +5,11 @@ * Copyright (C) 2015-2023 Red Hat, Inc. */ +#include #include "uffd-common.h" #include "../../../../mm/gup_test.h" -#ifdef __NR_userfaultfd - /* The unit test doesn't need a large or random size, make it 32MB for now */ #define UFFD_TEST_MEM_SIZE (32UL << 20) @@ -1554,14 +1553,3 @@ int main(int argc, char *argv[]) return ksft_get_fail_cnt() ? KSFT_FAIL : KSFT_PASS; } -#else /* __NR_userfaultfd */ - -#warning "missing __NR_userfaultfd definition" - -int main(void) -{ - printf("Skipping %s (missing __NR_userfaultfd)\n", __file__); - return KSFT_SKIP; -} - -#endif /* __NR_userfaultfd */