Commit Graph

107 Commits

Author SHA1 Message Date
4lDO2 772003138d Add a backwards-compatible interface for more IRQs. 2020-03-28 13:37:03 +01:00
4lDO2 65e8abb449 Allow multiple processes to share IRQs.
I haven't been able to receive xhc interrupt anyway.
2020-03-28 13:37:03 +01:00
Jeremy Soller b616fdb067 Keep track of ticks each context uses 2020-02-18 21:16:53 -07:00
Jeremy Soller b892603501 Require mutable context to perform page table modifications 2020-02-10 17:58:44 -07:00
Joshua Abraham 6a48ae3d8b Fix deadlock in sys: scheme
This patch fixes a deadlock in the sys: scheme that is triggered
when the iostat resource() is called in the same scope where the RwLock
protecting the scheme's handles is write-locked.
2020-01-25 17:39:51 -05:00
Jeremy Soller 57a6359333 Do not add newline to sys:exe 2019-12-22 18:23:36 -07:00
Jeremy Soller 63e2a835e0 Fix clippy.sh script and fix a number of clippy warnings 2019-10-06 11:04:06 -06:00
jD91mZM2 ab1a12ad4a Remove deadlock-prone mutex in proc.rs
I believe this could cause a deadlock if a blocking I/O operation was
interrupted by a signal or otherwise, and decided to exit and close
all files. It's unlikely to happen, but it can happen nontheless. This
removes the mutex, but it's difficult to keep the code tidy. Hopefully
this is good enough.
2019-08-15 16:07:38 +02:00
jD91mZM2 cf0a7620df Add ptrace exit breakpoint
This will let you stop at process exit and inspect it right before the
process dies.
2019-08-15 14:23:54 +02:00
jD91mZM2 2544feb33f Disallow changing CS which contains CPL 2019-08-15 12:26:29 +02:00
jD91mZM2 62cd298202 Merge ProtFlags with MapFlags 2019-07-30 11:45:54 +02:00
jD91mZM2 a7b2bd22c1 More cleanup... 2019-07-27 15:39:09 +02:00
jD91mZM2 538ca49ee2 Suggestion: Switch to bitflags 2019-07-26 12:23:21 +02:00
jD91mZM2 0e2b0d0fd4 Fix a few details 2019-07-26 10:29:31 +02:00
jD91mZM2 3ac1416dba First step for ptrace overhaul 2019-07-24 21:42:33 +02:00
jD91mZM2 a7da393cf5 WIP(ptrace): Better support for signals
Signals now cause an event, and there's a way to continue until the
next signal. I can see this being used for detection of `int3`
although I'm not entirely sure as it may prove being too late to stop
abortion of process.
2019-07-21 19:58:32 +02:00
jD91mZM2 7426e48105 WIP(ptrace): Extract repeated arch-specific code to ptrace module 2019-07-21 13:28:31 +02:00
jD91mZM2 be867ae5f1 WIP(ptrace): Add ptrace event system for catching child forks 2019-07-20 09:45:07 +02:00
jD91mZM2 3d44242407 WIP(ptrace): Finally add stronger security checks 2019-07-20 09:45:07 +02:00
Jeremy Soller 532ffe25cf Unmounting support 2019-07-18 21:00:36 -06:00
Jeremy Soller 113af69434 Remove scheme if closed 2019-07-18 20:58:06 -06:00
Jeremy Soller 4b2c15f0b9 Remove scheme by ID 2019-07-18 20:57:51 -06:00
jD91mZM2 6fbb4fbae1 Ptrace memory reading and floating point registers support 2019-07-07 17:07:04 +00:00
Jeremy Soller 788526a3b3 Bare-bones ptracing functionality
Since even a very basic ptrace can be nice to have, I thought I would split
the, perhaps rather big, ptrace project up in multiple PRs to make as few
changes as necessary in each. This PR contains the initial registry modifying
bits and only a very basic security measure. Letting this out to the community
should be good for spotting bugs and maybe getting some hype ;)
2019-07-02 07:38:26 -06:00
Jeremy Soller 45ea634798 Revert "Merge branch 'ptrace' into 'master'"
This reverts merge request !103
2019-07-02 11:56:11 +00:00
jD91mZM2 effe02bd45 Remove change I am faaairly certain I did NOT add :O
I'm guessing it's some issue after a rebase or something...
2019-07-01 22:50:19 +00:00
jD91mZM2 fe705d9b63 Switch to 2018 edition
Most of this was generated by the absolutely extraordinary `cargo fix`
subcommand. There were still 2 errors and a few warnings to patch up,
but compared to the normal 600+ errors, I'd say the fixer did a damn
good job! I'm also amazed that I could still start the VM after this,
I half expected some kinds of runtime failure...
2019-06-21 12:12:01 +02:00
Jeremy Soller fcd8ce7e1b Fix event logic for pipes 2019-04-28 13:32:24 -06:00
Jeremy Soller afa3f38310 Allow seek in root scheme directory listings 2019-04-27 08:13:20 -06:00
Jeremy Soller f042bd5d07 Update for new rust 2019-04-07 10:57:33 -06:00
Jeremy Soller f36506613b Update funmap support 2019-04-06 20:13:55 -06:00
Jeremy Soller e5cf6efa64 Support specification of stack with clone system call and CLONE_STACK flag 2019-03-31 14:35:45 -06:00
Jeremy Soller d2095d8d0f Add in-memory logging, retrievable from sys:log 2019-03-17 09:31:34 -06:00
Jeremy Soller f7c9712977 Fix warning in irq scheme 2019-03-17 09:31:03 -06:00
Jeremy Soller e2a6233c12 New fevent functionality to prevent missing events 2019-03-13 13:57:07 -06:00
Jeremy Soller b80f38b039 More debugging output options 2019-03-11 19:50:50 -06:00
Jeremy Soller 6042cdb0a2 Remove unused import 2019-02-02 14:04:53 -07:00
Jeremy Soller b4575711c7 Fix logic error when cloning file descriptor in user scheme fmap 2019-02-02 08:11:07 -07:00
Jeremy Soller 504e93d11b Store file descriptor for mapped files until they are unmapped 2019-01-28 19:27:20 -07:00
Jeremy Soller 30f1265c36 Add pages to use for head and tail of buffers in userscheme 2019-01-01 12:37:23 -07:00
Jeremy Soller b18e322c3f WIP: itimer and sigprocmask 2018-12-28 21:53:40 -07:00
Jeremy Soller a31af81f8b Update fmap support 2018-12-28 15:35:21 -07:00
Jeremy Soller ef919f3d52 Implement EINTR for anything using wait_queue 2018-12-22 08:02:00 -07:00
Jeremy Soller 9af4d6a2e0 Fix compilation of graphical_debug feature and remove live feature warnings. 2018-11-21 19:38:14 -07:00
Jeremy Soller 5b31bf57be Update to latest rust 2018-11-08 17:25:57 -07:00
Jeremy Soller 15313f98af Remove unnecessary dup implementations 2018-10-20 08:08:31 -06:00
Jeremy Soller 9570de21d1 Merge remote-tracking branch 'origin/relibc' 2018-10-14 16:43:54 -06:00
Jeremy Soller 30e68f917e Remove env scheme and env field on context, fix all warnings 2018-08-11 11:34:32 -06:00
jD91mZM2 55f2303d2c Implement fmap for memory: 2018-07-05 14:17:58 +02:00
Jeremy Soller 43a163d8d6 Debug scheme will return correct event id 2018-05-20 12:56:37 -06:00