[LTP] userfaultfd: Add helper for checking UFFD feature support
Andrea Cervesato
andrea.cervesato@suse.com
Thu May 7 16:40:56 CEST 2026
Hi!
> > + uffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);
> > +
> > + uffdio_api.api = UFFD_API;
> > + SAFE_IOCTL(uffd, UFFDIO_API, &uffdio_api);
>
> If SAFE_IOCTL calls tst_brk(TBROK) here, the local `uffd` is not
> closed before the test runner takes over; the cleanup functions only
> track the global `uffd`. Close it before the SAFE_IOCTL call, or
> restructure to guarantee SAFE_CLOSE on all exit paths.
This is not necessarily wrong, but since TBROK is called, fd is closed
with the process. We need to instruct the agent because I seen this
logical concept being missed a few times.
>
> --- [PATCH 2/3] ---
>
> On Thu, 7 May 2026 14:28:54 +0200, Ricardo Branco wrote:
> > [PATCH 2/3] userfaultfd: Use two-step handshake to probe features
>
> > Fixes: 1840ee23d172b5ab04cca7c2acfa48755b041911
>
> This commit is not reachable in the local git history (grafted shallow
> clone). Please verify the Fixes: tag resolves correctly against the
> upstream LTP tree.
Can you please double check this? Maybe we have an another issue
with the agent.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list