| bcf3d957 | 03-Jul-2024 |
Benjamin Berg <[email protected]> |
um: refactor TLB update handling
Conceptually, we want the memory mappings to always be up to date and represent whatever is in the TLB. To ensure that, we need to sync them over in the userspace ca
um: refactor TLB update handling
Conceptually, we want the memory mappings to always be up to date and represent whatever is in the TLB. To ensure that, we need to sync them over in the userspace case and for the kernel we need to process the mappings.
The kernel will call flush_tlb_* if page table entries that were valid before become invalid. Unfortunately, this is not the case if entries are added.
As such, change both flush_tlb_* and set_ptes to track the memory range that has to be synchronized. For the kernel, we need to execute a flush_tlb_kern_* immediately but we can wait for the first page fault in case of set_ptes. For userspace in contrast we only store that a range of memory needs to be synced and do so whenever we switch to that process.
Signed-off-by: Benjamin Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
show more ...
|
| 3c83170d | 03-Jul-2024 |
Benjamin Berg <[email protected]> |
um: Delay flushing syscalls until the thread is restarted
As running the syscalls is expensive due to context switches, we should do so as late as possible in case more syscalls need to be queued la
um: Delay flushing syscalls until the thread is restarted
As running the syscalls is expensive due to context switches, we should do so as late as possible in case more syscalls need to be queued later on. This will also benefit a later move to a SECCOMP enabled userspace as in that case the need for extra context switches is removed entirely.
Signed-off-by: Benjamin Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
show more ...
|
| 7911b650 | 03-Jul-2024 |
Benjamin Berg <[email protected]> |
um: remove LDT support
The current LDT code has a few issues that mean it should be redone in a different way once we always start with a fresh MM even when cloning.
In a new and better world, the
um: remove LDT support
The current LDT code has a few issues that mean it should be redone in a different way once we always start with a fresh MM even when cloning.
In a new and better world, the kernel would just ensure its own LDT is clear at startup. At that point, all that is needed is a simple function to populate the LDT from another MM in arch_dup_mmap combined with some tracking of the installed LDT entries for each MM.
Note that the old implementation was even incorrect with regard to reading, as it copied out the LDT entries in the internal format rather than converting them to the userspace structure.
Removal should be fine as the LDT is not used for thread-local storage anymore.
Signed-off-by: Benjamin Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
show more ...
|
| 84b2789d | 13-Jan-2021 |
Johannes Berg <[email protected]> |
um: separate child and parent errors in clone stub
If the two are mixed up, then it looks as though the parent returned an error if the child failed (before) the mmap(), and then the resulting proce
um: separate child and parent errors in clone stub
If the two are mixed up, then it looks as though the parent returned an error if the child failed (before) the mmap(), and then the resulting process never gets killed. Fix this by splitting the child and parent errors, reporting and using them appropriately.
Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
show more ...
|