[{"id":3677552,"web_url":"http://patchwork.ozlabs.org/comment/3677552/","msgid":"<20260415092428.3884-1-linuxtestproject.agent@gmail.com>","list_archive_url":null,"date":"2026-04-15T09:24:28","subject":"Re: [LTP] userfaultfd: Use two-step handshake to probe features","submitter":{"id":93132,"url":"http://patchwork.ozlabs.org/api/people/93132/","name":null,"email":"linuxtestproject.agent@gmail.com"},"content":"Hi Ricardo,\n\nOn Wed, 15 Apr 2026 10:06:15 +0200, Ricardo Branco wrote:\n> userfaultfd: Use two-step handshake to probe features\n\nReviewed-by: LTP AI Reviewer <ltp-ai@noreply.github.com>\n\n---\nNote:\n\nOur agent completed the review of the patch. The full review can be\nfound at: https://patchwork.ozlabs.org/project/ltp/list/?series=499941\n\nThe agent can sometimes produce false positives although often its\nfindings are genuine. If you find issues with the review, please\ncomment this email or ignore the suggestions.","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=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=a1za7ev2;\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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fwbM93xkPz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 19:24:37 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id D96D53E4AE6\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 11:24:34 +0200 (CEST)","from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7])\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 28B2E3CDE01\n for <ltp@lists.linux.it>; Wed, 15 Apr 2026 11:24:31 +0200 (CEST)","from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com\n [IPv6:2607:f8b0:4864:20::f44])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-7.smtp.seeweb.it (Postfix) with ESMTPS id A7466200A1A\n for <ltp@lists.linux.it>; Wed, 15 Apr 2026 11:24:30 +0200 (CEST)","by mail-qv1-xf44.google.com with SMTP id\n 6a1803df08f44-899a9f445cbso73374446d6.0\n for <ltp@lists.linux.it>; Wed, 15 Apr 2026 02:24:30 -0700 (PDT)","from\n runnervm35a4x.kdo4uim0ecfu3i2wm31vtr4tyc.bx.internal.cloudapp.net\n ([172.203.196.181]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8ae6cb9ecc5sm7502906d6.23.2026.04.15.02.24.28\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Apr 2026 02:24:29 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776245069; x=1776849869; darn=lists.linux.it;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=if/eKhva5jvU+sIx3G07ssnvbdbcn8CUDnfdi2On0vU=;\n b=a1za7ev2C630+rmdUTRbiyRcpd1S/jUqSFfWudUoEvfX9Z1oKp57gSmeaXxcJCEZ54\n xewT1tOh0pE9ZzyS0ORNxrr3Yo9sPQY1NUXYX2I2pmc5enkXgXdjMH5WpJS29u7G23p5\n i8S7JFmmS/T0XUP0ZyI+rIv0Txr1BN6QkhQR/hmRxHdkvMXtIAtBA7hOLKaSydBDPqaq\n liECBygI+F+O/1G1UfqXXLD5WPMn8Q1g90jgZD9BgwfIXfAX5rEfnEAuAlK+I+z8EVLZ\n KlgW02gfgq9YC36P8PUYDTUWRG7FC/suy1TbcU9eYTn5tBWSalv13f5Wjb37aWjtUHa3\n mXTA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776245069; x=1776849869;\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=if/eKhva5jvU+sIx3G07ssnvbdbcn8CUDnfdi2On0vU=;\n b=NzK8FoGzuJBZSJQ2Z8WUDFt96qaUxhLKkBwzjrMOm/2alMbVKLgWJ47Rk3yKssfPO1\n 8lgVir+gK/zGtniZ4Q41Ja4UHBASR5IBo7gwsUAWpz4rcaj6AX2zx5qBSfnT5u/uU0zH\n lO7aEp3SQ227q+SCMTYFEB0B8oq5lOolRLqlVFNxVwN/yLpAIZSlvFfTwlpaZ0HZ5dvP\n b+qCx7xau7AcE5Ye5Pif2gqMojDI8/NI0yX/uCQvhMi4Kfe1kFpmKBATa38FWA8i6qkr\n IXZm6RdQHdW0d0D5hLxzbjoSxHitOKqHLMSpl+++dqNNMHCu40lqyP4OmK2NCBg8PQsl\n hf6w==","X-Gm-Message-State":"AOJu0YxqYO3KqJpl6MqSuEwyPVRJbrcpcT8na5DXIcQpQn0eXwz9Pa0/\n 6ba8HISGcJJzIW9LvqKCAdODK7uYA7Mxp8nwomBvKVLthvxdgCoSxBdo","X-Gm-Gg":"AeBDievNqiDdCPR9z2ocYNFAnh24teQ7EUCX05X+vsMFH+9jNNp9AJ1XOioVD8Dp8f0\n MBp8YIR9bjI1nvbgqNnj3blqjcgVnKCqBLDAENh4GKyh+OHCxv4JYFYy6VvyAtsJvUmAteeV+xE\n fOELyCCjTPKL5f6WbbSRDFKqblbH0eOlqnRzO0fw1tCFFPf02HZBKT4QtJAzhYtVT295TsDj2bw\n GMgKyp/dkBAKFNH5jhL/6KubsXDDLDfJI8rSIL7v/0dPJhq15P2fhcpcODhqpLUvqqya5xAMK1k\n lb1KST//9FfTz1Ef39Ie+//PK9ULLAhwkUprm30f1uAVyM/WjKR0mxwvIu0ThJAGudpOAxwuTGM\n khmRbC5mgDFn03tYxHsk/ptKx8wgjb99Z+WF1t+OwkvbAYbXJIZtQ9UlaEQqZnXqwjptvIegyeq\n NYNcDjh1Qh/NMICu7a7c8yLKI3bh+Lqi5cMDT9Pm6Ea1+ojA7FN4OVj/9MoOVqiV5d793vPOp4K\n zEQNB3diPQgrWmPxLc8wr5MiKRxtNqFjOD+31fv0w==","X-Received":"by 2002:a05:6214:3d0a:b0:89c:6a86:e632 with SMTP id\n 6a1803df08f44-8ac861c1a0amr326172926d6.18.1776245069382;\n Wed, 15 Apr 2026 02:24:29 -0700 (PDT)","From":"linuxtestproject.agent@gmail.com","To":"Ricardo Branco <rbranco@suse.de>","Date":"Wed, 15 Apr 2026 09:24:28 +0000","Message-ID":"<20260415092428.3884-1-linuxtestproject.agent@gmail.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260415080623.164440-1-rbranco@suse.de>","References":"<20260415080623.164440-1-rbranco@suse.de>","MIME-Version":"1.0","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS\n shortcircuit=no autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-7.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-7.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"Re: [LTP] userfaultfd: Use two-step handshake to probe features","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>","Cc":"ltp@lists.linux.it, LTP AI Reviewer <ltp-ai@noreply.github.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>"}},{"id":3685885,"web_url":"http://patchwork.ozlabs.org/comment/3685885/","msgid":"<afjANI7jr23hP4IJ@yuki.lan>","list_archive_url":null,"date":"2026-05-04T15:50:12","subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","submitter":{"id":8530,"url":"http://patchwork.ozlabs.org/api/people/8530/","name":"Cyril Hrubis","email":"chrubis@suse.cz"},"content":"Hi!\n> +\t/*\n> +\t * Two-step handshake to check if feature is available\n> +\t */\n\nPlease no obvious comments like this.\n\n> +\tuffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);\n> +\tuffdio_api.api = UFFD_API;\n> +\tSAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);\n> +\tif (!(uffdio_api.features & UFFD_FEATURE_PAGEFAULT_FLAG_WP))\n> +\t\ttst_brk(TCONF, \"UFFD_FEATURE_PAGEFAULT_FLAG_WP not supported\");\n> +\tSAFE_CLOSE(uffd);\n\nI do not get why are we adding this code when we do the same just a few\nlines below. Shouldn't just this suffice?\n\ndiff --git a/testcases/kernel/syscalls/userfaultfd/userfaultfd05.c b/testcases/kernel/syscalls/userfaultfd/userfaultfd05.c\nindex e25a227cf..b19132d0c 100644\n--- a/testcases/kernel/syscalls/userfaultfd/userfaultfd05.c\n+++ b/testcases/kernel/syscalls/userfaultfd/userfaultfd05.c\n@@ -95,6 +95,9 @@ static void run(void)\n \n        SAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);\n \n+       if (!(uffdio_api.features & UFFD_FEATURE_PAGEFAULT_FLAG_WP))\n+               tst_brk(TCONF, \"UFFD_FEATURE_PAGEFAULT_FLAG_WP not supported\");\n+\n        uffdio_register.range.start = (unsigned long) page;\n        uffdio_register.range.len = page_size;\n        uffdio_register.mode = UFFDIO_REGISTER_MODE_WP;\n\n\n> index 5b1252c35..e1b3c2f6f 100644\n> --- a/testcases/kernel/syscalls/userfaultfd/userfaultfd06.c\n> +++ b/testcases/kernel/syscalls/userfaultfd/userfaultfd06.c\n> @@ -97,18 +97,25 @@ static void run(void)\n>  \n>  \tpoison_fault_seen = 0;\n>  \tsigbus_seen = 0;\n> -\tset_pages();\n>  \n> +\t/*\n> +\t * Two-step handshake to check if feature is available\n> +\t */\n>  \tuffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);\n> +\tuffdio_api.api = UFFD_API;\n> +\tSAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);\n> +\tif (!(uffdio_api.features & UFFD_FEATURE_POISON))\n> +\t\ttst_brk(TCONF, \"UFFD_FEATURE_POISON not supported\");\n> +\tSAFE_CLOSE(uffd);\n>  \n> +\tset_pages();\n> +\n> +\tuffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);\n>  \tuffdio_api.api = UFFD_API;\n>  \tuffdio_api.features = UFFD_FEATURE_POISON;\n>\n>  \tSAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);\n>  \n> -\tif (!(uffdio_api.features & UFFD_FEATURE_POISON))\n> -\t\ttst_brk(TCONF, \"UFFD_FEATURE_POISON not supported\");\n> -\n\nThis does not seem to make any sense. The code already checks for the\nfeature, or do I miss something?\n\n>  \tuffdio_register.range.start = (unsigned long) page;\n>  \tuffdio_register.range.len = page_size;\n>  \tuffdio_register.mode = UFFDIO_REGISTER_MODE_MISSING;\n> -- \n> 2.53.0\n> \n> \n> -- \n> Mailing list info: https://lists.linux.it/listinfo/ltp","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=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256\n header.s=susede2_rsa header.b=c2UAqZcj;\n\tdkim=fail reason=\"signature verification failed\" header.d=suse.cz\n header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519\n header.b=55UDT3/G;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa\n header.b=c2UAqZcj;\n\tdkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=55UDT3/G;\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)","smtp-out2.suse.de;\n dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=c2UAqZcj;\n dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=\"55UDT3/G\""],"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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8R1Y6ndTz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 05 May 2026 01:50:24 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id AA79F3E6271\n\tfor <incoming@patchwork.ozlabs.org>; Mon,  4 May 2026 17:50:22 +0200 (CEST)","from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it\n [IPv6:2001:4b78:1:20::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 7DFD53E1C3E\n for <ltp@lists.linux.it>; Mon,  4 May 2026 17:50:17 +0200 (CEST)","from smtp-out2.suse.de (smtp-out2.suse.de\n [IPv6:2a07:de40:b251:101:10:150:64:2])\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 8C2231400244\n for <ltp@lists.linux.it>; Mon,  4 May 2026 17:50:16 +0200 (CEST)","from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out2.suse.de (Postfix) with ESMTPS id BB6145C49A;\n Mon,  4 May 2026 15:50:14 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id AA54F593A3;\n Mon,  4 May 2026 15:50:14 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id w1U2JzbA+GkXLAAAD6G6ig\n (envelope-from <chrubis@suse.cz>); Mon, 04 May 2026 15:50:14 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n t=1777909814;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=SXldp8Cv4MbHxDR4a4fN60ZMKFIPrFr73m8w/jpEyio=;\n b=c2UAqZcjqbacpAJjEOFBCfYtW4YcYgjE4VbLaaImfDHMslsg/mJl6/4CXG1NdrIHfH+QxX\n kWAmmQIIgNSN0QKmt2A5D5ZlYoki2HdcQW9518ELtrKtvcxvvl1aMo9N6NgxcjGoAw78vr\n JNwe6BCZxIaUFxVKDcKsBcSaM5cYGG8=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_ed25519; t=1777909814;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=SXldp8Cv4MbHxDR4a4fN60ZMKFIPrFr73m8w/jpEyio=;\n b=55UDT3/GpbBt+wQITEBiZ1KqHb1PNZNSBFGROv3dNyxOn1ESqC2Eu8OAPhlMvCNbLyoxJN\n hA/vAjw5pGp8qWAg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n t=1777909814;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=SXldp8Cv4MbHxDR4a4fN60ZMKFIPrFr73m8w/jpEyio=;\n b=c2UAqZcjqbacpAJjEOFBCfYtW4YcYgjE4VbLaaImfDHMslsg/mJl6/4CXG1NdrIHfH+QxX\n kWAmmQIIgNSN0QKmt2A5D5ZlYoki2HdcQW9518ELtrKtvcxvvl1aMo9N6NgxcjGoAw78vr\n JNwe6BCZxIaUFxVKDcKsBcSaM5cYGG8=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_ed25519; t=1777909814;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=SXldp8Cv4MbHxDR4a4fN60ZMKFIPrFr73m8w/jpEyio=;\n b=55UDT3/GpbBt+wQITEBiZ1KqHb1PNZNSBFGROv3dNyxOn1ESqC2Eu8OAPhlMvCNbLyoxJN\n hA/vAjw5pGp8qWAg=="],"Date":"Mon, 4 May 2026 17:50:12 +0200","From":"Cyril Hrubis <chrubis@suse.cz>","To":"Ricardo Branco <rbranco@suse.de>","Message-ID":"<afjANI7jr23hP4IJ@yuki.lan>","References":"<20260411092452.211540-1-rbranco@suse.de>\n <20260415080623.164440-1-rbranco@suse.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20260415080623.164440-1-rbranco@suse.de>","X-Spam-Level":"","X-Rspamd-Action":"no action","X-Spamd-Result":"default: False [-3.51 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[];\n FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[];\n MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[];\n MIME_TRACE(0.00)[0:+];\n DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n RCPT_COUNT_TWO(0.00)[2];\n DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[];\n SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.cz:dkim,suse.cz:email];\n DKIM_TRACE(0.00)[suse.cz:+]","X-Rspamd-Queue-Id":"BB6145C49A","X-Rspamd-Server":"rspamd2.dmz-prg2.suse.org","X-Spam-Score":"-3.51","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","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>","Cc":"ltp@lists.linux.it","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>"}},{"id":3685892,"web_url":"http://patchwork.ozlabs.org/comment/3685892/","msgid":"<bc75c487-59db-47a8-a2f3-db860919b35b@suse.de>","list_archive_url":null,"date":"2026-05-04T15:59:44","subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","submitter":{"id":92484,"url":"http://patchwork.ozlabs.org/api/people/92484/","name":"Ricardo Branco","email":"rbranco@suse.de"},"content":"On 5/4/26 5:50 PM, Cyril Hrubis wrote:\n>> +\tuffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);\n>> +\tuffdio_api.api = UFFD_API;\n>> +\tSAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);\n>> +\tif (!(uffdio_api.features & UFFD_FEATURE_PAGEFAULT_FLAG_WP))\n>> +\t\ttst_brk(TCONF, \"UFFD_FEATURE_PAGEFAULT_FLAG_WP not supported\");\n>> +\tSAFE_CLOSE(uffd);\n> I do not get why are we adding this code when we do the same just a few\n> lines below. Shouldn't just this suffice?\n\nThat's why the comment is needed because it isn't obvious.\n\nWe need to do the 2 step handshake, first with uffdio_api.features set \nto zero,\nthen again with the desired features.\n\n>> index 5b1252c35..e1b3c2f6f 100644\n>> --- a/testcases/kernel/syscalls/userfaultfd/userfaultfd06.c\n>> +++ b/testcases/kernel/syscalls/userfaultfd/userfaultfd06.c\n>> @@ -97,18 +97,25 @@ static void run(void)\n>>   \n>>   \tpoison_fault_seen = 0;\n>>   \tsigbus_seen = 0;\n>> -\tset_pages();\n>>   \n>> +\t/*\n>> +\t * Two-step handshake to check if feature is available\n>> +\t */\n>>   \tuffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);\n>> +\tuffdio_api.api = UFFD_API;\n>> +\tSAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);\n>> +\tif (!(uffdio_api.features & UFFD_FEATURE_POISON))\n>> +\t\ttst_brk(TCONF, \"UFFD_FEATURE_POISON not supported\");\n>> +\tSAFE_CLOSE(uffd);\n>>   \n>> +\tset_pages();\n>> +\n>> +\tuffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);\n>>   \tuffdio_api.api = UFFD_API;\n>>   \tuffdio_api.features = UFFD_FEATURE_POISON;\n>>\n>>   \tSAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);\n>>   \n>> -\tif (!(uffdio_api.features & UFFD_FEATURE_POISON))\n>> -\t\ttst_brk(TCONF, \"UFFD_FEATURE_POISON not supported\");\n>> -\n> This does not seem to make any sense. The code already checks for the\n> feature, or do I miss something?\n\nContext: https://github.com/linux-test-project/ltp/issues/1289","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=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=05hGymPq;\n\tdkim=fail reason=\"signature verification failed\" header.d=suse.de\n header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519\n header.b=1mI0iV0Q;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa\n header.b=05hGymPq;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=1mI0iV0Q;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=213.254.12.146; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)","smtp-out1.suse.de;\n\tnone"],"Received":["from picard.linux.it (picard.linux.it [213.254.12.146])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8RDR3tqnz1yJV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 05 May 2026 01:59:51 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id DD0653E6B06\n\tfor <incoming@patchwork.ozlabs.org>; Mon,  4 May 2026 17:59:48 +0200 (CEST)","from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it\n [IPv6:2001:4b78:1:20::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 107013E5C80\n for <ltp@lists.linux.it>; Mon,  4 May 2026 17:59:45 +0200 (CEST)","from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])\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 8B587140012C\n for <ltp@lists.linux.it>; Mon,  4 May 2026 17:59:45 +0200 (CEST)","from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id E2FFA6B3C4;\n Mon,  4 May 2026 15:59:44 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C484C593A3;\n Mon,  4 May 2026 15:59:44 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id YCQdLnDC+GmXNQAAD6G6ig\n (envelope-from <rbranco@suse.de>); Mon, 04 May 2026 15:59:44 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777910384;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=eYQH0qAOCBonWyN5qLDxeoHJ/6IMwdJEOsBWZDsleow=;\n b=05hGymPqr/Jd+rUzGsF62EY/Pbc3bUX/H9gYnqfWGw0oFjalPxFiE50iUPIgTq5meH/AD7\n EPzkxC7FGVVQ6EiftIMEqOtwNn+Orb9FHFsDi2JMGADIrmhWKsnsV4vmmcDcA8ErdKRc6C\n ODOx7jC0iub2KkzVAj9RiJMrhfm0e4Y=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777910384;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=eYQH0qAOCBonWyN5qLDxeoHJ/6IMwdJEOsBWZDsleow=;\n b=1mI0iV0Qbzeeo1vD9C1GPk48Pbgrf1TVTwpJRyPizLlruOoGICRaKCO0lSw6HTF3Koo7gx\n b1IxnURUbl4QeeBg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1777910384;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=eYQH0qAOCBonWyN5qLDxeoHJ/6IMwdJEOsBWZDsleow=;\n b=05hGymPqr/Jd+rUzGsF62EY/Pbc3bUX/H9gYnqfWGw0oFjalPxFiE50iUPIgTq5meH/AD7\n EPzkxC7FGVVQ6EiftIMEqOtwNn+Orb9FHFsDi2JMGADIrmhWKsnsV4vmmcDcA8ErdKRc6C\n ODOx7jC0iub2KkzVAj9RiJMrhfm0e4Y=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1777910384;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=eYQH0qAOCBonWyN5qLDxeoHJ/6IMwdJEOsBWZDsleow=;\n b=1mI0iV0Qbzeeo1vD9C1GPk48Pbgrf1TVTwpJRyPizLlruOoGICRaKCO0lSw6HTF3Koo7gx\n b1IxnURUbl4QeeBg=="],"Message-ID":"<bc75c487-59db-47a8-a2f3-db860919b35b@suse.de>","Date":"Mon, 4 May 2026 17:59:44 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Content-Language":"en-US","To":"Cyril Hrubis <chrubis@suse.cz>","References":"<20260411092452.211540-1-rbranco@suse.de>\n <20260415080623.164440-1-rbranco@suse.de> <afjANI7jr23hP4IJ@yuki.lan>","From":"Ricardo Branco <rbranco@suse.de>","In-Reply-To":"<afjANI7jr23hP4IJ@yuki.lan>","X-Spam-Score":"-3.30","X-Spamd-Result":"default: False [-3.30 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n FUZZY_RATELIMITED(0.00)[rspamd.com];\n RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[];\n MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[];\n MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[];\n FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n RCVD_COUNT_TWO(0.00)[2];\n DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid]","X-Spam-Level":"","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","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>","Cc":"ltp@lists.linux.it","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"}},{"id":3685943,"web_url":"http://patchwork.ozlabs.org/comment/3685943/","msgid":"<afjb4yWvM8Abh98q@yuki.lan>","list_archive_url":null,"date":"2026-05-04T17:48:19","subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","submitter":{"id":8530,"url":"http://patchwork.ozlabs.org/api/people/8530/","name":"Cyril Hrubis","email":"chrubis@suse.cz"},"content":"Hi!\n> >> +\tuffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);\n> >> +\tuffdio_api.api = UFFD_API;\n> >> +\tSAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);\n> >> +\tif (!(uffdio_api.features & UFFD_FEATURE_PAGEFAULT_FLAG_WP))\n> >> +\t\ttst_brk(TCONF, \"UFFD_FEATURE_PAGEFAULT_FLAG_WP not supported\");\n> >> +\tSAFE_CLOSE(uffd);\n> > I do not get why are we adding this code when we do the same just a few\n> > lines below. Shouldn't just this suffice?\n> \n> That's why the comment is needed because it isn't obvious.\n> \n> We need to do the 2 step handshake, first with uffdio_api.features set \n> to zero, then again with the desired features.\n\nThe obviously the comment is not useful because it does not explain\nanything :-).\n\nLooking at the kernel code, it seems to set the output flags\nuncoditionally so we can use that.\n\nOr check for EINVAL when we pass unsupported flags.\n\nHowever I would put this code into a common header and call it only in\nthe test setup (so that it's not executed on each test iteration).\n\n#define CHECK_UFFD_FLAG(flag) do { \\\n        ... \\\n\tif (!(uffdio_api.features & (flag))) \\\n\t\ttst_brk(TCONF, #flag \" not supported\"); \\\n\t... \\\n} while (0)","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 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)","smtp-out1.suse.de;\n\tnone"],"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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8Tdq39phz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 05 May 2026 03:48:30 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id E6F9A3E6B0C\n\tfor <incoming@patchwork.ozlabs.org>; Mon,  4 May 2026 19:48:26 +0200 (CEST)","from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id 7F0A43E620E\n for <ltp@lists.linux.it>; Mon,  4 May 2026 19:48:23 +0200 (CEST)","from smtp-out1.suse.de (smtp-out1.suse.de\n [IPv6:2a07:de40:b251:101:10:150:64:1])\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-5.smtp.seeweb.it (Postfix) with ESMTPS id 20B756005CF\n for <ltp@lists.linux.it>; Mon,  4 May 2026 19:48:22 +0200 (CEST)","from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id AC61C6B46B;\n Mon,  4 May 2026 17:48:21 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 98882593A3;\n Mon,  4 May 2026 17:48:21 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id TsLuI+Xb+Gl7IwAAD6G6ig\n (envelope-from <chrubis@suse.cz>); Mon, 04 May 2026 17:48:21 +0000"],"Date":"Mon, 4 May 2026 19:48:19 +0200","From":"Cyril Hrubis <chrubis@suse.cz>","To":"Ricardo Branco <rbranco@suse.de>","Message-ID":"<afjb4yWvM8Abh98q@yuki.lan>","References":"<20260411092452.211540-1-rbranco@suse.de>\n <20260415080623.164440-1-rbranco@suse.de>\n <afjANI7jr23hP4IJ@yuki.lan>\n <bc75c487-59db-47a8-a2f3-db860919b35b@suse.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<bc75c487-59db-47a8-a2f3-db860919b35b@suse.de>","X-Rspamd-Pre-Result":["action=no action; module=replies;\n Message is reply to one we originated","action=no action; module=replies;\n Message is reply to one we originated"],"X-Spamd-Result":"default: False [-4.00 / 50.00];\n\tREPLY(-4.00)[]","X-Rspamd-Queue-Id":"AC61C6B46B","X-Spam-Score":"-4.00","X-Rspamd-Server":"rspamd2.dmz-prg2.suse.org","X-Rspamd-Action":"no action","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS\n shortcircuit=no autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-5.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-5.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","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>","Cc":"ltp@lists.linux.it","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>"}},{"id":3686360,"web_url":"http://patchwork.ozlabs.org/comment/3686360/","msgid":"<f834cba1-003e-4751-9a84-ddb6a21c282e@suse.de>","list_archive_url":null,"date":"2026-05-05T11:27:23","subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","submitter":{"id":92484,"url":"http://patchwork.ozlabs.org/api/people/92484/","name":"Ricardo Branco","email":"rbranco@suse.de"},"content":"On 5/4/26 7:48 PM, Cyril Hrubis wrote:\n> Hi!\n>>>> +\tuffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);\n>>>> +\tuffdio_api.api = UFFD_API;\n>>>> +\tSAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);\n>>>> +\tif (!(uffdio_api.features & UFFD_FEATURE_PAGEFAULT_FLAG_WP))\n>>>> +\t\ttst_brk(TCONF, \"UFFD_FEATURE_PAGEFAULT_FLAG_WP not supported\");\n>>>> +\tSAFE_CLOSE(uffd);\n>>> I do not get why are we adding this code when we do the same just a few\n>>> lines below. Shouldn't just this suffice?\n>> That's why the comment is needed because it isn't obvious.\n>>\n>> We need to do the 2 step handshake, first with uffdio_api.features set\n>> to zero, then again with the desired features.\n> The obviously the comment is not useful because it does not explain\n> anything :-).\n>\n> Looking at the kernel code, it seems to set the output flags\n> uncoditionally so we can use that.\n>\n> Or check for EINVAL when we pass unsupported flags.\n>\n> However I would put this code into a common header and call it only in\n> the test setup (so that it's not executed on each test iteration).\n>\n> #define CHECK_UFFD_FLAG(flag) do { \\\n>          ... \\\n> \tif (!(uffdio_api.features & (flag))) \\\n> \t\ttst_brk(TCONF, #flag \" not supported\"); \\\n> \t... \\\n> } while (0)\n>\n\nWill add this macro.  Let's keep doing the 2 step handshake though.","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 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)","smtp-out1.suse.de;\n\tnone"],"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 4g8x7m4CGDz1yJx\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 05 May 2026 21:27:31 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id C087A3E6176\n\tfor <incoming@patchwork.ozlabs.org>; Tue,  5 May 2026 13:27:28 +0200 (CEST)","from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5])\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 2546D3E2C5D\n for <ltp@lists.linux.it>; Tue,  5 May 2026 13:27:26 +0200 (CEST)","from smtp-out1.suse.de (smtp-out1.suse.de\n [IPv6:2a07:de40:b251:101:10:150:64:1])\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-5.smtp.seeweb.it (Postfix) with ESMTPS id 8D16160070C\n for <ltp@lists.linux.it>; Tue,  5 May 2026 13:27:25 +0200 (CEST)","from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id 208D86AD6E;\n Tue,  5 May 2026 11:27:24 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E5CBA593A3;\n Tue,  5 May 2026 11:27:23 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id KsUiNRvU+WkSUAAAD6G6ig\n (envelope-from <rbranco@suse.de>); Tue, 05 May 2026 11:27:23 +0000"],"Message-ID":"<f834cba1-003e-4751-9a84-ddb6a21c282e@suse.de>","Date":"Tue, 5 May 2026 13:27:23 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Cyril Hrubis <chrubis@suse.cz>","References":"<20260411092452.211540-1-rbranco@suse.de>\n <20260415080623.164440-1-rbranco@suse.de> <afjANI7jr23hP4IJ@yuki.lan>\n <bc75c487-59db-47a8-a2f3-db860919b35b@suse.de> <afjb4yWvM8Abh98q@yuki.lan>","Content-Language":"en-US","From":"Ricardo Branco <rbranco@suse.de>","In-Reply-To":"<afjb4yWvM8Abh98q@yuki.lan>","X-Rspamd-Pre-Result":["action=no action; module=replies;\n Message is reply to one we originated","action=no action; module=replies;\n Message is reply to one we originated"],"X-Spamd-Result":"default: False [-4.00 / 50.00];\n\tREPLY(-4.00)[]","X-Rspamd-Queue-Id":"208D86AD6E","X-Spam-Score":"-4.00","X-Rspamd-Server":"rspamd2.dmz-prg2.suse.org","X-Rspamd-Action":"no action","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=7.0 tests=SPF_HELO_NONE,SPF_PASS\n shortcircuit=no autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-5.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-5.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","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>","Cc":"ltp@lists.linux.it","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"}},{"id":3686375,"web_url":"http://patchwork.ozlabs.org/comment/3686375/","msgid":"<afndbbVfw4hV3c5i@yuki.lan>","list_archive_url":null,"date":"2026-05-05T12:07:09","subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","submitter":{"id":8530,"url":"http://patchwork.ozlabs.org/api/people/8530/","name":"Cyril Hrubis","email":"chrubis@suse.cz"},"content":"Hi!\n> > However I would put this code into a common header and call it only in\n> > the test setup (so that it's not executed on each test iteration).\n> >\n> > #define CHECK_UFFD_FLAG(flag) do { \\\n> >          ... \\\n> > \tif (!(uffdio_api.features & (flag))) \\\n> > \t\ttst_brk(TCONF, #flag \" not supported\"); \\\n> > \t... \\\n> > } while (0)\n> >\n> \n> Will add this macro.  Let's keep doing the 2 step handshake though.\n\nSure, sounds good to me.","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=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256\n header.s=susede2_rsa header.b=ezlNPPk6;\n\tdkim=fail reason=\"signature verification failed\" header.d=suse.cz\n header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519\n header.b=g2tQRKeV;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa\n header.b=ezlNPPk6;\n\tdkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=g2tQRKeV;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=213.254.12.146; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)","smtp-out1.suse.de;\n dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=ezlNPPk6;\n dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=g2tQRKeV"],"Received":["from picard.linux.it (picard.linux.it [213.254.12.146])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8y1f1H3Zz1yJV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 05 May 2026 22:07:18 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 16B953E61F4\n\tfor <incoming@patchwork.ozlabs.org>; Tue,  5 May 2026 14:07:16 +0200 (CEST)","from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7])\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 6B71A3D0E76\n for <ltp@lists.linux.it>; Tue,  5 May 2026 14:07:13 +0200 (CEST)","from smtp-out1.suse.de (smtp-out1.suse.de\n [IPv6:2a07:de40:b251:101:10:150:64:1])\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-7.smtp.seeweb.it (Postfix) with ESMTPS id 05E49200985\n for <ltp@lists.linux.it>; Tue,  5 May 2026 14:07:12 +0200 (CEST)","from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id 2C9F86AF41;\n Tue,  5 May 2026 12:07:11 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 14202593A3;\n Tue,  5 May 2026 12:07:11 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id MkYVBG/d+WnreQAAD6G6ig\n (envelope-from <chrubis@suse.cz>); Tue, 05 May 2026 12:07:11 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n t=1777982831;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=UfXqMSRCvkxgHwuDvGVCULb/kISvdNo+cEty0CylhBs=;\n b=ezlNPPk6a6mux0OQk5A3Rl/GEoAZf3Tr9IVWW0pYuGhyWnFbC6Wa6k1vdLr+F08+9lL8Mt\n KDCosXTNbOw8fPT8fY2znznlDcxiIsNdG/0eYQEu/DCWvfeeSief5htkk/Y7UJmQF6DIjF\n iDfr5YndeTXybylHJIrlfDZJpltf6gQ=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_ed25519; t=1777982831;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=UfXqMSRCvkxgHwuDvGVCULb/kISvdNo+cEty0CylhBs=;\n b=g2tQRKeV6lscBiDhyTN+4tiSF20tjrrBbqaf4GCP30t67Yg4h91SmB2/dIyEOTwQfnE5kR\n Q4BmL71kMWRi9fCw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n t=1777982831;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=UfXqMSRCvkxgHwuDvGVCULb/kISvdNo+cEty0CylhBs=;\n b=ezlNPPk6a6mux0OQk5A3Rl/GEoAZf3Tr9IVWW0pYuGhyWnFbC6Wa6k1vdLr+F08+9lL8Mt\n KDCosXTNbOw8fPT8fY2znznlDcxiIsNdG/0eYQEu/DCWvfeeSief5htkk/Y7UJmQF6DIjF\n iDfr5YndeTXybylHJIrlfDZJpltf6gQ=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_ed25519; t=1777982831;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=UfXqMSRCvkxgHwuDvGVCULb/kISvdNo+cEty0CylhBs=;\n b=g2tQRKeV6lscBiDhyTN+4tiSF20tjrrBbqaf4GCP30t67Yg4h91SmB2/dIyEOTwQfnE5kR\n Q4BmL71kMWRi9fCw=="],"Date":"Tue, 5 May 2026 14:07:09 +0200","From":"Cyril Hrubis <chrubis@suse.cz>","To":"Ricardo Branco <rbranco@suse.de>","Message-ID":"<afndbbVfw4hV3c5i@yuki.lan>","References":"<20260411092452.211540-1-rbranco@suse.de>\n <20260415080623.164440-1-rbranco@suse.de>\n <afjANI7jr23hP4IJ@yuki.lan>\n <bc75c487-59db-47a8-a2f3-db860919b35b@suse.de>\n <afjb4yWvM8Abh98q@yuki.lan>\n <f834cba1-003e-4751-9a84-ddb6a21c282e@suse.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<f834cba1-003e-4751-9a84-ddb6a21c282e@suse.de>","X-Spam-Score":"-4.51","X-Rspamd-Action":"no action","X-Spamd-Result":"default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[99.99%];\n NEURAL_HAM_LONG(-1.00)[-1.000];\n NEURAL_HAM_SHORT(-0.20)[-1.000];\n R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[];\n FUZZY_RATELIMITED(0.00)[rspamd.com];\n RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[];\n MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[];\n TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[];\n RCPT_COUNT_TWO(0.00)[2];\n DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[];\n SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:email,suse.cz:dkim,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,yuki.lan:mid];\n DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n DKIM_TRACE(0.00)[suse.cz:+]","X-Rspamd-Server":"rspamd1.dmz-prg2.suse.org","X-Rspamd-Queue-Id":"2C9F86AF41","X-Spam-Level":"","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no\n autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-7.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-7.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","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>","Cc":"ltp@lists.linux.it","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"}},{"id":3687599,"web_url":"http://patchwork.ozlabs.org/comment/3687599/","msgid":"<47b59750-b00c-4f04-956b-38d1695e2ffa@suse.de>","list_archive_url":null,"date":"2026-05-07T08:32:34","subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","submitter":{"id":92484,"url":"http://patchwork.ozlabs.org/api/people/92484/","name":"Ricardo Branco","email":"rbranco@suse.de"},"content":"On 5/5/26 2:07 PM, Cyril Hrubis wrote:\n> Hi!\n>>> However I would put this code into a common header and call it only in\n>>> the test setup (so that it's not executed on each test iteration).\n>>>\n>>> #define CHECK_UFFD_FLAG(flag) do { \\\n>>>           ... \\\n>>> \tif (!(uffdio_api.features & (flag))) \\\n>>> \t\ttst_brk(TCONF, #flag \" not supported\"); \\\n>>> \t... \\\n>>> } while (0)\n>>>\n>> Will add this macro.  Let's keep doing the 2 step handshake though.\n> Sure, sounds good to me.\n>\nJust did it in a 2-part v3.\n\nCheers,\nR","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=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=eQoE5mU3;\n\tdkim=fail reason=\"signature verification failed\" header.d=suse.de\n header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519\n header.b=OLdGL+AD;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa\n header.b=eQoE5mU3;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=OLdGL+AD;\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)","smtp-out2.suse.de;\n\tnone"],"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 4gB59559gCz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 07 May 2026 18:32:41 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id BB0793E5F5B\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  7 May 2026 10:32:39 +0200 (CEST)","from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3])\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 A007F3E2C33\n for <ltp@lists.linux.it>; Thu,  7 May 2026 10:32:36 +0200 (CEST)","from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])\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-3.smtp.seeweb.it (Postfix) with ESMTPS id 23A551A001E0\n for <ltp@lists.linux.it>; Thu,  7 May 2026 10:32:35 +0200 (CEST)","from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out2.suse.de (Postfix) with ESMTPS id 711BD5D770;\n Thu,  7 May 2026 08:32:35 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 380BB593A7;\n Thu,  7 May 2026 08:32:35 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id tzCJCSNO/GmfSAAAD6G6ig\n (envelope-from <rbranco@suse.de>); Thu, 07 May 2026 08:32:35 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1778142755;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=0PiS8ntp4QSWyS2bwMqR4q0aFHRNBydk7UQ0jF/kfJw=;\n b=eQoE5mU3WR3oDAi8dSz8lI1tJX81+l8y4VpncSc2WhicZycgiZmN02cs5juKeyJoQz8mnu\n fEB7XlcOaMuDpXa1Qt8/4/lS4tBvapdg1xmRKdvJK6scV5pL67RNVoXKXixBiy2uLDsxMv\n BZ+m/lSYC38J1Tgli1WM+9aQaJO1gUo=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1778142755;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=0PiS8ntp4QSWyS2bwMqR4q0aFHRNBydk7UQ0jF/kfJw=;\n b=OLdGL+ADZ7fvmOyo9J8TZJYTkfEli9SV8x9wqCLHfwVZSMhyqAlnfHTcPRZChkr8Z3fUdD\n aV+imS+389TAW4Cw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1778142755;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=0PiS8ntp4QSWyS2bwMqR4q0aFHRNBydk7UQ0jF/kfJw=;\n b=eQoE5mU3WR3oDAi8dSz8lI1tJX81+l8y4VpncSc2WhicZycgiZmN02cs5juKeyJoQz8mnu\n fEB7XlcOaMuDpXa1Qt8/4/lS4tBvapdg1xmRKdvJK6scV5pL67RNVoXKXixBiy2uLDsxMv\n BZ+m/lSYC38J1Tgli1WM+9aQaJO1gUo=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1778142755;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n 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=0PiS8ntp4QSWyS2bwMqR4q0aFHRNBydk7UQ0jF/kfJw=;\n b=OLdGL+ADZ7fvmOyo9J8TZJYTkfEli9SV8x9wqCLHfwVZSMhyqAlnfHTcPRZChkr8Z3fUdD\n aV+imS+389TAW4Cw=="],"Message-ID":"<47b59750-b00c-4f04-956b-38d1695e2ffa@suse.de>","Date":"Thu, 7 May 2026 10:32:34 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Content-Language":"en-US","To":"Cyril Hrubis <chrubis@suse.cz>","References":"<20260411092452.211540-1-rbranco@suse.de>\n <20260415080623.164440-1-rbranco@suse.de> <afjANI7jr23hP4IJ@yuki.lan>\n <bc75c487-59db-47a8-a2f3-db860919b35b@suse.de> <afjb4yWvM8Abh98q@yuki.lan>\n <f834cba1-003e-4751-9a84-ddb6a21c282e@suse.de> <afndbbVfw4hV3c5i@yuki.lan>","From":"Ricardo Branco <rbranco@suse.de>","In-Reply-To":"<afndbbVfw4hV3c5i@yuki.lan>","X-Spam-Level":"","X-Spamd-Result":"default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n NEURAL_HAM_LONG(-1.00)[-1.000];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n FUZZY_RATELIMITED(0.00)[rspamd.com];\n RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[];\n MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2];\n RCVD_TLS_ALL(0.00)[];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+];\n FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n RCVD_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]","X-Spam-Score":"-4.30","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no\n autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-3.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-3.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"Re: [LTP] [PATCH v2] userfaultfd: Use two-step handshake to probe\n features","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>","Cc":"ltp@lists.linux.it","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"}}]