Commit Graph

198 Commits

Author SHA1 Message Date
4lDO2 df37b1f634 External initfs 2022-04-11 21:09:08 +00: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
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
Jeremy Soller 37ebef2d35 Merge branch 'pipe_list_const_fn' into 'master'
Move more of `pipe:`'s initialization to compile time.

See merge request redox-os/kernel!182
2022-03-30 13:54:27 +00:00
Jeremy Soller c5c5b33b6a Merge branch 'clone_grant_using_fmap' into 'master'
Clone grant using fmap

See merge request redox-os/kernel!190
2022-03-30 13:53:08 +00:00
Jeremy Soller 52ad689d37 Notify debug: readers of new input after all input is processed 2022-02-14 08:49:34 -07:00
Jeremy Soller 1aae949fc4 Support for getting live disk from bootloader 2022-02-10 15:49:34 -07:00
4lDO2 a3356c3fdd Clone grant using fmap 2021-12-30 11:27:44 +01:00
Jeremy Soller 515cab03eb Fix a number of warnings 2021-11-29 20:01:27 -07:00
Jeremy Soller 64f1533d6f Implement anonymous fmap 2021-09-22 21:04:04 -06: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
Jeremy Soller 0c3542ff51 Store funmap data with the context's grants 2021-08-10 20:46:30 -06:00
Jeremy Soller f94dc3beb8 Allow current process to access its own proc data 2021-08-10 16:33:49 -06:00
4lDO2 3eedbeb14d WIP: Let userspace manage fsbase/gsbase and TLS. 2021-08-01 12:09:22 +02:00
4lDO2 e92ff831b7 Move more of pipe:s init to compile time. 2021-07-05 11:54:11 +02:00
4lDO2 1cf5f5ea22 Update dependencies to work with latest nightly. 2021-06-17 22:42:54 +02:00
Jeremy Soller d3cf4db47b Prerequisites for risv64 support 2021-05-12 20:23:53 -06:00
4lDO2 b2e131b57b Fix ACPI scheme fevent warning. 2021-05-06 19:49:58 +02:00
4lDO2 7ac5bdbae0 WIP: Implement userspace-driven shutdown. 2021-05-06 19:49:58 +02:00
4lDO2 64b2dd238a Rename the kernel ACPI scheme to kernel/acpi:. 2021-05-06 19:49:57 +02:00
4lDO2 bea6747643 Move all AML code to userspace.
Currently, there are some things that need to be set up by userspace
that the kernel previously did. These include telling firmware when the
I/O APIC is used, and most importantly, shutting down the system.

The former is not particularly important, but for the latter I think
that we could implement this using a "shutdown pipe". Essentially it
will be a file that triggers an event shutting down, which would be used
to notify to acpid that the kernel is requesting a shutdown.
2021-05-06 19:49:57 +02:00
Jeremy Soller 11a3315255 Re-enable acpi feature and gate it for x86_64 only 2021-05-04 08:33:00 -06: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 b9448274fc Switch to using RMM PageFlags 2021-05-03 17:28:08 -06:00
4lDO2 af17eeec3a Give schemes a dangling address for empty slices.
This allows schemes to avoid checking the length against zero before
constructing a slice from pointer+len that the kernel gave.
Additionally, the address is now non-canonical on x86, meaning that
userspace will fail instead of continuing with UB, if they would ever
forget to check the length.
2021-04-29 07:40:50 -06:00
Jeremy Soller d331f72f2a Use UTF-8 for all paths 2021-04-28 20:06:07 -06:00
Jeremy Soller 8fcd375bd9 Switch Context::grants to RwLock 2021-04-28 20:04:27 -06:00
Jeremy Soller 83dea72a50 Switch Context::files to RwLock 2021-04-28 20:03:25 -06:00
Jeremy Soller a9bee0bbdc Require UTF-8 for context name 2021-04-28 20:03:12 -06:00
Jeremy Soller b26c3e0ae9 Make context name a RwLock 2021-04-28 20:03:05 -06:00
Joshua Abraham ee6493d02e UserScheme: permission check EUID and EGID before proceeding with chown
Fixes redox#1327.
2021-03-20 20:42:02 -05:00
Jeremy Soller 47048102ef Fix typo in ContextList 2021-03-02 19:57:44 -07:00
4lDO2 ad58ca1de6 Give schemes a dangling address for empty slices.
This allows schemes to avoid checking the length against zero before
constructing a slice from pointer+len that the kernel gave.
Additionally, the address is now non-canonical on x86, meaning that
userspace will fail instead of continuing with UB, if they would ever
forget to check the length.
2021-02-20 17:20:30 +01:00
Jeremy Soller 6db78cce24 Use UTF-8 for all paths 2021-02-14 13:45:03 -07:00
Jeremy Soller c19bd573b5 Switch Context::grants to RwLock 2021-02-13 13:06:13 -07:00
Jeremy Soller bfaf8438a1 Switch Context::files to RwLock 2021-02-13 12:57:53 -07:00
Jeremy Soller 238702f7d1 Require UTF-8 for context name 2021-02-13 12:16:47 -07:00
Jeremy Soller b9f4a915ea Make context name a RwLock 2021-02-13 11:10:21 -07:00
Robin Randhawa 6cacbb47f6 scheme: user: Use user-space specific pagt table 2021-01-21 11:53:07 +00:00
Robin Randhawa ae3a55f5d1 Introduce a PageTableType enum to help distinguish User and Kernel Tables 2021-01-15 09:12:30 -07:00
Robin Randhawa 02c37d3fae WIP: aarch64 rebase 2021-01-15 05:54:42 -07:00
Jeremy Soller ea6b1e7f8b Update redox_syscall to 0.2.4 2021-01-11 07:01:05 -07:00
Jeremy Soller 334584b3d5 Use rmm::PhysicalAddress and rmm::VirtualAddress directly 2021-01-09 21:16:11 -07:00
Jeremy Soller afa175f778 Merge branch 'jD91mZM2/kernel-remove-brk' into HEAD 2020-08-27 10:26:29 -06:00
Jeremy Soller 853b77e3a4 Unmap owned grants, use owned grants to calculate memory usage 2020-08-25 10:35:55 -06:00
jD91mZM2 922b3d0437 Remove brk 2020-08-15 17:36:50 +02:00
jD91mZM2 78e5c71103 Deprecate the original fmap/funmap
The cool thing here is that we're temporarily binary compatible with the
old stuff, so if anyone would use an old version of redox_syscall we can
easily find them with these prints.
2020-08-14 15:18:47 +02:00
Jeremy Soller ec1809e7c0 Add memory: to null namespace, temporarily 2020-08-02 17:05:17 -06:00
jD91mZM2 55c3377c5c Use VirtualAddress wrapper in user.rs 2020-07-30 14:21:57 +02:00