{"id":2233406,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2233406/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/patch/20260506113655.10797-2-mmenashe@redhat.com/","project":{"id":59,"url":"http://patchwork.ozlabs.org/api/1.1/projects/59/?format=json","name":"Linux Test Project development","link_name":"ltp","list_id":"ltp.lists.linux.it","list_email":"ltp@lists.linux.it","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260506113655.10797-2-mmenashe@redhat.com>","date":"2026-05-06T11:36:52","name":"[1/4] futex_wait06: Add EFAULT error coverage test","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"ffbb1fa4b71be86ab5a3d64592a681ad118cbdb1","submitter":{"id":93123,"url":"http://patchwork.ozlabs.org/api/1.1/people/93123/?format=json","name":"Michael Menasherov","email":"mmenashe@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/ltp/patch/20260506113655.10797-2-mmenashe@redhat.com/mbox/","series":[{"id":502973,"url":"http://patchwork.ozlabs.org/api/1.1/series/502973/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/list/?series=502973","date":"2026-05-06T11:36:51","name":"futex: Add error coverage tests for wait, wake and cmp_requeue","version":1,"mbox":"http://patchwork.ozlabs.org/series/502973/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2233406/comments/","check":"fail","checks":"http://patchwork.ozlabs.org/api/patches/2233406/checks/","tags":{},"headers":{"Return-Path":"<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>","X-Original-To":["incoming@patchwork.ozlabs.org","ltp@lists.linux.it"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ltp@picard.linux.it"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=lists.linux.it header.i=@lists.linux.it\n header.a=rsa-sha256 header.s=picard header.b=XBDbn6ZQ;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=CyrxIYeG;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"],"Received":["from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g9YJz5lwPz1yJq\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 21:37:39 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 700E13E6162\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  6 May 2026 13:37:37 +0200 (CEST)","from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id DFF673E2CC3\n for <ltp@lists.linux.it>; Wed,  6 May 2026 13:37:05 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 4A113140021F\n for <ltp@lists.linux.it>; Wed,  6 May 2026 13:37:04 +0200 (CEST)","from mail-wr1-f70.google.com (mail-wr1-f70.google.com\n [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-279-EEgyW8YkOty9WAt2QwdJzg-1; Wed, 06 May 2026 07:37:02 -0400","by mail-wr1-f70.google.com with SMTP id\n ffacd0b85a97d-44bf1ac8893so4008851f8f.0\n for <ltp@lists.linux.it>; Wed, 06 May 2026 04:37:01 -0700 (PDT)","from fedora.redhat.com (85.65.168.167.dynamic.barak-online.net.\n [85.65.168.167]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-45055960022sm11919938f8f.26.2026.05.06.04.36.58\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 06 May 2026 04:36:58 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=lists.linux.it;\n i=@lists.linux.it; q=dns/txt; s=picard; t=1778067457; h=to : date :\n message-id : in-reply-to : references : mime-version : subject :\n list-id : list-unsubscribe : list-archive : list-post : list-help :\n list-subscribe : from : reply-to : content-type :\n content-transfer-encoding : sender : from;\n bh=57JaBidUnUs14ex7n2wgzK7IH0wjeKFz3KfSm0faSj0=;\n b=XBDbn6ZQj3uP5GiXMlOdTmLXvAUh8mo9P9DEwQKL/mFnPpY67ZolvK6zbI18RBDMuheSW\n b3fSs0NFP7jPKNHR5fepHcMnBPMj/58jTPUhNzysTxYon8s//j1BsLEQeYLKcytOBBClQZz\n KzRd6dKN7yjUk26eyzUOtzFpZYQrWMI=","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1778067423;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=boRpSodahmLV5XmWvqUBV470KiLLTYCyzmrJ9VSdi1Q=;\n b=CyrxIYeGOkLCOLtdbqjgJGc3d6wg19rK3x2JwFQJ8dGeaMv6MH19KOeZhg8Gct3XBrN3yV\n 3ZczuLCBCJ9GXmUsPHGW6GSL6g/WixAyl0rX5is9Ok94bR/DHi8y2PQIlQqr4YMYlm2BNK\n PMtP84Fmnio7ZNxftno5BqwmuQ1WAio="],"X-MC-Unique":"EEgyW8YkOty9WAt2QwdJzg-1","X-Mimecast-MFC-AGG-ID":"EEgyW8YkOty9WAt2QwdJzg_1778067421","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778067420; x=1778672220;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=boRpSodahmLV5XmWvqUBV470KiLLTYCyzmrJ9VSdi1Q=;\n b=Osq0UYITUxRQ+F/YvJiqEKxKPJkM6s2DHgfGLOoEyStNrOcLMPO6sO0Qdc1m0FSEUU\n +X4yK/kHD+n0835rHUb8+pkDP6yrsoduCkNldTvT0aHI55VYsDZuxqHS/auVBqk9v5as\n XxNkv3hWWJl5On7csnxYmB5biKR2OyNH9QN9RIGnUdB5zJz2btMhfw8CwnZWyh3mnw2s\n rABdcs4qNHUEdkNWe+XPk9m5dOg8qgj7tW6PBKFuNmtfkkytxNkqO0HG2PB6JQSMk0l/\n 5Wfbb3WYozZvCZwN+vFAZQtvDKvmWAGjxVycEMlIZpnpOYSBzvrM1A51tmKluQ1KuqdG\n fAlg==","X-Gm-Message-State":"AOJu0YypljzmZ+AMmb0SLVUWSKIbUIkscJ/pT9e3LCTYNbyJGkYvGdtc\n NpMFyDitXaftnpet9KiHDCXcqJqlRhrz8nF/7lkqecxN+lX6EjpGFIRQSX3fjHpzzxQL2QOt1/l\n pGyvyEs+HLxLPrf1XhEf1LoHnO27LZZrmxjrI50o4qybTZPOdm3vHFDGwYuAd4gBD8aollKiJr6\n DFEqv2PUoUa3XgO7MynKQlb//vnWYnx2B3UOnc","X-Gm-Gg":"AeBDietHHDzuXc4P10+JNsbrHp2F9fo90ysS/HgpG/32Ypy3/XPqqPzX3OQodcL1l81\n AvPs9p0wEbDRxHyYiHwTLH9wI5VUGRUTCvY3JHYNRN9ijYDGz6DXhctdBGkGvpWZffgE/WCQjwN\n TaV68oLjK59/OfpueXVsZP+edyY/LExpfdhyJ7Eh+0J+mQp5MXqdu5iUsZxEIQKaaSvbC6DIvxo\n aVC9xs7/gOaCBcbxTVmoU8OAYTsFYOAkRsSYhs4fEeWqmKPf3zhbwvasUUXLt/HADog1VhQ1e4t\n 68DZyQJ/wtZEYcHWbqHa3UfiduzTqfKnYZIy3u88WbaoKKRpFMPGTCRB9GQFft7mHwHr+B4u5Gn\n 05fX1kUEaeLCCUxGgzbCIJszAnkRqe/8eMjdKBW6Ai7r74qC1UJnB5trinqTTlI60aFUBhw/Bs+\n GmnGu62Q==","X-Received":["by 2002:a05:6000:18a5:b0:43d:1dfe:350a with SMTP id\n ffacd0b85a97d-4515ce1c991mr5486635f8f.22.1778067420073;\n Wed, 06 May 2026 04:37:00 -0700 (PDT)","by 2002:a05:6000:18a5:b0:43d:1dfe:350a with SMTP id\n ffacd0b85a97d-4515ce1c991mr5486584f8f.22.1778067419604;\n Wed, 06 May 2026 04:36:59 -0700 (PDT)"],"To":"ltp@lists.linux.it","Date":"Wed,  6 May 2026 14:36:52 +0300","Message-ID":"<20260506113655.10797-2-mmenashe@redhat.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260506113655.10797-1-mmenashe@redhat.com>","References":"<20260506113655.10797-1-mmenashe@redhat.com>","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"TYMFNK0i1HLOVq5Sf7oJ_RkOjQU44WqORICa_rzwIyE_1778067421","X-Mimecast-Originator":"redhat.com","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS shortcircuit=no\n autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-6.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-6.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"[LTP] [PATCH 1/4] futex_wait06: Add EFAULT error coverage test","X-BeenThere":"ltp@lists.linux.it","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"Linux Test Project <ltp.lists.linux.it>","List-Unsubscribe":"<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>","List-Archive":"<http://lists.linux.it/pipermail/ltp/>","List-Post":"<mailto:ltp@lists.linux.it>","List-Help":"<mailto:ltp-request@lists.linux.it?subject=help>","List-Subscribe":"<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>","From":"Michael Menasherov via ltp <ltp@lists.linux.it>","Reply-To":"Michael Menasherov <mmenashe@redhat.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"},"content":"---\n runtest/syscalls                              |  4 +\n testcases/kernel/syscalls/futex/.gitignore    |  1 +\n .../kernel/syscalls/futex/futex_wait06.c      | 73 +++++++++++++++++++\n 3 files changed, 78 insertions(+)\n create mode 100644 testcases/kernel/syscalls/futex/futex_wait06.c","diff":"diff --git a/runtest/syscalls b/runtest/syscalls\nindex 6ba0227a8..621355e04 100644\n--- a/runtest/syscalls\n+++ b/runtest/syscalls\n@@ -699,6 +699,7 @@ io_setup02 io_setup02\n io_submit01 io_submit01\n io_submit02 io_submit02\n io_submit03 io_submit03\n+io_submit04 io_submit04\n \n keyctl01 keyctl01\n keyctl02 keyctl02\n@@ -926,6 +927,7 @@ mremap03 mremap03\n mremap04 mremap04\n mremap05 mremap05\n mremap06 mremap06\n+mremap07 mremap07\n \n mseal01 mseal01\n mseal02 mseal02\n@@ -1899,6 +1901,8 @@ membarrier01 membarrier01\n \n io_uring01 io_uring01\n io_uring02 io_uring02\n+io_uring03 io_uring03\n \n # Tests below may cause kernel memory leak\n perf_event_open03 perf_event_open03\n+futex_wait06 futex_wait06\ndiff --git a/testcases/kernel/syscalls/futex/.gitignore b/testcases/kernel/syscalls/futex/.gitignore\nindex 9d08ba7d3..56596dcb4 100644\n--- a/testcases/kernel/syscalls/futex/.gitignore\n+++ b/testcases/kernel/syscalls/futex/.gitignore\n@@ -13,3 +13,4 @@\n /futex_waitv01\n /futex_waitv02\n /futex_waitv03\n+/futex_wait06\ndiff --git a/testcases/kernel/syscalls/futex/futex_wait06.c b/testcases/kernel/syscalls/futex/futex_wait06.c\nnew file mode 100644\nindex 000000000..8bb563fb2\n--- /dev/null\n+++ b/testcases/kernel/syscalls/futex/futex_wait06.c\n@@ -0,0 +1,73 @@\n+// SPDX-License-Identifier: GPL-2.0-or-later\n+/*\n+ * Copyright (C) 2026 Red Hat, Inc.\n+ */\n+\n+/*\\\n+ * Check that futex(FUTEX_WAIT) returns EFAULT when:\n+ *\n+ * 1) uaddr points to unmapped memory\n+ * 2) timeout points to unmapped memory\n+ */\n+#include <errno.h>\n+#include <sys/mman.h>\n+\n+#include \"futextest.h\"\n+\n+static futex_t futex = FUTEX_INITIALIZER;\n+\n+static struct futex_test_variants variants[] = {\n+#if (__NR_futex != __LTP__NR_INVALID_SYSCALL)\n+\t{ .fntype = FUTEX_FN_FUTEX, .tstype = TST_KERN_OLD_TIMESPEC, .desc = \"syscall with old kernel spec\"},\n+#endif\n+\n+#if (__NR_futex_time64 != __LTP__NR_INVALID_SYSCALL)\n+\t{ .fntype = FUTEX_FN_FUTEX64, .tstype = TST_KERN_TIMESPEC, .desc = \"syscall time64 with kernel spec\"},\n+#endif\n+};\n+\n+static struct testcase {\n+\tconst char *desc;\n+\tfutex_t *uaddr;\n+\tvoid *timeout;\n+} testcases[2];\n+\n+static void run(unsigned int n)\n+{\n+\tstruct futex_test_variants *tv = &variants[tst_variant];\n+\tstruct testcase *tc = &testcases[n];\n+\n+\tTST_EXP_FAIL(futex_syscall(tv->fntype, tc->uaddr, FUTEX_WAIT, futex,\n+\t\ttc->timeout, NULL, 0, 0), EFAULT, \"%s\", tc->desc);\n+}\n+\n+static void setup(void)\n+{\n+\tstruct futex_test_variants *tv = &variants[tst_variant];\n+\tvoid *bad;\n+\n+\ttst_res(TINFO, \"Testing variant: %s\", tv->desc);\n+\tfutex_supported_by_kernel(tv->fntype);\n+\n+\tbad = SAFE_MMAP(NULL, getpagesize(), PROT_READ | PROT_WRITE,\n+\t\tMAP_PRIVATE | MAP_ANONYMOUS, -1, 0);\n+\tSAFE_MUNMAP(bad, getpagesize());\n+\n+\ttestcases[0] = (struct testcase){\n+\t\t.desc = \"uaddr points to unmapped memory\",\n+\t\t.uaddr = bad,\n+\t\t.timeout = NULL,\n+\t};\n+\ttestcases[1] = (struct testcase){\n+\t\t.desc = \"timeout points to unmapped memory\",\n+\t\t.uaddr = &futex,\n+\t\t.timeout = bad,\n+\t};\n+}\n+\n+static struct tst_test test = {\n+\t.setup = setup,\n+\t.test = run,\n+\t.tcnt = ARRAY_SIZE(testcases),\n+\t.test_variants = ARRAY_SIZE(variants),\n+};\n","prefixes":["1/4"]}