https://github.com/zyedidia/libmemstk
https://github.com/zyedidia/libmemstk
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/zyedidia/libmemstk
- Owner: zyedidia
- Created: 2022-03-17T20:28:53.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-04T21:10:44.000Z (over 3 years ago)
- Last Synced: 2025-01-16T09:56:36.494Z (12 months ago)
- Language: C
- Size: 34.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This library can use three different backend implementations: `mprotect`,
`userfaultfd`, and `dune`. The backend is selected in the Makefile with the
`MPROT` variable.
# mprotect
Uses the `mprotect` system call and a sigsegv signal handler to handle faults. This version
should work on any version of Linux.
# userfaultfd
This implementation uses the modern `userfaultfd` Linux API to handle page
faults. The `userfaultfd` system call requires sudo by default. Alternatively,
you may enable unprivileged use of userfaultfd with
```
sysctl -w vm.unprivileged_userfaultfd=1
```
The userfaultfd version requires Linux kernel 5.10+. If you do not have a modern
kernel, you can use the Vagrant virtual machine to run one. You must have vagrant
and VirtualBox installed.
```
$ vagrant up
...
$ vagrant ssh
```
# dune
This implementation uses [Dune](https://github.com/project-dune/dune) to
virtualize the process and allow it to handle its own page faults.