From patchwork Thu Sep 12 10:31:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 13801867 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BA1EEEB585 for ; Thu, 12 Sep 2024 10:32:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 94D6D6B0082; Thu, 12 Sep 2024 06:32:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D54E6B0083; Thu, 12 Sep 2024 06:32:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 726F06B0085; Thu, 12 Sep 2024 06:32:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 54EAA6B0082 for ; Thu, 12 Sep 2024 06:32:27 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3EA68161EAE for ; Thu, 12 Sep 2024 10:32:25 +0000 (UTC) X-FDA: 82555721850.04.AC880B5 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by imf30.hostedemail.com (Postfix) with ESMTP id 7A30C80002 for ; Thu, 12 Sep 2024 10:32:22 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b="e2TRZQr/"; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (imf30.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass (policy=none) header.from=collabora.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726137037; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=sX6XdYPdKt8M/QjL3pAJvuYwS/g9NNTL3XgnNJSx6Kg=; b=jU0mfgQRW3AIz7B84nY75ta6w3/L1xEwlOap8TIITU/Qlhn07eNEd3J8jVi/4yPJLSrguu jqSaWI8ew/Q6Wd1IMmhQiPBzdUMH1pMmirB0x3NBaaWyCv0c7JCuagFKTKa84ZfhnyiIys dUGQHkNMZFlS+Wftc30czmEGLCyCQZc= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1726137037; a=rsa-sha256; cv=pass; b=GqBmzL5xWcIP+pro+orMpPGamYqHAYMTA28GBw3rRClE1EgEbMufIPqf63JpIjjBFEqfFm Z5fpVD6DMPxtLrGoFW/r5F7fh+ACt7P4kUoaCDRin/ASapN98LrFHCPX9eh3kjqCM8Xxuf V4mGX2IPbE5MV4KsEE5qGppv6O90iNY= ARC-Authentication-Results: i=2; imf30.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b="e2TRZQr/"; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (imf30.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass (policy=none) header.from=collabora.com ARC-Seal: i=1; a=rsa-sha256; t=1726137130; cv=none; d=zohomail.com; s=zohoarc; b=RlYm7u7SMBhk0LuIugtq4SXm4HYtJXpT8yia0yEFmQxY25tRaMjkzcKqUm30r3PF7RODsaPYJHN7zkDZBZ7O5BFJ5hblHpgygcJ8fWum7wDW58r7KuPPaZgSYwcNg6E3+r2EFB2zP8P1M/NZXUuZM+EhLWe9tdCvvu+K/zlGpf0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726137130; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=sX6XdYPdKt8M/QjL3pAJvuYwS/g9NNTL3XgnNJSx6Kg=; b=WAoWF42/TJkBpaFtD/hi24fuTN9JChZuUVSLi0Mces/C1Kd9matqhJgqI14ki7UA6kjDq73oMgYMjoJgRZrcipSeKYu0AxA7T6azlkYKr7M/uKujOSqypxxbaFUmecOjJOkjC9IytO22E5/X8Rcy6z5jg70cAPrlFpPyX+zcmYc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1726137130; s=zohomail; d=collabora.com; i=usama.anjum@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=sX6XdYPdKt8M/QjL3pAJvuYwS/g9NNTL3XgnNJSx6Kg=; b=e2TRZQr/DcGBbq0jnbHVUpAfvS4OpabrehWmRqLZIoiyjMWiUDwONDvPj8lk8XqR YlOMbaGTlngtFj8HDOS1GYawLSwvaJjLIQ0JzakweOIcbaeAcHcoKiUzrBGj6ErD28q VQB9/bEE4FB8xM3Z1zPn9kufsXu6kZUcFot5IUxM= Received: by mx.zohomail.com with SMTPS id 1726137128941470.6763680002151; Thu, 12 Sep 2024 03:32:08 -0700 (PDT) From: Muhammad Usama Anjum To: Andrew Morton , Shuah Khan , John Hubbard , David Hildenbrand Cc: Muhammad Usama Anjum , kernel@collabora.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] kselftests: mm: Fix wrong __NR_userfaultfd value Date: Thu, 12 Sep 2024 15:31:50 +0500 Message-Id: <20240912103151.1520254-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-ZohoMailClient: External X-Stat-Signature: bzkdurirr5q4n1w4om39h84t8ixwyrg8 X-Rspamd-Queue-Id: 7A30C80002 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1726137142-689677 X-HE-Meta: U2FsdGVkX19/er4H+GPl199km6PvB86XFpY3E3S4Iz8MmqZ8gffN99whMjJRTdzvSRmptzSrv53AEQUxBBW1whwsrE2OrMMHGpg0MDi6E1jevhtSAlNellRJsB0iW+i9fopGMghMCGTBoLiC4umYK76z9yHt6J7STAqq0YfwKHsP0PBrguYDfqZJ3mOuD1FZEffXXdEqgL6rB5TA910y9yeexuzJNv/r82WXSVB7lSb6vVWmuzjuTzkWevLXaZZmJu5bqO2vlxap2fTS9KGHpx8xrwLNh+s8f1cVvN4XDEH3L5DWPJLMMpZgd86ryQ7vfpA0KYKi1UGKSCefOqlOx/YE29oYRUIqdemWiKRV3lftvZWkkc4iIjfROUB+PqAqM5tIZA/+DuXCVbyELeQH075hH5P7cuhX/i1LRhbX2bzrzk50WNYOK9k1SpTyImwRhI+NTpNloNGWmIdAqk2Kmr9eF2EmGtdFHbT+JSQFKBd5Icvy5eKo970qyYg1SCOhYpQjt14UgR2gjV57R3JbGWOkS3nUUhr5bxpCxlAq3CYcsTZhsUCUPr3/9rK1Isnk9Fj5lc0joH2dSJ31B44dbOkS05jd0o40ugcWS4UsT/kRDEIA4/tG52X3XcQuukXX7idLd3jz7bXPdHzix3tiW9k24+OTaOkyv/y/goMgzNkN0ZC7Nhke3Tn0DGLIxqwHlxUHMxKbn1nhEA9OBPVNxbLkAgiMCdFxjf73e12ZlWyNj++ezm2LTCRDVVTLkhkO+sX2Vs/lADN/logXM7yy6aQvChQHKfy97UuSf71bkm8fy0j4fDmJI2EnzXquM1odkIYPjX7bBqdn/iBr0nv+3QHWd76i4eAPjov76aGk1z9dEMcOMYefQTNUhgefRVzCnKOsn+fJvrZeO+Kk9nyTNbWaWaM/zUJ/mv4GKd+rVwtPsWD1UDcoytsP/NBhOnXa+LiH/IRYbXxBD+d/Ofi 7c1+eDVK 3DedAhwF1WyfyeYpUHJ9C0NQRifBVj3N450cUmZK51AEl7wCNn1X6A3+8vtmzn8yANwFKQRNdPbSOs0hXhgAbf4GeJPiusjddSzxIBnLzqlHn5o+kluZCQcYpwFnvZbeclIoO1hXn4KzPjybPlsdSqoAmtMlDLcQh2L+i+uNZzulVLl/e+IOFULGZ1aHVRF0Of5E1JUKpI56P/cLqchioEKEQzcBBeENvZgNyOKPWOo/nG701rOeVRgGlExC83IJF/uWH31q3A0Jis53gvL4e1XNfvJGaN1CiaFb0In5BzyyG4UoCXtH9CTIPpOqlg0g4962iOSUjTNSMLWe8kcC72R1/o9F1FvhioJAmkxFB8z8zEFlEIuDe5H04Tjv5y8A3ygMc6fdwvbVtXQ/ETbQzu9/q1w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.035341, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The value of __NR_userfaultfd was changed to 282 when asm-generic/unistd.h was included. It makes the test to fail every time as the correct number of this syscall on x86_64 is 323. Fix the header to asm/unistd.h. Fixes: a5c6bc590094 ("selftests/mm: remove local __NR_* definitions") Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/pagemap_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c index fc90af2a97b80..bcc73b4e805c6 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 From patchwork Thu Sep 12 10:31:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 13801866 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFC83EEB587 for ; Thu, 12 Sep 2024 10:32:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1AAD26B007B; Thu, 12 Sep 2024 06:32:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 15ACA6B0082; Thu, 12 Sep 2024 06:32:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 048F16B0083; Thu, 12 Sep 2024 06:32:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id DA4F46B007B for ; Thu, 12 Sep 2024 06:32:24 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 6967CC01B1 for ; Thu, 12 Sep 2024 10:32:24 +0000 (UTC) X-FDA: 82555721808.16.7B86CD5 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by imf01.hostedemail.com (Postfix) with ESMTP id 722C040015 for ; Thu, 12 Sep 2024 10:32:22 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=angwLnBs; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf01.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1726137057; a=rsa-sha256; cv=pass; b=aYluNLSKW9mv2zU+wPQcAEhlcNKxS4hTIp2wfg4miUBi/q75p7t6vUc8s8KVj9k7/Hdxbc EUzX7+8qDoMRxVi8XARe12n6pKJa+9B7Je+fwXdY+pp61EvtrY7TPuTSFLrDBKhAQ1aT4+ 4yHiJV5ZoMDi92PceBymEu//mYjLsbY= ARC-Authentication-Results: i=2; imf01.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=angwLnBs; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf01.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726137057; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=KSpDKK1DAsive3QibtWD5FNSGNv2v0elbqHMj3W+HfM=; b=Glk67/jyk4fBpey6FXCSsVJWp/9hogiCr9ykdO4PkZKMnrmERRR3kDMX7j7eQQGuwBU7ig Wr2UPooNLy0SMLVJVJLTSd1qVH2sr909ucRLixm+QCTUVCCvmi5ZNNl8COm13jBfUpaVP8 mRbq7xMERcETlG5WnKAt9DMHJ9+EjcA= ARC-Seal: i=1; a=rsa-sha256; t=1726137134; cv=none; d=zohomail.com; s=zohoarc; b=EZpA+P+Y2FEA4EpO8s45jGgMGI4VOo7iBqY8qWtMuotw+SYcl6ESteJnKy1KWkp0nvCiNKfrhIhbunjPOTkpXKqi8TbeVXn8SrpI6T+b7kbpLoeeQSVUoyDMSROHZeNgyjl2M8Ex24+lJ/0ResBHif7z3ERwJCFun9P/V3cCad0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726137134; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=KSpDKK1DAsive3QibtWD5FNSGNv2v0elbqHMj3W+HfM=; b=A3qq24RhL4lPUXtV1TX+K2SkSODWeE2zeIN7ewTJYAHYpwOsmQbGQWqTnw4LE3TSN9xq2oZSFufHdn948wN7zNHS0U4MPHjUGbHFHL1vHk1ANPcENAAAJqc4btcRLPnn9omhZuKlox9IQoq7paZEHzm4/bBvfZ3SAy/s9HZmKqI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1726137134; s=zohomail; d=collabora.com; i=usama.anjum@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=KSpDKK1DAsive3QibtWD5FNSGNv2v0elbqHMj3W+HfM=; b=angwLnBslkPYWhbz4ZUN12nwu+j2uWW0ycMuHhwIzEU9HmKVRYvDymVZ32IXNtBi 9D45h0c5kjywyTzvO+w38dJCG4n10k38U50MmyfdvcfNUzwieeyQBZShfAXdLoNzjV+ p8KteobJ9o1T1Z9wM/8aF5uigeXN8J4+HRp94frg= Received: by mx.zohomail.com with SMTPS id 172613713313932.761884341043356; Thu, 12 Sep 2024 03:32:13 -0700 (PDT) From: Muhammad Usama Anjum To: Andrew Morton , Shuah Khan Cc: Muhammad Usama Anjum , kernel@collabora.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] kselftests: mm: Fail the test if userfaultfd syscall isn't found Date: Thu, 12 Sep 2024 15:31:51 +0500 Message-Id: <20240912103151.1520254-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240912103151.1520254-1-usama.anjum@collabora.com> References: <20240912103151.1520254-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 722C040015 X-Stat-Signature: 1473tmyxd85qfr3gafg3ecfz475jm6q4 X-Rspam-User: X-HE-Tag: 1726137142-132633 X-HE-Meta: U2FsdGVkX19MCHL2EfHl0zUHDoc1HGDcIkv9O3JmHgxD99KGdkqhttGfY1fitVr8+U9Ainv6/NcMXzwInkwuIiEVdylK8PofTUSkl5lzI1yK9hI5CPwTH0SdcgJ6BUolbTnfZruWB/RP8PT7KsrbUieq/3ad0U36NtEQ5K6Qvk4USiUUAILD7mm+0rYGrgjDgPjBMumX9JtnjouBZ7vVjd7KlrQIb7LMbrAr/e1TuX07Kuz69gny87CEldWVHqhJf7S8xYNcd+tEFtpsiiVYrTqnVZc5W13SsyCuVMhEQkV7m+XRAEb/xZrXuftQHlMoGUSrSsIIJCdXnVYry+QkbAg6yYyEKbrfzPtHHNQk82GD8yYQFPBlOk7/e66u1cBWRkOb0sml5K6aGqdcymU8k+v2k4gLgY4dBD/il8p52BK2XOkzDPyX59U2jU9jwu4qck4lBzofZVztmwgSVlv86c58Q9ZLsIe5oAao8lIZBEXphM9+dsRBL5ypVNm4egeG81HQ5Io6jQj2OudsHNIDclKMn+g9MAmMgb+H8tfL+sVMq588s31b6OdDNAaDLndG5dQ/s2hlyEa7rhXbbhyc+L5QJn0+6tsUOzv1kt/LP6BR8JvGyHjK3T+P43O3hlauDNy5Ap+n3i6/I6+N9r4HgSnP+4obH4VQ04I+z+G0Yn+3ylo51K4YF8smj8qBYNpUQxe2nJZ9OKQDNCXKuIiQt1QMjku7iwO4C05ybuORQxFbcpxdTIRpIlUlLuW5Hzvm8++m+e+roriANYr1M6DCI+A4dc22FoN/WxnzI2AlioLECa0D2GASE3YO6duO/KqJQ5XIwTB7alc4llWrXx526ZOvs1YKgs5T4NdB6Lt9OeZ5SQ4nazKfwYktOCo3HtVNhWehCe4VuhDK8Zbx0G12x7m3SqmllYwV2UapiSFzWyqwBGf97A3HfSiooh3mA2vNzBLFTapU6rGpm4qOB9l TU7QTFKX o8bL8k+O4+Vd8vUPXlm86MyXujbV3YXkiyR1UtuuDlgM6/JJJXjhpUZY/XUPpCG7WrDFX+Zumtna5zoxylbbLjmjSJxuzFP12YXN5wDpPQdBDPYvcdjPuwUiJsL6+aZZ5Y7kcZXJN08Pw/BHoRaAy23bj7gmKkPp1ABe+4pfwqzxiZHe8WwbjJPDIJKKWDxlkTQr0U/NIANGoe21+AJus8EzrQt65ZB1hyRLKJG6AF9biMMH5reregV3LCNLuGV1XQ0vAFALI5qLzLmrV4tP7/gHmy8G8T1RfksfzBpPSVflSggJC6ethq9lc2ufVfLH1yOaQ X-Bogosity: Ham, tests=bogofilter, spamicity=0.014814, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The userfaultfd is enabled in the config fragment of mm selftest suite. It must always be present. If it isn't present, we should throw error and not just skip. This would have helped us catch the test breakage. Adding this now to catch the future breakages. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/pagemap_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c index bcc73b4e805c6..d83dda8edf62c 100644 --- a/tools/testing/selftests/mm/pagemap_ioctl.c +++ b/tools/testing/selftests/mm/pagemap_ioctl.c @@ -95,7 +95,7 @@ int init_uffd(void) uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK | UFFD_USER_MODE_ONLY); if (uffd == -1) - return uffd; + ksft_exit_fail_perror("Userfaultfd syscall failed"); uffdio_api.api = UFFD_API; uffdio_api.features = UFFD_FEATURE_WP_UNPOPULATED | UFFD_FEATURE_WP_ASYNC |