Bug 397265 - [PATCH] Add (partial) support for userfaultfd syscall and related ioctl
Summary: [PATCH] Add (partial) support for userfaultfd syscall and related ioctl
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-08 10:01 UTC by Even Rouault
Modified: 2018-08-08 10:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Implements userfaultfd syscall and related ioctl (10.47 KB, patch)
2018-08-08 10:01 UTC, Even Rouault
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Even Rouault 2018-08-08 10:01:45 UTC
Created attachment 114371 [details]
Implements userfaultfd syscall and related ioctl

The attached patch adds partial support for userfaultfd syscall and related ioctl

This is just a start, since unfortunately full support for the userfaultfd mechanism would require deeper changes in Valgrind internals, which I don't master.

When trying on the demo program at the end of
http://man7.org/linux/man-pages/man2/userfaultfd.2.html,
Attaching gdb, it looks like Valgrind is stuck on the "char c = addr[l];" instruction that accesses a unmapped page. Apparently the fault-handling thread is not waken up