From: Cyril Hrubis <chrubis@suse.cz>
To: Ricardo Branco <rbranco@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] userfaultfd: Add test using UFFDIO_POISON
Date: Fri, 6 Feb 2026 15:47:42 +0100 [thread overview]
Message-ID: <aYX_DueFX9WiLHSu@yuki.lan> (raw)
In-Reply-To: <20260205205609.147851-1-rbranco@suse.de>
Hi!
> +static void run(void)
> +{
> + pthread_t thr;
> + struct uffdio_api uffdio_api = {};
> + struct uffdio_register uffdio_register;
> + struct sigaction sa = {};
> + volatile char dummy;
> +
> + sa.sa_handler = sigbus_handler;
> + sigemptyset(&sa.sa_mask);
> + SAFE_SIGACTION(SIGBUS, &sa, NULL);
> +
> + set_pages();
> +
> + uffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);
> +
> + uffdio_api.api = UFFD_API;
> + uffdio_api.features = UFFD_FEATURE_POISON;
> +
> + SAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);
> +
> + uffdio_register.range.start = (unsigned long) page;
> + uffdio_register.range.len = page_size;
> + uffdio_register.mode = UFFDIO_REGISTER_MODE_MISSING;
> +
> + SAFE_IOCTL(uffd, UFFDIO_REGISTER, &uffdio_register);
> +
> + SAFE_PTHREAD_BARRIER_INIT(&barrier, NULL, 2);
Why does this test need barriers and the rest of the tests that looks
nearly the same does not?
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-02-06 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 20:56 [LTP] [PATCH] userfaultfd: Add test using UFFDIO_POISON Ricardo Branco
2026-02-06 14:47 ` Cyril Hrubis [this message]
2026-02-06 15:47 ` Ricardo Branco
2026-02-06 14:47 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYX_DueFX9WiLHSu@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=rbranco@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.