Bug 397265

Summary: [PATCH] Add (partial) support for userfaultfd syscall and related ioctl
Product: [Developer tools] valgrind Reporter: Even Rouault <even.rouault>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Implements userfaultfd syscall and related ioctl

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