4lDO2
490e1b2777
WIP: Track grant ownership.
2023-07-25 10:52:18 +02:00
4lDO2
8dfa73db35
Post-refactor fixes.
2023-07-25 10:52:18 +02:00
4lDO2
34b4512dbd
Refactor Grants.
...
Page alignment is now verified at compile time, for example.
2023-07-25 10:52:13 +02:00
4lDO2
d4b5899c53
Remove allocator_owned hack.
2023-07-25 10:49:55 +02:00
4lDO2
56f88e80c2
Usercopy migration
2023-07-06 13:03:21 +00:00
4lDO2
58c0c5d040
Remove one level of indirection for Context::name.
2023-05-27 14:27:34 +02:00
uuuvn
4621cd674d
Fix kernel DoS via sigreturn from non-signal context
2023-05-04 15:58:05 +04:00
Jeremy Soller
8e0f54cb31
Clippy fixes
2022-11-11 13:19:14 -07:00
Jeremy Soller
5d55d4eb87
Fix warnings
2022-07-29 18:33:54 -06:00
Jeremy Soller
e99cbcf5d2
Fixes for compiling aarch64
2022-07-29 18:06:53 -06:00
Jeremy Soller
0c80643077
Make graphical_debug arch independent and fix lots of warnings
2022-07-29 15:56:44 -06:00
4lDO2
f3faf33e3f
Add a workaround to treat bootstrap mem as owned.
2022-07-28 14:17:02 +02:00
4lDO2
5bbfdcda6b
Add mmap-min-addr and support unmapping parent PTs.
2022-07-27 10:52:45 +02:00
4lDO2
308c2cc711
Support modifying processes' sigactions.
...
This is, other than vfork, the last piece of functionality that the
previous clone() offered (CLONE_SIGHAND) which previously was not
implemented.
2022-07-27 10:52:29 +02:00
4lDO2
c912d9e0db
Partial: migrate syscall handling code to RMM.
2022-07-27 10:52:23 +02:00
4lDO2
8970ce1fe7
Benefit from addrspace abstraction in switch.
2022-07-27 10:52:22 +02:00
4lDO2
1cdd462244
Move the initfs scheme to userspace.
2022-07-27 10:52:22 +02:00
4lDO2
cb40eb3792
Support reading all grants and transferring grants.
2022-07-27 10:52:10 +02:00
4lDO2
283ada82a0
WIP: Remove SYS_CLONE (to be done in userspace).
2022-07-27 10:52:03 +02:00
4lDO2
563121596d
Fix running on multi_core.
...
Turns out the problem all along was that the ActivePageTable was never
dropped in usermode_bootstrap. So as soon as any other hardware thread
tried to do page table business, it deadlocked!
2022-07-27 10:51:45 +02:00
4lDO2
6e5015dcab
WIP: Add necessary interfaces for setuid/setgid.
2022-07-27 10:51:45 +02:00
4lDO2
37f9b292f1
Add kfmap to fix properly reobtaining grants.
2022-07-27 10:51:45 +02:00
4lDO2
23f49414bd
Fix phys offset, lock grants correctly.
2022-07-27 10:51:45 +02:00
4lDO2
15b029de36
Fix everything all the way to booting to desktop.
2022-07-27 10:51:45 +02:00
4lDO2
e6e1348072
Implement exec, and change UserGrant allocator.
2022-07-27 10:51:44 +02:00
4lDO2
846318e716
WIP: Attempt implementing fexec in userspace.
2022-07-27 10:51:43 +02:00
4lDO2
4d7da495f5
Fix "clone grant using fmap"
...
This does the same as the previous MR, but fixes the issue where the
parent process got the mapping (and at the wrong address) and not the
child process.
2022-04-11 21:31:36 +02:00
4lDO2
e72fd5a0e4
Fix a kernel deadlock in empty().
...
For more information, see https://gitlab.redox-os.org/4lDO2/kernel/-/commit/b3b5d1b864eec030d53ccd2ab907c68958f140aa
2022-04-09 13:38:59 +02:00
Jeremy Soller
87b3bef06c
Revert "Merge branch 'clone_grant_using_fmap' into 'master'"
...
This reverts merge request !190
2022-03-30 14:54:49 +00:00
4lDO2
a3356c3fdd
Clone grant using fmap
2021-12-30 11:27:44 +01:00
Jeremy Soller
cd3dcf153e
Do not print interpreter
2021-12-01 08:40:11 -07:00
Jeremy Soller
4f259e3589
Workaround for thread race conditions
2021-11-30 18:03:34 -07:00
Jeremy Soller
515cab03eb
Fix a number of warnings
2021-11-29 20:01:27 -07:00
4lDO2
5f4978a6dc
Return ENOMEM rather than panicking for PML4 alloc.
2021-08-11 17:46:40 +02:00
4lDO2
67cc6799bd
Fix possible UB by checking for null allocating FX.
...
Namely, the global allocator API in Rust, actually only returns a null
pointer on failure, rather than wrapping it in a Result, which AllocRef
does. Since Box::from_raw(null) is direct UB, this can in theory lead to
very strange behavior.
2021-08-11 17:46:40 +02:00
4lDO2
465c461b60
WIP: Stop using recursive mapping.
...
Note that this is very preliminary, and I merely got my already freezing
kernel branch not to triple fault, but I would probably apply this patch
to upstream.
What is changed here, is that rather than relying on recursive mapping
for accessing page table frames, it now uses linear translation
(virt=phys+KERNEL_OFFSET). The only problem is that the paging code now
makes assumptions that the entire physical address space remains mapped,
which is not necessarily the case on x86_64 architecturally, even though
systems with RAM more than a PML4 are very rare. We'd probably lazily
(but linearly) map physical address space using huge pages.
2021-08-11 17:46:33 +02:00
4lDO2
87241a9d3c
Pass AT_PHDR via a grant rather than the stack.
2021-08-01 14:57:41 +02:00
4lDO2
3eedbeb14d
WIP: Let userspace manage fsbase/gsbase and TLS.
2021-08-01 12:09:22 +02:00
4lDO2
0968e4f87e
Support fsgsbase at compile time.
2021-07-31 10:12:59 +02:00
Jeremy Soller
d3cf4db47b
Prerequisites for risv64 support
2021-05-12 20:23:53 -06:00
4lDO2
558109a9cb
Put the KPCRs in high memory, in their own PML4.
...
This also removes the need to do another semi-expensive remap when
cloning processes, since the KPCRs (for kernel TLS) are no longer stored
in the user PML4.
2021-05-06 21:21:37 +02:00
4lDO2
3eacbdda2a
Remove unnecessary exit() diff.
2021-05-06 19:49:58 +02:00
4lDO2
fd97fa80bb
Move pid back to inner scope in exit() handler.
2021-05-06 19:49:58 +02:00
4lDO2
9b4ce0d0cc
WIP: Fix userspace ACPI shutdown.
2021-05-06 19:49:58 +02:00
Jeremy Soller
8d61c79b23
Use RMM TableKind and fix x86_64 compilation
2021-05-03 21:15:46 -06:00
Jeremy Soller
2aa4d8caf5
Merge remote-tracking branch 'origin/aarch64-rebase' into riscv64
2021-05-03 20:52:59 -06:00
Jeremy Soller
17c261553b
Fixes for building x86_64
2021-05-03 20:43:18 -06:00
Jeremy Soller
b9448274fc
Switch to using RMM PageFlags
2021-05-03 17:28:08 -06:00
Jeremy Soller
dd0616cc8f
Use RMM for TLB flushing
2021-05-03 12:42:16 -06:00
Jeremy Soller
d331f72f2a
Use UTF-8 for all paths
2021-04-28 20:06:07 -06:00