Linux-mainline merge requestshttps://gitlab.collabora.com/usama.anjum/linux-mainline/-/merge_requests2024-02-21T11:34:15Zhttps://gitlab.collabora.com/usama.anjum/linux-mainline/-/merge_requests/5Draft: selftests/bpf: Move sample/sampleip_* to bpf tests2024-02-21T11:34:15ZMuhammad Usama AnjumDraft: selftests/bpf: Move sample/sampleip_* to bpf testsMove and update the test to start working with bpf selftest system.
Remove the arguments to the application and run with defaults. These
defaults can be changed as needed later. Use skel library to load
the program.
Signed-off-by: Muham...Move and update the test to start working with bpf selftest system.
Remove the arguments to the application and run with defaults. These
defaults can be changed as needed later. Use skel library to load
the program.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>https://gitlab.collabora.com/usama.anjum/linux-mainline/-/merge_requests/4Draft: selftests/bpf: Migrate a test from test_bpf2024-02-15T10:26:56ZMuhammad Usama AnjumDraft: selftests/bpf: Migrate a test from test_bpfTODO before sending upstream: Think if shorter register definition
macros should be kept or not.
Migrate INT: ADD trivial test from test_bpf to verifier. Set R0 to 0
explicitly at the end of bpf program. Otherwise, the verifier marks th...TODO before sending upstream: Think if shorter register definition
macros should be kept or not.
Migrate INT: ADD trivial test from test_bpf to verifier. Set R0 to 0
explicitly at the end of bpf program. Otherwise, the verifier marks the
test failed. The output of the verifier is as follows:
```
./test_verifier 0
#0/u INT: ADD trivial OK
#0/p INT: ADD trivial OK
Summary: 2 PASSED, 0 SKIPPED, 0 FAILED
```
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>https://gitlab.collabora.com/usama.anjum/linux-mainline/-/merge_requests/3Draft: wip2024-02-19T12:50:11ZMuhammad Usama AnjumDraft: wiphttps://gitlab.collabora.com/usama.anjum/linux-mainline/-/merge_requests/2Draft: Correct vma merging2023-06-26T17:30:34ZMuhammad Usama AnjumDraft: Correct vma merginghttps://gitlab.collabora.com/usama.anjum/linux-mainline/-/merge_requests/1mm: Implement process_memwatch syscall2022-07-26T16:27:59ZMuhammad Usama Anjummm: Implement process_memwatch syscallHello,
This patch series implements a new syscall, process_memwatch. Currently, only the support to watch soft-dirty PTE bit is added. This syscall is generic to watch the memory of the process. There is enough room to add more operatio...Hello,
This patch series implements a new syscall, process_memwatch. Currently, only the support to watch soft-dirty PTE bit is added. This syscall is generic to watch the memory of the process. There is enough room to add more operations like this to watch memory in the future.
Soft-dirty PTE bit of the memory pages can be viewed by using pagemap procfs file. The soft-dirty PTE bit for the memory in a process can be cleared by writing to the clear_refs file. This series adds a feature that wasn't possible through the Proc FS interface.
* There is no atomic get soft-dirty PTE bit status and clear operation possible.
* The soft-dirty PTE bit of only a part of memory cannot be cleared.
Historically, soft-dirty PTE bit tracking has been used in the CRIU project. The Proc FS interface is enough for them as I think the process is frozen. We have the use case where we need to track the soft-dirty PTE bit for running processes. We need this tracking and clear mechanism of a region of memory while the process is running to emulate the Window's getWriteWatch() Syscall. This Window's syscall is used by games to keep track of dirty pages and keep processing only the dirty pages. There are other methods to mimic soft-dirty PTE bit tracking in userspace by with poor performance:
* The mprotect syscall and SIGSEGV handler for bookkeeping
* The userfaultfd syscall with the handler in userspace for bookkeeping
This syscall can be used by the CRIU project and other applications which require soft-dirty PTE bit information. The following operations are supported in this syscall:
* Get the page offsets that are soft-dirty.
* Clear the pages which are soft-dirty.
* The optional flag to ignore the VM_SOFTDIRTY and only track per page soft-dirty PTE bit
Regards,
Muhammad Usama AnjumMuhammad Usama AnjumMuhammad Usama Anjum